summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testsuites/aclocal/canonical-target-name.m425
-rw-r--r--testsuites/aclocal/canonicalize-tools.m420
-rw-r--r--testsuites/aclocal/check-cpuopts.m421
-rw-r--r--testsuites/aclocal/check-custom-bsp.m422
-rw-r--r--testsuites/aclocal/check-cxx.m420
-rw-r--r--testsuites/aclocal/check-tool.m49
-rw-r--r--testsuites/aclocal/enable-cxx.m411
-rw-r--r--testsuites/aclocal/enable-tests.m411
-rw-r--r--testsuites/aclocal/env-rtemsbsp.m427
-rw-r--r--testsuites/aclocal/gcc-specs.m416
-rw-r--r--testsuites/aclocal/prog-cc.m440
-rw-r--r--testsuites/aclocal/prog-cxx.m449
-rw-r--r--testsuites/aclocal/project-root.m47
-rw-r--r--testsuites/aclocal/rtems-bsp-includes.m413
-rw-r--r--testsuites/aclocal/rtems-bsp-linkcmds.m425
-rw-r--r--testsuites/aclocal/rtems-build-top.m412
-rw-r--r--testsuites/aclocal/rtems-includes.m423
-rw-r--r--testsuites/aclocal/rtems-source-top.m48
-rw-r--r--testsuites/aclocal/rtems-test-check.m431
-rw-r--r--testsuites/aclocal/rtems-top.m483
-rw-r--r--testsuites/aclocal/version.m44
-rw-r--r--testsuites/ada/aclocal/prog-gnat.m444
-rw-r--r--testsuites/ada/mptests/mp01/config_base.h25
-rw-r--r--testsuites/ada/mptests/mp01/mp01.adb25
-rw-r--r--testsuites/ada/mptests/mp01/mptest.adb25
-rw-r--r--testsuites/ada/mptests/mp01/mptest.ads25
-rw-r--r--testsuites/ada/mptests/mp01/node1/init.c25
-rw-r--r--testsuites/ada/mptests/mp01/node1/mp01_node1.adb25
-rw-r--r--testsuites/ada/mptests/mp01/node2/init.c25
-rw-r--r--testsuites/ada/mptests/mp01/node2/mp01_node2.adb25
-rw-r--r--testsuites/ada/mptests/mp03/config_base.h25
-rw-r--r--testsuites/ada/mptests/mp03/mptest.adb25
-rw-r--r--testsuites/ada/mptests/mp03/mptest.ads25
-rw-r--r--testsuites/ada/mptests/mp03/node1/init.c25
-rw-r--r--testsuites/ada/mptests/mp03/node1/mp03_node1.adb25
-rw-r--r--testsuites/ada/mptests/mp03/node2/init.c25
-rw-r--r--testsuites/ada/mptests/mp03/node2/mp03_node2.adb25
-rw-r--r--testsuites/ada/mptests/mp04/config_base.h25
-rw-r--r--testsuites/ada/mptests/mp04/mptest.adb25
-rw-r--r--testsuites/ada/mptests/mp04/mptest.ads25
-rw-r--r--testsuites/ada/mptests/mp04/node1/init.c25
-rw-r--r--testsuites/ada/mptests/mp04/node1/mp04_node1.adb25
-rw-r--r--testsuites/ada/mptests/mp04/node2/init.c25
-rw-r--r--testsuites/ada/mptests/mp04/node2/mp04_node2.adb25
-rw-r--r--testsuites/ada/mptests/mp05/config_base.h25
-rw-r--r--testsuites/ada/mptests/mp05/mptest.adb25
-rw-r--r--testsuites/ada/mptests/mp05/mptest.ads25
-rw-r--r--testsuites/ada/mptests/mp05/node1/init.c25
-rw-r--r--testsuites/ada/mptests/mp05/node1/mp05_node1.adb25
-rw-r--r--testsuites/ada/mptests/mp05/node2/init.c25
-rw-r--r--testsuites/ada/mptests/mp05/node2/mp05_node2.adb25
-rw-r--r--testsuites/ada/mptests/mp06/config_base.h25
-rw-r--r--testsuites/ada/mptests/mp06/mptest.adb25
-rw-r--r--testsuites/ada/mptests/mp06/mptest.ads25
-rw-r--r--testsuites/ada/mptests/mp06/node1/init.c25
-rw-r--r--testsuites/ada/mptests/mp06/node1/mp06_node1.adb25
-rw-r--r--testsuites/ada/mptests/mp06/node2/init.c25
-rw-r--r--testsuites/ada/mptests/mp06/node2/mp06_node2.adb25
-rw-r--r--testsuites/ada/mptests/mp07/config_base.h25
-rw-r--r--testsuites/ada/mptests/mp07/mptest.adb25
-rw-r--r--testsuites/ada/mptests/mp07/mptest.ads25
-rw-r--r--testsuites/ada/mptests/mp07/node1/init.c25
-rw-r--r--testsuites/ada/mptests/mp07/node1/mp07_node1.adb25
-rw-r--r--testsuites/ada/mptests/mp07/node2/init.c25
-rw-r--r--testsuites/ada/mptests/mp07/node2/mp07_node2.adb25
-rw-r--r--testsuites/ada/mptests/mp08/config_base.h25
-rw-r--r--testsuites/ada/mptests/mp08/mptest.adb25
-rw-r--r--testsuites/ada/mptests/mp08/mptest.ads25
-rw-r--r--testsuites/ada/mptests/mp08/node1/init.c25
-rw-r--r--testsuites/ada/mptests/mp08/node1/mp08_node1.adb25
-rw-r--r--testsuites/ada/mptests/mp08/node2/init.c25
-rw-r--r--testsuites/ada/mptests/mp08/node2/mp08_node2.adb25
-rw-r--r--testsuites/ada/mptests/mp09/config_base.h25
-rw-r--r--testsuites/ada/mptests/mp09/mptest.adb25
-rw-r--r--testsuites/ada/mptests/mp09/mptest.ads25
-rw-r--r--testsuites/ada/mptests/mp09/node1/init.c25
-rw-r--r--testsuites/ada/mptests/mp09/node1/mp09_node1.adb25
-rw-r--r--testsuites/ada/mptests/mp09/node2/init.c25
-rw-r--r--testsuites/ada/mptests/mp09/node2/mp09_node2.adb25
-rw-r--r--testsuites/ada/mptests/mp10/config_base.h25
-rw-r--r--testsuites/ada/mptests/mp10/mptest.adb25
-rw-r--r--testsuites/ada/mptests/mp10/mptest.ads25
-rw-r--r--testsuites/ada/mptests/mp10/node1/init.c25
-rw-r--r--testsuites/ada/mptests/mp10/node1/mp10_node1.adb25
-rw-r--r--testsuites/ada/mptests/mp10/node2/init.c25
-rw-r--r--testsuites/ada/mptests/mp10/node2/mp10_node2.adb25
-rw-r--r--testsuites/ada/mptests/mp11/config_base.h25
-rw-r--r--testsuites/ada/mptests/mp11/mptest.adb25
-rw-r--r--testsuites/ada/mptests/mp11/mptest.ads25
-rw-r--r--testsuites/ada/mptests/mp11/node1/init.c25
-rw-r--r--testsuites/ada/mptests/mp11/node1/mp11_node1.adb25
-rw-r--r--testsuites/ada/mptests/mp11/node2/init.c25
-rw-r--r--testsuites/ada/mptests/mp11/node2/mp11_node2.adb25
-rw-r--r--testsuites/ada/mptests/mp12/config_base.h25
-rw-r--r--testsuites/ada/mptests/mp12/mptest.adb25
-rw-r--r--testsuites/ada/mptests/mp12/mptest.ads25
-rw-r--r--testsuites/ada/mptests/mp12/node1/init.c25
-rw-r--r--testsuites/ada/mptests/mp12/node1/mp12_node1.adb25
-rw-r--r--testsuites/ada/mptests/mp12/node2/init.c25
-rw-r--r--testsuites/ada/mptests/mp12/node2/mp12_node2.adb25
-rw-r--r--testsuites/ada/mptests/mp13/config_base.h25
-rw-r--r--testsuites/ada/mptests/mp13/mptest.adb25
-rw-r--r--testsuites/ada/mptests/mp13/mptest.ads25
-rw-r--r--testsuites/ada/mptests/mp13/node1/init.c25
-rw-r--r--testsuites/ada/mptests/mp13/node1/mp13_node1.adb25
-rw-r--r--testsuites/ada/mptests/mp13/node2/init.c25
-rw-r--r--testsuites/ada/mptests/mp13/node2/mp13_node2.adb25
-rw-r--r--testsuites/ada/mptests/mp14/config_base.h25
-rw-r--r--testsuites/ada/mptests/mp14/mptest.adb25
-rw-r--r--testsuites/ada/mptests/mp14/mptest.ads25
-rw-r--r--testsuites/ada/mptests/mp14/node1/init.c25
-rw-r--r--testsuites/ada/mptests/mp14/node1/mp14_node1.adb25
-rw-r--r--testsuites/ada/mptests/mp14/node2/init.c25
-rw-r--r--testsuites/ada/mptests/mp14/node2/mp14_node2.adb25
-rw-r--r--testsuites/ada/samples/base_mp/init.c25
-rw-r--r--testsuites/ada/samples/base_mp/mptest.adb25
-rw-r--r--testsuites/ada/samples/base_mp/mptest.ads25
-rw-r--r--testsuites/ada/samples/base_mp/node1/init.c33
-rw-r--r--testsuites/ada/samples/base_mp/node2/init.c33
-rw-r--r--testsuites/ada/samples/base_sp/base_sp.adb25
-rw-r--r--testsuites/ada/samples/base_sp/init.c25
-rw-r--r--testsuites/ada/samples/base_sp/sptest.adb25
-rw-r--r--testsuites/ada/samples/base_sp/sptest.ads25
-rw-r--r--testsuites/ada/samples/hello/hello.adb25
-rw-r--r--testsuites/ada/samples/hello/init.c25
-rw-r--r--testsuites/ada/samples/hello/sptest.adb25
-rw-r--r--testsuites/ada/samples/hello/sptest.ads25
-rw-r--r--testsuites/ada/samples/nsecs/init.c25
-rw-r--r--testsuites/ada/samples/nsecs/nsecs.adb25
-rw-r--r--testsuites/ada/samples/nsecs/sptest.adb25
-rw-r--r--testsuites/ada/samples/nsecs/sptest.ads25
-rw-r--r--testsuites/ada/samples/ticker/init.c25
-rw-r--r--testsuites/ada/samples/ticker/sptest.adb25
-rw-r--r--testsuites/ada/samples/ticker/sptest.ads25
-rw-r--r--testsuites/ada/samples/ticker/ticker.adb25
-rw-r--r--testsuites/ada/sptests/sp01/init.c25
-rw-r--r--testsuites/ada/sptests/sp01/sp01.adb25
-rw-r--r--testsuites/ada/sptests/sp01/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp01/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp02/init.c25
-rw-r--r--testsuites/ada/sptests/sp02/sp02.adb25
-rw-r--r--testsuites/ada/sptests/sp02/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp02/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp03/init.c25
-rw-r--r--testsuites/ada/sptests/sp03/sp03.adb25
-rw-r--r--testsuites/ada/sptests/sp03/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp03/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp04/init.c25
-rw-r--r--testsuites/ada/sptests/sp04/sp04.adb25
-rw-r--r--testsuites/ada/sptests/sp04/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp04/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp05/init.c25
-rw-r--r--testsuites/ada/sptests/sp05/sp05.adb25
-rw-r--r--testsuites/ada/sptests/sp05/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp05/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp06/init.c25
-rw-r--r--testsuites/ada/sptests/sp06/sp06.adb25
-rw-r--r--testsuites/ada/sptests/sp06/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp06/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp07/init.c25
-rw-r--r--testsuites/ada/sptests/sp07/sp07.adb25
-rw-r--r--testsuites/ada/sptests/sp07/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp07/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp08/init.c25
-rw-r--r--testsuites/ada/sptests/sp08/sp08.adb25
-rw-r--r--testsuites/ada/sptests/sp08/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp08/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp09/init.c25
-rw-r--r--testsuites/ada/sptests/sp09/sp09.adb25
-rw-r--r--testsuites/ada/sptests/sp09/sptest.adb43
-rw-r--r--testsuites/ada/sptests/sp09/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp11/init.c25
-rw-r--r--testsuites/ada/sptests/sp11/sp11.adb25
-rw-r--r--testsuites/ada/sptests/sp11/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp11/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp12/init.c25
-rw-r--r--testsuites/ada/sptests/sp12/sp12.adb25
-rw-r--r--testsuites/ada/sptests/sp12/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp12/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp13/init.c25
-rw-r--r--testsuites/ada/sptests/sp13/sp13.adb25
-rw-r--r--testsuites/ada/sptests/sp13/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp13/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp14/init.c25
-rw-r--r--testsuites/ada/sptests/sp14/sp14.adb25
-rw-r--r--testsuites/ada/sptests/sp14/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp14/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp15/init.c25
-rw-r--r--testsuites/ada/sptests/sp15/sp15.adb25
-rw-r--r--testsuites/ada/sptests/sp15/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp15/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp16/init.c25
-rw-r--r--testsuites/ada/sptests/sp16/sp16.adb25
-rw-r--r--testsuites/ada/sptests/sp16/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp16/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp17/init.c25
-rw-r--r--testsuites/ada/sptests/sp17/sp17.adb25
-rw-r--r--testsuites/ada/sptests/sp17/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp17/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp19/init.c25
-rw-r--r--testsuites/ada/sptests/sp19/sp19.adb25
-rw-r--r--testsuites/ada/sptests/sp19/sptest.adb48
-rw-r--r--testsuites/ada/sptests/sp19/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp20/init.c25
-rw-r--r--testsuites/ada/sptests/sp20/sp20.adb25
-rw-r--r--testsuites/ada/sptests/sp20/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp20/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp22/init.c25
-rw-r--r--testsuites/ada/sptests/sp22/sp22.adb25
-rw-r--r--testsuites/ada/sptests/sp22/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp22/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp23/init.c25
-rw-r--r--testsuites/ada/sptests/sp23/sp23.adb25
-rw-r--r--testsuites/ada/sptests/sp23/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp23/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp24/init.c25
-rw-r--r--testsuites/ada/sptests/sp24/sp24.adb25
-rw-r--r--testsuites/ada/sptests/sp24/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp24/sptest.ads25
-rw-r--r--testsuites/ada/sptests/sp25/init.c25
-rw-r--r--testsuites/ada/sptests/sp25/sp25.adb25
-rw-r--r--testsuites/ada/sptests/sp25/sptest.adb25
-rw-r--r--testsuites/ada/sptests/sp25/sptest.ads25
-rw-r--r--testsuites/ada/sptests/spatcb01/init.c27
-rw-r--r--testsuites/ada/sptests/spatcb01/spatcb01.adb27
-rw-r--r--testsuites/ada/sptests/spname01/init.c25
-rw-r--r--testsuites/ada/sptests/spname01/spname01.adb25
-rw-r--r--testsuites/ada/sptests/spname01/sptest.adb25
-rw-r--r--testsuites/ada/sptests/spname01/sptest.ads25
-rw-r--r--testsuites/ada/support/address_io.adb25
-rw-r--r--testsuites/ada/support/address_io.ads25
-rw-r--r--testsuites/ada/support/float_io.ads25
-rw-r--r--testsuites/ada/support/fp.inc25
-rw-r--r--testsuites/ada/support/integer.inc25
-rw-r--r--testsuites/ada/support/rtems_calling_overhead.ads25
-rw-r--r--testsuites/ada/support/status_io.ads25
-rw-r--r--testsuites/ada/support/test_support.adb25
-rw-r--r--testsuites/ada/support/test_support.ads25
-rw-r--r--testsuites/ada/support/time_test_support.adb25
-rw-r--r--testsuites/ada/support/time_test_support.ads25
-rw-r--r--testsuites/ada/support/timer_driver.adb25
-rw-r--r--testsuites/ada/support/timer_driver.ads25
-rw-r--r--testsuites/ada/support/unsigned32_io.ads25
-rw-r--r--testsuites/ada/tmtests/tm01/init.c26
-rw-r--r--testsuites/ada/tmtests/tm01/tm01.adb25
-rw-r--r--testsuites/ada/tmtests/tm01/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm01/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm02/init.c26
-rw-r--r--testsuites/ada/tmtests/tm02/tm02.adb25
-rw-r--r--testsuites/ada/tmtests/tm02/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm02/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm03/init.c26
-rw-r--r--testsuites/ada/tmtests/tm03/tm03.adb25
-rw-r--r--testsuites/ada/tmtests/tm03/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm03/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm04/init.c26
-rw-r--r--testsuites/ada/tmtests/tm04/tm04.adb25
-rw-r--r--testsuites/ada/tmtests/tm04/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm04/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm05/init.c26
-rw-r--r--testsuites/ada/tmtests/tm05/tm05.adb25
-rw-r--r--testsuites/ada/tmtests/tm05/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm05/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm06/init.c26
-rw-r--r--testsuites/ada/tmtests/tm06/tm06.adb25
-rw-r--r--testsuites/ada/tmtests/tm06/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm06/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm07/init.c26
-rw-r--r--testsuites/ada/tmtests/tm07/tm07.adb25
-rw-r--r--testsuites/ada/tmtests/tm07/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm07/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm08/init.c26
-rw-r--r--testsuites/ada/tmtests/tm08/tm08.adb25
-rw-r--r--testsuites/ada/tmtests/tm08/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm08/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm09/init.c26
-rw-r--r--testsuites/ada/tmtests/tm09/tm09.adb25
-rw-r--r--testsuites/ada/tmtests/tm09/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm09/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm10/init.c26
-rw-r--r--testsuites/ada/tmtests/tm10/tm10.adb25
-rw-r--r--testsuites/ada/tmtests/tm10/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm10/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm11/init.c26
-rw-r--r--testsuites/ada/tmtests/tm11/tm11.adb25
-rw-r--r--testsuites/ada/tmtests/tm11/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm11/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm12/init.c26
-rw-r--r--testsuites/ada/tmtests/tm12/tm12.adb25
-rw-r--r--testsuites/ada/tmtests/tm12/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm12/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm13/init.c26
-rw-r--r--testsuites/ada/tmtests/tm13/tm13.adb25
-rw-r--r--testsuites/ada/tmtests/tm13/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm13/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm14/init.c26
-rw-r--r--testsuites/ada/tmtests/tm14/tm14.adb25
-rw-r--r--testsuites/ada/tmtests/tm14/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm14/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm15/init.c26
-rw-r--r--testsuites/ada/tmtests/tm15/tm15.adb25
-rw-r--r--testsuites/ada/tmtests/tm15/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm15/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm16/init.c26
-rw-r--r--testsuites/ada/tmtests/tm16/tm16.adb25
-rw-r--r--testsuites/ada/tmtests/tm16/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm16/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm17/init.c26
-rw-r--r--testsuites/ada/tmtests/tm17/tm17.adb25
-rw-r--r--testsuites/ada/tmtests/tm17/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm17/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm18/init.c26
-rw-r--r--testsuites/ada/tmtests/tm18/tm18.adb25
-rw-r--r--testsuites/ada/tmtests/tm18/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm18/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm19/init.c26
-rw-r--r--testsuites/ada/tmtests/tm19/tm19.adb25
-rw-r--r--testsuites/ada/tmtests/tm19/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm19/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm20/init.c26
-rw-r--r--testsuites/ada/tmtests/tm20/tm20.adb25
-rw-r--r--testsuites/ada/tmtests/tm20/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm20/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm21/init.c26
-rw-r--r--testsuites/ada/tmtests/tm21/tm21.adb25
-rw-r--r--testsuites/ada/tmtests/tm21/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm21/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm22/init.c26
-rw-r--r--testsuites/ada/tmtests/tm22/tm22.adb25
-rw-r--r--testsuites/ada/tmtests/tm22/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm22/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm23/init.c26
-rw-r--r--testsuites/ada/tmtests/tm23/tm23.adb25
-rw-r--r--testsuites/ada/tmtests/tm23/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm23/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm24/init.c26
-rw-r--r--testsuites/ada/tmtests/tm24/tm24.adb25
-rw-r--r--testsuites/ada/tmtests/tm24/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm24/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm25/init.c26
-rw-r--r--testsuites/ada/tmtests/tm25/tm25.adb25
-rw-r--r--testsuites/ada/tmtests/tm25/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm25/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm28/init.c26
-rw-r--r--testsuites/ada/tmtests/tm28/tm28.adb25
-rw-r--r--testsuites/ada/tmtests/tm28/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm28/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tm29/init.c26
-rw-r--r--testsuites/ada/tmtests/tm29/tm29.adb25
-rw-r--r--testsuites/ada/tmtests/tm29/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tm29/tmtest.ads25
-rw-r--r--testsuites/ada/tmtests/tmck/init.c26
-rw-r--r--testsuites/ada/tmtests/tmck/tmck.adb25
-rw-r--r--testsuites/ada/tmtests/tmck/tmtest.adb25
-rw-r--r--testsuites/ada/tmtests/tmck/tmtest.ads25
-rw-r--r--testsuites/benchmarks/dhrystone/dhry_1.c1
-rw-r--r--testsuites/benchmarks/dhrystone/init.c31
-rw-r--r--testsuites/benchmarks/linpack/init.c31
-rw-r--r--testsuites/benchmarks/linpack/linpack-pc.c2
-rw-r--r--testsuites/benchmarks/whetstone/init.c31
-rw-r--r--testsuites/benchmarks/whetstone/whetstone.c2
-rwxr-xr-xtestsuites/build/bin/fake-rtems5-ar2
-rwxr-xr-xtestsuites/build/bin/fake-rtems5-gcc2
-rwxr-xr-xtestsuites/build/bin/fake-rtems5-ld2
-rwxr-xr-xtestsuites/build/test.py2
-rw-r--r--testsuites/fstests/fsbdpart01/fsbdpart01.doc25
-rw-r--r--testsuites/fstests/fsbdpart01/init.c31
-rw-r--r--testsuites/fstests/fsclose01/init.c2
-rw-r--r--testsuites/fstests/fsdosfsformat01/fsdosfsformat01.doc25
-rw-r--r--testsuites/fstests/fsdosfsformat01/init.c31
-rw-r--r--testsuites/fstests/fsdosfsname01/create_files.cs273
-rwxr-xr-xtestsuites/fstests/fsdosfsname01/create_image.sh27
-rw-r--r--testsuites/fstests/fsdosfsname01/image_bin_le_multibyte.h31
-rw-r--r--testsuites/fstests/fsdosfsname01/image_bin_le_singlebyte.h31
-rw-r--r--testsuites/fstests/fsdosfsname01/init.c31
-rw-r--r--testsuites/fstests/fsdosfsname02/init.c31
-rw-r--r--testsuites/fstests/fsdosfssync01/fsdosfssync01.doc25
-rw-r--r--testsuites/fstests/fsdosfssync01/init.c31
-rw-r--r--testsuites/fstests/fsdosfswrite01/init.c31
-rw-r--r--testsuites/fstests/fserror/fserror.doc25
-rw-r--r--testsuites/fstests/fserror/test.c25
-rw-r--r--testsuites/fstests/fsfpathconf/fsfpathconf.doc25
-rw-r--r--testsuites/fstests/fsfpathconf/test.c25
-rw-r--r--testsuites/fstests/fsfseeko01/init.c31
-rw-r--r--testsuites/fstests/fsimfsconfig01/init.c31
-rw-r--r--testsuites/fstests/fsimfsconfig02/init.c31
-rw-r--r--testsuites/fstests/fsimfsconfig03/init.c31
-rw-r--r--testsuites/fstests/fsimfsgeneric01/init.c27
-rw-r--r--testsuites/fstests/fsjffs2empty01/fsjffs2empty01.doc11
-rw-r--r--testsuites/fstests/fsjffs2empty01/fsjffs2empty01.scn6
-rw-r--r--testsuites/fstests/fsjffs2empty01/init.c245
-rw-r--r--testsuites/fstests/fsjffs2gc01/init.c31
-rw-r--r--testsuites/fstests/fslink/fslink.doc25
-rw-r--r--testsuites/fstests/fslink/test.c25
-rw-r--r--testsuites/fstests/fsnofs01/fsnofs01.doc25
-rw-r--r--testsuites/fstests/fsnofs01/init.c31
-rw-r--r--testsuites/fstests/fspatheval/patheval.doc25
-rw-r--r--testsuites/fstests/fspatheval/test.c25
-rw-r--r--testsuites/fstests/fspermission/fspermission.doc25
-rw-r--r--testsuites/fstests/fspermission/test.c25
-rw-r--r--testsuites/fstests/fsrdwr/fsrdwr.doc25
-rw-r--r--testsuites/fstests/fsrdwr/init.c25
-rw-r--r--testsuites/fstests/fsrename/fsrename.doc25
-rw-r--r--testsuites/fstests/fsrename/test.c25
-rw-r--r--testsuites/fstests/fsrfsbitmap01/fsrfsbitmap01.doc25
-rw-r--r--testsuites/fstests/fsrfsbitmap01/test.c25
-rw-r--r--testsuites/fstests/fsrofs01/init.c31
-rw-r--r--testsuites/fstests/fsscandir01/init.c25
-rw-r--r--testsuites/fstests/fsstatvfs/fsstatvfs.doc25
-rw-r--r--testsuites/fstests/fsstatvfs/test.c25
-rw-r--r--testsuites/fstests/fssymlink/fssymlink.doc25
-rw-r--r--testsuites/fstests/fssymlink/test.c25
-rw-r--r--testsuites/fstests/fstime/fstime.doc25
-rw-r--r--testsuites/fstests/fstime/test.c25
-rw-r--r--testsuites/fstests/imfs_support/fs_config.h25
-rw-r--r--testsuites/fstests/imfs_support/fs_support.c25
-rw-r--r--testsuites/fstests/jffs2_nand_support/fs_config.h33
-rw-r--r--testsuites/fstests/jffs2_nand_support/fs_support.c257
-rw-r--r--testsuites/fstests/jffs2_support/fs_config.h31
-rw-r--r--testsuites/fstests/jffs2_support/fs_support.c33
-rw-r--r--testsuites/fstests/mdosfs_support/fs_config.h25
-rw-r--r--testsuites/fstests/mdosfs_support/fs_support.c25
-rw-r--r--testsuites/fstests/mimfs_support/fs_config.h25
-rw-r--r--testsuites/fstests/mimfs_support/fs_support.c25
-rw-r--r--testsuites/fstests/mrfs_support/fs_config.h25
-rw-r--r--testsuites/fstests/mrfs_support/fs_support.c25
-rw-r--r--testsuites/fstests/support/fstest.h25
-rw-r--r--testsuites/fstests/support/fstest_support.c25
-rw-r--r--testsuites/fstests/support/fstest_support.h25
-rw-r--r--testsuites/fstests/support/ramdisk_support.c25
-rw-r--r--testsuites/fstests/support/ramdisk_support.h25
-rw-r--r--testsuites/fstests/tftpfs/init.c6928
-rw-r--r--testsuites/fstests/tftpfs/tftpfs_interactions.c984
-rw-r--r--testsuites/fstests/tftpfs/tftpfs_interactions.h213
-rw-r--r--testsuites/fstests/tftpfs/tftpfs_udp_network_fake.c983
-rw-r--r--testsuites/fstests/tftpfs/tftpfs_udp_network_fake.h315
-rw-r--r--testsuites/libtests/POSIX/calloc.c4
-rw-r--r--testsuites/libtests/POSIX/free.c5
-rw-r--r--testsuites/libtests/POSIX/readv.c2
-rw-r--r--testsuites/libtests/POSIX/sigismember.c2
-rw-r--r--testsuites/libtests/POSIX/sigprocmask.c3
-rw-r--r--testsuites/libtests/POSIX/writev.c2
-rw-r--r--testsuites/libtests/block01/block01.doc32
-rw-r--r--testsuites/libtests/block01/init.c31
-rw-r--r--testsuites/libtests/block02/block02.doc32
-rw-r--r--testsuites/libtests/block02/init.c31
-rw-r--r--testsuites/libtests/block03/block03.doc32
-rw-r--r--testsuites/libtests/block03/init.c31
-rw-r--r--testsuites/libtests/block04/block04.doc32
-rw-r--r--testsuites/libtests/block04/init.c31
-rw-r--r--testsuites/libtests/block05/block05.doc32
-rw-r--r--testsuites/libtests/block05/init.c31
-rw-r--r--testsuites/libtests/block06/block06.doc25
-rw-r--r--testsuites/libtests/block06/init.c25
-rw-r--r--testsuites/libtests/block07/block07.doc32
-rw-r--r--testsuites/libtests/block07/init.c31
-rw-r--r--testsuites/libtests/block08/bdbuf_test1_1.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_test1_2.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_test1_3.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_test1_4.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_test1_5.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_test2_1.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_test2_2.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_test3_1.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_test3_2.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_test3_3.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_test4_1.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_test4_2.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_test4_3.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_tests.c25
-rw-r--r--testsuites/libtests/block08/bdbuf_tests.h25
-rw-r--r--testsuites/libtests/block08/init.c25
-rw-r--r--testsuites/libtests/block08/system.h25
-rw-r--r--testsuites/libtests/block08/test_disk.c25
-rw-r--r--testsuites/libtests/block09/block09.doc32
-rw-r--r--testsuites/libtests/block09/init.c31
-rw-r--r--testsuites/libtests/block10/block10.doc32
-rw-r--r--testsuites/libtests/block10/init.c31
-rw-r--r--testsuites/libtests/block11/init.c31
-rw-r--r--testsuites/libtests/block12/init.c31
-rw-r--r--testsuites/libtests/block13/init.c31
-rw-r--r--testsuites/libtests/block14/init.c31
-rw-r--r--testsuites/libtests/block15/init.c31
-rw-r--r--testsuites/libtests/block16/init.c31
-rw-r--r--testsuites/libtests/block17/init.c31
-rw-r--r--testsuites/libtests/bspcmdline01/bspcmdline01.doc25
-rw-r--r--testsuites/libtests/bspcmdline01/init.c25
-rw-r--r--testsuites/libtests/capture01/capture01.doc25
-rw-r--r--testsuites/libtests/capture01/init.c25
-rw-r--r--testsuites/libtests/capture01/system.h25
-rw-r--r--testsuites/libtests/capture01/test1.c25
-rw-r--r--testsuites/libtests/complex/complex.doc25
-rw-r--r--testsuites/libtests/complex/init.c25
-rw-r--r--testsuites/libtests/cpuuse/init.c25
-rw-r--r--testsuites/libtests/cpuuse/system.h25
-rw-r--r--testsuites/libtests/cpuuse/task1.c25
-rw-r--r--testsuites/libtests/cpuuse/task2.c25
-rw-r--r--testsuites/libtests/cpuuse/task3.c25
-rw-r--r--testsuites/libtests/cpuuse/tswitch.c25
-rw-r--r--testsuites/libtests/crypt01/init.c14
-rw-r--r--testsuites/libtests/debugger01/debugger01.doc25
-rw-r--r--testsuites/libtests/debugger01/init.c25
-rw-r--r--testsuites/libtests/debugger01/remote.c25
-rw-r--r--testsuites/libtests/debugger01/system.h25
-rw-r--r--testsuites/libtests/defaultconfig01/init.c31
-rw-r--r--testsuites/libtests/devfs01/devfs01.doc25
-rw-r--r--testsuites/libtests/devfs01/init.c2
-rw-r--r--testsuites/libtests/devfs04/devfs04.doc25
-rw-r--r--testsuites/libtests/devfs04/init.c25
-rw-r--r--testsuites/libtests/devfs04/test_driver.c25
-rw-r--r--testsuites/libtests/devfs04/test_driver.h25
-rw-r--r--testsuites/libtests/deviceio01/deviceio01.doc25
-rw-r--r--testsuites/libtests/deviceio01/init.c25
-rw-r--r--testsuites/libtests/deviceio01/test_driver.c25
-rw-r--r--testsuites/libtests/deviceio01/test_driver.h25
-rw-r--r--testsuites/libtests/devnullfatal01/devnullfatal01.doc25
-rw-r--r--testsuites/libtests/devnullfatal01/init.c25
-rw-r--r--testsuites/libtests/dl01/dl-load.c25
-rw-r--r--testsuites/libtests/dl01/dl-load.h25
-rw-r--r--testsuites/libtests/dl01/dl01-o1.c27
-rw-r--r--testsuites/libtests/dl01/dl01.doc25
-rw-r--r--testsuites/libtests/dl01/init.c27
-rw-r--r--testsuites/libtests/dl02/dl-load.c25
-rw-r--r--testsuites/libtests/dl02/dl-load.h25
-rw-r--r--testsuites/libtests/dl02/dl-o2.h25
-rw-r--r--testsuites/libtests/dl02/dl02-o1.c27
-rw-r--r--testsuites/libtests/dl02/dl02-o2.c27
-rw-r--r--testsuites/libtests/dl02/dl02.doc25
-rw-r--r--testsuites/libtests/dl02/init.c27
-rw-r--r--testsuites/libtests/dl03/dl-bit-alloc.c25
-rw-r--r--testsuites/libtests/dl03/dl-bit-alloc.h25
-rw-r--r--testsuites/libtests/dl03/dl-cache.c25
-rw-r--r--testsuites/libtests/dl03/dl-cache.h25
-rw-r--r--testsuites/libtests/dl03/dl03.doc25
-rw-r--r--testsuites/libtests/dl03/init.c27
-rw-r--r--testsuites/libtests/dl04/dl-load.c25
-rw-r--r--testsuites/libtests/dl04/dl-load.h25
-rw-r--r--testsuites/libtests/dl04/dl04.doc25
-rw-r--r--testsuites/libtests/dl04/init.c27
-rw-r--r--testsuites/libtests/dl05/dl-load.c25
-rw-r--r--testsuites/libtests/dl05/dl-load.h25
-rw-r--r--testsuites/libtests/dl05/dl05-o5.cc2
-rw-r--r--testsuites/libtests/dl05/dl05.doc25
-rw-r--r--testsuites/libtests/dl05/init.c27
-rw-r--r--testsuites/libtests/dl06/dl-load.c25
-rw-r--r--testsuites/libtests/dl06/dl-load.h25
-rw-r--r--testsuites/libtests/dl06/dl06-o1.c27
-rw-r--r--testsuites/libtests/dl06/dl06-o2.c27
-rw-r--r--testsuites/libtests/dl06/dl06-o2.h25
-rw-r--r--testsuites/libtests/dl06/dl06.doc25
-rw-r--r--testsuites/libtests/dl06/init.c35
-rw-r--r--testsuites/libtests/dl06/initimpl.h27
-rw-r--r--testsuites/libtests/dl06/pre-init.c35
-rw-r--r--testsuites/libtests/dl07/dl-load.c26
-rw-r--r--testsuites/libtests/dl07/dl-load.h25
-rw-r--r--testsuites/libtests/dl07/dl-o1.h25
-rw-r--r--testsuites/libtests/dl07/dl-o2.h25
-rw-r--r--testsuites/libtests/dl07/dl-o4.h25
-rw-r--r--testsuites/libtests/dl07/dl-o5.h25
-rw-r--r--testsuites/libtests/dl07/dl07-o1.c27
-rw-r--r--testsuites/libtests/dl07/dl07-o2.c27
-rw-r--r--testsuites/libtests/dl07/dl07-o3.c27
-rw-r--r--testsuites/libtests/dl07/dl07-o4.c27
-rw-r--r--testsuites/libtests/dl07/dl07-o5.c27
-rw-r--r--testsuites/libtests/dl07/dl07.doc25
-rw-r--r--testsuites/libtests/dl07/init.c27
-rw-r--r--testsuites/libtests/dl08/dl-load.c25
-rw-r--r--testsuites/libtests/dl08/dl-load.h25
-rw-r--r--testsuites/libtests/dl08/dl-o1.h25
-rw-r--r--testsuites/libtests/dl08/dl-o2.h25
-rw-r--r--testsuites/libtests/dl08/dl-o3.h25
-rw-r--r--testsuites/libtests/dl08/dl-o4.h25
-rw-r--r--testsuites/libtests/dl08/dl-o5.h25
-rw-r--r--testsuites/libtests/dl08/dl-o6.h25
-rw-r--r--testsuites/libtests/dl08/dl08-o1.c27
-rw-r--r--testsuites/libtests/dl08/dl08-o2.c27
-rw-r--r--testsuites/libtests/dl08/dl08-o3.c27
-rw-r--r--testsuites/libtests/dl08/dl08-o4.c27
-rw-r--r--testsuites/libtests/dl08/dl08-o5.c27
-rw-r--r--testsuites/libtests/dl08/dl08-o6-123456789-123456789.c27
-rw-r--r--testsuites/libtests/dl08/dl08.doc25
-rw-r--r--testsuites/libtests/dl08/init.c27
-rw-r--r--testsuites/libtests/dl09/dl-load.c43
-rw-r--r--testsuites/libtests/dl09/dl-load.h25
-rw-r--r--testsuites/libtests/dl09/dl-o1.h25
-rw-r--r--testsuites/libtests/dl09/dl-o2.h25
-rw-r--r--testsuites/libtests/dl09/dl-o3.h25
-rw-r--r--testsuites/libtests/dl09/dl-o4.h25
-rw-r--r--testsuites/libtests/dl09/dl-o5.h25
-rw-r--r--testsuites/libtests/dl09/dl09-o1.c27
-rw-r--r--testsuites/libtests/dl09/dl09-o2.c27
-rw-r--r--testsuites/libtests/dl09/dl09-o3.c27
-rw-r--r--testsuites/libtests/dl09/dl09-o4.c27
-rw-r--r--testsuites/libtests/dl09/dl09-o5.c27
-rw-r--r--testsuites/libtests/dl09/dl09.doc25
-rw-r--r--testsuites/libtests/dl09/init.c27
-rw-r--r--testsuites/libtests/dl10/dl-load.c25
-rw-r--r--testsuites/libtests/dl10/dl-load.h25
-rw-r--r--testsuites/libtests/dl10/dl-o1.h25
-rw-r--r--testsuites/libtests/dl10/dl-o2.h25
-rw-r--r--testsuites/libtests/dl10/dl-o3.h25
-rw-r--r--testsuites/libtests/dl10/dl-o4.h25
-rw-r--r--testsuites/libtests/dl10/dl-o5.h25
-rw-r--r--testsuites/libtests/dl10/dl10-o1.c27
-rw-r--r--testsuites/libtests/dl10/dl10-o2.c27
-rw-r--r--testsuites/libtests/dl10/dl10-o3.c27
-rw-r--r--testsuites/libtests/dl10/dl10-o4.c27
-rw-r--r--testsuites/libtests/dl10/dl10-o5.c27
-rw-r--r--testsuites/libtests/dl10/dl10-o6.c26
-rw-r--r--testsuites/libtests/dl10/dl10.doc25
-rw-r--r--testsuites/libtests/dl10/init.c60
-rw-r--r--testsuites/libtests/dl11/dl-load.c207
-rw-r--r--testsuites/libtests/dl11/dl-load.h33
-rw-r--r--testsuites/libtests/dl11/dl11-o1.c41
-rw-r--r--testsuites/libtests/dl11/dl11.doc44
-rw-r--r--testsuites/libtests/dl11/dl11.scn6
-rw-r--r--testsuites/libtests/dl11/init.c105
-rw-r--r--testsuites/libtests/dumpbuf01/dumpbuf01.doc25
-rw-r--r--testsuites/libtests/dumpbuf01/init.c25
-rw-r--r--testsuites/libtests/exit01/init.c31
-rw-r--r--testsuites/libtests/exit02/init.c31
-rw-r--r--testsuites/libtests/exit03/exit03.doc11
-rw-r--r--testsuites/libtests/exit03/exit03.scn5
-rw-r--r--testsuites/libtests/exit03/init.c122
-rw-r--r--testsuites/libtests/exit03/stdio.cc61
-rw-r--r--testsuites/libtests/flashdev01/flashdev01.doc11
-rw-r--r--testsuites/libtests/flashdev01/flashdev01.scn2
-rw-r--r--testsuites/libtests/flashdev01/init.c190
-rw-r--r--testsuites/libtests/flashdev01/test_flashdev.c275
-rw-r--r--testsuites/libtests/flashdev01/test_flashdev.h35
-rw-r--r--testsuites/libtests/flashdisk01/flashdisk01.doc25
-rw-r--r--testsuites/libtests/flashdisk01/init.c31
-rw-r--r--testsuites/libtests/flashdisk01/test-file-system.c31
-rw-r--r--testsuites/libtests/flashdisk01/test-file-system.h31
-rw-r--r--testsuites/libtests/getentropy01/init.c31
-rw-r--r--testsuites/libtests/gxx01/gxx01.doc33
-rw-r--r--testsuites/libtests/gxx01/gxx01.scn35
-rw-r--r--testsuites/libtests/gxx01/init.c228
-rw-r--r--testsuites/libtests/heapwalk/init.c27
-rw-r--r--testsuites/libtests/heapwalk/system.h25
-rw-r--r--testsuites/libtests/i2c01/init.c31
-rw-r--r--testsuites/libtests/irqs01/init.c2
-rw-r--r--testsuites/libtests/libfdt01/init.c31
-rw-r--r--testsuites/libtests/libfdt01/some.c4
-rw-r--r--testsuites/libtests/libfdt01/some.dts31
-rw-r--r--testsuites/libtests/malloc02/init.c25
-rw-r--r--testsuites/libtests/malloc02/malloc02.doc25
-rw-r--r--testsuites/libtests/malloc03/init.c25
-rw-r--r--testsuites/libtests/malloc03/malloc03.doc25
-rw-r--r--testsuites/libtests/malloc04/init.c62
-rw-r--r--testsuites/libtests/malloc04/malloc04.doc25
-rw-r--r--testsuites/libtests/malloctest/init.c72
-rw-r--r--testsuites/libtests/malloctest/system.h25
-rw-r--r--testsuites/libtests/malloctest/task1.c27
-rw-r--r--testsuites/libtests/math/init.c25
-rw-r--r--testsuites/libtests/mathf/init.c25
-rw-r--r--testsuites/libtests/mathl/init.c25
-rw-r--r--testsuites/libtests/md501/init.c31
-rw-r--r--testsuites/libtests/monitor/init.c25
-rw-r--r--testsuites/libtests/monitor/monitor.doc25
-rw-r--r--testsuites/libtests/monitor/system.h25
-rw-r--r--testsuites/libtests/monitor02/init.c25
-rw-r--r--testsuites/libtests/monitor02/monitor02.doc25
-rw-r--r--testsuites/libtests/monitor02/system.h25
-rw-r--r--testsuites/libtests/mouse01/init.c25
-rw-r--r--testsuites/libtests/mouse01/mouse01.doc25
-rw-r--r--testsuites/libtests/mouse01/msmouse.c25
-rw-r--r--testsuites/libtests/mouse01/serial_mouse_config.c35
-rw-r--r--testsuites/libtests/newlib01/init.c350
-rw-r--r--testsuites/libtests/newlib01/newlib01.doc8
-rw-r--r--testsuites/libtests/ofw01/init.c16
-rw-r--r--testsuites/libtests/ofw01/some.c4
-rw-r--r--testsuites/libtests/ofw01/some.dts31
-rw-r--r--testsuites/libtests/putenvtest/init.c25
-rw-r--r--testsuites/libtests/putenvtest/putenvtest.doc25
-rw-r--r--testsuites/libtests/pwdgrp01/init.c31
-rw-r--r--testsuites/libtests/pwdgrp02/init.c31
-rw-r--r--testsuites/libtests/rbheap01/init.c31
-rw-r--r--testsuites/libtests/rbheap01/rbheap.doc25
-rw-r--r--testsuites/libtests/record01/init.c2
-rw-r--r--testsuites/libtests/record02/init.c2
-rw-r--r--testsuites/libtests/regulator01/regulator01.c1310
-rw-r--r--testsuites/libtests/regulator01/regulator01.doc67
-rw-r--r--testsuites/libtests/regulator01/rtems_config.c59
-rw-r--r--testsuites/libtests/rtmonuse/getall.c25
-rw-r--r--testsuites/libtests/rtmonuse/init.c25
-rw-r--r--testsuites/libtests/rtmonuse/system.h25
-rw-r--r--testsuites/libtests/rtmonuse/task1.c25
-rw-r--r--testsuites/libtests/sha/init.c246
-rw-r--r--testsuites/libtests/shell01/init.c31
-rw-r--r--testsuites/libtests/sparsedisk01/init.c31
-rw-r--r--testsuites/libtests/spi01/init.c31
-rw-r--r--testsuites/libtests/stackchk/blow.c25
-rw-r--r--testsuites/libtests/stackchk/init.c25
-rw-r--r--testsuites/libtests/stackchk/stackchk.doc25
-rw-r--r--testsuites/libtests/stackchk/system.h25
-rw-r--r--testsuites/libtests/stackchk/task1.c27
-rw-r--r--testsuites/libtests/stackchk01/init.c55
-rw-r--r--testsuites/libtests/stackchk01/stackchk01.doc37
-rw-r--r--testsuites/libtests/stackchk02/init.c67
-rw-r--r--testsuites/libtests/stackchk02/stackchk02.doc35
-rw-r--r--testsuites/libtests/stackchk02/stackchk02.scn7
-rw-r--r--testsuites/libtests/stringto01/init.c25
-rw-r--r--testsuites/libtests/stringto01/stringto01.doc25
-rw-r--r--testsuites/libtests/stringto01/stringto_test_template.h25
-rw-r--r--testsuites/libtests/tar01/init.c224
-rw-r--r--testsuites/libtests/tar01/tar01.doc26
-rw-r--r--testsuites/libtests/tar01/tar01.scn54
-rw-r--r--testsuites/libtests/tar01/tar01.tarbin10240 -> 10240 bytes
-rw-r--r--testsuites/libtests/tar02/init.c25
-rw-r--r--testsuites/libtests/tar02/tar02.doc25
-rw-r--r--testsuites/libtests/tar03/init.c25
-rw-r--r--testsuites/libtests/tar03/tar03.doc25
-rw-r--r--testsuites/libtests/termios/README5
-rw-r--r--testsuites/libtests/termios/init.c16
-rw-r--r--testsuites/libtests/termios01/init.c25
-rw-r--r--testsuites/libtests/termios01/termios01.doc25
-rw-r--r--testsuites/libtests/termios01/termios_testdriver.c27
-rw-r--r--testsuites/libtests/termios01/termios_testdriver.h25
-rw-r--r--testsuites/libtests/termios02/init.c25
-rw-r--r--testsuites/libtests/termios02/termios02.doc25
-rw-r--r--testsuites/libtests/termios03/init.c25
-rw-r--r--testsuites/libtests/termios03/termios03.doc25
-rw-r--r--testsuites/libtests/termios03/termios_testdriver_polled.c27
-rw-r--r--testsuites/libtests/termios03/termios_testdriver_polled.h25
-rw-r--r--testsuites/libtests/termios04/init.c25
-rw-r--r--testsuites/libtests/termios04/termios04.doc25
-rw-r--r--testsuites/libtests/termios04/termios_testdriver_impl.h27
-rw-r--r--testsuites/libtests/termios04/termios_testdriver_intr.c35
-rw-r--r--testsuites/libtests/termios04/termios_testdriver_intr.h25
-rw-r--r--testsuites/libtests/termios05/init.c25
-rw-r--r--testsuites/libtests/termios05/termios05.doc25
-rw-r--r--testsuites/libtests/termios05/termios_testdriver_task.c35
-rw-r--r--testsuites/libtests/termios06/init.c25
-rw-r--r--testsuites/libtests/termios06/termios06.doc25
-rw-r--r--testsuites/libtests/termios06/test_pppd.c29
-rw-r--r--testsuites/libtests/termios07/init.c25
-rw-r--r--testsuites/libtests/termios07/termios07.doc25
-rw-r--r--testsuites/libtests/termios08/init.c25
-rw-r--r--testsuites/libtests/termios08/termios08.doc25
-rw-r--r--testsuites/libtests/termios09/init.c31
-rw-r--r--testsuites/libtests/termios10/init.c35
-rw-r--r--testsuites/libtests/termios11/init.c35
-rw-r--r--testsuites/libtests/top/init.c25
-rw-r--r--testsuites/libtests/top/system.h25
-rw-r--r--testsuites/libtests/top/task1.c25
-rw-r--r--testsuites/libtests/top/task2.c25
-rw-r--r--testsuites/libtests/top/task3.c25
-rw-r--r--testsuites/libtests/ttest01/init.c2
-rw-r--r--testsuites/libtests/ttest01/t-self-test.h2
-rw-r--r--testsuites/libtests/ttest01/test-assert.c2
-rw-r--r--testsuites/libtests/ttest01/test-checks.c2
-rw-r--r--testsuites/libtests/ttest01/test-destructor.c2
-rw-r--r--testsuites/libtests/ttest01/test-eno.c2
-rw-r--r--testsuites/libtests/ttest01/test-example.c2
-rw-r--r--testsuites/libtests/ttest01/test-fixture.c2
-rw-r--r--testsuites/libtests/ttest01/test-leak.c2
-rw-r--r--testsuites/libtests/ttest01/test-log.c2
-rw-r--r--testsuites/libtests/ttest01/test-malloc.c2
-rw-r--r--testsuites/libtests/ttest01/test-plan.c2
-rw-r--r--testsuites/libtests/ttest01/test-psx.c2
-rw-r--r--testsuites/libtests/ttest01/test-rtems.c2
-rw-r--r--testsuites/libtests/ttest01/test-simple.c2
-rw-r--r--testsuites/libtests/ttest01/test-step.c2
-rw-r--r--testsuites/libtests/ttest01/test-task-context.c2
-rw-r--r--testsuites/libtests/ttest01/test-time.c2
-rw-r--r--testsuites/libtests/ttest01/test-verbosity.c2
-rw-r--r--testsuites/libtests/ttest02/init.c2
-rw-r--r--testsuites/libtests/tztest/init.c25
-rw-r--r--testsuites/libtests/uid01/init.c25
-rw-r--r--testsuites/libtests/uid01/msmouse.c25
-rw-r--r--testsuites/libtests/uid01/serial_mouse_config.c25
-rw-r--r--testsuites/libtests/uid01/uid01.doc25
-rw-r--r--testsuites/libtests/utf8proc01/init.c31
-rw-r--r--testsuites/libtests/utf8proc01/utf8proc01.doc25
-rw-r--r--testsuites/mptests/mp01/init1.c35
-rw-r--r--testsuites/mptests/mp01/init2.c35
-rw-r--r--testsuites/mptests/mp01/initimpl.h25
-rw-r--r--testsuites/mptests/mp01/mp01-node1.doc25
-rw-r--r--testsuites/mptests/mp01/mp01-node2.doc25
-rw-r--r--testsuites/mptests/mp01/system.h25
-rw-r--r--testsuites/mptests/mp01/task1.c27
-rw-r--r--testsuites/mptests/mp03/delay.c25
-rw-r--r--testsuites/mptests/mp03/init1.c35
-rw-r--r--testsuites/mptests/mp03/init2.c35
-rw-r--r--testsuites/mptests/mp03/initimpl.h25
-rw-r--r--testsuites/mptests/mp03/mp03-node1.doc25
-rw-r--r--testsuites/mptests/mp03/mp03-node2.doc25
-rw-r--r--testsuites/mptests/mp03/system.h25
-rw-r--r--testsuites/mptests/mp03/task1.c27
-rw-r--r--testsuites/mptests/mp04/init1.c35
-rw-r--r--testsuites/mptests/mp04/init2.c35
-rw-r--r--testsuites/mptests/mp04/initimpl.h25
-rw-r--r--testsuites/mptests/mp04/mp04-node1.doc25
-rw-r--r--testsuites/mptests/mp04/mp04-node2.doc25
-rw-r--r--testsuites/mptests/mp04/system.h25
-rw-r--r--testsuites/mptests/mp04/task1.c27
-rw-r--r--testsuites/mptests/mp05/asr.c25
-rw-r--r--testsuites/mptests/mp05/init1.c35
-rw-r--r--testsuites/mptests/mp05/init2.c35
-rw-r--r--testsuites/mptests/mp05/initimpl.h25
-rw-r--r--testsuites/mptests/mp05/mp05-node1.doc25
-rw-r--r--testsuites/mptests/mp05/mp05-node2.doc25
-rw-r--r--testsuites/mptests/mp05/system.h25
-rw-r--r--testsuites/mptests/mp05/task1.c25
-rw-r--r--testsuites/mptests/mp06/init1.c35
-rw-r--r--testsuites/mptests/mp06/init2.c35
-rw-r--r--testsuites/mptests/mp06/initimpl.h25
-rw-r--r--testsuites/mptests/mp06/mp06-node1.doc25
-rw-r--r--testsuites/mptests/mp06/mp06-node2.doc25
-rw-r--r--testsuites/mptests/mp06/system.h25
-rw-r--r--testsuites/mptests/mp06/task1.c25
-rw-r--r--testsuites/mptests/mp07/init1.c35
-rw-r--r--testsuites/mptests/mp07/init2.c35
-rw-r--r--testsuites/mptests/mp07/initimpl.h25
-rw-r--r--testsuites/mptests/mp07/mp07-node1.doc25
-rw-r--r--testsuites/mptests/mp07/mp07-node2.doc25
-rw-r--r--testsuites/mptests/mp07/system.h25
-rw-r--r--testsuites/mptests/mp07/task1.c25
-rw-r--r--testsuites/mptests/mp08/init1.c35
-rw-r--r--testsuites/mptests/mp08/init2.c35
-rw-r--r--testsuites/mptests/mp08/initimpl.h25
-rw-r--r--testsuites/mptests/mp08/mp08-node1.doc25
-rw-r--r--testsuites/mptests/mp08/mp08-node2.doc25
-rw-r--r--testsuites/mptests/mp08/system.h25
-rw-r--r--testsuites/mptests/mp08/task1.c25
-rw-r--r--testsuites/mptests/mp09/init1.c35
-rw-r--r--testsuites/mptests/mp09/init2.c35
-rw-r--r--testsuites/mptests/mp09/initimpl.h25
-rw-r--r--testsuites/mptests/mp09/mp09-node1.doc25
-rw-r--r--testsuites/mptests/mp09/mp09-node2.doc25
-rw-r--r--testsuites/mptests/mp09/recvmsg.c25
-rw-r--r--testsuites/mptests/mp09/sendmsg.c25
-rw-r--r--testsuites/mptests/mp09/system.h25
-rw-r--r--testsuites/mptests/mp09/task1.c25
-rw-r--r--testsuites/mptests/mp10/init1.c35
-rw-r--r--testsuites/mptests/mp10/init2.c35
-rw-r--r--testsuites/mptests/mp10/initimpl.h25
-rw-r--r--testsuites/mptests/mp10/mp10-node1.doc25
-rw-r--r--testsuites/mptests/mp10/mp10-node2.doc25
-rw-r--r--testsuites/mptests/mp10/system.h25
-rw-r--r--testsuites/mptests/mp10/task1.c25
-rw-r--r--testsuites/mptests/mp10/task2.c25
-rw-r--r--testsuites/mptests/mp10/task3.c25
-rw-r--r--testsuites/mptests/mp11/init1.c35
-rw-r--r--testsuites/mptests/mp11/init2.c35
-rw-r--r--testsuites/mptests/mp11/initimpl.h25
-rw-r--r--testsuites/mptests/mp11/mp11-node1.doc25
-rw-r--r--testsuites/mptests/mp11/mp11-node2.doc25
-rw-r--r--testsuites/mptests/mp11/system.h25
-rw-r--r--testsuites/mptests/mp12/init1.c35
-rw-r--r--testsuites/mptests/mp12/init2.c35
-rw-r--r--testsuites/mptests/mp12/initimpl.h25
-rw-r--r--testsuites/mptests/mp12/mp12-node1.doc25
-rw-r--r--testsuites/mptests/mp12/mp12-node2.doc25
-rw-r--r--testsuites/mptests/mp12/system.h25
-rw-r--r--testsuites/mptests/mp13/init1.c35
-rw-r--r--testsuites/mptests/mp13/init2.c35
-rw-r--r--testsuites/mptests/mp13/initimpl.h25
-rw-r--r--testsuites/mptests/mp13/mp13-node1.doc25
-rw-r--r--testsuites/mptests/mp13/mp13-node2.doc25
-rw-r--r--testsuites/mptests/mp13/system.h25
-rw-r--r--testsuites/mptests/mp13/task1.c25
-rw-r--r--testsuites/mptests/mp13/task2.c25
-rw-r--r--testsuites/mptests/mp14/delay.c25
-rw-r--r--testsuites/mptests/mp14/evtask1.c25
-rw-r--r--testsuites/mptests/mp14/evtmtask.c25
-rw-r--r--testsuites/mptests/mp14/exit.c25
-rw-r--r--testsuites/mptests/mp14/init1.c35
-rw-r--r--testsuites/mptests/mp14/init2.c35
-rw-r--r--testsuites/mptests/mp14/initimpl.h25
-rw-r--r--testsuites/mptests/mp14/mp14-node1.doc25
-rw-r--r--testsuites/mptests/mp14/mp14-node2.doc25
-rw-r--r--testsuites/mptests/mp14/msgtask1.c25
-rw-r--r--testsuites/mptests/mp14/pttask1.c25
-rw-r--r--testsuites/mptests/mp14/smtask1.c25
-rw-r--r--testsuites/mptests/mp14/system.h25
-rw-r--r--testsuites/psxtests/include/pmacros.h25
-rw-r--r--testsuites/psxtests/psx01/init.c25
-rw-r--r--testsuites/psxtests/psx01/psx01.doc25
-rw-r--r--testsuites/psxtests/psx01/system.h25
-rw-r--r--testsuites/psxtests/psx01/task.c25
-rw-r--r--testsuites/psxtests/psx02/init.c25
-rw-r--r--testsuites/psxtests/psx02/system.h25
-rw-r--r--testsuites/psxtests/psx02/task.c25
-rw-r--r--testsuites/psxtests/psx03/init.c25
-rw-r--r--testsuites/psxtests/psx03/psx03.doc2
-rw-r--r--testsuites/psxtests/psx03/system.h25
-rw-r--r--testsuites/psxtests/psx03/task.c25
-rw-r--r--testsuites/psxtests/psx04/init.c25
-rw-r--r--testsuites/psxtests/psx04/system.h25
-rw-r--r--testsuites/psxtests/psx04/task1.c25
-rw-r--r--testsuites/psxtests/psx04/task2.c25
-rw-r--r--testsuites/psxtests/psx04/task3.c25
-rw-r--r--testsuites/psxtests/psx05/init.c25
-rw-r--r--testsuites/psxtests/psx05/psx05.doc25
-rw-r--r--testsuites/psxtests/psx05/system.h25
-rw-r--r--testsuites/psxtests/psx05/task.c25
-rw-r--r--testsuites/psxtests/psx05/task2.c25
-rw-r--r--testsuites/psxtests/psx05/task3.c25
-rw-r--r--testsuites/psxtests/psx06/init.c25
-rw-r--r--testsuites/psxtests/psx06/psx06.doc2
-rw-r--r--testsuites/psxtests/psx06/system.h25
-rw-r--r--testsuites/psxtests/psx06/task.c25
-rw-r--r--testsuites/psxtests/psx06/task2.c25
-rw-r--r--testsuites/psxtests/psx07/init.c25
-rw-r--r--testsuites/psxtests/psx07/psx07.doc25
-rw-r--r--testsuites/psxtests/psx07/system.h25
-rw-r--r--testsuites/psxtests/psx07/task.c25
-rw-r--r--testsuites/psxtests/psx08/init.c143
-rw-r--r--testsuites/psxtests/psx08/psx08.doc2
-rw-r--r--testsuites/psxtests/psx08/system.h25
-rw-r--r--testsuites/psxtests/psx08/task1.c25
-rw-r--r--testsuites/psxtests/psx08/task2.c25
-rw-r--r--testsuites/psxtests/psx08/task3.c25
-rw-r--r--testsuites/psxtests/psx09/init.c25
-rw-r--r--testsuites/psxtests/psx09/psx09.doc2
-rw-r--r--testsuites/psxtests/psx09/system.h25
-rw-r--r--testsuites/psxtests/psx10/init.c25
-rw-r--r--testsuites/psxtests/psx10/system.h25
-rw-r--r--testsuites/psxtests/psx10/task.c25
-rw-r--r--testsuites/psxtests/psx10/task2.c25
-rw-r--r--testsuites/psxtests/psx10/task3.c25
-rw-r--r--testsuites/psxtests/psx11/init.c25
-rw-r--r--testsuites/psxtests/psx11/system.h25
-rw-r--r--testsuites/psxtests/psx11/task.c25
-rw-r--r--testsuites/psxtests/psx12/init.c27
-rw-r--r--testsuites/psxtests/psx13/test.c2
-rw-r--r--testsuites/psxtests/psx14/init.c25
-rw-r--r--testsuites/psxtests/psx14/psx14.doc25
-rw-r--r--testsuites/psxtests/psx14/system.h25
-rw-r--r--testsuites/psxtests/psx15/init.c31
-rw-r--r--testsuites/psxtests/psx16/init.c25
-rw-r--r--testsuites/psxtests/psx16/psx16.doc25
-rw-r--r--testsuites/psxtests/psxaio01/init.c25
-rw-r--r--testsuites/psxtests/psxaio01/system.h25
-rw-r--r--testsuites/psxtests/psxaio02/init.c25
-rw-r--r--testsuites/psxtests/psxaio02/system.h25
-rw-r--r--testsuites/psxtests/psxaio03/init.c25
-rw-r--r--testsuites/psxtests/psxaio03/system.h2
-rw-r--r--testsuites/psxtests/psxalarm01/init.c25
-rw-r--r--testsuites/psxtests/psxalarm01/psxalarm01.doc25
-rw-r--r--testsuites/psxtests/psxautoinit01/init.c25
-rw-r--r--testsuites/psxtests/psxautoinit02/init.c25
-rw-r--r--testsuites/psxtests/psxautoinit02/psxautoinit02.doc25
-rw-r--r--testsuites/psxtests/psxbarrier01/main.c25
-rw-r--r--testsuites/psxtests/psxbarrier01/test.c27
-rw-r--r--testsuites/psxtests/psxcancel/init.c25
-rw-r--r--testsuites/psxtests/psxcancel/psxcancel.doc25
-rw-r--r--testsuites/psxtests/psxcancel01/init.c25
-rw-r--r--testsuites/psxtests/psxcancel01/psxcancel01.doc25
-rw-r--r--testsuites/psxtests/psxchroot01/main.c35
-rw-r--r--testsuites/psxtests/psxchroot01/test.c27
-rw-r--r--testsuites/psxtests/psxclassic01/init.c25
-rw-r--r--testsuites/psxtests/psxclassic01/psxclassic01.doc25
-rw-r--r--testsuites/psxtests/psxcleanup/psxcleanup.c25
-rw-r--r--testsuites/psxtests/psxcleanup/psxcleanup.doc2
-rw-r--r--testsuites/psxtests/psxcleanup/system.h25
-rw-r--r--testsuites/psxtests/psxcleanup01/init.c25
-rw-r--r--testsuites/psxtests/psxcleanup01/psxcleanup01.doc25
-rw-r--r--testsuites/psxtests/psxcleanup02/init.c8
-rw-r--r--testsuites/psxtests/psxcleanup02/main.c8
-rw-r--r--testsuites/psxtests/psxclock/init.c197
-rw-r--r--testsuites/psxtests/psxclock/psxclock.doc25
-rw-r--r--testsuites/psxtests/psxclock01/init.c25
-rw-r--r--testsuites/psxtests/psxclockrealtime01/init.c8
-rw-r--r--testsuites/psxtests/psxconcurrency01/init.c25
-rw-r--r--testsuites/psxtests/psxconcurrency01/psxconcurrency01.doc25
-rw-r--r--testsuites/psxtests/psxcond01/init.c25
-rw-r--r--testsuites/psxtests/psxcond01/psxcond01.doc25
-rw-r--r--testsuites/psxtests/psxcond02/init.c25
-rw-r--r--testsuites/psxtests/psxcond02/psxcond02.doc25
-rw-r--r--testsuites/psxtests/psxconfig01/init.c33
-rw-r--r--testsuites/psxtests/psxconfig01/psxconfig01.doc27
-rw-r--r--testsuites/psxtests/psxdevctl01/main.c25
-rw-r--r--testsuites/psxtests/psxdevctl01/psxdevctl01.doc25
-rw-r--r--testsuites/psxtests/psxdevctl01/test.c25
-rw-r--r--testsuites/psxtests/psxeintr_join/init.c25
-rw-r--r--testsuites/psxtests/psxeintr_join/psxeintr_join.doc25
-rw-r--r--testsuites/psxtests/psxenosys/init.c35
-rw-r--r--testsuites/psxtests/psxenosys/psxenosys.doc25
-rw-r--r--testsuites/psxtests/psxenosys/psxenosys.scn2
-rw-r--r--testsuites/psxtests/psxenosys/system.h25
-rw-r--r--testsuites/psxtests/psxfatal01/init.c35
-rw-r--r--testsuites/psxtests/psxfatal01/psxfatal01.doc25
-rw-r--r--testsuites/psxtests/psxfatal02/init.c35
-rw-r--r--testsuites/psxtests/psxfatal_support/psxfatal.h25
-rw-r--r--testsuites/psxtests/psxfatal_support/psxfatalimpl.h25
-rw-r--r--testsuites/psxtests/psxfchx01/init.c25
-rw-r--r--testsuites/psxtests/psxfchx01/psxfchx01.doc25
-rw-r--r--testsuites/psxtests/psxfile01/main.c25
-rw-r--r--testsuites/psxtests/psxfile01/test.c25
-rw-r--r--testsuites/psxtests/psxfile01/test_cat.c25
-rw-r--r--testsuites/psxtests/psxfile01/test_extend.c25
-rw-r--r--testsuites/psxtests/psxfile01/test_write.c25
-rw-r--r--testsuites/psxtests/psxfile02/init.c25
-rw-r--r--testsuites/psxtests/psxfile02/psxfile02.doc25
-rw-r--r--testsuites/psxtests/psxfilelock01/init.c25
-rw-r--r--testsuites/psxtests/psxfilelock01/psxfilelock01.doc25
-rw-r--r--testsuites/psxtests/psxftw01/init.c64
-rw-r--r--testsuites/psxtests/psxgetattrnp01/init.c25
-rw-r--r--testsuites/psxtests/psxgetattrnp01/psxgetattrnp01.doc25
-rw-r--r--testsuites/psxtests/psxgetrusage01/init.c25
-rw-r--r--testsuites/psxtests/psxgetrusage01/psxgetrusage01.doc25
-rw-r--r--testsuites/psxtests/psxglobalcon01/init.cc31
-rw-r--r--testsuites/psxtests/psxglobalcon02/init.cc31
-rw-r--r--testsuites/psxtests/psxhdrs/arpa/inet/inet_ntop.c2
-rw-r--r--testsuites/psxtests/psxhdrs/devctl/posix_devctl.c25
-rw-r--r--testsuites/psxtests/psxhdrs/fcntl/openat.c4
-rw-r--r--testsuites/psxtests/psxhdrs/netdb/gethostbyaddr.c2
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_destroy.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_getdetachstate.c34
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c34
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_getinheritsched.c34
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedparam.c34
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedpolicy.c34
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_getscope.c34
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c32
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstackaddr.c32
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstacksize.c34
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_init.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_setdetachstate.c25
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_setinheritsched.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedparam.c34
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedpolicy.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_setscope.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstackaddr.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstacksize.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_cancel.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_cleanup.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_cond_broadcast.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_cond_destroy.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_cond_init.c32
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_cond_signal.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_cond_timedwait.c32
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_cond_wait.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_condattr_destroy.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_condattr_getpshared.c32
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_condattr_init.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_condattr_setpshared.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_create.c32
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_detach.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_equal.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_exit.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_getconcurrency.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_getcpuclockid.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_getschedparam.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_getspecific.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_join.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_key_create.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_key_delete.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutex_destroy.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutex_getprioceiling.c34
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutex_init.c32
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutex_lock.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutex_setprioceiling.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutex_timedlock.c32
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutex_trylock.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutex_unlock.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_destroy.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprioceiling.c32
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprotocol.c34
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getpshared.c34
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_init.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprioceiling.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprotocol.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setpshared.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_once.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_self.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_setcancelstate.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_setcanceltype.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_setconcurrency.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_setschedparam.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_setspecific.c30
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_testcancel.c30
-rw-r--r--testsuites/psxtests/psxhdrs/sched/sched_get_priority_max.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sched/sched_get_priority_min.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sched/sched_getparam.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sched/sched_getscheduler.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sched/sched_rr_get_interval.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sched/sched_setparam.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sched/sched_setscheduler.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sched/sched_yield.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal/pthread_sigmask.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal/raise.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal/signal.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal/sigpending.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal/sigprocmask.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal/sigsuspend.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal/sigtimedwait.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal/sigwait.c25
-rw-r--r--testsuites/psxtests/psxhdrs/signal/sigwaitinfo.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/mman/mlock.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/mman/mlockall.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/mman/mmap.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/mman/mprotect.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/mman/msync.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/mman/munlock.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/mman/munlockall.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/mman/munmap.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/mman/posix_madvise.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/mman/shm_open.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/mman/shm_unlink.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/select/pselect.c4
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/accept.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/bind.c27
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/connect.c31
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/getpeername.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/getsockname.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/getsockopt.c27
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/listen.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/recv.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/recvfrom.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/recvmsg.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/send.c27
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/sendmsg.c27
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/sendto.c29
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/setsockopt.c27
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/shutdown.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/socket.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/socketpair.c25
-rw-r--r--testsuites/psxtests/psxhdrs/sys/stat/futimens.c4
-rw-r--r--testsuites/psxtests/psxhdrs/sys/stat/utimensat.c4
-rw-r--r--testsuites/psxtests/psxhdrs/sys/time/utimes.c8
-rw-r--r--testsuites/psxtests/psxhdrs/termios/cfgetispeed.c4
-rw-r--r--testsuites/psxtests/psxhdrs/termios/cfgetospeed.c4
-rw-r--r--testsuites/psxtests/psxhdrs/termios/cfsetispeed.c4
-rw-r--r--testsuites/psxtests/psxhdrs/termios/cfsetospeed.c4
-rw-r--r--testsuites/psxtests/psxhdrs/termios/tcgetattr.c4
-rw-r--r--testsuites/psxtests/psxhdrs/termios/tcsetattr.c4
-rw-r--r--testsuites/psxtests/psxhdrs/time/asctime.c27
-rw-r--r--testsuites/psxtests/psxhdrs/time/asctime_r.c27
-rw-r--r--testsuites/psxtests/psxhdrs/time/clock.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time/clock_getcpuclockid.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time/clock_getres.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time/clock_gettime.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time/clock_nanosleep.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time/clock_settime.c27
-rw-r--r--testsuites/psxtests/psxhdrs/time/ctime.c27
-rw-r--r--testsuites/psxtests/psxhdrs/time/ctime_r.c27
-rw-r--r--testsuites/psxtests/psxhdrs/time/difftime.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time/gmtime.c27
-rw-r--r--testsuites/psxtests/psxhdrs/time/gmtime_r.c27
-rw-r--r--testsuites/psxtests/psxhdrs/time/localtime.c27
-rw-r--r--testsuites/psxtests/psxhdrs/time/localtime_r.c27
-rw-r--r--testsuites/psxtests/psxhdrs/time/mktime.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time/nanosleep.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time/strftime.c27
-rw-r--r--testsuites/psxtests/psxhdrs/time/time.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time/timer_create.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time/timer_delete.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time/timer_getoverrun.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time/timer_gettime.c25
-rw-r--r--testsuites/psxtests/psxhdrs/time/timer_settime.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/alarm.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/fdatasync.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/fsync.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/getegid.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/geteuid.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/getgid.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/getgroups.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/getlogin.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/getlogin_r.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/getpgrp.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/getpid.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/getppid.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/getuid.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/pause.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/setgid.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/setgroups.c27
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/setpgid.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/setsid.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/setuid.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/sleep.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/sync.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/ualarm.c25
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/usleep.c25
-rw-r--r--testsuites/psxtests/psxhdrs/utime/utime.c2
-rw-r--r--testsuites/psxtests/psxhdrs/wchar/mbsinit.c4
-rw-r--r--testsuites/psxtests/psxid01/init.c25
-rw-r--r--testsuites/psxtests/psxid01/psxid01.doc25
-rw-r--r--testsuites/psxtests/psximfs01/init.c25
-rw-r--r--testsuites/psxtests/psximfs01/psximfs01.doc25
-rw-r--r--testsuites/psxtests/psximfs02/init.c55
-rw-r--r--testsuites/psxtests/psximfs02/psximfs02.doc25
-rw-r--r--testsuites/psxtests/psxintrcritical01/init.c27
-rw-r--r--testsuites/psxtests/psxintrcritical01/psxintrcritical01.doc25
-rw-r--r--testsuites/psxtests/psxitimer/init.c25
-rw-r--r--testsuites/psxtests/psxkey01/init.c25
-rw-r--r--testsuites/psxtests/psxkey01/system.h25
-rw-r--r--testsuites/psxtests/psxkey02/init.c25
-rw-r--r--testsuites/psxtests/psxkey02/psxkey02.doc25
-rw-r--r--testsuites/psxtests/psxkey03/init.c25
-rw-r--r--testsuites/psxtests/psxkey03/psxkey03.doc25
-rw-r--r--testsuites/psxtests/psxkey04/init.c25
-rw-r--r--testsuites/psxtests/psxkey04/psxkey04.doc25
-rw-r--r--testsuites/psxtests/psxkey05/init.c25
-rw-r--r--testsuites/psxtests/psxkey05/psxkey05.doc25
-rw-r--r--testsuites/psxtests/psxkey06/init.c25
-rw-r--r--testsuites/psxtests/psxkey06/psxkey06.doc25
-rw-r--r--testsuites/psxtests/psxkey07/init.c59
-rw-r--r--testsuites/psxtests/psxkey07/psxkey07.doc25
-rw-r--r--testsuites/psxtests/psxkey08/init.c27
-rw-r--r--testsuites/psxtests/psxkey08/psxkey08.doc25
-rw-r--r--testsuites/psxtests/psxkey09/init.c25
-rw-r--r--testsuites/psxtests/psxkey09/psxkey09.doc25
-rw-r--r--testsuites/psxtests/psxkey10/init.c25
-rw-r--r--testsuites/psxtests/psxkey10/psxkey10.doc25
-rw-r--r--testsuites/psxtests/psxmmap01/system.h25
-rw-r--r--testsuites/psxtests/psxmmap01/test_driver.c25
-rw-r--r--testsuites/psxtests/psxmmap01/test_driver.h25
-rw-r--r--testsuites/psxtests/psxmmap01/test_helper.c25
-rw-r--r--testsuites/psxtests/psxmmap01/test_helper.h25
-rw-r--r--testsuites/psxtests/psxmount/main.c35
-rw-r--r--testsuites/psxtests/psxmount/test.c27
-rw-r--r--testsuites/psxtests/psxmsgq01/init.c27
-rw-r--r--testsuites/psxtests/psxmsgq01/system.h25
-rw-r--r--testsuites/psxtests/psxmsgq02/init.c25
-rw-r--r--testsuites/psxtests/psxmsgq02/system.h25
-rw-r--r--testsuites/psxtests/psxmsgq03/init.c25
-rw-r--r--testsuites/psxtests/psxmsgq03/psxmsgq03.doc25
-rw-r--r--testsuites/psxtests/psxmsgq03/system.h25
-rw-r--r--testsuites/psxtests/psxmsgq04/init.c25
-rw-r--r--testsuites/psxtests/psxmsgq04/psxmsgq04.doc25
-rw-r--r--testsuites/psxtests/psxmutexattr01/init.c25
-rw-r--r--testsuites/psxtests/psxmutexattr01/psxmutexattr01.doc25
-rw-r--r--testsuites/psxtests/psxobj01/init.c25
-rw-r--r--testsuites/psxtests/psxobj01/psxobj01.doc25
-rw-r--r--testsuites/psxtests/psxonce01/init.c27
-rw-r--r--testsuites/psxtests/psxonce01/psxonce01.doc27
-rw-r--r--testsuites/psxtests/psxonce01/system.h25
-rw-r--r--testsuites/psxtests/psxpasswd01/init.c25
-rw-r--r--testsuites/psxtests/psxpasswd01/psxpasswd01.doc25
-rw-r--r--testsuites/psxtests/psxpasswd02/init.c25
-rw-r--r--testsuites/psxtests/psxpasswd02/psxpasswd02.doc25
-rw-r--r--testsuites/psxtests/psxpipe01/init.c25
-rw-r--r--testsuites/psxtests/psxpipe01/psxpipe01.doc25
-rw-r--r--testsuites/psxtests/psxrdwrv/main.c25
-rw-r--r--testsuites/psxtests/psxrdwrv/test.c25
-rw-r--r--testsuites/psxtests/psxreaddir/main.c35
-rw-r--r--testsuites/psxtests/psxreaddir/test.c25
-rw-r--r--testsuites/psxtests/psxrwlock01/main.c25
-rw-r--r--testsuites/psxtests/psxrwlock01/test.c53
-rw-r--r--testsuites/psxtests/psxsem01/init.c25
-rw-r--r--testsuites/psxtests/psxshm01/init.c25
-rw-r--r--testsuites/psxtests/psxshm01/system.h25
-rw-r--r--testsuites/psxtests/psxshm02/init.c25
-rw-r--r--testsuites/psxtests/psxshm02/system.h25
-rw-r--r--testsuites/psxtests/psxsignal01/init.c25
-rw-r--r--testsuites/psxtests/psxsignal01/system.h25
-rw-r--r--testsuites/psxtests/psxsignal01/task1.c25
-rw-r--r--testsuites/psxtests/psxsignal02/init.c25
-rw-r--r--testsuites/psxtests/psxsignal02/psxsignal02.doc25
-rw-r--r--testsuites/psxtests/psxsignal03/init.c35
-rw-r--r--testsuites/psxtests/psxsignal03/psxsignal03.doc25
-rw-r--r--testsuites/psxtests/psxsignal03/psxsignal0ximpl.h25
-rw-r--r--testsuites/psxtests/psxsignal04/init.c35
-rw-r--r--testsuites/psxtests/psxsignal04/psxsignal04.doc25
-rw-r--r--testsuites/psxtests/psxsignal05/init.c25
-rw-r--r--testsuites/psxtests/psxsignal05/psxsignal05.doc25
-rw-r--r--testsuites/psxtests/psxsignal06/init.c25
-rw-r--r--testsuites/psxtests/psxsignal06/psxsignal06.doc25
-rw-r--r--testsuites/psxtests/psxsignal09/init.c73
-rw-r--r--testsuites/psxtests/psxsignal09/psxsignal09.doc7
-rw-r--r--testsuites/psxtests/psxsignal09/psxsignal09.scn3
-rw-r--r--testsuites/psxtests/psxsignal09/system.h55
-rw-r--r--testsuites/psxtests/psxspin01/main.c25
-rw-r--r--testsuites/psxtests/psxspin01/psxspin01.doc25
-rw-r--r--testsuites/psxtests/psxspin01/test.c25
-rw-r--r--testsuites/psxtests/psxstack01/init.c25
-rw-r--r--testsuites/psxtests/psxstack01/psxstack01.doc25
-rw-r--r--testsuites/psxtests/psxstack02/init.c25
-rw-r--r--testsuites/psxtests/psxstack02/psxstack02.doc25
-rw-r--r--testsuites/psxtests/psxstat/main.c25
-rw-r--r--testsuites/psxtests/psxstat/test.c25
-rw-r--r--testsuites/psxtests/psxstrsignal01/init.c25
-rw-r--r--testsuites/psxtests/psxstrsignal01/psxstrsignal01.doc25
-rw-r--r--testsuites/psxtests/psxsysconf/init.c25
-rw-r--r--testsuites/psxtests/psxsysconf/system.h25
-rw-r--r--testsuites/psxtests/psxthreadname01/init.c31
-rw-r--r--testsuites/psxtests/psxtime/main.c25
-rw-r--r--testsuites/psxtests/psxtime/psxtime.doc2
-rw-r--r--testsuites/psxtests/psxtime/test.c35
-rw-r--r--testsuites/psxtests/psxtimer01/psxtimer.c34
-rw-r--r--testsuites/psxtests/psxtimer01/system.h25
-rw-r--r--testsuites/psxtests/psxtimer02/psxtimer.c34
-rw-r--r--testsuites/psxtests/psxtimer02/system.h25
-rw-r--r--testsuites/psxtests/psxtimer_face01/psxtimer.c123
-rw-r--r--testsuites/psxtests/psxtimer_face01/psxtimer_face01.doc49
-rw-r--r--testsuites/psxtests/psxtimer_face01/psxtimer_face01.scn6
-rw-r--r--testsuites/psxtests/psxtimes01/init.c25
-rw-r--r--testsuites/psxtests/psxtimes01/psxtimes01.doc25
-rw-r--r--testsuites/psxtests/psxualarm/init.c25
-rw-r--r--testsuites/psxtests/psxualarm/system.h25
-rw-r--r--testsuites/psxtests/psxusleep/init.c25
-rw-r--r--testsuites/psxtests/psxusleep/psxusleep.doc25
-rw-r--r--testsuites/psxtmtests/psxtmbarrier01/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmbarrier01/psxtmbarrier01.doc25
-rw-r--r--testsuites/psxtmtests/psxtmbarrier02/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmbarrier02/psxtmbarrier02.doc25
-rw-r--r--testsuites/psxtmtests/psxtmbarrier03/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmbarrier03/psxtmbarrier03.doc25
-rw-r--r--testsuites/psxtmtests/psxtmbarrier04/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmbarrier04/psxtmbarrier04.doc25
-rw-r--r--testsuites/psxtmtests/psxtmclocknanosleep01/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmclocknanosleep01/psxtmclocknanosleep01.doc25
-rw-r--r--testsuites/psxtmtests/psxtmclocknanosleep02/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmclocknanosleep02/psxtmclocknanosleep02.doc25
-rw-r--r--testsuites/psxtmtests/psxtmclocknanosleep03/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmclocknanosleep03/psxtmclocknanosleep03.doc25
-rw-r--r--testsuites/psxtmtests/psxtmcond01/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmcond02/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmcond02/psxtmcond02.doc25
-rw-r--r--testsuites/psxtmtests/psxtmcond03/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmcond03/psxtmcond03.doc25
-rw-r--r--testsuites/psxtmtests/psxtmcond04/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmcond04/psxtmcond04.doc25
-rw-r--r--testsuites/psxtmtests/psxtmcond05/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmcond05/psxtmcond05.doc25
-rw-r--r--testsuites/psxtmtests/psxtmcond06/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmcond06/psxtmcond06.doc25
-rw-r--r--testsuites/psxtmtests/psxtmcond07/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmcond07/psxtmcond07.doc25
-rw-r--r--testsuites/psxtmtests/psxtmcond08/init.c15
-rw-r--r--testsuites/psxtmtests/psxtmcond08/psxtmcond08.doc25
-rw-r--r--testsuites/psxtmtests/psxtmcond08/psxtmcond08impl.h25
-rw-r--r--testsuites/psxtmtests/psxtmcond09/init.c15
-rw-r--r--testsuites/psxtmtests/psxtmcond09/psxtmcond09.doc25
-rw-r--r--testsuites/psxtmtests/psxtmcond10/init.c15
-rw-r--r--testsuites/psxtmtests/psxtmkey01/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmkey01/psxtmkey01.doc25
-rw-r--r--testsuites/psxtmtests/psxtmkey02/init.c23
-rw-r--r--testsuites/psxtmtests/psxtmkey02/psxtmkey02.doc25
-rw-r--r--testsuites/psxtmtests/psxtmmq01/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmmq01/psxtmmq01.doc25
-rw-r--r--testsuites/psxtmtests/psxtmmutex01/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmmutex01/psxtmmutex01.doc25
-rw-r--r--testsuites/psxtmtests/psxtmmutex02/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc25
-rw-r--r--testsuites/psxtmtests/psxtmmutex03/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmmutex03/psxtmmutex03.doc25
-rw-r--r--testsuites/psxtmtests/psxtmmutex04/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmmutex04/psxtmmutex04.doc25
-rw-r--r--testsuites/psxtmtests/psxtmmutex05/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmmutex05/psxtmmutex05.doc25
-rw-r--r--testsuites/psxtmtests/psxtmmutex06/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmmutex06/psxtmmutex06.doc25
-rw-r--r--testsuites/psxtmtests/psxtmmutex07/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmmutex07/psxtmmutex07.doc25
-rw-r--r--testsuites/psxtmtests/psxtmnanosleep01/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmnanosleep01/psxtmnanosleep01.doc25
-rw-r--r--testsuites/psxtmtests/psxtmnanosleep02/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmnanosleep02/psxtmnanosleep02.doc25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock01/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock01/psxtmrwlock01.doc25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock02/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock02/psxtmrwlock02.doc25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock03/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock03/psxtmrwlock03.doc25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock04/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock04/psxtmrwlock04.doc25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock05/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock05/psxtmrwlock05.doc25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock06/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock06/psxtmrwlock06.doc25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock07/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmrwlock07/psxtmrwlock07.doc25
-rw-r--r--testsuites/psxtmtests/psxtmsem01/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc25
-rw-r--r--testsuites/psxtmtests/psxtmsem02/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc25
-rw-r--r--testsuites/psxtmtests/psxtmsem03/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmsem03/psxtmsem03.doc25
-rw-r--r--testsuites/psxtmtests/psxtmsem04/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmsem04/psxtmsem04.doc25
-rw-r--r--testsuites/psxtmtests/psxtmsem05/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmsem05/psxtmsem05.doc25
-rw-r--r--testsuites/psxtmtests/psxtmsleep01/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmsleep01/psxtmsleep01.doc25
-rw-r--r--testsuites/psxtmtests/psxtmsleep02/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmsleep02/psxtmsleep02.doc25
-rw-r--r--testsuites/psxtmtests/psxtmthread01/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc25
-rw-r--r--testsuites/psxtmtests/psxtmthread02/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmthread03/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmthread03/psxtmthread03.doc25
-rw-r--r--testsuites/psxtmtests/psxtmthread04/init.c25
-rw-r--r--testsuites/psxtmtests/psxtmthread04/psxtmthread04.doc25
-rw-r--r--testsuites/psxtmtests/psxtmthread05/init.c26
-rw-r--r--testsuites/psxtmtests/psxtmthread05/psxtmthread05.doc25
-rw-r--r--testsuites/psxtmtests/psxtmthread06/init.c3
-rw-r--r--testsuites/rhealstone/rhdeadlockbrk/deadlockbrk.c1
-rw-r--r--testsuites/rhealstone/rhilatency/ilatency.c27
-rw-r--r--testsuites/rhealstone/rhmlatency/mlatency.c1
-rw-r--r--testsuites/rhealstone/rhtaskpreempt/taskpreempt.c1
-rw-r--r--testsuites/rhealstone/rhtaskswitch/taskswitch.c1
-rw-r--r--testsuites/samples/base_mp/apptask.c27
-rw-r--r--testsuites/samples/base_mp/base_mp-node1.doc25
-rw-r--r--testsuites/samples/base_mp/base_mp-node2.doc25
-rw-r--r--testsuites/samples/base_mp/init1.c35
-rw-r--r--testsuites/samples/base_mp/init2.c35
-rw-r--r--testsuites/samples/base_mp/initimpl.h25
-rw-r--r--testsuites/samples/base_mp/system.h25
-rw-r--r--testsuites/samples/base_sp/apptask.c27
-rw-r--r--testsuites/samples/base_sp/base_sp.doc25
-rw-r--r--testsuites/samples/base_sp/init.c25
-rw-r--r--testsuites/samples/base_sp/system.h25
-rw-r--r--testsuites/samples/capture/capture.doc25
-rw-r--r--testsuites/samples/capture/init.c25
-rw-r--r--testsuites/samples/capture/system.h25
-rw-r--r--testsuites/samples/capture/test1.c25
-rw-r--r--testsuites/samples/cdtest/init.c25
-rw-r--r--testsuites/samples/cdtest/main.cc58
-rw-r--r--testsuites/samples/cdtest/system.h25
-rw-r--r--testsuites/samples/fileio/fileio.doc25
-rw-r--r--testsuites/samples/fileio/init.c25
-rw-r--r--testsuites/samples/fileio/system.h25
-rw-r--r--testsuites/samples/hello/hello.doc25
-rw-r--r--testsuites/samples/hello/init.c25
-rw-r--r--testsuites/samples/iostream/init.cc34
-rw-r--r--testsuites/samples/iostream/iostream.doc25
-rw-r--r--testsuites/samples/iostream/system.h25
-rw-r--r--testsuites/samples/minimum/init.c45
-rw-r--r--testsuites/samples/minimum/minimum.doc25
-rw-r--r--testsuites/samples/nsecs/empty.c25
-rw-r--r--testsuites/samples/nsecs/init.c25
-rw-r--r--testsuites/samples/nsecs/nsecs.doc25
-rw-r--r--testsuites/samples/nsecs/system.h35
-rw-r--r--testsuites/samples/paranoia/init.c25
-rw-r--r--testsuites/samples/paranoia/paranoia.doc25
-rw-r--r--testsuites/samples/paranoia/system.h25
-rw-r--r--testsuites/samples/ticker/init.c25
-rw-r--r--testsuites/samples/ticker/system.h25
-rw-r--r--testsuites/samples/ticker/tasks.c27
-rw-r--r--testsuites/samples/ticker/ticker.doc25
-rw-r--r--testsuites/samples/unlimited/init.c25
-rw-r--r--testsuites/samples/unlimited/system.h25
-rw-r--r--testsuites/samples/unlimited/test1.c25
-rw-r--r--testsuites/samples/unlimited/test2.c25
-rw-r--r--testsuites/samples/unlimited/test3.c25
-rw-r--r--testsuites/samples/unlimited/unlimited.doc2
-rw-r--r--testsuites/smptests/smp01/init.c25
-rw-r--r--testsuites/smptests/smp01/smp01.doc25
-rw-r--r--testsuites/smptests/smp01/system.h25
-rw-r--r--testsuites/smptests/smp01/tasks.c25
-rw-r--r--testsuites/smptests/smp02/init.c25
-rw-r--r--testsuites/smptests/smp02/smp02.doc25
-rw-r--r--testsuites/smptests/smp02/system.h25
-rw-r--r--testsuites/smptests/smp02/tasks.c25
-rw-r--r--testsuites/smptests/smp03/init.c25
-rw-r--r--testsuites/smptests/smp03/smp03.doc25
-rw-r--r--testsuites/smptests/smp03/system.h25
-rw-r--r--testsuites/smptests/smp03/tasks.c25
-rw-r--r--testsuites/smptests/smp05/init.c33
-rw-r--r--testsuites/smptests/smp05/smp05.doc25
-rw-r--r--testsuites/smptests/smp07/init.c29
-rw-r--r--testsuites/smptests/smp07/smp07.doc25
-rw-r--r--testsuites/smptests/smp08/init.c25
-rw-r--r--testsuites/smptests/smp08/smp08.doc25
-rw-r--r--testsuites/smptests/smp08/system.h25
-rw-r--r--testsuites/smptests/smp08/tasks.c35
-rw-r--r--testsuites/smptests/smp09/init.c25
-rw-r--r--testsuites/smptests/smp09/smp09.doc25
-rw-r--r--testsuites/smptests/smpaffinity01/init.c27
-rw-r--r--testsuites/smptests/smpaffinity01/smpaffinity01.doc25
-rw-r--r--testsuites/smptests/smpatomic01/init.c8
-rw-r--r--testsuites/smptests/smpcache01/init.c27
-rw-r--r--testsuites/smptests/smpcapture01/init.c25
-rw-r--r--testsuites/smptests/smpcapture02/init.c25
-rw-r--r--testsuites/smptests/smpclock01/init.c31
-rw-r--r--testsuites/smptests/smpfatal01/init.c31
-rw-r--r--testsuites/smptests/smpfatal02/init.c31
-rw-r--r--testsuites/smptests/smpfatal03/init.c8
-rw-r--r--testsuites/smptests/smpfatal04/init.c31
-rw-r--r--testsuites/smptests/smpfatal05/init.c31
-rw-r--r--testsuites/smptests/smpfatal06/init.c31
-rw-r--r--testsuites/smptests/smpfatal08/init.c31
-rw-r--r--testsuites/smptests/smpfatal09/init.c2
-rw-r--r--testsuites/smptests/smpipi01/init.c79
-rw-r--r--testsuites/smptests/smpirqs01/init.c2
-rw-r--r--testsuites/smptests/smpload01/init.c31
-rw-r--r--testsuites/smptests/smplock01/init.c144
-rw-r--r--testsuites/smptests/smplock01/smplock01.scn2811
-rwxr-xr-xtestsuites/smptests/smplock01/smplock01fair.py118
-rwxr-xr-xtestsuites/smptests/smplock01/smplock01perf.py91
-rw-r--r--testsuites/smptests/smpmigration01/init.c31
-rw-r--r--testsuites/smptests/smpmigration02/init.c31
-rw-r--r--testsuites/smptests/smpmrsp01/init.c31
-rw-r--r--testsuites/smptests/smpmulticast01/init.c20
-rw-r--r--testsuites/smptests/smpmutex01/init.c31
-rw-r--r--testsuites/smptests/smpmutex02/init.c31
-rw-r--r--testsuites/smptests/smpopenmp01/init.c42
-rw-r--r--testsuites/smptests/smpopenmp01/smpopenmp01.py92
-rw-r--r--testsuites/smptests/smpopenmp01/smpopenmp01.scn137
-rw-r--r--testsuites/smptests/smppsxaffinity01/init.c25
-rw-r--r--testsuites/smptests/smppsxaffinity01/smppsxaffinity01.doc25
-rw-r--r--testsuites/smptests/smppsxaffinity02/init.c25
-rw-r--r--testsuites/smptests/smppsxaffinity02/smppsxaffinity02.doc25
-rw-r--r--testsuites/smptests/smppsxmutex01/init.c64
-rw-r--r--testsuites/smptests/smppsxsignal01/init.c31
-rw-r--r--testsuites/smptests/smpschedaffinity01/init.c25
-rw-r--r--testsuites/smptests/smpschedaffinity02/init.c25
-rw-r--r--testsuites/smptests/smpschedaffinity03/init.c25
-rw-r--r--testsuites/smptests/smpschedaffinity04/init.c25
-rw-r--r--testsuites/smptests/smpschedaffinity05/init.c25
-rw-r--r--testsuites/smptests/smpschededf01/init.c31
-rw-r--r--testsuites/smptests/smpschededf02/init.c31
-rw-r--r--testsuites/smptests/smpschededf03/init.c31
-rw-r--r--testsuites/smptests/smpschededf04/init.c31
-rw-r--r--testsuites/smptests/smpschedsem01/init.c25
-rw-r--r--testsuites/smptests/smpscheduler01/init.c31
-rw-r--r--testsuites/smptests/smpscheduler02/init.c33
-rw-r--r--testsuites/smptests/smpscheduler03/init.c31
-rw-r--r--testsuites/smptests/smpscheduler03/test.c31
-rw-r--r--testsuites/smptests/smpscheduler04/init.c31
-rw-r--r--testsuites/smptests/smpscheduler05/init.c31
-rw-r--r--testsuites/smptests/smpscheduler06/init.c31
-rw-r--r--testsuites/smptests/smpscheduler07/init.c31
-rw-r--r--testsuites/smptests/smpsignal01/init.c31
-rw-r--r--testsuites/smptests/smpstart01/init.c155
-rw-r--r--testsuites/smptests/smpstart01/smpstart01.doc12
-rw-r--r--testsuites/smptests/smpstrongapa01/init.c31
-rw-r--r--testsuites/smptests/smpswitchextension01/init.c31
-rw-r--r--testsuites/smptests/smpthreadlife01/init.c31
-rw-r--r--testsuites/smptests/smpthreadpin01/init.c31
-rw-r--r--testsuites/smptests/smpunsupported01/init.c31
-rw-r--r--testsuites/smptests/smpwakeafter01/init.c31
-rw-r--r--testsuites/sptests/sp01/init.c30
-rw-r--r--testsuites/sptests/sp01/sp01.doc27
-rw-r--r--testsuites/sptests/sp01/system.h39
-rw-r--r--testsuites/sptests/sp01/task1.c25
-rw-r--r--testsuites/sptests/sp02/init.c25
-rw-r--r--testsuites/sptests/sp02/preempt.c25
-rw-r--r--testsuites/sptests/sp02/sp02.doc27
-rw-r--r--testsuites/sptests/sp02/system.h25
-rw-r--r--testsuites/sptests/sp02/task1.c25
-rw-r--r--testsuites/sptests/sp02/task2.c25
-rw-r--r--testsuites/sptests/sp02/task3.c25
-rw-r--r--testsuites/sptests/sp03/init.c25
-rw-r--r--testsuites/sptests/sp03/sp03.doc25
-rw-r--r--testsuites/sptests/sp03/system.h25
-rw-r--r--testsuites/sptests/sp03/task1.c25
-rw-r--r--testsuites/sptests/sp03/task2.c25
-rw-r--r--testsuites/sptests/sp04/init.c25
-rw-r--r--testsuites/sptests/sp04/sp04.doc25
-rw-r--r--testsuites/sptests/sp04/system.h25
-rw-r--r--testsuites/sptests/sp04/task1.c25
-rw-r--r--testsuites/sptests/sp04/task2.c25
-rw-r--r--testsuites/sptests/sp04/task3.c25
-rw-r--r--testsuites/sptests/sp04/tswitch.c25
-rw-r--r--testsuites/sptests/sp05/init.c25
-rw-r--r--testsuites/sptests/sp05/sp05.doc27
-rw-r--r--testsuites/sptests/sp05/system.h25
-rw-r--r--testsuites/sptests/sp05/task1.c25
-rw-r--r--testsuites/sptests/sp05/task2.c25
-rw-r--r--testsuites/sptests/sp05/task3.c25
-rw-r--r--testsuites/sptests/sp06/init.c25
-rw-r--r--testsuites/sptests/sp06/sp06.doc27
-rw-r--r--testsuites/sptests/sp06/system.h25
-rw-r--r--testsuites/sptests/sp06/task1.c25
-rw-r--r--testsuites/sptests/sp06/task2.c25
-rw-r--r--testsuites/sptests/sp06/task3.c25
-rw-r--r--testsuites/sptests/sp07/init.c25
-rw-r--r--testsuites/sptests/sp07/sp07.doc27
-rw-r--r--testsuites/sptests/sp07/system.h27
-rw-r--r--testsuites/sptests/sp07/task1.c25
-rw-r--r--testsuites/sptests/sp07/task2.c25
-rw-r--r--testsuites/sptests/sp07/task3.c25
-rw-r--r--testsuites/sptests/sp07/task4.c25
-rw-r--r--testsuites/sptests/sp07/taskexit.c25
-rw-r--r--testsuites/sptests/sp07/tcreate.c25
-rw-r--r--testsuites/sptests/sp07/tdelete.c25
-rw-r--r--testsuites/sptests/sp07/trestart.c25
-rw-r--r--testsuites/sptests/sp07/tstart.c25
-rw-r--r--testsuites/sptests/sp08/init.c25
-rw-r--r--testsuites/sptests/sp08/sp08.doc27
-rw-r--r--testsuites/sptests/sp11/init.c25
-rw-r--r--testsuites/sptests/sp11/sp11.doc25
-rw-r--r--testsuites/sptests/sp11/system.h25
-rw-r--r--testsuites/sptests/sp11/task1.c25
-rw-r--r--testsuites/sptests/sp11/task2.c25
-rw-r--r--testsuites/sptests/sp11/timer.c25
-rw-r--r--testsuites/sptests/sp12/init.c25
-rw-r--r--testsuites/sptests/sp12/pridrv.c25
-rw-r--r--testsuites/sptests/sp12/pritask.c25
-rw-r--r--testsuites/sptests/sp12/sp12.doc25
-rw-r--r--testsuites/sptests/sp12/system.h25
-rw-r--r--testsuites/sptests/sp12/task1.c25
-rw-r--r--testsuites/sptests/sp12/task2.c25
-rw-r--r--testsuites/sptests/sp12/task3.c25
-rw-r--r--testsuites/sptests/sp12/task4.c25
-rw-r--r--testsuites/sptests/sp12/task5.c25
-rw-r--r--testsuites/sptests/sp13/fillbuff.c25
-rw-r--r--testsuites/sptests/sp13/init.c25
-rw-r--r--testsuites/sptests/sp13/putbuff.c25
-rw-r--r--testsuites/sptests/sp13/sp13.doc25
-rw-r--r--testsuites/sptests/sp13/system.h25
-rw-r--r--testsuites/sptests/sp13/task1.c25
-rw-r--r--testsuites/sptests/sp13/task2.c25
-rw-r--r--testsuites/sptests/sp13/task3.c25
-rw-r--r--testsuites/sptests/sp14/asr.c25
-rw-r--r--testsuites/sptests/sp14/init.c25
-rw-r--r--testsuites/sptests/sp14/sp14.doc25
-rw-r--r--testsuites/sptests/sp14/system.h25
-rw-r--r--testsuites/sptests/sp14/task1.c25
-rw-r--r--testsuites/sptests/sp14/task2.c25
-rw-r--r--testsuites/sptests/sp15/init.c25
-rw-r--r--testsuites/sptests/sp15/sp15.doc25
-rw-r--r--testsuites/sptests/sp15/system.h25
-rw-r--r--testsuites/sptests/sp15/task1.c25
-rw-r--r--testsuites/sptests/sp16/init.c25
-rw-r--r--testsuites/sptests/sp16/sp16.doc25
-rw-r--r--testsuites/sptests/sp16/system.h25
-rw-r--r--testsuites/sptests/sp16/task1.c25
-rw-r--r--testsuites/sptests/sp16/task2.c25
-rw-r--r--testsuites/sptests/sp16/task3.c25
-rw-r--r--testsuites/sptests/sp16/task4.c25
-rw-r--r--testsuites/sptests/sp16/task5.c25
-rw-r--r--testsuites/sptests/sp17/asr.c25
-rw-r--r--testsuites/sptests/sp17/init.c25
-rw-r--r--testsuites/sptests/sp17/sp17.doc25
-rw-r--r--testsuites/sptests/sp17/system.h25
-rw-r--r--testsuites/sptests/sp17/task1.c25
-rw-r--r--testsuites/sptests/sp17/task2.c25
-rw-r--r--testsuites/sptests/sp18/init.c25
-rw-r--r--testsuites/sptests/sp18/sp18.doc25
-rw-r--r--testsuites/sptests/sp19/first.c27
-rw-r--r--testsuites/sptests/sp19/fptask.c27
-rw-r--r--testsuites/sptests/sp19/fptest.h25
-rw-r--r--testsuites/sptests/sp19/init.c25
-rw-r--r--testsuites/sptests/sp19/inttest.h25
-rw-r--r--testsuites/sptests/sp19/sp19.doc25
-rw-r--r--testsuites/sptests/sp19/system.h25
-rw-r--r--testsuites/sptests/sp19/task1.c27
-rw-r--r--testsuites/sptests/sp20/getall.c25
-rw-r--r--testsuites/sptests/sp20/init.c25
-rw-r--r--testsuites/sptests/sp20/sp20.doc25
-rw-r--r--testsuites/sptests/sp20/system.h25
-rw-r--r--testsuites/sptests/sp20/task1.c25
-rw-r--r--testsuites/sptests/sp2038/init.c31
-rw-r--r--testsuites/sptests/sp2038/sp2038.doc27
-rw-r--r--testsuites/sptests/sp21/init.c25
-rw-r--r--testsuites/sptests/sp21/sp21.doc25
-rw-r--r--testsuites/sptests/sp21/sp21.scn3
-rw-r--r--testsuites/sptests/sp22/delay.c25
-rw-r--r--testsuites/sptests/sp22/init.c25
-rw-r--r--testsuites/sptests/sp22/prtime.c25
-rw-r--r--testsuites/sptests/sp22/sp22.doc25
-rw-r--r--testsuites/sptests/sp22/system.h25
-rw-r--r--testsuites/sptests/sp22/task1.c25
-rw-r--r--testsuites/sptests/sp23/init.c25
-rw-r--r--testsuites/sptests/sp23/sp23.doc25
-rw-r--r--testsuites/sptests/sp23/system.h25
-rw-r--r--testsuites/sptests/sp23/task1.c25
-rw-r--r--testsuites/sptests/sp24/init.c25
-rw-r--r--testsuites/sptests/sp24/resume.c25
-rw-r--r--testsuites/sptests/sp24/sp24.doc25
-rw-r--r--testsuites/sptests/sp24/system.h25
-rw-r--r--testsuites/sptests/sp24/task1.c27
-rw-r--r--testsuites/sptests/sp25/init.c25
-rw-r--r--testsuites/sptests/sp25/sp25.doc25
-rw-r--r--testsuites/sptests/sp25/system.h25
-rw-r--r--testsuites/sptests/sp25/task1.c25
-rw-r--r--testsuites/sptests/sp26/init.c25
-rw-r--r--testsuites/sptests/sp26/sp26.doc25
-rw-r--r--testsuites/sptests/sp26/system.h25
-rw-r--r--testsuites/sptests/sp26/task1.c25
-rw-r--r--testsuites/sptests/sp27/init.c35
-rw-r--r--testsuites/sptests/sp27/sp27.doc25
-rw-r--r--testsuites/sptests/sp27/sp27impl.h25
-rw-r--r--testsuites/sptests/sp27a/init.c35
-rw-r--r--testsuites/sptests/sp27a/sp27a.doc25
-rw-r--r--testsuites/sptests/sp30/init.c25
-rw-r--r--testsuites/sptests/sp30/resume.c25
-rw-r--r--testsuites/sptests/sp30/sp30.doc25
-rw-r--r--testsuites/sptests/sp30/system.h25
-rw-r--r--testsuites/sptests/sp30/task1.c27
-rw-r--r--testsuites/sptests/sp31/delay.c25
-rw-r--r--testsuites/sptests/sp31/init.c25
-rw-r--r--testsuites/sptests/sp31/prtime.c25
-rw-r--r--testsuites/sptests/sp31/sp31.doc25
-rw-r--r--testsuites/sptests/sp31/system.h25
-rw-r--r--testsuites/sptests/sp31/task1.c27
-rw-r--r--testsuites/sptests/sp32/init.c25
-rw-r--r--testsuites/sptests/sp32/sp32.doc25
-rw-r--r--testsuites/sptests/sp33/init.c25
-rw-r--r--testsuites/sptests/sp33/sp33.doc25
-rw-r--r--testsuites/sptests/sp37/init.c43
-rw-r--r--testsuites/sptests/sp37/sp37.doc25
-rw-r--r--testsuites/sptests/sp37/system.h25
-rw-r--r--testsuites/sptests/sp38/init.c25
-rw-r--r--testsuites/sptests/sp38/sp38.doc25
-rw-r--r--testsuites/sptests/sp38/system.h25
-rw-r--r--testsuites/sptests/sp40/init.c27
-rw-r--r--testsuites/sptests/sp40/sp40.doc25
-rw-r--r--testsuites/sptests/sp41/init.c25
-rw-r--r--testsuites/sptests/sp41/sp41.doc25
-rw-r--r--testsuites/sptests/sp42/init.c27
-rw-r--r--testsuites/sptests/sp42/sp42.doc25
-rw-r--r--testsuites/sptests/sp43/init.c25
-rw-r--r--testsuites/sptests/sp43/sp43.doc25
-rw-r--r--testsuites/sptests/sp43/system.h25
-rw-r--r--testsuites/sptests/sp44/init.c15
-rw-r--r--testsuites/sptests/sp44/sp44.doc25
-rw-r--r--testsuites/sptests/sp45/init.c25
-rw-r--r--testsuites/sptests/sp45/sp45.doc25
-rw-r--r--testsuites/sptests/sp46/init.c25
-rw-r--r--testsuites/sptests/sp46/sp46.doc25
-rw-r--r--testsuites/sptests/sp47/init.c15
-rw-r--r--testsuites/sptests/sp47/sp47.doc25
-rw-r--r--testsuites/sptests/sp48/init.c25
-rw-r--r--testsuites/sptests/sp48/sp48.doc25
-rw-r--r--testsuites/sptests/sp49/init.c25
-rw-r--r--testsuites/sptests/sp49/sp49.doc25
-rw-r--r--testsuites/sptests/sp50/init.c25
-rw-r--r--testsuites/sptests/sp50/sp50.doc25
-rw-r--r--testsuites/sptests/sp51/init.c25
-rw-r--r--testsuites/sptests/sp51/sp51.doc25
-rw-r--r--testsuites/sptests/sp52/init.c35
-rw-r--r--testsuites/sptests/sp52/sp52.doc25
-rw-r--r--testsuites/sptests/sp53/init.c35
-rw-r--r--testsuites/sptests/sp53/sp53.doc25
-rw-r--r--testsuites/sptests/sp54/init.c73
-rw-r--r--testsuites/sptests/sp54/sp54.doc25
-rw-r--r--testsuites/sptests/sp55/init.c25
-rw-r--r--testsuites/sptests/sp55/sp55.doc25
-rw-r--r--testsuites/sptests/sp56/init.c25
-rw-r--r--testsuites/sptests/sp56/sp56.doc25
-rw-r--r--testsuites/sptests/sp57/init.c25
-rw-r--r--testsuites/sptests/sp57/sp57.doc25
-rw-r--r--testsuites/sptests/sp58/init.c25
-rw-r--r--testsuites/sptests/sp58/sp58.doc25
-rw-r--r--testsuites/sptests/sp59/init.c25
-rw-r--r--testsuites/sptests/sp59/sp59.doc25
-rw-r--r--testsuites/sptests/sp60/init.c25
-rw-r--r--testsuites/sptests/sp60/sp60.doc25
-rw-r--r--testsuites/sptests/sp62/init.c25
-rw-r--r--testsuites/sptests/sp62/sp62.doc25
-rw-r--r--testsuites/sptests/sp63/init.c25
-rw-r--r--testsuites/sptests/sp63/sp63.doc25
-rw-r--r--testsuites/sptests/sp64/init.c25
-rw-r--r--testsuites/sptests/sp64/sp64.doc25
-rw-r--r--testsuites/sptests/sp65/init.c15
-rw-r--r--testsuites/sptests/sp65/sp65.doc25
-rw-r--r--testsuites/sptests/sp65/sp65impl.h25
-rw-r--r--testsuites/sptests/sp66/init.c35
-rw-r--r--testsuites/sptests/sp66/sp66.doc25
-rw-r--r--testsuites/sptests/sp67/sp67.doc25
-rw-r--r--testsuites/sptests/sp68/init.c33
-rw-r--r--testsuites/sptests/sp68/sp68.doc27
-rw-r--r--testsuites/sptests/sp69/init.c50
-rw-r--r--testsuites/sptests/sp70/init.c25
-rw-r--r--testsuites/sptests/sp70/sp70.doc25
-rw-r--r--testsuites/sptests/sp71/init.c25
-rw-r--r--testsuites/sptests/sp71/sp71.doc25
-rw-r--r--testsuites/sptests/sp72/init.c25
-rw-r--r--testsuites/sptests/sp72/sp72.doc25
-rw-r--r--testsuites/sptests/sp73/init.c25
-rw-r--r--testsuites/sptests/sp73/sp73.doc25
-rw-r--r--testsuites/sptests/sp74/init.c25
-rw-r--r--testsuites/sptests/sp74/sp74.doc25
-rw-r--r--testsuites/sptests/sp75/init.c25
-rw-r--r--testsuites/sptests/sp75/sp75.doc25
-rw-r--r--testsuites/sptests/sp76/init.c27
-rw-r--r--testsuites/sptests/sp76/sp76.doc25
-rw-r--r--testsuites/sptests/sp77/sp77.doc25
-rw-r--r--testsuites/sptests/spassoc01/init.c25
-rw-r--r--testsuites/sptests/spassoc01/spassoc01.doc25
-rw-r--r--testsuites/sptests/spatomic01/init.c8
-rw-r--r--testsuites/sptests/spcache01/init.c31
-rw-r--r--testsuites/sptests/spcbssched01/init.c25
-rw-r--r--testsuites/sptests/spcbssched01/spcbssched01.doc25
-rw-r--r--testsuites/sptests/spcbssched01/system.h25
-rw-r--r--testsuites/sptests/spcbssched01/task1.c27
-rw-r--r--testsuites/sptests/spcbssched02/spcbssched02.doc25
-rw-r--r--testsuites/sptests/spcbssched02/system.h25
-rw-r--r--testsuites/sptests/spcbssched03/cbsparams.h25
-rw-r--r--testsuites/sptests/spcbssched03/spcbssched03.doc25
-rw-r--r--testsuites/sptests/spcbssched03/system.h25
-rw-r--r--testsuites/sptests/spchain/init.c33
-rw-r--r--testsuites/sptests/spchain/spchain.doc25
-rw-r--r--testsuites/sptests/spclock_err01/delay.c25
-rw-r--r--testsuites/sptests/spclock_err01/init.c26
-rw-r--r--testsuites/sptests/spclock_err01/system.h25
-rw-r--r--testsuites/sptests/spclock_err02/init.c26
-rw-r--r--testsuites/sptests/spclock_err02/spclock_err02.doc25
-rw-r--r--testsuites/sptests/spconfig01/init.c8
-rw-r--r--testsuites/sptests/spconfig02/init.c8
-rw-r--r--testsuites/sptests/spconsole01/init.c8
-rw-r--r--testsuites/sptests/spcontext01/init.c31
-rw-r--r--testsuites/sptests/spcpucounter01/init.c31
-rw-r--r--testsuites/sptests/spcpuset01/init.c35
-rw-r--r--testsuites/sptests/spcpuset01/spcpuset01.doc25
-rw-r--r--testsuites/sptests/spcpuset01/system.h25
-rw-r--r--testsuites/sptests/spcpuset01/test.c45
-rw-r--r--testsuites/sptests/spcxx01/init.cc2
-rw-r--r--testsuites/sptests/spedfsched01/init.c25
-rw-r--r--testsuites/sptests/spedfsched01/spedfsched01.doc25
-rw-r--r--testsuites/sptests/spedfsched01/system.h25
-rw-r--r--testsuites/sptests/spedfsched01/task1.c27
-rw-r--r--testsuites/sptests/spedfsched02/getall.c25
-rw-r--r--testsuites/sptests/spedfsched02/init.c25
-rw-r--r--testsuites/sptests/spedfsched02/spedfsched02.doc25
-rw-r--r--testsuites/sptests/spedfsched02/system.h25
-rw-r--r--testsuites/sptests/spedfsched02/task1.c25
-rw-r--r--testsuites/sptests/spedfsched03/edfparams.h25
-rw-r--r--testsuites/sptests/spedfsched03/spedfsched03.doc25
-rw-r--r--testsuites/sptests/spedfsched03/system.h25
-rw-r--r--testsuites/sptests/sperror01/init.c25
-rw-r--r--testsuites/sptests/sperror01/sperror01.doc25
-rw-r--r--testsuites/sptests/sperror02/init.c25
-rw-r--r--testsuites/sptests/sperror02/sperror02.doc25
-rw-r--r--testsuites/sptests/sperror03/init.c25
-rw-r--r--testsuites/sptests/sperror03/sperror03.doc25
-rw-r--r--testsuites/sptests/spevent_err03/init.c25
-rw-r--r--testsuites/sptests/spevent_err03/system.h25
-rw-r--r--testsuites/sptests/speventsystem01/init.c31
-rw-r--r--testsuites/sptests/speventtransient01/init.c31
-rw-r--r--testsuites/sptests/spextensions01/init.c21
-rw-r--r--testsuites/sptests/spfatal01/init.c35
-rw-r--r--testsuites/sptests/spfatal01/spfatal01.doc25
-rw-r--r--testsuites/sptests/spfatal03/init.c25
-rw-r--r--testsuites/sptests/spfatal03/spfatal03.doc25
-rw-r--r--testsuites/sptests/spfatal04/init.c35
-rw-r--r--testsuites/sptests/spfatal04/spfatal04.doc25
-rw-r--r--testsuites/sptests/spfatal05/init.c25
-rw-r--r--testsuites/sptests/spfatal05/spfatal05.doc25
-rw-r--r--testsuites/sptests/spfatal09/init.c25
-rw-r--r--testsuites/sptests/spfatal09/spfatal09.doc25
-rw-r--r--testsuites/sptests/spfatal10/init.c25
-rw-r--r--testsuites/sptests/spfatal10/spfatal10.doc25
-rw-r--r--testsuites/sptests/spfatal11/init.c25
-rw-r--r--testsuites/sptests/spfatal11/spfatal11.doc25
-rw-r--r--testsuites/sptests/spfatal12/init.c25
-rw-r--r--testsuites/sptests/spfatal12/spfatal12.doc25
-rw-r--r--testsuites/sptests/spfatal14/init.c25
-rw-r--r--testsuites/sptests/spfatal14/spfatal14.doc25
-rw-r--r--testsuites/sptests/spfatal15/init.c25
-rw-r--r--testsuites/sptests/spfatal15/spfatal15.doc25
-rw-r--r--testsuites/sptests/spfatal24/init.c31
-rw-r--r--testsuites/sptests/spfatal24/spfatal24.doc19
-rw-r--r--testsuites/sptests/spfatal24/spfatal24.scn3
-rw-r--r--testsuites/sptests/spfatal25/init.c33
-rw-r--r--testsuites/sptests/spfatal25/spfatal25.doc19
-rw-r--r--testsuites/sptests/spfatal25/spfatal25.scn3
-rw-r--r--testsuites/sptests/spfatal26/init.c31
-rw-r--r--testsuites/sptests/spfatal28/init.c31
-rw-r--r--testsuites/sptests/spfatal29/init.c31
-rw-r--r--testsuites/sptests/spfatal30/init.c31
-rw-r--r--testsuites/sptests/spfatal31/init.c31
-rw-r--r--testsuites/sptests/spfatal32/init.c36
-rw-r--r--testsuites/sptests/spfatal33/init.c2
-rw-r--r--testsuites/sptests/spfatal34/init.c2
-rw-r--r--testsuites/sptests/spfatal35/init.c89
-rw-r--r--testsuites/sptests/spfatal35/spfatal35.doc7
-rw-r--r--testsuites/sptests/spfatal35/spfatal35.scn2
-rw-r--r--testsuites/sptests/spfatal36/init.c63
-rw-r--r--testsuites/sptests/spfatal36/spfatal36.doc11
-rw-r--r--testsuites/sptests/spfatal_support/spfatal.h25
-rw-r--r--testsuites/sptests/spfatal_support/spfatalimpl.h25
-rw-r--r--testsuites/sptests/spfifo02/init.c25
-rw-r--r--testsuites/sptests/spfifo02/spfifo02.doc25
-rw-r--r--testsuites/sptests/spfifo03/init.c25
-rw-r--r--testsuites/sptests/spfifo03/spfifo03.doc25
-rw-r--r--testsuites/sptests/spfifo04/init.c25
-rw-r--r--testsuites/sptests/spfifo04/spfifo04.doc25
-rw-r--r--testsuites/sptests/spfifo05/init.c25
-rw-r--r--testsuites/sptests/spfifo05/spfifo05.doc25
-rw-r--r--testsuites/sptests/spfreechain01/spfreechain01.doc25
-rw-r--r--testsuites/sptests/spglobalcon01/init.cc31
-rw-r--r--testsuites/sptests/spglobalcon02/init.c8
-rw-r--r--testsuites/sptests/spheapprot/init.c31
-rw-r--r--testsuites/sptests/spheapprot/spheapprot.doc34
-rw-r--r--testsuites/sptests/spinternalerror01/init.c31
-rw-r--r--testsuites/sptests/spinternalerror02/init.c33
-rw-r--r--testsuites/sptests/spintr_err01/init.c25
-rw-r--r--testsuites/sptests/spintr_err01/isr.c25
-rw-r--r--testsuites/sptests/spintr_err01/system.h25
-rw-r--r--testsuites/sptests/spintrcritical01/init.c35
-rw-r--r--testsuites/sptests/spintrcritical01/spintrcritical01.doc25
-rw-r--r--testsuites/sptests/spintrcritical01/spintrcritical01impl.h27
-rw-r--r--testsuites/sptests/spintrcritical02/init.c35
-rw-r--r--testsuites/sptests/spintrcritical02/spintrcritical02.doc25
-rw-r--r--testsuites/sptests/spintrcritical03/init.c35
-rw-r--r--testsuites/sptests/spintrcritical03/spintrcritical03.doc25
-rw-r--r--testsuites/sptests/spintrcritical04/init.c35
-rw-r--r--testsuites/sptests/spintrcritical04/spintrcritical04.doc25
-rw-r--r--testsuites/sptests/spintrcritical05/init.c35
-rw-r--r--testsuites/sptests/spintrcritical05/spintrcritical05.doc25
-rw-r--r--testsuites/sptests/spintrcritical08/init.c40
-rw-r--r--testsuites/sptests/spintrcritical08/spintrcritical08.doc25
-rw-r--r--testsuites/sptests/spintrcritical09/init.c29
-rw-r--r--testsuites/sptests/spintrcritical09/spintrcritical09.doc25
-rw-r--r--testsuites/sptests/spintrcritical10/init.c36
-rw-r--r--testsuites/sptests/spintrcritical10/spintrcritical10.doc25
-rw-r--r--testsuites/sptests/spintrcritical11/init.c35
-rw-r--r--testsuites/sptests/spintrcritical11/spintrcritical11.doc25
-rw-r--r--testsuites/sptests/spintrcritical11/spintrcritical11impl.h27
-rw-r--r--testsuites/sptests/spintrcritical12/init.c35
-rw-r--r--testsuites/sptests/spintrcritical12/spintrcritical12.doc25
-rw-r--r--testsuites/sptests/spintrcritical13/init.c35
-rw-r--r--testsuites/sptests/spintrcritical13/spintrcritical13.doc25
-rw-r--r--testsuites/sptests/spintrcritical13/spintrcritical13impl.h27
-rw-r--r--testsuites/sptests/spintrcritical14/init.c35
-rw-r--r--testsuites/sptests/spintrcritical14/spintrcritical14.doc25
-rw-r--r--testsuites/sptests/spintrcritical15/init.c27
-rw-r--r--testsuites/sptests/spintrcritical15/spintrcritical15.doc25
-rw-r--r--testsuites/sptests/spintrcritical16/init.c27
-rw-r--r--testsuites/sptests/spintrcritical16/spintrcritical16.doc25
-rw-r--r--testsuites/sptests/spintrcritical18/init.c27
-rw-r--r--testsuites/sptests/spintrcritical20/init.c27
-rw-r--r--testsuites/sptests/spintrcritical21/init.c43
-rw-r--r--testsuites/sptests/spintrcritical21/spintrcritical21.doc25
-rw-r--r--testsuites/sptests/spintrcritical22/init.c29
-rw-r--r--testsuites/sptests/spintrcritical23/init.c27
-rw-r--r--testsuites/sptests/spintrcritical24/init.c27
-rw-r--r--testsuites/sptests/splinkersets01/content.c8
-rw-r--r--testsuites/sptests/splinkersets01/init.c8
-rw-r--r--testsuites/sptests/splinkersets01/item-a.c8
-rw-r--r--testsuites/sptests/splinkersets01/item-ca.c8
-rw-r--r--testsuites/sptests/splinkersets01/sets.c8
-rw-r--r--testsuites/sptests/splinkersets01/splinkersets01.h8
-rw-r--r--testsuites/sptests/spmisc01/init.c42
-rw-r--r--testsuites/sptests/spmisc01/spmisc01.h2
-rw-r--r--testsuites/sptests/spmisc01/strong.c2
-rw-r--r--testsuites/sptests/spmkdir/init.c32
-rw-r--r--testsuites/sptests/spmountmgr01/init.c25
-rw-r--r--testsuites/sptests/spmountmgr01/spmountmgr01.doc25
-rw-r--r--testsuites/sptests/spmrsp01/init.c31
-rw-r--r--testsuites/sptests/spmsgq_err01/init.c25
-rw-r--r--testsuites/sptests/spmsgq_err01/system.h25
-rw-r--r--testsuites/sptests/spmsgq_err02/init.c25
-rw-r--r--testsuites/sptests/spmsgq_err02/system.h25
-rw-r--r--testsuites/sptests/spmsgq_err02/task3.c25
-rw-r--r--testsuites/sptests/spmutex01/init.c31
-rw-r--r--testsuites/sptests/spnsext01/init.c31
-rw-r--r--testsuites/sptests/spnsext01/spnsext01.doc34
-rw-r--r--testsuites/sptests/spntp01/init.c111
-rw-r--r--testsuites/sptests/spobjgetnext/init.c25
-rw-r--r--testsuites/sptests/spobjgetnext/spobjgetnext.doc25
-rw-r--r--testsuites/sptests/spobjgetnext/system.h25
-rw-r--r--testsuites/sptests/sppartition_err01/init.c25
-rw-r--r--testsuites/sptests/sppartition_err01/sppartition_err01.doc25
-rw-r--r--testsuites/sptests/sppartition_err01/system.h25
-rw-r--r--testsuites/sptests/sppercpudata01/init.c31
-rw-r--r--testsuites/sptests/sppercpudata01/item.c31
-rw-r--r--testsuites/sptests/sppercpudata01/sppercpudata01.h31
-rw-r--r--testsuites/sptests/spport_err01/init.c25
-rw-r--r--testsuites/sptests/spport_err01/system.h25
-rw-r--r--testsuites/sptests/sppps01/init.c240
-rw-r--r--testsuites/sptests/spprintk/init.c50
-rw-r--r--testsuites/sptests/spprintk/spprintk.doc25
-rw-r--r--testsuites/sptests/spprivenv01/init.c25
-rw-r--r--testsuites/sptests/spprivenv01/spprivenv01.doc25
-rw-r--r--testsuites/sptests/spprofiling01/init.c31
-rw-r--r--testsuites/sptests/spqreslib/spqreslib.doc25
-rw-r--r--testsuites/sptests/spqreslib/system.h25
-rw-r--r--testsuites/sptests/spratemon_err01/init.c25
-rw-r--r--testsuites/sptests/spratemon_err01/screen10.c25
-rw-r--r--testsuites/sptests/spratemon_err01/system.h25
-rw-r--r--testsuites/sptests/spratemon_err01/task4.c25
-rw-r--r--testsuites/sptests/sprbtree01/init.c25
-rw-r--r--testsuites/sptests/sprbtree01/sprbtree01.doc25
-rw-r--r--testsuites/sptests/spregion_err01/init.c25
-rw-r--r--testsuites/sptests/spregion_err01/spregion_err01.doc25
-rw-r--r--testsuites/sptests/spregion_err01/system.h25
-rw-r--r--testsuites/sptests/spscheduler01/init.c27
-rw-r--r--testsuites/sptests/spsem01/init.c25
-rw-r--r--testsuites/sptests/spsem02/init.c25
-rw-r--r--testsuites/sptests/spsem03/init.c31
-rw-r--r--testsuites/sptests/spsem_err01/init.c25
-rw-r--r--testsuites/sptests/spsem_err01/system.h25
-rw-r--r--testsuites/sptests/spsem_err02/init.c25
-rw-r--r--testsuites/sptests/spsem_err02/system.h25
-rw-r--r--testsuites/sptests/spsem_err02/task2.c25
-rw-r--r--testsuites/sptests/spsignal_err01/init.c25
-rw-r--r--testsuites/sptests/spsignal_err01/isr.c25
-rw-r--r--testsuites/sptests/spsignal_err01/system.h25
-rw-r--r--testsuites/sptests/spsimplesched01/init.c27
-rw-r--r--testsuites/sptests/spsimplesched01/spsimplesched01.doc25
-rw-r--r--testsuites/sptests/spsimplesched02/init.c27
-rw-r--r--testsuites/sptests/spsimplesched02/spsimplesched02.doc25
-rw-r--r--testsuites/sptests/spsimplesched03/init.c25
-rw-r--r--testsuites/sptests/spsimplesched03/spsimplesched03.doc25
-rw-r--r--testsuites/sptests/spsize/getint.c25
-rw-r--r--testsuites/sptests/spsize/init.c25
-rw-r--r--testsuites/sptests/spsize/size.c25
-rw-r--r--testsuites/sptests/spsize/spsize.doc25
-rw-r--r--testsuites/sptests/spsize/system.h25
-rw-r--r--testsuites/sptests/spstdc17/init.c57
-rw-r--r--testsuites/sptests/spstdc17/spstdc17.doc12
-rw-r--r--testsuites/sptests/spstdthreads01/init.c31
-rw-r--r--testsuites/sptests/spstkalloc/init.c25
-rw-r--r--testsuites/sptests/spstkalloc/spstkalloc.doc25
-rw-r--r--testsuites/sptests/spstkalloc02/init.c58
-rw-r--r--testsuites/sptests/spstkalloc02/spstkalloc02.doc31
-rw-r--r--testsuites/sptests/spstkalloc03/init.c29
-rw-r--r--testsuites/sptests/spstkalloc03/spstkalloc03.doc25
-rw-r--r--testsuites/sptests/spstkalloc04/init.c29
-rw-r--r--testsuites/sptests/spstkalloc04/spstkalloc04.doc25
-rw-r--r--testsuites/sptests/spsysinit01/init.c14
-rw-r--r--testsuites/sptests/spsyslock01/init.c31
-rw-r--r--testsuites/sptests/sptask_err01/init.c25
-rw-r--r--testsuites/sptests/sptask_err01/system.h25
-rw-r--r--testsuites/sptests/sptask_err01/task2.c25
-rw-r--r--testsuites/sptests/sptask_err02/init.c25
-rw-r--r--testsuites/sptests/sptask_err02/system.h25
-rw-r--r--testsuites/sptests/sptask_err03/init.c25
-rw-r--r--testsuites/sptests/sptask_err03/system.h25
-rw-r--r--testsuites/sptests/sptask_err04/init.c25
-rw-r--r--testsuites/sptests/sptask_err04/system.h25
-rw-r--r--testsuites/sptests/sptask_err04/task1.c29
-rw-r--r--testsuites/sptests/sptasknopreempt01/init.c47
-rw-r--r--testsuites/sptests/spthread01/init.c8
-rw-r--r--testsuites/sptests/spthreadlife01/init.c31
-rw-r--r--testsuites/sptests/spthreadq01/init.c27
-rw-r--r--testsuites/sptests/spthreadq01/spthreadq01.doc25
-rw-r--r--testsuites/sptests/sptimecounter01/init.c43
-rw-r--r--testsuites/sptests/sptimecounter01/sptimecounter01.doc37
-rw-r--r--testsuites/sptests/sptimecounter02/init.c107
-rwxr-xr-xtestsuites/sptests/sptimecounter02/sptimecounter02.py91
-rw-r--r--testsuites/sptests/sptimecounter02/sptimecounter02.scn1036
-rw-r--r--testsuites/sptests/sptimecounter03/init.c33
-rw-r--r--testsuites/sptests/sptimecounter04/init.c31
-rw-r--r--testsuites/sptests/sptimer_err01/init.c25
-rw-r--r--testsuites/sptests/sptimer_err01/sptimer_err01.doc25
-rw-r--r--testsuites/sptests/sptimer_err02/init.c25
-rw-r--r--testsuites/sptests/sptimer_err02/sptimer_err02.doc25
-rw-r--r--testsuites/sptests/sptimerserver01/init.c31
-rw-r--r--testsuites/sptests/sptimespec01/init.c25
-rw-r--r--testsuites/sptests/sptimespec01/sptimespec01.doc25
-rw-r--r--testsuites/sptests/sptls01/init.c123
-rw-r--r--testsuites/sptests/sptls02/init.cc20
-rw-r--r--testsuites/sptests/sptls02/sptls02.h2
-rw-r--r--testsuites/sptests/sptls02/var.cc2
-rw-r--r--testsuites/sptests/sptls03/init.c49
-rw-r--r--testsuites/sptests/sptls03/sptls03.doc2
-rw-r--r--testsuites/sptests/sptls04/init.c17
-rw-r--r--testsuites/sptests/sptls04/sptls04.h41
-rw-r--r--testsuites/sptests/sptls04/tls.c34
-rw-r--r--testsuites/sptests/spunlimited01/init.c125
-rw-r--r--testsuites/sptests/spunlimited01/spunlimited01.doc14
-rw-r--r--testsuites/sptests/spversion01/init.c25
-rw-r--r--testsuites/sptests/spversion01/spversion01.doc25
-rw-r--r--testsuites/sptests/spwatchdog/delay.c25
-rw-r--r--testsuites/sptests/spwatchdog/init.c25
-rw-r--r--testsuites/sptests/spwatchdog/prtime.c25
-rw-r--r--testsuites/sptests/spwatchdog/spwatchdog.doc25
-rw-r--r--testsuites/sptests/spwatchdog/system.h25
-rw-r--r--testsuites/sptests/spwatchdog/task1.c25
-rw-r--r--testsuites/sptests/spwkspace/init.c25
-rw-r--r--testsuites/sptests/spwkspace/spwkspace.doc25
-rw-r--r--testsuites/sptests/x4
-rw-r--r--testsuites/support/include/buffer_test_io.h36
-rw-r--r--testsuites/support/include/test_support.h25
-rw-r--r--testsuites/support/include/tmacros.h26
-rw-r--r--testsuites/support/include/tmtests_empty_function.h2
-rw-r--r--testsuites/support/src/locked_print.c25
-rw-r--r--testsuites/support/src/spin.c25
-rw-r--r--testsuites/support/src/test_support.c25
-rw-r--r--testsuites/support/src/tmtests_empty_function.c25
-rw-r--r--testsuites/support/src/tmtests_support.c25
-rw-r--r--testsuites/tmtests/include/timesys.h25
-rw-r--r--testsuites/tmtests/tm01/system.h26
-rw-r--r--testsuites/tmtests/tm01/task1.c25
-rw-r--r--testsuites/tmtests/tm01/tm01.doc25
-rw-r--r--testsuites/tmtests/tm02/system.h26
-rw-r--r--testsuites/tmtests/tm02/task1.c35
-rw-r--r--testsuites/tmtests/tm02/tm02.doc25
-rw-r--r--testsuites/tmtests/tm02/tm02impl.h25
-rw-r--r--testsuites/tmtests/tm03/system.h26
-rw-r--r--testsuites/tmtests/tm03/task1.c35
-rw-r--r--testsuites/tmtests/tm03/tm03.doc25
-rw-r--r--testsuites/tmtests/tm03/tm03impl.h25
-rw-r--r--testsuites/tmtests/tm04/system.h26
-rw-r--r--testsuites/tmtests/tm04/task1.c25
-rw-r--r--testsuites/tmtests/tm04/tm04.doc25
-rw-r--r--testsuites/tmtests/tm05/system.h26
-rw-r--r--testsuites/tmtests/tm05/task1.c25
-rw-r--r--testsuites/tmtests/tm05/tm05.doc25
-rw-r--r--testsuites/tmtests/tm06/system.h26
-rw-r--r--testsuites/tmtests/tm06/task1.c25
-rw-r--r--testsuites/tmtests/tm06/tm06.doc25
-rw-r--r--testsuites/tmtests/tm07/system.h26
-rw-r--r--testsuites/tmtests/tm07/task1.c25
-rw-r--r--testsuites/tmtests/tm07/tm07.doc25
-rw-r--r--testsuites/tmtests/tm08/system.h26
-rw-r--r--testsuites/tmtests/tm08/task1.c25
-rw-r--r--testsuites/tmtests/tm08/tm08.doc25
-rw-r--r--testsuites/tmtests/tm09/system.h26
-rw-r--r--testsuites/tmtests/tm09/task1.c25
-rw-r--r--testsuites/tmtests/tm09/tm09.doc25
-rw-r--r--testsuites/tmtests/tm10/system.h26
-rw-r--r--testsuites/tmtests/tm10/task1.c25
-rw-r--r--testsuites/tmtests/tm10/tm10.doc25
-rw-r--r--testsuites/tmtests/tm11/system.h26
-rw-r--r--testsuites/tmtests/tm11/task1.c25
-rw-r--r--testsuites/tmtests/tm11/tm11.doc25
-rw-r--r--testsuites/tmtests/tm12/system.h26
-rw-r--r--testsuites/tmtests/tm12/task1.c25
-rw-r--r--testsuites/tmtests/tm12/tm12.doc25
-rw-r--r--testsuites/tmtests/tm13/system.h26
-rw-r--r--testsuites/tmtests/tm13/task1.c25
-rw-r--r--testsuites/tmtests/tm13/tm13.doc25
-rw-r--r--testsuites/tmtests/tm14/system.h26
-rw-r--r--testsuites/tmtests/tm14/task1.c25
-rw-r--r--testsuites/tmtests/tm14/tm14.doc25
-rw-r--r--testsuites/tmtests/tm15/system.h26
-rw-r--r--testsuites/tmtests/tm15/task1.c25
-rw-r--r--testsuites/tmtests/tm15/tm15.doc25
-rw-r--r--testsuites/tmtests/tm16/system.h26
-rw-r--r--testsuites/tmtests/tm16/task1.c25
-rw-r--r--testsuites/tmtests/tm16/tm16.doc25
-rw-r--r--testsuites/tmtests/tm17/system.h26
-rw-r--r--testsuites/tmtests/tm17/task1.c25
-rw-r--r--testsuites/tmtests/tm17/tm17.doc25
-rw-r--r--testsuites/tmtests/tm18/system.h26
-rw-r--r--testsuites/tmtests/tm18/task1.c25
-rw-r--r--testsuites/tmtests/tm18/tm18.doc25
-rw-r--r--testsuites/tmtests/tm19/system.h26
-rw-r--r--testsuites/tmtests/tm19/task1.c25
-rw-r--r--testsuites/tmtests/tm19/tm19.doc25
-rw-r--r--testsuites/tmtests/tm20/system.h26
-rw-r--r--testsuites/tmtests/tm20/task1.c25
-rw-r--r--testsuites/tmtests/tm20/tm20.doc25
-rw-r--r--testsuites/tmtests/tm21/system.h26
-rw-r--r--testsuites/tmtests/tm21/task1.c25
-rw-r--r--testsuites/tmtests/tm21/tm21.doc25
-rw-r--r--testsuites/tmtests/tm22/system.h26
-rw-r--r--testsuites/tmtests/tm22/task1.c25
-rw-r--r--testsuites/tmtests/tm22/tm22.doc25
-rw-r--r--testsuites/tmtests/tm23/system.h26
-rw-r--r--testsuites/tmtests/tm23/task1.c25
-rw-r--r--testsuites/tmtests/tm23/tm23.doc25
-rw-r--r--testsuites/tmtests/tm24/system.h26
-rw-r--r--testsuites/tmtests/tm24/task1.c25
-rw-r--r--testsuites/tmtests/tm24/tm24.doc25
-rw-r--r--testsuites/tmtests/tm25/system.h26
-rw-r--r--testsuites/tmtests/tm25/task1.c25
-rw-r--r--testsuites/tmtests/tm25/tm25.doc25
-rw-r--r--testsuites/tmtests/tm26/fptest.h25
-rw-r--r--testsuites/tmtests/tm26/system.h26
-rw-r--r--testsuites/tmtests/tm26/task1.c25
-rw-r--r--testsuites/tmtests/tm26/tm26.doc25
-rw-r--r--testsuites/tmtests/tm27/system.h26
-rw-r--r--testsuites/tmtests/tm27/task1.c125
-rw-r--r--testsuites/tmtests/tm27/tm27.doc25
-rw-r--r--testsuites/tmtests/tm28/system.h26
-rw-r--r--testsuites/tmtests/tm28/task1.c25
-rw-r--r--testsuites/tmtests/tm28/tm28.doc25
-rw-r--r--testsuites/tmtests/tm29/system.h26
-rw-r--r--testsuites/tmtests/tm29/task1.c25
-rw-r--r--testsuites/tmtests/tm29/tm29.doc25
-rw-r--r--testsuites/tmtests/tm30/init.c25
-rw-r--r--testsuites/tmtests/tm30/tm30.doc25
-rw-r--r--testsuites/tmtests/tm31/task1.c35
-rw-r--r--testsuites/tmtests/tm31/tm31.doc25
-rw-r--r--testsuites/tmtests/tm32/task1.c35
-rw-r--r--testsuites/tmtests/tm32/tm32.doc25
-rw-r--r--testsuites/tmtests/tm33/task1.c35
-rw-r--r--testsuites/tmtests/tm33/tm33.doc25
-rw-r--r--testsuites/tmtests/tm34/task1.c35
-rw-r--r--testsuites/tmtests/tm34/tm34.doc25
-rw-r--r--testsuites/tmtests/tm35/task1.c35
-rw-r--r--testsuites/tmtests/tm35/tm35.doc25
-rw-r--r--testsuites/tmtests/tm36/task1.c35
-rw-r--r--testsuites/tmtests/tm36/tm36.doc25
-rw-r--r--testsuites/tmtests/tmck/system.h26
-rw-r--r--testsuites/tmtests/tmck/task1.c25
-rw-r--r--testsuites/tmtests/tmck/tmck.doc25
-rw-r--r--testsuites/tmtests/tmcontext01/init.c120
-rw-r--r--testsuites/tmtests/tmcontext01/plot.py104
-rw-r--r--testsuites/tmtests/tmcontext01/tmcontext01.scn379
-rw-r--r--testsuites/tmtests/tmfine01/init.c149
-rw-r--r--testsuites/tmtests/tmfine01/tmfine01.py116
-rw-r--r--testsuites/tmtests/tmfine01/tmfine01.scn4308
-rw-r--r--testsuites/tmtests/tmonetoone/init.c31
-rw-r--r--testsuites/tmtests/tmtimer01/init.c64
-rw-r--r--testsuites/tmtests/tmtimer01/plot.py75
-rw-r--r--testsuites/tmtests/tmtimer01/tmtimer01.scn389
-rw-r--r--testsuites/unit/tc-base64-decode.c186
-rw-r--r--testsuites/unit/tc-compiler-builtins.c1141
-rw-r--r--testsuites/unit/tc-config.c171
-rw-r--r--testsuites/unit/tc-crc.c48
-rw-r--r--testsuites/unit/tc-misaligned-builtin-memcpy.c57
-rw-r--r--testsuites/unit/tc-score-msgq.c452
-rw-r--r--testsuites/unit/tc-score-rbtree.c1195
-rw-r--r--testsuites/unit/ts-unit-no-clock-0.c80
-rw-r--r--testsuites/validation/bsps/tc-fatal-sparc-leon3-shutdown-halt.c142
-rw-r--r--testsuites/validation/bsps/tc-fatal-sparc-leon3-shutdown-request.c179
-rw-r--r--testsuites/validation/bsps/tc-sparc-gr712rc.c124
-rw-r--r--testsuites/validation/bsps/tr-fatal-clock-xil-ttc-irq-install.c187
-rw-r--r--testsuites/validation/bsps/tr-fatal-clock-xil-ttc-irq-install.h84
-rw-r--r--testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-boot.c175
-rw-r--r--testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-boot.h84
-rw-r--r--testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-secondary.c176
-rw-r--r--testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-secondary.h84
-rw-r--r--testsuites/validation/bsps/tr-fatal-sparc-leon3-clock-initialization.c190
-rw-r--r--testsuites/validation/bsps/tr-fatal-sparc-leon3-clock-initialization.h84
-rw-r--r--testsuites/validation/bsps/ts-fatal-clock-xil-ttc-irq-install.c79
-rw-r--r--testsuites/validation/bsps/ts-fatal-sparc-leon3-cache-snooping-disabled-boot.c79
-rw-r--r--testsuites/validation/bsps/ts-fatal-sparc-leon3-cache-snooping-disabled-secondary.c82
-rw-r--r--testsuites/validation/bsps/ts-fatal-sparc-leon3-clock-initialization.c79
-rw-r--r--testsuites/validation/bsps/ts-fatal-sparc-leon3-shutdown-response.c94
-rw-r--r--testsuites/validation/bsps/ts-fatal-sparc-leon3-shutdown.c177
-rw-r--r--testsuites/validation/bsps/ts-validation-bsp-0.c73
-rw-r--r--testsuites/validation/tc-acfg-appl-does-not-need-clock-driver.c130
-rw-r--r--testsuites/validation/tc-acfg-appl-needs-clock-driver.c128
-rw-r--r--testsuites/validation/tc-acfg-default.c398
-rw-r--r--testsuites/validation/tc-acfg-disabled-bsp-settings.c140
-rw-r--r--testsuites/validation/tc-acfg-one-cpu.c156
-rw-r--r--testsuites/validation/tc-acfg-scheduler-edf-smp.c132
-rw-r--r--testsuites/validation/tc-acfg-scheduler-table-entries-one-cpu.c102
-rw-r--r--testsuites/validation/tc-acfg.c415
-rw-r--r--testsuites/validation/tc-attr.c350
-rw-r--r--testsuites/validation/tc-barrier-create.c8
-rw-r--r--testsuites/validation/tc-barrier-delete.c8
-rw-r--r--testsuites/validation/tc-barrier-ident.c119
-rw-r--r--testsuites/validation/tc-barrier-performance.c638
-rw-r--r--testsuites/validation/tc-barrier-release.c53
-rw-r--r--testsuites/validation/tc-barrier-wait.c82
-rw-r--r--testsuites/validation/tc-basedefs-no-debug.c135
-rw-r--r--testsuites/validation/tc-basedefs-pendant.c122
-rw-r--r--testsuites/validation/tc-basedefs-pendant.h93
-rw-r--r--testsuites/validation/tc-basedefs.c2033
-rw-r--r--testsuites/validation/tc-bsp-interrupt-handler-dispatch-unchecked.c649
-rw-r--r--testsuites/validation/tc-c.c189
-rw-r--r--testsuites/validation/tc-cache.c675
-rw-r--r--testsuites/validation/tc-clock-get-tod.c470
-rw-r--r--testsuites/validation/tc-clock-get-uptime.c338
-rw-r--r--testsuites/validation/tc-clock-nanosleep.c1027
-rw-r--r--testsuites/validation/tc-clock-set.c839
-rw-r--r--testsuites/validation/tc-clock.c181
-rw-r--r--testsuites/validation/tc-cpu-performance.c270
-rw-r--r--testsuites/validation/tc-cpuuse.c166
-rw-r--r--testsuites/validation/tc-dev-clock-xil-ttc.c136
-rw-r--r--testsuites/validation/tc-dev-grlib-apbuart-inbyte-nonblocking.c348
-rw-r--r--testsuites/validation/tc-dev-grlib-io.c295
-rw-r--r--testsuites/validation/tc-dev-grlib-irqamp-get-timestamp.c304
-rw-r--r--testsuites/validation/tc-event-performance.c591
-rw-r--r--testsuites/validation/tc-event-send-receive.c202
-rw-r--r--testsuites/validation/tc-events.c197
-rw-r--r--testsuites/validation/tc-flsl.c275
-rw-r--r--testsuites/validation/tc-futex-wait.c411
-rw-r--r--testsuites/validation/tc-futex-wake.c409
-rw-r--r--testsuites/validation/tc-intr-clear.c45
-rw-r--r--testsuites/validation/tc-intr-entry-install.c267
-rw-r--r--testsuites/validation/tc-intr-entry-remove.c185
-rw-r--r--testsuites/validation/tc-intr-get-affinity.c72
-rw-r--r--testsuites/validation/tc-intr-get-attributes.c11
-rw-r--r--testsuites/validation/tc-intr-handler-iterate.c54
-rw-r--r--testsuites/validation/tc-intr-is-pending.c95
-rw-r--r--testsuites/validation/tc-intr-non-smp.c170
-rw-r--r--testsuites/validation/tc-intr-raise-on.c76
-rw-r--r--testsuites/validation/tc-intr-raise.c69
-rw-r--r--testsuites/validation/tc-intr-set-affinity.c281
-rw-r--r--testsuites/validation/tc-intr-smp-only.c225
-rw-r--r--testsuites/validation/tc-intr-vector-disable.c63
-rw-r--r--testsuites/validation/tc-intr-vector-enable.c65
-rw-r--r--testsuites/validation/tc-intr-vector-is-enabled.c55
-rw-r--r--testsuites/validation/tc-intr.c286
-rw-r--r--testsuites/validation/tc-io-getchark.c328
-rw-r--r--testsuites/validation/tc-io-put-char.c319
-rw-r--r--testsuites/validation/tc-io-putc.c319
-rw-r--r--testsuites/validation/tc-message-broadcast.c1203
-rw-r--r--testsuites/validation/tc-message-construct-errors.c932
-rw-r--r--testsuites/validation/tc-message-construct.c1058
-rw-r--r--testsuites/validation/tc-message-delete.c479
-rw-r--r--testsuites/validation/tc-message-flush-pending.c981
-rw-r--r--testsuites/validation/tc-message-ident.c129
-rw-r--r--testsuites/validation/tc-message-macros.c147
-rw-r--r--testsuites/validation/tc-message-performance.c946
-rw-r--r--testsuites/validation/tc-message-receive.c1473
-rw-r--r--testsuites/validation/tc-message-urgent-send.c1166
-rw-r--r--testsuites/validation/tc-modes.c363
-rw-r--r--testsuites/validation/tc-object.c62
-rw-r--r--testsuites/validation/tc-options.c202
-rw-r--r--testsuites/validation/tc-part-create.c791
-rw-r--r--testsuites/validation/tc-part-delete.c396
-rw-r--r--testsuites/validation/tc-part-get.c526
-rw-r--r--testsuites/validation/tc-part-ident.c123
-rw-r--r--testsuites/validation/tc-part-performance.c171
-rw-r--r--testsuites/validation/tc-part-return.c486
-rw-r--r--testsuites/validation/tc-part.c196
-rw-r--r--testsuites/validation/tc-preinit-array.c150
-rw-r--r--testsuites/validation/tc-ratemon-cancel.c882
-rw-r--r--testsuites/validation/tc-ratemon-create.c529
-rw-r--r--testsuites/validation/tc-ratemon-delete.c368
-rw-r--r--testsuites/validation/tc-ratemon-get-status.c1170
-rw-r--r--testsuites/validation/tc-ratemon-ident.c117
-rw-r--r--testsuites/validation/tc-ratemon-period.c1273
-rw-r--r--testsuites/validation/tc-ratemon-timeout.c961
-rw-r--r--testsuites/validation/tc-sched-smp-edf-set-affinity.c1628
-rw-r--r--testsuites/validation/tc-sched-smp-edf.c111
-rw-r--r--testsuites/validation/tc-sched-smp.c1404
-rw-r--r--testsuites/validation/tc-sched-yield.c845
-rw-r--r--testsuites/validation/tc-scheduler-add-processor.c790
-rw-r--r--testsuites/validation/tc-scheduler-get-maximum-priority.c463
-rw-r--r--testsuites/validation/tc-scheduler-get-processor-set.c550
-rw-r--r--testsuites/validation/tc-scheduler-ident-by-processor-set.c743
-rw-r--r--testsuites/validation/tc-scheduler-ident-by-processor.c593
-rw-r--r--testsuites/validation/tc-scheduler-ident.c405
-rw-r--r--testsuites/validation/tc-scheduler-non-smp.c131
-rw-r--r--testsuites/validation/tc-scheduler-remove-processor.c1485
-rw-r--r--testsuites/validation/tc-scheduler-smp-only.c255
-rw-r--r--testsuites/validation/tc-scheduler.c156
-rw-r--r--testsuites/validation/tc-score-fatal.c462
-rw-r--r--testsuites/validation/tc-score-isr.c285
-rw-r--r--testsuites/validation/tc-score-smp-per-cpu-jobs.c151
-rw-r--r--testsuites/validation/tc-score-smp-thread.c554
-rw-r--r--testsuites/validation/tc-score-thread-smp-one-cpu.c183
-rw-r--r--testsuites/validation/tc-score-thread-tls-max-zero.c109
-rw-r--r--testsuites/validation/tc-score-thread-tls.c135
-rw-r--r--testsuites/validation/tc-score-thread.c446
-rw-r--r--testsuites/validation/tc-score-tq-smp.c571
-rw-r--r--testsuites/validation/tc-score-tq.c190
-rw-r--r--testsuites/validation/tc-sem-create.c1559
-rw-r--r--testsuites/validation/tc-sem-delete.c759
-rw-r--r--testsuites/validation/tc-sem-flush.c629
-rw-r--r--testsuites/validation/tc-sem-ident.c121
-rw-r--r--testsuites/validation/tc-sem-mrsp-obtain.c1202
-rw-r--r--testsuites/validation/tc-sem-obtain.c733
-rw-r--r--testsuites/validation/tc-sem-performance.c968
-rw-r--r--testsuites/validation/tc-sem-release.c615
-rw-r--r--testsuites/validation/tc-sem-set-priority.c1136
-rw-r--r--testsuites/validation/tc-sem-smp.c478
-rw-r--r--testsuites/validation/tc-sem-timeout.c476
-rw-r--r--testsuites/validation/tc-sem-uni.c226
-rw-r--r--testsuites/validation/tc-signal-catch.c10
-rw-r--r--testsuites/validation/tc-signal-send.c16
-rw-r--r--testsuites/validation/tc-signals.c134
-rw-r--r--testsuites/validation/tc-start-of-optional-processor-failed.c116
-rw-r--r--testsuites/validation/tc-status-is-equal.c286
-rw-r--r--testsuites/validation/tc-status-is-successful.c293
-rw-r--r--testsuites/validation/tc-status-text.c914
-rw-r--r--testsuites/validation/tc-status.c121
-rw-r--r--testsuites/validation/tc-support-is-name-valid.c293
-rw-r--r--testsuites/validation/tc-support.c126
-rw-r--r--testsuites/validation/tc-sys-lock.c433
-rw-r--r--testsuites/validation/tc-task-construct-errors.c1207
-rw-r--r--testsuites/validation/tc-task-construct.c4950
-rw-r--r--testsuites/validation/tc-task-create-errors.c17
-rw-r--r--testsuites/validation/tc-task-delete.c4844
-rw-r--r--testsuites/validation/tc-task-exit.c989
-rw-r--r--testsuites/validation/tc-task-get-affinity.c519
-rw-r--r--testsuites/validation/tc-task-get-priority.c619
-rw-r--r--testsuites/validation/tc-task-get-scheduler.c419
-rw-r--r--testsuites/validation/tc-task-ident.c338
-rw-r--r--testsuites/validation/tc-task-is-suspended.c429
-rw-r--r--testsuites/validation/tc-task-mode.c2019
-rw-r--r--testsuites/validation/tc-task-performance.c1152
-rw-r--r--testsuites/validation/tc-task-restart.c2760
-rw-r--r--testsuites/validation/tc-task-resume.c411
-rw-r--r--testsuites/validation/tc-task-set-affinity.c683
-rw-r--r--testsuites/validation/tc-task-set-priority.c815
-rw-r--r--testsuites/validation/tc-task-set-scheduler.c1491
-rw-r--r--testsuites/validation/tc-task-smp.c146
-rw-r--r--testsuites/validation/tc-task-start.c859
-rw-r--r--testsuites/validation/tc-task-storage-size.c427
-rw-r--r--testsuites/validation/tc-task-suspend.c411
-rw-r--r--testsuites/validation/tc-task-wake-after.c574
-rw-r--r--testsuites/validation/tc-task-wake-when.c665
-rw-r--r--testsuites/validation/tc-task.c355
-rw-r--r--testsuites/validation/tc-terminate.c446
-rw-r--r--testsuites/validation/tc-thread-idle-body-no-return.c205
-rw-r--r--testsuites/validation/tc-timecounter-get-smp.c740
-rw-r--r--testsuites/validation/tc-timecounter-get.c574
-rw-r--r--testsuites/validation/tc-timecounter-install.c1133
-rw-r--r--testsuites/validation/tc-timer-cancel.c813
-rw-r--r--testsuites/validation/tc-timer-create.c535
-rw-r--r--testsuites/validation/tc-timer-delete.c362
-rw-r--r--testsuites/validation/tc-timer-fire-after.c1161
-rw-r--r--testsuites/validation/tc-timer-fire-when.c1286
-rw-r--r--testsuites/validation/tc-timer-ident.c117
-rw-r--r--testsuites/validation/tc-timer-initiate-server.c816
-rw-r--r--testsuites/validation/tc-timer-reset.c1058
-rw-r--r--testsuites/validation/tc-timer-server-fire-after.c1301
-rw-r--r--testsuites/validation/tc-timer-server-fire-when.c1416
-rw-r--r--testsuites/validation/tc-timer.c208
-rw-r--r--testsuites/validation/tc-type.c130
-rw-r--r--testsuites/validation/tc-userext-create.c610
-rw-r--r--testsuites/validation/tc-userext-delete.c387
-rw-r--r--testsuites/validation/tc-userext-ident.c119
-rw-r--r--testsuites/validation/tc-userext.c918
-rw-r--r--testsuites/validation/tc-userext.h93
-rw-r--r--testsuites/validation/tr-event-constant.c726
-rw-r--r--testsuites/validation/tr-event-constant.h81
-rw-r--r--testsuites/validation/tr-event-send-receive.c1321
-rw-r--r--testsuites/validation/tr-event-send-receive.h152
-rw-r--r--testsuites/validation/tr-fatal-boot-processor-not-assigned-to-scheduler.c159
-rw-r--r--testsuites/validation/tr-fatal-boot-processor-not-assigned-to-scheduler.h84
-rw-r--r--testsuites/validation/tr-fatal-idle-thread-create-failed.c158
-rw-r--r--testsuites/validation/tr-fatal-idle-thread-create-failed.h84
-rw-r--r--testsuites/validation/tr-fatal-idle-thread-stack-too-small.c175
-rw-r--r--testsuites/validation/tr-fatal-idle-thread-stack-too-small.h84
-rw-r--r--testsuites/validation/tr-fatal-init-task-construct-failed.c172
-rw-r--r--testsuites/validation/tr-fatal-init-task-construct-failed.h84
-rw-r--r--testsuites/validation/tr-fatal-mandatory-processor-not-present.c158
-rw-r--r--testsuites/validation/tr-fatal-mandatory-processor-not-present.h84
-rw-r--r--testsuites/validation/tr-fatal-scheduler-requires-exactly-one-processor.c159
-rw-r--r--testsuites/validation/tr-fatal-scheduler-requires-exactly-one-processor.h84
-rw-r--r--testsuites/validation/tr-fatal-smp.c320
-rw-r--r--testsuites/validation/tr-fatal-smp.h81
-rw-r--r--testsuites/validation/tr-fatal-start-of-mandatory-processor-failed.c166
-rw-r--r--testsuites/validation/tr-fatal-start-of-mandatory-processor-failed.h84
-rw-r--r--testsuites/validation/tr-fatal-start-on-not-online-processor.c167
-rw-r--r--testsuites/validation/tr-fatal-start-on-not-online-processor.h84
-rw-r--r--testsuites/validation/tr-fatal-too-large-tls-size.c182
-rw-r--r--testsuites/validation/tr-fatal-too-large-tls-size.h84
-rw-r--r--testsuites/validation/tr-io-kernel.c125
-rw-r--r--testsuites/validation/tr-io-kernel.h75
-rw-r--r--testsuites/validation/tr-mtx-seize-try.c868
-rw-r--r--testsuites/validation/tr-mtx-seize-try.h134
-rw-r--r--testsuites/validation/tr-mtx-seize-wait.c1152
-rw-r--r--testsuites/validation/tr-mtx-seize-wait.h151
-rw-r--r--testsuites/validation/tr-mtx-surrender.c1246
-rw-r--r--testsuites/validation/tr-mtx-surrender.h160
-rw-r--r--testsuites/validation/tr-object-ident-local.c394
-rw-r--r--testsuites/validation/tr-object-ident-local.h115
-rw-r--r--testsuites/validation/tr-object-ident.c504
-rw-r--r--testsuites/validation/tr-object-ident.h127
-rw-r--r--testsuites/validation/tr-sem-seize-try.c329
-rw-r--r--testsuites/validation/tr-sem-seize-try.h97
-rw-r--r--testsuites/validation/tr-sem-seize-wait.c404
-rw-r--r--testsuites/validation/tr-sem-seize-wait.h103
-rw-r--r--testsuites/validation/tr-sem-surrender.c576
-rw-r--r--testsuites/validation/tr-sem-surrender.h118
-rw-r--r--testsuites/validation/tr-signal-constant.c206
-rw-r--r--testsuites/validation/tr-signal-constant.h81
-rw-r--r--testsuites/validation/tr-tq-enqueue-ceiling.c693
-rw-r--r--testsuites/validation/tr-tq-enqueue-ceiling.h109
-rw-r--r--testsuites/validation/tr-tq-enqueue-deadlock.c447
-rw-r--r--testsuites/validation/tr-tq-enqueue-deadlock.h97
-rw-r--r--testsuites/validation/tr-tq-enqueue-fifo.c340
-rw-r--r--testsuites/validation/tr-tq-enqueue-fifo.h91
-rw-r--r--testsuites/validation/tr-tq-enqueue-mrsp.c658
-rw-r--r--testsuites/validation/tr-tq-enqueue-mrsp.h109
-rw-r--r--testsuites/validation/tr-tq-enqueue-priority-inherit.c1742
-rw-r--r--testsuites/validation/tr-tq-enqueue-priority-inherit.h159
-rw-r--r--testsuites/validation/tr-tq-enqueue-priority.c751
-rw-r--r--testsuites/validation/tr-tq-enqueue-priority.h113
-rw-r--r--testsuites/validation/tr-tq-flush-fifo.c694
-rw-r--r--testsuites/validation/tr-tq-flush-fifo.h112
-rw-r--r--testsuites/validation/tr-tq-flush-priority-inherit.c577
-rw-r--r--testsuites/validation/tr-tq-flush-priority-inherit.h103
-rw-r--r--testsuites/validation/tr-tq-flush-priority.c424
-rw-r--r--testsuites/validation/tr-tq-flush-priority.h97
-rw-r--r--testsuites/validation/tr-tq-surrender-mrsp.c1041
-rw-r--r--testsuites/validation/tr-tq-surrender-mrsp.h148
-rw-r--r--testsuites/validation/tr-tq-surrender-priority-inherit.c2522
-rw-r--r--testsuites/validation/tr-tq-surrender-priority-inherit.h169
-rw-r--r--testsuites/validation/tr-tq-surrender.c690
-rw-r--r--testsuites/validation/tr-tq-surrender.h109
-rw-r--r--testsuites/validation/tr-tq-timeout-mrsp.c482
-rw-r--r--testsuites/validation/tr-tq-timeout-mrsp.h102
-rw-r--r--testsuites/validation/tr-tq-timeout-priority-inherit.c2160
-rw-r--r--testsuites/validation/tr-tq-timeout-priority-inherit.h160
-rw-r--r--testsuites/validation/tr-tq-timeout.c459
-rw-r--r--testsuites/validation/tr-tq-timeout.h98
-rw-r--r--testsuites/validation/ts-acfg.h83
-rw-r--r--testsuites/validation/ts-config.h126
-rw-r--r--testsuites/validation/ts-default.h184
-rw-r--r--testsuites/validation/ts-fatal-boot-processor-not-assigned-to-scheduler.c98
-rw-r--r--testsuites/validation/ts-fatal-idle-thread-create-failed.c90
-rw-r--r--testsuites/validation/ts-fatal-idle-thread-stack-too-small.c97
-rw-r--r--testsuites/validation/ts-fatal-init-task-construct-failed.c95
-rw-r--r--testsuites/validation/ts-fatal-mandatory-processor-not-present.c127
-rw-r--r--testsuites/validation/ts-fatal-scheduler-requires-exactly-one-processor.c98
-rw-r--r--testsuites/validation/ts-fatal-smp.c97
-rw-r--r--testsuites/validation/ts-fatal-start-of-mandatory-processor-failed.c97
-rw-r--r--testsuites/validation/ts-fatal-start-on-not-online-processor.c84
-rw-r--r--testsuites/validation/ts-fatal-sysinit.h161
-rw-r--r--testsuites/validation/ts-fatal-too-large-tls-size.c82
-rw-r--r--testsuites/validation/ts-idle.h104
-rw-r--r--testsuites/validation/ts-performance-0.c78
-rw-r--r--testsuites/validation/ts-performance-no-clock-0.c82
-rw-r--r--testsuites/validation/ts-terminate.c82
-rw-r--r--testsuites/validation/ts-userext.c99
-rw-r--r--testsuites/validation/ts-validation-0.c10
-rw-r--r--testsuites/validation/ts-validation-1.c18
-rw-r--r--testsuites/validation/ts-validation-acfg-0.c90
-rw-r--r--testsuites/validation/ts-validation-acfg-1.c112
-rw-r--r--testsuites/validation/ts-validation-cache.c77
-rw-r--r--testsuites/validation/ts-validation-intr.c80
-rw-r--r--testsuites/validation/ts-validation-io-kernel.c150
-rw-r--r--testsuites/validation/ts-validation-no-clock-0.c81
-rw-r--r--testsuites/validation/ts-validation-non-smp.c74
-rw-r--r--testsuites/validation/ts-validation-one-cpu-0.c79
-rw-r--r--testsuites/validation/ts-validation-one-cpu-1.c84
-rw-r--r--testsuites/validation/ts-validation-smp-one-cpu-0.c76
-rw-r--r--testsuites/validation/ts-validation-smp-only-0.c78
-rw-r--r--testsuites/validation/ts-validation-smp-only-2.c102
-rw-r--r--testsuites/validation/ts-validation-timecounter-0.c77
-rw-r--r--testsuites/validation/ts-validation-timecounter-1.c75
-rw-r--r--testsuites/validation/ts-validation-timecounter-smp-0.c77
-rw-r--r--testsuites/validation/ts-validation-tls-0.c74
-rw-r--r--testsuites/validation/ts-validation-tls-1.c75
-rw-r--r--testsuites/validation/tx-call-within-isr.c106
-rw-r--r--testsuites/validation/tx-default-task-config.c61
-rw-r--r--testsuites/validation/tx-interrupt.c46
-rw-r--r--testsuites/validation/tx-io-relax.c67
-rw-r--r--testsuites/validation/tx-memory-alloc.c79
-rw-r--r--testsuites/validation/tx-preemption-intervention.c155
-rw-r--r--testsuites/validation/tx-support.c898
-rw-r--r--testsuites/validation/tx-support.h499
-rw-r--r--testsuites/validation/tx-thread-queue.c858
-rw-r--r--testsuites/validation/tx-thread-queue.h537
-rw-r--r--testsuites/validation/tx-timecounter.c160
-rw-r--r--testsuites/validation/tx-timer-server.c150
-rw-r--r--testsuites/validation/tx-wrap-thread-queue.c144
2512 files changed, 198561 insertions, 20350 deletions
diff --git a/testsuites/aclocal/canonical-target-name.m4 b/testsuites/aclocal/canonical-target-name.m4
deleted file mode 100644
index d3c2531cda..0000000000
--- a/testsuites/aclocal/canonical-target-name.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-dnl canonicalize target cpu
-dnl NOTE: Most rtems targets do not fullfil autoconf's
-dnl target naming conventions "processor-vendor-os"
-dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
-dnl and we have to fix it for rtems ourselves
-
-AC_DEFUN([RTEMS_CANONICAL_TARGET_CPU],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_MSG_CHECKING(rtems target cpu)
-case "${host}" in
-riscv*-*-rtems*)
- RTEMS_CPU=riscv;;
-*-*-rtems*)
- RTEMS_CPU="$host_cpu";;
-*)
- ;;
-esac
-AS_IF([test -n "$RTEMS_CPU"],
-[dnl
-AC_MSG_RESULT($RTEMS_CPU)],
-[dnl
-AC_MSG_RESULT([<none>])
-AC_MSG_ERROR([unsupported host $host])])
-AC_SUBST(RTEMS_CPU)
-])
diff --git a/testsuites/aclocal/canonicalize-tools.m4 b/testsuites/aclocal/canonicalize-tools.m4
deleted file mode 100644
index d4f9241a2b..0000000000
--- a/testsuites/aclocal/canonicalize-tools.m4
+++ /dev/null
@@ -1,20 +0,0 @@
-dnl Set target tools
-dnl
-
-AC_DEFUN([RTEMS_CANONICALIZE_TOOLS],
-[AC_REQUIRE([RTEMS_PROG_CC])dnl
-
-dnl FIXME: What shall be done if these tools are not available?
- RTEMS_CHECK_TOOL(AR,ar,no)
- RTEMS_CHECK_TOOL(AS,as,no)
- RTEMS_CHECK_TOOL(LD,ld,no)
- RTEMS_CHECK_TOOL(NM,nm,no)
-
-dnl special treatment of ranlib
- RTEMS_CHECK_TOOL(RANLIB,ranlib,:)
-
-dnl NOTE: These may not be available if not using gnutools
- RTEMS_CHECK_TOOL(OBJCOPY,objcopy,no)
- RTEMS_CHECK_TOOL(SIZE,size,no)
- RTEMS_CHECK_TOOL(STRIP,strip,:)
-])
diff --git a/testsuites/aclocal/check-cpuopts.m4 b/testsuites/aclocal/check-cpuopts.m4
deleted file mode 100644
index e399f13cb2..0000000000
--- a/testsuites/aclocal/check-cpuopts.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-
-# RTEMS_CHECK_CPUOPTS(define)
-AC_DEFUN([RTEMS_CHECK_CPUOPTS],
-[
-AC_REQUIRE([RTEMS_BUILD_TOP])
-sav_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS -I${RTEMS_BUILD_ROOT}/include"
-AC_CACHE_CHECK(
- [for $1],
- [rtems_cv_$1],
- [AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include <rtems/score/cpuopts.h>
-#ifndef $1
-choke me
-#endif
- ])],
- [rtems_cv_$1=yes],
- [rtems_cv_$1=no])
- ])
-CPPFLAGS="$sav_CPPFLAGS"
-])
diff --git a/testsuites/aclocal/check-custom-bsp.m4 b/testsuites/aclocal/check-custom-bsp.m4
deleted file mode 100644
index 8857adcc3f..0000000000
--- a/testsuites/aclocal/check-custom-bsp.m4
+++ /dev/null
@@ -1,22 +0,0 @@
-AC_DEFUN([_RTEMS_CHECK_CUSTOM_BSP],[
-AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])dnl sets RTEMS_CPU, target
-AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir
- for i in ${rtems_rootdir}make/custom/$1;
- do
- AC_MSG_CHECKING([for $i])
- AS_IF([test -r $i],[
- $2="$i"
- AC_MSG_RESULT([yes])
- break;
- ],[
- AC_MSG_RESULT([no])
- ])
- done
-])
-
-AC_DEFUN([RTEMS_CHECK_CUSTOM_BSP],[
- _RTEMS_CHECK_CUSTOM_BSP([[$]$1.cfg],[BSP_FOUND])
- AS_IF([test -z "$BSP_FOUND"],[
- AC_MSG_ERROR([missing [$]$1.cfg])
- ])
-])
diff --git a/testsuites/aclocal/check-cxx.m4 b/testsuites/aclocal/check-cxx.m4
deleted file mode 100644
index 9fbea4e423..0000000000
--- a/testsuites/aclocal/check-cxx.m4
+++ /dev/null
@@ -1,20 +0,0 @@
-dnl
-AC_DEFUN([RTEMS_CHECK_CXX],
-[dnl
-AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])dnl
-AC_REQUIRE([RTEMS_PROG_CC_FOR_TARGET])dnl
-AC_REQUIRE([RTEMS_PROG_CXX_FOR_TARGET])dnl
-AC_CACHE_CHECK([whether to build rtems++],
- rtems_cv_HAS_CPLUSPLUS,
- [ if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
- if test -n "$CXX"; then
- rtems_cv_HAS_CPLUSPLUS="yes"
- else
- rtems_cv_HAS_CPLUSPLUS="no"
- fi
- else
- rtems_cv_HAS_CPLUSPLUS="no"
- fi])
-HAS_CPLUSPLUS="$rtems_cv_HAS_CPLUSPLUS";
-AC_SUBST(HAS_CPLUSPLUS)dnl
-])
diff --git a/testsuites/aclocal/check-tool.m4 b/testsuites/aclocal/check-tool.m4
deleted file mode 100644
index 2bc137cd96..0000000000
--- a/testsuites/aclocal/check-tool.m4
+++ /dev/null
@@ -1,9 +0,0 @@
-## Check for a cross tool, similar to AC_CHECK_TOOL, but do not fall back to
-## the un-prefixed version of PROG-TO-CHECK-FOR.
-dnl RTEMS_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN([RTEMS_CHECK_TOOL],
-[
- AS_IF([test "x$build_alias" != "x$host_alias"],
- [rtems_tool_prefix=${ac_tool_prefix}])
- AC_CHECK_PROG($1, ${rtems_tool_prefix}$2, ${rtems_tool_prefix}$2, $3, $4)
-])
diff --git a/testsuites/aclocal/enable-cxx.m4 b/testsuites/aclocal/enable-cxx.m4
deleted file mode 100644
index 952f0151a8..0000000000
--- a/testsuites/aclocal/enable-cxx.m4
+++ /dev/null
@@ -1,11 +0,0 @@
-AC_DEFUN([RTEMS_ENABLE_CXX],
-[
-AC_ARG_ENABLE(cxx,
-[AS_HELP_STRING([--enable-cxx],
-[enable C++ support])],
-[case "${enable_cxx}" in
- yes) RTEMS_HAS_CPLUSPLUS=yes ;;
- no) RTEMS_HAS_CPLUSPLUS=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;;
-esac], [RTEMS_HAS_CPLUSPLUS=yes])
-])
diff --git a/testsuites/aclocal/enable-tests.m4 b/testsuites/aclocal/enable-tests.m4
deleted file mode 100644
index 9373924013..0000000000
--- a/testsuites/aclocal/enable-tests.m4
+++ /dev/null
@@ -1,11 +0,0 @@
-AC_DEFUN([RTEMS_ENABLE_TESTS],
-[
-AC_ARG_ENABLE(tests,
-[AS_HELP_STRING(--enable-tests,enable tests (default:samples))],
- [case "${enableval}" in
- samples) enable_tests=samples;;
- yes) enable_tests=yes ;;
- no) enable_tests=no ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-tests]) ;;
- esac], [enable_tests=samples])
-])
diff --git a/testsuites/aclocal/env-rtemsbsp.m4 b/testsuites/aclocal/env-rtemsbsp.m4
deleted file mode 100644
index 1cca7d9f83..0000000000
--- a/testsuites/aclocal/env-rtemsbsp.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-dnl Pass a single BSP via an environment variable
-dnl used by per BSP configure scripts
-AC_DEFUN([RTEMS_ENV_RTEMSBSP],
-[dnl
-AC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnl
-AC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnl
-AC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnl
-
-AC_ARG_VAR([RTEMS_BSP_FAMILY],[RTEMS's BSP directory])
-
-AC_ARG_VAR([RTEMS_BSP],[RTEMS_BSP to build])
-AC_MSG_CHECKING([for RTEMS_BSP])
-AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
-[dnl
- test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP";
-])dnl
-if test -z "$rtems_cv_RTEMS_BSP"; then
- AC_MSG_ERROR([Missing RTEMS_BSP])
-fi
-RTEMS_BSP="$rtems_cv_RTEMS_BSP"
-AC_MSG_RESULT(${RTEMS_BSP})
-AC_SUBST(RTEMS_BSP)
-
-AC_SUBST([PROJECT_INCLUDE],["\$(PROJECT_ROOT)/lib/include"])
-AC_SUBST([PROJECT_LIB],["\$(PROJECT_ROOT)/lib"])
-AC_SUBST([PROJECT_RELEASE],["\$(PROJECT_ROOT)"])
-])
diff --git a/testsuites/aclocal/gcc-specs.m4 b/testsuites/aclocal/gcc-specs.m4
deleted file mode 100644
index ddcc2bfb0c..0000000000
--- a/testsuites/aclocal/gcc-specs.m4
+++ /dev/null
@@ -1,16 +0,0 @@
-dnl Check whether the target compiler accepts -specs
-
-AC_DEFUN([RTEMS_GCC_SPECS],
-[AC_REQUIRE([RTEMS_PROG_CC])
-AC_CACHE_CHECK(whether $CC accepts -specs,rtems_cv_gcc_specs,
-[
-rtems_cv_gcc_specs=no
-if test x"$GCC" = x"yes"; then
- touch confspec
- echo 'void f(){}' >conftest.c
- if test -z "`${CC} -specs confspec -c conftest.c 2>&1`";then
- rtems_cv_gcc_specs=yes
- fi
-fi
-rm -f confspec conftest*
-])])
diff --git a/testsuites/aclocal/prog-cc.m4 b/testsuites/aclocal/prog-cc.m4
deleted file mode 100644
index cf6be7d9d0..0000000000
--- a/testsuites/aclocal/prog-cc.m4
+++ /dev/null
@@ -1,40 +0,0 @@
-dnl
-dnl Check for target gcc
-dnl
-
-AC_DEFUN([RTEMS_PROG_CC],
-[
-AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_BEFORE([$0], [AC_PROG_CC])dnl
-AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
-
-case "$host" in
-*-*-rtems*) ac_cv_exeext=.exe;;
-esac
-
-RTEMS_CHECK_TOOL(CC,gcc)
-test -z "$CC" && \
- AC_MSG_ERROR([no acceptable cc found in \$PATH])
-AC_PROG_CC
-AC_PROG_CPP
-])
-
-AC_DEFUN([RTEMS_PROG_CC_FOR_TARGET],
-[
-dnl check target cc
-RTEMS_PROG_CC
-
-dnl check if the compiler supports -specs
-RTEMS_GCC_SPECS
-
-AS_IF([test x"$GCC" = xyes],[
-GCCSPECS="-B\$(RTEMS_SOURCE_ROOT)/bsps/\$(RTEMS_CPU)/\$(RTEMS_BSP_FAMILY)/start"
-AS_IF([test x"$rtems_cv_gcc_specs" = xyes],[
-GCCSPECS="${GCCSPECS} -specs bsp_specs"])
-GCCSPECS="${GCCSPECS} -qrtems"])
-AC_SUBST(GCCSPECS)
-
-RTEMS_INCLUDES
-RTEMS_BSP_INCLUDES
-RTEMS_BSP_LINKCMDS
-])
diff --git a/testsuites/aclocal/prog-cxx.m4 b/testsuites/aclocal/prog-cxx.m4
deleted file mode 100644
index aac9c37f6c..0000000000
--- a/testsuites/aclocal/prog-cxx.m4
+++ /dev/null
@@ -1,49 +0,0 @@
-dnl
-dnl Check for target g++
-dnl
-
-AC_DEFUN([RTEMS_PROG_CXX_FOR_TARGET],
-[
-AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
-AC_REQUIRE([RTEMS_ENABLE_CXX])
-RTEMS_CHECK_CPUOPTS([RTEMS_SMP])
-
-# If CXXFLAGS is not set, default to CFLAGS
-if test x"$rtems_cv_HAS_SMP" = x"yes" ; then
- CXXFLAGS=${CXXFLAGS-${CFLAGS} -std=gnu++11}
-else
- CXXFLAGS=${CXXFLAGS-${CFLAGS}}
-fi
-
-CXXFLAGS=`echo ${CXXFLAGS} | sed \
- -e s/-Wmissing-prototypes// \
- -e s/-Wimplicit-function-declaration// \
- -e s/-Wstrict-prototypes// \
- -e s/-Wnested-externs//`
-
-RTEMS_CHECK_TOOL(CXX,g++)
-if test "$RTEMS_HAS_CPLUSPLUS" = "yes";
-then
- dnl Only accept g++
- dnl NOTE: This might be too restrictive
- if test -z "$CXX";
- then
- RTEMS_HAS_CPLUSPLUS=no
- HAS_CPLUSPLUS=no
- ## Work-around to a bug in automake
- AM_CONDITIONAL([am__fastdepCXX],[false])
- else
- AC_PROG_CXX
- AC_PROG_CXXCPP
- if test "$ac_cv_prog_cc_cross" != "$ac_cv_prog_cxx_cross"; then
- AC_MSG_ERROR([***]
- [Inconsistency in compiler configuration:]
- [Target C compiler and target C++ compiler]
- [must both either be cross compilers or native compilers])
- fi
- fi
-else
- ## Work-around to a bug in automake
- AM_CONDITIONAL([am__fastdepCXX],[false])
-fi
-])
diff --git a/testsuites/aclocal/project-root.m4 b/testsuites/aclocal/project-root.m4
deleted file mode 100644
index 641baee021..0000000000
--- a/testsuites/aclocal/project-root.m4
+++ /dev/null
@@ -1,7 +0,0 @@
-AC_DEFUN([RTEMS_PROJECT_ROOT],
-[dnl
-AC_REQUIRE([RTEMS_TOP])
-BIN2C=rtems-bin2c
-AC_SUBST(BIN2C)
-])
-
diff --git a/testsuites/aclocal/rtems-bsp-includes.m4 b/testsuites/aclocal/rtems-bsp-includes.m4
deleted file mode 100644
index 2248211192..0000000000
--- a/testsuites/aclocal/rtems-bsp-includes.m4
+++ /dev/null
@@ -1,13 +0,0 @@
-dnl
-dnl RTEMS Include paths.
-dnl
-AC_DEFUN([RTEMS_BSP_INCLUDES],
-[
-AC_REQUIRE([RTEMS_SOURCE_TOP])
-AC_REQUIRE([RTEMS_BUILD_TOP])
-RTEMS_BSP_CPPFLAGS="-I${RTEMS_BUILD_ROOT}/lib/libbsp/\$(RTEMS_CPU)/\$(RTEMS_BSP_FAMILY)/include \
--I${RTEMS_SOURCE_ROOT}/bsps/include \
--I${RTEMS_SOURCE_ROOT}/bsps/\$(RTEMS_CPU)/include \
--I${RTEMS_SOURCE_ROOT}/bsps/\$(RTEMS_CPU)/\$(RTEMS_BSP_FAMILY)/include"
-AC_SUBST([RTEMS_BSP_CPPFLAGS])
-])
diff --git a/testsuites/aclocal/rtems-bsp-linkcmds.m4 b/testsuites/aclocal/rtems-bsp-linkcmds.m4
deleted file mode 100644
index 0ad8867f9d..0000000000
--- a/testsuites/aclocal/rtems-bsp-linkcmds.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-dnl
-dnl RTEMS Include paths.
-dnl
-dnl This is messy because the linkcmds have no clear and defined structure.
-dnl There are BSP named linkcmds files, plain linkcmds file, configure template
-dnl .in files configure changes and shared versions of these. The approach to have
-dnl a single file for a number of BSPs in a family is sound, the lack of rules
-dnl means we have a range of variants and this results in following code.
-dnl
-dnl The preinstall hid a number of questionable things and preinstall has gone.
-dnl
-AC_DEFUN([RTEMS_BSP_LINKCMDS],
-[
-AC_REQUIRE([RTEMS_SOURCE_TOP])
-AC_REQUIRE([RTEMS_BUILD_TOP])
-
-AC_MSG_CHECKING([BSP linkcmds])
-
-RTEMS_BSP_ARCH_PATH="${RTEMS_SOURCE_ROOT}/bsps/${RTEMS_CPU}"
-RTEMS_BSP_ARCH_LINKCMDS_PATH="${RTEMS_BSP_ARCH_PATH}/shared/start"
-RTEMS_BSP_LIBBSP_PATH="${RTEMS_BUILD_ROOT}/lib/libbsp/${RTEMS_CPU}/${RTEMS_BSP_FAMILY}"
-
-AC_SUBST(RTEMS_BSP_ARCH_LINKCMDS_PATH)
-AC_SUBST(RTEMS_BSP_LIBBSP_PATH)
-])
diff --git a/testsuites/aclocal/rtems-build-top.m4 b/testsuites/aclocal/rtems-build-top.m4
deleted file mode 100644
index 5708119c14..0000000000
--- a/testsuites/aclocal/rtems-build-top.m4
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl
-dnl RTEMS_BUILD_TOP($1)
-dnl
-AC_DEFUN([RTEMS_BUILD_TOP],
-[dnl
-#
-# This is a copy of the horrible hack in rtems-top.m4 and it is simpler to
-# copy it that attempt to clean this crap up.
-#
-RTEMS_BUILD_ROOT="${with_rtems_build_top}"
-AC_SUBST([RTEMS_BUILD_ROOT])
-])dnl
diff --git a/testsuites/aclocal/rtems-includes.m4 b/testsuites/aclocal/rtems-includes.m4
deleted file mode 100644
index ca4ebed581..0000000000
--- a/testsuites/aclocal/rtems-includes.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-dnl
-dnl RTEMS Include paths.
-dnl
-AC_DEFUN([RTEMS_INCLUDES],
-[
-AC_REQUIRE([RTEMS_SOURCE_TOP])
-AC_REQUIRE([RTEMS_BUILD_TOP])
-
-# Was CFLAGS set?
-rtems_cv_CFLAGS_set="${CFLAGS+set}"
-
-RTEMS_INCLUDE_CPUKIT="-I${RTEMS_SOURCE_ROOT}/cpukit/include"
-RTEMS_INCLUDE_CPUKIT_ARCH="-I${RTEMS_SOURCE_ROOT}/cpukit/score/cpu/\$(RTEMS_CPU)/include"
-
-RTEMS_CPUKIT_INCLUDE="${RTEMS_INCLUDE_CPUKIT} ${RTEMS_INCLUDE_CPUKIT_ARCH}"
-RTEMS_BUILD_INCLUDE="-I\$(top_builddir) -I${RTEMS_BUILD_ROOT}/include"
-
-RTEMS_INCLUDE="${RTEMS_BUILD_INCLUDE} ${RTEMS_CPUKIT_INCLUDE}"
-
-RTEMS_CPPFLAGS="${RTEMS_INCLUDE}"
-
-AC_SUBST([RTEMS_CPPFLAGS])
-])
diff --git a/testsuites/aclocal/rtems-source-top.m4 b/testsuites/aclocal/rtems-source-top.m4
deleted file mode 100644
index d1460ae82d..0000000000
--- a/testsuites/aclocal/rtems-source-top.m4
+++ /dev/null
@@ -1,8 +0,0 @@
-dnl
-dnl RTEMS_SOURCE_TOP
-dnl
-AC_DEFUN([RTEMS_SOURCE_TOP],
-[dnl
-RTEMS_SOURCE_ROOT="${with_rtems_source_top}"
-AC_SUBST([RTEMS_SOURCE_ROOT])
-])dnl
diff --git a/testsuites/aclocal/rtems-test-check.m4 b/testsuites/aclocal/rtems-test-check.m4
deleted file mode 100644
index 99b3e31244..0000000000
--- a/testsuites/aclocal/rtems-test-check.m4
+++ /dev/null
@@ -1,31 +0,0 @@
-dnl
-dnl Check a test getting it's status.
-dnl
-AC_DEFUN([RTEMS_TEST_CHECK],
-[AC_REQUIRE([RTEMS_ENV_RTEMSBSP])
- AC_REQUIRE([RTEMS_SOURCE_TOP])
- AC_MSG_CHECKING([${RTEMS_CPU}/${RTEMS_BSP} $1 test])
- tcheck="${RTEMS_SOURCE_ROOT}/testsuites/rtems-test-check"
- tdata="${RTEMS_BSP}-testsuite.tcfg"
- tincludes="${RTEMS_SOURCE_ROOT}/bsps/${RTEMS_CPU}:${RTEMS_SOURCE_ROOT}/bsps/${RTEMS_CPU}/${RTEMS_BSP_FAMILY}:${RTEMS_SOURCE_ROOT}/bsps/${RTEMS_CPU}/${RTEMS_BSP_FAMILY}/config:${RTEMS_SOURCE_ROOT}/testsuites"
- if test -f $tcheck; then
- check_result=`$tcheck exclude ${RTEMS_BSP} $tdata $tincludes $1`
- else
- check_result=$1
- fi
- if test "$1" = "$check_result"; then
- if test -f $tcheck; then
- test_CFLAGS=`$tcheck cflags ${RTEMS_BSP} $tdata $tincludes $1`
- fi
- if test -z "$test_CFLAGS"; then
- result_msg="PASS"
- else
- result_msg="$test_CFLAGS"
- fi
- else
- result_msg="EXCLUDED"
- fi
- AC_MSG_RESULT([$result_msg])
- AM_CONDITIONAL([TEST_$1], [test "$result_msg" != "EXCLUDED"])
- AC_SUBST([TEST_FLAGS_$1], [$test_CFLAGS])
-])
diff --git a/testsuites/aclocal/rtems-top.m4 b/testsuites/aclocal/rtems-top.m4
deleted file mode 100644
index acb5732a1e..0000000000
--- a/testsuites/aclocal/rtems-top.m4
+++ /dev/null
@@ -1,83 +0,0 @@
-# AC_DISABLE_OPTION_CHECKING is not available before 2.62
-AC_PREREQ(2.62)
-
-dnl
-dnl RTEMS_TOP($1)
-dnl
-dnl $1 .. relative path from this configure.ac to the toplevel configure.ac
-dnl
-AC_DEFUN([RTEMS_TOP],
-[dnl
-AC_REQUIRE([RTEMS_VERSIONING])
-AC_REQUIRE([AM_SET_LEADING_DOT])
-AC_REQUIRE([AC_DISABLE_OPTION_CHECKING])
-AC_CONFIG_AUX_DIR([$1])
-AC_CHECK_PROGS(MAKE, gmake make)
-AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
-
-AC_PREFIX_DEFAULT([/opt/rtems-][_RTEMS_API])
-
-## HACK to allow gnu-make conditionals in automake-Makefiles.
-ENDIF=endif
-AC_SUBST(ENDIF)
-
-AC_SUBST([RTEMS_TOPdir],["$1"])
-
-rtems_updir=m4_if([$2],[],[],[$2/])
-
-AC_ARG_ENABLE([rtems-root],[
-AS_HELP_STRING(--enable-rtems-root,directory containing make/custom)],
-[case ${enable_rtems_root} in
- [[\\/$]]* | ?:[[\\/]]* ) # absolute directory
- rtems_rootdir=${enable_rtems_root}
- RTEMS_ROOT=${enable_rtems_root}
- ;;
- *) # relative directory
- rtems_rootdir=${rtems_updir}${enable_rtems_root}
- RTEMS_ROOT='$(top_builddir)'/${rtems_updir}${enable_rtems_root}
- ;;
-esac],[
-rtems_rootdir=${rtems_updir}
-RTEMS_ROOT='$(top_builddir)'/${rtems_updir}
-])
-AC_SUBST([RTEMS_ROOT])
-
-AS_IF([test -n "${with_target_subdir}"],
- [project_top="../${with_project_top}"],
- [project_top="${with_project_top}"])
-AC_SUBST([PROJECT_TOPdir],[${project_top}${rtems_updir}'$(top_builddir)'])
-
-AC_ARG_ENABLE([cpukit-root],[
-AS_HELP_STRING(--enable-cpukit-root,directory containing lib/librtemscpu.a)],
-[case ${enable_cpukit_root} in
- [[\\/$]]* | ?:[[\\/]]* ) # absolute directory
- cpukit_rootdir=${enable_cpukit_root}
- CPUKIT_ROOT=${enable_cpukit_root}
- ;;
- *) # relative directory
- cpukit_rootdir=${rtems_updir}${enable_cpukit_root}
- CPUKIT_ROOT='$(top_builddir)'/${rtems_updir}${enable_cpukit_root}
- ;;
-esac],[
-cpukit_rootdir=
-CPUKIT_ROOT=
-])
-AC_SUBST([CPUKIT_ROOT])
-
-AC_ARG_ENABLE([project-root],[
-AS_HELP_STRING(--enable-project-root,directory containing lib/librtemsbsp.a)],
-[case ${enable_project_root} in
- [[\\/$]]* | ?:[[\\/]]* ) # absolute directory
- project_rootdir=${enable_project_root}
- PROJECT_ROOT=${enable_project_root}
- ;;
- *) # relative directory
- project_rootdir=${rtems_updir}${enable_project_root}
- PROJECT_ROOT='$(top_builddir)'/${rtems_updir}${enable_project_root}
- ;;
-esac],[
-project_rootdir=
-PROJECT_ROOT=
-])
-AC_SUBST([PROJECT_ROOT])
-])dnl
diff --git a/testsuites/aclocal/version.m4 b/testsuites/aclocal/version.m4
deleted file mode 100644
index 69e3eea10a..0000000000
--- a/testsuites/aclocal/version.m4
+++ /dev/null
@@ -1,4 +0,0 @@
-AC_DEFUN([RTEMS_VERSIONING],
-m4_define([_RTEMS_VERSION],[6.0.0]))
-
-m4_define([_RTEMS_API],[6])
diff --git a/testsuites/ada/aclocal/prog-gnat.m4 b/testsuites/ada/aclocal/prog-gnat.m4
deleted file mode 100644
index a2b2879c7d..0000000000
--- a/testsuites/ada/aclocal/prog-gnat.m4
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## Partially borrowed from gcc-3.2
-##
-## WARNING: All the stuff below is pretty immature.
-
-AC_DEFUN([RTEMS_PROG_GNAT],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
-AC_REQUIRE([RTEMS_PROG_CC_FOR_TARGET])
-
-AC_CHECK_TOOL([GNATMAKE],[gnatmake],[])
-AC_CACHE_CHECK([for compiler driver that understands Ada],
- [rtems_cv_prog_CCADA],
-[cat >conftest.adb <<EOF
-procedure conftest is begin null; end conftest;
-EOF
-rtems_cv_prog_CCADA=
-# Have to do ac_tool_prefix and user overrides by hand.
-user_ccada=$CCADA
-user_cc=$CC
-for cand in ${ac_tool_prefix}$user_ccada $user_ccada \
- ${ac_tool_prefix}$user_cc $user_cc \
- ${ac_tool_prefix}gcc gcc \
- ${ac_tool_prefix}cc cc \
- ${ac_tool_prefix}gnatgcc gnatgcc \
- ${ac_tool_prefix}gnatcc gnatcc \
- ${ac_tool_prefix}adagcc adagcc \
- ${ac_tool_prefix}adac adac ; do
- # There is a bug in all released versions of GCC which causes the
- # driver to exit successfully when the appropriate language module
- # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
- # Therefore we must check for the error message as well as an
- # unsuccessful exit.
- errors=`($cand -c conftest.adb) 2>&1 || echo failure`
- AS_IF([test -z "$errors"],
- [rtems_cv_prog_CCADA=$cand
- break])
-done
-rm -f conftest.*])
-AC_SUBST([CCADA],[$rtems_cv_prog_CCADA])
-
-AS_IF([test -n "$GNATMAKE" && test -n "$CCADA"],
- [HAVE_GNAT=yes],
- [HAVE_GNAT=no])
-])
diff --git a/testsuites/ada/mptests/mp01/config_base.h b/testsuites/ada/mptests/mp01/config_base.h
index 8f4dda95b9..fb074db169 100644
--- a/testsuites/ada/mptests/mp01/config_base.h
+++ b/testsuites/ada/mptests/mp01/config_base.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp01/mp01.adb b/testsuites/ada/mptests/mp01/mp01.adb
index 6e89f9306d..30d44f78ef 100644
--- a/testsuites/ada/mptests/mp01/mp01.adb
+++ b/testsuites/ada/mptests/mp01/mp01.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp01/mptest.adb b/testsuites/ada/mptests/mp01/mptest.adb
index a652428ee7..efe4c70bcd 100644
--- a/testsuites/ada/mptests/mp01/mptest.adb
+++ b/testsuites/ada/mptests/mp01/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/mptests/mp01/mptest.ads b/testsuites/ada/mptests/mp01/mptest.ads
index 81f004a8e3..f4233901f3 100644
--- a/testsuites/ada/mptests/mp01/mptest.ads
+++ b/testsuites/ada/mptests/mp01/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp01/node1/init.c b/testsuites/ada/mptests/mp01/node1/init.c
index 36c9d133e8..b4a05c733d 100644
--- a/testsuites/ada/mptests/mp01/node1/init.c
+++ b/testsuites/ada/mptests/mp01/node1/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp01/node1/mp01_node1.adb b/testsuites/ada/mptests/mp01/node1/mp01_node1.adb
index c1f54ccd32..aeaa5ab862 100644
--- a/testsuites/ada/mptests/mp01/node1/mp01_node1.adb
+++ b/testsuites/ada/mptests/mp01/node1/mp01_node1.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp01/node2/init.c b/testsuites/ada/mptests/mp01/node2/init.c
index 47edf66149..f17aa1ab1c 100644
--- a/testsuites/ada/mptests/mp01/node2/init.c
+++ b/testsuites/ada/mptests/mp01/node2/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp01/node2/mp01_node2.adb b/testsuites/ada/mptests/mp01/node2/mp01_node2.adb
index 380df6c5fd..c5ecbfe7d3 100644
--- a/testsuites/ada/mptests/mp01/node2/mp01_node2.adb
+++ b/testsuites/ada/mptests/mp01/node2/mp01_node2.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp03/config_base.h b/testsuites/ada/mptests/mp03/config_base.h
index ab111cb4d1..3939804e83 100644
--- a/testsuites/ada/mptests/mp03/config_base.h
+++ b/testsuites/ada/mptests/mp03/config_base.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp03/mptest.adb b/testsuites/ada/mptests/mp03/mptest.adb
index 023248ec27..4847db29cd 100644
--- a/testsuites/ada/mptests/mp03/mptest.adb
+++ b/testsuites/ada/mptests/mp03/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- This package is the implementation for Test 3 of the RTEMS
-- Multiprocessor Test Suite.
@@ -9,9 +11,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/mptests/mp03/mptest.ads b/testsuites/ada/mptests/mp03/mptest.ads
index 6e7f59947e..70ed5bb8ed 100644
--- a/testsuites/ada/mptests/mp03/mptest.ads
+++ b/testsuites/ada/mptests/mp03/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp03/node1/init.c b/testsuites/ada/mptests/mp03/node1/init.c
index 36c9d133e8..b4a05c733d 100644
--- a/testsuites/ada/mptests/mp03/node1/init.c
+++ b/testsuites/ada/mptests/mp03/node1/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp03/node1/mp03_node1.adb b/testsuites/ada/mptests/mp03/node1/mp03_node1.adb
index 80a67ffc94..32a535247b 100644
--- a/testsuites/ada/mptests/mp03/node1/mp03_node1.adb
+++ b/testsuites/ada/mptests/mp03/node1/mp03_node1.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp03/node2/init.c b/testsuites/ada/mptests/mp03/node2/init.c
index 47edf66149..f17aa1ab1c 100644
--- a/testsuites/ada/mptests/mp03/node2/init.c
+++ b/testsuites/ada/mptests/mp03/node2/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp03/node2/mp03_node2.adb b/testsuites/ada/mptests/mp03/node2/mp03_node2.adb
index aec5b91edd..f76cfeb6f4 100644
--- a/testsuites/ada/mptests/mp03/node2/mp03_node2.adb
+++ b/testsuites/ada/mptests/mp03/node2/mp03_node2.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp04/config_base.h b/testsuites/ada/mptests/mp04/config_base.h
index ab270747aa..ad8a325d82 100644
--- a/testsuites/ada/mptests/mp04/config_base.h
+++ b/testsuites/ada/mptests/mp04/config_base.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp04/mptest.adb b/testsuites/ada/mptests/mp04/mptest.adb
index a57ad56885..14bcf5e93c 100644
--- a/testsuites/ada/mptests/mp04/mptest.adb
+++ b/testsuites/ada/mptests/mp04/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/mptests/mp04/mptest.ads b/testsuites/ada/mptests/mp04/mptest.ads
index ddf2c82878..0dc2f75eab 100644
--- a/testsuites/ada/mptests/mp04/mptest.ads
+++ b/testsuites/ada/mptests/mp04/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp04/node1/init.c b/testsuites/ada/mptests/mp04/node1/init.c
index 36c9d133e8..b4a05c733d 100644
--- a/testsuites/ada/mptests/mp04/node1/init.c
+++ b/testsuites/ada/mptests/mp04/node1/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp04/node1/mp04_node1.adb b/testsuites/ada/mptests/mp04/node1/mp04_node1.adb
index c88c019992..9078e87944 100644
--- a/testsuites/ada/mptests/mp04/node1/mp04_node1.adb
+++ b/testsuites/ada/mptests/mp04/node1/mp04_node1.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp04/node2/init.c b/testsuites/ada/mptests/mp04/node2/init.c
index 47edf66149..f17aa1ab1c 100644
--- a/testsuites/ada/mptests/mp04/node2/init.c
+++ b/testsuites/ada/mptests/mp04/node2/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp04/node2/mp04_node2.adb b/testsuites/ada/mptests/mp04/node2/mp04_node2.adb
index 4cd9f0e3b3..22d590d260 100644
--- a/testsuites/ada/mptests/mp04/node2/mp04_node2.adb
+++ b/testsuites/ada/mptests/mp04/node2/mp04_node2.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp05/config_base.h b/testsuites/ada/mptests/mp05/config_base.h
index 1123c5c63c..952e7afffe 100644
--- a/testsuites/ada/mptests/mp05/config_base.h
+++ b/testsuites/ada/mptests/mp05/config_base.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp05/mptest.adb b/testsuites/ada/mptests/mp05/mptest.adb
index 4f3ead3d23..ddbc19c369 100644
--- a/testsuites/ada/mptests/mp05/mptest.adb
+++ b/testsuites/ada/mptests/mp05/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/mptests/mp05/mptest.ads b/testsuites/ada/mptests/mp05/mptest.ads
index 1aecb5cc39..f4ebe8565e 100644
--- a/testsuites/ada/mptests/mp05/mptest.ads
+++ b/testsuites/ada/mptests/mp05/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp05/node1/init.c b/testsuites/ada/mptests/mp05/node1/init.c
index 36c9d133e8..b4a05c733d 100644
--- a/testsuites/ada/mptests/mp05/node1/init.c
+++ b/testsuites/ada/mptests/mp05/node1/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp05/node1/mp05_node1.adb b/testsuites/ada/mptests/mp05/node1/mp05_node1.adb
index 529406450b..ca4a1bc3e1 100644
--- a/testsuites/ada/mptests/mp05/node1/mp05_node1.adb
+++ b/testsuites/ada/mptests/mp05/node1/mp05_node1.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp05/node2/init.c b/testsuites/ada/mptests/mp05/node2/init.c
index 47edf66149..f17aa1ab1c 100644
--- a/testsuites/ada/mptests/mp05/node2/init.c
+++ b/testsuites/ada/mptests/mp05/node2/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp05/node2/mp05_node2.adb b/testsuites/ada/mptests/mp05/node2/mp05_node2.adb
index faa4aa2266..7b4f6cbab6 100644
--- a/testsuites/ada/mptests/mp05/node2/mp05_node2.adb
+++ b/testsuites/ada/mptests/mp05/node2/mp05_node2.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp06/config_base.h b/testsuites/ada/mptests/mp06/config_base.h
index a0259d0a4f..312c082c1d 100644
--- a/testsuites/ada/mptests/mp06/config_base.h
+++ b/testsuites/ada/mptests/mp06/config_base.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp06/mptest.adb b/testsuites/ada/mptests/mp06/mptest.adb
index 9ac790e414..e4a0560b0e 100644
--- a/testsuites/ada/mptests/mp06/mptest.adb
+++ b/testsuites/ada/mptests/mp06/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/mptests/mp06/mptest.ads b/testsuites/ada/mptests/mp06/mptest.ads
index ef1f4750d9..8b2f6385a9 100644
--- a/testsuites/ada/mptests/mp06/mptest.ads
+++ b/testsuites/ada/mptests/mp06/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp06/node1/init.c b/testsuites/ada/mptests/mp06/node1/init.c
index 36c9d133e8..b4a05c733d 100644
--- a/testsuites/ada/mptests/mp06/node1/init.c
+++ b/testsuites/ada/mptests/mp06/node1/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp06/node1/mp06_node1.adb b/testsuites/ada/mptests/mp06/node1/mp06_node1.adb
index ebde32ca1c..1d7add7a3b 100644
--- a/testsuites/ada/mptests/mp06/node1/mp06_node1.adb
+++ b/testsuites/ada/mptests/mp06/node1/mp06_node1.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp06/node2/init.c b/testsuites/ada/mptests/mp06/node2/init.c
index 47edf66149..f17aa1ab1c 100644
--- a/testsuites/ada/mptests/mp06/node2/init.c
+++ b/testsuites/ada/mptests/mp06/node2/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp06/node2/mp06_node2.adb b/testsuites/ada/mptests/mp06/node2/mp06_node2.adb
index 3637d8827e..7150d311c2 100644
--- a/testsuites/ada/mptests/mp06/node2/mp06_node2.adb
+++ b/testsuites/ada/mptests/mp06/node2/mp06_node2.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp07/config_base.h b/testsuites/ada/mptests/mp07/config_base.h
index 51fd613ffe..4b421edf71 100644
--- a/testsuites/ada/mptests/mp07/config_base.h
+++ b/testsuites/ada/mptests/mp07/config_base.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp07/mptest.adb b/testsuites/ada/mptests/mp07/mptest.adb
index 51e3999f2d..259cd2fc07 100644
--- a/testsuites/ada/mptests/mp07/mptest.adb
+++ b/testsuites/ada/mptests/mp07/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/mptests/mp07/mptest.ads b/testsuites/ada/mptests/mp07/mptest.ads
index 499628b5d0..99d8d3eeb2 100644
--- a/testsuites/ada/mptests/mp07/mptest.ads
+++ b/testsuites/ada/mptests/mp07/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp07/node1/init.c b/testsuites/ada/mptests/mp07/node1/init.c
index 36c9d133e8..b4a05c733d 100644
--- a/testsuites/ada/mptests/mp07/node1/init.c
+++ b/testsuites/ada/mptests/mp07/node1/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp07/node1/mp07_node1.adb b/testsuites/ada/mptests/mp07/node1/mp07_node1.adb
index a6d9ef4db0..703449f5c0 100644
--- a/testsuites/ada/mptests/mp07/node1/mp07_node1.adb
+++ b/testsuites/ada/mptests/mp07/node1/mp07_node1.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp07/node2/init.c b/testsuites/ada/mptests/mp07/node2/init.c
index 47edf66149..f17aa1ab1c 100644
--- a/testsuites/ada/mptests/mp07/node2/init.c
+++ b/testsuites/ada/mptests/mp07/node2/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp07/node2/mp07_node2.adb b/testsuites/ada/mptests/mp07/node2/mp07_node2.adb
index 0e0db0bbdd..19479f9137 100644
--- a/testsuites/ada/mptests/mp07/node2/mp07_node2.adb
+++ b/testsuites/ada/mptests/mp07/node2/mp07_node2.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp08/config_base.h b/testsuites/ada/mptests/mp08/config_base.h
index f524a4c8d7..f93e3512dc 100644
--- a/testsuites/ada/mptests/mp08/config_base.h
+++ b/testsuites/ada/mptests/mp08/config_base.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp08/mptest.adb b/testsuites/ada/mptests/mp08/mptest.adb
index 1aef8eb905..e476dcd019 100644
--- a/testsuites/ada/mptests/mp08/mptest.adb
+++ b/testsuites/ada/mptests/mp08/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/mptests/mp08/mptest.ads b/testsuites/ada/mptests/mp08/mptest.ads
index 07df76322e..adaf57a62f 100644
--- a/testsuites/ada/mptests/mp08/mptest.ads
+++ b/testsuites/ada/mptests/mp08/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp08/node1/init.c b/testsuites/ada/mptests/mp08/node1/init.c
index 36c9d133e8..b4a05c733d 100644
--- a/testsuites/ada/mptests/mp08/node1/init.c
+++ b/testsuites/ada/mptests/mp08/node1/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp08/node1/mp08_node1.adb b/testsuites/ada/mptests/mp08/node1/mp08_node1.adb
index 75a1a985be..6d2490ec6a 100644
--- a/testsuites/ada/mptests/mp08/node1/mp08_node1.adb
+++ b/testsuites/ada/mptests/mp08/node1/mp08_node1.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp08/node2/init.c b/testsuites/ada/mptests/mp08/node2/init.c
index 47edf66149..f17aa1ab1c 100644
--- a/testsuites/ada/mptests/mp08/node2/init.c
+++ b/testsuites/ada/mptests/mp08/node2/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp08/node2/mp08_node2.adb b/testsuites/ada/mptests/mp08/node2/mp08_node2.adb
index 84dd6b5371..2cc7bb90bb 100644
--- a/testsuites/ada/mptests/mp08/node2/mp08_node2.adb
+++ b/testsuites/ada/mptests/mp08/node2/mp08_node2.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp09/config_base.h b/testsuites/ada/mptests/mp09/config_base.h
index f84b739f14..0060229884 100644
--- a/testsuites/ada/mptests/mp09/config_base.h
+++ b/testsuites/ada/mptests/mp09/config_base.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp09/mptest.adb b/testsuites/ada/mptests/mp09/mptest.adb
index d3bbe48c73..87274c8469 100644
--- a/testsuites/ada/mptests/mp09/mptest.adb
+++ b/testsuites/ada/mptests/mp09/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/mptests/mp09/mptest.ads b/testsuites/ada/mptests/mp09/mptest.ads
index c324ed08c3..b4ba208739 100644
--- a/testsuites/ada/mptests/mp09/mptest.ads
+++ b/testsuites/ada/mptests/mp09/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp09/node1/init.c b/testsuites/ada/mptests/mp09/node1/init.c
index 36c9d133e8..b4a05c733d 100644
--- a/testsuites/ada/mptests/mp09/node1/init.c
+++ b/testsuites/ada/mptests/mp09/node1/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp09/node1/mp09_node1.adb b/testsuites/ada/mptests/mp09/node1/mp09_node1.adb
index df2a6ab344..892e206fb2 100644
--- a/testsuites/ada/mptests/mp09/node1/mp09_node1.adb
+++ b/testsuites/ada/mptests/mp09/node1/mp09_node1.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp09/node2/init.c b/testsuites/ada/mptests/mp09/node2/init.c
index 47edf66149..f17aa1ab1c 100644
--- a/testsuites/ada/mptests/mp09/node2/init.c
+++ b/testsuites/ada/mptests/mp09/node2/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp09/node2/mp09_node2.adb b/testsuites/ada/mptests/mp09/node2/mp09_node2.adb
index adedcd20c6..4459be4461 100644
--- a/testsuites/ada/mptests/mp09/node2/mp09_node2.adb
+++ b/testsuites/ada/mptests/mp09/node2/mp09_node2.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp10/config_base.h b/testsuites/ada/mptests/mp10/config_base.h
index 6bf24a6f8f..1c18fd6c83 100644
--- a/testsuites/ada/mptests/mp10/config_base.h
+++ b/testsuites/ada/mptests/mp10/config_base.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp10/mptest.adb b/testsuites/ada/mptests/mp10/mptest.adb
index 70dfcab3e8..a87213886d 100644
--- a/testsuites/ada/mptests/mp10/mptest.adb
+++ b/testsuites/ada/mptests/mp10/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/mptests/mp10/mptest.ads b/testsuites/ada/mptests/mp10/mptest.ads
index ee5c1bab65..600cfe192d 100644
--- a/testsuites/ada/mptests/mp10/mptest.ads
+++ b/testsuites/ada/mptests/mp10/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp10/node1/init.c b/testsuites/ada/mptests/mp10/node1/init.c
index 36c9d133e8..b4a05c733d 100644
--- a/testsuites/ada/mptests/mp10/node1/init.c
+++ b/testsuites/ada/mptests/mp10/node1/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp10/node1/mp10_node1.adb b/testsuites/ada/mptests/mp10/node1/mp10_node1.adb
index 9174d74a7d..89a54c7a2f 100644
--- a/testsuites/ada/mptests/mp10/node1/mp10_node1.adb
+++ b/testsuites/ada/mptests/mp10/node1/mp10_node1.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp10/node2/init.c b/testsuites/ada/mptests/mp10/node2/init.c
index 47edf66149..f17aa1ab1c 100644
--- a/testsuites/ada/mptests/mp10/node2/init.c
+++ b/testsuites/ada/mptests/mp10/node2/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp10/node2/mp10_node2.adb b/testsuites/ada/mptests/mp10/node2/mp10_node2.adb
index ee7bb6bcc8..b1a2b9e963 100644
--- a/testsuites/ada/mptests/mp10/node2/mp10_node2.adb
+++ b/testsuites/ada/mptests/mp10/node2/mp10_node2.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp11/config_base.h b/testsuites/ada/mptests/mp11/config_base.h
index d0dd4061de..d4974c901f 100644
--- a/testsuites/ada/mptests/mp11/config_base.h
+++ b/testsuites/ada/mptests/mp11/config_base.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp11/mptest.adb b/testsuites/ada/mptests/mp11/mptest.adb
index 8f6833548a..0ed33677e7 100644
--- a/testsuites/ada/mptests/mp11/mptest.adb
+++ b/testsuites/ada/mptests/mp11/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/mptests/mp11/mptest.ads b/testsuites/ada/mptests/mp11/mptest.ads
index 2899df8e34..44be1f4161 100644
--- a/testsuites/ada/mptests/mp11/mptest.ads
+++ b/testsuites/ada/mptests/mp11/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp11/node1/init.c b/testsuites/ada/mptests/mp11/node1/init.c
index 36c9d133e8..b4a05c733d 100644
--- a/testsuites/ada/mptests/mp11/node1/init.c
+++ b/testsuites/ada/mptests/mp11/node1/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp11/node1/mp11_node1.adb b/testsuites/ada/mptests/mp11/node1/mp11_node1.adb
index 859cbc4ac8..e99bc283b2 100644
--- a/testsuites/ada/mptests/mp11/node1/mp11_node1.adb
+++ b/testsuites/ada/mptests/mp11/node1/mp11_node1.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp11/node2/init.c b/testsuites/ada/mptests/mp11/node2/init.c
index 47edf66149..f17aa1ab1c 100644
--- a/testsuites/ada/mptests/mp11/node2/init.c
+++ b/testsuites/ada/mptests/mp11/node2/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp11/node2/mp11_node2.adb b/testsuites/ada/mptests/mp11/node2/mp11_node2.adb
index 601b21574b..87587136b6 100644
--- a/testsuites/ada/mptests/mp11/node2/mp11_node2.adb
+++ b/testsuites/ada/mptests/mp11/node2/mp11_node2.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp12/config_base.h b/testsuites/ada/mptests/mp12/config_base.h
index 7ace8ca280..b33af8b1d0 100644
--- a/testsuites/ada/mptests/mp12/config_base.h
+++ b/testsuites/ada/mptests/mp12/config_base.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp12/mptest.adb b/testsuites/ada/mptests/mp12/mptest.adb
index 7d5a86a4c6..031c7540d6 100644
--- a/testsuites/ada/mptests/mp12/mptest.adb
+++ b/testsuites/ada/mptests/mp12/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/mptests/mp12/mptest.ads b/testsuites/ada/mptests/mp12/mptest.ads
index dd33b558bb..c224c44f79 100644
--- a/testsuites/ada/mptests/mp12/mptest.ads
+++ b/testsuites/ada/mptests/mp12/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp12/node1/init.c b/testsuites/ada/mptests/mp12/node1/init.c
index 36c9d133e8..b4a05c733d 100644
--- a/testsuites/ada/mptests/mp12/node1/init.c
+++ b/testsuites/ada/mptests/mp12/node1/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp12/node1/mp12_node1.adb b/testsuites/ada/mptests/mp12/node1/mp12_node1.adb
index 04c049cb5d..c35613e1f0 100644
--- a/testsuites/ada/mptests/mp12/node1/mp12_node1.adb
+++ b/testsuites/ada/mptests/mp12/node1/mp12_node1.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp12/node2/init.c b/testsuites/ada/mptests/mp12/node2/init.c
index 47edf66149..f17aa1ab1c 100644
--- a/testsuites/ada/mptests/mp12/node2/init.c
+++ b/testsuites/ada/mptests/mp12/node2/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp12/node2/mp12_node2.adb b/testsuites/ada/mptests/mp12/node2/mp12_node2.adb
index 0f046593d6..b6024e6da9 100644
--- a/testsuites/ada/mptests/mp12/node2/mp12_node2.adb
+++ b/testsuites/ada/mptests/mp12/node2/mp12_node2.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp13/config_base.h b/testsuites/ada/mptests/mp13/config_base.h
index 52e2d786eb..38cb3b75ac 100644
--- a/testsuites/ada/mptests/mp13/config_base.h
+++ b/testsuites/ada/mptests/mp13/config_base.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp13/mptest.adb b/testsuites/ada/mptests/mp13/mptest.adb
index b69d5ca4b6..1b67641a74 100644
--- a/testsuites/ada/mptests/mp13/mptest.adb
+++ b/testsuites/ada/mptests/mp13/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/mptests/mp13/mptest.ads b/testsuites/ada/mptests/mp13/mptest.ads
index 14246b6aef..17e5990708 100644
--- a/testsuites/ada/mptests/mp13/mptest.ads
+++ b/testsuites/ada/mptests/mp13/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp13/node1/init.c b/testsuites/ada/mptests/mp13/node1/init.c
index 36c9d133e8..b4a05c733d 100644
--- a/testsuites/ada/mptests/mp13/node1/init.c
+++ b/testsuites/ada/mptests/mp13/node1/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp13/node1/mp13_node1.adb b/testsuites/ada/mptests/mp13/node1/mp13_node1.adb
index 561bc67ba5..a54ea803f5 100644
--- a/testsuites/ada/mptests/mp13/node1/mp13_node1.adb
+++ b/testsuites/ada/mptests/mp13/node1/mp13_node1.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp13/node2/init.c b/testsuites/ada/mptests/mp13/node2/init.c
index 47edf66149..f17aa1ab1c 100644
--- a/testsuites/ada/mptests/mp13/node2/init.c
+++ b/testsuites/ada/mptests/mp13/node2/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp13/node2/mp13_node2.adb b/testsuites/ada/mptests/mp13/node2/mp13_node2.adb
index e197f5aa12..b4b14f3af6 100644
--- a/testsuites/ada/mptests/mp13/node2/mp13_node2.adb
+++ b/testsuites/ada/mptests/mp13/node2/mp13_node2.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp14/config_base.h b/testsuites/ada/mptests/mp14/config_base.h
index c8369dcaad..adc9e1fd6d 100644
--- a/testsuites/ada/mptests/mp14/config_base.h
+++ b/testsuites/ada/mptests/mp14/config_base.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp14/mptest.adb b/testsuites/ada/mptests/mp14/mptest.adb
index 4684c2b0bf..210d514029 100644
--- a/testsuites/ada/mptests/mp14/mptest.adb
+++ b/testsuites/ada/mptests/mp14/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/mptests/mp14/mptest.ads b/testsuites/ada/mptests/mp14/mptest.ads
index d389157cd1..d0fe8e4ccb 100644
--- a/testsuites/ada/mptests/mp14/mptest.ads
+++ b/testsuites/ada/mptests/mp14/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp14/node1/init.c b/testsuites/ada/mptests/mp14/node1/init.c
index 36c9d133e8..b4a05c733d 100644
--- a/testsuites/ada/mptests/mp14/node1/init.c
+++ b/testsuites/ada/mptests/mp14/node1/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp14/node1/mp14_node1.adb b/testsuites/ada/mptests/mp14/node1/mp14_node1.adb
index 766fc5d816..53de789c06 100644
--- a/testsuites/ada/mptests/mp14/node1/mp14_node1.adb
+++ b/testsuites/ada/mptests/mp14/node1/mp14_node1.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/mptests/mp14/node2/init.c b/testsuites/ada/mptests/mp14/node2/init.c
index 47edf66149..f17aa1ab1c 100644
--- a/testsuites/ada/mptests/mp14/node2/init.c
+++ b/testsuites/ada/mptests/mp14/node2/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/mptests/mp14/node2/mp14_node2.adb b/testsuites/ada/mptests/mp14/node2/mp14_node2.adb
index fb92b69554..1de022fd7f 100644
--- a/testsuites/ada/mptests/mp14/node2/mp14_node2.adb
+++ b/testsuites/ada/mptests/mp14/node2/mp14_node2.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/samples/base_mp/init.c b/testsuites/ada/samples/base_mp/init.c
index 78a357bd7e..bd955d0500 100644
--- a/testsuites/ada/samples/base_mp/init.c
+++ b/testsuites/ada/samples/base_mp/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* configuration information */
diff --git a/testsuites/ada/samples/base_mp/mptest.adb b/testsuites/ada/samples/base_mp/mptest.adb
index 95e7901d4b..cd1aa42a5b 100644
--- a/testsuites/ada/samples/base_mp/mptest.adb
+++ b/testsuites/ada/samples/base_mp/mptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/samples/base_mp/mptest.ads b/testsuites/ada/samples/base_mp/mptest.ads
index f246b4e0ed..c30c5e5520 100644
--- a/testsuites/ada/samples/base_mp/mptest.ads
+++ b/testsuites/ada/samples/base_mp/mptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/samples/base_mp/node1/init.c b/testsuites/ada/samples/base_mp/node1/init.c
index 073c033378..21dd58a3dc 100644
--- a/testsuites/ada/samples/base_mp/node1/init.c
+++ b/testsuites/ada/samples/base_mp/node1/init.c
@@ -1,2 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @brief This is init for node1.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "../../../support/init.c"
diff --git a/testsuites/ada/samples/base_mp/node2/init.c b/testsuites/ada/samples/base_mp/node2/init.c
index ea6db06eab..d5a8b78f3c 100644
--- a/testsuites/ada/samples/base_mp/node2/init.c
+++ b/testsuites/ada/samples/base_mp/node2/init.c
@@ -1,2 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @brief This is init for node2.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "../../../support/init.c"
diff --git a/testsuites/ada/samples/base_sp/base_sp.adb b/testsuites/ada/samples/base_sp/base_sp.adb
index aaa1ab3bca..0a8d44e267 100644
--- a/testsuites/ada/samples/base_sp/base_sp.adb
+++ b/testsuites/ada/samples/base_sp/base_sp.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/samples/base_sp/init.c b/testsuites/ada/samples/base_sp/init.c
index 1ad2d67207..a30ef29428 100644
--- a/testsuites/ada/samples/base_sp/init.c
+++ b/testsuites/ada/samples/base_sp/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/samples/base_sp/sptest.adb b/testsuites/ada/samples/base_sp/sptest.adb
index 75a472e8d9..1f532d369c 100644
--- a/testsuites/ada/samples/base_sp/sptest.adb
+++ b/testsuites/ada/samples/base_sp/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with TEST_SUPPORT;
diff --git a/testsuites/ada/samples/base_sp/sptest.ads b/testsuites/ada/samples/base_sp/sptest.ads
index e35751cd32..e2de7585da 100644
--- a/testsuites/ada/samples/base_sp/sptest.ads
+++ b/testsuites/ada/samples/base_sp/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/samples/hello/hello.adb b/testsuites/ada/samples/hello/hello.adb
index f7748f3607..ffb3204930 100644
--- a/testsuites/ada/samples/hello/hello.adb
+++ b/testsuites/ada/samples/hello/hello.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/samples/hello/init.c b/testsuites/ada/samples/hello/init.c
index f7c3f4f65a..aaa261d75a 100644
--- a/testsuites/ada/samples/hello/init.c
+++ b/testsuites/ada/samples/hello/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/samples/hello/sptest.adb b/testsuites/ada/samples/hello/sptest.adb
index a0bb90a19e..feac6e45b8 100644
--- a/testsuites/ada/samples/hello/sptest.adb
+++ b/testsuites/ada/samples/hello/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with TEXT_IO;
diff --git a/testsuites/ada/samples/hello/sptest.ads b/testsuites/ada/samples/hello/sptest.ads
index 62993b0220..129f67b26d 100644
--- a/testsuites/ada/samples/hello/sptest.ads
+++ b/testsuites/ada/samples/hello/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/samples/nsecs/init.c b/testsuites/ada/samples/nsecs/init.c
index 3935e10dcc..a069f5b7c8 100644
--- a/testsuites/ada/samples/nsecs/init.c
+++ b/testsuites/ada/samples/nsecs/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/samples/nsecs/nsecs.adb b/testsuites/ada/samples/nsecs/nsecs.adb
index 0a8f84a606..095d375e6f 100644
--- a/testsuites/ada/samples/nsecs/nsecs.adb
+++ b/testsuites/ada/samples/nsecs/nsecs.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/samples/nsecs/sptest.adb b/testsuites/ada/samples/nsecs/sptest.adb
index 9befa62c9e..25c1104b46 100644
--- a/testsuites/ada/samples/nsecs/sptest.adb
+++ b/testsuites/ada/samples/nsecs/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with Ada.Integer_Text_IO;
diff --git a/testsuites/ada/samples/nsecs/sptest.ads b/testsuites/ada/samples/nsecs/sptest.ads
index 97fa00ac2c..9e318e7e14 100644
--- a/testsuites/ada/samples/nsecs/sptest.ads
+++ b/testsuites/ada/samples/nsecs/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/samples/ticker/init.c b/testsuites/ada/samples/ticker/init.c
index e6f82f2601..6019432df1 100644
--- a/testsuites/ada/samples/ticker/init.c
+++ b/testsuites/ada/samples/ticker/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/samples/ticker/sptest.adb b/testsuites/ada/samples/ticker/sptest.adb
index 03f2b1b390..48b0296f9c 100644
--- a/testsuites/ada/samples/ticker/sptest.adb
+++ b/testsuites/ada/samples/ticker/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/samples/ticker/sptest.ads b/testsuites/ada/samples/ticker/sptest.ads
index 8753d3edad..637c475c20 100644
--- a/testsuites/ada/samples/ticker/sptest.ads
+++ b/testsuites/ada/samples/ticker/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/samples/ticker/ticker.adb b/testsuites/ada/samples/ticker/ticker.adb
index 08a1fb9e31..8cd218f5ac 100644
--- a/testsuites/ada/samples/ticker/ticker.adb
+++ b/testsuites/ada/samples/ticker/ticker.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp01/init.c b/testsuites/ada/sptests/sp01/init.c
index dc5f4fc87c..42f8f4d5a6 100644
--- a/testsuites/ada/sptests/sp01/init.c
+++ b/testsuites/ada/sptests/sp01/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp01/sp01.adb b/testsuites/ada/sptests/sp01/sp01.adb
index 34dd39e8ca..e78abcc34b 100644
--- a/testsuites/ada/sptests/sp01/sp01.adb
+++ b/testsuites/ada/sptests/sp01/sp01.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp01/sptest.adb b/testsuites/ada/sptests/sp01/sptest.adb
index 9ba4207205..2a5bdfa0f2 100644
--- a/testsuites/ada/sptests/sp01/sptest.adb
+++ b/testsuites/ada/sptests/sp01/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp01/sptest.ads b/testsuites/ada/sptests/sp01/sptest.ads
index 8753d3edad..637c475c20 100644
--- a/testsuites/ada/sptests/sp01/sptest.ads
+++ b/testsuites/ada/sptests/sp01/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp02/init.c b/testsuites/ada/sptests/sp02/init.c
index 51801f6c65..5ffe06ac9b 100644
--- a/testsuites/ada/sptests/sp02/init.c
+++ b/testsuites/ada/sptests/sp02/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp02/sp02.adb b/testsuites/ada/sptests/sp02/sp02.adb
index adbc97f66c..69398c7ef3 100644
--- a/testsuites/ada/sptests/sp02/sp02.adb
+++ b/testsuites/ada/sptests/sp02/sp02.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp02/sptest.adb b/testsuites/ada/sptests/sp02/sptest.adb
index 4534d28d2e..ecddd998de 100644
--- a/testsuites/ada/sptests/sp02/sptest.adb
+++ b/testsuites/ada/sptests/sp02/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp02/sptest.ads b/testsuites/ada/sptests/sp02/sptest.ads
index 20122e3cbd..f2718a554c 100644
--- a/testsuites/ada/sptests/sp02/sptest.ads
+++ b/testsuites/ada/sptests/sp02/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp03/init.c b/testsuites/ada/sptests/sp03/init.c
index 6da581ed00..6d6155e289 100644
--- a/testsuites/ada/sptests/sp03/init.c
+++ b/testsuites/ada/sptests/sp03/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp03/sp03.adb b/testsuites/ada/sptests/sp03/sp03.adb
index 5f081d4879..f0ce29709c 100644
--- a/testsuites/ada/sptests/sp03/sp03.adb
+++ b/testsuites/ada/sptests/sp03/sp03.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp03/sptest.adb b/testsuites/ada/sptests/sp03/sptest.adb
index 1a05b51721..8a25c554c7 100644
--- a/testsuites/ada/sptests/sp03/sptest.adb
+++ b/testsuites/ada/sptests/sp03/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp03/sptest.ads b/testsuites/ada/sptests/sp03/sptest.ads
index 60a2531ba1..b6c6c8eeb7 100644
--- a/testsuites/ada/sptests/sp03/sptest.ads
+++ b/testsuites/ada/sptests/sp03/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp04/init.c b/testsuites/ada/sptests/sp04/init.c
index c55a103b9a..125efaa8c1 100644
--- a/testsuites/ada/sptests/sp04/init.c
+++ b/testsuites/ada/sptests/sp04/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp04/sp04.adb b/testsuites/ada/sptests/sp04/sp04.adb
index 9d91593b36..48ca059ea4 100644
--- a/testsuites/ada/sptests/sp04/sp04.adb
+++ b/testsuites/ada/sptests/sp04/sp04.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp04/sptest.adb b/testsuites/ada/sptests/sp04/sptest.adb
index 3fcaad18b3..ad06d53cbc 100644
--- a/testsuites/ada/sptests/sp04/sptest.adb
+++ b/testsuites/ada/sptests/sp04/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp04/sptest.ads b/testsuites/ada/sptests/sp04/sptest.ads
index 7033eb5006..5cfffdfa28 100644
--- a/testsuites/ada/sptests/sp04/sptest.ads
+++ b/testsuites/ada/sptests/sp04/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp05/init.c b/testsuites/ada/sptests/sp05/init.c
index 048edae1e8..6b8af28cf9 100644
--- a/testsuites/ada/sptests/sp05/init.c
+++ b/testsuites/ada/sptests/sp05/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp05/sp05.adb b/testsuites/ada/sptests/sp05/sp05.adb
index 842657a699..ff362fb2c4 100644
--- a/testsuites/ada/sptests/sp05/sp05.adb
+++ b/testsuites/ada/sptests/sp05/sp05.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp05/sptest.adb b/testsuites/ada/sptests/sp05/sptest.adb
index 00e41e255d..0d9d667346 100644
--- a/testsuites/ada/sptests/sp05/sptest.adb
+++ b/testsuites/ada/sptests/sp05/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp05/sptest.ads b/testsuites/ada/sptests/sp05/sptest.ads
index 9fe136ec8b..09ebea933f 100644
--- a/testsuites/ada/sptests/sp05/sptest.ads
+++ b/testsuites/ada/sptests/sp05/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp06/init.c b/testsuites/ada/sptests/sp06/init.c
index b37a6a4084..a9d68e488d 100644
--- a/testsuites/ada/sptests/sp06/init.c
+++ b/testsuites/ada/sptests/sp06/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp06/sp06.adb b/testsuites/ada/sptests/sp06/sp06.adb
index 4caba9ae73..9e24819e1a 100644
--- a/testsuites/ada/sptests/sp06/sp06.adb
+++ b/testsuites/ada/sptests/sp06/sp06.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp06/sptest.adb b/testsuites/ada/sptests/sp06/sptest.adb
index b3acf7b006..ebd41d7ce0 100644
--- a/testsuites/ada/sptests/sp06/sptest.adb
+++ b/testsuites/ada/sptests/sp06/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp06/sptest.ads b/testsuites/ada/sptests/sp06/sptest.ads
index 29fa897210..b6dc28dca6 100644
--- a/testsuites/ada/sptests/sp06/sptest.ads
+++ b/testsuites/ada/sptests/sp06/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp07/init.c b/testsuites/ada/sptests/sp07/init.c
index c47213ef68..3c251d0250 100644
--- a/testsuites/ada/sptests/sp07/init.c
+++ b/testsuites/ada/sptests/sp07/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp07/sp07.adb b/testsuites/ada/sptests/sp07/sp07.adb
index 177de946b8..d287ea20f4 100644
--- a/testsuites/ada/sptests/sp07/sp07.adb
+++ b/testsuites/ada/sptests/sp07/sp07.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp07/sptest.adb b/testsuites/ada/sptests/sp07/sptest.adb
index 2ab9cf641b..3cf46542bf 100644
--- a/testsuites/ada/sptests/sp07/sptest.adb
+++ b/testsuites/ada/sptests/sp07/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp07/sptest.ads b/testsuites/ada/sptests/sp07/sptest.ads
index c04b450444..ec2070194d 100644
--- a/testsuites/ada/sptests/sp07/sptest.ads
+++ b/testsuites/ada/sptests/sp07/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp08/init.c b/testsuites/ada/sptests/sp08/init.c
index 328e3eef78..26962dddca 100644
--- a/testsuites/ada/sptests/sp08/init.c
+++ b/testsuites/ada/sptests/sp08/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp08/sp08.adb b/testsuites/ada/sptests/sp08/sp08.adb
index f881ad4e71..4217b1b75e 100644
--- a/testsuites/ada/sptests/sp08/sp08.adb
+++ b/testsuites/ada/sptests/sp08/sp08.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp08/sptest.adb b/testsuites/ada/sptests/sp08/sptest.adb
index 2a2e994e73..2bc0fe8654 100644
--- a/testsuites/ada/sptests/sp08/sptest.adb
+++ b/testsuites/ada/sptests/sp08/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp08/sptest.ads b/testsuites/ada/sptests/sp08/sptest.ads
index 09e9f8383f..ffe8387b21 100644
--- a/testsuites/ada/sptests/sp08/sptest.ads
+++ b/testsuites/ada/sptests/sp08/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp09/init.c b/testsuites/ada/sptests/sp09/init.c
index 534dccd25a..ba5449ce5b 100644
--- a/testsuites/ada/sptests/sp09/init.c
+++ b/testsuites/ada/sptests/sp09/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp09/sp09.adb b/testsuites/ada/sptests/sp09/sp09.adb
index de3a8a91a0..315b36299d 100644
--- a/testsuites/ada/sptests/sp09/sp09.adb
+++ b/testsuites/ada/sptests/sp09/sp09.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp09/sptest.adb b/testsuites/ada/sptests/sp09/sptest.adb
index 7ebb67b54e..fa6aafb349 100644
--- a/testsuites/ada/sptests/sp09/sptest.adb
+++ b/testsuites/ada/sptests/sp09/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
@@ -2576,21 +2595,15 @@ package body SPTEST is
TIME := ( 2100, 12, 31, 23, 59, 59, 0 );
RTEMS.CLOCK.SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET SUCCESSFUL" );
- TEST_SUPPORT.PRINT_TIME(
- "TA1 - clock_set - ",
- TIME,
- " - SUCCESSFUL"
+ TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
+ STATUS,
+ RTEMS.INVALID_CLOCK,
+ "CLOCK_SET WITH INVALID YEAR"
);
- TEXT_IO.NEW_LINE;
- RTEMS.TASKS.WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
- RTEMS.CLOCK.GET_TOD( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET_TOD" );
TEST_SUPPORT.PRINT_TIME(
- "TA1 - clock_get - ",
+ "TA1 - clock_set - ",
TIME,
- " - SUCCESSFUL"
+ " - INVALID_CLOCK"
);
TEXT_IO.NEW_LINE;
diff --git a/testsuites/ada/sptests/sp09/sptest.ads b/testsuites/ada/sptests/sp09/sptest.ads
index 7191dd59ce..371a33b3d5 100644
--- a/testsuites/ada/sptests/sp09/sptest.ads
+++ b/testsuites/ada/sptests/sp09/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp11/init.c b/testsuites/ada/sptests/sp11/init.c
index edd86bc77e..9f5ddd9132 100644
--- a/testsuites/ada/sptests/sp11/init.c
+++ b/testsuites/ada/sptests/sp11/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp11/sp11.adb b/testsuites/ada/sptests/sp11/sp11.adb
index b39fd4b2be..e0d22c07a7 100644
--- a/testsuites/ada/sptests/sp11/sp11.adb
+++ b/testsuites/ada/sptests/sp11/sp11.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp11/sptest.adb b/testsuites/ada/sptests/sp11/sptest.adb
index fa6e139367..18782675d8 100644
--- a/testsuites/ada/sptests/sp11/sptest.adb
+++ b/testsuites/ada/sptests/sp11/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp11/sptest.ads b/testsuites/ada/sptests/sp11/sptest.ads
index b7f03b8f4c..3cbce1bbf2 100644
--- a/testsuites/ada/sptests/sp11/sptest.ads
+++ b/testsuites/ada/sptests/sp11/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp12/init.c b/testsuites/ada/sptests/sp12/init.c
index 4dc8aad2b4..3537e9a8b1 100644
--- a/testsuites/ada/sptests/sp12/init.c
+++ b/testsuites/ada/sptests/sp12/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp12/sp12.adb b/testsuites/ada/sptests/sp12/sp12.adb
index 08a39a869b..ec75d0c98d 100644
--- a/testsuites/ada/sptests/sp12/sp12.adb
+++ b/testsuites/ada/sptests/sp12/sp12.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with Interfaces; use Interfaces;
diff --git a/testsuites/ada/sptests/sp12/sptest.adb b/testsuites/ada/sptests/sp12/sptest.adb
index a1391ab01d..b9826528a3 100644
--- a/testsuites/ada/sptests/sp12/sptest.adb
+++ b/testsuites/ada/sptests/sp12/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp12/sptest.ads b/testsuites/ada/sptests/sp12/sptest.ads
index 663faa7686..d7c275544c 100644
--- a/testsuites/ada/sptests/sp12/sptest.ads
+++ b/testsuites/ada/sptests/sp12/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp13/init.c b/testsuites/ada/sptests/sp13/init.c
index 13f9fc2c0f..66de03187f 100644
--- a/testsuites/ada/sptests/sp13/init.c
+++ b/testsuites/ada/sptests/sp13/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp13/sp13.adb b/testsuites/ada/sptests/sp13/sp13.adb
index 503e8fb989..8904d568c2 100644
--- a/testsuites/ada/sptests/sp13/sp13.adb
+++ b/testsuites/ada/sptests/sp13/sp13.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp13/sptest.adb b/testsuites/ada/sptests/sp13/sptest.adb
index 7621af6252..7b73c5caca 100644
--- a/testsuites/ada/sptests/sp13/sptest.adb
+++ b/testsuites/ada/sptests/sp13/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp13/sptest.ads b/testsuites/ada/sptests/sp13/sptest.ads
index 9b92b3ba61..938ef1f2c5 100644
--- a/testsuites/ada/sptests/sp13/sptest.ads
+++ b/testsuites/ada/sptests/sp13/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp14/init.c b/testsuites/ada/sptests/sp14/init.c
index 076e3d9763..4ecb75378c 100644
--- a/testsuites/ada/sptests/sp14/init.c
+++ b/testsuites/ada/sptests/sp14/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp14/sp14.adb b/testsuites/ada/sptests/sp14/sp14.adb
index 2149694ecc..4426637396 100644
--- a/testsuites/ada/sptests/sp14/sp14.adb
+++ b/testsuites/ada/sptests/sp14/sp14.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp14/sptest.adb b/testsuites/ada/sptests/sp14/sptest.adb
index 15239e30b4..92c9c74384 100644
--- a/testsuites/ada/sptests/sp14/sptest.adb
+++ b/testsuites/ada/sptests/sp14/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with ADDRESS_IO;
diff --git a/testsuites/ada/sptests/sp14/sptest.ads b/testsuites/ada/sptests/sp14/sptest.ads
index ecf6f93dff..95abe5fb8b 100644
--- a/testsuites/ada/sptests/sp14/sptest.ads
+++ b/testsuites/ada/sptests/sp14/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp15/init.c b/testsuites/ada/sptests/sp15/init.c
index 6b1b1f323b..b5d1670b24 100644
--- a/testsuites/ada/sptests/sp15/init.c
+++ b/testsuites/ada/sptests/sp15/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp15/sp15.adb b/testsuites/ada/sptests/sp15/sp15.adb
index 77e8f27144..54b19b466d 100644
--- a/testsuites/ada/sptests/sp15/sp15.adb
+++ b/testsuites/ada/sptests/sp15/sp15.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp15/sptest.adb b/testsuites/ada/sptests/sp15/sptest.adb
index 8f83defedf..b9c8cd3781 100644
--- a/testsuites/ada/sptests/sp15/sptest.adb
+++ b/testsuites/ada/sptests/sp15/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with TEST_SUPPORT;
diff --git a/testsuites/ada/sptests/sp15/sptest.ads b/testsuites/ada/sptests/sp15/sptest.ads
index 5af0e61503..17b3066580 100644
--- a/testsuites/ada/sptests/sp15/sptest.ads
+++ b/testsuites/ada/sptests/sp15/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp16/init.c b/testsuites/ada/sptests/sp16/init.c
index c0a75da20e..09c46169d8 100644
--- a/testsuites/ada/sptests/sp16/init.c
+++ b/testsuites/ada/sptests/sp16/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp16/sp16.adb b/testsuites/ada/sptests/sp16/sp16.adb
index 4280c67665..2906cf4e30 100644
--- a/testsuites/ada/sptests/sp16/sp16.adb
+++ b/testsuites/ada/sptests/sp16/sp16.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp16/sptest.adb b/testsuites/ada/sptests/sp16/sptest.adb
index 44d65badfc..71df0fe457 100644
--- a/testsuites/ada/sptests/sp16/sptest.adb
+++ b/testsuites/ada/sptests/sp16/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp16/sptest.ads b/testsuites/ada/sptests/sp16/sptest.ads
index 7f028a0274..8c8e0719b9 100644
--- a/testsuites/ada/sptests/sp16/sptest.ads
+++ b/testsuites/ada/sptests/sp16/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp17/init.c b/testsuites/ada/sptests/sp17/init.c
index 7dfd620d77..e66e750d0a 100644
--- a/testsuites/ada/sptests/sp17/init.c
+++ b/testsuites/ada/sptests/sp17/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp17/sp17.adb b/testsuites/ada/sptests/sp17/sp17.adb
index 5c06ef0b44..4b8f5a3d9d 100644
--- a/testsuites/ada/sptests/sp17/sp17.adb
+++ b/testsuites/ada/sptests/sp17/sp17.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp17/sptest.adb b/testsuites/ada/sptests/sp17/sptest.adb
index 880f5db4a7..1b0cfcc8bf 100644
--- a/testsuites/ada/sptests/sp17/sptest.adb
+++ b/testsuites/ada/sptests/sp17/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp17/sptest.ads b/testsuites/ada/sptests/sp17/sptest.ads
index 428114c9a0..f691507e8e 100644
--- a/testsuites/ada/sptests/sp17/sptest.ads
+++ b/testsuites/ada/sptests/sp17/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp19/init.c b/testsuites/ada/sptests/sp19/init.c
index 2d0d5b39f2..907a9134b9 100644
--- a/testsuites/ada/sptests/sp19/init.c
+++ b/testsuites/ada/sptests/sp19/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp19/sp19.adb b/testsuites/ada/sptests/sp19/sp19.adb
index f2cfddb97a..91f76cf7c5 100644
--- a/testsuites/ada/sptests/sp19/sp19.adb
+++ b/testsuites/ada/sptests/sp19/sp19.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp19/sptest.adb b/testsuites/ada/sptests/sp19/sptest.adb
index 7e508512bd..082438f77f 100644
--- a/testsuites/ada/sptests/sp19/sptest.adb
+++ b/testsuites/ada/sptests/sp19/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -38,9 +40,26 @@ with RTEMS.CLOCK;
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
-- private definitions for macro use
@@ -73,9 +92,26 @@ with RTEMS.CLOCK;
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
-- private definitions for macro use
diff --git a/testsuites/ada/sptests/sp19/sptest.ads b/testsuites/ada/sptests/sp19/sptest.ads
index 3befd7cc3a..0220e4b19d 100644
--- a/testsuites/ada/sptests/sp19/sptest.ads
+++ b/testsuites/ada/sptests/sp19/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp20/init.c b/testsuites/ada/sptests/sp20/init.c
index 7146c3f3da..7efcfad7e6 100644
--- a/testsuites/ada/sptests/sp20/init.c
+++ b/testsuites/ada/sptests/sp20/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp20/sp20.adb b/testsuites/ada/sptests/sp20/sp20.adb
index 898b96c119..3e6b64b2d3 100644
--- a/testsuites/ada/sptests/sp20/sp20.adb
+++ b/testsuites/ada/sptests/sp20/sp20.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp20/sptest.adb b/testsuites/ada/sptests/sp20/sptest.adb
index e5ad87295c..4efdc56ac0 100644
--- a/testsuites/ada/sptests/sp20/sptest.adb
+++ b/testsuites/ada/sptests/sp20/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp20/sptest.ads b/testsuites/ada/sptests/sp20/sptest.ads
index 384cc1dac5..cc3e844f27 100644
--- a/testsuites/ada/sptests/sp20/sptest.ads
+++ b/testsuites/ada/sptests/sp20/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp22/init.c b/testsuites/ada/sptests/sp22/init.c
index 6ebc1b99c3..a351fa166b 100644
--- a/testsuites/ada/sptests/sp22/init.c
+++ b/testsuites/ada/sptests/sp22/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp22/sp22.adb b/testsuites/ada/sptests/sp22/sp22.adb
index 842bc7338e..b911049ea6 100644
--- a/testsuites/ada/sptests/sp22/sp22.adb
+++ b/testsuites/ada/sptests/sp22/sp22.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp22/sptest.adb b/testsuites/ada/sptests/sp22/sptest.adb
index 3cf4baa2bd..3e5a08d4dc 100644
--- a/testsuites/ada/sptests/sp22/sptest.adb
+++ b/testsuites/ada/sptests/sp22/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp22/sptest.ads b/testsuites/ada/sptests/sp22/sptest.ads
index af312fafb8..07051cf55f 100644
--- a/testsuites/ada/sptests/sp22/sptest.ads
+++ b/testsuites/ada/sptests/sp22/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp23/init.c b/testsuites/ada/sptests/sp23/init.c
index 76e5f7b883..875266c605 100644
--- a/testsuites/ada/sptests/sp23/init.c
+++ b/testsuites/ada/sptests/sp23/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp23/sp23.adb b/testsuites/ada/sptests/sp23/sp23.adb
index 5a6a728e1d..23583a1148 100644
--- a/testsuites/ada/sptests/sp23/sp23.adb
+++ b/testsuites/ada/sptests/sp23/sp23.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp23/sptest.adb b/testsuites/ada/sptests/sp23/sptest.adb
index 4e88421ec7..50ca707b20 100644
--- a/testsuites/ada/sptests/sp23/sptest.adb
+++ b/testsuites/ada/sptests/sp23/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with ADDRESS_IO;
diff --git a/testsuites/ada/sptests/sp23/sptest.ads b/testsuites/ada/sptests/sp23/sptest.ads
index b5faf7b87a..4af4737b42 100644
--- a/testsuites/ada/sptests/sp23/sptest.ads
+++ b/testsuites/ada/sptests/sp23/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp24/init.c b/testsuites/ada/sptests/sp24/init.c
index 3989b42113..c93d2e3a77 100644
--- a/testsuites/ada/sptests/sp24/init.c
+++ b/testsuites/ada/sptests/sp24/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp24/sp24.adb b/testsuites/ada/sptests/sp24/sp24.adb
index e56802640b..58fcddbd62 100644
--- a/testsuites/ada/sptests/sp24/sp24.adb
+++ b/testsuites/ada/sptests/sp24/sp24.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp24/sptest.adb b/testsuites/ada/sptests/sp24/sptest.adb
index af255e4d73..803fc46039 100644
--- a/testsuites/ada/sptests/sp24/sptest.adb
+++ b/testsuites/ada/sptests/sp24/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/sptests/sp24/sptest.ads b/testsuites/ada/sptests/sp24/sptest.ads
index 166ee812b3..1a31c139a0 100644
--- a/testsuites/ada/sptests/sp24/sptest.ads
+++ b/testsuites/ada/sptests/sp24/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp25/init.c b/testsuites/ada/sptests/sp25/init.c
index 8004204cfd..bc8c3c1150 100644
--- a/testsuites/ada/sptests/sp25/init.c
+++ b/testsuites/ada/sptests/sp25/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/sp25/sp25.adb b/testsuites/ada/sptests/sp25/sp25.adb
index 00db138fa9..623bcb7f47 100644
--- a/testsuites/ada/sptests/sp25/sp25.adb
+++ b/testsuites/ada/sptests/sp25/sp25.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/sp25/sptest.adb b/testsuites/ada/sptests/sp25/sptest.adb
index 1fff4c0cdb..d3d13ee7e0 100644
--- a/testsuites/ada/sptests/sp25/sptest.adb
+++ b/testsuites/ada/sptests/sp25/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with TEST_SUPPORT;
diff --git a/testsuites/ada/sptests/sp25/sptest.ads b/testsuites/ada/sptests/sp25/sptest.ads
index 21c27a38db..d54d03d8e4 100644
--- a/testsuites/ada/sptests/sp25/sptest.ads
+++ b/testsuites/ada/sptests/sp25/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/spatcb01/init.c b/testsuites/ada/sptests/spatcb01/init.c
index 38c5fc519a..401090ddd9 100644
--- a/testsuites/ada/sptests/spatcb01/init.c
+++ b/testsuites/ada/sptests/spatcb01/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017 embedded brains GmbH
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
diff --git a/testsuites/ada/sptests/spatcb01/spatcb01.adb b/testsuites/ada/sptests/spatcb01/spatcb01.adb
index 810446f871..19af70e232 100644
--- a/testsuites/ada/sptests/spatcb01/spatcb01.adb
+++ b/testsuites/ada/sptests/spatcb01/spatcb01.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -6,11 +8,28 @@
-- Ensure that the SYSTEM.TASK_PRIMITIVES.OPERATIONS.SPECIFIC implementation
-- works.
--
--- Copyright (c) 2017 embedded brains GmbH
+-- Copyright (c) 2017 embedded brains GmbH & Co. KG
+--
+-- 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.
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with TEXT_IO;
diff --git a/testsuites/ada/sptests/spname01/init.c b/testsuites/ada/sptests/spname01/init.c
index 334b6ca2f6..d07040c2d0 100644
--- a/testsuites/ada/sptests/spname01/init.c
+++ b/testsuites/ada/sptests/spname01/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/ada/sptests/spname01/spname01.adb b/testsuites/ada/sptests/spname01/spname01.adb
index 6c39c329de..53862ea260 100644
--- a/testsuites/ada/sptests/spname01/spname01.adb
+++ b/testsuites/ada/sptests/spname01/spname01.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2009.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with SPTEST;
diff --git a/testsuites/ada/sptests/spname01/sptest.adb b/testsuites/ada/sptests/spname01/sptest.adb
index 5d99ed92e5..6c89da1625 100644
--- a/testsuites/ada/sptests/spname01/sptest.adb
+++ b/testsuites/ada/sptests/spname01/sptest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2009.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/sptests/spname01/sptest.ads b/testsuites/ada/sptests/spname01/sptest.ads
index 179517d98c..668f68bf49 100644
--- a/testsuites/ada/sptests/spname01/sptest.ads
+++ b/testsuites/ada/sptests/spname01/sptest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- SPTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2009.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
package SPTEST is
diff --git a/testsuites/ada/support/address_io.adb b/testsuites/ada/support/address_io.adb
index f549f57ffe..1c09e95496 100644
--- a/testsuites/ada/support/address_io.adb
+++ b/testsuites/ada/support/address_io.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- Address_IO / Specification
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2009.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with System.Storage_Elements;
diff --git a/testsuites/ada/support/address_io.ads b/testsuites/ada/support/address_io.ads
index 8a4fce98d3..03dc0d1955 100644
--- a/testsuites/ada/support/address_io.ads
+++ b/testsuites/ada/support/address_io.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- ADDRESS_IO / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with System;
diff --git a/testsuites/ada/support/float_io.ads b/testsuites/ada/support/float_io.ads
index 5e1a90bf92..c052dca1ba 100644
--- a/testsuites/ada/support/float_io.ads
+++ b/testsuites/ada/support/float_io.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- Float_IO / Specification
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with Text_IO;
diff --git a/testsuites/ada/support/fp.inc b/testsuites/ada/support/fp.inc
index eb6f5528a9..108265fa94 100644
--- a/testsuites/ada/support/fp.inc
+++ b/testsuites/ada/support/fp.inc
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- fp.inc
--
@@ -15,9 +17,26 @@
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
-- private definitions for macro use
diff --git a/testsuites/ada/support/integer.inc b/testsuites/ada/support/integer.inc
index c47f68efd4..80d1aba695 100644
--- a/testsuites/ada/support/integer.inc
+++ b/testsuites/ada/support/integer.inc
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- integer.inc
--
@@ -9,9 +11,26 @@
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
-- private definitions for macro use
diff --git a/testsuites/ada/support/rtems_calling_overhead.ads b/testsuites/ada/support/rtems_calling_overhead.ads
index 5f94e0505a..93180b61a8 100644
--- a/testsuites/ada/support/rtems_calling_overhead.ads
+++ b/testsuites/ada/support/rtems_calling_overhead.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- RTEMS_CALLING_OVERHEAD / SPECIFICATION
--
@@ -15,9 +17,26 @@
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/support/status_io.ads b/testsuites/ada/support/status_io.ads
index 301e7a2ba1..882b09a1dc 100644
--- a/testsuites/ada/support/status_io.ads
+++ b/testsuites/ada/support/status_io.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- Status_IO / Specification
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/support/test_support.adb b/testsuites/ada/support/test_support.adb
index 6a46b427ce..661d30a896 100644
--- a/testsuites/ada/support/test_support.adb
+++ b/testsuites/ada/support/test_support.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- Test_Support / Specification
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with Interfaces; use Interfaces;
diff --git a/testsuites/ada/support/test_support.ads b/testsuites/ada/support/test_support.ads
index a15574782e..a6a2c5a460 100644
--- a/testsuites/ada/support/test_support.ads
+++ b/testsuites/ada/support/test_support.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- Test_Support / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2009.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/support/time_test_support.adb b/testsuites/ada/support/time_test_support.adb
index aab0c75dfe..8bc0daf756 100644
--- a/testsuites/ada/support/time_test_support.adb
+++ b/testsuites/ada/support/time_test_support.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TIME_TEST_SUPPORT / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2009.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/support/time_test_support.ads b/testsuites/ada/support/time_test_support.ads
index aeed677ba2..482238c3ca 100644
--- a/testsuites/ada/support/time_test_support.ads
+++ b/testsuites/ada/support/time_test_support.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TIME_TEST_SUPPORT / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/support/timer_driver.adb b/testsuites/ada/support/timer_driver.adb
index 389499ccc8..eff958a5c7 100644
--- a/testsuites/ada/support/timer_driver.adb
+++ b/testsuites/ada/support/timer_driver.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- Timer_Driver / Body
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2009.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with Interfaces;
diff --git a/testsuites/ada/support/timer_driver.ads b/testsuites/ada/support/timer_driver.ads
index 00642dfe90..6919fcfeb7 100644
--- a/testsuites/ada/support/timer_driver.ads
+++ b/testsuites/ada/support/timer_driver.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- Timer_Driver / Specification
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/support/unsigned32_io.ads b/testsuites/ada/support/unsigned32_io.ads
index 4d1a7e6e87..63f267a8a8 100644
--- a/testsuites/ada/support/unsigned32_io.ads
+++ b/testsuites/ada/support/unsigned32_io.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- Unsigned32_IO / Specification
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm01/init.c b/testsuites/ada/tmtests/tm01/init.c
index 8f2fb49790..3154b15062 100644
--- a/testsuites/ada/tmtests/tm01/init.c
+++ b/testsuites/ada/tmtests/tm01/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 1"
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm01/tm01.adb b/testsuites/ada/tmtests/tm01/tm01.adb
index 47c83a17e0..42a20dfed1 100644
--- a/testsuites/ada/tmtests/tm01/tm01.adb
+++ b/testsuites/ada/tmtests/tm01/tm01.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm01/tmtest.adb b/testsuites/ada/tmtests/tm01/tmtest.adb
index 4f48668cf0..485cca38a8 100644
--- a/testsuites/ada/tmtests/tm01/tmtest.adb
+++ b/testsuites/ada/tmtests/tm01/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm01/tmtest.ads b/testsuites/ada/tmtests/tm01/tmtest.ads
index 6d00d05715..c174131b62 100644
--- a/testsuites/ada/tmtests/tm01/tmtest.ads
+++ b/testsuites/ada/tmtests/tm01/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm02/init.c b/testsuites/ada/tmtests/tm02/init.c
index d8123f0452..f393301465 100644
--- a/testsuites/ada/tmtests/tm02/init.c
+++ b/testsuites/ada/tmtests/tm02/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -23,7 +42,6 @@
#define ADA_TEST_NAME "ADA TM 2"
#define CONFIGURE_MAXIMUM_TIMERS 110
#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm02/tm02.adb b/testsuites/ada/tmtests/tm02/tm02.adb
index 9476c87878..4ade119161 100644
--- a/testsuites/ada/tmtests/tm02/tm02.adb
+++ b/testsuites/ada/tmtests/tm02/tm02.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm02/tmtest.adb b/testsuites/ada/tmtests/tm02/tmtest.adb
index c2386a5f51..ca1ae1302c 100644
--- a/testsuites/ada/tmtests/tm02/tmtest.adb
+++ b/testsuites/ada/tmtests/tm02/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm02/tmtest.ads b/testsuites/ada/tmtests/tm02/tmtest.ads
index 0857c93313..be4e50ed6f 100644
--- a/testsuites/ada/tmtests/tm02/tmtest.ads
+++ b/testsuites/ada/tmtests/tm02/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm03/init.c b/testsuites/ada/tmtests/tm03/init.c
index 439c8ca168..5db2cc861e 100644
--- a/testsuites/ada/tmtests/tm03/init.c
+++ b/testsuites/ada/tmtests/tm03/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -23,7 +42,6 @@
#define ADA_TEST_NAME "ADA TM 3"
#define CONFIGURE_MAXIMUM_TIMERS 110
#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm03/tm03.adb b/testsuites/ada/tmtests/tm03/tm03.adb
index 9a95e5e1d0..4912f066d1 100644
--- a/testsuites/ada/tmtests/tm03/tm03.adb
+++ b/testsuites/ada/tmtests/tm03/tm03.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm03/tmtest.adb b/testsuites/ada/tmtests/tm03/tmtest.adb
index 577b5fd121..febc7f665d 100644
--- a/testsuites/ada/tmtests/tm03/tmtest.adb
+++ b/testsuites/ada/tmtests/tm03/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm03/tmtest.ads b/testsuites/ada/tmtests/tm03/tmtest.ads
index 4acd5f7a77..8cc5b39ca0 100644
--- a/testsuites/ada/tmtests/tm03/tmtest.ads
+++ b/testsuites/ada/tmtests/tm03/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm04/init.c b/testsuites/ada/tmtests/tm04/init.c
index 2cf05da2e1..2f4312d1f9 100644
--- a/testsuites/ada/tmtests/tm04/init.c
+++ b/testsuites/ada/tmtests/tm04/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 4"
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm04/tm04.adb b/testsuites/ada/tmtests/tm04/tm04.adb
index 28e75c7db5..2aab521514 100644
--- a/testsuites/ada/tmtests/tm04/tm04.adb
+++ b/testsuites/ada/tmtests/tm04/tm04.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm04/tmtest.adb b/testsuites/ada/tmtests/tm04/tmtest.adb
index 30ab443668..65b1af1dab 100644
--- a/testsuites/ada/tmtests/tm04/tmtest.adb
+++ b/testsuites/ada/tmtests/tm04/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm04/tmtest.ads b/testsuites/ada/tmtests/tm04/tmtest.ads
index e1f303ee2f..5842225751 100644
--- a/testsuites/ada/tmtests/tm04/tmtest.ads
+++ b/testsuites/ada/tmtests/tm04/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with TIME_TEST_SUPPORT;
diff --git a/testsuites/ada/tmtests/tm05/init.c b/testsuites/ada/tmtests/tm05/init.c
index 7fb0f854ee..206e20af07 100644
--- a/testsuites/ada/tmtests/tm05/init.c
+++ b/testsuites/ada/tmtests/tm05/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -23,7 +42,6 @@
#define ADA_TEST_NAME "ADA TM 5"
#define CONFIGURE_MAXIMUM_TIMERS 110
#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm05/tm05.adb b/testsuites/ada/tmtests/tm05/tm05.adb
index eaa0741592..458a798365 100644
--- a/testsuites/ada/tmtests/tm05/tm05.adb
+++ b/testsuites/ada/tmtests/tm05/tm05.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm05/tmtest.adb b/testsuites/ada/tmtests/tm05/tmtest.adb
index 46362e752a..343408f207 100644
--- a/testsuites/ada/tmtests/tm05/tmtest.adb
+++ b/testsuites/ada/tmtests/tm05/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm05/tmtest.ads b/testsuites/ada/tmtests/tm05/tmtest.ads
index f705c936df..a3c8a09393 100644
--- a/testsuites/ada/tmtests/tm05/tmtest.ads
+++ b/testsuites/ada/tmtests/tm05/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with TIME_TEST_SUPPORT;
diff --git a/testsuites/ada/tmtests/tm06/init.c b/testsuites/ada/tmtests/tm06/init.c
index 88f27f6b2f..42c701d01a 100644
--- a/testsuites/ada/tmtests/tm06/init.c
+++ b/testsuites/ada/tmtests/tm06/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -23,7 +42,6 @@
#define ADA_TEST_NAME "ADA TM 6"
#define CONFIGURE_MAXIMUM_TIMERS 110
#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm06/tm06.adb b/testsuites/ada/tmtests/tm06/tm06.adb
index db064adb4d..dfe85f9f36 100644
--- a/testsuites/ada/tmtests/tm06/tm06.adb
+++ b/testsuites/ada/tmtests/tm06/tm06.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm06/tmtest.adb b/testsuites/ada/tmtests/tm06/tmtest.adb
index fc43355645..ccebbf71b2 100644
--- a/testsuites/ada/tmtests/tm06/tmtest.adb
+++ b/testsuites/ada/tmtests/tm06/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm06/tmtest.ads b/testsuites/ada/tmtests/tm06/tmtest.ads
index a6eb2b2df8..11e9f78f5c 100644
--- a/testsuites/ada/tmtests/tm06/tmtest.ads
+++ b/testsuites/ada/tmtests/tm06/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with TIME_TEST_SUPPORT;
diff --git a/testsuites/ada/tmtests/tm07/init.c b/testsuites/ada/tmtests/tm07/init.c
index dcbf73a3ae..582d4f2a77 100644
--- a/testsuites/ada/tmtests/tm07/init.c
+++ b/testsuites/ada/tmtests/tm07/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -23,7 +42,6 @@
#define ADA_TEST_NAME "ADA TM 7"
#define CONFIGURE_MAXIMUM_TIMERS 110
#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm07/tm07.adb b/testsuites/ada/tmtests/tm07/tm07.adb
index 342406b38f..16b1530d30 100644
--- a/testsuites/ada/tmtests/tm07/tm07.adb
+++ b/testsuites/ada/tmtests/tm07/tm07.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm07/tmtest.adb b/testsuites/ada/tmtests/tm07/tmtest.adb
index 4f2f4abdbd..6b46f10e96 100644
--- a/testsuites/ada/tmtests/tm07/tmtest.adb
+++ b/testsuites/ada/tmtests/tm07/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm07/tmtest.ads b/testsuites/ada/tmtests/tm07/tmtest.ads
index 3abc539505..7c2155ab13 100644
--- a/testsuites/ada/tmtests/tm07/tmtest.ads
+++ b/testsuites/ada/tmtests/tm07/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with TIME_TEST_SUPPORT;
diff --git a/testsuites/ada/tmtests/tm08/init.c b/testsuites/ada/tmtests/tm08/init.c
index ded1a2e130..4f8baa894c 100644
--- a/testsuites/ada/tmtests/tm08/init.c
+++ b/testsuites/ada/tmtests/tm08/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -23,7 +42,6 @@
#define ADA_TEST_NAME "ADA TM 8"
#define CONFIGURE_MAXIMUM_TIMERS 110
#define CONFIGURE_MAXIMUM_SEMAPHORES 101
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm08/tm08.adb b/testsuites/ada/tmtests/tm08/tm08.adb
index d927a18d63..84695749d3 100644
--- a/testsuites/ada/tmtests/tm08/tm08.adb
+++ b/testsuites/ada/tmtests/tm08/tm08.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm08/tmtest.adb b/testsuites/ada/tmtests/tm08/tmtest.adb
index 9f14c9383a..067d212930 100644
--- a/testsuites/ada/tmtests/tm08/tmtest.adb
+++ b/testsuites/ada/tmtests/tm08/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm08/tmtest.ads b/testsuites/ada/tmtests/tm08/tmtest.ads
index 695235f479..34ca6a50cd 100644
--- a/testsuites/ada/tmtests/tm08/tmtest.ads
+++ b/testsuites/ada/tmtests/tm08/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm09/init.c b/testsuites/ada/tmtests/tm09/init.c
index 0db14c4815..6e881dde7c 100644
--- a/testsuites/ada/tmtests/tm09/init.c
+++ b/testsuites/ada/tmtests/tm09/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 9"
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm09/tm09.adb b/testsuites/ada/tmtests/tm09/tm09.adb
index 6fe1971d44..fd3c8f7b14 100644
--- a/testsuites/ada/tmtests/tm09/tm09.adb
+++ b/testsuites/ada/tmtests/tm09/tm09.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm09/tmtest.adb b/testsuites/ada/tmtests/tm09/tmtest.adb
index 88c016364b..69a17fd399 100644
--- a/testsuites/ada/tmtests/tm09/tmtest.adb
+++ b/testsuites/ada/tmtests/tm09/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm09/tmtest.ads b/testsuites/ada/tmtests/tm09/tmtest.ads
index ca02e74a51..e65360a12d 100644
--- a/testsuites/ada/tmtests/tm09/tmtest.ads
+++ b/testsuites/ada/tmtests/tm09/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm10/init.c b/testsuites/ada/tmtests/tm10/init.c
index 3c3c5261b5..dad2ddbe21 100644
--- a/testsuites/ada/tmtests/tm10/init.c
+++ b/testsuites/ada/tmtests/tm10/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 10"
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm10/tm10.adb b/testsuites/ada/tmtests/tm10/tm10.adb
index 4117d7a01a..4076083ec6 100644
--- a/testsuites/ada/tmtests/tm10/tm10.adb
+++ b/testsuites/ada/tmtests/tm10/tm10.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm10/tmtest.adb b/testsuites/ada/tmtests/tm10/tmtest.adb
index 54836fb77d..ec5be849a1 100644
--- a/testsuites/ada/tmtests/tm10/tmtest.adb
+++ b/testsuites/ada/tmtests/tm10/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm10/tmtest.ads b/testsuites/ada/tmtests/tm10/tmtest.ads
index 224630e1d5..df9e8617d8 100644
--- a/testsuites/ada/tmtests/tm10/tmtest.ads
+++ b/testsuites/ada/tmtests/tm10/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm11/init.c b/testsuites/ada/tmtests/tm11/init.c
index 93f4e1d1e4..588f315dc2 100644
--- a/testsuites/ada/tmtests/tm11/init.c
+++ b/testsuites/ada/tmtests/tm11/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 11"
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm11/tm11.adb b/testsuites/ada/tmtests/tm11/tm11.adb
index bcc91aa905..6b6427f0d9 100644
--- a/testsuites/ada/tmtests/tm11/tm11.adb
+++ b/testsuites/ada/tmtests/tm11/tm11.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm11/tmtest.adb b/testsuites/ada/tmtests/tm11/tmtest.adb
index 82ab9da4f1..08c61652b8 100644
--- a/testsuites/ada/tmtests/tm11/tmtest.adb
+++ b/testsuites/ada/tmtests/tm11/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm11/tmtest.ads b/testsuites/ada/tmtests/tm11/tmtest.ads
index 6718933b04..cd9cc48b90 100644
--- a/testsuites/ada/tmtests/tm11/tmtest.ads
+++ b/testsuites/ada/tmtests/tm11/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm12/init.c b/testsuites/ada/tmtests/tm12/init.c
index 421e44fab3..7f20fae43b 100644
--- a/testsuites/ada/tmtests/tm12/init.c
+++ b/testsuites/ada/tmtests/tm12/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 12"
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm12/tm12.adb b/testsuites/ada/tmtests/tm12/tm12.adb
index bea5e83b79..86f28d8253 100644
--- a/testsuites/ada/tmtests/tm12/tm12.adb
+++ b/testsuites/ada/tmtests/tm12/tm12.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm12/tmtest.adb b/testsuites/ada/tmtests/tm12/tmtest.adb
index fa469a1eb4..2dd877ff1a 100644
--- a/testsuites/ada/tmtests/tm12/tmtest.adb
+++ b/testsuites/ada/tmtests/tm12/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm12/tmtest.ads b/testsuites/ada/tmtests/tm12/tmtest.ads
index 15ff276c7c..f7891de833 100644
--- a/testsuites/ada/tmtests/tm12/tmtest.ads
+++ b/testsuites/ada/tmtests/tm12/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm13/init.c b/testsuites/ada/tmtests/tm13/init.c
index ecf18b29ab..e979602297 100644
--- a/testsuites/ada/tmtests/tm13/init.c
+++ b/testsuites/ada/tmtests/tm13/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 13"
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm13/tm13.adb b/testsuites/ada/tmtests/tm13/tm13.adb
index ba2ab58065..a5a41ba41f 100644
--- a/testsuites/ada/tmtests/tm13/tm13.adb
+++ b/testsuites/ada/tmtests/tm13/tm13.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm13/tmtest.adb b/testsuites/ada/tmtests/tm13/tmtest.adb
index 886579c986..7360b68466 100644
--- a/testsuites/ada/tmtests/tm13/tmtest.adb
+++ b/testsuites/ada/tmtests/tm13/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm13/tmtest.ads b/testsuites/ada/tmtests/tm13/tmtest.ads
index 270bcda7e2..06f714fece 100644
--- a/testsuites/ada/tmtests/tm13/tmtest.ads
+++ b/testsuites/ada/tmtests/tm13/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm14/init.c b/testsuites/ada/tmtests/tm14/init.c
index 3555139575..03d99d081a 100644
--- a/testsuites/ada/tmtests/tm14/init.c
+++ b/testsuites/ada/tmtests/tm14/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 14"
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm14/tm14.adb b/testsuites/ada/tmtests/tm14/tm14.adb
index 3835813b60..cc289f2a57 100644
--- a/testsuites/ada/tmtests/tm14/tm14.adb
+++ b/testsuites/ada/tmtests/tm14/tm14.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm14/tmtest.adb b/testsuites/ada/tmtests/tm14/tmtest.adb
index 72d95bee3c..29a8de65df 100644
--- a/testsuites/ada/tmtests/tm14/tmtest.adb
+++ b/testsuites/ada/tmtests/tm14/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm14/tmtest.ads b/testsuites/ada/tmtests/tm14/tmtest.ads
index c90b1cadc3..9f8bedcd7a 100644
--- a/testsuites/ada/tmtests/tm14/tmtest.ads
+++ b/testsuites/ada/tmtests/tm14/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm15/init.c b/testsuites/ada/tmtests/tm15/init.c
index c1b831d4bf..53e380d0a6 100644
--- a/testsuites/ada/tmtests/tm15/init.c
+++ b/testsuites/ada/tmtests/tm15/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 15"
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm15/tm15.adb b/testsuites/ada/tmtests/tm15/tm15.adb
index 31e40968da..b5a887101e 100644
--- a/testsuites/ada/tmtests/tm15/tm15.adb
+++ b/testsuites/ada/tmtests/tm15/tm15.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm15/tmtest.adb b/testsuites/ada/tmtests/tm15/tmtest.adb
index 33ff7df2f0..d767140100 100644
--- a/testsuites/ada/tmtests/tm15/tmtest.adb
+++ b/testsuites/ada/tmtests/tm15/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS_CALLING_OVERHEAD;
diff --git a/testsuites/ada/tmtests/tm15/tmtest.ads b/testsuites/ada/tmtests/tm15/tmtest.ads
index b8ab38d6cd..c9c7a502d0 100644
--- a/testsuites/ada/tmtests/tm15/tmtest.ads
+++ b/testsuites/ada/tmtests/tm15/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with TIME_TEST_SUPPORT;
diff --git a/testsuites/ada/tmtests/tm16/init.c b/testsuites/ada/tmtests/tm16/init.c
index 64e613fbd8..aa7d907c66 100644
--- a/testsuites/ada/tmtests/tm16/init.c
+++ b/testsuites/ada/tmtests/tm16/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 16"
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm16/tm16.adb b/testsuites/ada/tmtests/tm16/tm16.adb
index a6d67d93ce..33e96f391b 100644
--- a/testsuites/ada/tmtests/tm16/tm16.adb
+++ b/testsuites/ada/tmtests/tm16/tm16.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm16/tmtest.adb b/testsuites/ada/tmtests/tm16/tmtest.adb
index 982adc8684..42124b1385 100644
--- a/testsuites/ada/tmtests/tm16/tmtest.adb
+++ b/testsuites/ada/tmtests/tm16/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm16/tmtest.ads b/testsuites/ada/tmtests/tm16/tmtest.ads
index ab42eb259c..f5255aa66b 100644
--- a/testsuites/ada/tmtests/tm16/tmtest.ads
+++ b/testsuites/ada/tmtests/tm16/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm17/init.c b/testsuites/ada/tmtests/tm17/init.c
index a4115412e3..c3ba070e1c 100644
--- a/testsuites/ada/tmtests/tm17/init.c
+++ b/testsuites/ada/tmtests/tm17/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 17"
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm17/tm17.adb b/testsuites/ada/tmtests/tm17/tm17.adb
index efc2766479..9447aaef69 100644
--- a/testsuites/ada/tmtests/tm17/tm17.adb
+++ b/testsuites/ada/tmtests/tm17/tm17.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm17/tmtest.adb b/testsuites/ada/tmtests/tm17/tmtest.adb
index 1e093c839e..174eda97c5 100644
--- a/testsuites/ada/tmtests/tm17/tmtest.adb
+++ b/testsuites/ada/tmtests/tm17/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm17/tmtest.ads b/testsuites/ada/tmtests/tm17/tmtest.ads
index b2c9369e26..380e72e396 100644
--- a/testsuites/ada/tmtests/tm17/tmtest.ads
+++ b/testsuites/ada/tmtests/tm17/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm18/init.c b/testsuites/ada/tmtests/tm18/init.c
index b9f602170f..29dc4f23e6 100644
--- a/testsuites/ada/tmtests/tm18/init.c
+++ b/testsuites/ada/tmtests/tm18/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 18"
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm18/tm18.adb b/testsuites/ada/tmtests/tm18/tm18.adb
index 856b6f1127..f205df9609 100644
--- a/testsuites/ada/tmtests/tm18/tm18.adb
+++ b/testsuites/ada/tmtests/tm18/tm18.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm18/tmtest.adb b/testsuites/ada/tmtests/tm18/tmtest.adb
index 25c4594318..1a221d1998 100644
--- a/testsuites/ada/tmtests/tm18/tmtest.adb
+++ b/testsuites/ada/tmtests/tm18/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm18/tmtest.ads b/testsuites/ada/tmtests/tm18/tmtest.ads
index 0b919d44a4..9e75691dfa 100644
--- a/testsuites/ada/tmtests/tm18/tmtest.ads
+++ b/testsuites/ada/tmtests/tm18/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm19/init.c b/testsuites/ada/tmtests/tm19/init.c
index 5dda49aaee..634f2e0f2b 100644
--- a/testsuites/ada/tmtests/tm19/init.c
+++ b/testsuites/ada/tmtests/tm19/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 19"
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm19/tm19.adb b/testsuites/ada/tmtests/tm19/tm19.adb
index 0b232d833a..f22d1939ef 100644
--- a/testsuites/ada/tmtests/tm19/tm19.adb
+++ b/testsuites/ada/tmtests/tm19/tm19.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm19/tmtest.adb b/testsuites/ada/tmtests/tm19/tmtest.adb
index df05cb42ed..c2047fa330 100644
--- a/testsuites/ada/tmtests/tm19/tmtest.adb
+++ b/testsuites/ada/tmtests/tm19/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS_CALLING_OVERHEAD;
diff --git a/testsuites/ada/tmtests/tm19/tmtest.ads b/testsuites/ada/tmtests/tm19/tmtest.ads
index 7776b41b35..27005b752a 100644
--- a/testsuites/ada/tmtests/tm19/tmtest.ads
+++ b/testsuites/ada/tmtests/tm19/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm20/init.c b/testsuites/ada/tmtests/tm20/init.c
index 6c5481debb..e9ae7d17d7 100644
--- a/testsuites/ada/tmtests/tm20/init.c
+++ b/testsuites/ada/tmtests/tm20/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -23,7 +42,6 @@
#define CONFIGURE_MAXIMUM_TASKS 3
#define ADA_TEST_NAME "ADA TM 20"
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm20/tm20.adb b/testsuites/ada/tmtests/tm20/tm20.adb
index 47ef899495..b366f8d8c1 100644
--- a/testsuites/ada/tmtests/tm20/tm20.adb
+++ b/testsuites/ada/tmtests/tm20/tm20.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm20/tmtest.adb b/testsuites/ada/tmtests/tm20/tmtest.adb
index a6ebafec40..8e139da1e1 100644
--- a/testsuites/ada/tmtests/tm20/tmtest.adb
+++ b/testsuites/ada/tmtests/tm20/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm20/tmtest.ads b/testsuites/ada/tmtests/tm20/tmtest.ads
index 8afc25ac2c..c0801ae8fb 100644
--- a/testsuites/ada/tmtests/tm20/tmtest.ads
+++ b/testsuites/ada/tmtests/tm20/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with TIME_TEST_SUPPORT;
diff --git a/testsuites/ada/tmtests/tm21/init.c b/testsuites/ada/tmtests/tm21/init.c
index 04e0bc9011..cc7de913f4 100644
--- a/testsuites/ada/tmtests/tm21/init.c
+++ b/testsuites/ada/tmtests/tm21/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -28,7 +47,6 @@
#define CONFIGURE_MAXIMUM_REGIONS 100
#define CONFIGURE_MAXIMUM_PORTS 100
#define CONFIGURE_MAXIMUM_PERIODS 100
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
(CONFIGURE_MAXIMUM_MESSAGE_QUEUES \
diff --git a/testsuites/ada/tmtests/tm21/tm21.adb b/testsuites/ada/tmtests/tm21/tm21.adb
index 45381ece6c..9aadfcde10 100644
--- a/testsuites/ada/tmtests/tm21/tm21.adb
+++ b/testsuites/ada/tmtests/tm21/tm21.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm21/tmtest.adb b/testsuites/ada/tmtests/tm21/tmtest.adb
index 9cf2d09e86..3c398c420d 100644
--- a/testsuites/ada/tmtests/tm21/tmtest.adb
+++ b/testsuites/ada/tmtests/tm21/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS_CALLING_OVERHEAD;
diff --git a/testsuites/ada/tmtests/tm21/tmtest.ads b/testsuites/ada/tmtests/tm21/tmtest.ads
index 538ffad4d0..d70322cd9f 100644
--- a/testsuites/ada/tmtests/tm21/tmtest.ads
+++ b/testsuites/ada/tmtests/tm21/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm22/init.c b/testsuites/ada/tmtests/tm22/init.c
index 368119d9a3..9ad7875a5f 100644
--- a/testsuites/ada/tmtests/tm22/init.c
+++ b/testsuites/ada/tmtests/tm22/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 22"
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm22/tm22.adb b/testsuites/ada/tmtests/tm22/tm22.adb
index ce755dd517..b7d4970a13 100644
--- a/testsuites/ada/tmtests/tm22/tm22.adb
+++ b/testsuites/ada/tmtests/tm22/tm22.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm22/tmtest.adb b/testsuites/ada/tmtests/tm22/tmtest.adb
index 88588bd89d..36d02e9718 100644
--- a/testsuites/ada/tmtests/tm22/tmtest.adb
+++ b/testsuites/ada/tmtests/tm22/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS_CALLING_OVERHEAD;
diff --git a/testsuites/ada/tmtests/tm22/tmtest.ads b/testsuites/ada/tmtests/tm22/tmtest.ads
index f5dce6c3a0..cc6e02f56c 100644
--- a/testsuites/ada/tmtests/tm22/tmtest.ads
+++ b/testsuites/ada/tmtests/tm22/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm23/init.c b/testsuites/ada/tmtests/tm23/init.c
index 9ad2f691a0..768bd95df8 100644
--- a/testsuites/ada/tmtests/tm23/init.c
+++ b/testsuites/ada/tmtests/tm23/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 23"
#define CONFIGURE_MAXIMUM_TIMERS 110
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm23/tm23.adb b/testsuites/ada/tmtests/tm23/tm23.adb
index 5e345c958a..6d013df606 100644
--- a/testsuites/ada/tmtests/tm23/tm23.adb
+++ b/testsuites/ada/tmtests/tm23/tm23.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm23/tmtest.adb b/testsuites/ada/tmtests/tm23/tmtest.adb
index 6115416f1b..8c60ecf6e5 100644
--- a/testsuites/ada/tmtests/tm23/tmtest.adb
+++ b/testsuites/ada/tmtests/tm23/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm23/tmtest.ads b/testsuites/ada/tmtests/tm23/tmtest.ads
index 6e567007ca..0ec796c91f 100644
--- a/testsuites/ada/tmtests/tm23/tmtest.ads
+++ b/testsuites/ada/tmtests/tm23/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with TIME_TEST_SUPPORT;
diff --git a/testsuites/ada/tmtests/tm24/init.c b/testsuites/ada/tmtests/tm24/init.c
index da98a9ddbd..8b25ab46bd 100644
--- a/testsuites/ada/tmtests/tm24/init.c
+++ b/testsuites/ada/tmtests/tm24/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -21,7 +40,6 @@
#define CONFIGURE_MAXIMUM_TASKS 111
#define ADA_TEST_NAME "ADA TM 24"
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm24/tm24.adb b/testsuites/ada/tmtests/tm24/tm24.adb
index a5ca5d4f7f..119029dd56 100644
--- a/testsuites/ada/tmtests/tm24/tm24.adb
+++ b/testsuites/ada/tmtests/tm24/tm24.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm24/tmtest.adb b/testsuites/ada/tmtests/tm24/tmtest.adb
index b5830cef7b..5332f6f26b 100644
--- a/testsuites/ada/tmtests/tm24/tmtest.adb
+++ b/testsuites/ada/tmtests/tm24/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm24/tmtest.ads b/testsuites/ada/tmtests/tm24/tmtest.ads
index fb6203d5c1..294e65d424 100644
--- a/testsuites/ada/tmtests/tm24/tmtest.ads
+++ b/testsuites/ada/tmtests/tm24/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm25/init.c b/testsuites/ada/tmtests/tm25/init.c
index ddbde343b0..e0bb5bf4f3 100644
--- a/testsuites/ada/tmtests/tm25/init.c
+++ b/testsuites/ada/tmtests/tm25/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 25"
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm25/tm25.adb b/testsuites/ada/tmtests/tm25/tm25.adb
index 44bda5893f..cd3894aa28 100644
--- a/testsuites/ada/tmtests/tm25/tm25.adb
+++ b/testsuites/ada/tmtests/tm25/tm25.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm25/tmtest.adb b/testsuites/ada/tmtests/tm25/tmtest.adb
index 63d68d4aa1..ab8f59f6d9 100644
--- a/testsuites/ada/tmtests/tm25/tmtest.adb
+++ b/testsuites/ada/tmtests/tm25/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS_CALLING_OVERHEAD;
diff --git a/testsuites/ada/tmtests/tm25/tmtest.ads b/testsuites/ada/tmtests/tm25/tmtest.ads
index 45a671af81..074a66639f 100644
--- a/testsuites/ada/tmtests/tm25/tmtest.ads
+++ b/testsuites/ada/tmtests/tm25/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm28/init.c b/testsuites/ada/tmtests/tm28/init.c
index 4451f86000..542135b84e 100644
--- a/testsuites/ada/tmtests/tm28/init.c
+++ b/testsuites/ada/tmtests/tm28/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 28"
#define CONFIGURE_MAXIMUM_PORTS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm28/tm28.adb b/testsuites/ada/tmtests/tm28/tm28.adb
index 93d0f3cf02..bfed1ed985 100644
--- a/testsuites/ada/tmtests/tm28/tm28.adb
+++ b/testsuites/ada/tmtests/tm28/tm28.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm28/tmtest.adb b/testsuites/ada/tmtests/tm28/tmtest.adb
index 71b6edc32f..0d7a4401ec 100644
--- a/testsuites/ada/tmtests/tm28/tmtest.adb
+++ b/testsuites/ada/tmtests/tm28/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS_CALLING_OVERHEAD;
diff --git a/testsuites/ada/tmtests/tm28/tmtest.ads b/testsuites/ada/tmtests/tm28/tmtest.ads
index 39ceeb0ad2..06aefefde7 100644
--- a/testsuites/ada/tmtests/tm28/tmtest.ads
+++ b/testsuites/ada/tmtests/tm28/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with SYSTEM;
diff --git a/testsuites/ada/tmtests/tm29/init.c b/testsuites/ada/tmtests/tm29/init.c
index 6789a328bc..f0c509c9b0 100644
--- a/testsuites/ada/tmtests/tm29/init.c
+++ b/testsuites/ada/tmtests/tm29/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TM 29"
#define CONFIGURE_MAXIMUM_PERIODS 111
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tm29/tm29.adb b/testsuites/ada/tmtests/tm29/tm29.adb
index 4853fbf2c7..1fbc45a92e 100644
--- a/testsuites/ada/tmtests/tm29/tm29.adb
+++ b/testsuites/ada/tmtests/tm29/tm29.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tm29/tmtest.adb b/testsuites/ada/tmtests/tm29/tmtest.adb
index c77fbc0abd..14c563c6dd 100644
--- a/testsuites/ada/tmtests/tm29/tmtest.adb
+++ b/testsuites/ada/tmtests/tm29/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with INTERFACES; use INTERFACES;
diff --git a/testsuites/ada/tmtests/tm29/tmtest.ads b/testsuites/ada/tmtests/tm29/tmtest.ads
index 8661fc28b6..e9280a6844 100644
--- a/testsuites/ada/tmtests/tm29/tmtest.ads
+++ b/testsuites/ada/tmtests/tm29/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tmck/init.c b/testsuites/ada/tmtests/tmck/init.c
index 0bce9d48f3..8c0682be41 100644
--- a/testsuites/ada/tmtests/tmck/init.c
+++ b/testsuites/ada/tmtests/tmck/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* config.h
*
* This include file defines the Configuration Table for this test.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -22,7 +41,6 @@
#define ADA_TEST_NAME "ADA TMCK"
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/ada/tmtests/tmck/tmck.adb b/testsuites/ada/tmtests/tmck/tmck.adb
index c35d786517..2e8d99b5a7 100644
--- a/testsuites/ada/tmtests/tmck/tmck.adb
+++ b/testsuites/ada/tmtests/tmck/tmck.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- MAIN / BODY
--
@@ -12,9 +14,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/ada/tmtests/tmck/tmtest.adb b/testsuites/ada/tmtests/tmck/tmtest.adb
index d1d7659988..7861fcaf90 100644
--- a/testsuites/ada/tmtests/tmck/tmtest.adb
+++ b/testsuites/ada/tmtests/tmck/tmtest.adb
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / BODY
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with TIMER_DRIVER;
diff --git a/testsuites/ada/tmtests/tmck/tmtest.ads b/testsuites/ada/tmtests/tmck/tmtest.ads
index 6eef577910..081c49fa4f 100644
--- a/testsuites/ada/tmtests/tmck/tmtest.ads
+++ b/testsuites/ada/tmtests/tmck/tmtest.ads
@@ -1,3 +1,5 @@
+-- SPDX-License-Identifier: BSD-2-Clause
+
--
-- TMTEST / SPECIFICATION
--
@@ -13,9 +15,26 @@
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
--- The license and distribution terms for this file may in
--- the file LICENSE in this distribution or at
--- http://www.rtems.org/license/LICENSE.
+-- 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 OWNER 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.
--
with RTEMS;
diff --git a/testsuites/benchmarks/dhrystone/dhry_1.c b/testsuites/benchmarks/dhrystone/dhry_1.c
index 3ad2e7f204..ef6ecf9251 100644
--- a/testsuites/benchmarks/dhrystone/dhry_1.c
+++ b/testsuites/benchmarks/dhrystone/dhry_1.c
@@ -133,6 +133,7 @@ execution_start:
#ifdef __rtems__
/* avoid used uninitialized warning */
+ Int_1_Loc = 0;
Int_2_Loc = 0;
#endif
diff --git a/testsuites/benchmarks/dhrystone/init.c b/testsuites/benchmarks/dhrystone/init.c
index 9ff4662d16..ba55976d6d 100644
--- a/testsuites/benchmarks/dhrystone/init.c
+++ b/testsuites/benchmarks/dhrystone/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/benchmarks/linpack/init.c b/testsuites/benchmarks/linpack/init.c
index ce9e0e7448..24922eb93b 100644
--- a/testsuites/benchmarks/linpack/init.c
+++ b/testsuites/benchmarks/linpack/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/benchmarks/linpack/linpack-pc.c b/testsuites/benchmarks/linpack/linpack-pc.c
index 1fef18eb96..5f00df1d7c 100644
--- a/testsuites/benchmarks/linpack/linpack-pc.c
+++ b/testsuites/benchmarks/linpack/linpack-pc.c
@@ -224,7 +224,7 @@
#include <math.h>
#include <stdlib.h>
#ifdef __rtems__
-#include <tmacros.h>
+#include <rtems/test-printer.h>
#undef print_time
#define fprintf(f, ...) rtems_printf(&rtems_test_printer, __VA_ARGS__)
#endif /* __rtems__ */
diff --git a/testsuites/benchmarks/whetstone/init.c b/testsuites/benchmarks/whetstone/init.c
index 0e8f7a4893..dd4b1a70e0 100644
--- a/testsuites/benchmarks/whetstone/init.c
+++ b/testsuites/benchmarks/whetstone/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/benchmarks/whetstone/whetstone.c b/testsuites/benchmarks/whetstone/whetstone.c
index e0a93aa88c..aae68af6a6 100644
--- a/testsuites/benchmarks/whetstone/whetstone.c
+++ b/testsuites/benchmarks/whetstone/whetstone.c
@@ -57,7 +57,7 @@ C**********************************************************************
#include <string.h>
#include <math.h>
#ifdef __rtems__
-#include <tmacros.h>
+#include <rtems/test-printer.h>
#define fprintf(f, ...) rtems_printf(&rtems_test_printer, __VA_ARGS__)
#endif /* __rtems__ */
diff --git a/testsuites/build/bin/fake-rtems5-ar b/testsuites/build/bin/fake-rtems5-ar
index 1561e69e27..899dc2c011 100755
--- a/testsuites/build/bin/fake-rtems5-ar
+++ b/testsuites/build/bin/fake-rtems5-ar
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (C) 2019 embedded brains GmbH
+# Copyright (C) 2019 embedded brains GmbH & Co. KG
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/testsuites/build/bin/fake-rtems5-gcc b/testsuites/build/bin/fake-rtems5-gcc
index f2ae2d92c5..80198fad4d 100755
--- a/testsuites/build/bin/fake-rtems5-gcc
+++ b/testsuites/build/bin/fake-rtems5-gcc
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (C) 2019 embedded brains GmbH
+# Copyright (C) 2019 embedded brains GmbH & Co. KG
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/testsuites/build/bin/fake-rtems5-ld b/testsuites/build/bin/fake-rtems5-ld
index 1561e69e27..899dc2c011 100755
--- a/testsuites/build/bin/fake-rtems5-ld
+++ b/testsuites/build/bin/fake-rtems5-ld
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (C) 2019 embedded brains GmbH
+# Copyright (C) 2019 embedded brains GmbH & Co. KG
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/testsuites/build/test.py b/testsuites/build/test.py
index e8b50983dd..084cd2b673 100755
--- a/testsuites/build/test.py
+++ b/testsuites/build/test.py
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (C) 2019 embedded brains GmbH
+# Copyright (C) 2019 embedded brains GmbH & Co. KG
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/testsuites/fstests/fsbdpart01/fsbdpart01.doc b/testsuites/fstests/fsbdpart01/fsbdpart01.doc
index a99b5a2bb4..5c4d20ebc9 100644
--- a/testsuites/fstests/fsbdpart01/fsbdpart01.doc
+++ b/testsuites/fstests/fsbdpart01/fsbdpart01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/fstests/fsbdpart01/init.c b/testsuites/fstests/fsbdpart01/init.c
index f87033a80a..634604f9ca 100644
--- a/testsuites/fstests/fsbdpart01/init.c
+++ b/testsuites/fstests/fsbdpart01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsclose01/init.c b/testsuites/fstests/fsclose01/init.c
index ac461c66be..c425fa67c2 100644
--- a/testsuites/fstests/fsclose01/init.c
+++ b/testsuites/fstests/fsclose01/init.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2012, 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/fstests/fsdosfsformat01/fsdosfsformat01.doc b/testsuites/fstests/fsdosfsformat01/fsdosfsformat01.doc
index c24c138ae8..016482e393 100644
--- a/testsuites/fstests/fsdosfsformat01/fsdosfsformat01.doc
+++ b/testsuites/fstests/fsdosfsformat01/fsdosfsformat01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fsdosfsformat01/init.c b/testsuites/fstests/fsdosfsformat01/init.c
index f932c9663b..876d9c2f58 100644
--- a/testsuites/fstests/fsdosfsformat01/init.c
+++ b/testsuites/fstests/fsdosfsformat01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file_name may be
- * found in the file_name LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsdosfsname01/create_files.cs b/testsuites/fstests/fsdosfsname01/create_files.cs
index 3cb7604687..3cce61435b 100644
--- a/testsuites/fstests/fsdosfsname01/create_files.cs
+++ b/testsuites/fstests/fsdosfsname01/create_files.cs
@@ -1,4 +1,6 @@
-/**
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
* @file Create_Files.cs
*
* @brief Format a USB memory stick and create files on the stick
@@ -9,35 +11,46 @@
* whith files with exotic multibyte filenames. The image will get
* mounted under RTEMS for testing the mutibyte/UTF-8 feature of the
* RTEMS FAT file system and the compatibility to MS Windows.
- */
-
+ */
+
/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2013 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Diagnostics;
-using System.Threading;
-using System.Text;
-
-namespace Create_Files
-{
- public static class Create_Files
- {
- // Strings for file names and file contents
- public static string[] Strings = new string[] {
- "this is a long filename",
+ * 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 OWNER 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.
+ */
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Diagnostics;
+using System.Threading;
+using System.Text;
+
+namespace Create_Files
+{
+ public static class Create_Files
+ {
+ // Strings for file names and file contents
+ public static string[] Strings = new string[] {
+ "this is a long filename",
"đây là một tên tập tin dài",
"Bu uzun bir dosya adı",
"هذا هو اسم ملف طويل",
@@ -45,106 +58,106 @@ namespace Create_Files
"это длинное имя",
"гэта доўгае імя",
"това е дълго име на файла",
- "这是一个长文件名",
- "মেৰিকা মহাদেশ, উত্তৰ আমেৰিকা আৰু দক্ষিণ আমেৰিকা মহাদেশক লৈ গঠিত এক",
- "آمریکا قاره یکته قارهٰ زمینˇ قاره‌ٰنˇ مئن ایسسه کی زمینˇ هنه‌شر (مساحت)ˇ جی ۳۸٪ و زمینˇ خوشکی‌ئنˇ جی ۴۲۸٪ ای قاره شی ایسسه",
- "Manâhestôtse 910,720,588 (July 2008 est.)",
- "Elle s'étend depuis l'océan Arctique au nord jusqu'au cap Horn dans le passage de Drake au sud, à la confluence des océans",
- "ཨ་མེ་རི་ཀ, ཨ་མེ་རི་ཁ, མེ་གླིང་",
- "е су земље западне хемисфере или Новог света које се састоје од континената Северна Америка",
- "This is a filename with with 255 characters. The following numbers are aligned in that way, that the character 0 is the mentioned one. xx140xxxxxxx150xxxxxxx160xxxxxxx170xxxxxxx180xxxxxxx190xxxxxxx200xxxxxxx210xxxxxxx220xxxxxxx230xxxxxxx240xxxxxxx250xxxxx",
- "Bu gezegen Roma mitolojisindeki savaş ilahı Mars'a",
- "Amerike su zemlje zapadne hemisfere ili Novog svijeta koje se sastoje od kontinenata Sjeverna Amerika i Južna Amerika sa svim pridruženim otocima i regijama.",
- "იანებს ორ კონტინენტს, სამხრეთ და ჩრდილოეთ ამერიკას ახლომდებარე კუნძულებთან ერ",
- " Є то єдиный контінент, котрого цїла теріторія лежыть на Западній півкулї тай разом"
- };
-
- // Use the features of MS Windows to format the USB memory stick. We want a genuine Microsoft FAT file system
- public static void FormatDrive(string driveLetter)
- {
- ProcessStartInfo StartInfo = new ProcessStartInfo();
- StartInfo.FileName = Environment.SystemDirectory + "\\cmd.exe";
- StartInfo.Arguments = "/C \"format " + driveLetter + " /FS:FAT\"";
- StartInfo.UseShellExecute = false;
- StartInfo.RedirectStandardInput = true;
- Process Process = Process.Start(StartInfo);
- //Thread.Sleep(1000);
- Process.StandardInput.WriteLine();
- Process.StandardInput.WriteLine();
- Process.WaitForExit();
- }
- // Format a USB meory stick and create files on the new volume
- // args[0] The drive to be formatted. E.g. "e:"
- public static void Main(string[] args)
- {
- // Display help text on the console
- if ((args.Length <= 0) || (args[0].Equals("-h", StringComparison.InvariantCultureIgnoreCase) || args[0].Equals("-help", StringComparison.InvariantCultureIgnoreCase)))
- {
- Console.WriteLine("create_files.bat <DRIVE>");
- Console.WriteLine("Will format DRIVE and create files on the new formated drive.");
- }
- else
- {
- // Show a warning
- Console.WriteLine(args[0] + " will get formated!");
- while (true)
- {
- Console.WriteLine("Press y to continue or press n to abort. [y\\n]");
- string Input = Console.ReadLine();
- if (Input[0].Equals('y') || Input[0].Equals('Y'))
- break;
- else if (Input[0].Equals('n') || Input[0].Equals('N'))
- return;
- }
- // Format the USB memory stick
- FormatDrive(args[0]);
-
- // Create the files and write their own file names into them
- for (int i = 0; i < Strings.GetLength(0); i++)
- {
- File.WriteAllText(Path.Combine(args[0], Strings[i]), Strings[i], Encoding.UTF8);
- Console.WriteLine("The file \"" + Strings[i] + "\" created.");
- }
-
- // Create a c header file which contains an array with the strings and a #define
- // for the number of strings
- string HeaderPath = Path.Combine(args[0]/*Environment.CurrentDirectory*/, "files.h");
- Console.WriteLine("The header \"" + HeaderPath + "\" will write.");
- StreamWriter HeaderStream = new StreamWriter(HeaderPath);
-
- HeaderStream.Write("\n" +
- "/*\n" +
- " * Array with files, that were created in the FAT-filesystem image.bin.\n" +
- " *\n" +
- " * WARNING: Automatically generated by Create_Files.cs -- do not edit!\n" +
- " */\n" +
- "\n" +
- "#ifndef __FILE_H__\n" +
- "#define __FILE_H__\n" +
- "\n" +
- "#ifdef __cplusplus\n" +
- "extern C {\n" +
- "#endif\n" +
- "\n" +
- "static const char *const filenames[] = {\n");
- for (int i = 0; i < Strings.GetLength(0); i++)
- HeaderStream.WriteLine(" \"" + Strings[i] + ((i == (Strings.GetLength(0) - 1)) ? "\"" : "\","));
- string NumberOfFilesStr = Strings.GetLength(0).ToString(System.Globalization.CultureInfo.InvariantCulture);
- HeaderStream.Write("};\n" +
- "#define FILES_FILENAMES_NUMBER_OF " + NumberOfFilesStr + "\n" +
- "\n" +
- "#ifdef __cplusplus\n" +
- "}\n" +
- "#endif\n" +
- "\n" +
- "#endif /* __FILE_H__ */\n" +
- "\n");
-
- // Finalize
- HeaderStream.Flush();
- HeaderStream.Close();
- HeaderStream.Dispose();
- }
- }
- }
-}
+ "这是一个长文件名",
+ "মেৰিকা মহাদেশ, উত্তৰ আমেৰিকা আৰু দক্ষিণ আমেৰিকা মহাদেশক লৈ গঠিত এক",
+ "آمریکا قاره یکته قارهٰ زمینˇ قاره‌ٰنˇ مئن ایسسه کی زمینˇ هنه‌شر (مساحت)ˇ جی ۳۸٪ و زمینˇ خوشکی‌ئنˇ جی ۴۲۸٪ ای قاره شی ایسسه",
+ "Manâhestôtse 910,720,588 (July 2008 est.)",
+ "Elle s'étend depuis l'océan Arctique au nord jusqu'au cap Horn dans le passage de Drake au sud, à la confluence des océans",
+ "ཨ་མེ་རི་ཀ, ཨ་མེ་རི་ཁ, མེ་གླིང་",
+ "е су земље западне хемисфере или Новог света које се састоје од континената Северна Америка",
+ "This is a filename with with 255 characters. The following numbers are aligned in that way, that the character 0 is the mentioned one. xx140xxxxxxx150xxxxxxx160xxxxxxx170xxxxxxx180xxxxxxx190xxxxxxx200xxxxxxx210xxxxxxx220xxxxxxx230xxxxxxx240xxxxxxx250xxxxx",
+ "Bu gezegen Roma mitolojisindeki savaş ilahı Mars'a",
+ "Amerike su zemlje zapadne hemisfere ili Novog svijeta koje se sastoje od kontinenata Sjeverna Amerika i Južna Amerika sa svim pridruženim otocima i regijama.",
+ "იანებს ორ კონტინენტს, სამხრეთ და ჩრდილოეთ ამერიკას ახლომდებარე კუნძულებთან ერ",
+ " Є то єдиный контінент, котрого цїла теріторія лежыть на Западній півкулї тай разом"
+ };
+
+ // Use the features of MS Windows to format the USB memory stick. We want a genuine Microsoft FAT file system
+ public static void FormatDrive(string driveLetter)
+ {
+ ProcessStartInfo StartInfo = new ProcessStartInfo();
+ StartInfo.FileName = Environment.SystemDirectory + "\\cmd.exe";
+ StartInfo.Arguments = "/C \"format " + driveLetter + " /FS:FAT\"";
+ StartInfo.UseShellExecute = false;
+ StartInfo.RedirectStandardInput = true;
+ Process Process = Process.Start(StartInfo);
+ //Thread.Sleep(1000);
+ Process.StandardInput.WriteLine();
+ Process.StandardInput.WriteLine();
+ Process.WaitForExit();
+ }
+ // Format a USB meory stick and create files on the new volume
+ // args[0] The drive to be formatted. E.g. "e:"
+ public static void Main(string[] args)
+ {
+ // Display help text on the console
+ if ((args.Length <= 0) || (args[0].Equals("-h", StringComparison.InvariantCultureIgnoreCase) || args[0].Equals("-help", StringComparison.InvariantCultureIgnoreCase)))
+ {
+ Console.WriteLine("create_files.bat <DRIVE>");
+ Console.WriteLine("Will format DRIVE and create files on the new formated drive.");
+ }
+ else
+ {
+ // Show a warning
+ Console.WriteLine(args[0] + " will get formated!");
+ while (true)
+ {
+ Console.WriteLine("Press y to continue or press n to abort. [y\\n]");
+ string Input = Console.ReadLine();
+ if (Input[0].Equals('y') || Input[0].Equals('Y'))
+ break;
+ else if (Input[0].Equals('n') || Input[0].Equals('N'))
+ return;
+ }
+ // Format the USB memory stick
+ FormatDrive(args[0]);
+
+ // Create the files and write their own file names into them
+ for (int i = 0; i < Strings.GetLength(0); i++)
+ {
+ File.WriteAllText(Path.Combine(args[0], Strings[i]), Strings[i], Encoding.UTF8);
+ Console.WriteLine("The file \"" + Strings[i] + "\" created.");
+ }
+
+ // Create a c header file which contains an array with the strings and a #define
+ // for the number of strings
+ string HeaderPath = Path.Combine(args[0]/*Environment.CurrentDirectory*/, "files.h");
+ Console.WriteLine("The header \"" + HeaderPath + "\" will write.");
+ StreamWriter HeaderStream = new StreamWriter(HeaderPath);
+
+ HeaderStream.Write("\n" +
+ "/*\n" +
+ " * Array with files, that were created in the FAT-filesystem image.bin.\n" +
+ " *\n" +
+ " * WARNING: Automatically generated by Create_Files.cs -- do not edit!\n" +
+ " */\n" +
+ "\n" +
+ "#ifndef __FILE_H__\n" +
+ "#define __FILE_H__\n" +
+ "\n" +
+ "#ifdef __cplusplus\n" +
+ "extern C {\n" +
+ "#endif\n" +
+ "\n" +
+ "static const char *const filenames[] = {\n");
+ for (int i = 0; i < Strings.GetLength(0); i++)
+ HeaderStream.WriteLine(" \"" + Strings[i] + ((i == (Strings.GetLength(0) - 1)) ? "\"" : "\","));
+ string NumberOfFilesStr = Strings.GetLength(0).ToString(System.Globalization.CultureInfo.InvariantCulture);
+ HeaderStream.Write("};\n" +
+ "#define FILES_FILENAMES_NUMBER_OF " + NumberOfFilesStr + "\n" +
+ "\n" +
+ "#ifdef __cplusplus\n" +
+ "}\n" +
+ "#endif\n" +
+ "\n" +
+ "#endif /* __FILE_H__ */\n" +
+ "\n");
+
+ // Finalize
+ HeaderStream.Flush();
+ HeaderStream.Close();
+ HeaderStream.Dispose();
+ }
+ }
+ }
+}
diff --git a/testsuites/fstests/fsdosfsname01/create_image.sh b/testsuites/fstests/fsdosfsname01/create_image.sh
index 2f38282b26..d37762e509 100755
--- a/testsuites/fstests/fsdosfsname01/create_image.sh
+++ b/testsuites/fstests/fsdosfsname01/create_image.sh
@@ -1,10 +1,29 @@
#!/bin/sh
-# Copyright (c) 2013 embedded brains GmbH.
+# SPDX-License-Identifier: BSD-2-Clause
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# Copyright (c) 2013 embedded brains GmbH & Co. KG
+#
+# 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 OWNER 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.
IMAGE=image
diff --git a/testsuites/fstests/fsdosfsname01/image_bin_le_multibyte.h b/testsuites/fstests/fsdosfsname01/image_bin_le_multibyte.h
index 2af94a397e..3e74ae63a7 100644
--- a/testsuites/fstests/fsdosfsname01/image_bin_le_multibyte.h
+++ b/testsuites/fstests/fsdosfsname01/image_bin_le_multibyte.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file image_bin_le_multibyte.h
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2013 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/*
diff --git a/testsuites/fstests/fsdosfsname01/image_bin_le_singlebyte.h b/testsuites/fstests/fsdosfsname01/image_bin_le_singlebyte.h
index 3cc89f7749..eb71832354 100644
--- a/testsuites/fstests/fsdosfsname01/image_bin_le_singlebyte.h
+++ b/testsuites/fstests/fsdosfsname01/image_bin_le_singlebyte.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file image_bin_le_singlebyte.h
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2013 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/*
diff --git a/testsuites/fstests/fsdosfsname01/init.c b/testsuites/fstests/fsdosfsname01/init.c
index a916e392f7..16fe6e9f84 100644
--- a/testsuites/fstests/fsdosfsname01/init.c
+++ b/testsuites/fstests/fsdosfsname01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012, 2013 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2012, 2013 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsdosfsname02/init.c b/testsuites/fstests/fsdosfsname02/init.c
index b83f837b0f..3ff878c997 100644
--- a/testsuites/fstests/fsdosfsname02/init.c
+++ b/testsuites/fstests/fsdosfsname02/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsdosfssync01/fsdosfssync01.doc b/testsuites/fstests/fsdosfssync01/fsdosfssync01.doc
index 603409601f..bbecc00b86 100644
--- a/testsuites/fstests/fsdosfssync01/fsdosfssync01.doc
+++ b/testsuites/fstests/fsdosfssync01/fsdosfssync01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fsdosfssync01/init.c b/testsuites/fstests/fsdosfssync01/init.c
index 8bdd37b54c..b4e8c08a7e 100644
--- a/testsuites/fstests/fsdosfssync01/init.c
+++ b/testsuites/fstests/fsdosfssync01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsdosfswrite01/init.c b/testsuites/fstests/fsdosfswrite01/init.c
index 64b43b7919..15928cbcf0 100644
--- a/testsuites/fstests/fsdosfswrite01/init.c
+++ b/testsuites/fstests/fsdosfswrite01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fserror/fserror.doc b/testsuites/fstests/fserror/fserror.doc
index 4ff12ddad9..9324b2d354 100644
--- a/testsuites/fstests/fserror/fserror.doc
+++ b/testsuites/fstests/fserror/fserror.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fserror/test.c b/testsuites/fstests/fserror/test.c
index cd31a18bb2..60b7b08584 100644
--- a/testsuites/fstests/fserror/test.c
+++ b/testsuites/fstests/fserror/test.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsfpathconf/fsfpathconf.doc b/testsuites/fstests/fsfpathconf/fsfpathconf.doc
index 3b488b47a6..4aeb642d52 100644
--- a/testsuites/fstests/fsfpathconf/fsfpathconf.doc
+++ b/testsuites/fstests/fsfpathconf/fsfpathconf.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2012.
# Krzysztof Miesowicz <krzysztof.miesowicz@gmail.com>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fsfpathconf/test.c b/testsuites/fstests/fsfpathconf/test.c
index 8201779cdd..a3a1b22132 100644
--- a/testsuites/fstests/fsfpathconf/test.c
+++ b/testsuites/fstests/fsfpathconf/test.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2012 - .
* Krzysztof Miesowicz <krzysztof.miesowicz@gmail.com>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsfseeko01/init.c b/testsuites/fstests/fsfseeko01/init.c
index a9ce0e5eb8..01bf024d95 100644
--- a/testsuites/fstests/fsfseeko01/init.c
+++ b/testsuites/fstests/fsfseeko01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsimfsconfig01/init.c b/testsuites/fstests/fsimfsconfig01/init.c
index c3e4485e5f..bd994c895c 100644
--- a/testsuites/fstests/fsimfsconfig01/init.c
+++ b/testsuites/fstests/fsimfsconfig01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsimfsconfig02/init.c b/testsuites/fstests/fsimfsconfig02/init.c
index ae27061f40..87f226f8dc 100644
--- a/testsuites/fstests/fsimfsconfig02/init.c
+++ b/testsuites/fstests/fsimfsconfig02/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsimfsconfig03/init.c b/testsuites/fstests/fsimfsconfig03/init.c
index beccb0fe7b..2fe37f3b6e 100644
--- a/testsuites/fstests/fsimfsconfig03/init.c
+++ b/testsuites/fstests/fsimfsconfig03/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsimfsgeneric01/init.c b/testsuites/fstests/fsimfsgeneric01/init.c
index e553f36ce0..3a3bbc60d8 100644
--- a/testsuites/fstests/fsimfsgeneric01/init.c
+++ b/testsuites/fstests/fsimfsgeneric01/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2012, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2012, 2020 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsjffs2empty01/fsjffs2empty01.doc b/testsuites/fstests/fsjffs2empty01/fsjffs2empty01.doc
new file mode 100644
index 0000000000..2ad886a1fb
--- /dev/null
+++ b/testsuites/fstests/fsjffs2empty01/fsjffs2empty01.doc
@@ -0,0 +1,11 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: fsjffs2empty01
+
+directives:
+
+ - JFFS2 implementation
+
+concepts:
+
+ - Ensure that the JFFS2 library can remount a filesystem where every block has been written to and all files have been deleted.
diff --git a/testsuites/fstests/fsjffs2empty01/fsjffs2empty01.scn b/testsuites/fstests/fsjffs2empty01/fsjffs2empty01.scn
new file mode 100644
index 0000000000..56dca74761
--- /dev/null
+++ b/testsuites/fstests/fsjffs2empty01/fsjffs2empty01.scn
@@ -0,0 +1,6 @@
+*** BEGIN OF TEST FSJFFS2EMPTY 1 ***
+Initializing filesystem JFFS2
+
+
+Shutting down filesystem JFFS2
+*** END OF TEST FSJFFS2EMPTY 1 ***
diff --git a/testsuites/fstests/fsjffs2empty01/init.c b/testsuites/fstests/fsjffs2empty01/init.c
new file mode 100644
index 0000000000..3232ea8fde
--- /dev/null
+++ b/testsuites/fstests/fsjffs2empty01/init.c
@@ -0,0 +1,245 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (C) 2024 On-Line Applications Research (OAR)
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <tmacros.h>
+
+#include <rtems.h>
+#include <rtems/jffs2.h>
+#include <rtems/libio.h>
+
+#define BLOCK_SIZE (16UL * 1024UL)
+
+#define FLASH_SIZE (8UL * BLOCK_SIZE)
+
+const char rtems_test_name[] = "FSJFFS2EMPTY 1";
+
+#define BASE_FOR_TEST "/mnt"
+static char big[] = BASE_FOR_TEST "/big";
+
+static char keg[523];
+
+static void init_keg(void)
+{
+ uint32_t v = 123;
+
+ for (size_t i = 0; i < sizeof(keg); ++i) {
+ v = v * 1664525 + 1013904223;
+ keg[i] = (uint8_t) (v >> 23);
+ }
+}
+
+static void create_big_file(void)
+{
+ int rv;
+ int fd = open(&big[0], O_WRONLY | O_TRUNC | O_CREAT,
+ S_IRWXU | S_IRWXG | S_IRWXO);
+ rtems_test_assert(fd >= 0);
+
+ for (int i = 0; i < 100; ++i) {
+ ssize_t n = write(fd, &keg[0], sizeof(keg));
+ rtems_test_assert(n == (ssize_t) sizeof(keg));
+ }
+
+ rv = close(fd);
+ rtems_test_assert(rv == 0);
+}
+
+static void remove_big_file(void)
+{
+ int rv = unlink(&big[0]);
+ rtems_test_assert(rv == 0);
+}
+
+typedef struct {
+ rtems_jffs2_flash_control super;
+ unsigned char area[FLASH_SIZE];
+} flash_control;
+
+static unsigned char *get_flash_chunk(rtems_jffs2_flash_control *super,
+ uint32_t offset)
+{
+ return &((flash_control *) super)->area[offset];
+}
+
+static int flash_read(
+ rtems_jffs2_flash_control *super,
+ uint32_t offset,
+ unsigned char *buffer,
+ size_t size_of_buffer
+)
+{
+ unsigned char *chunk = get_flash_chunk(super, offset);
+
+ memcpy(buffer, chunk, size_of_buffer);
+
+ return 0;
+}
+
+static int flash_write(
+ rtems_jffs2_flash_control *super,
+ uint32_t offset,
+ const unsigned char *buffer,
+ size_t size_of_buffer
+)
+{
+ unsigned char *chunk = get_flash_chunk(super, offset);
+
+ for (size_t i = 0; i < size_of_buffer; ++i) {
+ chunk[i] &= buffer[i];
+ }
+
+ return 0;
+}
+
+static int flash_erase(
+ rtems_jffs2_flash_control *super,
+ uint32_t offset
+)
+{
+ unsigned char *chunk = get_flash_chunk(super, offset);
+
+ memset(chunk, 0xff, BLOCK_SIZE);
+
+ return 0;
+}
+
+static flash_control flash_instance = {
+ .super = {
+ .block_size = BLOCK_SIZE,
+ .flash_size = FLASH_SIZE,
+ .read = flash_read,
+ .write = flash_write,
+ .erase = flash_erase
+ }
+};
+
+static rtems_jffs2_compressor_control compressor_instance = {
+ .compress = rtems_jffs2_compressor_rtime_compress,
+ .decompress = rtems_jffs2_compressor_rtime_decompress
+};
+
+static const rtems_jffs2_mount_data mount_data = {
+ .flash_control = &flash_instance.super,
+ .compressor_control = &compressor_instance
+};
+
+static void erase_all(void)
+{
+ memset(&flash_instance.area[0], 0xff, FLASH_SIZE);
+}
+
+static void test_initialize_filesystem(void)
+{
+ int rv = mount(
+ NULL,
+ BASE_FOR_TEST,
+ RTEMS_FILESYSTEM_TYPE_JFFS2,
+ RTEMS_FILESYSTEM_READ_WRITE,
+ &mount_data
+ );
+ rtems_test_assert(rv == 0);
+}
+
+static void test_shutdown_filesystem(void)
+{
+ int rv = unmount(BASE_FOR_TEST);
+ rtems_test_assert(rv == 0);
+}
+
+static rtems_task Init(
+ rtems_task_argument ignored)
+{
+ int rv;
+
+ TEST_BEGIN();
+
+ erase_all();
+
+ rv = mkdir(BASE_FOR_TEST, S_IRWXU | S_IRWXG | S_IRWXO);
+ rtems_test_assert(rv == 0);
+
+ puts( "Initializing JFFS2 filesystem" );
+ test_initialize_filesystem();
+
+ init_keg();
+
+ /*
+ * Ensure that jiffies != 0, to use most likely path in
+ * jffs2_mark_node_obsolete(). Without this the failure only happens
+ * intermittently.
+ */
+ while (rtems_clock_get_ticks_since_boot() == 0) {
+ /* Wait */
+ }
+
+ /*
+ * This must be done in 2 parts because the FS is only so large and all blocks
+ * must be written to.
+ */
+ create_big_file();
+ remove_big_file();
+
+ create_big_file();
+ remove_big_file();
+
+ puts( "\n\nShutting down JFFS2 filesystem");
+ test_shutdown_filesystem();
+
+ puts( "Initializing JFFS2 filesystem again" );
+ test_initialize_filesystem();
+
+ puts( "\n\nShutting down JFFS2 filesystem again" );
+ test_shutdown_filesystem();
+
+ TEST_END();
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+
+#define CONFIGURE_FILESYSTEM_JFFS2
+
+#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 40
+
+#define CONFIGURE_MAXIMUM_TASKS 2
+
+#define CONFIGURE_INIT_TASK_STACK_SIZE (32 * 1024)
+#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
diff --git a/testsuites/fstests/fsjffs2gc01/init.c b/testsuites/fstests/fsjffs2gc01/init.c
index 9ab7cafdf1..4d29373b90 100644
--- a/testsuites/fstests/fsjffs2gc01/init.c
+++ b/testsuites/fstests/fsjffs2gc01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fslink/fslink.doc b/testsuites/fstests/fslink/fslink.doc
index 291902f56b..008330af70 100644
--- a/testsuites/fstests/fslink/fslink.doc
+++ b/testsuites/fstests/fslink/fslink.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fslink/test.c b/testsuites/fstests/fslink/test.c
index f92160bbcc..3eb09e8e08 100644
--- a/testsuites/fstests/fslink/test.c
+++ b/testsuites/fstests/fslink/test.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsnofs01/fsnofs01.doc b/testsuites/fstests/fsnofs01/fsnofs01.doc
index 3a47c46a22..bae48d8231 100644
--- a/testsuites/fstests/fsnofs01/fsnofs01.doc
+++ b/testsuites/fstests/fsnofs01/fsnofs01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fsnofs01/init.c b/testsuites/fstests/fsnofs01/init.c
index 659ee44a7a..b1c1488168 100644
--- a/testsuites/fstests/fsnofs01/init.c
+++ b/testsuites/fstests/fsnofs01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fspatheval/patheval.doc b/testsuites/fstests/fspatheval/patheval.doc
index 1443e00aa8..04a2b3112f 100644
--- a/testsuites/fstests/fspatheval/patheval.doc
+++ b/testsuites/fstests/fspatheval/patheval.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fspatheval/test.c b/testsuites/fstests/fspatheval/test.c
index 7938946abd..855af33cf1 100644
--- a/testsuites/fstests/fspatheval/test.c
+++ b/testsuites/fstests/fspatheval/test.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fspermission/fspermission.doc b/testsuites/fstests/fspermission/fspermission.doc
index 46cbc8c623..848b6ed9df 100644
--- a/testsuites/fstests/fspermission/fspermission.doc
+++ b/testsuites/fstests/fspermission/fspermission.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fspermission/test.c b/testsuites/fstests/fspermission/test.c
index 53a83ed0fa..451389376b 100644
--- a/testsuites/fstests/fspermission/test.c
+++ b/testsuites/fstests/fspermission/test.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsrdwr/fsrdwr.doc b/testsuites/fstests/fsrdwr/fsrdwr.doc
index 5bf6bec18e..ab03dd8bba 100644
--- a/testsuites/fstests/fsrdwr/fsrdwr.doc
+++ b/testsuites/fstests/fsrdwr/fsrdwr.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fsrdwr/init.c b/testsuites/fstests/fsrdwr/init.c
index 02b88c9a76..aa7ccdb97f 100644
--- a/testsuites/fstests/fsrdwr/init.c
+++ b/testsuites/fstests/fsrdwr/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsrename/fsrename.doc b/testsuites/fstests/fsrename/fsrename.doc
index 8d3a4df48e..373f62278c 100644
--- a/testsuites/fstests/fsrename/fsrename.doc
+++ b/testsuites/fstests/fsrename/fsrename.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2014
# Andre Marques <andre.lousa.marques at gmail.com>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fsrename/test.c b/testsuites/fstests/fsrename/test.c
index ceeb242ce4..bdb3a7a3de 100644
--- a/testsuites/fstests/fsrename/test.c
+++ b/testsuites/fstests/fsrename/test.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014
* Andre Marques <andre.lousa.marques at gmail.com>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsrfsbitmap01/fsrfsbitmap01.doc b/testsuites/fstests/fsrfsbitmap01/fsrfsbitmap01.doc
index 90810ba921..3f03a3f62b 100644
--- a/testsuites/fstests/fsrfsbitmap01/fsrfsbitmap01.doc
+++ b/testsuites/fstests/fsrfsbitmap01/fsrfsbitmap01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2012.
# Krzysztof Miesowicz <krzysztof.miesowicz@gmail.com>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fsrfsbitmap01/test.c b/testsuites/fstests/fsrfsbitmap01/test.c
index 1365a970b6..d6dddae96f 100644
--- a/testsuites/fstests/fsrfsbitmap01/test.c
+++ b/testsuites/fstests/fsrfsbitmap01/test.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2012.
* Krzysztof Miesowicz <krzysztof.miesowicz@gmail.com>
@@ -7,9 +9,26 @@
* and pasted here. Rest of this test was written by Krzysztof Miesowicz to
* completely cover rtems_rfs_bitmap_* symbols.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/fstests/fsrofs01/init.c b/testsuites/fstests/fsrofs01/init.c
index 33194c0b44..0af88879d9 100644
--- a/testsuites/fstests/fsrofs01/init.c
+++ b/testsuites/fstests/fsrofs01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsscandir01/init.c b/testsuites/fstests/fsscandir01/init.c
index d7fb43c26b..ce9c100bdf 100644
--- a/testsuites/fstests/fsscandir01/init.c
+++ b/testsuites/fstests/fsscandir01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fsstatvfs/fsstatvfs.doc b/testsuites/fstests/fsstatvfs/fsstatvfs.doc
index 492edae1d9..c99bc8eb7d 100644
--- a/testsuites/fstests/fsstatvfs/fsstatvfs.doc
+++ b/testsuites/fstests/fsstatvfs/fsstatvfs.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2013 Andrey Mozzhuhin
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fsstatvfs/test.c b/testsuites/fstests/fsstatvfs/test.c
index 2dc7998884..e5c4b94a26 100644
--- a/testsuites/fstests/fsstatvfs/test.c
+++ b/testsuites/fstests/fsstatvfs/test.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2013 Andrey Mozzhuhin
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fssymlink/fssymlink.doc b/testsuites/fstests/fssymlink/fssymlink.doc
index ea022d1b61..f139dadc01 100644
--- a/testsuites/fstests/fssymlink/fssymlink.doc
+++ b/testsuites/fstests/fssymlink/fssymlink.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fssymlink/test.c b/testsuites/fstests/fssymlink/test.c
index 7e90ebca82..d408dcc238 100644
--- a/testsuites/fstests/fssymlink/test.c
+++ b/testsuites/fstests/fssymlink/test.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/fstime/fstime.doc b/testsuites/fstests/fstime/fstime.doc
index d4c34022e9..6b0732bd11 100644
--- a/testsuites/fstests/fstime/fstime.doc
+++ b/testsuites/fstests/fstime/fstime.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/fstests/fstime/test.c b/testsuites/fstests/fstime/test.c
index 5fa4193ae8..ab2c5d568b 100644
--- a/testsuites/fstests/fstime/test.c
+++ b/testsuites/fstests/fstime/test.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/imfs_support/fs_config.h b/testsuites/fstests/imfs_support/fs_config.h
index a25c2fcdad..6d37373584 100644
--- a/testsuites/fstests/imfs_support/fs_config.h
+++ b/testsuites/fstests/imfs_support/fs_config.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef __IMFS_SUPPORT_h
#define __IMFS_SUPPORT_h
diff --git a/testsuites/fstests/imfs_support/fs_support.c b/testsuites/fstests/imfs_support/fs_support.c
index db64fbf830..551f4401ab 100644
--- a/testsuites/fstests/imfs_support/fs_support.c
+++ b/testsuites/fstests/imfs_support/fs_support.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/fstests/jffs2_nand_support/fs_config.h b/testsuites/fstests/jffs2_nand_support/fs_config.h
new file mode 100644
index 0000000000..548f5203e6
--- /dev/null
+++ b/testsuites/fstests/jffs2_nand_support/fs_config.h
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (C) 2023 On-Line Applications Research (OAR)
+ *
+ * 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 OWNER 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.
+ */
+
+#ifndef __JFFS2_SUPPORT_h
+#define __JFFS2_SUPPORT_h
+
+#define FILESYSTEM "JFFS2"
+
+#endif
diff --git a/testsuites/fstests/jffs2_nand_support/fs_support.c b/testsuites/fstests/jffs2_nand_support/fs_support.c
new file mode 100644
index 0000000000..9e7c965735
--- /dev/null
+++ b/testsuites/fstests/jffs2_nand_support/fs_support.c
@@ -0,0 +1,257 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (C) 2023 On-Line Applications Research (OAR)
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <tmacros.h>
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <string.h>
+
+#include <rtems/jffs2.h>
+#include <rtems/libio.h>
+#include <rtems/libcsupport.h>
+
+#include "fstest.h"
+#include "fstest_support.h"
+
+#define FLASH_PAGE_SIZE (1024UL)
+/* Out of Band/Spare area size is per-page */
+#define FLASH_PAGE_OOB_SIZE (32UL)
+
+#define PAGES_PER_BLOCK (16UL)
+#define BLOCKS_PER_DEVICE (8UL)
+
+#define FLASH_OOB_SIZE (BLOCKS_PER_DEVICE * PAGES_PER_BLOCK * FLASH_PAGE_OOB_SIZE)
+#define FLASH_BLOCK_SIZE (PAGES_PER_BLOCK * FLASH_PAGE_SIZE)
+#define FLASH_SIZE (BLOCKS_PER_DEVICE * FLASH_BLOCK_SIZE)
+
+typedef struct {
+ rtems_jffs2_flash_control super;
+ unsigned char area[FLASH_SIZE];
+ unsigned char oob[FLASH_OOB_SIZE];
+} flash_control;
+
+static flash_control *get_flash_control(rtems_jffs2_flash_control *super)
+{
+ return (flash_control *) super;
+}
+
+static int flash_read(
+ rtems_jffs2_flash_control *super,
+ uint32_t offset,
+ unsigned char *buffer,
+ size_t size_of_buffer
+)
+{
+ flash_control *self = get_flash_control(super);
+ unsigned char *chunk = &self->area[offset];
+
+ memcpy(buffer, chunk, size_of_buffer);
+
+ return 0;
+}
+
+static int flash_write(
+ rtems_jffs2_flash_control *super,
+ uint32_t offset,
+ const unsigned char *buffer,
+ size_t size_of_buffer
+)
+{
+ flash_control *self = get_flash_control(super);
+ unsigned char *chunk = &self->area[offset];
+ size_t i;
+
+ for (i = 0; i < size_of_buffer; ++i) {
+ chunk[i] &= buffer[i];
+ }
+
+ return 0;
+}
+
+static int flash_erase(
+ rtems_jffs2_flash_control *super,
+ uint32_t offset
+)
+{
+ flash_control *self = get_flash_control(super);
+ uint32_t page_index = offset / FLASH_PAGE_SIZE;
+ uint32_t oob_offset = page_index * FLASH_PAGE_OOB_SIZE;
+ unsigned char *chunk = &self->area[offset];
+ unsigned char *oobchunk = &self->oob[oob_offset];
+
+ memset(chunk, 0xff, FLASH_BLOCK_SIZE);
+ memset(oobchunk, 0xff, PAGES_PER_BLOCK * FLASH_PAGE_OOB_SIZE);
+
+ return 0;
+}
+
+static int flash_read_oob(
+ rtems_jffs2_flash_control *super,
+ uint32_t offset,
+ uint8_t *buffer,
+ uint32_t size_of_buffer
+)
+{
+ flash_control *self = get_flash_control(super);
+ uint32_t page_index = offset / FLASH_PAGE_SIZE;
+ uint32_t oob_offset = page_index * FLASH_PAGE_OOB_SIZE;
+ unsigned char *chunk = &self->oob[oob_offset];
+
+ memcpy(buffer, chunk, size_of_buffer);
+
+ return 0;
+}
+
+static int flash_write_oob(
+ rtems_jffs2_flash_control *super,
+ uint32_t offset,
+ uint8_t *buffer,
+ uint32_t size_of_buffer
+)
+{
+ flash_control *self = get_flash_control(super);
+ uint32_t page_index = offset / FLASH_PAGE_SIZE;
+ uint32_t oob_offset = page_index * FLASH_PAGE_OOB_SIZE;
+ unsigned char *chunk = &self->oob[oob_offset];
+ size_t i;
+
+ for (i = 0; i < size_of_buffer; ++i) {
+ chunk[i] &= buffer[i];
+ }
+
+ return 0;
+}
+
+static int flash_block_is_bad(
+ rtems_jffs2_flash_control *super,
+ uint32_t orig_offset,
+ bool *bad
+)
+{
+ *bad = false;
+ return 0;
+}
+
+static int flash_block_mark_bad(
+ rtems_jffs2_flash_control *super,
+ uint32_t orig_offset
+)
+{
+ return 0;
+}
+
+static uint32_t flash_get_oob_size(
+ rtems_jffs2_flash_control *super
+)
+{
+ return FLASH_PAGE_OOB_SIZE;
+}
+
+static flash_control flash_instance = {
+ .super = {
+ .block_size = FLASH_BLOCK_SIZE,
+ .flash_size = FLASH_SIZE,
+ .read = flash_read,
+ .write = flash_write,
+ .erase = flash_erase,
+ .block_is_bad = flash_block_is_bad,
+ .block_mark_bad = flash_block_mark_bad,
+ .oob_read = flash_read_oob,
+ .oob_write = flash_write_oob,
+ .get_oob_size = flash_get_oob_size,
+ .write_size = FLASH_PAGE_SIZE
+ }
+};
+
+static rtems_jffs2_compressor_control compressor_instance = {
+ .compress = rtems_jffs2_compressor_rtime_compress,
+ .decompress = rtems_jffs2_compressor_rtime_decompress
+};
+
+static const rtems_jffs2_mount_data mount_data = {
+ .flash_control = &flash_instance.super,
+ .compressor_control = &compressor_instance
+};
+
+static void erase_all(void)
+{
+ memset(&flash_instance.area[0], 0xff, FLASH_SIZE);
+ memset(&flash_instance.oob[0], 0xff, FLASH_OOB_SIZE);
+}
+
+static rtems_resource_snapshot before_mount;
+
+void test_initialize_filesystem(void)
+{
+ int rv;
+
+ erase_all();
+
+ rv = mkdir(BASE_FOR_TEST, S_IRWXU | S_IRWXG | S_IRWXO);
+ rtems_test_assert(rv == 0);
+
+ rtems_resource_snapshot_take(&before_mount);
+
+ rv = mount(
+ NULL,
+ BASE_FOR_TEST,
+ RTEMS_FILESYSTEM_TYPE_JFFS2,
+ RTEMS_FILESYSTEM_READ_WRITE,
+ &mount_data
+ );
+ rtems_test_assert(rv == 0);
+}
+
+void test_shutdown_filesystem(void)
+{
+ int rv = unmount(BASE_FOR_TEST);
+ rtems_test_assert(rv == 0);
+ rtems_test_assert(rtems_resource_snapshot_check(&before_mount));
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+
+#define CONFIGURE_FILESYSTEM_JFFS2
+
+#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 40
+
+#define CONFIGURE_MAXIMUM_TASKS 2
+
+#define CONFIGURE_INIT_TASK_STACK_SIZE (32 * 1024)
+#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
diff --git a/testsuites/fstests/jffs2_support/fs_config.h b/testsuites/fstests/jffs2_support/fs_config.h
index e9a6fe7dd3..fd334d7b38 100644
--- a/testsuites/fstests/jffs2_support/fs_config.h
+++ b/testsuites/fstests/jffs2_support/fs_config.h
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2013 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <info@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef __JFFS2_SUPPORT_h
diff --git a/testsuites/fstests/jffs2_support/fs_support.c b/testsuites/fstests/jffs2_support/fs_support.c
index 31dbd50f19..fba1c4aaa6 100644
--- a/testsuites/fstests/jffs2_support/fs_support.c
+++ b/testsuites/fstests/jffs2_support/fs_support.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2013 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <info@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -150,7 +163,7 @@ void test_shutdown_filesystem(void)
#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 40
-#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_MAXIMUM_TASKS 2
#define CONFIGURE_INIT_TASK_STACK_SIZE (32 * 1024)
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
diff --git a/testsuites/fstests/mdosfs_support/fs_config.h b/testsuites/fstests/mdosfs_support/fs_config.h
index 0c30627cbe..50b190e1b8 100644
--- a/testsuites/fstests/mdosfs_support/fs_config.h
+++ b/testsuites/fstests/mdosfs_support/fs_config.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef __DOSFS_SUPPORT_h
diff --git a/testsuites/fstests/mdosfs_support/fs_support.c b/testsuites/fstests/mdosfs_support/fs_support.c
index a0b233b8d7..9ee0d2c196 100644
--- a/testsuites/fstests/mdosfs_support/fs_support.c
+++ b/testsuites/fstests/mdosfs_support/fs_support.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/fstests/mimfs_support/fs_config.h b/testsuites/fstests/mimfs_support/fs_config.h
index 5b354cf7d4..2c60891df2 100644
--- a/testsuites/fstests/mimfs_support/fs_config.h
+++ b/testsuites/fstests/mimfs_support/fs_config.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef __MIMFS_SUPPORT_h
diff --git a/testsuites/fstests/mimfs_support/fs_support.c b/testsuites/fstests/mimfs_support/fs_support.c
index 8ac430c06a..1b9cc8944b 100644
--- a/testsuites/fstests/mimfs_support/fs_support.c
+++ b/testsuites/fstests/mimfs_support/fs_support.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/mrfs_support/fs_config.h b/testsuites/fstests/mrfs_support/fs_config.h
index 2cba0a05cd..75e48952a7 100644
--- a/testsuites/fstests/mrfs_support/fs_config.h
+++ b/testsuites/fstests/mrfs_support/fs_config.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef __RFS_SUPPORT_h
diff --git a/testsuites/fstests/mrfs_support/fs_support.c b/testsuites/fstests/mrfs_support/fs_support.c
index 6e8ef9fa29..3d4fa5b9ee 100644
--- a/testsuites/fstests/mrfs_support/fs_support.c
+++ b/testsuites/fstests/mrfs_support/fs_support.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/support/fstest.h b/testsuites/fstests/support/fstest.h
index 2cea2108b4..0f805359b3 100644
--- a/testsuites/fstests/support/fstest.h
+++ b/testsuites/fstests/support/fstest.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef __FSTEST_H
diff --git a/testsuites/fstests/support/fstest_support.c b/testsuites/fstests/support/fstest_support.c
index fcf1ef86a8..f56a77b4b1 100644
--- a/testsuites/fstests/support/fstest_support.c
+++ b/testsuites/fstests/support/fstest_support.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/support/fstest_support.h b/testsuites/fstests/support/fstest_support.h
index 20cc633355..4562cbe7f7 100644
--- a/testsuites/fstests/support/fstest_support.h
+++ b/testsuites/fstests/support/fstest_support.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef __FSTEST_SUPPORT_H
#define __FSTEST_SUPPORT_H
diff --git a/testsuites/fstests/support/ramdisk_support.c b/testsuites/fstests/support/ramdisk_support.c
index 0a07495c02..419e3e1627 100644
--- a/testsuites/fstests/support/ramdisk_support.c
+++ b/testsuites/fstests/support/ramdisk_support.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/fstests/support/ramdisk_support.h b/testsuites/fstests/support/ramdisk_support.h
index 3c92d62a04..03c68b3024 100644
--- a/testsuites/fstests/support/ramdisk_support.h
+++ b/testsuites/fstests/support/ramdisk_support.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef __RAMDISK_SUPPORT_H
#define __RAMDISK_SUPPORT_H
diff --git a/testsuites/fstests/tftpfs/init.c b/testsuites/fstests/tftpfs/init.c
new file mode 100644
index 0000000000..38e429f11e
--- /dev/null
+++ b/testsuites/fstests/tftpfs/init.c
@@ -0,0 +1,6928 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuiteTestsTFTPFS
+ *
+ * @brief This source file contains the implementation of tests for libtftpfs.
+ *
+ * The tested source files are:
+ * + @ref tftpfs.c "tftpfs.c: TFTP file system"
+ * + @ref tftpDriver.c "tftpDriver.c: TFTP client library"
+ * These tests focus on testing the UDP network interaction of libtftpfs.
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h> /* malloc(), free() */
+#include <ctype.h> /* isprint() */
+#include <errno.h>
+#include <sys/stat.h> /* mkdir(), open() */
+#include <sys/types.h> /* mkdir(), open() */
+#include <sys/socket.h> /* AF_INET, SOCK_DGRAM */
+#include <fcntl.h> /* open() */
+#include <unistd.h> /* read(), close(), rmdir() */
+
+#include <rtems/tftp.h>
+#include <rtems/libio.h> /* mount(), RTEMS_FILESYSTEM_TYPE_TFTPFS */
+#include <rtems/test.h>
+#include <rtems/test-info.h>
+#include <rtems/testopts.h> /* RTEMS_TEST_VERBOSITY */
+#include <rtems.h>
+
+#include "tftpfs_udp_network_fake.h"
+#include "tftpfs_interactions.h"
+#include "tftp_driver.h"
+
+#define SERV_PORT 12345
+#define FIRST_TIMEOUT_MILLISECONDS 400
+#define TIMEOUT_MILLISECONDS 1000
+#define LARGE_BLOCK_SIZE TFTP_BLOCK_SIZE_MAX
+#define SMALL_BLOCK_SIZE 12
+#define SMALL_WINDOW_SIZE 4
+#define T_no_more_interactions() T_assert_true( \
+ _Tftp_Has_no_more_interactions(), \
+ "The TFTP client skiped some final network interactions." \
+)
+
+/*
+ * Test fixture and text context
+ */
+
+typedef struct tftp_test_context {
+ int fd0; /* File descriptor of a file read from or written to the tftpsfs */
+ void *tftp_handle; /* TFTP client handle for this file transfer */
+} tftp_test_context;
+
+static const char *tftpfs_mount_point = "/tftp";
+static const char *tftpfs_ipv4_loopback = TFTP_KNOWN_IPV4_ADDR0_STR;
+static const char *tftpfs_server0_name = TFTP_KNOWN_SERVER0_NAME;
+static const char *tftpfs_server0_ipv4 = TFTP_KNOWN_SERVER0_IPV4;
+static const char *tftpfs_file = "file.txt";
+static tftp_test_context tftp_context;
+
+static void mount_tftp_fs( const char *mount_point, const char *options )
+{
+ int result;
+
+ result = mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO );
+ T_assert_eq_int( result, 0 );
+
+ result = mount(
+ "",
+ mount_point,
+ RTEMS_FILESYSTEM_TYPE_TFTPFS,
+ RTEMS_FILESYSTEM_READ_WRITE,
+ options
+ );
+ T_assert_eq_int( result, 0 );
+}
+
+static void umount_tftp_fs( const char *mount_point )
+{
+ int result;
+
+ result = unmount( mount_point );
+ T_assert_eq_int( result, 0 );
+
+ result = rmdir( mount_point );
+ T_assert_eq_int( result, 0 );
+}
+
+static void setup_rfc1350( void *context )
+{
+ tftp_test_context *ctx = context;
+ _Tftp_Reset();
+ ctx->fd0 = -1;
+ ctx->tftp_handle = NULL;
+ mount_tftp_fs( tftpfs_mount_point, "verbose,rfc1350" );
+}
+
+static void teardown( void *context )
+{
+ tftp_test_context *ctx = context;
+ if ( ctx->fd0 >= 0 ) {
+ close( ctx->fd0 );
+ }
+ tftp_close( ctx->tftp_handle ); /* is a no-op if NULL */
+ umount_tftp_fs( tftpfs_mount_point );
+ _Tftp_Reset();
+}
+
+static const T_fixture fixture_rfc1350 = {
+ .setup = setup_rfc1350,
+ .stop = NULL,
+ .teardown = teardown,
+ .scope = NULL,
+ .initial_context = &tftp_context
+};
+
+static void setup_default_options( void *context )
+{
+ tftp_test_context *ctx = context;
+ _Tftp_Reset();
+ ctx->fd0 = -1;
+ ctx->tftp_handle = NULL;
+ mount_tftp_fs( tftpfs_mount_point, NULL );
+}
+
+static const T_fixture fixture_default_options = {
+ .setup = setup_default_options,
+ .stop = NULL,
+ .teardown = teardown,
+ .scope = NULL,
+ .initial_context = &tftp_context
+};
+
+static void setup_large_blocksize( void *context )
+{
+ tftp_test_context *ctx = context;
+ _Tftp_Reset();
+ ctx->fd0 = -1;
+ ctx->tftp_handle = NULL;
+ mount_tftp_fs(
+ tftpfs_mount_point,
+ "verbose,blocksize=" RTEMS_XSTRING(LARGE_BLOCK_SIZE) ",windowsize=1"
+ );
+}
+
+static const T_fixture fixture_large_blocksize = {
+ .setup = setup_large_blocksize,
+ .stop = NULL,
+ .teardown = teardown,
+ .scope = NULL,
+ .initial_context = &tftp_context
+};
+
+static void setup_small_opt_size( void *context )
+{
+ tftp_test_context *ctx = context;
+ _Tftp_Reset();
+ ctx->fd0 = -1;
+ ctx->tftp_handle = NULL;
+ mount_tftp_fs(
+ tftpfs_mount_point,
+ "blocksize=" RTEMS_XSTRING(SMALL_BLOCK_SIZE)
+ ",windowsize=" RTEMS_XSTRING(SMALL_WINDOW_SIZE)
+ );
+}
+
+static const T_fixture fixture_small_opt_size = {
+ .setup = setup_small_opt_size,
+ .stop = NULL,
+ .teardown = teardown,
+ .scope = NULL,
+ .initial_context = &tftp_context
+};
+
+static void setup_mount_point( void *context )
+{
+ int result;
+
+ _Tftp_Reset();
+ result = mkdir( tftpfs_mount_point, S_IRWXU | S_IRWXG | S_IRWXO );
+ T_assert_eq_int( result, 0 );
+}
+
+static void teardown_mount_point( void *context )
+{
+ int result;
+
+ result = rmdir( tftpfs_mount_point );
+ T_assert_eq_int( result, 0 );
+ _Tftp_Reset();
+}
+
+static const T_fixture fixture_mount_point = {
+ .setup = setup_mount_point,
+ .stop = NULL,
+ .teardown = teardown_mount_point,
+ .scope = NULL,
+ .initial_context = &tftp_context
+};
+
+/*
+ * Test helper functions
+ */
+
+/*
+ * Produce an artificial file content to be able to compare the
+ * sent and the received file later on.
+ */
+static uint8_t get_file_content( size_t pos )
+{
+ static const size_t frame_size = 100;
+ static const size_t num_size = 11;
+ static const size_t alpha_size = 53;
+ char buf[10];
+ size_t remainder = pos % frame_size;
+
+ switch ( remainder ) {
+ case 0:
+ case 1:
+ case 2:
+ sprintf( buf, "%9zu", pos - remainder );
+ return buf[remainder];
+ case 3:
+ case 7:
+ return '\'';
+ case 4:
+ case 5:
+ case 6:
+ sprintf( buf, "%9zu", pos - remainder );
+ return buf[remainder-1];
+ case 8:
+ case 9:
+ case 10:
+ sprintf( buf, "%9zu", pos - remainder );
+ return buf[remainder-2];
+ default:
+ pos -= ( pos / frame_size + 1 ) * num_size;
+ remainder = pos % alpha_size;
+ return ( remainder <= 'Z' - '@' ) ?
+ remainder + '@' : remainder - ( 'Z' - '@' + 1) + 'a';
+ }
+}
+
+/*
+ * Produce bad file content.
+ */
+static uint8_t get_bad_file_content( size_t pos )
+{
+ static const char buf[] = "BAD!";
+ return (uint8_t) buf[ pos % strlen( buf ) ];
+}
+
+static const char *create_tftpfs_path(
+ const char *sever_addr,
+ const char *file_name
+)
+{
+ static char buffer[100];
+ int len;
+
+ len = snprintf(
+ buffer,
+ sizeof( buffer ),
+ "%s/%s:%s",
+ tftpfs_mount_point,
+ sever_addr,
+ file_name
+ );
+
+ T_quiet_gt_int( len, 0 );
+ T_quiet_lt_int( len, (int) sizeof( buffer ) );
+ return buffer;
+}
+
+static int read_tftp_file(
+ const char *path,
+ size_t buffer_size,
+ size_t max_bytes,
+ int *fd
+)
+{
+ char *data_buffer;
+ int result = 0;
+ int res;
+ ssize_t i;
+ ssize_t bytes = 1;
+ ssize_t bytes_total = 0;
+ int errno_store;
+
+ T_log( T_VERBOSE, "File system: open( %s, O_RDONLY )", path );
+ errno = 0;
+ *fd = open( path, O_RDONLY );
+ errno_store = errno;
+ T_log(
+ T_VERBOSE,
+ "File system: [open( %s, O_RDONLY )] = fd:%d (errno = %d)",
+ path,
+ *fd,
+ errno
+ );
+
+ if ( *fd < 0 ) {
+ /* open() may intentionally fail (e.g. test for invalid server address) */
+ T_log( T_VERBOSE, "File system: cannot open \"%s\" for reading", path );
+ errno = errno_store;
+ result = -1;
+ }
+
+ if ( *fd >= 0 ) {
+ data_buffer = malloc( buffer_size );
+
+ while ( bytes > 0 && max_bytes >= bytes ) {
+ errno = 0;
+ bytes = read(
+ *fd,
+ data_buffer,
+ ( max_bytes > buffer_size ) ? buffer_size : max_bytes
+ );
+ errno_store = errno;
+ T_log(
+ T_VERBOSE,
+ "File system: [read( fd:%d, size=%zu )] = %zd (errno = %d)",
+ *fd,
+ ( max_bytes > buffer_size ) ? buffer_size : max_bytes,
+ bytes,
+ errno
+ );
+
+ if ( bytes > 0 ) {
+ max_bytes -= bytes;
+ for ( i = 0; i < bytes; ++i ) {
+ if ( data_buffer[i] != get_file_content( bytes_total + i ) ) {
+ T_true(
+ false,
+ "File system: wrong file content '%c' (expected '%c') "
+ "at position %zd",
+ (int) ( isprint( (int) data_buffer[i] ) ? data_buffer[i] : '?' ),
+ (int) get_file_content( bytes_total + i ),
+ bytes_total + i
+ );
+ bytes = 0;
+ break;
+ }
+ } /* for */
+ bytes_total += bytes;
+ }
+ if ( bytes == 0 ) {
+ result = (int) bytes_total;
+ }
+ if ( bytes < 0 ) {
+ /* read() may intentionally fail (e.g. test lost network connection) */
+ T_log(
+ T_VERBOSE,
+ "File system: error reading from \"%s\" after %zd bytes",
+ path,
+ bytes_total
+ );
+ result = (int) bytes_total;
+ }
+ } /* while */
+
+ free( data_buffer );
+ } /* if */
+
+ if ( bytes > 0 ) {
+ T_log(
+ T_VERBOSE,
+ "File system: reader closes \"%s\" after %zd bytes",
+ path,
+ bytes_total
+ );
+ result = (int) bytes_total;
+ }
+
+ if ( *fd >= 0 ) {
+ res = close( *fd );
+ T_log(
+ T_VERBOSE,
+ "File system: [close( %s (fd:%d) )] = %d",
+ path,
+ *fd,
+ res
+ );
+ *fd = -1;
+ T_eq_int( res, 0 );
+ }
+
+ errno = errno_store;
+ return result;
+}
+
+static int write_tftp_file(
+ const char *path,
+ size_t file_size,
+ size_t buffer_size,
+ int *fd )
+{
+ char *data_buffer;
+ int result = 0;
+ int res;
+ ssize_t i;
+ ssize_t bytes;
+ ssize_t bytes_total = 0;
+ int errno_store;
+
+ errno = 0;
+ T_log( T_VERBOSE, "File system: open( %s, O_WRONLY )", path );
+ *fd = open( path, O_WRONLY );
+ errno_store = errno;
+ T_log(
+ T_VERBOSE,
+ "File system: [open( %s, O_WRONLY )] = fd:%d (errno = %d)",
+ path,
+ *fd,
+ errno
+ );
+ if ( *fd < 0 ) {
+ /* open() may intentionally fail (e.g. test for invalid server address) */
+ T_log( T_VERBOSE, "File system: cannot open \"%s\" for writing", path );
+ errno = errno_store;
+ result = -1;
+ }
+
+ if ( *fd >= 0 ) {
+ data_buffer = malloc( buffer_size );
+
+ do { /* Try also to write files with 0 bytes size */
+ bytes = ( file_size - bytes_total >= buffer_size ) ?
+ buffer_size : file_size - bytes_total;
+ for ( i = 0; i < bytes; ++i ) {
+ data_buffer[i] = get_file_content( bytes_total + i );
+ }
+ errno = 0;
+ bytes = write( *fd, data_buffer, i );
+ errno_store = errno;
+ T_log(
+ T_VERBOSE,
+ "File system: [write( fd:%d, size=%zd )] = %zd (errno = %d)",
+ *fd,
+ i,
+ bytes,
+ errno
+ );
+ if ( bytes > 0 ) {
+ bytes_total += bytes;
+ result = (int) bytes_total;
+ }
+ if ( bytes != i ) {
+ /* write() may intentionally fail (e.g. test lost network connection) */
+ T_log(
+ T_VERBOSE,
+ "File system: error writing to \"%s\" after %zd bytes",
+ path,
+ bytes_total
+ );
+ break;
+ }
+ } while( bytes_total < file_size );
+
+ free( data_buffer );
+ } /* if */
+
+ if ( *fd >= 0 ) {
+ res = close( *fd );
+ if (res != 0) {
+ errno_store = errno;
+ result = res;
+ }
+ T_log(
+ T_VERBOSE,
+ "File system: [close( %s (fd:%d) )] = %d",
+ path,
+ *fd,
+ res
+ );
+ *fd = -1;
+ }
+
+ errno = errno_store;
+ return result;
+}
+
+static int rdwt_tftp_client_file(
+ const char *hostname,
+ const char *filename,
+ bool is_for_reading,
+ ssize_t file_size, /* Only used when `is_for_reading == false` */
+ const tftp_net_config *config,
+ void **tftp_handle
+)
+{
+ const static size_t buffer_size = 4001;
+ char *data_buffer;
+ int res = 0;
+ ssize_t i;
+ ssize_t bytes = 1;
+ ssize_t bytes_total = 0;
+ int errno_store = 0;
+
+ if ( *tftp_handle == NULL ) {
+ T_log(
+ T_VERBOSE,
+ "TFTP Client: tftp_open( \"%s\", \"%s\", %s, ... )",
+ hostname,
+ filename,
+ is_for_reading ? "read" : "write"
+ );
+ res = tftp_open(
+ hostname,
+ filename,
+ is_for_reading,
+ config,
+ tftp_handle
+ );
+ T_log(
+ T_VERBOSE,
+ "TFTP Client: [tftp_open( \"%s\", \"%s\", %s, ... )] = %d (handle:%p)",
+ hostname,
+ filename,
+ is_for_reading ? "read" : "write",
+ res,
+ *tftp_handle
+ );
+ } else {
+ T_log(
+ T_VERBOSE,
+ "TFTP Client: \"%s\":\"%s\" already open for %s, handle: %p ",
+ hostname,
+ filename,
+ is_for_reading ? "read" : "write",
+ *tftp_handle
+ );
+ }
+
+ if ( res != 0 ) {
+ /* open() may intentionally fail (e.g. test for invalid server address) */
+ T_log(
+ T_VERBOSE,
+ "TFTP client: cannot open \"%s\":\"%s\" for %s",
+ hostname,
+ filename,
+ is_for_reading ? "reading" : "writing"
+ );
+ errno_store = res;
+ } else {
+ T_assert_not_null( *tftp_handle );
+ }
+
+ if ( *tftp_handle != NULL ) {
+ data_buffer = malloc( buffer_size );
+
+ if ( is_for_reading ) {
+
+ /* Read file */
+ while ( bytes > 0 ) {
+ errno = 0;
+ bytes = tftp_read(
+ *tftp_handle,
+ data_buffer,
+ buffer_size
+ );
+ T_log(
+ T_VERBOSE,
+ "TFTP Client: [tftp_read( %p, size=%zu )] = %zd",
+ *tftp_handle,
+ buffer_size,
+ bytes
+ );
+
+ if ( bytes > 0 ) {
+ for ( i = 0; i < bytes; ++i ) {
+ if ( data_buffer[i] != get_file_content( bytes_total + i ) ) {
+ T_true(
+ false,
+ "FTP Client: wrong file content '%c' (expected '%c') at positon %zd",
+ (int) ( isprint( (int) data_buffer[i] ) ? data_buffer[i] : '?' ),
+ (int) get_file_content( bytes_total + i ),
+ bytes_total + i
+ );
+ bytes = 0;
+ break;
+ }
+ } /* for */
+ bytes_total += bytes;
+ }
+ if ( bytes < 0 ) {
+ /* read() may intentionally fail (e.g. test lost network connection) */
+ T_log(
+ T_VERBOSE,
+ "TFTP Client: error reading from \"%s\":\"%s\" after %zd bytes",
+ hostname,
+ filename,
+ bytes_total
+ );
+ errno_store = -bytes;
+ }
+ } /* while */
+ } else {
+
+ /* Write file */
+ do { /* Try also to write files with 0 bytes size */
+ bytes = ( file_size - bytes_total >= buffer_size ) ?
+ buffer_size : file_size - bytes_total;
+ for ( i = 0; i < bytes; ++i ) {
+ data_buffer[i] = get_file_content( bytes_total + i );
+ }
+ errno = 0;
+ bytes = tftp_write( *tftp_handle, data_buffer, i );
+ T_log(
+ T_VERBOSE,
+ "TFTP Client: [tftp_write( %p, size=%zd )] = %zd",
+ *tftp_handle,
+ i,
+ bytes
+ );
+ if ( bytes > 0 ) {
+ bytes_total += bytes;
+ } else {
+ errno_store = -bytes;
+ }
+ if ( bytes != i ) {
+ /* write() may intentionally fail (e.g. test lost network connection) */
+ T_log(
+ T_VERBOSE,
+ "TFTP Client: error writing to \"%s\":\"%s\" after %zd bytes",
+ hostname,
+ filename,
+ bytes_total
+ );
+ break;
+ }
+ } while( bytes_total < file_size );
+ } /* if ( is_for_reading ) */
+
+ free( data_buffer );
+ } /* if ( *tftp_handle != NULL ) */
+
+ if ( *tftp_handle != NULL ) {
+ res = tftp_close( *tftp_handle );
+ T_log(
+ T_VERBOSE,
+ "TFTP Client: [tftp_close( \"%s\":\"%s\" (handle:%p) )] = %d",
+ hostname,
+ filename,
+ *tftp_handle,
+ res
+ );
+ *tftp_handle = NULL; /* Avoid that the fixture closes it again */
+ T_eq_int( res, 0 );
+ } /* if ( *tftp_handle != NULL ) */
+
+ errno = errno_store;
+ return (int) bytes_total;
+}
+
+/*
+ * Unit test cases
+ */
+
+/*
+ * This is a classical unit test for the function tftp_initialize_net_config().
+ * Tests:
+ * * tftp_initialize_net_config() sets correct default values as defined
+ * in the documentation of the data structures tftp_net_config
+ * and tftp_options.
+ */
+T_TEST_CASE( tftp_initialize_net_config )
+{
+ tftp_net_config config;
+ memset( &config, 0, sizeof( config ) );
+ tftp_initialize_net_config( &config );
+ T_eq_u16( config.retransmissions, 6 );
+ T_eq_u16( config.server_port, 69 );
+ T_eq_u32( config.timeout, 1000 );
+ T_eq_u32( config.first_timeout, 400 );
+ T_eq_u16( config.options.block_size, 1456 );
+ T_eq_u16( config.options.window_size, 8 );
+}
+
+/*
+ * This is a classical unit test for the function tftp_initialize_net_config().
+ * Tests:
+ * * tftp_initialize_net_config() does not crash when called with a
+ * NULL pointer.
+ */
+T_TEST_CASE( tftp_initialize_net_config_null )
+{
+ tftp_initialize_net_config( NULL );
+}
+
+/*
+ * This is a classical unit test for the function tftp_open().
+ * Tests:
+ * * tftp_open() returns an error when called with a NULL pointer
+ * for hostname.
+ */
+T_TEST_CASE_FIXTURE( tftp_open_null_hostname, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int res;
+
+ res = tftp_open(
+ NULL, /* hostname */
+ tftpfs_file,
+ true, /* is_for_reading */
+ NULL, /* config */
+ &ctx->tftp_handle
+ );
+ T_eq_int( res, EINVAL );
+ T_null( ctx->tftp_handle );
+}
+
+/*
+ * This is a classical unit test for the function tftp_open().
+ * Tests:
+ * * tftp_open() returns an error when called with a NULL pointer
+ * for filename.
+ */
+T_TEST_CASE_FIXTURE( tftp_open_null_filename, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int res;
+
+ res = tftp_open(
+ tftpfs_ipv4_loopback,
+ NULL, /* filename */
+ true, /* is_for_reading */
+ NULL, /* config */
+ &ctx->tftp_handle
+ );
+ T_eq_int( res, EINVAL );
+ T_null( ctx->tftp_handle );
+}
+
+/*
+ * This is a classical unit test for the function tftp_open().
+ * Tests:
+ * * tftp_open() returns an error when called with a NULL pointer
+ * for tftp_handle.
+ */
+T_TEST_CASE( tftp_open_null_tftp_handle )
+{
+ int res;
+
+ res = tftp_open(
+ tftpfs_ipv4_loopback,
+ tftpfs_file,
+ true, /* is_for_reading */
+ NULL, /* config */
+ NULL /* tftp_handle */
+ );
+ T_eq_int( res, EINVAL );
+}
+
+/*
+ * This is a classical unit test for the function tftp_open().
+ * Tests:
+ * * tftp_open() returns an error when called with value 0 for
+ * option window_size.
+ */
+T_TEST_CASE_FIXTURE( tftp_open_illegal_window_size, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ tftp_net_config config;
+ int res;
+
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ tftp_initialize_net_config( &config );
+ config.options.window_size = 1 - 1;
+
+ res = tftp_open(
+ tftpfs_ipv4_loopback,
+ tftpfs_file,
+ true, /* is_for_reading */
+ &config,
+ &ctx->tftp_handle
+ );
+ T_eq_int( res, EINVAL );
+ T_null( ctx->tftp_handle );
+ T_no_more_interactions();
+}
+
+/*
+ * This is a classical unit test for the function tftp_open().
+ * Tests:
+ * * tftp_open() returns an error when called with a too small
+ * value for option block_size.
+ */
+T_TEST_CASE_FIXTURE( tftp_open_block_size_too_small, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ tftp_net_config config;
+ int res;
+
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ tftp_initialize_net_config( &config );
+ config.options.block_size = 8 - 1;
+
+ res = tftp_open(
+ tftpfs_ipv4_loopback,
+ tftpfs_file,
+ true, /* is_for_reading */
+ &config,
+ &ctx->tftp_handle
+ );
+ T_eq_int( res, EINVAL );
+ T_null( ctx->tftp_handle );
+ T_no_more_interactions();
+}
+
+/*
+ * This is a classical unit test for the function tftp_open().
+ * Tests:
+ * * tftp_open() returns an error when called with a too large
+ * value for option block_size.
+ */
+T_TEST_CASE_FIXTURE( tftp_open_block_size_too_large, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ tftp_net_config config;
+ int res;
+
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ tftp_initialize_net_config( &config );
+ config.options.block_size = 65464 + 1;
+
+ res = tftp_open(
+ tftpfs_ipv4_loopback,
+ tftpfs_file,
+ false, /* is_for_reading */
+ &config,
+ &ctx->tftp_handle
+ );
+ T_eq_int( res, EINVAL );
+ T_null( ctx->tftp_handle );
+ T_no_more_interactions();
+}
+
+/*
+ * This is a classical unit test for the function tftp_read().
+ * Tests:
+ * * tftp_read() returns an error when called with a NULL pointer
+ * for tftp_handle.
+ */
+T_TEST_CASE( tftp_read_null_tftp_handle )
+{
+ char data_buffer[10];
+ ssize_t res;
+
+ res = tftp_read(
+ NULL, /* tftp_handle */
+ data_buffer,
+ sizeof( data_buffer)
+ );
+ T_eq_int( res, -EIO );
+}
+
+/*
+ * This is a classical unit test for the function tftp_read().
+ * Tests:
+ * * tftp_read() returns an error when called with a NULL pointer
+ * for buffer.
+ */
+T_TEST_CASE( tftp_read_null_buffer )
+{
+ int tftp_handle;
+ ssize_t res;
+
+ res = tftp_read(
+ &tftp_handle,
+ NULL, /* buffer */
+ 8
+ );
+ T_eq_int( res, -EIO );
+}
+
+/*
+ * This is a classical unit test for the function tftp_write().
+ * Tests:
+ * * tftp_write() returns an error when called with a NULL pointer
+ * for tftp_handle.
+ */
+T_TEST_CASE( tftp_write_null_tftp_handle )
+{
+ char data_buffer[10] = { 0 };
+ ssize_t res;
+
+ res = tftp_write(
+ NULL, /* tftp_handle */
+ data_buffer,
+ sizeof( data_buffer)
+ );
+ T_eq_int( res, -EIO );
+}
+
+/*
+ * This is a classical unit test for the function tftp_write().
+ * Tests:
+ * * tftp_write() returns an error when called with a NULL pointer
+ * for buffer.
+ */
+T_TEST_CASE( tftp_write_null_buffer )
+{
+ int tftp_handle;
+ ssize_t res;
+
+ res = tftp_write(
+ &tftp_handle,
+ NULL, /* buffer */
+ 8
+ );
+ T_eq_int( res, -EIO );
+}
+
+/*
+ * This is a classical unit test for the function tftp_close().
+ * Tests:
+ * * tftp_close() returns 0 when called with a NULL pointer.
+ */
+T_TEST_CASE( tftp_close_null )
+{
+ T_eq_int( tftp_close( NULL ), 0 );
+}
+
+/*
+ * This is a classical unit test for the function _Tftpfs_Parse_options().
+ * Tests:
+ * * Parsing an empty string has no effects.
+ */
+T_TEST_CASE( _Tftpfs_Parse_options_empty )
+{
+ size_t err_pos;
+ uint32_t flags = 0;
+ tftp_net_config config;
+
+ tftp_initialize_net_config( &config );
+ err_pos = _Tftpfs_Parse_options( "", &config, &flags );
+ T_eq_sz( err_pos, 0 );
+ T_eq_u16( config.options.block_size, TFTP_DEFAULT_BLOCK_SIZE );
+ T_eq_u16( config.options.window_size, TFTP_DEFAULT_WINDOW_SIZE );
+ T_eq_u32( flags, 0 );
+}
+
+/*
+ * This is a classical unit test for the function _Tftpfs_Parse_options().
+ * Tests:
+ * * Providing an NULL pointer instead of a string has no effect.
+ */
+T_TEST_CASE( _Tftpfs_Parse_options_null )
+{
+ size_t err_pos;
+ uint32_t flags = 0;
+ tftp_net_config config;
+
+ tftp_initialize_net_config( &config );
+ err_pos = _Tftpfs_Parse_options( NULL, &config, &flags );
+ T_eq_sz( err_pos, 0 );
+ T_eq_u16( config.options.block_size, TFTP_DEFAULT_BLOCK_SIZE );
+ T_eq_u16( config.options.window_size, TFTP_DEFAULT_WINDOW_SIZE );
+ T_eq_u32( flags, 0 );
+}
+
+/*
+ * This is a classical unit test for the function _Tftpfs_Parse_options().
+ * Tests:
+ * * Option "verbose" has the desired effect.
+ */
+T_TEST_CASE( _Tftpfs_Parse_options_verbose )
+{
+ size_t err_pos;
+ uint32_t flags = 0;
+ tftp_net_config config;
+
+ tftp_initialize_net_config( &config );
+ err_pos = _Tftpfs_Parse_options( "verbose", &config, &flags );
+ T_eq_sz( err_pos, 0 );
+ T_eq_u16( config.options.block_size, TFTP_DEFAULT_BLOCK_SIZE );
+ T_eq_u16( config.options.window_size, TFTP_DEFAULT_WINDOW_SIZE );
+ T_gt_u32( flags, 0 );
+}
+
+/*
+ * This is a classical unit test for the function _Tftpfs_Parse_options().
+ * Tests:
+ * * Option "rfc1350" has the desired effect.
+ */
+T_TEST_CASE( _Tftpfs_Parse_options_rfc1350 )
+{
+ size_t err_pos;
+ uint32_t flags = 0;
+ tftp_net_config config;
+
+ tftp_initialize_net_config( &config );
+ err_pos = _Tftpfs_Parse_options( "rfc1350", &config, &flags );
+ T_eq_sz( err_pos, 0 );
+ T_eq_u16( config.options.block_size, TFTP_RFC1350_BLOCK_SIZE );
+ T_eq_u16( config.options.window_size, TFTP_RFC1350_WINDOW_SIZE );
+ T_eq_u32( flags, 0 );
+}
+
+/*
+ * This is a classical unit test for the function _Tftpfs_Parse_options().
+ * Tests:
+ * * Option "blocksize" has the desired effect.
+ */
+T_TEST_CASE( _Tftpfs_Parse_options_blocksize )
+{
+ size_t err_pos;
+ uint32_t flags = 0;
+ tftp_net_config config;
+
+ tftp_initialize_net_config( &config );
+ err_pos = _Tftpfs_Parse_options( "blocksize=21", &config, &flags );
+ T_eq_sz( err_pos, 0 );
+ T_eq_u16( config.options.block_size, 21 );
+ T_eq_u16( config.options.window_size, TFTP_DEFAULT_WINDOW_SIZE );
+ T_eq_u32( flags, 0 );
+}
+
+/*
+ * This is a classical unit test for the function _Tftpfs_Parse_options().
+ * Tests:
+ * * Option "windowsize" has the desired effect.
+ */
+T_TEST_CASE( _Tftpfs_Parse_options_windowsize )
+{
+ size_t err_pos;
+ uint32_t flags = 0;
+ tftp_net_config config;
+
+ tftp_initialize_net_config( &config );
+ err_pos = _Tftpfs_Parse_options( "windowsize=13", &config, &flags );
+ T_eq_sz( err_pos, 0 );
+ T_eq_u16( config.options.block_size, TFTP_DEFAULT_BLOCK_SIZE );
+ T_eq_u16( config.options.window_size, 13 );
+ T_eq_u32( flags, 0 );
+}
+
+/*
+ * This is a classical unit test for the function _Tftpfs_Parse_options().
+ * Tests:
+ * * Processing of all options in one string works as expected.
+ */
+T_TEST_CASE( _Tftpfs_Parse_options_all )
+{
+ size_t err_pos;
+ uint32_t flags = 0;
+ tftp_net_config config;
+
+ tftp_initialize_net_config( &config );
+ err_pos = _Tftpfs_Parse_options( "rfc1350,blocksize=1234,windowsize=4567,verbose", &config, &flags );
+ T_eq_sz( err_pos, 0 );
+ T_eq_u16( config.options.block_size, 1234 );
+ T_eq_u16( config.options.window_size, 4567 );
+ T_gt_u32( flags, 0 );
+}
+
+/*
+ * This is a classical unit test for the function _Tftpfs_Parse_options().
+ * Tests:
+ * * Parser ignores unnecessary commas.
+ */
+T_TEST_CASE( _Tftpfs_Parse_options_surplus_comma )
+{
+ size_t err_pos;
+ uint32_t flags = 0;
+ tftp_net_config config;
+
+ tftp_initialize_net_config( &config );
+ err_pos = _Tftpfs_Parse_options( ",blocksize=1234,,,,windowsize=4567,,", &config, &flags );
+ T_eq_sz( err_pos, 0 );
+ T_eq_u16( config.options.block_size, 1234 );
+ T_eq_u16( config.options.window_size, 4567 );
+ T_eq_u32( flags, 0 );
+}
+
+/*
+ * This is a classical unit test for the function _Tftpfs_Parse_options().
+ * Tests:
+ * * Parser detects a bad value.
+ */
+T_TEST_CASE( _Tftpfs_Parse_options_bad_value )
+{
+ size_t err_pos;
+ uint32_t flags = 0;
+ tftp_net_config config;
+
+ tftp_initialize_net_config( &config );
+ err_pos = _Tftpfs_Parse_options( "blocksize=123.4,windowsize=4567", &config, &flags );
+ T_eq_sz( err_pos, 14 );
+}
+
+/*
+ * This is a classical unit test for the function _Tftpfs_Parse_options().
+ * Tests:
+ * * Parser detects an illegal option.
+ */
+T_TEST_CASE( _Tftpfs_Parse_options_illegal_option )
+{
+ size_t err_pos;
+ uint32_t flags = 0;
+ tftp_net_config config;
+
+ tftp_initialize_net_config( &config );
+ err_pos = _Tftpfs_Parse_options( "blocksize=123,illegal", &config, &flags );
+ T_eq_sz( err_pos, 15 );
+}
+
+/*
+ * This is a classical unit test for the function _Tftpfs_Parse_options().
+ * Tests:
+ * * Parser detects a truncated option.
+ */
+T_TEST_CASE( _Tftpfs_Parse_options_truncated_option )
+{
+ size_t err_pos;
+ uint32_t flags = 0;
+ tftp_net_config config;
+
+ tftp_initialize_net_config( &config );
+ err_pos = _Tftpfs_Parse_options( "blocksize", &config, &flags );
+ T_eq_sz( err_pos, 1 );
+}
+
+/*
+ * This is a classical unit test for the function rtems_tftpfs_initialize().
+ * Tests:
+ * * Correct error handling in case mount options cannot be parsed.
+ */
+T_TEST_CASE_FIXTURE( mount_with_bad_options, &fixture_mount_point )
+{
+ int result;
+
+ result = mount(
+ "",
+ tftpfs_mount_point,
+ RTEMS_FILESYSTEM_TYPE_TFTPFS,
+ RTEMS_FILESYSTEM_READ_WRITE,
+ "windowsize=4567,blocksize=123bad"
+ );
+ T_assert_le_int( result, -1 );
+ T_assert_eq_int( errno, EINVAL );
+}
+
+/*
+ * Test cases for the TFTP client interface
+ *
+ * Since the TFTP file system uses the TFTP client interface for all
+ * file transfers, the function of the TFTP client is almost
+ * completely tested by the tests for the file system interface.
+ * The test cases here - for the TFTP client interface - test only
+ * those aspects not (easily) testable through the file system interface.
+ */
+
+/*
+ * Read a file from the server using the TFTP client interface.
+ * The file is one byte long. No timeouts, packet loss, ...
+ * Tests:
+ * * tftp_open() called with NULL for config uses
+ * default configuration values.
+ * * Read a file using only the TFTP client (i.e. not using the
+ * file system)
+ */
+T_TEST_CASE_FIXTURE( client_open_with_NULL_config, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ 1, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += 1;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = rdwt_tftp_client_file(
+ tftpfs_ipv4_loopback,
+ tftpfs_file,
+ true, /* is_for_reading */
+ -1, /* file_size for writing files only */
+ NULL, /* config */
+ &ctx->tftp_handle
+ );
+ T_eq_sz( bytes_read, pos_in_file );
+ T_eq_int( errno, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a very short file from the server using the TFTP client interface.
+ * The file is one data packet long. Use none-default configuration values.
+ * The second and the third DATA packets are lost. This causes
+ * a termination of the connection because only two retransmissions are
+ * configured.
+ * Tests:
+ * * tftp_open() called with all configuration values having
+ * none default values.
+ * * The test writes a file using only the TFTP client (i.e. not using the
+ * file system API).
+ * * The client uses the none default configuration values:
+ * retransmissions, server_port, timeout, first_timeout,
+ * block_size, window_size.
+ * * The server sends the options in a different order than the client.
+ * * The option names in the OACK can be upper or lower case.
+ * * If windowsize > 1, the client sends ACK only each windowsize packet.
+ * * If windowsize > 1 and no packet is received in the timeout period,
+ * the client retransmits the last ACK.
+ * * The client makes a limited number of retransmissions attempts
+ * and then terminates the connections with an error.
+ */
+T_TEST_CASE_FIXTURE( client_open_with_none_default_config, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ tftp_net_config config;
+ int bytes_read;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+ uint16_t retransmissions = 2;
+ uint16_t server_port = 3456;
+ uint32_t timeout = 300;
+ uint32_t first_timeout = 200;
+ uint16_t block_size = 8;
+ uint16_t window_size = 2;
+ const char options[] =
+ "WINDOWSIZE" "\0" "2\0"
+ TFTP_OPTION_BLKSIZE "\0" "8";
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ server_port,
+ tftpfs_ipv4_loopback,
+ block_size,
+ window_size,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ first_timeout,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ first_timeout,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ pos_in_file,
+ block_size, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ first_timeout,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ block_size, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD,
+ first_timeout /* Timeout: No packet received within timeout period */
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num - 1, /* Block number OK: Last block successfully received */
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD,
+ timeout /* Timeout: No packet received within timeout period */
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_NO_USER,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ tftp_initialize_net_config( &config );
+ config.retransmissions = retransmissions;
+ config.server_port = server_port;
+ config.timeout = timeout;
+ config.first_timeout = first_timeout;
+ config.options.block_size = block_size;
+ config.options.window_size = window_size;
+
+ bytes_read = rdwt_tftp_client_file(
+ tftpfs_ipv4_loopback,
+ tftpfs_file,
+ true, /* is_for_reading */
+ -1, /* file_size for writing files only */
+ &config,
+ &ctx->tftp_handle
+ );
+
+ /*
+ * Not a bug but not nice: The client has received data before the connection
+ * breaks down due to timeout and this data is not provided to the user.
+ */
+
+ T_eq_sz( bytes_read, 0 );
+ T_eq_int( errno, EIO );
+ T_no_more_interactions();
+}
+
+/*
+ * Attempt to write to a file open for reading using the TFTP client interface.
+ * Tests:
+ * * tftp_open() called with NULL for config uses
+ * default configuration values.
+ * * Read a file using only the TFTP client (i.e. not using the
+ * file system)
+ * * The attempt to write to a file open for reading is rejected
+ * with an error.
+ * * The server receives an error message to indicate that the client
+ * closes the connection without having transferred data.
+ */
+T_TEST_CASE_FIXTURE( client_write_to_file_opened_for_reading, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int res = 0;
+ const char options[] =
+ TFTP_OPTION_BLKSIZE "\0"
+ RTEMS_XSTRING( TFTP_DEFAULT_BLOCK_SIZE ) "\0"
+ TFTP_OPTION_WINDOWSIZE"\0"
+ RTEMS_XSTRING( TFTP_DEFAULT_WINDOW_SIZE );
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ /* Sending an ACK at this place before the ERROR would be OK, too. */
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_NO_USER,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ res = tftp_open(
+ tftpfs_ipv4_loopback,
+ tftpfs_file,
+ true, /* is_for_reading */
+ NULL, /* Config */
+ &ctx->tftp_handle
+ );
+ T_eq_int( res, 0 );
+ T_assert_not_null( ctx->tftp_handle );
+
+ res = (int) tftp_write( ctx->tftp_handle, &res, 1 );
+ T_eq_int( res, -EIO );
+
+ res = tftp_close( ctx->tftp_handle );
+ ctx->tftp_handle = NULL; /* Avoid that the fixture closes it again */
+ T_eq_int( res, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Attempt to read from a file open for writing using the TFTP client
+ * interface.
+ * Tests:
+ * * tftp_open() called with NULL for config uses
+ * default configuration values.
+ * * Read a file using only the TFTP client (i.e. not using the
+ * file system)
+ * * Attempt to read from a file open for writing is rejected with an error.
+ */
+T_TEST_CASE_FIXTURE( client_read_to_file_opened_for_writing, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int res = 0;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+ const char options[] =
+ TFTP_OPTION_BLKSIZE "\0"
+ RTEMS_XSTRING( TFTP_DEFAULT_BLOCK_SIZE ) "\0"
+ TFTP_OPTION_WINDOWSIZE"\0"
+ RTEMS_XSTRING( TFTP_DEFAULT_WINDOW_SIZE );
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ 0, /* Data size */
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += 0;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ res = tftp_open(
+ tftpfs_ipv4_loopback,
+ tftpfs_file,
+ false, /* is_for_reading */
+ NULL, /* config */
+ &ctx->tftp_handle
+ );
+ T_eq_int( res, 0 );
+ T_assert_not_null( ctx->tftp_handle );
+
+ res = (int) tftp_read( ctx->tftp_handle, &res, 1 );
+ T_eq_int( res, -EIO );
+
+ res = tftp_close( ctx->tftp_handle );
+ ctx->tftp_handle = NULL; /* Avoid that the fixture closes it again */
+ T_eq_int( res, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using the TFTP client interface.
+ * The test uses the default options.
+ * The file is 2 and a half data packet long. No timeouts, packet loss, ...
+ * Tests:
+ * * The default options (windowsize = 8 and blocksize = 1456) are used.
+ * * tftp_open() is called with default configuration values.
+ * * The test writes a file using only the TFTP client (i.e. not using the
+ * file system)
+ * * The code supports the use of a server name instead of an IP address.
+ * * The first window is also the last window.
+ * * The only ACK packet is the one at the end of window.
+ * * Between sending data packets, the client checks whether any packets
+ * are received.
+ * * The client handles files correctly which end in the middle of a window.
+ */
+T_TEST_CASE_FIXTURE( client_write_simple_file, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ tftp_net_config config;
+ int bytes_written;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+ const char options[] =
+ TFTP_OPTION_BLKSIZE "\0"
+ RTEMS_XSTRING( TFTP_DEFAULT_BLOCK_SIZE ) "\0"
+ TFTP_OPTION_WINDOWSIZE "\0"
+ RTEMS_XSTRING( TFTP_DEFAULT_WINDOW_SIZE );
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_server0_ipv4,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num++,
+ pos_in_file,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ true
+ );
+ pos_in_file += TFTP_DEFAULT_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD,
+ DO_NOT_WAIT_FOR_ANY_TIMEOUT
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num++,
+ pos_in_file,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ true
+ );
+ pos_in_file += TFTP_DEFAULT_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD,
+ DO_NOT_WAIT_FOR_ANY_TIMEOUT
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_DEFAULT_BLOCK_SIZE / 2, /* Data bytes in this block */
+ get_file_content,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ true
+ );
+ pos_in_file += TFTP_DEFAULT_BLOCK_SIZE / 2;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ tftp_initialize_net_config( &config );
+ bytes_written = rdwt_tftp_client_file(
+ tftpfs_server0_name,
+ tftpfs_file,
+ false, /* is_for_reading */
+ pos_in_file, /* file_size for writing files only */
+ &config,
+ &ctx->tftp_handle
+ );
+ T_eq_sz( bytes_written, pos_in_file );
+ T_eq_int( errno, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Test cases for the file system interface
+ */
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is two and a half data packet long. No timeouts, packet loss, ...
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first and second data packet are full.
+ * * The third data packet signals the end of transfer.
+ * * Read the file from file system in one big chunk of exactly
+ * the size of the file.
+ */
+T_TEST_CASE_FIXTURE( read_simple_file, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE / 2, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE / 2;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ /* Bytes read per call to read() */
+ 2 * TFTP_RFC1350_BLOCK_SIZE + TFTP_RFC1350_BLOCK_SIZE / 2,
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is one byte long. No timeouts, packet loss, ...
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first data packet is not full and signals the end of the transfer.
+ * * The test reads a file from the file system in one-byte chunks.
+ */
+T_TEST_CASE_FIXTURE( read_tiny_file, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ 1, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += 1;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ 1, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is one data packet long. No timeouts, packet loss, ...
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first data packet is full.
+ * * The second data packet is empty and signals the end of the transfer.
+ * * The client handles an empty data packet correctly as end
+ * of file indicator.
+ * * The test reads a file from the file system in chunks of three quarters
+ * of the block size.
+ */
+T_TEST_CASE_FIXTURE( read_one_block_file, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ 0, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ /* Bytes read per call to read() */
+ TFTP_RFC1350_BLOCK_SIZE / 4 * 3,
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is one data packet long.
+ * The client receives stray packets:
+ * * A packet from an unknown server (wrong TID)
+ * * An ACK packet instead of a DATA packet
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first data packet is full.
+ * * The next received packet originates from a wrong TID
+ * (i.e. wrong connection).
+ * * Upon reception of a packet with a wrong TID, the client sends
+ * an ERROR message with code 5 and does not terminate the current
+ * transfer.
+ * * The final received packet is an ACK packet instead or the expected
+ * DATA packet.
+ * * Upon the reception of an unexpected packet, the client terminates
+ * the connection by sending an error packet to the server.
+ */
+T_TEST_CASE_FIXTURE( read_file_stray_packets, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT + 1, /* Stray packet with wrong server TID */
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_UNKNOWN_ID,
+ SERV_PORT + 1,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack( /* Stray ACK packet */
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num - 1,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ /* Bytes read per call to read() */
+ TFTP_RFC1350_BLOCK_SIZE / 4 * 3,
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ /*
+ * The client received one packet with TFTP_RFC1350_BLOCK_SIZE
+ * before the error occurred. The test reads in chunks of
+ * TFTP_RFC1350_BLOCK_SIZE /4 * 3. Thus, after the first chunk
+ * the client signals the error to the test.
+ *
+ * It would be a little improvement if the client would return all
+ * bytes received before signaling the error.
+ */
+ T_eq_int( bytes_read, TFTP_RFC1350_BLOCK_SIZE / 4 * 3 );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is one data packet long.
+ * The server sends an error message after the first DATA packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The client uses a short time out for all packets.
+ * * The client handles error packets from the server and stops the
+ * connection by signaling an error to the user on the file system side.
+ * * The test reads a file from the file system in chunks of three quarters
+ * of the block size.
+ */
+T_TEST_CASE_FIXTURE( read_one_block_file_server_error, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_error(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_ERROR_CODE_NO_ACCESS,
+ "Cannot read more",
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ /* Bytes read per call to read() */
+ TFTP_RFC1350_BLOCK_SIZE / 4 * 3,
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, TFTP_RFC1350_BLOCK_SIZE / 4 * 3 );
+ T_eq_int( errno, EPERM );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is one data packet long.
+ * The server sends a malformed error packet after the first DATA packet.
+ * The error message in the packet is not a 0 terminated string
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The client handles malformed errors from the server and does not crash.
+ * * The test reads a file from the file system in chunks of three quarters
+ * of the block size.
+ */
+T_TEST_CASE_FIXTURE( read_one_block_file_malformed_server_error, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_malformed_error[] = {
+ 0x00, 0x05, /* Opcode = TFTP_OPCODE_ERROR */
+ 0x00, 0x02, /* Error code = TFTP_ERROR_CODE_NO_ACCESS */
+ 'n', 'o', ' ', 'a', 'c', 'c', 'e', 's', 's' /* missing '\0' at the end */
+ };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_malformed_error ), /* Malformed ERROR packet */
+ packet_malformed_error,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ /* Bytes read per call to read() */
+ TFTP_RFC1350_BLOCK_SIZE / 4 * 3,
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, TFTP_RFC1350_BLOCK_SIZE / 4 * 3 );
+ T_eq_int( errno, EPERM );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The reader on the file system side stops after having read half a
+ * data packet and before having received the whole file and closes the file.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first data packet is full.
+ * * The client handles the closing of the file by the user correctly.
+ * * The client sends an error to the server after the user stops reading
+ * the file.
+ * * The test reads a file from the file system in chunks of block size.
+ */
+T_TEST_CASE_FIXTURE( read_one_block_close_file, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ /* Sending an ACK at this place before the ERROR would be OK, too. */
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_NO_USER,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ TFTP_RFC1350_BLOCK_SIZE / 4, /* Bytes read per call to read() */
+ TFTP_RFC1350_BLOCK_SIZE / 2, /* Max bytes read from this file */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, TFTP_RFC1350_BLOCK_SIZE / 2 );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The reader on the file system side just open()s and then immediately closes
+ * the file without ever reading a single byte.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first data packet is full.
+ * * The client handles the closing of the file by the user correctly.
+ * * The client sends an error to the server when the user closes the file.
+ */
+T_TEST_CASE_FIXTURE( read_close_file_immediately, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ /* Sending an ACK at this place before the ERROR would be OK, too. */
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_NO_USER,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ TFTP_RFC1350_BLOCK_SIZE / 4, /* Bytes read per call to read() */
+ 0, /* Max bytes read from this file */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Read an empty file from the server using only RFC1350.
+ * No timeouts, packet loss, ...
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of a server name instead of an IP address.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The client uses a short time out for all packets.
+ * * The first data packet has length 0.
+ * * The client can read empty files from the server.
+ * * The test reads a file from the file system in one big chunk which
+ * is larger than the file.
+ */
+T_TEST_CASE_FIXTURE( read_empty_file, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_server0_ipv4,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ block_num,
+ pos_in_file,
+ 0, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_server0_name, tftpfs_file ),
+ /* Bytes read per call to read() */
+ TFTP_RFC1350_BLOCK_SIZE,
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_assert_eq_int( bytes_read, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Read an empty file from the server using only RFC1350.
+ * The first two RRQ packets are lost.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of a server name instead of an IP address.
+ * * The first packet is sent to standard port 69 of server.
+ * * The client uses a short time out for first packets.
+ * * The client uses a longer time out for repeated packets.
+ * * The client repeats lost RRQs packets.
+ * * The client does not repeat the ACK packet for the last DATA packet
+ * which signals the end of transfer.
+ * * The first data packet is empty and signals the end of the transfer.
+ * * It is possible to read a file with 0 bytes content from
+ * the file system.
+ */
+T_TEST_CASE_FIXTURE( read_empty_file_looing_rrq, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_server0_ipv4,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD, /* Timeout: No packet received within timeout period */
+ FIRST_TIMEOUT_MILLISECONDS
+ );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_server0_ipv4,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD, /* Timeout: No packet received within timeout period */
+ TIMEOUT_MILLISECONDS
+ );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_server0_ipv4,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ block_num,
+ pos_in_file,
+ 0, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_server0_name, tftpfs_file ),
+ /* Bytes read per call to read() */
+ TFTP_RFC1350_BLOCK_SIZE,
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_assert_eq_int( bytes_read, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is one and a half data packet long.
+ * Two data packet are lost (timeout) and the client must repeat the ACK.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * The client uses a short time out for first packets.
+ * * The client uses a longer time out for repeated packets.
+ * * The client repeats the ACK packets which are supposed
+ * to be lost.
+ * * The client does not repeat the ACK packet for the last DATA packet
+ * which signals the end of transfer.
+ * * The test reads a file in chunks of 17 bytes from file system.
+ */
+T_TEST_CASE_FIXTURE( read_small_file_lost_packets, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD, /* Timeout: No packet received within timeout period */
+ FIRST_TIMEOUT_MILLISECONDS
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD, /* Timeout: No packet received within timeout period */
+ TIMEOUT_MILLISECONDS
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE / 2, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE / 2;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ 17, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is exactly one data packet long.
+ * The client receives a malformed DATA packet (wrong op code).
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The client uses a short time out for all packets.
+ * * The first data packet is full.
+ * * The client terminates the connection with an error message upon
+ * reception of a malformed packet.
+ */
+T_TEST_CASE_FIXTURE( read_small_file_malformed_packet_1, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_illegal_opcode_1[] = { 0x00, 0xFF, 0x00, 0x00 };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_illegal_opcode_1 ), /* Malformed DATA packet */
+ packet_illegal_opcode_1,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ TFTP_RFC1350_BLOCK_SIZE / 4, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_eq_int( errno, EPROTO );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is exactly one data packet long.
+ * The client receives a malformed DATA packet (wrong op code).
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first data packet is full.
+ * * The second data packet is malformed.
+ * * The client terminates the connection with an error message upon
+ * reception of a malformed packet.
+ */
+T_TEST_CASE_FIXTURE( read_small_file_malformed_packet_2, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_illegal_opcode_2[] = { 0x03, 0x00, 0x00, 0x01 };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_illegal_opcode_2 ), /* Malformed DATA packet */
+ packet_illegal_opcode_2,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ TFTP_RFC1350_BLOCK_SIZE / 4, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_eq_int( errno, EPROTO );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is exactly one data packet long.
+ * The client receives a malformed packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first DATA packet received after the RRQ packet is malformed.
+ * It is too short with only one byte length.
+ * * The client sends an error and terminates the file transfer upon
+ * reception of a malformed packet.
+ */
+T_TEST_CASE_FIXTURE( read_file_malformed_ack_1, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_too_short_1[] = { 0x03 };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_too_short_1 ), /* Malformed DATA packet */
+ packet_too_short_1,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ TFTP_RFC1350_BLOCK_SIZE / 4, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_eq_int( errno, EPROTO );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is exactly one data packet long.
+ * The client receives a malformed packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first DATA packet received after the RRQ packet is malformed.
+ * It is too short with only two bytes length.
+ * * The client sends an error and terminates the file transfer upon
+ * reception of a malformed packet.
+ */
+T_TEST_CASE_FIXTURE( read_file_malformed_ack_2, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_too_short_2[] = { 0x00, 0x03 };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_too_short_2 ), /* Malformed DATA packet */
+ packet_too_short_2,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ TFTP_RFC1350_BLOCK_SIZE / 4, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_eq_int( errno, EPROTO );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is exactly one data packet long.
+ * The client receives a malformed packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first DATA packet received after the RRQ packet is malformed.
+ * It is too short with only three bytes length.
+ * * The client sends an error and terminates the file transfer upon
+ * reception of a malformed packet.
+ */
+T_TEST_CASE_FIXTURE( read_file_malformed_ack_3, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_too_short_3[] = { 0x00, 0x03, 0x00 };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_too_short_3 ), /* Malformed DATA packet */
+ packet_too_short_3,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ TFTP_RFC1350_BLOCK_SIZE / 4, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_eq_int( errno, EPROTO );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is exactly one data packet long.
+ * The client receives a data packet with block number 0.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first DATA packet received after the RRQ packet is malformed.
+ * It has block number 0.
+ * * The client sends an error and terminates the file transfer upon
+ * reception of a malformed packet.
+ */
+T_TEST_CASE_FIXTURE( read_file_block_number_0, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ 0, /* Wrong block number 0 */
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ TFTP_RFC1350_BLOCK_SIZE / 4, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_eq_int( errno, EPROTO );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is exactly one data packet long.
+ * The client receives a malformed packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first DATA packet received after the RRQ packet is malformed.
+ * The packet contains an illegal op code.
+ * * The client sends an error and terminates the file transfer upon
+ * reception of a malformed packet.
+ */
+T_TEST_CASE_FIXTURE( read_file_illegal_opcode_1, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_illegal_opcode_1[] = { 0x00, 0xFF, 0x00, 0x00 };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_illegal_opcode_1 ), /* Malformed DATA packet */
+ packet_illegal_opcode_1,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ TFTP_RFC1350_BLOCK_SIZE / 4, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_eq_int( errno, EPROTO );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using only RFC1350.
+ * The file is exactly two data packet long.
+ * The client receives DATA packets with wrong block numbers.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * The second RRQ is sent to the TFTP server port 69 and not to the
+ * port from which the first packet with the wrong block number came from.
+ * * The client uses a short time out for all packets.
+ * * The client uses a longer time out for repeated packets.
+ * * The client handles DATA packets with the wrong block numbers
+ * appropriately.
+ * * The third data packet is empty and signals the end of the transfer.
+ * * Old data packets are ignored (i.e. do not cause a retransmission).
+ * * Duplicates of the last data packet cause a retransmission of the
+ * last ACK.
+ * * The first data packet with a block number larger than the expected one,
+ * cause a retransmission of ACK or RRQ. (They can appear together
+ * with the windowsize option.)
+ * * The test reads a file from the file system in one big chunk with is larger
+ * than the files size.
+ */
+T_TEST_CASE_FIXTURE( read_two_block_file_wrong_block_numbers, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num + 1, /* Wrong block number */
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num + 1, /* Wrong block number */
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num - 1, /* Wrong block number / duplicates last packet */
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num - 1, /* Client assumes last ACK got lost and retransmits it. */
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num + 1, /* Wrong block number */
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num - 1, /* Client assumes last ACK got lost and retransmits it. */
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num + 1, /* Wrong block number */
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num - 2, /* Wrong block number */
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num + 1, /* Wrong block number */
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num - 1, /* Client assumes last ACK got lost and retransmits it. */
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ 0, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ /* Bytes read per call to read() */
+ 3 * TFTP_RFC1350_BLOCK_SIZE,
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Attempt to read a file from the server using filename without ':'.
+ * Tests:
+ * * The TFTP FS rejects malformed file names (i.e. it does not crash).
+ */
+T_TEST_CASE_FIXTURE( read_malformed_filename, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ char buffer[100];
+ int len;
+
+ len = snprintf(
+ buffer,
+ sizeof( buffer ),
+ "%s/%s",
+ tftpfs_mount_point,
+ tftpfs_server0_name
+ );
+
+ T_quiet_gt_int( len, 0 );
+ T_quiet_lt_int( len, (int) sizeof( buffer ) );
+
+ bytes_read = read_tftp_file(
+ buffer,
+ /* Bytes read per call to read() */
+ TFTP_RFC1350_BLOCK_SIZE,
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_assert_eq_int( bytes_read, 0 );
+ T_assert_eq_int( errno, EINVAL );
+}
+
+/*
+ * Attempt to read a file from a none exiting server address.
+ * Tests:
+ * * TFTP FS returns an error if the server name cannot be resolved.
+ */
+T_TEST_CASE_FIXTURE( read_from_unknown_ip_address, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( "not-existing-server-address", tftpfs_file ),
+ /* Bytes read per call to read() */
+ TFTP_RFC1350_BLOCK_SIZE,
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_assert_eq_int( bytes_read, 0 );
+ T_assert_eq_int( errno, ENOENT );
+}
+
+/*
+ * Attempt to read a file which the server does not know
+ * No timeouts, packet loss, ...
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of a server name instead of an IP address.
+ * * The client handles an ERROR packet received upon sending an RRQ
+ * correctly.
+ * * TFTP FS returns an error upon the reception of the ERROR packet.
+ */
+T_TEST_CASE_FIXTURE( read_not_existing_file, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_server0_ipv4,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_error(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ TFTP_ERROR_CODE_NOT_FOUND,
+ "No such file",
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_server0_name, tftpfs_file ),
+ /* Bytes read per call to read() */
+ TFTP_RFC1350_BLOCK_SIZE,
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_assert_eq_int( bytes_read, 0 );
+ T_assert_eq_int( errno, ENOENT );
+ T_no_more_interactions();
+}
+
+/*
+ * Write an empty file to the server using only RFC1350.
+ * The first two WRQ as well as the first two DATA packets are lost.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of a server name instead of an IP address.
+ * * The all WRQ are sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The client uses a short time out for first packets.
+ * * The client uses a longer time out for repeated packets.
+ * * The client repeats the WRQs and DATA packets which are supposed
+ * to be lost.
+ * * When a timeout occurs, the client repeats the last and empty packet.
+ * * The first data packet is empty and signals the end of the transfer.
+ * * The test writes a file with 0 bytes content to the file system.
+ */
+T_TEST_CASE_FIXTURE( write_empty_file_packet_losts, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_server0_ipv4,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD, /* Timeout: No packet received within timeout period */
+ FIRST_TIMEOUT_MILLISECONDS
+ );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_server0_ipv4,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD, /* Timeout: No packet received within timeout period */
+ TIMEOUT_MILLISECONDS
+ );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_server0_ipv4,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ 0, /* Number of bytes transferred */
+ get_file_content,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD, /* Timeout: No packet received within timeout period */
+ FIRST_TIMEOUT_MILLISECONDS
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ 0, /* Number of bytes transferred */
+ get_file_content,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD, /* Timeout: No packet received within timeout period */
+ TIMEOUT_MILLISECONDS
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ 0, /* Number of bytes transferred */
+ get_file_content,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_server0_name, tftpfs_file ),
+ 0, /* Size of file */
+ 4, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a very short file to the server using only RFC1350.
+ * The file is one and half data packets long.
+ * The first two DATA packets and one ACK packet are lost.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of a server name instead of an IP address.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The client uses a short time out for first packets.
+ * * The client uses a longer time out for repeated packets.
+ * * The client repeats sending DATA packets which are supposed
+ * to be lost.
+ * * The client also repeats the last DATA packet when it is supposed
+ * to be lost.
+ * * The client repeats sending DATA packets when an ACK packet is repeated
+ * (presumably the DATA packet has been lost).
+ * * The test writes a file to the file system in chunks of a quarter of the block size.
+ */
+T_TEST_CASE_FIXTURE( write_tiny_file_packet_losts, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_server0_ipv4,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD, /* Timeout: No packet received within timeout period */
+ FIRST_TIMEOUT_MILLISECONDS
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD, /* Timeout: No packet received within timeout period */
+ TIMEOUT_MILLISECONDS
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ block_num++,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE / 2,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ block_num - 1, /* Repeated ACK packet received */
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE / 2,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE / 2;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_server0_ipv4,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_server0_name, tftpfs_file ),
+ TFTP_RFC1350_BLOCK_SIZE / 2 * 3, /* Size of file */
+ TFTP_RFC1350_BLOCK_SIZE / 4, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using only RFC1350.
+ * The file is 2 data packet and 1 byte long. No timeouts, packet loss, ...
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * First and second data packet is full.
+ * * Third data packet signals the end of transfer.
+ * * The test writes a file to the file system in one big chunk
+ * of exactly the files size.
+ */
+T_TEST_CASE_FIXTURE( write_simple_file, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ 1, /* Data bytes in this block */
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += 1;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ pos_in_file, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using only RFC1350.
+ * As response to the first DATA packet, the server sends an error packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first data packet is full.
+ * * The second packet from the server is an error packet.
+ * * The TFTP client ends the connection after receiving an error packet.
+ * * The test writes a file to the file system with a call to write()
+ * for each byte.
+ */
+T_TEST_CASE_FIXTURE( write_simple_file_disk_full, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_error(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_ERROR_CODE_DISK_FULL,
+ "disk full",
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ 1, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( errno, ENOSPC );
+ T_eq_int( bytes_written, pos_in_file - 1 );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using only RFC1350.
+ * The file is one and a half data packet long.
+ * The server sends a malformed packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first ACK to the WRQ packet is malformed.
+ * It is only one byte long.
+ * * The client sends an error upon the reception of a malformed packet
+ * and terminates the file transfer.
+ */
+T_TEST_CASE_FIXTURE( write_file_malformed_ack_1, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_too_short_1[] = { 0x04 };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_too_short_1 ), /* Malformed ACK packet */
+ packet_too_short_1,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ 17, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, -1 );
+ T_eq_int( errno, EPROTO );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using only RFC1350.
+ * The file is one and a half data packet long.
+ * The server sends a malformed packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first ACK to the WRQ packet is malformed.
+ * It is only two bytes long.
+ * * The client sends an error upon the reception of a malformed packet
+ * and terminates the file transfer.
+ */
+T_TEST_CASE_FIXTURE( write_file_malformed_ack_2, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_too_short_2[] = { 0x00, 0x04 };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_too_short_2 ), /* Malformed ACK packet */
+ packet_too_short_2,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ 17, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, -1 );
+ T_eq_int( errno, EPROTO );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using only RFC1350.
+ * The file is one and a half data packet long.
+ * The server sends a malformed packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first ACK to the WRQ packet is malformed.
+ * It is only three bytes long.
+ * * The client sends an error upon the reception of a malformed packet
+ * and terminates the file transfer.
+ */
+T_TEST_CASE_FIXTURE( write_file_malformed_ack_3, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_too_short_3[] = { 0x00, 0x04, 0x00 };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_too_short_3 ), /* Malformed ACK packet */
+ packet_too_short_3,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ 17, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, -1 );
+ T_eq_int( errno, EPROTO );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using only RFC1350.
+ * The file is one and a half data packet long.
+ * The server sends a malformed packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first ACK to the WRQ packet is malformed.
+ * The packet contains an illegal op code.
+ * * The client sends an error upon the reception of a malformed packet
+ * and terminates the file transfer.
+ */
+T_TEST_CASE_FIXTURE( write_file_illegal_opcode_1, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_illegal_opcode_1[] = { 0x00, 0xFF, 0x00, 0x00 };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_illegal_opcode_1 ), /* Malformed ACK packet */
+ packet_illegal_opcode_1,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ 17, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, -1 );
+ T_eq_int( errno, EPROTO );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using only RFC1350.
+ * The server sends a malformed packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * A malformed ACK packet is received by the TFTP client.
+ * The packet is only three bytes long.
+ * * The client sends an error upon the reception of a malformed packet
+ * and terminates the file transfer.
+ */
+T_TEST_CASE_FIXTURE( write_short_file_malformed_ACK_1, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_too_short_3[] = { 0x00, 0x04, 0x00 };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_too_short_3 ), /* Malformed ACK packet */
+ packet_too_short_3,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ 2 * TFTP_RFC1350_BLOCK_SIZE, /* Size of file */
+ 17, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_written, 510 );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using only RFC1350.
+ * The server sends a malformed packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * A malformed ACK packet is received by the TFTP client after the first
+ * DATA packet has been exchanged successfully.
+ * The packet is only one byte long.
+ * * The client sends an error upon the reception of a malformed packet
+ * and terminates the file transfer.
+ */
+T_TEST_CASE_FIXTURE( write_short_file_malformed_ACK_2, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_too_short_1[] = { 0x04 };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE / 4,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE / 4;
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_too_short_1 ), /* Malformed ACK packet */
+ packet_too_short_1,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ 17, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_written, -1 );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using only RFC1350.
+ * The server sends a malformed packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * A malformed ACK packet is received by the TFTP client after the first
+ * DATA packet has been exchanged successfully.
+ * The packet contains an illegal op code.
+ * * The client sends an error upon the reception of a malformed packet
+ * and terminates the file transfer.
+ */
+T_TEST_CASE_FIXTURE( write_short_file_malformed_opcode, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+ static const uint8_t packet_illegal_opcode_2[] = { 0x04, 0x00, 0x00, 0x01 };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_raw(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ sizeof( packet_illegal_opcode_2 ), /* Malformed ACK packet */
+ packet_illegal_opcode_2,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ 2 * TFTP_RFC1350_BLOCK_SIZE, /* Size of file */
+ 17, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_written, 510 );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using only RFC1350.
+ * The file is two and a half data packet long.
+ * The server sends packets with wrong block numbers.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The first ACK packet contains a wrong block number.
+ * * The client repeats the WRQ upon reception of an ACK with
+ * an too high block number.
+ * * The client uses a short time out for waiting on the answer of the
+ * first WRQ or DATA packets.
+ * * The client uses a long time out for waiting on the answer of
+ * repeated WRQ or DATA packets.
+ * * The first DATA packet is full.
+ * * The second DATA packet signals the end of transfer.
+ * * The client handles DATA packets with wrong block numbers
+ * appropriately.
+ * * The test writes a file to the file system with calls to write() of
+ * exactly block size.
+ */
+T_TEST_CASE_FIXTURE( write_short_file_bad_block_numbers, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num + 1, /* Wrong block number */
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num - 1, /* Wrong block number */
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num - 2, /* Wrong block number */
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE / 4,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num - 2, /* Wrong block number */
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num + 1, /* Wrong block number */
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE / 4;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ TFTP_RFC1350_BLOCK_SIZE, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using only RFC1350.
+ * The file is one data packet long.
+ * The client receives a stray packet from an unknown server (wrong TID).
+ * Directly afterwards the expected ACK packet is lost and
+ * the client must retransmit the original DATA packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The code supports the use of an IPv4 address instead of a server name.
+ * * The first packet is sent to standard port 69 of server.
+ * * All other packets are sent to the port used for this connection.
+ * * The client uses a short time out for waiting on the answer of the
+ * first DATA packet.
+ * * The client uses a long time out for waiting on the answer of
+ * the repeated DATA.
+ * * Upon reception of a packet with a wrong TID, the client sends
+ * an ERROR message with code 5 but does not terminate the current
+ * transfer.
+ * * When re-transmitting the an packet, the data is intact (i.e.
+ * not corrupted by the reception of any packet in-between).
+ */
+T_TEST_CASE_FIXTURE( write_one_block_file_stray_packets, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT + 1, /* Stray packet with wrong server TID */
+ tftpfs_ipv4_loopback,
+ block_num,
+ 0,
+ TFTP_RFC1350_BLOCK_SIZE / 2, /* Number of bytes transferred */
+ get_bad_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_UNKNOWN_ID,
+ SERV_PORT + 1,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD, /* Timeout: No packet received within timeout period */
+ FIRST_TIMEOUT_MILLISECONDS
+ );
+ _Tftp_Add_interaction_send_data( /* Retransmission of the DATA packet */
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ 0, /* Number of bytes */
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += 0;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ TFTP_RFC1350_BLOCK_SIZE, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using option to increase the block size.
+ * The file is one data packet long. No timeouts, packet loss, ...
+ * Tests:
+ * * Only the blksize option appears in RRQ and OACK.
+ * * The client uses a block size which is larger than the default size.
+ * * The first data packet is full.
+ * * The second data packet is empty and signals the end of the transfer.
+ * * Client handles the empty data packet correctly as
+ * end of file indicator.
+ * * The test reads a file from the file system in chunks of block size.
+ */
+T_TEST_CASE_FIXTURE( read_file_one_large_block, &fixture_large_blocksize )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+ const char options[] =
+ TFTP_OPTION_BLKSIZE "\0"
+ RTEMS_XSTRING( LARGE_BLOCK_SIZE );
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ LARGE_BLOCK_SIZE,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ LARGE_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += LARGE_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ 0, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ LARGE_BLOCK_SIZE, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Try to read a file from the server using a file name too large for a RRQ.
+ * Tests:
+ * * The client rejects an attempt to open a file with a too long
+ * file name is with an error.
+ */
+T_TEST_CASE_FIXTURE( read_too_long_file_name, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ char buffer[TFTP_RFC1350_BLOCK_SIZE -
+ strlen( TFTP_MODE_OCTET ) - 1 - 5];
+ int len;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ len = sizeof( buffer ) - strlen( tftpfs_mount_point ) -
+ strlen( tftpfs_ipv4_loopback ) - 2 - 4;
+ len = snprintf(
+ buffer,
+ sizeof( buffer ),
+ "%s/%s:%0*d",
+ tftpfs_mount_point,
+ tftpfs_ipv4_loopback,
+ len,
+ 123
+ );
+ T_quiet_gt_int( len, 0 );
+ T_quiet_lt_int( len, (int) sizeof( buffer ) );
+
+ bytes_read = read_tftp_file(
+ buffer,
+ TFTP_DEFAULT_BLOCK_SIZE, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, 0 );
+ T_eq_int( errno, ENAMETOOLONG );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file using options but the server sends a DATA packet.
+ * The file is one byte long. No timeouts, packet loss, ...
+ * Tests:
+ * * The client uses windowsize and blksize option in the RRQ.
+ * * For the data transfer the client uses the RFC1350 option values
+ * because the server responded with a DATA packet.
+ * * The whole package sequence behaves as if only RFC1350 was used.
+ * * The first data packet contains a single byte and signals the end of the transfer.
+ * * The test reads a file from the file system in chunks of half block size.
+ */
+T_TEST_CASE_FIXTURE( read_file_DATA_instead_of_OACK, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ 1, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += 1;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ TFTP_DEFAULT_BLOCK_SIZE / 2, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file using RFC1350 but the server sends an OACK packet.
+ * Tests:
+ * * The code supports requests without options (RFC1350 only).
+ * * The server wrongly responds with an OACK which contains no options.
+ * * The client sends an error upon reception of an unexpected packet.
+ */
+T_TEST_CASE_FIXTURE( read_tiny_file_OACK_instead_of_DATA, &fixture_rfc1350 )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ const char options[] = {};
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_ILLEGAL,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ 1, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, 0 );
+ T_eq_int( errno, EPROTO );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server using the default options.
+ * The file is 18 and a half data packet long. No timeouts, packet loss, ...
+ * Tests:
+ * * The client uses the default options
+ * (windowsize = 8 and blocksize = 1456).
+ * * The server send the options in the same order as the client did
+ * send them.
+ * * The ninetenth data packet signals the end of transfer.
+ * * The test reads a file from the file system in chunks of 2000 bytes.
+ */
+T_TEST_CASE_FIXTURE( read_file_with_default_options, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int i;
+ int bytes_read;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+ const char options[] =
+ TFTP_OPTION_BLKSIZE "\0"
+ RTEMS_XSTRING( TFTP_DEFAULT_BLOCK_SIZE ) "\0"
+ TFTP_OPTION_WINDOWSIZE"\0"
+ RTEMS_XSTRING( TFTP_DEFAULT_WINDOW_SIZE );
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ while ( block_num < 16 ) {
+ for ( i = 0; i < TFTP_DEFAULT_WINDOW_SIZE; ++i ) {
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ ++block_num,
+ pos_in_file,
+ TFTP_DEFAULT_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_DEFAULT_BLOCK_SIZE;
+ }
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ }
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ ++block_num,
+ pos_in_file,
+ TFTP_DEFAULT_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_DEFAULT_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ ++block_num,
+ pos_in_file,
+ TFTP_DEFAULT_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_DEFAULT_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ ++block_num,
+ pos_in_file,
+ TFTP_DEFAULT_BLOCK_SIZE / 2, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += TFTP_DEFAULT_BLOCK_SIZE / 2;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ 2000, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file following exactly the scenario in RFC 7440.
+ * This test uses window size and block size options. There are lost packets.
+ * Tests:
+ * * The client uses of non-default options
+ * (windowsize = 4 and blocksize = 12).
+ * * Test the scenario included in RFC 7440.
+ * * When a packet from the server is lost (client receives DATA packet with
+ * a too high block number), the client sends an ACK for the last package
+ * received in the correct sequence.
+ * * The client ignores duplicated packets (with block numbers it has
+ * already processed).
+ * * The data of the file ends exactly at a window size border (i.e.
+ * after the window a single empty DATA packet is sent by the server).
+ * * The test reads a file from the file system in chunks of 10 bytes.
+ */
+T_TEST_CASE_FIXTURE( read_file_rfc7440_scenario, &fixture_small_opt_size )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int i;
+ int bytes_read;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+ const char options[] =
+ TFTP_OPTION_WINDOWSIZE"\0"
+ RTEMS_XSTRING( SMALL_WINDOW_SIZE ) "\0"
+ TFTP_OPTION_BLKSIZE "\0"
+ RTEMS_XSTRING( SMALL_BLOCK_SIZE );
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ SMALL_BLOCK_SIZE,
+ SMALL_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ for ( i = 0; i < SMALL_WINDOW_SIZE; ++i ) {
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ ++block_num,
+ pos_in_file,
+ SMALL_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += SMALL_BLOCK_SIZE;
+ }
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ ++block_num,
+ pos_in_file,
+ SMALL_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += SMALL_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num + 2, /* Error: One packet from the server has been lost */
+ pos_in_file,
+ SMALL_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ for ( i = 0; i < SMALL_WINDOW_SIZE; ++i ) {
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ ++block_num,
+ pos_in_file,
+ SMALL_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += SMALL_BLOCK_SIZE;
+ }
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ ++block_num,
+ pos_in_file,
+ SMALL_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += SMALL_BLOCK_SIZE;
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num + 2, /* Error: One packet from the server has been lost */
+ pos_in_file,
+ SMALL_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num, /* The packet is assumed to be lost/does not reach the server */
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num + 3, /* Error: One packet from the server has been lost */
+ pos_in_file,
+ SMALL_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ block_num = 9; /* The ACK for DATA packet 10 did not reach the server */
+ pos_in_file = block_num * SMALL_BLOCK_SIZE;
+ for ( i = 0; i < SMALL_WINDOW_SIZE; ++i ) {
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ ++block_num,
+ pos_in_file,
+ SMALL_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += SMALL_BLOCK_SIZE;
+ }
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ ++block_num,
+ pos_in_file,
+ 0, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ 10, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file using windowsize = 4. All kinds of packet loss, out of order
+ * packets and duplicated packets occur.
+ * This test uses window size and block size options. It is a stress test
+ * for all kind of network problems which can appear during a transfer
+ * of a file with window size larger than 1.
+ * Tests:
+ * * The client uses non-default options (windowsize = 4 and blocksize = 12).
+ * * The first DATA packet of a window is lost.
+ * * The last DATA packet of a window is lost.
+ * * The middle DATA packets of a window is lost.
+ * * The first two DATA packets of a window are received in reverse order.
+ * * The middle two DATA packets of a window are received in reverse order.
+ * * The last two DATA packets of a window are received in reverse order.
+ * * The a DATA packet is received duplicated.
+ * * The an old DATA packet is received duplicated.
+ * * The a very old DATA packet is received duplicated.
+ * * The normal ACK of a window is not received by the server.
+ * * The server repeats a whole window (ensure the client sends an ACK
+ * packet despite of the repetition).
+ * * An ACK for an out-of-order packet is not received by the server.
+ * * Windows with errors appear consecutively without
+ * error free windows in between.
+ * * After the reception of the first two DATA packets of a window,
+ * a timeout occurs and the client must send an ACK.
+ * * File transfer ends exactly with the last packet of a window
+ * (the second last packet is full and the last one is empty).
+ * * The test reads a file from the file system in chunks 100 bytes.
+ */
+T_TEST_CASE_FIXTURE( read_file_windowsize_trouble, &fixture_small_opt_size )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int i;
+ int bytes_read;
+ uint16_t block_num = 0;
+ size_t pos_in_file = 0;
+ int timeout = FIRST_TIMEOUT_MILLISECONDS;
+ const char options[] =
+ TFTP_OPTION_WINDOWSIZE"\0"
+ RTEMS_XSTRING( SMALL_WINDOW_SIZE ) "\0"
+ TFTP_OPTION_BLKSIZE "\0"
+ RTEMS_XSTRING( SMALL_BLOCK_SIZE );
+ /*
+ * A positive number is the number of a DATA packet received.
+ * A negative number is the number of an ACK packet send.
+ * A zero indicates a timeout when waiting for a DATA packet.
+ * Each line corresponds to a window.
+ */
+ int16_t pkg_sequence[] = {
+ 1, 1, 2, 3, 2, 1, 3, 4, -4, /* Duplicated DATA packets */
+ 6, -4, 7, 8, /* DATA packet 5 lost */
+ 6, 5, 7, -5, 4, 8, /* DATA packet 5 and 6 received in revers order;
+ reception of an very old packet: 4 */
+ 7, 6, 8, -6, /* DATA packet 6 and 7 received in revers order;
+ DATA packet 9 not send or lost */
+ 6, 7, 8, 9, -9, /* ACK packet 6 was not received by server */
+ 10, 11, 12, 0, -12, /* DATA packet 13 lost */
+ 13, 16, -13, /* DATA packets 14, 15 lost */
+ 12, 13, 14, 15, -15, 16, 17, /* Reception of duplicated old packets 12 and
+ 13 */
+ 16, 17, 18, 19, -19, /* Normal sequence; ACK 19 not receive by server */
+ 16, 17, 18, 19, -19, /* Normal sequence repeated;
+ ACK 19 not receive by server */
+ 16, 19, -19, 18, 17, /* Sequence repeated but DATA packet 17 and 18
+ received after 19 and in revers order */
+ 20, -20, 21, 22, 23, /* ACK 20 because the client assumes the server
+ did not get ACK 19 and restarted with 17 */
+ 21, 22, 23, 24, -24, /* Normal sequence */
+ 25, 27, -25, 26, 28, -26, /* The middle data packets 26, 27 are exchanged;
+ the client assumes DATA 26 being the start
+ of the next window and sends an ACK 26
+ upon reception of out-of-sequence DATA 28;
+ assume ACK 26 not received by server */
+ 26, 27, 29, -27, 28, /* The last data packets are exchanged;
+ ACK 27 not received by server */
+ 26, 27, 28, 29, -29, /* Normal sequence repeated from ACK 25 */
+ 30, 31, 0, -31, /* The last two data packets are lost (timeout) */
+ 32, 33, 34, /* Normal sequence; the last DATA packet (here missing) will
+ contain no data and ends the transfer at a window
+ boundary; a final ACK (here missing too) follows */
+ };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ SMALL_BLOCK_SIZE,
+ SMALL_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( pkg_sequence ); ++i ) {
+ if ( pkg_sequence[i] == 0 ) {
+ block_num = pkg_sequence[i];
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD, /* Timeout: No packet received within timeout period */
+ timeout
+ );
+ timeout = TIMEOUT_MILLISECONDS;
+ } else if ( pkg_sequence[i] > 0 ) {
+ block_num = pkg_sequence[i];
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ timeout,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ ( block_num - 1 ) * SMALL_BLOCK_SIZE,
+ SMALL_BLOCK_SIZE, /* Number of bytes transferred */
+ get_file_content,
+ pkg_sequence[i] > 0 /* pkg_sequence[i] == 0 means timeout */
+ );
+ timeout = FIRST_TIMEOUT_MILLISECONDS;
+ pos_in_file = block_num * SMALL_BLOCK_SIZE;
+ } else {
+ block_num = -pkg_sequence[i];
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ }
+ }
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ timeout,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ ++block_num,
+ pos_in_file,
+ 0, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ 100, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using an option to increase block size.
+ * The file is 2 DATA packet and 1 byte long. No timeouts, packet loss, ...
+ * Tests:
+ * * The client uses only the blksize option in WRQ and OACK.
+ * * The client uses a block size which is larger than the default size.
+ * * The server can change the block size value in the OACK.
+ * * The option name in the OACK can be upper or lower case.
+ * * First and second DATA packets are full.
+ * * The second DATA packet is not full and signals the end of the transfer.
+ * * The client handles an empty DATA packet correctly as
+ * end of file indicator.
+ * * The test writes the file to the file system in chunks of 333 bytes.
+ */
+T_TEST_CASE_FIXTURE( write_simple_file_large_blocks, &fixture_large_blocksize )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ size_t pos_in_file = 0;
+ uint16_t block_num = 1;
+ uint16_t block_size = 211;
+ const char options[] = "BLKsiZe" "\0" "211";
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ LARGE_BLOCK_SIZE,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ block_size,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += block_size;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ block_size,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += block_size;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ 1, /* Data bytes in this block */
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += 1;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ 333, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server using default options.
+ * The file is 23 data packet long. No timeouts, packet loss, ...
+ * Tests:
+ * * The client uses the default options
+ * (windowsize = 8 and blocksize = 1456).
+ * * The server sends the options in the same order the client
+ * did send them.
+ * * The 24th data packet signals the end of file transfer.
+ * * Client sends an empty data packet as end of file indicator.
+ * * The client handles files correctly which end exactly at
+ * a window border.
+ */
+T_TEST_CASE_FIXTURE(
+ write_simple_file_default_options,
+ &fixture_default_options
+)
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int i;
+ int bytes_written;
+ size_t pos_in_file = 0;
+ uint16_t block_num = 1;
+ const char options[] =
+ TFTP_OPTION_BLKSIZE "\0"
+ RTEMS_XSTRING( TFTP_DEFAULT_BLOCK_SIZE ) "\0"
+ TFTP_OPTION_WINDOWSIZE "\0"
+ RTEMS_XSTRING( TFTP_DEFAULT_WINDOW_SIZE );
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ for ( i = 0; i < 23; ++i ) {
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num++,
+ pos_in_file,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += TFTP_DEFAULT_BLOCK_SIZE;
+ if ( i % 8 == 7 ) {
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num - 1,
+ true
+ );
+ } else {
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD,
+ DO_NOT_WAIT_FOR_ANY_TIMEOUT
+ );
+ }
+ }
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ 0,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ 333, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file following exactly the scenario from RFC 7440.
+ * This test uses window size and block size options. There are lost packets.
+ * Tests:
+ * * The client uses non-default options
+ * (windowsize = 4 and blocksize = 12).
+ * * Test the scenario included in RFC 7440.
+ * * The server sends the options in the inverse order the client
+ * did send them.
+ * * The data of the file ends exactly at a window size border (i.e.
+ * after the last window the server sends a single empty DATA packet).
+ * * The test writes a file to the file system in chunks of 10 bytes.
+ */
+T_TEST_CASE_FIXTURE( write_file_rfc7440_scenario, &fixture_small_opt_size )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int i;
+ int bytes_written;
+ size_t pos_in_file = 0;
+ uint16_t block_num = 1;
+ const char options[] =
+ TFTP_OPTION_WINDOWSIZE"\0"
+ RTEMS_XSTRING( SMALL_WINDOW_SIZE ) "\0"
+ TFTP_OPTION_BLKSIZE "\0"
+ RTEMS_XSTRING( SMALL_BLOCK_SIZE );
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ SMALL_BLOCK_SIZE,
+ SMALL_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ for ( i = 0; i < 6; ++i ) {
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num++,
+ pos_in_file,
+ SMALL_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += SMALL_BLOCK_SIZE;
+ if ( i % 4 == 3 ) {
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num - 1,
+ true
+ );
+ } else {
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD,
+ DO_NOT_WAIT_FOR_ANY_TIMEOUT
+ );
+ }
+ }
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ SMALL_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ DO_NOT_WAIT_FOR_ANY_TIMEOUT,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ 5,
+ true
+ );
+ block_num = 6;
+ pos_in_file = (block_num - 1) * SMALL_BLOCK_SIZE;
+ for ( i = 0; i < 7; ++i ) {
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num++,
+ pos_in_file,
+ SMALL_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += SMALL_BLOCK_SIZE;
+ if ( i % 4 == 3 ) {
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num - 1,
+ true
+ );
+ } else {
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD,
+ DO_NOT_WAIT_FOR_ANY_TIMEOUT
+ );
+ }
+ }
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ SMALL_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS
+ );
+ block_num = 10;
+ pos_in_file = (block_num - 1) * SMALL_BLOCK_SIZE;
+ for ( i = 0; i < 4; ++i ) {
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num++,
+ pos_in_file,
+ SMALL_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += SMALL_BLOCK_SIZE;
+ if ( i % 4 == 3 ) {
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num - 1,
+ true
+ );
+ } else {
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD,
+ DO_NOT_WAIT_FOR_ANY_TIMEOUT
+ );
+ }
+ }
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ 0,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ 10, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file using windowsize = 4. All kinds of packet loss, out of
+ * order packets and duplicated ACK packets appear.
+ * This test uses window size and block size options. It is a stress test
+ * for all kind of network problems which can appear during a transfer
+ * of a file with window size larger than 1.
+ * Tests:
+ * * The server repeats a whole window (timeout).
+ * * The client receives a duplicated ACK packet (directly in sequence).
+ * * The client receives a duplicated ACK (after sending a window).
+ * * The client receives an ACK with a block number which is not
+ * the end of the current window.
+ * * The client receives an very old ACK in the middle of a window.
+ * * The client receives an very old ACK at the end of a window.
+ * * The client receives an ACK for a not yet send DATA packet in the
+ * middle of a window (should be ignored or cause a error).
+ * * The client receives an ACK for a not yet send DATA packet at the
+ * end of a window (should be ignored or cause a error).
+ * * The client receives an ACK after sending a full window.
+ * * The client receives an ACK before all DATA packets of a
+ * window have been sent.
+ * * The client must repeat the first window completely (timeout).
+ * * The client must repeat the first window partially.
+ * * The client must repeat the last window completely (timeout).
+ * * The client must repeat the last window partially.
+ * * Windows with errors in between appear consecutively, without
+ * error free windows in between.
+ * * The test writes a file to the file system in chunks of block size.
+ */
+T_TEST_CASE_FIXTURE( write_file_windowsize_trouble, &fixture_small_opt_size )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int i;
+ int bytes_written;
+ size_t pos_in_file = 0;
+ uint16_t block_num = 1;
+ int timeout = FIRST_TIMEOUT_MILLISECONDS;
+ const char options[] =
+ TFTP_OPTION_BLKSIZE "\0"
+ RTEMS_XSTRING( SMALL_BLOCK_SIZE ) "\0"
+ TFTP_OPTION_WINDOWSIZE"\0"
+ RTEMS_XSTRING( SMALL_WINDOW_SIZE );
+ /*
+ * A positive number is the number of an ACK packet received
+ * at the end of window.
+ * A 9999 indicates a timeout when waiting for an ACK packet.
+ * A zero indicates no ACK packet is received when checking for it.
+ * A positive number >= 10000 is the number+10000 of an ACK packet received
+ * while only checking for a packet.
+ * A negative number is the number of a DATA packet send
+ * at the end of a window.
+ * A negative number <= -10000 is the number-10000 of an *empty* DATA
+ * packet send.
+ * Each line corresponds to a window.
+ */
+ int16_t pkg_sequence[] = {
+ -1, 0, -2, 0, -3, 0, -4, 9999, /* First window, trigger full repeat */
+ -1, 0, -2, 0, -3, 0, -4, 2, /* ACK at end of window;
+ first window must be partially repeated */
+ -3, 0, -4, 0, -5, 0, -6, 6, /* Normal sequence */
+ -7, 0, -8, 0, -9, 0, -10, 6, /* Duplicate ACK */
+ -7, 10006, /* Duplicate ACK; ACK before sending all packets of a window */
+ -7, 0, -8, 10008, /* ACK before sending all packets of a window;
+ ACK is not at the window end */
+ -9, 10007, 0, -10, 10013, 0, -11, 0, -12, 12, /* Reception of very old ACK;
+ Reception of future ACK (The
+ wrong "future" ACK must be
+ beyond the block size)
+ in the middle of a window */
+ -13, 0, -14, 0, -15, 0, -16, 11, 17, 16, /* Reception of very old ACK;
+ Reception of future ACK at the
+ end of a window */
+ -17, 0, -18, 0, -10019, 9999, /* Last window timeout, trigger full repeat */
+ -17, 0, -18, 0, -10019, 16, /* Last window, duplicated ACK */
+ -17, 0, -18, 10017, /* Last window, ACK before sending all packets */
+ -18, 0, -10019, 19 /* Last window partially repeated */
+ };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ SMALL_BLOCK_SIZE,
+ SMALL_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( pkg_sequence ); ++i ) {
+ if ( pkg_sequence[i] == 0 ) {
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD,
+ DO_NOT_WAIT_FOR_ANY_TIMEOUT
+ );
+ timeout = FIRST_TIMEOUT_MILLISECONDS;
+ } else if ( pkg_sequence[i] == 9999 ) {
+ _Tftp_Add_interaction_recv_nothing(
+ TFTP_FIRST_FD,
+ timeout
+ );
+ timeout = FIRST_TIMEOUT_MILLISECONDS;
+ } else if ( pkg_sequence[i] >= 10000 ) {
+ block_num = pkg_sequence[i] - 10000;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ DO_NOT_WAIT_FOR_ANY_TIMEOUT,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ timeout = FIRST_TIMEOUT_MILLISECONDS;
+ } else if ( pkg_sequence[i] > 0 ) {
+ block_num = pkg_sequence[i];
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ timeout,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ timeout = FIRST_TIMEOUT_MILLISECONDS;
+ } else if ( pkg_sequence[i] <= -10000 ) {
+ block_num = -pkg_sequence[i] - 10000;
+ pos_in_file = (block_num - 1) * SMALL_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num++,
+ pos_in_file,
+ 0, /* Number of bytes transferred */
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ timeout = FIRST_TIMEOUT_MILLISECONDS;
+ } else {
+ block_num = -pkg_sequence[i];
+ pos_in_file = (block_num - 1) * SMALL_BLOCK_SIZE;
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num++,
+ pos_in_file,
+ SMALL_BLOCK_SIZE,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ timeout = FIRST_TIMEOUT_MILLISECONDS;
+ pos_in_file += SMALL_BLOCK_SIZE;
+ }
+ }
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ SMALL_BLOCK_SIZE, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server where the server sends an OACK without options.
+ * The file is half a data packet long. No timeouts, packet loss, ...
+ * Tests:
+ * * The client processes an OACK without any options in it correctly.
+ * * The client uses the RFC1350 block size because the server does
+ * not agree to the options send.
+ * * The first data packet is half full and signals the end of the transfer.
+ * * The test reads a file from the file system in chunks of double block size.
+ */
+T_TEST_CASE_FIXTURE( write_tiny_file_OACK_no_options, &fixture_large_blocksize )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ size_t pos_in_file = 0;
+ uint16_t block_num = 1;
+ const char options[] = {};
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ LARGE_BLOCK_SIZE,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE / 2,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE / 2;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ 2 * TFTP_RFC1350_BLOCK_SIZE, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file and when the server responses with an ERROR to options
+ * fallback to no options.
+ * The file is one byte long. No timeouts, packet loss, ...
+ * Tests:
+ * * The client uses windowsize and blksize option in the first RRQ.
+ * * Upon reception of an ERROR packet from the server, the client
+ * re-tries opening the session using an RRQ without options.
+ * * The server accepts the RRQ without options by sending a DATA packet.
+ * * The second RRQ is sent to the TFTP server port 69 and not to the
+ * port from which the first ERROR packet came from.
+ * * The first data packet contains a single byte and signals the
+ * end of the transfer.
+ */
+T_TEST_CASE_FIXTURE( read_file_fallback_to_no_options,
+ &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ uint16_t block_num = 1;
+ size_t pos_in_file = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_error(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_ERROR_CODE_OPTION_NEGO,
+ "Don't like options",
+ true
+ );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_data(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num,
+ pos_in_file,
+ 1, /* Number of bytes transferred */
+ get_file_content,
+ true
+ );
+ pos_in_file += 1;
+ _Tftp_Add_interaction_send_ack(
+ TFTP_FIRST_FD,
+ block_num++,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ TFTP_DEFAULT_BLOCK_SIZE / 2, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( bytes_read, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Read a file from the server but the server responds with
+ * an ERROR to all RRQ with and without options.
+ * The file is one byte long. No timeouts, packet loss, ...
+ * Tests:
+ * * The client uses windowsize and blksize option in the first RRQ.
+ * * Upon reception of an ERROR packet from the server, the client
+ * re-tries opening a session using an RRQ without options.
+ * * The second RRQ is sent to the TFTP server port 69 and not to the
+ * port from which the first ERROR packet came from.
+ * * The server does not accept the RRQ without options
+ * and responds again with an ERROR packet.
+ * * The client ends all attempts to create a connection after
+ * receiving an ERROR packet to an RRQ without options.
+ * * The client signals the error to the user.
+ */
+T_TEST_CASE_FIXTURE( read_file_useless_fallback_to_no_options,
+ &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_error(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_ERROR_CODE_ILLEGAL,
+ "Don't like options",
+ true
+ );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_error(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_ERROR_CODE_ILLEGAL,
+ "Go away",
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ TFTP_DEFAULT_BLOCK_SIZE / 2, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( errno, EINVAL );
+ T_eq_int( bytes_read, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file to the server and the server responses with an ACK packet.
+ * The file is half a data packet long. No timeouts, packet loss, ...
+ * Tests:
+ * * The client uses windowsize and blksize option in the WRQ.
+ * * The client uses the RFC1350 option values for the data transfer
+ * because the server responded with an ACK packet.
+ * * The whole package sequence behaves as if only RFC1350 was used.
+ * * The first data packet is half filled and signals the end of the
+ * transfer.
+ */
+T_TEST_CASE_FIXTURE( write_file_ACK_instead_of_OACK, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ size_t pos_in_file = 0;
+ uint16_t block_num = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE / 2,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE / 2;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ 2 * TFTP_RFC1350_BLOCK_SIZE, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * Write a file and when the server responses with an ERROR to options
+ * fallback to no options.
+ * The file is half a data packet long. No timeouts, packet loss, ...
+ * Tests:
+ * * The client uses windowsize and blksize options in the first WRQ.
+ * * Upon reception of an ERROR from the server, the client re-tries
+ * opening a session using a WRQ without options.
+ * * The second WRQ is sent to the TFTP server port 69 and not to the
+ * port from which the first ERROR packet came from.
+ * * The server accepts the WRQ without options by sending an ACK packet.
+ * * The first data packet is half filled and signals the end of the transfer.
+ */
+T_TEST_CASE_FIXTURE( write_file_fallback_to_no_options,
+ &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_written;
+ size_t pos_in_file = 0;
+ uint16_t block_num = 0;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_error(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_ERROR_CODE_ILLEGAL,
+ "Don't like options",
+ true
+ );
+ _Tftp_Add_interaction_send_wrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ NO_BLOCK_SIZE_OPTION,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_send_data(
+ TFTP_FIRST_FD,
+ block_num,
+ pos_in_file,
+ TFTP_RFC1350_BLOCK_SIZE / 2,
+ get_file_content,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ pos_in_file += TFTP_RFC1350_BLOCK_SIZE / 2;
+ _Tftp_Add_interaction_recv_ack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ block_num++,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_written = write_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ pos_in_file, /* Size of file */
+ 2 * TFTP_RFC1350_BLOCK_SIZE, /* Bytes written per call to write() */
+ &ctx->fd0
+ );
+ T_eq_int( bytes_written, pos_in_file );
+ T_no_more_interactions();
+}
+
+/*
+ * The server sends a malformed OACK: The final 0 byte is missing.
+ */
+T_TEST_CASE_FIXTURE( OACK_without_null, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ const char options[] = { 'b', 'l', 'k', 's', 'i', 'z', 'e', '\0', '1', '2' };
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_OPTION_NEGO,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ LARGE_BLOCK_SIZE, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_read, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Server sends a malformed OACK packet: The value of the option is missing.
+ */
+T_TEST_CASE_FIXTURE( OACK_without_option_value, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ const char options[] = TFTP_OPTION_BLKSIZE;
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_OPTION_NEGO,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ LARGE_BLOCK_SIZE, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_read, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Server sends a malformed OACK packet: The option is unknown.
+ */
+T_TEST_CASE_FIXTURE( OACK_with_unknown_option, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ const char options[] =
+ "shoesize" "\0"
+ RTEMS_XSTRING( TFTP_DEFAULT_BLOCK_SIZE );
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_OPTION_NEGO,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ LARGE_BLOCK_SIZE, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_read, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Server sends a malformed OACK packet: The value of the option is
+ * not a number.
+ */
+T_TEST_CASE_FIXTURE( OACK_malformed_option_value, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ const char options[] = TFTP_OPTION_BLKSIZE "\0" "abc";
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_OPTION_NEGO,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ LARGE_BLOCK_SIZE, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_read, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Server sends a malformed OACK packet: The value of the option is empty.
+ */
+T_TEST_CASE_FIXTURE( OACK_with_empty_option_value, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ const char options[] = TFTP_OPTION_BLKSIZE "\0";
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_OPTION_NEGO,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ LARGE_BLOCK_SIZE, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_read, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Server sends a malformed OACK packet: The option name is empty.
+ */
+T_TEST_CASE_FIXTURE( OACK_with_empty_option_name, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ const char options[] = "\0" RTEMS_XSTRING( TFTP_DEFAULT_BLOCK_SIZE );
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_OPTION_NEGO,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ LARGE_BLOCK_SIZE, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_read, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Server sends a malformed OACK packet: The block size option value
+ * is too small.
+ */
+T_TEST_CASE_FIXTURE( OACK_blocksize_too_small, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ const char options[] = TFTP_OPTION_BLKSIZE "\0" "7";
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_OPTION_NEGO,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ LARGE_BLOCK_SIZE, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_read, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Server sends a malformed OACK packet: The block size option value
+ * is too large.
+ */
+T_TEST_CASE_FIXTURE( OACK_blocksize_too_large, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ const char options[] = TFTP_OPTION_BLKSIZE "\0" "1457";
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_OPTION_NEGO,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ LARGE_BLOCK_SIZE, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_read, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Server sends a malformed OACK packet: The windowsize option value
+ * is too small.
+ */
+T_TEST_CASE_FIXTURE( OACK_windowsize_too_small, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ const char options[] = TFTP_OPTION_WINDOWSIZE "\0" "0";
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_OPTION_NEGO,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ LARGE_BLOCK_SIZE, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_read, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Server sends a malformed OACK packet: The windowsize option is too large.
+ */
+T_TEST_CASE_FIXTURE( OACK_windowsize_too_large, &fixture_default_options )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ const char options[] = TFTP_OPTION_WINDOWSIZE "\0" "9";
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ TFTP_DEFAULT_BLOCK_SIZE,
+ TFTP_DEFAULT_WINDOW_SIZE,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_OPTION_NEGO,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ LARGE_BLOCK_SIZE, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_read, 0 );
+ T_no_more_interactions();
+}
+
+/*
+ * Server sends a malformed OACK packet: There is a known but surplus option.
+ */
+T_TEST_CASE_FIXTURE( OACK_with_surplus_option, &fixture_large_blocksize )
+{
+ tftp_test_context *ctx = T_fixture_context();
+ int bytes_read;
+ const char options[] =
+ TFTP_OPTION_BLKSIZE "\0"
+ RTEMS_XSTRING( LARGE_BLOCK_SIZE ) "\0"
+ TFTP_OPTION_WINDOWSIZE "\0"
+ "1";
+
+ /* T_set_verbosity( T_VERBOSE ); */
+ _Tftp_Add_interaction_socket( AF_INET, SOCK_DGRAM, 0, TFTP_FIRST_FD );
+ _Tftp_Add_interaction_send_rrq(
+ TFTP_FIRST_FD,
+ tftpfs_file,
+ TFTP_STD_PORT,
+ tftpfs_ipv4_loopback,
+ LARGE_BLOCK_SIZE,
+ NO_WINDOW_SIZE_OPTION,
+ true
+ );
+ _Tftp_Add_interaction_recv_oack(
+ TFTP_FIRST_FD,
+ FIRST_TIMEOUT_MILLISECONDS,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ options,
+ sizeof( options ),
+ true
+ );
+ _Tftp_Add_interaction_send_error(
+ TFTP_FIRST_FD,
+ TFTP_ERROR_CODE_OPTION_NEGO,
+ SERV_PORT,
+ tftpfs_ipv4_loopback,
+ true
+ );
+ _Tftp_Add_interaction_close( TFTP_FIRST_FD, 0 );
+
+ bytes_read = read_tftp_file(
+ create_tftpfs_path( tftpfs_ipv4_loopback, tftpfs_file ),
+ LARGE_BLOCK_SIZE, /* Bytes read per call to read() */
+ SIZE_MAX,
+ &ctx->fd0
+ );
+ T_eq_int( errno, EPROTO );
+ T_eq_int( bytes_read, 0 );
+ T_no_more_interactions();
+}
+
+const char rtems_test_name[] = "TFTPFS";
+
+static void Init( rtems_task_argument argument )
+{
+ rtems_test_run( argument, TEST_STATE );
+}
+
+/*
+ * RTEMS configuration for tftp
+ */
+
+#define CONFIGURE_FILESYSTEM_TFTPFS
+#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 4
+
+/*
+ * Simple RTEMS configuration
+ */
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/fstests/tftpfs/tftpfs_interactions.c b/testsuites/fstests/tftpfs/tftpfs_interactions.c
new file mode 100644
index 0000000000..9ab026c5da
--- /dev/null
+++ b/testsuites/fstests/tftpfs/tftpfs_interactions.c
@@ -0,0 +1,984 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuiteTestsTFTPFS
+ *
+ * @brief This source file contains the implementation of network interaction
+ * functions related to the UDP network fake for tftpfs testing.
+ *
+ * The UDP Network Fake requires *interactions* between TFTP client and test
+ * (which emulates a TFTP server). The idea is that each test defines a
+ * sequence of interactions. In a successful test run all interactions must
+ * be carried out one-by-one till the *last* interaction is reached.
+ *
+ * Interactions appear when the TFTP client calls functions like
+ * sendto(), recvfrom(), or socket(). Here functions are defined
+ * which
+ *
+ * * handle such interactions and
+ * * permit the tests to easily defined the sequence of interactions.
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h> /* sprintf() */
+#include <inttypes.h> /* printf() macros like PRId8 */
+#include <arpa/inet.h> /* ntohs() */
+#include <rtems/test.h>
+
+
+#include "tftpfs_interactions.h"
+#include "tftpfs_udp_network_fake.h"
+
+/*
+ * Interaction: socket()
+ */
+
+typedef struct interaction_data_socket {
+ int domain;
+ int type;
+ int protocol;
+ int result;
+} interaction_data_socket;
+
+static bool interact_socket( Tftp_Action *act, void *data )
+{
+ interaction_data_socket *d = data;
+ T_eq_int( act->data.socket.domain, d->domain );
+ T_eq_int( act->data.socket.type, d->type );
+ T_eq_int( act->data.socket.protocol, d->protocol );
+ if (
+ act->data.socket.domain != d->domain ||
+ act->data.socket.type != d->type ||
+ act->data.socket.protocol != d->protocol
+ ) {
+ return false;
+ }
+
+ act->data.socket.result = d->result;
+ return true;
+}
+
+void _Tftp_Add_interaction_socket(
+ int domain,
+ int type,
+ int protocol,
+ int result
+)
+{
+ interaction_data_socket *d;
+
+ d = _Tftp_Append_interaction(
+ TFTP_IA_KIND_SOCKET,
+ interact_socket,
+ sizeof( interaction_data_socket )
+ );
+
+ d->domain = domain;
+ d->type = type;
+ d->protocol = protocol;
+ d->result = result;
+}
+
+/*
+ * Interaction: close()
+ */
+
+typedef struct interaction_data_close {
+ int fd;
+ int result;
+} interaction_data_close;
+
+static bool interact_close( Tftp_Action *act, void *data )
+{
+ interaction_data_close *d = data;
+ T_eq_int( act->data.close.fd, d->fd );
+ if ( act->data.close.fd != d->fd ) {
+ return false;
+ }
+
+ act->data.close.result = d->result;
+ return true;
+}
+
+void _Tftp_Add_interaction_close( int fd, int result )
+{
+ interaction_data_close *d;
+
+ d = _Tftp_Append_interaction(
+ TFTP_IA_KIND_CLOSE,
+ interact_close,
+ sizeof( interaction_data_close )
+ );
+
+ d->fd = fd;
+ d->result = result;
+}
+
+/*
+ * Interaction: bind()
+ */
+
+typedef struct interaction_data_bind {
+ int fd;
+ int family;
+ int result;
+} interaction_data_bind;
+
+static bool interact_bind( Tftp_Action *act, void *data )
+{
+ interaction_data_bind *d = data;
+ T_eq_int( act->data.bind.fd, d->fd );
+ T_eq_int( act->data.bind.family, d->family );
+ if (
+ act->data.bind.fd != d->fd ||
+ act->data.bind.family != d->family
+ ) {
+ return false;
+ }
+
+ act->data.bind.result = d->result;
+ return true;
+}
+
+void _Tftp_Add_interaction_bind( int fd, int family, int result )
+{
+ interaction_data_bind *d;
+
+ d = _Tftp_Append_interaction(
+ TFTP_IA_KIND_BIND,
+ interact_bind,
+ sizeof( interaction_data_bind )
+ );
+
+ d->fd = fd;
+ d->family = family;
+ d->result = result;
+}
+
+/*
+ * Interaction: sendto()
+ */
+
+#define TFTP_MAX_FILENAME_STRLEN 12
+
+typedef struct interaction_data_sendto {
+ int fd;
+ uint16_t dest_port;
+ char dest_addr_str[TFTP_MAX_IP_ADDR_STRLEN];
+ bool result;
+ union {
+ struct {
+ uint16_t opcode;
+ char filename[TFTP_MAX_FILENAME_STRLEN];
+ uint16_t block_size;
+ uint16_t window_size;
+ } rwrq;
+ struct {
+ uint16_t block_num;
+ } ack;
+ struct {
+ uint16_t block_num;
+ size_t start;
+ size_t len;
+ uint8_t (*get_data)( size_t pos );
+ } data;
+ struct {
+ uint16_t error_code;
+ } error;
+ } content;
+} interaction_data_sendto;
+
+static bool check_filename_and_mode(
+ const char **buf,
+ size_t *max_len,
+ const char *filename
+)
+{
+ const char *str;
+ size_t len;
+
+ /* Make sure there is a 0 byte in the end before comparing strings */
+ if ( *max_len <= 0 ) { return false; };
+ T_quiet_eq_u8( *( *buf + *max_len - 1 ), '\0' );
+
+ str = *buf;
+ len = strlen( *buf ) + 1;
+ *buf += len;
+ *max_len -= len;
+ if ( strcmp( str, filename ) != 0 ) {
+ T_true( false, "Filename '%s' does not match '%s'", str, filename );
+ return false;
+ }
+ if ( *max_len <= 0 ) {
+ T_true( false, "Mode string missing." );
+ return false;
+ }
+
+ str = *buf;
+ len = strlen( *buf ) + 1;
+ *buf += len;
+ *max_len -= len;
+ if ( strcasecmp( str, TFTP_MODE_OCTET ) != 0 ) {
+ T_true( false, "Mode '%s' does not match '%s'", str, TFTP_MODE_OCTET );
+ return false;
+ }
+
+ return true;
+}
+
+static bool check_for_option(
+ const char **buf,
+ size_t *max_len,
+ const char *option_name,
+ const char *option_value
+)
+{
+ const char *str;
+ size_t len;
+
+ /* Make sure there is a 0 byte in the end before comparing strings */
+ if ( *max_len <= 0 ) { return false; };
+ T_quiet_eq_u8( *( *buf + *max_len - 1 ), '\0' );
+
+ str = *buf;
+ len = strlen( *buf ) + 1;
+ if ( strcasecmp( str, option_name ) != 0 ) {
+ return false;
+ }
+ *buf += len;
+ *max_len -= len;
+
+ if ( *max_len <= 0 ) {
+ T_true( false, "Option value for '%s' missing.", option_name );
+ return false;
+ }
+
+ str = *buf;
+ len = strlen( *buf ) + 1;
+ *buf += len;
+ *max_len -= len;
+ if ( strcmp( str, option_value ) != 0 ) {
+ T_true(
+ false,
+ "Option '%s': Actual value '%s' does not match '%s'",
+ option_name,
+ str,
+ option_value
+ );
+ return false;
+ }
+
+ return true;
+}
+
+static bool interact_sendto_common( Tftp_Action *act, void *data )
+{
+ interaction_data_sendto *d = data;
+ const Tftp_Packet *pkt = act->data.sendto.buf;
+
+ T_eq_int( act->data.sendto.fd, d->fd );
+ T_eq_int( act->data.sendto.flags, 0 );
+ T_eq_u16( act->data.sendto.dest_port, d->dest_port );
+ T_eq_str( act->data.sendto.dest_addr_str, d->dest_addr_str );
+ T_gt_sz( act->data.sendto.len, sizeof( pkt->opcode ) );
+ if (
+ act->data.sendto.fd != d->fd ||
+ act->data.sendto.flags != 0 ||
+ act->data.sendto.dest_port != d->dest_port ||
+ strcmp( act->data.sendto.dest_addr_str, d->dest_addr_str ) != 0 ||
+ act->data.sendto.len <= sizeof( pkt->opcode )
+ ) {
+ return false;
+ }
+
+ act->data.sendto.result = d->result ? act->data.sendto.len : -1;
+ return true;
+}
+
+static bool interact_sendto_rwrq( Tftp_Action *act, void *data )
+{
+ interaction_data_sendto *d = data;
+ const Tftp_Packet *pkt = act->data.sendto.buf;
+ size_t len = act->data.sendto.len - sizeof( pkt->opcode );
+ const char *buf = pkt->content.rrq.opts;
+ const char *tmp;
+ char block_size_buffer[6];
+ char window_size_buffer[6];
+
+ if ( !interact_sendto_common( act, data ) ) {
+ return false;
+ }
+
+ T_eq_u16( ntohs( pkt->opcode ), d->content.rwrq.opcode );
+ if ( ntohs( pkt->opcode ) != d->content.rwrq.opcode ) { return false; }
+ if ( !check_filename_and_mode( &buf, &len, d->content.rwrq.filename ) ) {
+ return false;
+ }
+
+ snprintf(
+ block_size_buffer,
+ sizeof( block_size_buffer ),
+ "%"PRIu16,
+ d->content.rwrq.block_size
+ );
+ snprintf(
+ window_size_buffer,
+ sizeof( window_size_buffer ),
+ "%"PRIu16,
+ d->content.rwrq.window_size
+ );
+
+ for ( tmp = buf; len > 0; ) {
+ if ( d->content.rwrq.block_size != NO_BLOCK_SIZE_OPTION &&
+ check_for_option(
+ &buf,
+ &len,
+ TFTP_OPTION_BLKSIZE,
+ block_size_buffer )) {
+ d->content.rwrq.block_size = NO_BLOCK_SIZE_OPTION;
+ } else if ( d->content.rwrq.window_size != NO_WINDOW_SIZE_OPTION &&
+ check_for_option(
+ &buf,
+ &len,
+ TFTP_OPTION_WINDOWSIZE,
+ window_size_buffer )) {
+ d->content.rwrq.window_size = NO_WINDOW_SIZE_OPTION;
+ } else {
+ T_true( false, "Error at option '%s'", tmp );
+ return false;
+ }
+ }
+
+ T_eq_sz( len, 0 ); /* Check that all data till the end has been read */
+
+ return true;
+}
+
+static bool interact_sendto_ack( Tftp_Action *act, void *data )
+{
+ interaction_data_sendto *d = data;
+ const Tftp_Packet *pkt = act->data.sendto.buf;
+ size_t pkt_size = sizeof( pkt->opcode ) + sizeof( pkt->content.ack );
+
+ if ( !interact_sendto_common( act, data ) ) {
+ return false;
+ }
+
+ T_eq_u16( ntohs( pkt->opcode ), TFTP_OPCODE_ACK );
+ T_eq_sz( act->data.sendto.len, pkt_size );
+ if ( ntohs( pkt->opcode ) != TFTP_OPCODE_ACK ||
+ act->data.sendto.len != pkt_size
+ ) {
+ return false;
+ }
+
+ T_eq_u16( ntohs( pkt->content.ack.block_num ), d->content.ack.block_num );
+ if ( ntohs( pkt->content.ack.block_num ) != d->content.ack.block_num ) {
+ return false;
+ }
+
+ return true;
+}
+
+static bool interact_sendto_data( Tftp_Action *act, void *data )
+{
+ interaction_data_sendto *d = data;
+ const Tftp_Packet *pkt = act->data.sendto.buf;
+ size_t pkt_size = sizeof( pkt->opcode ) +
+ sizeof( pkt->content.data.block_num ) + d->content.data.len;
+ size_t i;
+
+ if ( !interact_sendto_common( act, data ) ) {
+ return false;
+ }
+
+ T_eq_u16( ntohs( pkt->opcode ), TFTP_OPCODE_DATA );
+ T_eq_sz( act->data.sendto.len, pkt_size );
+ if ( ntohs( pkt->opcode ) != TFTP_OPCODE_DATA ||
+ act->data.sendto.len != pkt_size
+ ) {
+ return false;
+ }
+
+ T_eq_u16( ntohs( pkt->content.ack.block_num ), d->content.ack.block_num );
+ if ( ntohs( pkt->content.ack.block_num ) != d->content.ack.block_num ) {
+ return false;
+ }
+
+ for ( i = 0; i < d->content.data.len; ++i ) {
+ if ( pkt->content.data.bytes[i] !=
+ d->content.data.get_data( d->content.data.start + i ) ) {
+ T_true(
+ false,
+ "Expected byte %02"PRIx8" but TFTP client sent %02"PRIx8
+ " at position %zu",
+ d->content.data.get_data( d->content.data.start + i ),
+ pkt->content.data.bytes[i],
+ d->content.data.start + i
+ );
+ return false;
+ }
+ }
+
+ return true;
+}
+
+static bool interact_sendto_error( Tftp_Action *act, void *data )
+{
+ interaction_data_sendto *d = data;
+ const Tftp_Packet *pkt = act->data.sendto.buf;
+ size_t pkt_size = sizeof( pkt->opcode ) + sizeof( pkt->content.error );
+
+ if ( !interact_sendto_common( act, data ) ) {
+ return false;
+ }
+
+ T_eq_u16( ntohs( pkt->opcode ), TFTP_OPCODE_ERROR );
+ T_gt_sz( act->data.sendto.len, pkt_size );
+ if ( ntohs( pkt->opcode ) != TFTP_OPCODE_ERROR ||
+ act->data.sendto.len <= pkt_size
+ ) {
+ return false;
+ }
+
+ T_eq_u16(
+ ntohs( pkt->content.error.error_code ),
+ d->content.error.error_code
+ );
+ if ( ntohs( pkt->content.error.error_code ) != d->content.error.error_code ) {
+ return false;
+ }
+
+ return true;
+}
+
+static void add_interaction_send_rwrq(
+ int fd,
+ const char *filename,
+ uint16_t dest_port,
+ const char *dest_addr_str,
+ uint16_t block_size,
+ uint16_t window_size,
+ bool result,
+ uint16_t opcode
+)
+{
+ interaction_data_sendto *d;
+
+ d = _Tftp_Append_interaction(
+ TFTP_IA_KIND_SENDTO,
+ interact_sendto_rwrq,
+ sizeof( interaction_data_sendto )
+ );
+
+ T_assert_lt_sz( strlen( filename ), TFTP_MAX_FILENAME_STRLEN );
+ T_assert_lt_sz( strlen( dest_addr_str ), TFTP_MAX_IP_ADDR_STRLEN );
+ strcpy( d->content.rwrq.filename, filename );
+ strcpy( d->dest_addr_str, dest_addr_str );
+ d->fd = fd;
+ d->dest_port = dest_port;
+ d->content.rwrq.opcode = opcode;
+ d->content.rwrq.block_size = block_size;
+ d->content.rwrq.window_size = window_size;
+ d->result = result;
+}
+
+void _Tftp_Add_interaction_send_rrq(
+ int fd,
+ const char *filename,
+ uint16_t dest_port,
+ const char *dest_addr_str,
+ uint16_t block_size,
+ uint16_t window_size,
+ bool result
+)
+{
+ add_interaction_send_rwrq(
+ fd,
+ filename,
+ dest_port,
+ dest_addr_str,
+ block_size,
+ window_size,
+ result,
+ TFTP_OPCODE_RRQ
+ );
+}
+
+void _Tftp_Add_interaction_send_wrq(
+ int fd,
+ const char *filename,
+ uint16_t dest_port,
+ const char *dest_addr_str,
+ uint16_t block_size,
+ uint16_t window_size,
+ bool result
+)
+{
+ add_interaction_send_rwrq(
+ fd,
+ filename,
+ dest_port,
+ dest_addr_str,
+ block_size,
+ window_size,
+ result,
+ TFTP_OPCODE_WRQ
+ );
+}
+
+void _Tftp_Add_interaction_send_ack(
+ int fd,
+ uint16_t block_num,
+ uint16_t dest_port,
+ const char *dest_addr_str,
+ bool result
+)
+{
+ interaction_data_sendto *d;
+
+ d = _Tftp_Append_interaction(
+ TFTP_IA_KIND_SENDTO,
+ interact_sendto_ack,
+ sizeof( interaction_data_sendto )
+ );
+
+ T_assert_lt_sz( strlen( dest_addr_str ), TFTP_MAX_IP_ADDR_STRLEN );
+ strcpy( d->dest_addr_str, dest_addr_str );
+ d->fd = fd;
+ d->dest_port = dest_port;
+ d->result = result;
+ d->content.ack.block_num = block_num;
+}
+
+void _Tftp_Add_interaction_send_data(
+ int fd,
+ uint16_t block_num,
+ size_t start,
+ size_t len,
+ uint8_t (*get_data)( size_t pos ),
+ uint16_t dest_port,
+ const char *dest_addr_str,
+ bool result
+)
+{
+ interaction_data_sendto *d;
+
+ d = _Tftp_Append_interaction(
+ TFTP_IA_KIND_SENDTO,
+ interact_sendto_data,
+ sizeof( interaction_data_sendto )
+ );
+
+ T_assert_lt_sz( strlen( dest_addr_str ), TFTP_MAX_IP_ADDR_STRLEN );
+ strcpy( d->dest_addr_str, dest_addr_str );
+ d->fd = fd;
+ d->dest_port = dest_port;
+ d->result = result;
+ d->content.data.block_num = block_num;
+ d->content.data.start = start;
+ d->content.data.len = len;
+ d->content.data.get_data = get_data;
+}
+
+void _Tftp_Add_interaction_send_error(
+ int fd,
+ uint16_t error_code,
+ uint16_t dest_port,
+ const char *dest_addr_str,
+ bool result
+)
+{
+ interaction_data_sendto *d;
+
+ d = _Tftp_Append_interaction(
+ TFTP_IA_KIND_SENDTO,
+ interact_sendto_error,
+ sizeof( interaction_data_sendto )
+ );
+
+ T_assert_lt_sz( strlen( dest_addr_str ), TFTP_MAX_IP_ADDR_STRLEN );
+ strcpy( d->dest_addr_str, dest_addr_str );
+ d->fd = fd;
+ d->dest_port = dest_port;
+ d->result = result;
+ d->content.error.error_code = error_code;
+}
+
+/*
+ * Interaction: recvfrom()
+ */
+
+typedef struct interaction_data_recvfrom {
+ int fd;
+ uint32_t timeout_ms;
+ uint16_t src_port;
+ char src_addr_str[TFTP_MAX_IP_ADDR_STRLEN];
+ bool result;
+ union {
+ struct {
+ uint16_t block_num;
+ } ack;
+ struct {
+ size_t options_size;
+ char options[TFTP_MAX_OPTIONS_SIZE];
+ } oack;
+ struct {
+ uint16_t block_num;
+ size_t start;
+ size_t len;
+ uint8_t (*get_data)( size_t pos );
+ } data;
+ struct {
+ uint16_t error_code;
+ char err_msg[TFTP_MAX_ERROR_STRLEN];
+ } error;
+ struct {
+ size_t len;
+ uint8_t bytes[0];
+ } raw;
+ } content;
+} interaction_data_recvfrom;
+
+static bool interact_recvfrom_common(
+ Tftp_Action *act,
+ void *data,
+ size_t actual_size
+)
+{
+ interaction_data_recvfrom *d = data;
+
+ T_eq_int( act->data.recvfrom.fd, d->fd );
+ T_quiet_ge_sz( act->data.recvfrom.len, actual_size );
+ if (
+ act->data.recvfrom.fd != d->fd ||
+ act->data.recvfrom.len < actual_size
+ ) {
+ return false;
+ }
+ if ( d->timeout_ms == DO_NOT_WAIT_FOR_ANY_TIMEOUT ) {
+ T_ne_int( act->data.recvfrom.flags, 0 );
+ if ( act->data.recvfrom.flags == 0 ) {
+ return false;
+ }
+ } else {
+ T_eq_int( act->data.recvfrom.flags, 0 );
+ T_eq_u32( act->data.recvfrom.timeout_ms, d->timeout_ms );
+ if (
+ act->data.recvfrom.flags != 0 ||
+ act->data.recvfrom.timeout_ms != d->timeout_ms
+ ) {
+ return false;
+ }
+ }
+
+ strncpy(
+ act->data.recvfrom.src_addr_str,
+ d->src_addr_str,
+ sizeof( act->data.recvfrom.src_addr_str )
+ );
+ act->data.recvfrom.src_addr_str[
+ sizeof( act->data.recvfrom.src_addr_str ) - 1] = '\0';
+ act->data.recvfrom.src_port = d->src_port;
+ act->data.recvfrom.result = d->result ? actual_size : -1;
+ return true;
+}
+
+static bool interact_recvfrom_data( Tftp_Action *act, void *data )
+{
+ interaction_data_recvfrom *d = data;
+ Tftp_Packet *pkt = act->data.recvfrom.buf;
+ size_t actual_size;
+ size_t i;
+
+ actual_size = sizeof( pkt->opcode ) +
+ sizeof( pkt->content.data.block_num ) + d->content.data.len;
+ if ( !interact_recvfrom_common( act, data, actual_size ) ) {
+ return false;
+ }
+
+ pkt->opcode = htons( TFTP_OPCODE_DATA );
+ pkt->content.data.block_num = htons( d->content.data.block_num );
+ for ( i = 0; i < d->content.data.len; ++i ) {
+ pkt->content.data.bytes[i] =
+ d->content.data.get_data( d->content.data.start + i );
+ }
+
+ return true;
+}
+
+static bool interact_recvfrom_ack( Tftp_Action *act, void *data )
+{
+ interaction_data_recvfrom *d = data;
+ Tftp_Packet *pkt = act->data.recvfrom.buf;
+ size_t actual_size;
+
+ actual_size = sizeof( pkt->opcode ) + sizeof( pkt->content.ack.block_num );
+ if ( !interact_recvfrom_common( act, data, actual_size ) ) {
+ return false;
+ }
+
+ pkt->opcode = htons( TFTP_OPCODE_ACK );
+ pkt->content.ack.block_num = htons( d->content.ack.block_num );
+
+ return true;
+}
+
+static bool interact_recvfrom_oack( Tftp_Action *act, void *data )
+{
+ interaction_data_recvfrom *d = data;
+ Tftp_Packet *pkt = act->data.recvfrom.buf;
+ size_t actual_size;
+
+ actual_size = sizeof( pkt->opcode ) + d->content.oack.options_size;
+ if ( !interact_recvfrom_common( act, data, actual_size ) ) {
+ return false;
+ }
+
+ pkt->opcode = htons( TFTP_OPCODE_OACK );
+ memcpy(
+ pkt->content.oack.opts,
+ d->content.oack.options,
+ d->content.oack.options_size
+ );
+
+ return true;
+}
+
+static bool interact_recvfrom_error( Tftp_Action *act, void *data )
+{
+ interaction_data_recvfrom *d = data;
+ Tftp_Packet *pkt = act->data.recvfrom.buf;
+ size_t actual_size;
+
+ actual_size = sizeof( pkt->opcode ) +
+ sizeof( pkt->content.error.error_code ) +
+ strlen( d->content.error.err_msg ) + 1;
+ if ( !interact_recvfrom_common( act, data, actual_size ) ) {
+ return false;
+ }
+
+ pkt->opcode = htons( TFTP_OPCODE_ERROR );
+ pkt->content.error.error_code = htons( d->content.error.error_code );
+ strncpy(
+ pkt->content.error.err_msg,
+ d->content.error.err_msg,
+ act->data.recvfrom.len - sizeof( pkt->opcode ) -
+ sizeof( pkt->content.error.error_code ) - 1
+ );
+
+ return true;
+}
+
+static bool interact_recvfrom_raw( Tftp_Action *act, void *data )
+{
+ interaction_data_recvfrom *d = data;
+ uint8_t *pkt = act->data.recvfrom.buf;
+ size_t actual_size = d->content.raw.len;
+
+ if ( !interact_recvfrom_common( act, data, actual_size ) ) {
+ return false;
+ }
+
+ memcpy( pkt, d->content.raw.bytes, actual_size );
+
+ return true;
+}
+
+void _Tftp_Add_interaction_recv_data(
+ int fd,
+ uint32_t timeout_ms,
+ uint16_t src_port,
+ const char *src_addr_str,
+ uint16_t block_num,
+ size_t start,
+ size_t len,
+ uint8_t (*get_data)( size_t pos ),
+ bool result
+)
+{
+ interaction_data_recvfrom *d;
+
+ d = _Tftp_Append_interaction(
+ TFTP_IA_KIND_RECVFROM,
+ interact_recvfrom_data,
+ sizeof( interaction_data_recvfrom )
+ );
+
+ T_assert_lt_sz( strlen( src_addr_str ), sizeof( d->src_addr_str ) - 1 );
+ strcpy( d->src_addr_str, src_addr_str );
+ d->fd = fd;
+ d->timeout_ms = timeout_ms;
+ d->src_port = src_port;
+ d->content.data.block_num = block_num;
+ d->content.data.start = start;
+ d->content.data.len = len;
+ d->content.data.get_data = get_data;
+ d->result = result;
+}
+
+void _Tftp_Add_interaction_recv_ack(
+ int fd,
+ uint32_t timeout_ms,
+ uint16_t src_port,
+ const char *src_addr_str,
+ uint16_t block_num,
+ bool result
+)
+{
+ interaction_data_recvfrom *d;
+
+ d = _Tftp_Append_interaction(
+ TFTP_IA_KIND_RECVFROM,
+ interact_recvfrom_ack,
+ sizeof( interaction_data_recvfrom )
+ );
+
+ T_assert_lt_sz( strlen( src_addr_str ), sizeof( d->src_addr_str ) - 1 );
+ strcpy( d->src_addr_str, src_addr_str );
+ d->fd = fd;
+ d->timeout_ms = timeout_ms;
+ d->src_port = src_port;
+ d->content.ack.block_num = block_num;
+ d->result = result;
+}
+
+void _Tftp_Add_interaction_recv_oack(
+ int fd,
+ uint32_t timeout_ms,
+ uint16_t src_port,
+ const char *src_addr_str,
+ const char *options,
+ size_t options_size,
+ bool result
+)
+{
+ interaction_data_recvfrom *d;
+
+ d = _Tftp_Append_interaction(
+ TFTP_IA_KIND_RECVFROM,
+ interact_recvfrom_oack,
+ sizeof( interaction_data_recvfrom )
+ );
+
+ T_assert_lt_sz( strlen( src_addr_str ), sizeof( d->src_addr_str ) - 1 );
+ strcpy( d->src_addr_str, src_addr_str );
+ T_assert_lt_sz( options_size, sizeof( d->content.oack.options ) );
+ memcpy( d->content.oack.options, options, options_size );
+ d->fd = fd;
+ d->timeout_ms = timeout_ms;
+ d->src_port = src_port;
+ d->content.oack.options_size = options_size;
+ d->result = result;
+}
+
+void _Tftp_Add_interaction_recv_error(
+ int fd,
+ uint32_t timeout_ms,
+ uint16_t src_port,
+ const char *src_addr_str,
+ uint16_t error_code,
+ const char *err_msg,
+ bool result
+)
+{
+ interaction_data_recvfrom *d;
+
+ d = _Tftp_Append_interaction(
+ TFTP_IA_KIND_RECVFROM,
+ interact_recvfrom_error,
+ sizeof( interaction_data_recvfrom )
+ );
+
+ T_assert_lt_sz( strlen( src_addr_str ), sizeof( d->src_addr_str ) - 1 );
+ strcpy( d->src_addr_str, src_addr_str );
+ T_assert_lt_sz( strlen( src_addr_str ), sizeof( d->src_addr_str ) - 1 );
+ strcpy( d->content.error.err_msg, err_msg );
+ d->fd = fd;
+ d->timeout_ms = timeout_ms;
+ d->src_port = src_port;
+ d->content.error.error_code = error_code;
+ d->result = result;
+}
+
+void _Tftp_Add_interaction_recv_raw(
+ int fd,
+ uint32_t timeout_ms,
+ uint16_t src_port,
+ const char *src_addr_str,
+ size_t len,
+ const uint8_t *bytes,
+ bool result
+)
+{
+ interaction_data_recvfrom *d;
+
+ d = _Tftp_Append_interaction(
+ TFTP_IA_KIND_RECVFROM,
+ interact_recvfrom_raw,
+ sizeof( interaction_data_recvfrom ) + len
+ );
+
+ T_assert_lt_sz( strlen( src_addr_str ), sizeof( d->src_addr_str ) - 1 );
+ strcpy( d->src_addr_str, src_addr_str );
+ memcpy( d->content.raw.bytes, bytes, len );
+ d->fd = fd;
+ d->timeout_ms = timeout_ms;
+ d->src_port = src_port;
+ d->content.raw.len = len;
+ d->result = result;
+}
+
+void _Tftp_Add_interaction_recv_nothing(
+ int fd,
+ uint32_t timeout_ms
+)
+{
+ static const char *dummy_ip = "0.0.0.0";
+ interaction_data_recvfrom *d;
+
+ d = _Tftp_Append_interaction(
+ TFTP_IA_KIND_RECVFROM,
+ interact_recvfrom_ack,
+ sizeof( interaction_data_recvfrom )
+ );
+
+
+ T_assert_lt_sz( strlen( dummy_ip ), sizeof( d->src_addr_str ) - 1 );
+ strcpy( d->src_addr_str, dummy_ip );
+ d->fd = fd;
+ d->timeout_ms = timeout_ms;
+ d->src_port = 0;
+ d->content.ack.block_num = 0;
+ d->result = false;
+}
diff --git a/testsuites/fstests/tftpfs/tftpfs_interactions.h b/testsuites/fstests/tftpfs/tftpfs_interactions.h
new file mode 100644
index 0000000000..732a542e99
--- /dev/null
+++ b/testsuites/fstests/tftpfs/tftpfs_interactions.h
@@ -0,0 +1,213 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuiteTestsTFTPFS
+ *
+ * @brief This header file provides functions used to
+ * implement network interactions of the UDP network fake for tftpfs tests.
+ *
+ * Definitions and declarations of data structures and functions.
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifndef _TFTPFS_INTERACTIONS_H
+#define _TFTPFS_INTERACTIONS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define NO_BLOCK_SIZE_OPTION 0
+#define NO_WINDOW_SIZE_OPTION 0
+#define DO_NOT_WAIT_FOR_ANY_TIMEOUT UINT32_MAX
+
+/**
+ * @addtogroup RTEMSTestSuiteTestsTFTPFS
+ *
+ * @{
+ */
+
+/*
+ * These functions append an interaction to the list of expected interactions.
+ * For example, _Tftp_Add_interaction_socket() "means":
+ *
+ * * As next interaction, expect that the TFTP client calls function
+ * socket().
+ * * Expect (i.e. check) that this socket() call will get parameter values
+ * as provided by its parameters `domain`, `type` and `protocol`.
+ * * This call to socket() shall return value of parameter `result`
+ * to the TFTP client.
+ *
+ * The interactions with functions sendto() and recvfrom() are a bit more
+ * complicated because specific packets are expected to be received or sent.
+ * For example, _Tftp_Add_interaction_send_rrq() appends an interaction
+ * where the TFTP client is expected to call sendto() with an RRQ (Read
+ * Request) packet. _Tftp_Add_interaction_recv_data() appends an interaction
+ * where the TFTP client is expected to call recvfrom() and as result it
+ * receives a data packet (which the interaction writes into the buffer
+ * which the TFTP client provides as parameter in its the recvfrom() call).
+ */
+
+void _Tftp_Add_interaction_socket(
+ int domain,
+ int type,
+ int protocol,
+ int result
+);
+
+void _Tftp_Add_interaction_close( int fd, int result );
+
+void _Tftp_Add_interaction_bind( int fd, int family, int result );
+
+void _Tftp_Add_interaction_send_rrq(
+ int fd,
+ const char *filename,
+ uint16_t dest_port,
+ const char *dest_addr_str,
+ uint16_t block_size,
+ uint16_t window_size,
+ bool result
+);
+
+void _Tftp_Add_interaction_send_wrq(
+ int fd,
+ const char *filename,
+ uint16_t dest_port,
+ const char *dest_addr_str,
+ uint16_t block_size,
+ uint16_t window_size,
+ bool result
+);
+
+void _Tftp_Add_interaction_send_ack(
+ int fd,
+ uint16_t block_num,
+ uint16_t dest_port,
+ const char *dest_addr_str,
+ bool result
+);
+
+void _Tftp_Add_interaction_send_data(
+ int fd,
+ uint16_t block_num,
+ size_t start,
+ size_t len,
+ uint8_t (*get_data)( size_t pos ),
+ uint16_t dest_port,
+ const char *dest_addr_str,
+ bool result
+);
+
+void _Tftp_Add_interaction_send_error(
+ int fd,
+ uint16_t error_code,
+ uint16_t dest_port,
+ const char *dest_addr_str,
+ bool result
+);
+
+/*
+ * _Tftp_Add_interaction_recv_data() permits only a boolean result.
+ * The TFTP client code does not check `errno` and always behaves as if
+ * a return of -1 indicates a timeout. Hence
+ * _Tftp_Add_interaction_recv_data() permits only a boolean result
+ * and no special value to distinct timeouts from other errors.
+ */
+void _Tftp_Add_interaction_recv_data(
+ int fd,
+ uint32_t timeout_ms,
+ uint16_t src_port,
+ const char *src_addr_str,
+ uint16_t block_num,
+ size_t start,
+ size_t len,
+ uint8_t (*get_data)( size_t pos ),
+ bool result
+);
+
+void _Tftp_Add_interaction_recv_ack(
+ int fd,
+ uint32_t timeout_ms,
+ uint16_t src_port,
+ const char *src_addr_str,
+ uint16_t block_num,
+ bool result
+);
+
+void _Tftp_Add_interaction_recv_oack(
+ int fd,
+ uint32_t timeout_ms,
+ uint16_t src_port,
+ const char *src_addr_str,
+ const char *options,
+ size_t options_size,
+ bool result
+);
+
+void _Tftp_Add_interaction_recv_error(
+ int fd,
+ uint32_t timeout_ms,
+ uint16_t src_port,
+ const char *src_addr_str,
+ uint16_t error_code,
+ const char *err_msg,
+ bool result
+);
+
+/*
+ * The TFTP client receives a "raw" packet.
+ *
+ * Test tests use this function to trigger packet format errors such as:
+ *
+ * * Too short packets,
+ * * Strings without 0-byte at their end
+ * * Wrong op-codes
+ */
+void _Tftp_Add_interaction_recv_raw(
+ int fd,
+ uint32_t timeout_ms,
+ uint16_t src_port,
+ const char *src_addr_str,
+ size_t len,
+ const uint8_t *bytes,
+ bool result
+);
+
+void _Tftp_Add_interaction_recv_nothing(
+ int fd,
+ uint32_t timeout_ms
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TFTPFS_INTERACTIONS_H */
diff --git a/testsuites/fstests/tftpfs/tftpfs_udp_network_fake.c b/testsuites/fstests/tftpfs/tftpfs_udp_network_fake.c
new file mode 100644
index 0000000000..995ae05fe0
--- /dev/null
+++ b/testsuites/fstests/tftpfs/tftpfs_udp_network_fake.c
@@ -0,0 +1,983 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuiteTestsTFTPFS
+ *
+ * @brief This source file contains the implementation of UDP network fake
+ * functions related to tftpfs testing.
+ *
+ * The libtftpfs source code is situated in the RTEMS repository. For
+ * testing it, either libbsd or RTEMS legacy networking would be required.
+ * This implies that the tests for libtftpfs would need to be placed in
+ * the libbsd repository - a different one than the libtftpfs source code.
+ *
+ * Yet, libtftpfs uses only a handful of networking functions. This
+ * file provides fake implementations of those functions. These fake
+ * functions permit to simulate the exchange of UDP packets
+ * with the libtftpfs code and thus permits testing libtftpfs without
+ * the need of a full network stack.
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h> /* snprintf() */
+#include <stdlib.h> /* malloc(), free() */
+#include <inttypes.h> /* printf() macros like PRId8 */
+#include <string.h>
+#include <ctype.h> /* isprint() */
+#include <netdb.h> /* getnameinfo() */
+#include <arpa/inet.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h> /* struct sockaddr_in, struct sockaddr_in6 */
+#include <rtems/test.h>
+
+#include "tftpfs_udp_network_fake.h"
+
+#define IPV4_ADDR_SIZE 4
+#define MAX_SOCKET_FD 4
+
+int __wrap_close( int fd ); /* Prevent compiler warnings */
+int __real_close( int fd ); /* Prevent compiler warnings */
+
+/*
+ * Control data
+ */
+
+/*
+ * A singleton global data object is used to control the network interaction
+ * with the TFTP client.
+ *
+ * A test can exchange UDP packets when the TFTP client calls functions
+ * sendto() and recvfrom(). Simply put, when the client calls sendto()
+ * the test must check that the client sends the expected UDP packet
+ * and when the client calls recvfrom() the test must provide the UDP
+ * packet it wants to send to the client.
+ *
+ * Defining the sequence of sendto() and recvfrom() function calls
+ * including parameters and return values essentially represents a
+ * test for the TFTP networking. To be a bit more complete, a few more
+ * functions such as socket() and bind() are included in the sequence.
+ *
+ * Each of these function calls defines a single *interaction* between
+ * TFTP client and test (aka TFTP server). The idea is that each test
+ * defines a sequence of interactions. In a successful test run all
+ * interactions must be carried out one-by-one till the last (normally
+ * "close()") interaction is reached.
+ *
+ * The control_data essentially stores the sequence of interactions
+ * as well as the current state (e.g. which is the next interaction?).
+ */
+typedef struct control_data {
+ Tftp_Interaction *interaction_head;
+ Tftp_Interaction *interaction_tail;
+ Tftp_Interaction *interaction_cur;
+ int receive_timeout_socket_fd[MAX_SOCKET_FD];
+ uint32_t receive_timeout_ms[MAX_SOCKET_FD];
+} control_data;
+
+static control_data *control = NULL;
+
+void _Tftp_Reset( void )
+{
+ static control_data ctl;
+ int i;
+ Tftp_Interaction *iter;
+ Tftp_Interaction *current;
+
+ if ( control == NULL ) {
+ control = &ctl;
+ } else {
+ for ( iter = control->interaction_head; iter != NULL; ) {
+ current = iter;
+ iter = iter->next;
+ free( current );
+ }
+ }
+
+ control->interaction_head = NULL;
+ control->interaction_tail = (Tftp_Interaction *) &control->interaction_head;
+ control->interaction_cur = (Tftp_Interaction *) &control->interaction_head;
+ for ( i = 0; i < MAX_SOCKET_FD; ++i ) {
+ control->receive_timeout_socket_fd[i] = 0;
+ control->receive_timeout_ms[i] = 0;
+ }
+}
+
+void *_Tftp_Append_interaction(
+ Tftp_Action_kind kind,
+ Tftp_Interaction_fn fn,
+ size_t size
+)
+{
+ Tftp_Interaction *ia;
+ T_quiet_not_null( control );
+ ia = malloc( sizeof( Tftp_Interaction ) + size );
+ T_quiet_not_null( ia );
+ ia->next = NULL;
+ ia->kind = kind;
+ ia->fn = fn;
+ control->interaction_tail->next = ia;
+ control->interaction_tail = ia;
+ return ia->data;
+}
+
+bool _Tftp_Has_no_more_interactions( void )
+{
+ return control == NULL || control->interaction_cur != NULL;
+}
+
+static Tftp_Interaction *get_next_interaction( control_data *control )
+{
+ if ( control == NULL ) {
+ return NULL;
+ }
+ if ( control->interaction_cur != NULL ) {
+ control->interaction_cur = control->interaction_cur->next;
+ }
+ return control->interaction_cur;
+}
+
+static const char *get_action_kind_as_string( Tftp_Action_kind kind )
+{
+ switch ( kind ) {
+ case TFTP_IA_KIND_SOCKET:
+ return "socket";
+ case TFTP_IA_KIND_CLOSE:
+ return "close";
+ case TFTP_IA_KIND_BIND:
+ return "bind";
+ case TFTP_IA_KIND_SENDTO:
+ return "sendto";
+ case TFTP_IA_KIND_RECVFROM:
+ return "recvfrom";
+ default:
+ break;
+ }
+ return "UNKNOWN";
+}
+
+/*
+ * Parse and log UDP TFTP packet functions
+ */
+
+const char *_Tftp_Get_error_str( uint16_t error_code )
+{
+ static const char *unknown_str = "Unknown error code";
+ static const char *error_str[] = {
+ "Not defined, see error message (if any)",
+ "File not found",
+ "Access violation",
+ "Disk full or allocation exceeded",
+ "Illegal TFTP operation",
+ "Unknown transfer ID",
+ "File already exists",
+ "No such user",
+ "Option negociation failed",
+ };
+ const char *result = unknown_str;
+
+ if ( error_code < RTEMS_ARRAY_SIZE( error_str ) ) {
+ result = error_str[ error_code ];
+ }
+
+ return result;
+}
+
+static void log_hex_dump( const void *buf, size_t len )
+{
+ const size_t per_line = 16;
+ size_t pos = 0;
+ const uint8_t *pkt = buf;
+ char hex[2 * per_line + 4];
+ char chars[per_line + 1];
+ char *hexpos;
+ int i;
+
+ chars[per_line] = '\0';
+ do {
+ for ( i = 0, hexpos = hex; i < per_line; ++i ) {
+ if ( pos + i < len ) {
+ hexpos += snprintf( hexpos, 3, "%02"PRIX8, pkt[ pos + i ] );
+ chars[i] = ( isprint( pkt[ pos + i ] ) ) ? pkt[ pos + i ] : '.';
+ } else {
+ hexpos += snprintf( hexpos, 3, " " );
+ chars[i] = '\0';
+ }
+ if ( i < per_line - 1 && i % 4 == 3 ) {
+ *(hexpos++) = ' ';
+ }
+ }
+
+ T_log( T_VERBOSE, " %04zX : %s |%s|", pos, hex, chars );
+ pos += per_line;
+ } while( len > pos );
+}
+
+static const char *get_next_str(
+ const char **buf,
+ size_t *max_len,
+ bool *has_errors
+)
+{
+ const char *result;
+ size_t len = strnlen( *buf, *max_len );
+ if ( len < *max_len ) {
+ result = *buf;
+ *buf += len + 1;
+ *max_len -= len + 1;
+ } else {
+ result = "MAL_FORMED_STRING";
+ *max_len = 0;
+ *has_errors = true;
+ }
+ return result;
+}
+
+static void log_tftp_packet( const void *buf, size_t len )
+{
+ int op_code;
+ const char *buffer = ( (char *) buf ) + sizeof( uint16_t );
+ size_t remaining_len = len - sizeof( uint16_t );
+ bool has_errors = false;
+
+ if ( len >= sizeof( uint16_t ) ) {
+ op_code = ntohs( *((uint16_t *) buf ) );
+ switch ( op_code ) {
+ case TFTP_OPCODE_RRQ:
+ case TFTP_OPCODE_WRQ:
+ T_log(
+ T_VERBOSE,
+ " %s File: \"%s\" Mode: \"%s\" %s",
+ ( op_code == TFTP_OPCODE_RRQ ) ? "RRQ" : "WRQ",
+ get_next_str( &buffer, &remaining_len, &has_errors ),
+ get_next_str( &buffer, &remaining_len, &has_errors ),
+ ( remaining_len > 0 ) ? "Options:" : "No options"
+ );
+ while ( remaining_len > 0 ) {
+ T_log(
+ T_VERBOSE,
+ " %s = \"%s\"",
+ get_next_str( &buffer, &remaining_len, &has_errors ),
+ get_next_str( &buffer, &remaining_len, &has_errors )
+ );
+ }
+ break;
+
+ case TFTP_OPCODE_DATA:
+ if ( len >= 2 * sizeof( uint16_t ) ) {
+ buffer += sizeof( uint16_t );
+ remaining_len -= sizeof( uint16_t );
+ T_log(
+ T_VERBOSE,
+ " DATA Block: %"PRIu16" Data (%zu bytes):",
+ ntohs( *( ( (uint16_t *) buf ) + 1 ) ),
+ remaining_len
+ );
+ log_hex_dump( buffer, remaining_len );
+ } else {
+ T_log( T_VERBOSE, " DATA packet ILLEGAL length" );
+ has_errors = true;
+ }
+ break;
+
+ case TFTP_OPCODE_ACK:
+ if ( len == 2 * sizeof( uint16_t ) ) {
+ T_log(
+ T_VERBOSE,
+ " ACK Block: %"PRIu16,
+ ntohs( *( ( (uint16_t *) buf ) + 1 ) )
+ );
+ } else {
+ T_log( T_VERBOSE, " ACK packet ILLEGAL length" );
+ has_errors = true;
+ }
+ break;
+
+ case TFTP_OPCODE_ERROR:
+ if ( len > 2 * sizeof( uint16_t ) ) {
+ uint16_t err_code = ntohs( *( ( (uint16_t *) buf ) + 1 ) );
+ T_log(
+ T_VERBOSE,
+ " ERROR Code: %"PRIu16" (%s) ErrMsg:",
+ err_code,
+ _Tftp_Get_error_str( err_code )
+ );
+ buffer += sizeof( uint16_t );
+ remaining_len -= sizeof( uint16_t );
+ T_log(
+ T_VERBOSE,
+ " \"%s\"",
+ get_next_str( &buffer, &remaining_len, &has_errors )
+ );
+ } else {
+ T_log( T_VERBOSE, " ERROR packet ILLEGAL length" );
+ has_errors = true;
+ }
+ break;
+
+ case TFTP_OPCODE_OACK:
+ T_log(
+ T_VERBOSE,
+ " OACK %s",
+ ( remaining_len > 0 ) ? "Options:" : "No options"
+ );
+ while ( remaining_len > 0 ) {
+ T_log(
+ T_VERBOSE,
+ " %s = \"%s\"",
+ get_next_str( &buffer, &remaining_len, &has_errors ),
+ get_next_str( &buffer, &remaining_len, &has_errors )
+ );
+ }
+ break;
+
+ default:
+ T_log( T_VERBOSE, " TFTP ILLEGAL OpCode: %d", op_code );
+ has_errors = true;
+ }
+ } else {
+ has_errors = true;
+ }
+
+ if ( has_errors ) {
+ log_hex_dump( buf, len );
+ }
+}
+
+static void log_interaction(
+ Tftp_Action *act,
+ bool has_result,
+ bool was_success
+)
+{
+ char *begin = has_result ? "[" : "";
+ const char *action_name;
+ int result;
+ char result_buffer[20];
+ result_buffer[0] = '\0';
+
+ if ( act == NULL ) { return; }
+ action_name = get_action_kind_as_string( act->kind );
+
+ if ( has_result && was_success ) {
+ switch ( act->kind ) {
+ case TFTP_IA_KIND_SOCKET:
+ result = act->data.socket.result;
+ break;
+
+ case TFTP_IA_KIND_CLOSE:
+ result = act->data.close.result;
+ break;
+
+ case TFTP_IA_KIND_BIND:
+ result = act->data.bind.result;
+ break;
+
+ case TFTP_IA_KIND_SENDTO:
+ result = (int) act->data.sendto.result;
+ break;
+
+ case TFTP_IA_KIND_RECVFROM:
+ result = (int) act->data.recvfrom.result;
+ break;
+
+ default:
+ result = 0;
+ }
+ snprintf( result_buffer, sizeof( result_buffer ), "] = %d", result );
+ } else if ( ! was_success ) {
+ snprintf( result_buffer, sizeof( result_buffer ), "] = FAILED!" );
+ }
+
+ switch ( act->kind ) {
+ case TFTP_IA_KIND_SOCKET:
+ T_log(
+ T_VERBOSE,
+ "%s%s(domain=%d, type=%d, protocol=%d)%s",
+ begin,
+ action_name,
+ act->data.socket.domain,
+ act->data.socket.type,
+ act->data.socket.protocol,
+ result_buffer
+ );
+ break;
+
+ case TFTP_IA_KIND_CLOSE:
+ T_log( T_VERBOSE, "%s%s(%d)%s",
+ begin,
+ action_name,
+ act->data.close.fd,
+ result_buffer
+ );
+ break;
+
+ case TFTP_IA_KIND_BIND:
+ T_log(
+ T_VERBOSE,
+ "%s%s(sockfd=%d, addr.family=%d, addr=%s:%"PRIu16")%s",
+ begin,
+ action_name,
+ act->data.bind.fd,
+ act->data.bind.family,
+ act->data.bind.addr_str,
+ act->data.bind.port,
+ result_buffer
+ );
+ break;
+
+ case TFTP_IA_KIND_SENDTO:
+ T_log(
+ T_VERBOSE,
+ "%s%s(sockfd=%d, buf=%p, len=%zu, flags=%X, "
+ "addr=%s:%"PRIu16", addrlen=%d)%s",
+ begin,
+ action_name,
+ act->data.sendto.fd,
+ act->data.sendto.buf,
+ act->data.sendto.len,
+ act->data.sendto.flags,
+ act->data.sendto.dest_addr_str,
+ act->data.sendto.dest_port,
+ act->data.sendto.addrlen,
+ result_buffer
+ );
+ if ( !has_result ) {
+ log_tftp_packet( act->data.sendto.buf, act->data.sendto.len );
+ }
+ break;
+
+ case TFTP_IA_KIND_RECVFROM:
+ if ( !has_result ) {
+ T_log(
+ T_VERBOSE,
+ "%s%s(sockfd=%d, buf=%p, len=%zu, flags=%X, "
+ "timeout=%"PRIu32"ms, addr=?:?, addrlen=%d)%s",
+ begin,
+ action_name,
+ act->data.recvfrom.fd,
+ act->data.recvfrom.buf,
+ act->data.recvfrom.len,
+ act->data.recvfrom.flags,
+ act->data.recvfrom.timeout_ms,
+ act->data.recvfrom.addrlen,
+ result_buffer
+ );
+ } else {
+ T_log(
+ T_VERBOSE,
+ "%s%s(sockfd=%d, buf=%p, len=%zu, flags=%X, "
+ "timeout=%"PRIu32"ms, addr=%s:%"PRIu16", addrlen=%d)%s",
+ begin,
+ action_name,
+ act->data.recvfrom.fd,
+ act->data.recvfrom.buf,
+ act->data.recvfrom.len,
+ act->data.recvfrom.flags,
+ act->data.recvfrom.timeout_ms,
+ act->data.recvfrom.src_addr_str,
+ act->data.recvfrom.src_port,
+ act->data.recvfrom.addrlen,
+ result_buffer
+ );
+ if ( act->data.recvfrom.result > 0 && was_success ) {
+ log_tftp_packet( act->data.recvfrom.buf, act->data.recvfrom.result );
+ }
+ }
+ break;
+
+ default:
+ T_quiet_true( false, "Unknown interaction: %d", act->kind );
+ }
+}
+
+/*
+ * Note: This function *must* return.
+ * All the fake network functions (and any functions called from them)
+ * must return control to the TFTP client. Hence, do not use T_assert_*()
+ * or similar functions. Even if the test fails at some point,
+ * continue and return an error value to the client.
+ * Reason: T_assert_*() does stop the test and invokes teardown()
+ * without returning to the client. teardown() then "hangs" when
+ * un-mounting while executing client code.
+ */
+static bool process_interaction( Tftp_Action *act )
+{
+ Tftp_Interaction *ia = get_next_interaction( control );
+ bool result;
+
+ T_quiet_not_null( act );
+ if ( act == NULL ) {
+ return false;
+ } else {
+ /* Logging this early helps debugging defect tests */
+ log_interaction( act, false, true );
+ }
+
+ T_quiet_not_null( ia );
+ if( ia == NULL ) {
+ T_log(
+ T_NORMAL,
+ "ERROR: You have not registered any (more) 'interaction' but the TFTP "
+ "client invoked interaction '%s()'. See 'tftpfs_interactions.h' and use "
+ "'T_set_verbosity( T_VERBOSE )'.",
+ get_action_kind_as_string( act->kind )
+ );
+ return false;
+ }
+
+ T_true(
+ act->kind == ia->kind,
+ "Expected %s() call but got %s()",
+ get_action_kind_as_string( ia->kind ),
+ get_action_kind_as_string( act->kind )
+ );
+ if ( act->kind != ia->kind ) {
+ return false;
+ }
+ result = ia->fn( act, ia->data );
+ log_interaction( act, true, result );
+
+ return result;
+}
+
+static uint16_t get_ip_addr_as_str(
+ const struct sockaddr *addr,
+ socklen_t addrlen,
+ char *buf,
+ size_t buf_size
+)
+{
+ uint16_t port = 0xFFFF;
+ *buf = '\0';
+
+ switch ( addr->sa_family ) {
+ case AF_INET:
+ {
+ const struct sockaddr_in *ipv4 = (const struct sockaddr_in *) addr;
+ port = ntohs( ipv4->sin_port );
+ const uint8_t *bytes = (const uint8_t *) &ipv4->sin_addr.s_addr;
+ snprintf(
+ buf,
+ buf_size,
+ "%"PRIu8".%"PRIu8".%"PRIu8".%"PRIu8,
+ bytes[0],
+ bytes[1],
+ bytes[2],
+ bytes[3]
+ );
+ break;
+ }
+ case AF_INET6:
+ {
+ const struct sockaddr_in6 *ipv6 = (const struct sockaddr_in6 *) addr;
+ port = ntohs( ipv6->sin6_port );
+ const uint16_t *words = (const uint16_t *) ipv6->sin6_addr.s6_addr;
+ snprintf(
+ buf,
+ buf_size,
+ "%"PRIx16":%"PRIx16":%"PRIx16":%"PRIx16":%"PRIx16":%"PRIx16
+ ":%"PRIx16":%"PRIx16,
+ ntohs( words[0] ),
+ ntohs( words[1] ),
+ ntohs( words[2] ),
+ ntohs( words[3] ),
+ ntohs( words[4] ),
+ ntohs( words[5] ),
+ ntohs( words[6] ),
+ ntohs( words[7] )
+ );
+ break;
+ }
+ }
+
+ return port;
+}
+
+static void set_ip_addr_from_str(
+ const char *addr_str,
+ uint16_t port,
+ struct sockaddr *addr,
+ socklen_t *addrlen
+ )
+{
+ socklen_t addr_size;
+ int res;
+ int i;
+
+ if ( addr == NULL || addrlen == NULL ) {
+ return;
+ }
+ addr_size = *addrlen;
+
+ if ( strchr( addr_str, ':' ) == NULL ) {
+ /* IPv4 address */
+ struct sockaddr_in *ipv4_addr = (struct sockaddr_in *) addr;
+ uint8_t *bytes = (uint8_t *) &ipv4_addr->sin_addr.s_addr;
+
+ *addrlen = sizeof( struct sockaddr_in );
+ T_ge_sz( addr_size, *addrlen );
+ if ( addr_size < *addrlen ) { return; }
+ ipv4_addr->sin_family = AF_INET;
+ ipv4_addr->sin_port = htons( port );
+ res = sscanf(
+ addr_str,
+ "%"SCNu8".%"SCNu8".%"SCNu8".%"SCNu8,
+ bytes,
+ bytes + 1,
+ bytes + 2,
+ bytes + 3
+ );
+ T_quiet_true( res == 4, "Connot parse IPv4 address: \"%s\"", addr_str );
+ } else {
+ /* IPv6 address */
+ struct sockaddr_in6 *ipv6_addr = (struct sockaddr_in6 *) addr;
+ uint16_t *words = (uint16_t *) &ipv6_addr->sin6_addr.s6_addr;
+
+ *addrlen = sizeof( struct sockaddr_in6 );
+ T_gt_sz( addr_size, *addrlen );
+ if ( addr_size < *addrlen ) { return; }
+ ipv6_addr->sin6_family = AF_INET6;
+ ipv6_addr->sin6_port = htons( port );
+ ipv6_addr->sin6_flowinfo = 0;
+ ipv6_addr->sin6_scope_id = 0;
+ res = sscanf(
+ addr_str,
+ "%"SCNx16":%"SCNx16":%"SCNx16":%"SCNx16":%"SCNx16":%"SCNx16
+ ":%"SCNx16":%"SCNx16,
+ words,
+ words + 1,
+ words + 2,
+ words + 3,
+ words + 4,
+ words + 5,
+ words + 6,
+ words + 7
+ );
+ T_quiet_true( res == 8, "Connot parse IPv6 address: \"%s\"", addr_str );
+ for ( i = 0; i < 8; ++i ) {
+ words[i] = htons( words[i] );
+ }
+ }
+}
+
+/*
+ * Fake networking functions
+ */
+
+int inet_aton( const char *cp, struct in_addr *inp )
+{
+ int result = 0;
+ uint8_t *ipv4_addr = (uint8_t *) inp;
+ static const char addr0[] = TFTP_KNOWN_IPV4_ADDR0_STR;
+ static const uint8_t addr0_data[] = { TFTP_KNOWN_IPV4_ADDR0_ARRAY };
+
+ if ( strcmp( addr0, cp ) == 0 ) {
+ memcpy( ipv4_addr, addr0_data, sizeof( addr0_data ) );
+ result = 1;
+ }
+
+ T_log(
+ T_VERBOSE,
+ "inet_aton(cp=%s, addr=%"PRIu8".%"PRIu8".%"PRIu8".%"PRIu8") = %d",
+ cp,
+ ipv4_addr[0],
+ ipv4_addr[1],
+ ipv4_addr[2],
+ ipv4_addr[3],
+ result
+ );
+ return result;
+}
+
+struct hostent *gethostbyname( const char *name )
+{
+ static char ip_addr_bytes[] = {
+ TFTP_KNOWN_SERVER0_ARRAY, /* IPv4: 10.7.0.2 "server.tftp" */
+ TFTP_KNOWN_IPV4_ADDR0_ARRAY /* IPv4: 127.0.0.1 "127.0.0.1" */
+ };
+ static char *ip_addrs[] = {
+ ip_addr_bytes + 0 * IPV4_ADDR_SIZE, NULL,
+ ip_addr_bytes + 1 * IPV4_ADDR_SIZE, NULL
+ };
+ static struct hostent hosts[] = {
+ {
+ .h_name = TFTP_KNOWN_SERVER0_NAME,
+ .h_aliases = NULL,
+ .h_addrtype = AF_INET,
+ .h_length = IPV4_ADDR_SIZE,
+ .h_addr_list = ip_addrs + 0,
+ },
+ {
+ .h_name = TFTP_KNOWN_IPV4_ADDR0_STR,
+ .h_aliases = NULL,
+ .h_addrtype = AF_INET,
+ .h_length = IPV4_ADDR_SIZE,
+ .h_addr_list = ip_addrs + 2,
+ }
+ };
+ struct hostent *result = NULL;
+ uint8_t *ipv4_addr;
+ int i;
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( hosts ); ++i ) {
+ if ( strcmp( hosts[i].h_name, name ) == 0 ) {
+ result = hosts + i;
+ }
+ }
+ /* Note: `h_errno` not set due to linker issues */
+
+ if ( result != NULL ) {
+ ipv4_addr = (uint8_t *) result->h_addr_list[0];
+ T_log(
+ T_VERBOSE,
+ "gethostbyname(%s) = %s, %"PRIu8".%"PRIu8".%"PRIu8".%"PRIu8,
+ name,
+ result->h_name,
+ ipv4_addr[0],
+ ipv4_addr[1],
+ ipv4_addr[2],
+ ipv4_addr[3]
+ );
+ } else {
+ T_log( T_NORMAL, "gethostbyname(%s) = %p", name, result );
+ }
+ return result;
+}
+
+int socket( int domain, int type, int protocol )
+{
+ Tftp_Action act = {
+ .kind = TFTP_IA_KIND_SOCKET,
+ .data.socket.domain = domain,
+ .data.socket.type = type,
+ .data.socket.protocol = protocol
+ };
+
+ if( !process_interaction( &act ) ) {
+ return -1;
+ };
+
+ /* Should never happen but check prevents programming mistakes */
+ T_quiet_ge_int( act.data.socket.result, TFTP_FIRST_FD );
+ if( act.data.socket.result < TFTP_FIRST_FD ) {
+ return -1;
+ };
+
+ return act.data.socket.result;
+}
+
+int __wrap_close( int fd )
+{
+ if ( fd < TFTP_FIRST_FD ) {
+ /* Normal file descriptors - i.e. not from fake socket() function above */
+ return __real_close( fd );
+ }
+ Tftp_Action act = {
+ .kind = TFTP_IA_KIND_CLOSE,
+ .data.close.fd = fd,
+ };
+
+ if( !process_interaction( &act ) ) {
+ return -1;
+ };
+
+ return act.data.close.result;
+}
+
+int bind( int sockfd, const struct sockaddr *addr, socklen_t addrlen )
+{
+ char addr_buf[INET6_ADDRSTRLEN];
+ Tftp_Action act = {
+ .kind = TFTP_IA_KIND_BIND,
+ .data.bind.fd = sockfd,
+ .data.bind.family = addr->sa_family,
+ .data.bind.addr_str = addr_buf
+ };
+ act.data.bind.port = get_ip_addr_as_str(
+ addr,
+ addrlen,
+ addr_buf,
+ sizeof( addr_buf )
+ );
+
+ if( !process_interaction( &act ) ) {
+ return -1;
+ };
+
+ return act.data.bind.result;
+}
+
+int setsockopt(
+ int sockfd,
+ int level,
+ int optname,
+ const void *optval,
+ socklen_t optlen
+)
+{
+ int result = 0;
+ int i;
+ const struct timeval *tv = optval;
+
+ T_log(
+ T_VERBOSE,
+ "setsockopt(sockfd=%d, level=%s, optname=%s, optval=%dms )",
+ sockfd,
+ ( level == SOL_SOCKET ) ? "SOL_SOCKET" : "UNKONWN",
+ ( optname == SO_RCVTIMEO ) ? "SO_RCVTIMEO" : "UNKONWN",
+ ( optname == SO_RCVTIMEO ) ?
+ (int) ( tv->tv_sec * 1000 + tv->tv_usec / 1000 ) : -1
+ );
+
+ T_eq_int( level, SOL_SOCKET );
+ T_eq_int( optname, SO_RCVTIMEO );
+ T_eq_int( (int) optlen, sizeof( struct timeval ) );
+ if (
+ level != SOL_SOCKET ||
+ optname != SO_RCVTIMEO ||
+ optlen != sizeof( struct timeval )
+ ) {
+ result = -1;
+ }
+
+ for ( i = 0; result >= 0; ++i ) {
+ if ( i >= MAX_SOCKET_FD ) {
+ T_quiet_true(
+ false,
+ "Too few IP ports %d, increase MAX_SOCKET_FD",
+ MAX_SOCKET_FD
+ );
+ result = -1;
+ break;
+ }
+ if ( control->receive_timeout_socket_fd[i] == sockfd ||
+ control->receive_timeout_socket_fd[i] == 0 ) {
+ control->receive_timeout_socket_fd[i] = sockfd;
+ control->receive_timeout_ms[i] = tv->tv_sec * 1000 + tv->tv_usec / 1000;
+ break;
+ }
+ }
+
+ T_log(
+ T_VERBOSE,
+ "[setsockopt(sockfd=%d, level=%s, optname=%s, optval=%"PRIu32"ms )] = %d",
+ sockfd,
+ ( level == SOL_SOCKET ) ? "SOL_SOCKET" : "UNKONWN",
+ ( optname == SO_RCVTIMEO ) ? "SO_RCVTIMEO" : "UNKONWN",
+ ( i < MAX_SOCKET_FD ) ? control->receive_timeout_ms[i] : -1,
+ result
+ );
+
+ return result;
+}
+
+ssize_t sendto(
+ int sockfd,
+ const void *buf,
+ size_t len,
+ int flags,
+ const struct sockaddr *dest_addr,
+ socklen_t addrlen
+)
+{
+ char addr_buf[INET6_ADDRSTRLEN];
+ Tftp_Action act = {
+ .kind = TFTP_IA_KIND_SENDTO,
+ .data.sendto.fd = sockfd,
+ .data.sendto.buf = buf,
+ .data.sendto.len = len,
+ .data.sendto.flags = flags,
+ .data.sendto.dest_addr_str = addr_buf,
+ .data.sendto.addrlen = (int) addrlen,
+ };
+ act.data.sendto.dest_port = get_ip_addr_as_str(
+ dest_addr,
+ addrlen,
+ addr_buf,
+ sizeof( addr_buf )
+ );
+
+ if( !process_interaction( &act ) ) {
+ return -1;
+ };
+
+ return act.data.sendto.result;
+}
+
+ssize_t recvfrom(
+ int sockfd,
+ void *buf,
+ size_t len,
+ int flags,
+ struct sockaddr *src_addr,
+ socklen_t *addrlen
+)
+{
+ int i;
+ Tftp_Packet *pkt = buf;
+ Tftp_Action act = {
+ .kind = TFTP_IA_KIND_RECVFROM,
+ .data.recvfrom.fd = sockfd,
+ .data.recvfrom.buf = buf,
+ .data.recvfrom.len = len,
+ .data.recvfrom.flags = flags,
+ .data.recvfrom.timeout_ms = 0,
+ .data.recvfrom.addrlen = (int) *addrlen
+ };
+
+ for ( i = 0; i < MAX_SOCKET_FD; ++i ) {
+ if ( control->receive_timeout_socket_fd[i] == sockfd ) {
+ act.data.recvfrom.timeout_ms = control->receive_timeout_ms[i];
+ break;
+ }
+ }
+
+ /* Make log_tftp_packet() behave sane, if buf is not filled */
+ if ( len >= sizeof( pkt->opcode ) ) {
+ pkt->opcode = ntohs( 0xFFFF );
+ }
+
+ if( !process_interaction( &act ) ) {
+ return -1;
+ };
+
+ set_ip_addr_from_str(
+ act.data.recvfrom.src_addr_str,
+ act.data.recvfrom.src_port,
+ src_addr,
+ addrlen
+ );
+
+ return act.data.recvfrom.result;
+}
diff --git a/testsuites/fstests/tftpfs/tftpfs_udp_network_fake.h b/testsuites/fstests/tftpfs/tftpfs_udp_network_fake.h
new file mode 100644
index 0000000000..0a852353ad
--- /dev/null
+++ b/testsuites/fstests/tftpfs/tftpfs_udp_network_fake.h
@@ -0,0 +1,315 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuiteTestsTFTPFS
+ *
+ * @brief This header file provides interfaces and functions used to
+ * implement the UDP network fake for tftpfs tests.
+ *
+ * Definitions and declarations of data structures and functions.
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#include <stddef.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <sys/types.h> /* ssize_t */
+
+#ifndef _TFTPFS_UDP_NETWORK_FAKE_H
+#define _TFTPFS_UDP_NETWORK_FAKE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * @defgroup RTEMSTestSuiteTestsTFTPFS Test suite for libtftpsfs tests
+ *
+ * @ingroup RTEMSTestSuitesFilesystem
+ *
+ * @brief This test suite provides a tests for libtftpfs.
+ *
+ * There are some additional files relevant for the TFTP test suite:
+ *
+ * - `spec/build/testsuites/fstests/grp.yml`\n
+ * This file specifies how the RTEMS WAF build system has to compile, link
+ * and install all filesystem test suites. The TFTP test suite must
+ * be mentioned in this file to be build.
+ *
+ * - `spec/build/testsuites/fstests/tftpfs.yml`\n
+ * This file specifies how the RTEMS WAF build system has to compile, link
+ * and install the TFTP test suite.
+ *
+ * - `Doxygen`\n
+ * At variable `INPUT` the test suite is included to be processed by the
+ * Doxygen documentation generator.
+ *
+ * See also the _RTEMS Filesystem Design Guide_ Chapter _Trivial FTP Client
+ * Filesystem_.
+ *
+ * @{
+ */
+
+#define TFTP_STD_PORT 69
+#define TFTP_MAX_IP_ADDR_STRLEN (16 * 2 + 7 + 1)
+#define TFTP_MAX_ERROR_STRLEN 20
+#define TFTP_MAX_OPTIONS_SIZE 40
+
+/**
+ * @brief IP address strings and server names resolved by network fake
+ * functions like inet_aton() and gethostbyname().
+ */
+#define TFTP_KNOWN_IPV4_ADDR0_STR "127.0.0.1"
+#define TFTP_KNOWN_IPV4_ADDR0_ARRAY 127, 0, 0, 1
+#define TFTP_KNOWN_SERVER0_NAME "server.tftp"
+#define TFTP_KNOWN_SERVER0_IPV4 "10.7.0.2"
+#define TFTP_KNOWN_SERVER0_ARRAY 10, 7, 0, 2
+
+/**
+ * @brief The faked socket() function (i.e. socket interaction) must return
+ * a file descriptor equal or larger than @c TFTP_FIRST_FD
+ * or -1.
+ */
+#define TFTP_FIRST_FD 33333
+
+typedef enum Tftp_Action_kind {
+ TFTP_IA_KIND_SOCKET,
+ TFTP_IA_KIND_CLOSE,
+ TFTP_IA_KIND_BIND,
+ TFTP_IA_KIND_SENDTO,
+ TFTP_IA_KIND_RECVFROM
+} Tftp_Action_kind;
+
+typedef struct Tftp_Action {
+ Tftp_Action_kind kind;
+ union {
+ struct {
+ int domain;
+ int type;
+ int protocol;
+ int result;
+ } socket;
+ struct {
+ int fd;
+ int result;
+ } close;
+ struct {
+ int fd;
+ int family;
+ uint16_t port;
+ const char *addr_str;
+ int result;
+ } bind;
+ struct {
+ int fd;
+ const void *buf;
+ size_t len;
+ int flags;
+ uint16_t dest_port;
+ const char *dest_addr_str;
+ int addrlen;
+ ssize_t result;
+ } sendto;
+ struct {
+ int fd;
+ void *buf;
+ size_t len;
+ int flags;
+ uint32_t timeout_ms;
+ uint16_t src_port;
+ char src_addr_str[TFTP_MAX_IP_ADDR_STRLEN];
+ int addrlen;
+ ssize_t result;
+ } recvfrom;
+ } data;
+} Tftp_Action;
+
+/**
+ * @brief Carry out interactions with TFTP client.
+ *
+ * @c Tftp_Interaction_fn() is called to
+ *
+ * * check that the fake network function has been called with the expected
+ * arguments (in @c act)
+ * * define values which shall be returned (to be stored in @c act)
+ *
+ * The function should not call @c T_assert_*() but use @c T_*().
+ * Otherwise, it is unlikely that the test can terminate the client in
+ * @c teardown().
+ *
+ * @param[in,out] act The actual arguments provided by the TFTP client
+ * to the network function. Moreover, storage to store the results
+ * to be returned to the TFTP client.
+ * @param data Arbitrary data area allocated when the interaction is created
+ * by @c _Tftp_Append_interaction()
+ *
+ * @retval true if the client behaved as expected.
+ * @retval false if the test shall fail.
+ */
+typedef bool (*Tftp_Interaction_fn)( Tftp_Action *act, void *data );
+typedef struct Tftp_Interaction Tftp_Interaction;
+typedef struct Tftp_Interaction {
+ Tftp_Interaction *next;
+ Tftp_Action_kind kind;
+ Tftp_Interaction_fn fn;
+ void *data[0];
+} Tftp_Interaction;
+
+/**
+ * @brief Initialize and free the singleton control object.
+ *
+ * Invoke @c _Tftp_Reset() in @c setup() and @c teardown() of the test.
+ */
+void _Tftp_Reset( void );
+
+/**
+ * @brief Create an interaction and append it to the sequence of expected
+ * interactions.
+ *
+ * This allocates memory for an interaction and additional specific data
+ * for the function @c fn() parameter @c data. The interaction is
+ * initialized and appended at the end of the sequence of expected interactions.
+ * If an error occurs a @c T_assert_*() macro is called. Hence, this function
+ * never returns @c NULL.
+ *
+ * @param kind Defines which interaction is expected. Note that it cannot
+ * happen that @c fn is called for a different network function.
+ * @param fn A function which is called to handle the interaction.
+ * See @c Tftp_Interaction_fn()
+ * @param size The size of a memory area which is given to @c fn() as
+ * @c data argument when it is invoked. This can be used to provide
+ * private data to the function.
+ *
+ * @return A pointer to a memory area of size @c size. The same pointer
+ * will be provided to @c fn as argument @c data when invoked.
+ */
+void *_Tftp_Append_interaction(
+ Tftp_Action_kind kind,
+ Tftp_Interaction_fn fn,
+ size_t size
+);
+
+
+/**
+ * @brief Have all queued interactions been processed?
+ *
+ * At the end of a test, it should be checked whether all queued interactions
+ * have been consumed by the TFTP client.
+ *
+ * @retval true All queued interactions have been processed.
+ * @retval false At least one queued interactions has not yet been processed.
+ */
+bool _Tftp_Has_no_more_interactions( void );
+
+/*
+ * TFTP details from RFC1350, RFC2347, RFC2348 and RFC7440
+ *
+ * Note: The RFCs require modes and options to be case in-sensitive.
+ */
+
+#define TFTP_MODE_NETASCII "netascii"
+#define TFTP_MODE_OCTET "octet"
+#define TFTP_OPTION_BLKSIZE "blksize"
+#define TFTP_OPTION_TIMEOUT "timeout"
+#define TFTP_OPTION_TSIZE "tsize"
+#define TFTP_OPTION_WINDOWSIZE "windowsize"
+
+#define TFTP_WINDOW_SIZE_MIN 1
+#define TFTP_BLOCK_SIZE_MIN 8
+#define TFTP_BLOCK_SIZE_MAX 65464
+
+typedef enum Tftp_Opcode {
+ TFTP_OPCODE_RRQ = 1,
+ TFTP_OPCODE_WRQ = 2,
+ TFTP_OPCODE_DATA = 3,
+ TFTP_OPCODE_ACK = 4,
+ TFTP_OPCODE_ERROR = 5,
+ TFTP_OPCODE_OACK = 6,
+} Tftp_Opcode;
+
+typedef enum Tftp_Error_code {
+ TFTP_ERROR_CODE_NOT_DEFINED = 0,
+ TFTP_ERROR_CODE_NOT_FOUND = 1,
+ TFTP_ERROR_CODE_NO_ACCESS = 2,
+ TFTP_ERROR_CODE_DISK_FULL = 3,
+ TFTP_ERROR_CODE_ILLEGAL = 4,
+ TFTP_ERROR_CODE_UNKNOWN_ID = 5,
+ TFTP_ERROR_CODE_FILE_EXISTS = 6,
+ TFTP_ERROR_CODE_NO_USER = 7,
+ TFTP_ERROR_CODE_OPTION_NEGO = 8,
+} Tftp_Error_code;
+
+typedef struct Tftp_Packet {
+ uint16_t opcode;
+ union {
+ struct {
+ char opts[0];
+ } rrq;
+ struct {
+ char opts[0];
+ } wrq;
+ struct {
+ uint16_t block_num;
+ uint8_t bytes[0];
+ } data;
+ struct {
+ uint16_t block_num;
+ } ack;
+ struct {
+ uint16_t error_code;
+ char err_msg[0];
+ } error;
+ struct {
+ char opts[0];
+ } oack;
+ } content;
+} Tftp_Packet;
+
+/**
+ * @brief Provides a human readable description for an error code from an TFTP
+ * error packet.
+ *
+ * @param error_code The error code from the TFTP error packet in host byte
+ * order.
+ *
+ * @return A pointer to a string describing the error. If the error code is
+ * unknown, a pointer to "Unknown error code" is returned. Do not change the
+ * the string as a pointer to the very same string will be returned by future
+ * calls.
+ */
+const char *_Tftp_Get_error_str( uint16_t error_code );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TFTPFS_UDP_NETWORK_FAKE_H */
diff --git a/testsuites/libtests/POSIX/calloc.c b/testsuites/libtests/POSIX/calloc.c
index bd04faa800..a7537c8cc4 100644
--- a/testsuites/libtests/POSIX/calloc.c
+++ b/testsuites/libtests/POSIX/calloc.c
@@ -16,6 +16,8 @@ int
main (void)
{
void *foo = calloc (42, 43);
+ int rc = (foo != NULL);
+ free(foo);
- return (foo != NULL);
+ return rc;
}
diff --git a/testsuites/libtests/POSIX/free.c b/testsuites/libtests/POSIX/free.c
index 8550eaa85c..246415ce65 100644
--- a/testsuites/libtests/POSIX/free.c
+++ b/testsuites/libtests/POSIX/free.c
@@ -12,9 +12,10 @@
#include <stdlib.h>
+void* p;
+
int main (void)
{
- free((void *) 42);
-
+ free(p);
return 0;
}
diff --git a/testsuites/libtests/POSIX/readv.c b/testsuites/libtests/POSIX/readv.c
index a980e9468c..6b0bf63f94 100644
--- a/testsuites/libtests/POSIX/readv.c
+++ b/testsuites/libtests/POSIX/readv.c
@@ -14,7 +14,7 @@
int main(void)
{
- struct iovec iov;
+ struct iovec iov = { 0 };
int count = 4;
ssize_t ret;
diff --git a/testsuites/libtests/POSIX/sigismember.c b/testsuites/libtests/POSIX/sigismember.c
index ed980b70f0..f4c7d37cb2 100644
--- a/testsuites/libtests/POSIX/sigismember.c
+++ b/testsuites/libtests/POSIX/sigismember.c
@@ -14,7 +14,7 @@
int main(void)
{
- sigset_t set;
+ sigset_t set = { 0 };
int status;
status = sigismember(&set, 21);
diff --git a/testsuites/libtests/POSIX/sigprocmask.c b/testsuites/libtests/POSIX/sigprocmask.c
index ba634e4660..25de0c28c7 100644
--- a/testsuites/libtests/POSIX/sigprocmask.c
+++ b/testsuites/libtests/POSIX/sigprocmask.c
@@ -15,7 +15,8 @@
int main(void)
{
int rc;
- sigset_t set1, set2;
+ sigset_t set1 = { 0 };
+ sigset_t set2 = { 0 };
rc = sigprocmask(SIG_BLOCK, &set1, &set2);
(void) rc;
diff --git a/testsuites/libtests/POSIX/writev.c b/testsuites/libtests/POSIX/writev.c
index 853b8a8ced..5b5068db65 100644
--- a/testsuites/libtests/POSIX/writev.c
+++ b/testsuites/libtests/POSIX/writev.c
@@ -14,7 +14,7 @@
int main(void)
{
- struct iovec iov;
+ struct iovec iov = { 0 };
int count = 4;
ssize_t ret;
diff --git a/testsuites/libtests/block01/block01.doc b/testsuites/libtests/block01/block01.doc
index 49bf1a132b..ff4d309f0a 100644
--- a/testsuites/libtests/block01/block01.doc
+++ b/testsuites/libtests/block01/block01.doc
@@ -1,13 +1,27 @@
-# Copyright (c) 2009
-# embedded brains GmbH
-# Obere Lagerstr. 30
-# D-82178 Puchheim
-# Germany
-# <rtems@embedded-brains.de>
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2009 embedded brains GmbH & Co. KG
+#
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/block01/init.c b/testsuites/libtests/block01/init.c
index 16e0644534..7717b0b7e6 100644
--- a/testsuites/libtests/block01/init.c
+++ b/testsuites/libtests/block01/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2009, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2009, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block02/block02.doc b/testsuites/libtests/block02/block02.doc
index e92ae57578..e5b99ec8fe 100644
--- a/testsuites/libtests/block02/block02.doc
+++ b/testsuites/libtests/block02/block02.doc
@@ -1,13 +1,27 @@
-# Copyright (c) 2009
-# embedded brains GmbH
-# Obere Lagerstr. 30
-# D-82178 Puchheim
-# Germany
-# <rtems@embedded-brains.de>
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2009 embedded brains GmbH & Co. KG
+#
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/block02/init.c b/testsuites/libtests/block02/init.c
index 73362fcc83..1e8d179d9d 100644
--- a/testsuites/libtests/block02/init.c
+++ b/testsuites/libtests/block02/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2009, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2009, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block03/block03.doc b/testsuites/libtests/block03/block03.doc
index 0106172d60..221c7dd816 100644
--- a/testsuites/libtests/block03/block03.doc
+++ b/testsuites/libtests/block03/block03.doc
@@ -1,13 +1,27 @@
-# Copyright (c) 2009
-# embedded brains GmbH
-# Obere Lagerstr. 30
-# D-82178 Puchheim
-# Germany
-# <rtems@embedded-brains.de>
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2009 embedded brains GmbH & Co. KG
+#
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/block03/init.c b/testsuites/libtests/block03/init.c
index 9ab907c0d4..da2fa27589 100644
--- a/testsuites/libtests/block03/init.c
+++ b/testsuites/libtests/block03/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2009, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2009, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block04/block04.doc b/testsuites/libtests/block04/block04.doc
index 6449183ca0..2c05114636 100644
--- a/testsuites/libtests/block04/block04.doc
+++ b/testsuites/libtests/block04/block04.doc
@@ -1,13 +1,27 @@
-# Copyright (c) 2009
-# embedded brains GmbH
-# Obere Lagerstr. 30
-# D-82178 Puchheim
-# Germany
-# <rtems@embedded-brains.de>
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2009 embedded brains GmbH & Co. KG
+#
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/block04/init.c b/testsuites/libtests/block04/init.c
index ff122a7c39..cdbab6e3fc 100644
--- a/testsuites/libtests/block04/init.c
+++ b/testsuites/libtests/block04/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2009, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2009, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block05/block05.doc b/testsuites/libtests/block05/block05.doc
index f0c47453a4..30a246bdf1 100644
--- a/testsuites/libtests/block05/block05.doc
+++ b/testsuites/libtests/block05/block05.doc
@@ -1,13 +1,27 @@
-# Copyright (c) 2009, 2010
-# embedded brains GmbH
-# Obere Lagerstr. 30
-# D-82178 Puchheim
-# Germany
-# <rtems@embedded-brains.de>
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (C) 2009, 2010 embedded brains GmbH & Co. KG
+#
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/block05/init.c b/testsuites/libtests/block05/init.c
index 5d54c79c9f..e54fa9bd32 100644
--- a/testsuites/libtests/block05/init.c
+++ b/testsuites/libtests/block05/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2009, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2009, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block06/block06.doc b/testsuites/libtests/block06/block06.doc
index 3a09a59799..00efa32507 100644
--- a/testsuites/libtests/block06/block06.doc
+++ b/testsuites/libtests/block06/block06.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright 2008-2014 Chris Johns (chrisj@rtems.org)
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/block06/init.c b/testsuites/libtests/block06/init.c
index 3fa70c05b6..c4da28063d 100644
--- a/testsuites/libtests/block06/init.c
+++ b/testsuites/libtests/block06/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright 2008 Chris Johns (chrisj@rtems.org)
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/**
diff --git a/testsuites/libtests/block07/block07.doc b/testsuites/libtests/block07/block07.doc
index f37e942dc7..18b2f9f656 100644
--- a/testsuites/libtests/block07/block07.doc
+++ b/testsuites/libtests/block07/block07.doc
@@ -1,13 +1,27 @@
-# Copyright (c) 2009
-# embedded brains GmbH
-# Obere Lagerstr. 30
-# D-82178 Puchheim
-# Germany
-# <rtems@embedded-brains.de>
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2009 embedded brains GmbH & Co. KG
+#
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/block07/init.c b/testsuites/libtests/block07/init.c
index 19d53d10fe..a755cde987 100644
--- a/testsuites/libtests/block07/init.c
+++ b/testsuites/libtests/block07/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2009, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2009, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_test1_1.c b/testsuites/libtests/block08/bdbuf_test1_1.c
index 2c768c4194..4f0f6aeea4 100644
--- a/testsuites/libtests/block08/bdbuf_test1_1.c
+++ b/testsuites/libtests/block08/bdbuf_test1_1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Check the behaviour of rtems_bdbuf_read() function
* with different reports from disk device driver.
@@ -21,9 +23,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_test1_2.c b/testsuites/libtests/block08/bdbuf_test1_2.c
index f0b8d8f666..498da4c9f1 100644
--- a/testsuites/libtests/block08/bdbuf_test1_2.c
+++ b/testsuites/libtests/block08/bdbuf_test1_2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Check how rtems_bdbuf_read() handles two readers waiting
* for a buffer with the same block number in cases when disk device
@@ -23,9 +25,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_test1_3.c b/testsuites/libtests/block08/bdbuf_test1_3.c
index 95d7047d4a..a6d393fcaa 100644
--- a/testsuites/libtests/block08/bdbuf_test1_3.c
+++ b/testsuites/libtests/block08/bdbuf_test1_3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Check how rtems_bdbuf_read() handles two readers waiting
* for a buffer with the same block number in cases when disk device
@@ -24,9 +26,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_test1_4.c b/testsuites/libtests/block08/bdbuf_test1_4.c
index 232316fca3..1428321948 100644
--- a/testsuites/libtests/block08/bdbuf_test1_4.c
+++ b/testsuites/libtests/block08/bdbuf_test1_4.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Check how rtems_bdbuf_read() handles two readers waiting
* for a buffer with the same block number in cases when disk device
@@ -21,9 +23,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_test1_5.c b/testsuites/libtests/block08/bdbuf_test1_5.c
index 947ce0ca7c..edb7c12beb 100644
--- a/testsuites/libtests/block08/bdbuf_test1_5.c
+++ b/testsuites/libtests/block08/bdbuf_test1_5.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Check how rtems_bdbuf_read() handles read request
* for a buffer that is owned by an application.
@@ -20,9 +22,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_test2_1.c b/testsuites/libtests/block08/bdbuf_test2_1.c
index 748e3d3b15..571f63b559 100644
--- a/testsuites/libtests/block08/bdbuf_test2_1.c
+++ b/testsuites/libtests/block08/bdbuf_test2_1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Check how rtems_bdbuf_read() and rtems_bdbuf_release_modified()
* coexist. rtems_bdbuf_read() is blocked when required buffer is being
@@ -23,9 +25,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_test2_2.c b/testsuites/libtests/block08/bdbuf_test2_2.c
index 997bd490bb..8ee84f016e 100644
--- a/testsuites/libtests/block08/bdbuf_test2_2.c
+++ b/testsuites/libtests/block08/bdbuf_test2_2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Check how rtems_bdbuf_read() and rtems_bdbuf_release_modified()
* coexist. rtems_bdbuf_read() is blocked when required buffer is being
@@ -26,9 +28,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_test3_1.c b/testsuites/libtests/block08/bdbuf_test3_1.c
index efe74b62ba..eaa8d757be 100644
--- a/testsuites/libtests/block08/bdbuf_test3_1.c
+++ b/testsuites/libtests/block08/bdbuf_test3_1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Check how read/release work in case of only one buffer in ready list.
*
@@ -14,9 +16,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_test3_2.c b/testsuites/libtests/block08/bdbuf_test3_2.c
index 35e6dc8527..f411e957fe 100644
--- a/testsuites/libtests/block08/bdbuf_test3_2.c
+++ b/testsuites/libtests/block08/bdbuf_test3_2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Check that when there are some tasks waiting for an available
* buffer only one of them get a buffer after some other task releases one.
@@ -15,9 +17,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_test3_3.c b/testsuites/libtests/block08/bdbuf_test3_3.c
index 3445b15723..0273b3cd45 100644
--- a/testsuites/libtests/block08/bdbuf_test3_3.c
+++ b/testsuites/libtests/block08/bdbuf_test3_3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Check how read/release work in case of only one buffer in ready list.
*
@@ -20,9 +22,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_test4_1.c b/testsuites/libtests/block08/bdbuf_test4_1.c
index ac1805da84..3dc36909c2 100644
--- a/testsuites/libtests/block08/bdbuf_test4_1.c
+++ b/testsuites/libtests/block08/bdbuf_test4_1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Check how rtems_bdbuf_sync() works.
*
@@ -16,9 +18,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_test4_2.c b/testsuites/libtests/block08/bdbuf_test4_2.c
index 122eb7ab56..6c94740793 100644
--- a/testsuites/libtests/block08/bdbuf_test4_2.c
+++ b/testsuites/libtests/block08/bdbuf_test4_2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Check how rtems_bdbuf_sync() works.
*
@@ -17,9 +19,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_test4_3.c b/testsuites/libtests/block08/bdbuf_test4_3.c
index 0c2dd68769..4d15c69b4b 100644
--- a/testsuites/libtests/block08/bdbuf_test4_3.c
+++ b/testsuites/libtests/block08/bdbuf_test4_3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Check how rtems_bdbuf_sync() works.
*
@@ -15,9 +17,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_tests.c b/testsuites/libtests/block08/bdbuf_tests.c
index 8cf0111dbc..549246b034 100644
--- a/testsuites/libtests/block08/bdbuf_tests.c
+++ b/testsuites/libtests/block08/bdbuf_tests.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Implementation of auxiliary functions of bdbuf tests.
*
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/bdbuf_tests.h b/testsuites/libtests/block08/bdbuf_tests.h
index eea2661480..626c60001a 100644
--- a/testsuites/libtests/block08/bdbuf_tests.h
+++ b/testsuites/libtests/block08/bdbuf_tests.h
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Common declarations of bdbuf tests.
*
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef BDBUF_TESTS_H
diff --git a/testsuites/libtests/block08/init.c b/testsuites/libtests/block08/init.c
index 83eaf6d534..5d4b39ac02 100644
--- a/testsuites/libtests/block08/init.c
+++ b/testsuites/libtests/block08/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -10,9 +12,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block08/system.h b/testsuites/libtests/block08/system.h
index 91227539dd..155f93ef20 100644
--- a/testsuites/libtests/block08/system.h
+++ b/testsuites/libtests/block08/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/libtests/block08/test_disk.c b/testsuites/libtests/block08/test_disk.c
index 27aea17d27..64d42acd91 100644
--- a/testsuites/libtests/block08/test_disk.c
+++ b/testsuites/libtests/block08/test_disk.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*! @file
* @brief Test disk block device implementation.
*
* Copyright (C) 2010 OKTET Labs, St.-Petersburg, Russia
* Author: Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block09/block09.doc b/testsuites/libtests/block09/block09.doc
index debfb93ad9..ffe672eb1d 100644
--- a/testsuites/libtests/block09/block09.doc
+++ b/testsuites/libtests/block09/block09.doc
@@ -1,13 +1,27 @@
-# Copyright (c) 2010
-# embedded brains GmbH
-# Obere Lagerstr. 30
-# D-82178 Puchheim
-# Germany
-# <rtems@embedded-brains.de>
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2010 embedded brains GmbH & Co. KG
+#
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/block09/init.c b/testsuites/libtests/block09/init.c
index 1dfce2c251..2456952164 100644
--- a/testsuites/libtests/block09/init.c
+++ b/testsuites/libtests/block09/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2009, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2009, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block10/block10.doc b/testsuites/libtests/block10/block10.doc
index 3199ed5596..7020cc56c0 100644
--- a/testsuites/libtests/block10/block10.doc
+++ b/testsuites/libtests/block10/block10.doc
@@ -1,13 +1,27 @@
-# Copyright (c) 2010
-# embedded brains GmbH
-# Obere Lagerstr. 30
-# D-82178 Puchheim
-# Germany
-# <rtems@embedded-brains.de>
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2010 embedded brains GmbH & Co. KG
+#
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/block10/init.c b/testsuites/libtests/block10/init.c
index 1e57a65eb1..693a8a8908 100644
--- a/testsuites/libtests/block10/init.c
+++ b/testsuites/libtests/block10/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2010, 2018 embedded brains GmbH.
+ * Copyright (C) 2010, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * D-82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block11/init.c b/testsuites/libtests/block11/init.c
index 8539cc63a8..5d442e768f 100644
--- a/testsuites/libtests/block11/init.c
+++ b/testsuites/libtests/block11/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block12/init.c b/testsuites/libtests/block12/init.c
index 6326093e34..ad51974fec 100644
--- a/testsuites/libtests/block12/init.c
+++ b/testsuites/libtests/block12/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2012, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block13/init.c b/testsuites/libtests/block13/init.c
index c769c6fb93..c91ce8818d 100644
--- a/testsuites/libtests/block13/init.c
+++ b/testsuites/libtests/block13/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2012, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block14/init.c b/testsuites/libtests/block14/init.c
index 679606d481..ba0291d314 100644
--- a/testsuites/libtests/block14/init.c
+++ b/testsuites/libtests/block14/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2012, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block15/init.c b/testsuites/libtests/block15/init.c
index 631a841f5d..9409061631 100644
--- a/testsuites/libtests/block15/init.c
+++ b/testsuites/libtests/block15/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block16/init.c b/testsuites/libtests/block16/init.c
index 6d6695ef1f..d800895fee 100644
--- a/testsuites/libtests/block16/init.c
+++ b/testsuites/libtests/block16/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/block17/init.c b/testsuites/libtests/block17/init.c
index cbd918c7b6..bf670f679d 100644
--- a/testsuites/libtests/block17/init.c
+++ b/testsuites/libtests/block17/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2013, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2013, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/bspcmdline01/bspcmdline01.doc b/testsuites/libtests/bspcmdline01/bspcmdline01.doc
index 51e747cf67..9cc3eed704 100644
--- a/testsuites/libtests/bspcmdline01/bspcmdline01.doc
+++ b/testsuites/libtests/bspcmdline01/bspcmdline01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/bspcmdline01/init.c b/testsuites/libtests/bspcmdline01/init.c
index 243c7aad2a..11f37d369a 100644
--- a/testsuites/libtests/bspcmdline01/init.c
+++ b/testsuites/libtests/bspcmdline01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/capture01/capture01.doc b/testsuites/libtests/capture01/capture01.doc
index c3d2e566d8..b42dab2757 100644
--- a/testsuites/libtests/capture01/capture01.doc
+++ b/testsuites/libtests/capture01/capture01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This is a non-ineractive test of the capture engine. This test is based
diff --git a/testsuites/libtests/capture01/init.c b/testsuites/libtests/capture01/init.c
index 5c6a092ef2..3191ab62eb 100644
--- a/testsuites/libtests/capture01/init.c
+++ b/testsuites/libtests/capture01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define CONFIGURE_INIT
diff --git a/testsuites/libtests/capture01/system.h b/testsuites/libtests/capture01/system.h
index 620b7b477f..48e1f525fb 100644
--- a/testsuites/libtests/capture01/system.h
+++ b/testsuites/libtests/capture01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/libtests/capture01/test1.c b/testsuites/libtests/capture01/test1.c
index f1a2133d6b..a0098fa183 100644
--- a/testsuites/libtests/capture01/test1.c
+++ b/testsuites/libtests/capture01/test1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test1
*
* This test uses creates a number of tasks so the capture engine
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/complex/complex.doc b/testsuites/libtests/complex/complex.doc
index 1de63d0981..815d86cadf 100644
--- a/testsuites/libtests/complex/complex.doc
+++ b/testsuites/libtests/complex/complex.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/complex/init.c b/testsuites/libtests/complex/init.c
index 185b38f8f3..442238e79e 100644
--- a/testsuites/libtests/complex/init.c
+++ b/testsuites/libtests/complex/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -13,9 +15,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/cpuuse/init.c b/testsuites/libtests/cpuuse/init.c
index 42dcaa505e..d8d5a7595a 100644
--- a/testsuites/libtests/cpuuse/init.c
+++ b/testsuites/libtests/cpuuse/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This is a clone of sp04 which has been modified to use the cpu monitoring
* library.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/cpuuse/system.h b/testsuites/libtests/cpuuse/system.h
index 28a6e56510..6ee404dd9a 100644
--- a/testsuites/libtests/cpuuse/system.h
+++ b/testsuites/libtests/cpuuse/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <bsp.h>
diff --git a/testsuites/libtests/cpuuse/task1.c b/testsuites/libtests/cpuuse/task1.c
index 969d816859..e326e143a7 100644
--- a/testsuites/libtests/cpuuse/task1.c
+++ b/testsuites/libtests/cpuuse/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This test serves as a test task. It verifies timeslicing activities
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/cpuuse/task2.c b/testsuites/libtests/cpuuse/task2.c
index 166192966f..63046c7775 100644
--- a/testsuites/libtests/cpuuse/task2.c
+++ b/testsuites/libtests/cpuuse/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task. It is just a CPU bound task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/cpuuse/task3.c b/testsuites/libtests/cpuuse/task3.c
index 77b6206e6b..ae40b14b66 100644
--- a/testsuites/libtests/cpuuse/task3.c
+++ b/testsuites/libtests/cpuuse/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a test task. It is just a CPU bound task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/cpuuse/tswitch.c b/testsuites/libtests/cpuuse/tswitch.c
index 09963739fc..502322076e 100644
--- a/testsuites/libtests/cpuuse/tswitch.c
+++ b/testsuites/libtests/cpuuse/tswitch.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_switch
*
* This routine is the tswitch user extension. It determines which
@@ -13,9 +15,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/crypt01/init.c b/testsuites/libtests/crypt01/init.c
index 527a151034..37966a0200 100644
--- a/testsuites/libtests/crypt01/init.c
+++ b/testsuites/libtests/crypt01/init.c
@@ -1,13 +1,7 @@
/*
* Copyright (c) 2011 The FreeBSD Project. All rights reserved.
*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,6 +36,8 @@
#include <crypt.h>
#include <string.h>
+#include <rtems/stackchk.h>
+
#include "tmacros.h"
const char rtems_test_name[] = "CRYPT 1";
@@ -240,18 +236,20 @@ static void Init(rtems_task_argument arg)
test_sha512();
test_generic();
+ rtems_test_assert(!rtems_stack_checker_is_blown());
TEST_END();
rtems_test_exit(0);
}
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+#define CONFIGURE_STACK_CHECKER_ENABLED
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
-#define CONFIGURE_INIT_TASK_STACK_SIZE (2 * RTEMS_MINIMUM_STACK_SIZE)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (8 * RTEMS_MINIMUM_STACK_SIZE)
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/libtests/debugger01/debugger01.doc b/testsuites/libtests/debugger01/debugger01.doc
index 2cdd48bf4d..0313882564 100644
--- a/testsuites/libtests/debugger01/debugger01.doc
+++ b/testsuites/libtests/debugger01/debugger01.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2016 Chris Johns <chrisj@rtems.org>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/debugger01/init.c b/testsuites/libtests/debugger01/init.c
index 9fb85007de..7a4eecd965 100644
--- a/testsuites/libtests/debugger01/init.c
+++ b/testsuites/libtests/debugger01/init.c
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Debugger test.
*
* Copyright (c) 2016 Chris Johns (chrisj@rtems.org)
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/debugger01/remote.c b/testsuites/libtests/debugger01/remote.c
index 3b302284a8..f69442d8c1 100644
--- a/testsuites/libtests/debugger01/remote.c
+++ b/testsuites/libtests/debugger01/remote.c
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Debugger test remote.
*
* Copyright (c) 2016 Chris Johns (chrisj@rtems.org)
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/debugger01/system.h b/testsuites/libtests/debugger01/system.h
index 5ec19652f3..0ed05cd216 100644
--- a/testsuites/libtests/debugger01/system.h
+++ b/testsuites/libtests/debugger01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <bsp.h>
diff --git a/testsuites/libtests/defaultconfig01/init.c b/testsuites/libtests/defaultconfig01/init.c
index 3ebd5ac1b9..b8d702c96f 100644
--- a/testsuites/libtests/defaultconfig01/init.c
+++ b/testsuites/libtests/defaultconfig01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/devfs01/devfs01.doc b/testsuites/libtests/devfs01/devfs01.doc
index 9503ce1056..dd5a48fdf3 100644
--- a/testsuites/libtests/devfs01/devfs01.doc
+++ b/testsuites/libtests/devfs01/devfs01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/devfs01/init.c b/testsuites/libtests/devfs01/init.c
index 193c7641db..b467bbd998 100644
--- a/testsuites/libtests/devfs01/init.c
+++ b/testsuites/libtests/devfs01/init.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/devfs04/devfs04.doc b/testsuites/libtests/devfs04/devfs04.doc
index abd578de47..2f512e50e1 100644
--- a/testsuites/libtests/devfs04/devfs04.doc
+++ b/testsuites/libtests/devfs04/devfs04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/devfs04/init.c b/testsuites/libtests/devfs04/init.c
index a7549abdad..ca5269dcdd 100644
--- a/testsuites/libtests/devfs04/init.c
+++ b/testsuites/libtests/devfs04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/devfs04/test_driver.c b/testsuites/libtests/devfs04/test_driver.c
index bd4b40af9a..b3a8339d83 100644
--- a/testsuites/libtests/devfs04/test_driver.c
+++ b/testsuites/libtests/devfs04/test_driver.c
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* test_driver
*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/devfs04/test_driver.h b/testsuites/libtests/devfs04/test_driver.h
index 245ac47a3c..aad3174b76 100644
--- a/testsuites/libtests/devfs04/test_driver.h
+++ b/testsuites/libtests/devfs04/test_driver.h
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* test_driver.h
*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef __TEST_DRIVER_h
diff --git a/testsuites/libtests/deviceio01/deviceio01.doc b/testsuites/libtests/deviceio01/deviceio01.doc
index ed7f622ca9..0ca7b4395d 100644
--- a/testsuites/libtests/deviceio01/deviceio01.doc
+++ b/testsuites/libtests/deviceio01/deviceio01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/deviceio01/init.c b/testsuites/libtests/deviceio01/init.c
index c27e345be5..009de219f3 100644
--- a/testsuites/libtests/deviceio01/init.c
+++ b/testsuites/libtests/deviceio01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/deviceio01/test_driver.c b/testsuites/libtests/deviceio01/test_driver.c
index 0f80a27ef5..c56b40d63f 100644
--- a/testsuites/libtests/deviceio01/test_driver.c
+++ b/testsuites/libtests/deviceio01/test_driver.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/deviceio01/test_driver.h b/testsuites/libtests/deviceio01/test_driver.h
index d6409d2f32..1fd24b1679 100644
--- a/testsuites/libtests/deviceio01/test_driver.h
+++ b/testsuites/libtests/deviceio01/test_driver.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef __TEST_DRIVER_h
diff --git a/testsuites/libtests/devnullfatal01/devnullfatal01.doc b/testsuites/libtests/devnullfatal01/devnullfatal01.doc
index cc51421cbb..18f52caa45 100644
--- a/testsuites/libtests/devnullfatal01/devnullfatal01.doc
+++ b/testsuites/libtests/devnullfatal01/devnullfatal01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/devnullfatal01/init.c b/testsuites/libtests/devnullfatal01/init.c
index ecf63cfe51..2c7b9c0b4d 100644
--- a/testsuites/libtests/devnullfatal01/init.c
+++ b/testsuites/libtests/devnullfatal01/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2010, 2017.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define FATAL_ERROR_TEST_NAME "/DEV/NULL 1"
diff --git a/testsuites/libtests/dl01/dl-load.c b/testsuites/libtests/dl01/dl-load.c
index d93550d15b..bd4223acb1 100644
--- a/testsuites/libtests/dl01/dl-load.c
+++ b/testsuites/libtests/dl01/dl-load.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <stdio.h>
diff --git a/testsuites/libtests/dl01/dl-load.h b/testsuites/libtests/dl01/dl-load.h
index 3f3910a90d..142b195626 100644
--- a/testsuites/libtests/dl01/dl-load.h
+++ b/testsuites/libtests/dl01/dl-load.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(_DL_LOAD_H_)
diff --git a/testsuites/libtests/dl01/dl01-o1.c b/testsuites/libtests/dl01/dl01-o1.c
index 70fa2d3be8..9350235d85 100644
--- a/testsuites/libtests/dl01/dl01-o1.c
+++ b/testsuites/libtests/dl01/dl01-o1.c
@@ -1,16 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/**
* Hello World as a loadable module.
*/
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl01/dl01.doc b/testsuites/libtests/dl01/dl01.doc
index a1099287d4..5e20cdf650 100644
--- a/testsuites/libtests/dl01/dl01.doc
+++ b/testsuites/libtests/dl01/dl01.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2014 Chris Johns <chrisj@rtems.org>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/dl01/init.c b/testsuites/libtests/dl01/init.c
index 86cbde94f4..06fa8004b8 100644
--- a/testsuites/libtests/dl01/init.c
+++ b/testsuites/libtests/dl01/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -75,7 +94,7 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (4U * 1024U))
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
diff --git a/testsuites/libtests/dl02/dl-load.c b/testsuites/libtests/dl02/dl-load.c
index b7a5fc54d4..1892d91652 100644
--- a/testsuites/libtests/dl02/dl-load.c
+++ b/testsuites/libtests/dl02/dl-load.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <stdio.h>
diff --git a/testsuites/libtests/dl02/dl-load.h b/testsuites/libtests/dl02/dl-load.h
index 3f3910a90d..142b195626 100644
--- a/testsuites/libtests/dl02/dl-load.h
+++ b/testsuites/libtests/dl02/dl-load.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(_DL_LOAD_H_)
diff --git a/testsuites/libtests/dl02/dl-o2.h b/testsuites/libtests/dl02/dl-o2.h
index 43dbd39b9d..e675c24594 100644
--- a/testsuites/libtests/dl02/dl-o2.h
+++ b/testsuites/libtests/dl02/dl-o2.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL02_H)
diff --git a/testsuites/libtests/dl02/dl02-o1.c b/testsuites/libtests/dl02/dl02-o1.c
index a7ab2d586c..3b3e51825d 100644
--- a/testsuites/libtests/dl02/dl02-o1.c
+++ b/testsuites/libtests/dl02/dl02-o1.c
@@ -1,16 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-o2.h"
#include <dlfcn.h>
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl02/dl02-o2.c b/testsuites/libtests/dl02/dl02-o2.c
index 331fd3bf25..6694c5e985 100644
--- a/testsuites/libtests/dl02/dl02-o2.c
+++ b/testsuites/libtests/dl02/dl02-o2.c
@@ -1,14 +1,33 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-o2.h"
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__)
diff --git a/testsuites/libtests/dl02/dl02.doc b/testsuites/libtests/dl02/dl02.doc
index 4a325de9cc..d7e29c75eb 100644
--- a/testsuites/libtests/dl02/dl02.doc
+++ b/testsuites/libtests/dl02/dl02.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2014 Chris Johns <chrisj@rtems.org>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/dl02/init.c b/testsuites/libtests/dl02/init.c
index 5245418556..495a58d287 100644
--- a/testsuites/libtests/dl02/init.c
+++ b/testsuites/libtests/dl02/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -75,7 +94,7 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (4U * 1024U))
#define CONFIGURE_INIT_TASK_ATTRIBUTES (RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT)
diff --git a/testsuites/libtests/dl03/dl-bit-alloc.c b/testsuites/libtests/dl03/dl-bit-alloc.c
index e4e3cf4c82..211fb71156 100644
--- a/testsuites/libtests/dl03/dl-bit-alloc.c
+++ b/testsuites/libtests/dl03/dl-bit-alloc.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2016, 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/dl03/dl-bit-alloc.h b/testsuites/libtests/dl03/dl-bit-alloc.h
index 5795570397..d7696234b5 100644
--- a/testsuites/libtests/dl03/dl-bit-alloc.h
+++ b/testsuites/libtests/dl03/dl-bit-alloc.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(_DL_BIT_ALLOC_H_)
diff --git a/testsuites/libtests/dl03/dl-cache.c b/testsuites/libtests/dl03/dl-cache.c
index f29531b40b..0db6cc1b12 100644
--- a/testsuites/libtests/dl03/dl-cache.c
+++ b/testsuites/libtests/dl03/dl-cache.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2016, 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/dl03/dl-cache.h b/testsuites/libtests/dl03/dl-cache.h
index e46df4b939..e77e76879d 100644
--- a/testsuites/libtests/dl03/dl-cache.h
+++ b/testsuites/libtests/dl03/dl-cache.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(_DL_CACHE_H_)
diff --git a/testsuites/libtests/dl03/dl03.doc b/testsuites/libtests/dl03/dl03.doc
index 4a325de9cc..d7e29c75eb 100644
--- a/testsuites/libtests/dl03/dl03.doc
+++ b/testsuites/libtests/dl03/dl03.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2014 Chris Johns <chrisj@rtems.org>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/dl03/init.c b/testsuites/libtests/dl03/init.c
index 4fc0b768f9..e953f1a4c6 100644
--- a/testsuites/libtests/dl03/init.c
+++ b/testsuites/libtests/dl03/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -61,7 +80,7 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (4U * 1024U))
#define CONFIGURE_INIT_TASK_ATTRIBUTES (RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT)
diff --git a/testsuites/libtests/dl04/dl-load.c b/testsuites/libtests/dl04/dl-load.c
index 9e383a00fb..463d313f28 100644
--- a/testsuites/libtests/dl04/dl-load.c
+++ b/testsuites/libtests/dl04/dl-load.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/dl04/dl-load.h b/testsuites/libtests/dl04/dl-load.h
index c1dca92438..ced07b0841 100644
--- a/testsuites/libtests/dl04/dl-load.h
+++ b/testsuites/libtests/dl04/dl-load.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(_DL_LOAD_H_)
diff --git a/testsuites/libtests/dl04/dl04.doc b/testsuites/libtests/dl04/dl04.doc
index f36dc7b07f..b728efe22c 100644
--- a/testsuites/libtests/dl04/dl04.doc
+++ b/testsuites/libtests/dl04/dl04.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2016 Chris Johns <chrisj@rtems.org>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/dl04/init.c b/testsuites/libtests/dl04/init.c
index 467d28f30a..54a852800d 100644
--- a/testsuites/libtests/dl04/init.c
+++ b/testsuites/libtests/dl04/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -75,7 +94,7 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (4U * 1024U))
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
diff --git a/testsuites/libtests/dl05/dl-load.c b/testsuites/libtests/dl05/dl-load.c
index 11d1404900..a54fe5acf2 100644
--- a/testsuites/libtests/dl05/dl-load.c
+++ b/testsuites/libtests/dl05/dl-load.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/dl05/dl-load.h b/testsuites/libtests/dl05/dl-load.h
index 7a9e1382fd..8f73272427 100644
--- a/testsuites/libtests/dl05/dl-load.h
+++ b/testsuites/libtests/dl05/dl-load.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(_DL_LOAD_H_)
diff --git a/testsuites/libtests/dl05/dl05-o5.cc b/testsuites/libtests/dl05/dl05-o5.cc
index c861916ff0..f928cf9004 100644
--- a/testsuites/libtests/dl05/dl05-o5.cc
+++ b/testsuites/libtests/dl05/dl05-o5.cc
@@ -2,7 +2,7 @@
#include <stdexcept>
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl05/dl05.doc b/testsuites/libtests/dl05/dl05.doc
index 58d4d95fa1..42855852b8 100644
--- a/testsuites/libtests/dl05/dl05.doc
+++ b/testsuites/libtests/dl05/dl05.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2016 Chris Johns <chrisj@rtems.org>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/dl05/init.c b/testsuites/libtests/dl05/init.c
index 693ed65172..7e34af757d 100644
--- a/testsuites/libtests/dl05/init.c
+++ b/testsuites/libtests/dl05/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -77,7 +96,7 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (32U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (36U * 1024U)
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
diff --git a/testsuites/libtests/dl06/dl-load.c b/testsuites/libtests/dl06/dl-load.c
index 211c05cd3c..3d44c0efa2 100644
--- a/testsuites/libtests/dl06/dl-load.c
+++ b/testsuites/libtests/dl06/dl-load.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define DL06_DEBUG_TRACING 0
diff --git a/testsuites/libtests/dl06/dl-load.h b/testsuites/libtests/dl06/dl-load.h
index 3f3910a90d..142b195626 100644
--- a/testsuites/libtests/dl06/dl-load.h
+++ b/testsuites/libtests/dl06/dl-load.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(_DL_LOAD_H_)
diff --git a/testsuites/libtests/dl06/dl06-o1.c b/testsuites/libtests/dl06/dl06-o1.c
index 57124ccff5..1b8482bc3e 100644
--- a/testsuites/libtests/dl06/dl06-o1.c
+++ b/testsuites/libtests/dl06/dl06-o1.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl06-o2.h"
@@ -11,7 +30,7 @@
#include <dlfcn.h>
#include <math.h>
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl06/dl06-o2.c b/testsuites/libtests/dl06/dl06-o2.c
index 3c374b2371..0a46c027a8 100644
--- a/testsuites/libtests/dl06/dl06-o2.c
+++ b/testsuites/libtests/dl06/dl06-o2.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl06-o2.h"
@@ -11,7 +30,7 @@
#include <stdlib.h>
#include <math.h>
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl06/dl06-o2.h b/testsuites/libtests/dl06/dl06-o2.h
index 12be7ee197..f613a621e1 100644
--- a/testsuites/libtests/dl06/dl06-o2.h
+++ b/testsuites/libtests/dl06/dl06-o2.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL06_02_H)
diff --git a/testsuites/libtests/dl06/dl06.doc b/testsuites/libtests/dl06/dl06.doc
index 8487385b04..bd50220c8b 100644
--- a/testsuites/libtests/dl06/dl06.doc
+++ b/testsuites/libtests/dl06/dl06.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2018 Chris Johns <chrisj@rtems.org>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/dl06/init.c b/testsuites/libtests/dl06/init.c
index 413ebf0d11..65d143760f 100644
--- a/testsuites/libtests/dl06/init.c
+++ b/testsuites/libtests/dl06/init.c
@@ -1 +1,36 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup libtests
+ *
+ * @brief This is init for dl06.
+ */
+
+/*
+ * Copyright (C) 2018 Chris Johns <chrisj@rtems.org>.
+ *
+ * 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 OWNER 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.
+ */
+
#include "initimpl.h"
diff --git a/testsuites/libtests/dl06/initimpl.h b/testsuites/libtests/dl06/initimpl.h
index 2611124287..0d3987983d 100644
--- a/testsuites/libtests/dl06/initimpl.h
+++ b/testsuites/libtests/dl06/initimpl.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -79,7 +98,7 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (4U * 1024U))
#define CONFIGURE_INIT_TASK_ATTRIBUTES (RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT)
diff --git a/testsuites/libtests/dl06/pre-init.c b/testsuites/libtests/dl06/pre-init.c
index 6dc232a574..0eeef9f814 100644
--- a/testsuites/libtests/dl06/pre-init.c
+++ b/testsuites/libtests/dl06/pre-init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup libtests
+ *
+ * @brief This is pre-init for dl06.
+ */
+
+/*
+ * Copyright (C) 2018 Chris Johns <chrisj@rtems.org>.
+ *
+ * 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 OWNER 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.
+ */
+
#define DL06_PRE 1
#include "initimpl.h"
diff --git a/testsuites/libtests/dl07/dl-load.c b/testsuites/libtests/dl07/dl-load.c
index b92a745f42..2946120ca6 100644
--- a/testsuites/libtests/dl07/dl-load.c
+++ b/testsuites/libtests/dl07/dl-load.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define TEST_TRACE 0
@@ -13,6 +32,7 @@
RTEMS_RTL_TRACE_WARNING | \
RTEMS_RTL_TRACE_LOAD | \
RTEMS_RTL_TRACE_UNLOAD | \
+ RTEMS_RTL_TRACE_LOAD_SECT | \
RTEMS_RTL_TRACE_SYMBOL | \
RTEMS_RTL_TRACE_RELOC | \
RTEMS_RTL_TRACE_ALLOCATOR | \
diff --git a/testsuites/libtests/dl07/dl-load.h b/testsuites/libtests/dl07/dl-load.h
index 72872917aa..ae1536502a 100644
--- a/testsuites/libtests/dl07/dl-load.h
+++ b/testsuites/libtests/dl07/dl-load.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014, 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <string.h>
diff --git a/testsuites/libtests/dl07/dl-o1.h b/testsuites/libtests/dl07/dl-o1.h
index bf07eb6a45..745e548778 100644
--- a/testsuites/libtests/dl07/dl-o1.h
+++ b/testsuites/libtests/dl07/dl-o1.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL01_H)
diff --git a/testsuites/libtests/dl07/dl-o2.h b/testsuites/libtests/dl07/dl-o2.h
index 0d97c5cff9..d7812c4475 100644
--- a/testsuites/libtests/dl07/dl-o2.h
+++ b/testsuites/libtests/dl07/dl-o2.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL02_H)
diff --git a/testsuites/libtests/dl07/dl-o4.h b/testsuites/libtests/dl07/dl-o4.h
index 371279be9e..7ea5139fe9 100644
--- a/testsuites/libtests/dl07/dl-o4.h
+++ b/testsuites/libtests/dl07/dl-o4.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL04_H)
diff --git a/testsuites/libtests/dl07/dl-o5.h b/testsuites/libtests/dl07/dl-o5.h
index 04974a03d4..606a39c2b3 100644
--- a/testsuites/libtests/dl07/dl-o5.h
+++ b/testsuites/libtests/dl07/dl-o5.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <stdint.h>
diff --git a/testsuites/libtests/dl07/dl07-o1.c b/testsuites/libtests/dl07/dl07-o1.c
index adb452b96e..0bca0ab838 100644
--- a/testsuites/libtests/dl07/dl07-o1.c
+++ b/testsuites/libtests/dl07/dl07-o1.c
@@ -1,15 +1,34 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-o1.h"
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#include "dl-load.h"
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl07/dl07-o2.c b/testsuites/libtests/dl07/dl07-o2.c
index d31d0e5f4e..46aef0d6fe 100644
--- a/testsuites/libtests/dl07/dl07-o2.c
+++ b/testsuites/libtests/dl07/dl07-o2.c
@@ -1,16 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
#include "dl-o1.h"
#include "dl-o2.h"
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl07/dl07-o3.c b/testsuites/libtests/dl07/dl07-o3.c
index ecdd72f8a9..ab60f50e97 100644
--- a/testsuites/libtests/dl07/dl07-o3.c
+++ b/testsuites/libtests/dl07/dl07-o3.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
@@ -13,7 +32,7 @@
#include "dl-o5.h"
#include <inttypes.h>
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl07/dl07-o4.c b/testsuites/libtests/dl07/dl07-o4.c
index ad9fe9da32..e5f831ec24 100644
--- a/testsuites/libtests/dl07/dl07-o4.c
+++ b/testsuites/libtests/dl07/dl07-o4.c
@@ -1,16 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
#include "dl-o1.h"
#include "dl-o4.h"
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl07/dl07-o5.c b/testsuites/libtests/dl07/dl07-o5.c
index cb04a3e5be..83e98f6d9d 100644
--- a/testsuites/libtests/dl07/dl07-o5.c
+++ b/testsuites/libtests/dl07/dl07-o5.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
@@ -11,7 +30,7 @@
#include "dl-o5.h"
#include <inttypes.h>
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl07/dl07.doc b/testsuites/libtests/dl07/dl07.doc
index 9a06de16fc..9535ded722 100644
--- a/testsuites/libtests/dl07/dl07.doc
+++ b/testsuites/libtests/dl07/dl07.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2018 Chris Johns <chrisj@rtems.org>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/dl07/init.c b/testsuites/libtests/dl07/init.c
index 40cca25202..8db106ba29 100644
--- a/testsuites/libtests/dl07/init.c
+++ b/testsuites/libtests/dl07/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -81,7 +100,7 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (4U * 1024U))
#define CONFIGURE_INIT_TASK_ATTRIBUTES (RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT)
diff --git a/testsuites/libtests/dl08/dl-load.c b/testsuites/libtests/dl08/dl-load.c
index 44330e8f9d..680283b5c3 100644
--- a/testsuites/libtests/dl08/dl-load.c
+++ b/testsuites/libtests/dl08/dl-load.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define TEST_TRACE 0
diff --git a/testsuites/libtests/dl08/dl-load.h b/testsuites/libtests/dl08/dl-load.h
index 72872917aa..ae1536502a 100644
--- a/testsuites/libtests/dl08/dl-load.h
+++ b/testsuites/libtests/dl08/dl-load.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014, 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <string.h>
diff --git a/testsuites/libtests/dl08/dl-o1.h b/testsuites/libtests/dl08/dl-o1.h
index f6a10f1481..598ef785ad 100644
--- a/testsuites/libtests/dl08/dl-o1.h
+++ b/testsuites/libtests/dl08/dl-o1.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL01_H)
diff --git a/testsuites/libtests/dl08/dl-o2.h b/testsuites/libtests/dl08/dl-o2.h
index d6c1820f46..f0805945cc 100644
--- a/testsuites/libtests/dl08/dl-o2.h
+++ b/testsuites/libtests/dl08/dl-o2.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL02_H)
diff --git a/testsuites/libtests/dl08/dl-o3.h b/testsuites/libtests/dl08/dl-o3.h
index 8c5d18dfb1..54a3f84c97 100644
--- a/testsuites/libtests/dl08/dl-o3.h
+++ b/testsuites/libtests/dl08/dl-o3.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL03_H)
diff --git a/testsuites/libtests/dl08/dl-o4.h b/testsuites/libtests/dl08/dl-o4.h
index bab9fc1ae4..a4b129f338 100644
--- a/testsuites/libtests/dl08/dl-o4.h
+++ b/testsuites/libtests/dl08/dl-o4.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL04_H)
diff --git a/testsuites/libtests/dl08/dl-o5.h b/testsuites/libtests/dl08/dl-o5.h
index bb4ce468a2..50b5f6234e 100644
--- a/testsuites/libtests/dl08/dl-o5.h
+++ b/testsuites/libtests/dl08/dl-o5.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <stdint.h>
diff --git a/testsuites/libtests/dl08/dl-o6.h b/testsuites/libtests/dl08/dl-o6.h
index 0dde92857b..4f10fd917c 100644
--- a/testsuites/libtests/dl08/dl-o6.h
+++ b/testsuites/libtests/dl08/dl-o6.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <stdint.h>
diff --git a/testsuites/libtests/dl08/dl08-o1.c b/testsuites/libtests/dl08/dl08-o1.c
index 422d25bb09..015e847ea2 100644
--- a/testsuites/libtests/dl08/dl08-o1.c
+++ b/testsuites/libtests/dl08/dl08-o1.c
@@ -1,15 +1,34 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-o1.h"
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#include "dl-load.h"
#include "dl-o1.h"
#include "dl-o2.h"
diff --git a/testsuites/libtests/dl08/dl08-o2.c b/testsuites/libtests/dl08/dl08-o2.c
index f4a459f451..3833cb5768 100644
--- a/testsuites/libtests/dl08/dl08-o2.c
+++ b/testsuites/libtests/dl08/dl08-o2.c
@@ -1,16 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
#include "dl-o2.h"
#include "dl-o3.h"
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl08/dl08-o3.c b/testsuites/libtests/dl08/dl08-o3.c
index af5976c6de..dc839bf270 100644
--- a/testsuites/libtests/dl08/dl08-o3.c
+++ b/testsuites/libtests/dl08/dl08-o3.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
@@ -12,7 +31,7 @@
#include "dl-o5.h"
#include <inttypes.h>
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl08/dl08-o4.c b/testsuites/libtests/dl08/dl08-o4.c
index 7cbd4aadd6..d09fd2ec93 100644
--- a/testsuites/libtests/dl08/dl08-o4.c
+++ b/testsuites/libtests/dl08/dl08-o4.c
@@ -1,16 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
#include "dl-o4.h"
#include "dl-o5.h"
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl08/dl08-o5.c b/testsuites/libtests/dl08/dl08-o5.c
index c4fa9ecdf1..de86437757 100644
--- a/testsuites/libtests/dl08/dl08-o5.c
+++ b/testsuites/libtests/dl08/dl08-o5.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
@@ -11,7 +30,7 @@
#include "dl-o6.h"
#include <inttypes.h>
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl08/dl08-o6-123456789-123456789.c b/testsuites/libtests/dl08/dl08-o6-123456789-123456789.c
index b8c4b2aac6..47d3f66f76 100644
--- a/testsuites/libtests/dl08/dl08-o6-123456789-123456789.c
+++ b/testsuites/libtests/dl08/dl08-o6-123456789-123456789.c
@@ -1,16 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
#include "dl-o6.h"
#include <inttypes.h>
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl08/dl08.doc b/testsuites/libtests/dl08/dl08.doc
index 29819bbc83..85f69f2582 100644
--- a/testsuites/libtests/dl08/dl08.doc
+++ b/testsuites/libtests/dl08/dl08.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2018 Chris Johns <chrisj@rtems.org>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/dl08/init.c b/testsuites/libtests/dl08/init.c
index a675464146..23ebe41d63 100644
--- a/testsuites/libtests/dl08/init.c
+++ b/testsuites/libtests/dl08/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -81,7 +100,7 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (4U * 1024U))
#define CONFIGURE_INIT_TASK_ATTRIBUTES (RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT)
diff --git a/testsuites/libtests/dl09/dl-load.c b/testsuites/libtests/dl09/dl-load.c
index 9b03a3746c..216fb5a201 100644
--- a/testsuites/libtests/dl09/dl-load.c
+++ b/testsuites/libtests/dl09/dl-load.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2019 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define TEST_TRACE 0
@@ -97,8 +116,12 @@ static void dl_check_resolved(void* handle, bool has_unresolved)
rtems_test_assert (unresolved == 0);
}
}
- printf ("handel: %p: %sunresolved externals\n",
- handle, unresolved != 0 ? "" : "no ");
+ if (handle == RTLD_SELF)
+ printf ("handle: RTL_SELF: %sunresolved externals\n",
+ unresolved != 0 ? "" : "no ");
+ else
+ printf ("handle: %p: %sunresolved externals\n",
+ handle, unresolved != 0 ? "" : "no ");
}
static void* dl_load_obj (const char* name, bool has_unresolved)
@@ -133,12 +156,20 @@ static void dl_close (void* handle)
static int dl_call (void* handle, const char* func)
{
+ static call_sig last_call;
call_sig call = dlsym (handle, func);
if (call == NULL)
{
printf("dlsym failed: symbol not found: %s\n", func);
return 1;
}
+ if (last_call != NULL && last_call != call)
+ {
+ printf("Call location different: moved by: %i (call:%p last:%p)\n",
+ (int) (call - last_call),
+ call, last_call);
+ }
+ last_call = call;
call ();
return 0;
}
@@ -152,7 +183,7 @@ static void dl_object_open (object_def* od, objects* o)
if (od->space != 0)
{
o->space = malloc (od->space);
- printf("space alloc: %s: %d: %p\n", od->name, od->space, o->space);
+ printf("space alloc: %s: %zd: %p\n", od->name, od->space, o->space);
rtems_test_assert (o->space != NULL);
}
dl_load_dump ();
diff --git a/testsuites/libtests/dl09/dl-load.h b/testsuites/libtests/dl09/dl-load.h
index 72872917aa..ae1536502a 100644
--- a/testsuites/libtests/dl09/dl-load.h
+++ b/testsuites/libtests/dl09/dl-load.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014, 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <string.h>
diff --git a/testsuites/libtests/dl09/dl-o1.h b/testsuites/libtests/dl09/dl-o1.h
index f6a10f1481..598ef785ad 100644
--- a/testsuites/libtests/dl09/dl-o1.h
+++ b/testsuites/libtests/dl09/dl-o1.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL01_H)
diff --git a/testsuites/libtests/dl09/dl-o2.h b/testsuites/libtests/dl09/dl-o2.h
index d6c1820f46..f0805945cc 100644
--- a/testsuites/libtests/dl09/dl-o2.h
+++ b/testsuites/libtests/dl09/dl-o2.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL02_H)
diff --git a/testsuites/libtests/dl09/dl-o3.h b/testsuites/libtests/dl09/dl-o3.h
index 8c5d18dfb1..54a3f84c97 100644
--- a/testsuites/libtests/dl09/dl-o3.h
+++ b/testsuites/libtests/dl09/dl-o3.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL03_H)
diff --git a/testsuites/libtests/dl09/dl-o4.h b/testsuites/libtests/dl09/dl-o4.h
index bab9fc1ae4..a4b129f338 100644
--- a/testsuites/libtests/dl09/dl-o4.h
+++ b/testsuites/libtests/dl09/dl-o4.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL04_H)
diff --git a/testsuites/libtests/dl09/dl-o5.h b/testsuites/libtests/dl09/dl-o5.h
index bb4ce468a2..50b5f6234e 100644
--- a/testsuites/libtests/dl09/dl-o5.h
+++ b/testsuites/libtests/dl09/dl-o5.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <stdint.h>
diff --git a/testsuites/libtests/dl09/dl09-o1.c b/testsuites/libtests/dl09/dl09-o1.c
index 45cc6edcfa..291d33fcd0 100644
--- a/testsuites/libtests/dl09/dl09-o1.c
+++ b/testsuites/libtests/dl09/dl09-o1.c
@@ -1,15 +1,34 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-o1.h"
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#include "dl-load.h"
#include "dl-o1.h"
#include "dl-o2.h"
diff --git a/testsuites/libtests/dl09/dl09-o2.c b/testsuites/libtests/dl09/dl09-o2.c
index 48a0786b9c..e8976f3b49 100644
--- a/testsuites/libtests/dl09/dl09-o2.c
+++ b/testsuites/libtests/dl09/dl09-o2.c
@@ -1,16 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
#include "dl-o2.h"
#include "dl-o3.h"
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl09/dl09-o3.c b/testsuites/libtests/dl09/dl09-o3.c
index 9fb0591d37..d9a056d45d 100644
--- a/testsuites/libtests/dl09/dl09-o3.c
+++ b/testsuites/libtests/dl09/dl09-o3.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
@@ -12,7 +31,7 @@
#include "dl-o5.h"
#include <inttypes.h>
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl09/dl09-o4.c b/testsuites/libtests/dl09/dl09-o4.c
index 2ae0ef5ea8..8998059c93 100644
--- a/testsuites/libtests/dl09/dl09-o4.c
+++ b/testsuites/libtests/dl09/dl09-o4.c
@@ -1,16 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
#include "dl-o4.h"
#include "dl-o5.h"
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl09/dl09-o5.c b/testsuites/libtests/dl09/dl09-o5.c
index badeaed53f..e5374f3eb8 100644
--- a/testsuites/libtests/dl09/dl09-o5.c
+++ b/testsuites/libtests/dl09/dl09-o5.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2019 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
@@ -11,7 +30,7 @@
#include "dl-o5.h"
#include <inttypes.h>
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl09/dl09.doc b/testsuites/libtests/dl09/dl09.doc
index f9df9a276d..c820424d14 100644
--- a/testsuites/libtests/dl09/dl09.doc
+++ b/testsuites/libtests/dl09/dl09.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2019 Chris Johns <chrisj@rtems.org>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/dl09/init.c b/testsuites/libtests/dl09/init.c
index a95a57ad45..b375fe3f38 100644
--- a/testsuites/libtests/dl09/init.c
+++ b/testsuites/libtests/dl09/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -81,7 +100,7 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (4U * 1024U))
#define CONFIGURE_INIT_TASK_ATTRIBUTES (RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT)
diff --git a/testsuites/libtests/dl10/dl-load.c b/testsuites/libtests/dl10/dl-load.c
index 7a4bae9c17..62cf2ec15e 100644
--- a/testsuites/libtests/dl10/dl-load.c
+++ b/testsuites/libtests/dl10/dl-load.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define TEST_TRACE 0
diff --git a/testsuites/libtests/dl10/dl-load.h b/testsuites/libtests/dl10/dl-load.h
index 72872917aa..ae1536502a 100644
--- a/testsuites/libtests/dl10/dl-load.h
+++ b/testsuites/libtests/dl10/dl-load.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014, 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <string.h>
diff --git a/testsuites/libtests/dl10/dl-o1.h b/testsuites/libtests/dl10/dl-o1.h
index f6a10f1481..598ef785ad 100644
--- a/testsuites/libtests/dl10/dl-o1.h
+++ b/testsuites/libtests/dl10/dl-o1.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL01_H)
diff --git a/testsuites/libtests/dl10/dl-o2.h b/testsuites/libtests/dl10/dl-o2.h
index d6c1820f46..f0805945cc 100644
--- a/testsuites/libtests/dl10/dl-o2.h
+++ b/testsuites/libtests/dl10/dl-o2.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL02_H)
diff --git a/testsuites/libtests/dl10/dl-o3.h b/testsuites/libtests/dl10/dl-o3.h
index 8c5d18dfb1..54a3f84c97 100644
--- a/testsuites/libtests/dl10/dl-o3.h
+++ b/testsuites/libtests/dl10/dl-o3.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL03_H)
diff --git a/testsuites/libtests/dl10/dl-o4.h b/testsuites/libtests/dl10/dl-o4.h
index bab9fc1ae4..a4b129f338 100644
--- a/testsuites/libtests/dl10/dl-o4.h
+++ b/testsuites/libtests/dl10/dl-o4.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(DL04_H)
diff --git a/testsuites/libtests/dl10/dl-o5.h b/testsuites/libtests/dl10/dl-o5.h
index bb4ce468a2..50b5f6234e 100644
--- a/testsuites/libtests/dl10/dl-o5.h
+++ b/testsuites/libtests/dl10/dl-o5.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <stdint.h>
diff --git a/testsuites/libtests/dl10/dl10-o1.c b/testsuites/libtests/dl10/dl10-o1.c
index 422d25bb09..015e847ea2 100644
--- a/testsuites/libtests/dl10/dl10-o1.c
+++ b/testsuites/libtests/dl10/dl10-o1.c
@@ -1,15 +1,34 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-o1.h"
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#include "dl-load.h"
#include "dl-o1.h"
#include "dl-o2.h"
diff --git a/testsuites/libtests/dl10/dl10-o2.c b/testsuites/libtests/dl10/dl10-o2.c
index f4a459f451..3833cb5768 100644
--- a/testsuites/libtests/dl10/dl10-o2.c
+++ b/testsuites/libtests/dl10/dl10-o2.c
@@ -1,16 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
#include "dl-o2.h"
#include "dl-o3.h"
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl10/dl10-o3.c b/testsuites/libtests/dl10/dl10-o3.c
index af5976c6de..dc839bf270 100644
--- a/testsuites/libtests/dl10/dl10-o3.c
+++ b/testsuites/libtests/dl10/dl10-o3.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
@@ -12,7 +31,7 @@
#include "dl-o5.h"
#include <inttypes.h>
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl10/dl10-o4.c b/testsuites/libtests/dl10/dl10-o4.c
index 7cbd4aadd6..d09fd2ec93 100644
--- a/testsuites/libtests/dl10/dl10-o4.c
+++ b/testsuites/libtests/dl10/dl10-o4.c
@@ -1,16 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
#include "dl-o4.h"
#include "dl-o5.h"
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl10/dl10-o5.c b/testsuites/libtests/dl10/dl10-o5.c
index 832c029ec8..185c259d8c 100644
--- a/testsuites/libtests/dl10/dl10-o5.c
+++ b/testsuites/libtests/dl10/dl10-o5.c
@@ -1,16 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
#include "dl-o5.h"
#include <inttypes.h>
-#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
diff --git a/testsuites/libtests/dl10/dl10-o6.c b/testsuites/libtests/dl10/dl10-o6.c
index 2ac80277f5..2484ff6f2f 100644
--- a/testsuites/libtests/dl10/dl10-o6.c
+++ b/testsuites/libtests/dl10/dl10-o6.c
@@ -1,16 +1,34 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "dl-load.h"
#include "dl-o5.h"
#include <inttypes.h>
-#include <rtems/test-info.h>
int rtems_main_o5 (void)
{
diff --git a/testsuites/libtests/dl10/dl10.doc b/testsuites/libtests/dl10/dl10.doc
index 82469da593..bee13b1c2a 100644
--- a/testsuites/libtests/dl10/dl10.doc
+++ b/testsuites/libtests/dl10/dl10.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2019 Chris Johns <chrisj@rtems.org>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/dl10/init.c b/testsuites/libtests/dl10/init.c
index b488a321ab..04f71eaaba 100644
--- a/testsuites/libtests/dl10/init.c
+++ b/testsuites/libtests/dl10/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2018 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -27,9 +46,6 @@
const char rtems_test_name[] = "libdl (RTL) 10";
-/* forward declarations to avoid warnings */
-static rtems_task Init(rtems_task_argument argument);
-
#include "dl10-tar.h"
#define TARFILE_START dl10_tar
@@ -46,9 +62,18 @@ static int test(void)
return 0;
}
+static void notification(int fd, int seconds_remaining, void *arg)
+{
+ printf(
+ "Press any key to enter shell (%is remaining)\n",
+ seconds_remaining
+ );
+}
+
static void Init(rtems_task_argument arg)
{
int e;
+ rtems_status_code sc;
TEST_BEGIN();
@@ -76,13 +101,20 @@ static void Init(rtems_task_argument arg)
exit (1);
}
- rtems_shell_init ("SHLL",
- RTEMS_MINIMUM_STACK_SIZE * 4,
- 100,
- "/dev/foobar",
- false,
- true,
- NULL);
+
+ sc = rtems_shell_wait_for_input (STDIN_FILENO,
+ 20,
+ notification,
+ NULL);
+ if (sc == RTEMS_SUCCESSFUL) {
+ rtems_shell_init ("SHLL",
+ RTEMS_MINIMUM_STACK_SIZE * 4,
+ 100,
+ "/dev/foobar",
+ false,
+ true,
+ NULL);
+ }
TEST_END();
@@ -116,7 +148,7 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (4U * 1024U))
#define CONFIGURE_INIT_TASK_ATTRIBUTES (RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT)
diff --git a/testsuites/libtests/dl11/dl-load.c b/testsuites/libtests/dl11/dl-load.c
new file mode 100644
index 0000000000..b09128acdf
--- /dev/null
+++ b/testsuites/libtests/dl11/dl-load.c
@@ -0,0 +1,207 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (C) 2023 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
+#include <errno.h>
+#include <stdio.h>
+#include "tmacros.h"
+#include <pthread.h>
+
+#include <dlfcn.h>
+
+#include "dl-load.h"
+
+#include <rtems/rtl/rtl-shell.h>
+#include <rtems/rtl/rtl-trace.h>
+
+#define TEST_TRACE 0
+#if TEST_TRACE
+ #define SHOW_GLOBAL_SYMS 1
+ #if SHOW_GLOBAL_SYMS
+ #define TRACE_GLOBAL_SYMBOL RTEMS_RTL_TRACE_GLOBAL_SYM
+ #else
+ #define TRACE_GLOBAL_SYMBOL 0
+ #endif
+ #define DEBUG_TRACE (RTEMS_RTL_TRACE_DETAIL | \
+ RTEMS_RTL_TRACE_WARNING | \
+ RTEMS_RTL_TRACE_LOAD | \
+ RTEMS_RTL_TRACE_UNLOAD | \
+ TRACE_GLOBAL_SYMBOL | \
+ RTEMS_RTL_TRACE_SYMBOL | \
+ RTEMS_RTL_TRACE_RELOC | \
+ RTEMS_RTL_TRACE_ALLOCATOR | \
+ RTEMS_RTL_TRACE_UNRESOLVED | \
+ RTEMS_RTL_TRACE_ARCHIVES | \
+ RTEMS_RTL_TRACE_DEPENDENCY)
+ #define DL_DEBUG_TRACE DEBUG_TRACE /* RTEMS_RTL_TRACE_ALL */
+ #define DL_RTL_CMDS 1
+#else
+ #define DL_DEBUG_TRACE 0
+ #define DL_RTL_CMDS 0
+#endif
+
+static void dl_load_dump (void)
+{
+#if DL_RTL_CMDS
+ char* list[] = { "rtl", "list", NULL };
+ char* sym[] = { "rtl", "sym", NULL };
+ printf ("RTL List:\n");
+ rtems_rtl_shell_command (2, list);
+ printf ("RTL Sym:\n");
+ rtems_rtl_shell_command (2, sym);
+#endif
+}
+
+typedef int (*int_call_t)(void);
+typedef int* (*ptr_call_t)(void);
+
+void* get_errno_ptr(void);
+int get_errno(void);
+
+int_call_t int_call;
+ptr_call_t ptr_call;
+static int perform_test(void)
+{
+ int int_call_ret;
+ int* ptr_call_ret;
+ ptr_call_ret = ptr_call ();
+ if (ptr_call_ret != get_errno_ptr())
+ {
+ printf("dlsym ptr_call failed: ret value bad\n");
+ return 1;
+ }
+
+ errno = 12345;
+ int_call_ret = int_call ();
+ if (int_call_ret != get_errno())
+ {
+ printf("dlsym int_call failed: ret value bad\n");
+ return 1;
+ }
+ errno = 0;
+
+ return 0;
+}
+
+static void *secondary_thread(void *arg)
+{
+ printf("Running test on secondary thread\n");
+ if (perform_test()) {
+ printf("Test failed on secondary task\n");
+ return (void *) 1;
+ }
+
+ return NULL;
+}
+
+static void start_secondary(void)
+{
+ /* Run the test on a secondary thread */
+ pthread_t threadId;
+ int status;
+ void *ret;
+ status = pthread_create( &threadId, NULL, secondary_thread, NULL );
+ rtems_test_assert( !status );
+
+ /* Wait on thread to exit */
+ status = pthread_join(threadId, &ret);
+ rtems_test_assert( !status );
+ rtems_test_assert( ret == NULL );
+}
+
+int dl_load_test(void)
+{
+ void* handle;
+ int unresolved;
+ char* message = "loaded";
+
+#if DL_DEBUG_TRACE
+ rtems_rtl_trace_set_mask (DL_DEBUG_TRACE);
+#endif
+
+ printf("load: /dl11-o1.o\n");
+
+ handle = dlopen ("/dl11-o1.o", RTLD_NOW | RTLD_GLOBAL);
+ if (!handle)
+ {
+ printf("dlopen failed: %s\n", dlerror());
+ return 1;
+ }
+
+ if (dlinfo (handle, RTLD_DI_UNRESOLVED, &unresolved) < 0)
+ message = "dlinfo error checking unresolved status";
+ else if (unresolved)
+ message = "has unresolved externals";
+
+ printf ("handle: %p %s\n", handle, message);
+
+ dl_load_dump ();
+
+ ptr_call = dlsym (handle, "get_errno_ptr");
+ if (ptr_call == NULL)
+ {
+ printf("dlsym failed: symbol get_errno_ptr not found\n");
+ return 1;
+ }
+
+ int_call = dlsym (handle, "get_errno_val");
+ if (int_call == NULL)
+ {
+ printf("dlsym failed: symbol get_errno_val not found\n");
+ return 1;
+ }
+
+ /* Run the test on the init thread */
+ printf("Running test on init task\n");
+ if (perform_test()) {
+ return 1;
+ }
+
+ start_secondary();
+
+ if (dlclose (handle) < 0)
+ {
+ printf("dlclose failed: %s\n", dlerror());
+ return 1;
+ }
+
+ printf ("handle: %p closed\n", handle);
+
+ return 0;
+}
+
+/*
+ * Disasseble these to see how the platform accesses TLS
+ */
+void* get_errno_ptr(void)
+{
+ return &errno;
+}
+
+int get_errno(void)
+{
+ return errno;
+}
diff --git a/testsuites/libtests/dl11/dl-load.h b/testsuites/libtests/dl11/dl-load.h
new file mode 100644
index 0000000000..142b195626
--- /dev/null
+++ b/testsuites/libtests/dl11/dl-load.h
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ *
+ * 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 OWNER 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.
+ */
+
+#if !defined(_DL_LOAD_H_)
+#define _DL_LOAD_H_
+
+int dl_load_test(void);
+
+#endif
diff --git a/testsuites/libtests/dl11/dl11-o1.c b/testsuites/libtests/dl11/dl11-o1.c
new file mode 100644
index 0000000000..93ee2a60c7
--- /dev/null
+++ b/testsuites/libtests/dl11/dl11-o1.c
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (C) 2023 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
+#include <errno.h>
+
+int get_errno_val (void);
+int *get_errno_ptr (void);
+
+int get_errno_val (void)
+{
+ return errno;
+}
+
+int *get_errno_ptr (void)
+{
+ return &errno;
+}
diff --git a/testsuites/libtests/dl11/dl11.doc b/testsuites/libtests/dl11/dl11.doc
new file mode 100644
index 0000000000..0fffe1cfd3
--- /dev/null
+++ b/testsuites/libtests/dl11/dl11.doc
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (C) 2023 On-Line Applications Research Corporation (OAR).
+#
+# 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 OWNER 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.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: dl11
+
+directives:
+
+ dlopen
+ dlinfo
+ dlsym
+ dlclose
+
+concepts:
+
++ Load a single ELF object file.
++ Check there are no unreolved externals.
++ Locate the get_errno_val and get_errno_ptr symbols.
++ Call the functions that use TLS variables and verify relocated symbols.
++ Unload the ELF file.
diff --git a/testsuites/libtests/dl11/dl11.scn b/testsuites/libtests/dl11/dl11.scn
new file mode 100644
index 0000000000..43048c91d2
--- /dev/null
+++ b/testsuites/libtests/dl11/dl11.scn
@@ -0,0 +1,6 @@
+*** BEGIN OF TEST libdl (RTL) 11 ***
+load: /dl11-o1.o
+handle: 0x40118e60 loaded
+handle: 0x40118e60 closed
+
+*** END OF TEST libdl (RTL) 11 ***
diff --git a/testsuites/libtests/dl11/init.c b/testsuites/libtests/dl11/init.c
new file mode 100644
index 0000000000..0ff4557421
--- /dev/null
+++ b/testsuites/libtests/dl11/init.c
@@ -0,0 +1,105 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (c) 2014 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tmacros.h"
+
+#include <errno.h>
+#include <string.h>
+#include <stdint.h>
+#include <unistd.h>
+
+#include <rtems/rtl/rtl.h>
+#include <rtems/imfs.h>
+
+#include "dl-load.h"
+
+const char rtems_test_name[] = "libdl (RTL) 11";
+
+/* forward declarations to avoid warnings */
+static rtems_task Init(rtems_task_argument argument);
+
+#include "dl11-tar.h"
+
+#define TARFILE_START dl11_tar
+#define TARFILE_SIZE dl11_tar_size
+
+static int test(void)
+{
+ int ret;
+ ret = dl_load_test();
+ if (ret)
+ rtems_test_exit(ret);
+ return 0;
+}
+
+static void Init(rtems_task_argument arg)
+{
+ int te;
+
+ TEST_BEGIN();
+
+ te = rtems_tarfs_load("/", (void *)TARFILE_START, (size_t)TARFILE_SIZE);
+ if (te != 0)
+ {
+ printf("untar failed: %d\n", te);
+ rtems_test_exit(1);
+ exit (1);
+ }
+
+ test();
+
+ TEST_END();
+
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 4
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_MAXIMUM_SEMAPHORES 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (4U * 1024U))
+
+#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/libtests/dumpbuf01/dumpbuf01.doc b/testsuites/libtests/dumpbuf01/dumpbuf01.doc
index 5249321e8e..1269733c47 100644
--- a/testsuites/libtests/dumpbuf01/dumpbuf01.doc
+++ b/testsuites/libtests/dumpbuf01/dumpbuf01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/dumpbuf01/init.c b/testsuites/libtests/dumpbuf01/init.c
index 45cf0c2f5a..e103990176 100644
--- a/testsuites/libtests/dumpbuf01/init.c
+++ b/testsuites/libtests/dumpbuf01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/exit01/init.c b/testsuites/libtests/exit01/init.c
index 9e2c61b493..0938cff025 100644
--- a/testsuites/libtests/exit01/init.c
+++ b/testsuites/libtests/exit01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2013 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/exit02/init.c b/testsuites/libtests/exit02/init.c
index f9be68b3b5..8d8e43c173 100644
--- a/testsuites/libtests/exit02/init.c
+++ b/testsuites/libtests/exit02/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2013 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/exit03/exit03.doc b/testsuites/libtests/exit03/exit03.doc
new file mode 100644
index 0000000000..c575ef40fb
--- /dev/null
+++ b/testsuites/libtests/exit03/exit03.doc
@@ -0,0 +1,11 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: exit03
+
+directives:
+
+ exit()
+
+concepts:
+
+ Ensure exit() in a C++ application works.
diff --git a/testsuites/libtests/exit03/exit03.scn b/testsuites/libtests/exit03/exit03.scn
new file mode 100644
index 0000000000..03d45a0c1f
--- /dev/null
+++ b/testsuites/libtests/exit03/exit03.scn
@@ -0,0 +1,5 @@
+caught exception
+IO on std::cout
+IO on std::cerr
+
+*** END OF TEST EXIT 3 ***
diff --git a/testsuites/libtests/exit03/init.c b/testsuites/libtests/exit03/init.c
new file mode 100644
index 0000000000..44acb35c6e
--- /dev/null
+++ b/testsuites/libtests/exit03/init.c
@@ -0,0 +1,122 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (c) 2022 Chris Johns (Contemporary Software). All rights reserved.
+ * Copyright (c) 2013 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tmacros.h"
+
+#include <stdlib.h>
+
+/* Use assert() not rtems_test_assert() since it uses exit() */
+#include <assert.h>
+
+#include <rtems.h>
+
+void cplusplus_stdio(void);
+
+const char rtems_test_name[] = "EXIT 3";
+
+#define EXIT_STATUS 123
+
+static int counter;
+
+static void atexit_0(void)
+{
+ assert(counter == 0);
+ ++counter;
+}
+
+static void fatal_extension(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code error
+)
+{
+ if (
+ source == RTEMS_FATAL_SOURCE_EXIT
+ && !always_set_to_false
+ && error == EXIT_STATUS
+ && counter == 1
+ ) {
+ TEST_END();
+ }
+}
+
+static void exit_task(rtems_task_argument arg)
+{
+ int rv;
+
+ rv = atexit(atexit_0);
+ assert(rv == 0);
+
+ cplusplus_stdio();
+
+ exit(EXIT_STATUS);
+}
+
+static void Init(rtems_task_argument arg)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ TEST_BEGIN();
+
+ sc = rtems_task_create(
+ rtems_build_name('E', 'X', 'I', 'T'),
+ RTEMS_MINIMUM_PRIORITY,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &id
+ );
+ assert(sc == RTEMS_SUCCESSFUL);
+
+ sc = rtems_task_start(id, exit_task, 0);
+ assert(sc == RTEMS_SUCCESSFUL);
+
+ rtems_task_exit();
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+
+#define CONFIGURE_INITIAL_EXTENSIONS \
+ { .fatal = fatal_extension }, \
+ RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_MAXIMUM_TASKS 2
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_MAXIMUM_POSIX_KEYS 2
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/libtests/exit03/stdio.cc b/testsuites/libtests/exit03/stdio.cc
new file mode 100644
index 0000000000..09f2f1951c
--- /dev/null
+++ b/testsuites/libtests/exit03/stdio.cc
@@ -0,0 +1,61 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (c) 2022 Chris Johns (Contemporary Software). All rights reserved.
+ * Copyright (c) 2013 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <exception>
+#include <iostream>
+
+extern "C" {
+void cplusplus_stdio(void);
+}
+
+static void throw_something() {
+ throw std::runtime_error("something");
+}
+
+static void throw_and_catch() {
+ try {
+ throw_something();
+ std::cout << "nothing caught exception" << std::endl;
+ } catch (std::runtime_error& e) {
+ std::cout << "caught exception" << std::endl;
+ }
+}
+
+void cplusplus_stdio(void) {
+ std::set_terminate([](){
+ std::cout << "FATAL: terminate called" << std::endl;
+ std::abort();
+ });
+ throw_and_catch();
+ std::cout << "IO on std::cout" << std::endl;
+ std::cerr << "IO on std::cerr" << std::endl;
+}
diff --git a/testsuites/libtests/flashdev01/flashdev01.doc b/testsuites/libtests/flashdev01/flashdev01.doc
new file mode 100644
index 0000000000..0638a5a842
--- /dev/null
+++ b/testsuites/libtests/flashdev01/flashdev01.doc
@@ -0,0 +1,11 @@
+This file describes the directives and concepts testd by this test set.
+
+test set name: flashdev01
+
+directives:
+
+ TBD
+
+concepts:
+
+ - Ensure that the flashdev driver API works.
diff --git a/testsuites/libtests/flashdev01/flashdev01.scn b/testsuites/libtests/flashdev01/flashdev01.scn
new file mode 100644
index 0000000000..809ff3cd80
--- /dev/null
+++ b/testsuites/libtests/flashdev01/flashdev01.scn
@@ -0,0 +1,2 @@
+*** BEGIN OF TEST FLASHDEV 1 ***
+*** END OF TEST FLASHDEV 1 ***
diff --git a/testsuites/libtests/flashdev01/init.c b/testsuites/libtests/flashdev01/init.c
new file mode 100644
index 0000000000..6ce9709496
--- /dev/null
+++ b/testsuites/libtests/flashdev01/init.c
@@ -0,0 +1,190 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2023 Aaron Nyholm
+ *
+ * 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 OWNER 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.
+ */
+
+#include "tmacros.h"
+
+#include "test_flashdev.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#define TEST_NAME_LENGTH 10
+
+#define TEST_DATA_SIZE (PAGE_SIZE * PAGE_COUNT)
+#define PAGE_COUNT 16
+#define PAGE_SIZE 128
+#define WB_SIZE 1
+
+const char rtems_test_name[] = "FLASHDEV 1";
+
+static void run_test(void);
+
+static void run_test(void) {
+
+ char buff[TEST_DATA_SIZE] = {0};
+ FILE *file;
+ int fd;
+ rtems_flashdev* flash;
+ int status;
+ char* read_data;
+ rtems_flashdev_region e_args;
+ rtems_flashdev_ioctl_page_info pg_info;
+ rtems_flashdev_region region;
+ uint32_t jedec;
+ int page_count;
+ int type;
+ size_t wb_size;
+
+ /* Initalize the flash device driver and flashdev */
+ flash = test_flashdev_init();
+ rtems_test_assert(flash != NULL);
+
+ /* Register the flashdev as a device */
+ status = rtems_flashdev_register(flash, "dev/flashdev0");
+ rtems_test_assert(!status);
+
+ /* Open the flashdev */
+ file = fopen("dev/flashdev0", "r+");
+ rtems_test_assert(file != NULL);
+ fd = fileno(file);
+
+ /* Read data from flash */
+ read_data = fgets(buff, TEST_DATA_SIZE, file);
+ rtems_test_assert(read_data != NULL);
+
+ /* Fseek to start of flash */
+ status = fseek(file, 0x0, SEEK_SET);
+ rtems_test_assert(!status);
+
+ /* Write the test name to the flash */
+ status = fwrite(rtems_test_name, TEST_NAME_LENGTH, 1, file);
+ rtems_test_assert(status == 1);
+
+ /* Fseek to start of flash and read again */
+ status = fseek(file, 0x0, SEEK_SET);
+ rtems_test_assert(!status);
+ fgets(buff, TEST_DATA_SIZE, file);
+ rtems_test_assert(!strncmp(buff, rtems_test_name, TEST_NAME_LENGTH));
+
+ /* Test Erasing */
+ e_args.offset = 0x0;
+ e_args.size = PAGE_SIZE;
+ status = ioctl(fd, RTEMS_FLASHDEV_IOCTL_ERASE, &e_args);
+ rtems_test_assert(!status);
+
+ fseek(file, 0x0, SEEK_SET);
+ fgets(buff, TEST_DATA_SIZE, file);
+ rtems_test_assert(buff[0] == 0);
+
+ /* Test getting JEDEC ID */
+ status = ioctl(fd, RTEMS_FLASHDEV_IOCTL_JEDEC_ID, &jedec);
+ rtems_test_assert(!status);
+ rtems_test_assert(jedec == 0x00ABCDEF);
+
+ /* Test getting flash type */
+ status = ioctl(fd, RTEMS_FLASHDEV_IOCTL_TYPE, &type);
+ rtems_test_assert(!status);
+ rtems_test_assert(type == RTEMS_FLASHDEV_NOR);
+
+ /* Test getting page info from offset */
+ pg_info.location = PAGE_SIZE + PAGE_SIZE/2;
+
+ status = ioctl(fd, RTEMS_FLASHDEV_IOCTL_PAGEINFO_BY_OFFSET, &pg_info);
+ rtems_test_assert(!status);
+ rtems_test_assert(pg_info.page_info.offset == PAGE_SIZE);
+ rtems_test_assert(pg_info.page_info.size == PAGE_SIZE);
+
+ /* Test getting page info from index */
+ pg_info.location = 2;
+ status = ioctl(fd, RTEMS_FLASHDEV_IOCTL_PAGEINFO_BY_INDEX, &pg_info);
+ rtems_test_assert(!status);
+ rtems_test_assert(pg_info.page_info.offset == 2*PAGE_SIZE);
+ rtems_test_assert(pg_info.page_info.size == PAGE_SIZE);
+
+ /* Test getting page count */
+ status = ioctl(fd, RTEMS_FLASHDEV_IOCTL_PAGE_COUNT, &page_count);
+ rtems_test_assert(!status);
+ rtems_test_assert(page_count == PAGE_COUNT);
+
+ /* Test getting write block size */
+ status = ioctl(fd, RTEMS_FLASHDEV_IOCTL_WRITE_BLOCK_SIZE, &wb_size);
+ rtems_test_assert(!status);
+ rtems_test_assert(wb_size == WB_SIZE);
+
+ /* Test Regions */
+ region.offset = 0x400;
+ region.size = 0x200;
+ status = ioctl(fd, RTEMS_FLASHDEV_IOCTL_REGION_SET, &region);
+ rtems_test_assert(!status);
+
+ /* Test read to larger then region */
+ fseek(file, 0x0, SEEK_SET);
+ read_data = fgets(buff, 2048, file);
+ rtems_test_assert(read_data == NULL);
+
+ /* Test fseek outside of region */
+ status = fseek(file, 0x201, SEEK_SET);
+ rtems_test_assert(status);
+
+ /* Write to base unset region and check the writes location */
+ fseek(file, 0x0, SEEK_SET);
+ fwrite("HELLO WORLD", 11, 1, file);
+ ioctl(fd, RTEMS_FLASHDEV_IOCTL_REGION_UNSET, NULL);
+ fseek(file, 0x400, SEEK_SET);
+ fgets(buff, 11, file);
+ rtems_test_assert(strncmp(buff, "HELLO WORLD", 11));
+}
+
+static void Init(rtems_task_argument arg)
+{
+ TEST_BEGIN();
+
+ run_test();
+
+ TEST_END();
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_MICROSECONDS_PER_TICK 2000
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 7
+
+#define CONFIGURE_MAXIMUM_TASKS 2
+
+#define CONFIGURE_MAXIMUM_SEMAPHORES 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/libtests/flashdev01/test_flashdev.c b/testsuites/libtests/flashdev01/test_flashdev.c
new file mode 100644
index 0000000000..708d708977
--- /dev/null
+++ b/testsuites/libtests/flashdev01/test_flashdev.c
@@ -0,0 +1,275 @@
+/*
+ * Copyright (C) 2023 Aaron Nyholm
+ *
+ * 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 OWNER 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.
+ */
+
+#include "test_flashdev.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <rtems/seterr.h>
+
+#define TEST_DATA_SIZE (PAGE_SIZE * PAGE_COUNT)
+#define PAGE_COUNT 16
+#define PAGE_SIZE 128
+#define WB_SIZE 1
+#define MAX_NUM_REGIONS 48
+#define BITALLOC_SIZE 32
+#define NUM_BITALLOC ((MAX_NUM_REGIONS + BITALLOC_SIZE - 1) / BITALLOC_SIZE)
+
+/**
+ * This flash device driver is for testing flashdev
+ * API calls.
+ */
+typedef struct test_flashdev {
+ char* data;
+ uint32_t jedec_id;
+ uint32_t bit_allocator[NUM_BITALLOC];
+ rtems_flashdev_region regions[MAX_NUM_REGIONS];
+} test_flashdev;
+
+int test_flashdev_page_by_off(
+ rtems_flashdev *flash,
+ off_t search_offset,
+ off_t *page_offset,
+ size_t *page_size
+);
+
+int test_flashdev_page_by_index(
+ rtems_flashdev *flash,
+ off_t search_index,
+ off_t *page_offset,
+ size_t *page_size
+);
+
+int test_flashdev_page_count(
+ rtems_flashdev *flash,
+ int *page_count
+);
+
+int test_flashdev_wb_size(
+ rtems_flashdev *flash,
+ size_t *write_block_size
+);
+
+uint32_t test_flashdev_jedec_id(
+ rtems_flashdev* flash
+);
+
+int test_flashdev_type(
+ rtems_flashdev* flash,
+ rtems_flashdev_flash_type* type
+);
+
+int test_flashdev_read(
+ rtems_flashdev* flash,
+ uintptr_t offset,
+ size_t count,
+ void* buffer
+);
+
+int test_flashdev_write(
+ rtems_flashdev* flash,
+ uintptr_t offset,
+ size_t count,
+ const void* buffer
+);
+
+int test_flashdev_erase(
+ rtems_flashdev* flash,
+ uintptr_t offset,
+ size_t count
+);
+
+/* Find page info by offset handler */
+int test_flashdev_page_by_off(
+ rtems_flashdev *flash,
+ off_t search_offset,
+ off_t *page_offset,
+ size_t *page_size
+)
+{
+ *page_offset = search_offset - (search_offset%PAGE_SIZE);
+ *page_size = PAGE_SIZE;
+ return 0;
+}
+
+/* Find page by index handler */
+int test_flashdev_page_by_index(
+ rtems_flashdev *flash,
+ off_t search_index,
+ off_t *page_offset,
+ size_t *page_size
+)
+{
+ *page_offset = search_index * PAGE_SIZE;
+ *page_size = PAGE_SIZE;
+ return 0;
+}
+
+/* Page count handler */
+int test_flashdev_page_count(
+ rtems_flashdev *flash,
+ int *page_count
+)
+{
+ *page_count = PAGE_COUNT;
+ return 0;
+}
+
+/* Write block size handler */
+int test_flashdev_wb_size(
+ rtems_flashdev *flash,
+ size_t *write_block_size
+)
+{
+ *write_block_size = WB_SIZE;
+ return 0;
+}
+
+/* JEDEC ID handler, this would normally require a READID
+ * call to the physical flash device.
+ */
+uint32_t test_flashdev_jedec_id(
+ rtems_flashdev* flash
+)
+{
+ test_flashdev* driver = flash->driver;
+ return driver->jedec_id;
+}
+
+/* Function to identify what kind of flash is attached. */
+int test_flashdev_type(
+ rtems_flashdev *flash,
+ rtems_flashdev_flash_type *type
+)
+{
+ *type = RTEMS_FLASHDEV_NOR;
+ return 0;
+}
+
+/* Read flash call. Any offset or count protections are
+ * required to be done in the driver function. */
+int test_flashdev_read(
+ rtems_flashdev* flash,
+ uintptr_t offset,
+ size_t count,
+ void* buffer
+)
+{
+ test_flashdev* driver = flash->driver;
+
+ if (offset + count > TEST_DATA_SIZE) {
+ rtems_set_errno_and_return_minus_one( EINVAL );
+ }
+
+ memcpy(buffer, &driver->data[offset], count);
+ return 0;
+}
+
+/* Write Flash call. Any offset or count protections are
+ * required to be done in the driver function. */
+int test_flashdev_write(
+ rtems_flashdev* flash,
+ uintptr_t offset,
+ size_t count,
+ const void* buffer
+)
+{
+ test_flashdev* driver = flash->driver;
+
+ if (offset + count > TEST_DATA_SIZE) {
+ rtems_set_errno_and_return_minus_one( EINVAL );
+ }
+
+ memcpy(&driver->data[offset], buffer, count);
+ return 0;
+}
+
+/* Erase Flash call. Any offset or count protections are
+ * required to be done in the driver function. */
+int test_flashdev_erase(
+ rtems_flashdev* flash,
+ uintptr_t offset,
+ size_t count
+)
+{
+ test_flashdev* driver = flash->driver;
+
+ if (offset + count > TEST_DATA_SIZE) {
+ rtems_set_errno_and_return_minus_one( EINVAL );
+ }
+
+ if (offset%PAGE_SIZE || count%PAGE_SIZE) {
+ rtems_set_errno_and_return_minus_one( EINVAL );
+ }
+
+ memset(&driver->data[offset], 0, count);
+ return 0;
+}
+
+/* Initialize Flashdev and underlying driver. */
+rtems_flashdev* test_flashdev_init(void)
+{
+ rtems_flashdev *flash = rtems_flashdev_alloc_and_init(sizeof(rtems_flashdev));
+
+ if (flash == NULL) {
+ return NULL;
+ }
+
+ test_flashdev* flash_driver = calloc(1, sizeof(test_flashdev));
+
+ if (flash_driver == NULL) {
+ rtems_flashdev_destroy_and_free(flash);
+ return NULL;
+ }
+
+ flash_driver->data = calloc(1, TEST_DATA_SIZE);
+ if (flash_driver->data == NULL) {
+ free(flash_driver);
+ rtems_flashdev_destroy_and_free(flash);
+ return NULL;
+ }
+
+ flash_driver->jedec_id = 0x00ABCDEF;
+
+ rtems_flashdev_region_table *ftable = calloc(1, sizeof(rtems_flashdev_region_table));
+ ftable->max_regions = MAX_NUM_REGIONS;
+ ftable->regions = flash_driver->regions;
+ ftable->bit_allocator = flash_driver->bit_allocator;
+
+ flash->driver = flash_driver;
+ flash->read = &test_flashdev_read;
+ flash->write = &test_flashdev_write;
+ flash->erase = &test_flashdev_erase;
+ flash->jedec_id = &test_flashdev_jedec_id;
+ flash->flash_type = &test_flashdev_type;
+ flash->page_info_by_offset = &test_flashdev_page_by_off;
+ flash->page_info_by_index = &test_flashdev_page_by_index;
+ flash->page_count = &test_flashdev_page_count;
+ flash->write_block_size = &test_flashdev_wb_size;
+ flash->region_table = ftable;
+
+ return flash;
+}
diff --git a/testsuites/libtests/flashdev01/test_flashdev.h b/testsuites/libtests/flashdev01/test_flashdev.h
new file mode 100644
index 0000000000..8b03959c42
--- /dev/null
+++ b/testsuites/libtests/flashdev01/test_flashdev.h
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (C) 2023 Aaron Nyholm
+ *
+ * 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 OWNER 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.
+ */
+
+#ifndef __TEST_FLASHDEV_H
+#define __TEST_FLASHDEV_H
+
+#include <dev/flash/flashdev.h>
+
+rtems_flashdev* test_flashdev_init(void);
+
+#endif /* __TEST_FLASHDEV_H */
diff --git a/testsuites/libtests/flashdisk01/flashdisk01.doc b/testsuites/libtests/flashdisk01/flashdisk01.doc
index 9c2e8b594a..a3c4906784 100644
--- a/testsuites/libtests/flashdisk01/flashdisk01.doc
+++ b/testsuites/libtests/flashdisk01/flashdisk01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/flashdisk01/init.c b/testsuites/libtests/flashdisk01/init.c
index b85279aa6b..da9fc2a5b5 100644
--- a/testsuites/libtests/flashdisk01/init.c
+++ b/testsuites/libtests/flashdisk01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/flashdisk01/test-file-system.c b/testsuites/libtests/flashdisk01/test-file-system.c
index 206202008c..f8c87fb8ad 100644
--- a/testsuites/libtests/flashdisk01/test-file-system.c
+++ b/testsuites/libtests/flashdisk01/test-file-system.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2010-2012 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2010, 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <info@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "test-file-system.h"
diff --git a/testsuites/libtests/flashdisk01/test-file-system.h b/testsuites/libtests/flashdisk01/test-file-system.h
index ff7b807ab9..b592ac7dca 100644
--- a/testsuites/libtests/flashdisk01/test-file-system.h
+++ b/testsuites/libtests/flashdisk01/test-file-system.h
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2010-2012 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2010, 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <info@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef TEST_FILE_SYSTEM_H
diff --git a/testsuites/libtests/getentropy01/init.c b/testsuites/libtests/getentropy01/init.c
index 4986ddfa86..afdd0c88c1 100644
--- a/testsuites/libtests/getentropy01/init.c
+++ b/testsuites/libtests/getentropy01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/gxx01/gxx01.doc b/testsuites/libtests/gxx01/gxx01.doc
deleted file mode 100644
index 568e26f49a..0000000000
--- a/testsuites/libtests/gxx01/gxx01.doc
+++ /dev/null
@@ -1,33 +0,0 @@
-# COPYRIGHT (c) 1989-2010.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: gxx01
-
-directives:
-
- rtems_gxx_once
- rtems_gxx_key_create
- rtems_gxx_key_delete
- rtems_gxx_getspecific
- rtems_gxx_setspecific
- rtems_gxx_mutex_init
- rtems_gxx_mutex_lock
- rtems_gxx_mutex_destroy
- rtems_gxx_mutex_trylock
- rtems_gxx_mutex_unlock
- rtems_gxx_recursive_mutex_init
- rtems_gxx_recursive_mutex_lock
- rtems_gxx_recursive_mutex_trylock
- rtems_gxx_recursive_mutex_unlock
-
-concepts:
-
-+ Fully exercise wrappers provided by RTEMS for GCC's C++ library's
- mutual exclusion implementation.
diff --git a/testsuites/libtests/gxx01/gxx01.scn b/testsuites/libtests/gxx01/gxx01.scn
deleted file mode 100644
index f831881fa3..0000000000
--- a/testsuites/libtests/gxx01/gxx01.scn
+++ /dev/null
@@ -1,35 +0,0 @@
-*** TEST GXX 01 ***
-rtems_gxx_mutex_init() - OK
-rtems_gxx_mutex_trylock() - OK
-rtems_gxx_mutex_unlock() - OK
-rtems_gxx_mutex_lock() - OK
-rtems_gxx_mutex_unlock() - OK
-
-rtems_gxx_recursive_mutex_init() - OK
-rtems_gxx_recursive_mutex_trylock() - OK
-rtems_gxx_recursive_mutex_trylock() - Nest
-rtems_gxx_recursive_mutex_unlock() - Unnest
-rtems_gxx_recursive_mutex_unlock() - OK
-rtems_gxx_recursive_mutex_lock() - OK
-rtems_gxx_recursive_mutex_unlock() - OK
-rtems_gxx_mutex_destroy(mutex) - OK
-rtems_gxx_mutex_destroy(mutex) - NOT OK
-
-Call once method the first time
-Running once method
-Call once method the second time
-
-rtems_gxx_key_create(&key, NULL) - OK
-rtems_gxx_key_delete(key) - OK
-rtems_gxx_key_create(&key, key_dtor) - OK
-rtems_gxx_getspecific(key) not set - OK
-rtems_gxx_setspecific(key, 0x1234) - OK
-rtems_gxx_getspecific(key) already existing - OK
-rtems_gxx_key_delete(key) - OK
-rtems_gxx_getspecific(key) non-existent - OK
-rtems_gxx_key_delete(key) - NOT OK
-rtems_gxx_setspecific(NULL, 0x1234) - NOT OK
-rtems_gxx_getspecific(NULL) - OK
-rtems_gxx_key_delete(NULL) - NOT OK
-
-*** END OF TEST GXX 01 ***
diff --git a/testsuites/libtests/gxx01/init.c b/testsuites/libtests/gxx01/init.c
deleted file mode 100644
index 306e4f1f0b..0000000000
--- a/testsuites/libtests/gxx01/init.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2012.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <errno.h>
-#include <tmacros.h>
-#include "test_support.h"
-#include <rtems/gxx_wrappers.h>
-
-const char rtems_test_name[] = "GXX 1";
-
-/* forward declarations to avoid warnings */
-rtems_task Init(rtems_task_argument argument);
-void test_recursive_mutex(void);
-void test_mutex(void);
-void once_function(void);
-void test_once(void);
-void key_dtor(void *ptr);
-void test_key(void);
-
-void test_recursive_mutex(void)
-{
- int sc;
- __gthread_mutex_t mutex;
-
- mutex = 0;
- puts( "rtems_gxx_recursive_mutex_init() - OK" );
- rtems_gxx_recursive_mutex_init(&mutex);
- rtems_test_assert( mutex != 0 );
-
- puts( "rtems_gxx_recursive_mutex_trylock() - OK" );
- sc = rtems_gxx_recursive_mutex_trylock(&mutex);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_recursive_mutex_trylock() - Nest" );
- sc = rtems_gxx_recursive_mutex_trylock(&mutex);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_recursive_mutex_unlock() - Unnest" );
- sc = rtems_gxx_recursive_mutex_unlock(&mutex);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_recursive_mutex_unlock() - OK" );
- sc = rtems_gxx_recursive_mutex_unlock(&mutex);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_recursive_mutex_lock() - OK" );
- sc = rtems_gxx_recursive_mutex_lock(&mutex);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_recursive_mutex_unlock() - OK" );
- sc = rtems_gxx_recursive_mutex_unlock(&mutex);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_mutex_destroy(mutex) - OK" );
- sc = rtems_gxx_mutex_destroy(&mutex);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_mutex_destroy(mutex) - NOT OK" );
- sc = rtems_gxx_mutex_destroy(&mutex);
- rtems_test_assert( sc == -1 );
-}
-
-void test_mutex(void)
-{
- int sc;
- __gthread_mutex_t mutex;
-
- mutex = 0;
- puts( "rtems_gxx_mutex_init() - OK" );
- rtems_gxx_mutex_init(&mutex);
- rtems_test_assert( mutex != 0 );
-
- puts( "rtems_gxx_mutex_trylock() - OK" );
- sc = rtems_gxx_mutex_trylock(&mutex);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_mutex_unlock() - OK" );
- sc = rtems_gxx_mutex_unlock(&mutex);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_mutex_lock() - OK" );
- sc = rtems_gxx_mutex_lock(&mutex);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_mutex_unlock() - OK" );
- sc = rtems_gxx_mutex_unlock(&mutex);
- rtems_test_assert( sc == 0 );
-}
-
-void once_function(void)
-{
- puts( "Running once method" );
-}
-
-void test_once(void)
-{
- __gthread_once_t once;
- int sc;
-
- once = 0;
-
- puts( "Call once method the first time" );
- sc = rtems_gxx_once(&once, once_function);
- rtems_test_assert( sc == 0 );
-
- puts( "Call once method the second time" );
- sc = rtems_gxx_once(&once, once_function);
- rtems_test_assert( sc == 0 );
-}
-
-volatile bool key_dtor_ran;
-
-void key_dtor(void *ptr)
-{
- key_dtor_ran = true;
-}
-
-void test_key(void)
-{
- int sc;
- __gthread_key_t key;
- void *p;
-
- puts( "rtems_gxx_key_create(&key, NULL) - OK" );
- sc = rtems_gxx_key_create(&key, NULL);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_key_delete(key) - OK" );
- sc = rtems_gxx_key_delete(key);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_key_create(&key, key_dtor) - OK" );
- sc = rtems_gxx_key_create(&key, key_dtor);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_getspecific(key) not set - OK" );
- p = rtems_gxx_getspecific(key);
- rtems_test_assert( p == NULL );
-
- puts( "rtems_gxx_setspecific(key, 0x1234) - OK" );
- sc = rtems_gxx_setspecific(key, (void *)0x1234);
- rtems_test_assert( sc == 0 );
-
- puts( "rtems_gxx_getspecific(key) already existing - OK" );
- p = rtems_gxx_getspecific(key);
- rtems_test_assert( p == (void *)0x1234 );
-
- puts( "rtems_gxx_key_delete(key) - OK" );
- sc = rtems_gxx_key_delete(key);
- rtems_test_assert( sc == 0 );
- /* pthread_key man-page: the dtor should _not_ be called */
- rtems_test_assert( key_dtor_ran != true );
-
- key = calloc( 1, sizeof( *key ) );
- rtems_test_assert( key != NULL );
-
- puts( "rtems_gxx_getspecific(key) non-existent - OK" );
- p = rtems_gxx_getspecific( key );
- rtems_test_assert( p == NULL );
-
- puts( "rtems_gxx_key_delete(key) - NOT OK" );
- sc = rtems_gxx_key_delete( key );
- rtems_test_assert( sc != 0 );
-
- puts( "rtems_gxx_setspecific(NULL, 0x1234) - NOT OK" );
- sc = rtems_gxx_setspecific( NULL, (void *)0x1234 );
- rtems_test_assert( sc == EINVAL );
-
- puts( "rtems_gxx_getspecific(NULL) - OK" );
- p = rtems_gxx_getspecific( NULL );
- rtems_test_assert( p == NULL );
-
- puts( "rtems_gxx_key_delete(NULL) - NOT OK" );
- sc = rtems_gxx_key_delete( NULL );
- rtems_test_assert( sc == EINVAL );
-}
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- TEST_BEGIN();
-
- test_mutex();
- puts( "" );
-
- test_recursive_mutex();
- puts( "" );
-
- test_once();
- puts( "" );
-
- test_key();
- puts( "" );
-
- TEST_END();
-
- rtems_test_exit( 0 );
-}
-
-/* configuration information */
-
-#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 1
-#define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS 1
-
-#define CONFIGURE_MAXIMUM_TASKS 1
-#define CONFIGURE_MAXIMUM_SEMAPHORES 2
-#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_INIT
-
-#include <rtems/confdefs.h>
-/* end of file */
diff --git a/testsuites/libtests/heapwalk/init.c b/testsuites/libtests/heapwalk/init.c
index cd5caaa852..2864feac28 100644
--- a/testsuites/libtests/heapwalk/init.c
+++ b/testsuites/libtests/heapwalk/init.c
@@ -1,14 +1,33 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Test of Heap Walker
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * Copyright (c) 2009 embedded brains GmbH.
+ * Copyright (c) 2009 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/heapwalk/system.h b/testsuites/libtests/heapwalk/system.h
index 53a13fc1d6..adf3f4a678 100644
--- a/testsuites/libtests/heapwalk/system.h
+++ b/testsuites/libtests/heapwalk/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/libtests/i2c01/init.c b/testsuites/libtests/i2c01/init.c
index c71b78c275..452bea4ac1 100644
--- a/testsuites/libtests/i2c01/init.c
+++ b/testsuites/libtests/i2c01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/irqs01/init.c b/testsuites/libtests/irqs01/init.c
index ab7ca926ca..604aaf1f22 100644
--- a/testsuites/libtests/irqs01/init.c
+++ b/testsuites/libtests/irqs01/init.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/libfdt01/init.c b/testsuites/libtests/libfdt01/init.c
index b1568d9c04..6f369daf82 100644
--- a/testsuites/libtests/libfdt01/init.c
+++ b/testsuites/libtests/libfdt01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/libfdt01/some.c b/testsuites/libtests/libfdt01/some.c
index 5eed911204..d5d8b7a285 100644
--- a/testsuites/libtests/libfdt01/some.c
+++ b/testsuites/libtests/libfdt01/some.c
@@ -4,9 +4,9 @@
* WARNING: Automatically generated -- do not edit!
*/
-#include <sys/types.h>
+#include <rtems.h>
-const unsigned char some_bin[] = {
+RTEMS_ALIGNED(8) const unsigned char some_bin[] = {
0xd0, 0x0d, 0xfe, 0xed, 0x00, 0x00, 0x01, 0xd8, 0x00, 0x00, 0x00, 0x38,
0x00, 0x00, 0x01, 0x90, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x11,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48,
diff --git a/testsuites/libtests/libfdt01/some.dts b/testsuites/libtests/libfdt01/some.dts
index ac15825b17..c4c7d926c6 100644
--- a/testsuites/libtests/libfdt01/some.dts
+++ b/testsuites/libtests/libfdt01/some.dts
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/dts-v1/;
diff --git a/testsuites/libtests/malloc02/init.c b/testsuites/libtests/malloc02/init.c
index 6db32478e7..bce3c9b5a1 100644
--- a/testsuites/libtests/malloc02/init.c
+++ b/testsuites/libtests/malloc02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/malloc02/malloc02.doc b/testsuites/libtests/malloc02/malloc02.doc
index 2c44a2b2eb..6296ff2c73 100644
--- a/testsuites/libtests/malloc02/malloc02.doc
+++ b/testsuites/libtests/malloc02/malloc02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/malloc03/init.c b/testsuites/libtests/malloc03/init.c
index 89c147b1b6..8ada7ba4b3 100644
--- a/testsuites/libtests/malloc03/init.c
+++ b/testsuites/libtests/malloc03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/malloc03/malloc03.doc b/testsuites/libtests/malloc03/malloc03.doc
index 2ad50c7e52..83c7dd1453 100644
--- a/testsuites/libtests/malloc03/malloc03.doc
+++ b/testsuites/libtests/malloc03/malloc03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/malloc04/init.c b/testsuites/libtests/malloc04/init.c
index 51d318850b..a9894d59fd 100644
--- a/testsuites/libtests/malloc04/init.c
+++ b/testsuites/libtests/malloc04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -78,16 +97,23 @@ rtems_task Init(
)
{
Heap_Control *real_heap;
- Memory_Area area;
- Memory_Information mem = {
- .count = 1,
- .areas = &area
- };
+ const Memory_Information *mem;
+ Memory_Area *area;
+ size_t i;
void *p;
TEST_BEGIN();
+ mem = _Memory_Get();
+
+ for ( i = 0; i < _Memory_Get_count( mem ); ++i ) {
+ area = _Memory_Get_area( mem, i );
+ _Memory_Initialize( area, NULL, NULL );
+ }
+
+ area = _Memory_Get_area( mem, 0 );
+
/* Safe information on real heap */
real_heap = malloc_get_heap_pointer();
malloc_set_heap_pointer( &TempHeap );
@@ -98,8 +124,8 @@ rtems_task Init(
sbrk_count = 0;
offset = 256;
- _Memory_Initialize_by_size( &area, &Malloc_Heap[ 0 ], offset );
- RTEMS_Malloc_Initialize( &mem, NULL );
+ _Memory_Initialize_by_size( area, &Malloc_Heap[ 0 ], offset );
+ _Malloc_Initialize();
errno = 0;
p = malloc( 256 );
@@ -113,8 +139,8 @@ rtems_task Init(
sbrk_count = 0;
offset = 256;
- _Memory_Initialize_by_size( &area, &Malloc_Heap[ 0 ], offset );
- RTEMS_Malloc_Initialize( &mem, NULL );
+ _Memory_Initialize_by_size( area, &Malloc_Heap[ 0 ], offset );
+ _Malloc_Initialize();
p = malloc(1);
rtems_test_assert( p != NULL );
@@ -128,8 +154,8 @@ rtems_task Init(
sbrk_count = 0;
offset = 256;
- _Memory_Initialize_by_size( &area, &Malloc_Heap[ 0 ], offset );
- RTEMS_Malloc_Initialize( &mem, NULL );
+ _Memory_Initialize_by_size( area, &Malloc_Heap[ 0 ], offset );
+ _Malloc_Initialize();
errno = 0;
p = malloc( sizeof( Malloc_Heap ) );
@@ -141,8 +167,8 @@ rtems_task Init(
sbrk_count = 0;
offset = 256;
- _Memory_Initialize_by_size( &area, &Malloc_Heap[ 0 ], offset );
- RTEMS_Malloc_Initialize( &mem, NULL );
+ _Memory_Initialize_by_size( area, &Malloc_Heap[ 0 ], offset );
+ _Malloc_Initialize();
p = malloc( 128 );
rtems_test_assert( p != NULL );
@@ -156,8 +182,8 @@ rtems_task Init(
sbrk_count = -1;
offset = 256;
- _Memory_Initialize_by_size( &area, &Malloc_Heap[ 0 ], offset );
- RTEMS_Malloc_Initialize( &mem, NULL );
+ _Memory_Initialize_by_size( area, &Malloc_Heap[ 0 ], offset );
+ _Malloc_Initialize();
errno = 0;
p = malloc( 256 );
diff --git a/testsuites/libtests/malloc04/malloc04.doc b/testsuites/libtests/malloc04/malloc04.doc
index 6199e85cc3..9936e505d6 100644
--- a/testsuites/libtests/malloc04/malloc04.doc
+++ b/testsuites/libtests/malloc04/malloc04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c
index a33764177d..d72f49112e 100644
--- a/testsuites/libtests/malloctest/init.c
+++ b/testsuites/libtests/malloctest/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011, 2014.
* On-Line Applications Research Corporation (OAR).
*
- * Copyright (c) 2009, 2016 embedded brains GmbH.
+ * Copyright (C) 2009, 2016 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -41,8 +60,15 @@ static void test_realloc(void)
for (i=2 ; i<2048 ; i++) {
p2 = realloc(p1, i);
if (p2 != p1)
+/*
+ * This was added to address the following warning.
+ * warning: pointer 'p1' may be used after 'realloc'
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuse-after-free"
printf( "realloc - failed grow in place: "
"%p != realloc(%p,%zu)\n", p1, p2, i);
+#pragma GCC diagnostic pop
p1 = p2;
}
free(p1);
@@ -52,8 +78,15 @@ static void test_realloc(void)
for (i=2047 ; i>=1; i--) {
p2 = realloc(p1, i);
if (p2 != p1)
- printf( "realloc - failed shrink in place: "
+/*
+ * This was added to address the following warning.
+ * warning: pointer 'p1' may be used after 'realloc'
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuse-after-free"
+ printf( "realloc - failed shrink in place: "
"%p != realloc(%p,%zu)\n", p1, p2, i);
+#pragma GCC diagnostic pop
p1 = p2;
}
free(p1);
@@ -65,8 +98,15 @@ static void test_realloc(void)
p2 = malloc(32);
p3 = realloc(p1, 64);
if (p3 == p1 || p3 == NULL)
- printf(
+/*
+ * This was added to address the following warning.
+ * warning: pointer may be used after 'realloc'
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuse-after-free"
+ printf(
"realloc - failed non-in place: realloc(%p,%d) = %p\n", p1, 64, p3);
+#pragma GCC diagnostic pop
free(p3);
free(p2);
@@ -103,7 +143,14 @@ static void test_realloc(void)
/*
* Realloc with a bad pointer to force a point
*/
- p4 = realloc( test_realloc, 32 );
+/*
+ * This was added to address the following warning.
+ * warning: 'realloc' called on unallocated object
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
+ p4 = realloc( test_realloc, 32 );
+#pragma GCC diagnostic pop
p4 = _realloc_r( NULL, NULL, 1 );
}
@@ -122,9 +169,13 @@ static void test_heap_default_init(void)
static void test_free( void *addr )
{
+ uint32_t failed_allocs;
+
rtems_test_assert( _Heap_Free( &TestHeap, addr ) );
+ failed_allocs = TestHeap.stats.failed_allocs;
_Heap_Protection_free_all_delayed_blocks( &TestHeap );
+ rtems_test_assert( failed_allocs == TestHeap.stats.failed_allocs );
}
static void test_heap_cases_1(void)
@@ -1505,8 +1556,15 @@ static void test_early_malloc( void )
free( q );
+/*
+ * This was added to address the following warning.
+ * warning: pointer 'q' used after 'free'
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuse-after-free"
r = realloc( q, 128 );
rtems_test_assert( r == q );
+#pragma GCC diagnostic pop
s = malloc( 1 );
rtems_test_assert( s != NULL );
diff --git a/testsuites/libtests/malloctest/system.h b/testsuites/libtests/malloctest/system.h
index 53a13fc1d6..adf3f4a678 100644
--- a/testsuites/libtests/malloctest/system.h
+++ b/testsuites/libtests/malloctest/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/libtests/malloctest/task1.c b/testsuites/libtests/malloctest/task1.c
index 753a74e77a..4feb338b87 100644
--- a/testsuites/libtests/malloctest/task1.c
+++ b/testsuites/libtests/malloctest/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* task1.c
*
* This set of three tasks do some simple task switching for about
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -34,7 +53,7 @@ rtems_task Task_1_through_5(
unsigned char *mem_ptr;
int mem_amt;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident" );
while (TRUE)
diff --git a/testsuites/libtests/math/init.c b/testsuites/libtests/math/init.c
index a5f6802b00..3fedb5546a 100644
--- a/testsuites/libtests/math/init.c
+++ b/testsuites/libtests/math/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -13,9 +15,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/mathf/init.c b/testsuites/libtests/mathf/init.c
index 143ac63f1a..d63509dbc3 100644
--- a/testsuites/libtests/mathf/init.c
+++ b/testsuites/libtests/mathf/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -13,9 +15,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/mathl/init.c b/testsuites/libtests/mathl/init.c
index fb390bb2c2..2605fdb8e3 100644
--- a/testsuites/libtests/mathl/init.c
+++ b/testsuites/libtests/mathl/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -13,9 +15,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/md501/init.c b/testsuites/libtests/md501/init.c
index da14ea4d7a..e388f082b2 100644
--- a/testsuites/libtests/md501/init.c
+++ b/testsuites/libtests/md501/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/monitor/init.c b/testsuites/libtests/monitor/init.c
index 6fe78a144f..fcdea9d144 100644
--- a/testsuites/libtests/monitor/init.c
+++ b/testsuites/libtests/monitor/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This is a simple test whose only purpose is to start the Monitor
* task. The Monitor task can be used to obtain information about
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/monitor/monitor.doc b/testsuites/libtests/monitor/monitor.doc
index 3a698fa48f..c3cd6e3034 100644
--- a/testsuites/libtests/monitor/monitor.doc
+++ b/testsuites/libtests/monitor/monitor.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/monitor/system.h b/testsuites/libtests/monitor/system.h
index 7e23bd2d40..dc9224731a 100644
--- a/testsuites/libtests/monitor/system.h
+++ b/testsuites/libtests/monitor/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/libtests/monitor02/init.c b/testsuites/libtests/monitor02/init.c
index 22818cc441..d5e5d930a1 100644
--- a/testsuites/libtests/monitor02/init.c
+++ b/testsuites/libtests/monitor02/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This is a simple test whose only purpose is to start the Monitor
* task. The Monitor task can be used to obtain information about
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/monitor02/monitor02.doc b/testsuites/libtests/monitor02/monitor02.doc
index df696b48a5..440cdfd5b1 100644
--- a/testsuites/libtests/monitor02/monitor02.doc
+++ b/testsuites/libtests/monitor02/monitor02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/monitor02/system.h b/testsuites/libtests/monitor02/system.h
index 3d05473c57..f16167eb22 100644
--- a/testsuites/libtests/monitor02/system.h
+++ b/testsuites/libtests/monitor02/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/libtests/mouse01/init.c b/testsuites/libtests/mouse01/init.c
index 5f9ed18161..a26fa6e2e3 100644
--- a/testsuites/libtests/mouse01/init.c
+++ b/testsuites/libtests/mouse01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/mouse01/mouse01.doc b/testsuites/libtests/mouse01/mouse01.doc
index a38e8d24c4..ebbd9e085f 100644
--- a/testsuites/libtests/mouse01/mouse01.doc
+++ b/testsuites/libtests/mouse01/mouse01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/mouse01/msmouse.c b/testsuites/libtests/mouse01/msmouse.c
index 838cbcf084..82701c0956 100644
--- a/testsuites/libtests/mouse01/msmouse.c
+++ b/testsuites/libtests/mouse01/msmouse.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/mouse01/serial_mouse_config.c b/testsuites/libtests/mouse01/serial_mouse_config.c
index 798cbf3a3b..7f74edb95e 100644
--- a/testsuites/libtests/mouse01/serial_mouse_config.c
+++ b/testsuites/libtests/mouse01/serial_mouse_config.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup libtests
+ *
+ * @brief This is serial_mouse_config for mouse01.
+ */
+
+/*
+ * Copyright (C) 1989-2011 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
/*
*
* MODULE DESCRIPTION:
diff --git a/testsuites/libtests/newlib01/init.c b/testsuites/libtests/newlib01/init.c
index 383abf41f6..d3ccbddba1 100644
--- a/testsuites/libtests/newlib01/init.c
+++ b/testsuites/libtests/newlib01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2022 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -17,19 +30,28 @@
#endif
#include <stdio.h>
+#include <errno.h>
#include <sys/reent.h>
+#include <sys/stat.h>
#include <rtems.h>
#include <rtems/console.h>
#include <rtems/imfs.h>
#include <rtems/libcsupport.h>
+#include <rtems/sysinit.h>
#include "tmacros.h"
+#ifndef _REENT_CLEANUP
+#define _REENT_CLEANUP(ptr) ((ptr)->__cleanup)
+#endif
+
const char rtems_test_name[] = "NEWLIB 1";
-static const char file_path[] = "/file";
+static const char stdio_file_path[] = "/stdio-file";
+
+static const char non_stdio_file_path[] = "/non-stdio-file";
typedef enum {
INIT,
@@ -42,6 +64,8 @@ typedef struct {
rtems_id main_task_id;
rtems_id worker_task_id;
test_state current;
+ FILE *non_stdio_file;
+ int non_stdio_fd;
} test_context;
static test_context test_instance;
@@ -62,25 +86,71 @@ static void wait(void)
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
}
-static void worker_task(rtems_task_argument arg)
+/*
+ * Check that rand() is properly initialized and returns the expected sequence
+ * for default seed values. A call to rand() without any previous call to
+ * srand() generates the same sequence as when srand() is first called with a
+ * seed value of 1.
+ */
+static void test_rand(void)
+{
+ int rv;
+
+ rv = rand();
+ rtems_test_assert(rv == 1481765933);
+ rv = rand();
+ rtems_test_assert(rv == 1085377743);
+ rv = rand();
+ rtems_test_assert(rv == 1270216262);
+
+ srand(1);
+ rv = rand();
+ rtems_test_assert(rv == 1481765933);
+ rv = rand();
+ rtems_test_assert(rv == 1085377743);
+ rv = rand();
+ rtems_test_assert(rv == 1270216262);
+}
+
+/*
+ * Check that lrand48() is properly initialized and returns the expected
+ * sequence for default seed values. A call to lrand48() without any previous
+ * call to srand48() uses default constant initializer values set in the _seed
+ * member of struct _rand48.
+ */
+static void test_lrand48(void)
+{
+ long rv;
+
+ rv = lrand48();
+ rtems_test_assert(rv == 851401618);
+ rv = lrand48();
+ rtems_test_assert(rv == 1804928587);
+ rv = lrand48();
+ rtems_test_assert(rv == 758783491);
+}
+
+static void stdio_file_worker(rtems_task_argument arg)
{
test_context *ctx = &test_instance;
- struct _reent *reent = _REENT;
FILE *output;
char buf[1] = { 'x' };
size_t n;
- rtems_test_assert(reent->__sdidinit == 0);
+ test_rand();
+ test_lrand48();
- output = stdout = fopen(&file_path[0], "r+");
+ rtems_test_assert(_REENT_CLEANUP(_REENT) == NULL);
+
+ output = stdout = fopen(&stdio_file_path[0], "r+");
rtems_test_assert(stdout != NULL);
/*
* Check newlib's __sinit does not touch our assigned file pointer.
*/
- rtems_test_assert(reent->__sdidinit == 0);
+ rtems_test_assert(_REENT_CLEANUP(_REENT) == NULL);
rtems_test_assert(fflush(stdout) == 0);
- rtems_test_assert(reent->__sdidinit != 0);
+ rtems_test_assert(_REENT_CLEANUP(_REENT) != NULL);
rtems_test_assert(stdout == output);
n = fwrite(&buf[0], sizeof(buf), 1, stdout);
@@ -93,6 +163,30 @@ static void worker_task(rtems_task_argument arg)
rtems_test_assert(0);
}
+static void non_stdio_file_worker(rtems_task_argument arg)
+{
+ test_context *ctx = &test_instance;
+ FILE *fp;
+ char buf[1] = { 'y' };
+ size_t n;
+ int fd;
+
+ fp = ctx->non_stdio_file = fopen(&non_stdio_file_path[0], "w");
+ rtems_test_assert(fp != NULL);
+
+ /* Get file descriptor of new global file stream, store it in text context */
+ fd = fileno(fp);
+ rtems_test_assert(fd != -1);
+ ctx->non_stdio_fd = fd;
+
+ n = fwrite(&buf[0], sizeof(buf), 1, fp);
+ rtems_test_assert(n == 1);
+
+ wake_up_main(ctx);
+
+ rtems_test_assert(0);
+}
+
static int handler_open(
rtems_libio_t *iop,
const char *path,
@@ -253,31 +347,9 @@ static const IMFS_node_control node_control = IMFS_GENERIC_INITIALIZER(
IMFS_node_destroy_default
);
-static void test(void)
+static void create_and_run_worker(test_context *ctx, rtems_task_entry entry)
{
- test_context *ctx = &test_instance;
rtems_status_code sc;
- int rv;
- rtems_resource_snapshot snapshot;
- FILE *file;
-
- ctx->main_task_id = rtems_task_self();
-
- /* Fill dynamic file pool in Newlib _GLOBAL_REENT */
- file = fopen(CONSOLE_DEVICE_NAME, "r+");
- rtems_test_assert(file != NULL);
- rv = fclose(file);
- rtems_test_assert(rv == 0);
-
- rtems_resource_snapshot_take(&snapshot);
-
- rv = IMFS_make_generic_node(
- &file_path[0],
- S_IFCHR | S_IRWXU | S_IRWXG | S_IRWXO,
- &node_control,
- NULL
- );
- rtems_test_assert(rv == 0);
sc = rtems_task_create(
rtems_build_name('W', 'O', 'R', 'K'),
@@ -289,38 +361,224 @@ static void test(void)
);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
- sc = rtems_task_start(ctx->worker_task_id, worker_task, 0);
+ sc = rtems_task_start(ctx->worker_task_id, entry, 0);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
wait();
sc = rtems_task_delete(ctx->worker_task_id);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+}
+
+/*
+ * Check that a FILE opened by a task and assigned to a stdio stream is closed
+ * during thread termination. Ensure that resources are returned to the system.
+ */
+static void test_stdio_file(test_context *ctx)
+{
+ int rv;
+ rtems_resource_snapshot snapshot;
+
+ rtems_resource_snapshot_take(&snapshot);
+
+ rv = IMFS_make_generic_node(
+ &stdio_file_path[0],
+ S_IFCHR | S_IRWXU | S_IRWXG | S_IRWXO,
+ &node_control,
+ NULL
+ );
+ rtems_test_assert(rv == 0);
- rv = unlink(&file_path[0]);
+ create_and_run_worker(ctx, stdio_file_worker);
+
+ rv = unlink(&stdio_file_path[0]);
rtems_test_assert(rv == 0);
rtems_test_assert(rtems_resource_snapshot_check(&snapshot));
}
+/*
+ * Open a global FILE object from a task but do not assign it to a stdio
+ * stream. The FILE is not closed upon thread termination.
+ */
+static void test_non_stdio_file(test_context *ctx)
+{
+ create_and_run_worker(ctx, non_stdio_file_worker);
+}
+
+/*
+ * This exit handler will be called last among the functions registered with
+ * atexit(). Check that stdio file descriptors are closed. The Newlib cleanup
+ * handler has not yet run, so the stdio FILE objects themselves are still
+ * open.
+ */
+static void check_after_libio_exit(void)
+{
+ test_context *ctx = &test_instance;
+ struct stat unused;
+ int rv;
+
+ errno = 0;
+ rv = fstat(0, &unused);
+ rtems_test_assert(rv == -1);
+ rtems_test_assert(errno == EBADF);
+
+ errno = 0;
+ rv = fstat(1, &unused);
+ rtems_test_assert(rv == -1);
+ rtems_test_assert(errno == EBADF);
+
+ errno = 0;
+ rv = fstat(2, &unused);
+ rtems_test_assert(rv == -1);
+ rtems_test_assert(errno == EBADF);
+
+ rtems_test_assert(stdin->_flags != 0);
+ rtems_test_assert(stdout->_flags != 0);
+ rtems_test_assert(stderr->_flags != 0);
+
+ /*
+ * The non-stdio file and its file descriptor should be still open at this
+ * point.
+ */
+ rv = fstat(ctx->non_stdio_fd, &unused);
+ rtems_test_assert(rv == 0);
+ rtems_test_assert(ctx->non_stdio_file->_flags != 0);
+}
+
+static void register_exit_handler_before_libio_exit(void)
+{
+ int rv;
+
+ rv = atexit(check_after_libio_exit);
+ rtems_test_assert(rv == 0);
+}
+
+/*
+ * Register the exit handler before rtems_libio_exit() so that
+ * check_after_libio_exit() is called after rtems_libio_exit(). The exit()
+ * handlers are in a LIFO list.
+ */
+RTEMS_SYSINIT_ITEM(register_exit_handler_before_libio_exit,
+ RTEMS_SYSINIT_STD_FILE_DESCRIPTORS, RTEMS_SYSINIT_ORDER_FIRST);
+
+/*
+ * At this point, neither the functions registered with atexit() nor the Newlib
+ * cleanup procedures have been called. Therefore, stdio file descriptors
+ * should be open and stdio FILE object flags should be non-zero.
+ */
+static void test_exit_handling(test_context *ctx)
+{
+ struct stat unused;
+ int rv;
+
+ rv = fstat(0, &unused);
+ rtems_test_assert(rv == 0);
+
+ rv = fstat(1, &unused);
+ rtems_test_assert(rv == 0);
+
+ rv = fstat(2, &unused);
+ rtems_test_assert(rv == 0);
+
+ rtems_test_assert(stdin->_flags != 0);
+ rtems_test_assert(stdout->_flags != 0);
+ rtems_test_assert(stderr->_flags != 0);
+
+ /*
+ * The file descriptor of the non-stdio file should still be open; the FILE
+ * object flags should still be non-zero.
+ */
+ rv = fstat(ctx->non_stdio_fd, &unused);
+ rtems_test_assert(rv == 0);
+ rtems_test_assert(ctx->non_stdio_file->_flags != 0);
+
+ /* Run exit handlers and Newlib cleanup procedures */
+ exit(0);
+}
+
static void Init(rtems_task_argument arg)
{
+ test_context *ctx = &test_instance;
+ FILE *file;
+ int rv;
+
TEST_BEGIN();
+ test_rand();
+ test_lrand48();
+
+ ctx->main_task_id = rtems_task_self();
- test();
+ /* Fill dynamic file pool in Newlib */
+ file = fopen(CONSOLE_DEVICE_NAME, "r+");
+ rtems_test_assert(file != NULL);
+ rv = fclose(file);
+ rtems_test_assert(rv == 0);
- TEST_END();
- rtems_test_exit(0);
+ test_stdio_file(ctx);
+ test_non_stdio_file(ctx);
+ test_exit_handling(ctx);
+}
+
+static void fatal_extension(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code error
+)
+{
+ if (
+ source == RTEMS_FATAL_SOURCE_EXIT
+ && !always_set_to_false
+ && error == 0
+ ) {
+ /*
+ * Final conditions check after exit handlers and Newlib cleanup procedures
+ * have run. File descriptors and FILE objects themselves are closed.
+ */
+ struct stat unused;
+ int rv;
+ test_context *ctx = &test_instance;
+
+ errno = 0;
+ rv = fstat(0, &unused);
+ rtems_test_assert(rv == -1);
+ rtems_test_assert(errno == EBADF);
+
+ errno = 0;
+ rv = fstat(1, &unused);
+ rtems_test_assert(rv == -1);
+ rtems_test_assert(errno == EBADF);
+
+ errno = 0;
+ rv = fstat(2, &unused);
+ rtems_test_assert(rv == -1);
+ rtems_test_assert(errno == EBADF);
+
+ rtems_test_assert(stdin->_flags == 0);
+ rtems_test_assert(stdout->_flags == 0);
+ rtems_test_assert(stderr->_flags == 0);
+
+ /* The non-stdio file and its file descriptor should be closed */
+ errno = 0;
+ rv = fstat(ctx->non_stdio_fd, &unused);
+ rtems_test_assert(rv == -1);
+ rtems_test_assert(errno == EBADF);
+ rtems_test_assert(ctx->non_stdio_file->_flags == 0);
+
+ TEST_END();
+ }
}
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
-#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 4
+#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 5
#define CONFIGURE_MAXIMUM_TASKS 2
-#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+#define CONFIGURE_INITIAL_EXTENSIONS \
+ { .fatal = fatal_extension }, \
+ RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/libtests/newlib01/newlib01.doc b/testsuites/libtests/newlib01/newlib01.doc
index 2bf5959506..dc16584418 100644
--- a/testsuites/libtests/newlib01/newlib01.doc
+++ b/testsuites/libtests/newlib01/newlib01.doc
@@ -14,5 +14,11 @@ concepts:
written to the open file during thread termination.
- Ensure that the open file is closed after the write during thread
termination.
- - Ensure that all resources are returned to the system using resouce
+ - Ensure that all resources are returned to the system using resource
snapshots.
+ - Check that exit procedures provide proper resource cleanup. Ensure that
+ a file opened from a worker task--but that is not assigned to a stdio
+ stream--is not closed during thread termination.
+ - Check that the state of random number generators is thread-specific, they
+ are properly initialized, and return the expected sequence for default
+ seed values.
diff --git a/testsuites/libtests/ofw01/init.c b/testsuites/libtests/ofw01/init.c
index 6006121cc7..6afed33475 100644
--- a/testsuites/libtests/ofw01/init.c
+++ b/testsuites/libtests/ofw01/init.c
@@ -37,6 +37,7 @@
#include <bsp/fdt.h>
#include <ofw/ofw.h>
#include <ofw/ofw_test.h>
+#include <rtems/score/isr.h>
#include "some.h"
@@ -50,7 +51,20 @@ const void *__real_bsp_fdt_get(void);
const void *__wrap_bsp_fdt_get(void)
{
- if (test_bin != NULL) {
+ uintptr_t sp;
+
+ sp = (uintptr_t) __builtin_frame_address(0);
+ RTEMS_OBFUSCATE_VARIABLE(sp);
+
+ /*
+ * Use the stack pointer to check if we have to return the real device tree
+ * since bsp_fdt_get() may get called before the BSS is cleared to zero.
+ */
+ if (
+ (sp < (uintptr_t) _ISR_Stack_area_begin ||
+ sp >= (uintptr_t) _ISR_Stack_area_end) &&
+ test_bin != NULL
+ ) {
return test_bin;
}
diff --git a/testsuites/libtests/ofw01/some.c b/testsuites/libtests/ofw01/some.c
index 91251e71b0..7ce8760316 100644
--- a/testsuites/libtests/ofw01/some.c
+++ b/testsuites/libtests/ofw01/some.c
@@ -4,9 +4,9 @@
* WARNING: Automatically generated -- do not edit!
*/
-#include <sys/types.h>
+#include <rtems.h>
-const unsigned char some_bin[] = {
+RTEMS_ALIGNED(8) const unsigned char some_bin[] = {
0xd0, 0x0d, 0xfe, 0xed, 0x00, 0x00, 0x02, 0xcf, 0x00, 0x00, 0x00, 0x38,
0x00, 0x00, 0x02, 0x70, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x11,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f,
diff --git a/testsuites/libtests/ofw01/some.dts b/testsuites/libtests/ofw01/some.dts
index 6ed8aeb069..6a5023414f 100644
--- a/testsuites/libtests/ofw01/some.dts
+++ b/testsuites/libtests/ofw01/some.dts
@@ -1,16 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2020 Niteesh G S <niteesh.gs@gmail.com>. All rights reserved.
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/dts-v1/;
diff --git a/testsuites/libtests/putenvtest/init.c b/testsuites/libtests/putenvtest/init.c
index 74cd8de1a8..748b023908 100644
--- a/testsuites/libtests/putenvtest/init.c
+++ b/testsuites/libtests/putenvtest/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/putenvtest/putenvtest.doc b/testsuites/libtests/putenvtest/putenvtest.doc
index 273027956d..ec47d4d21c 100644
--- a/testsuites/libtests/putenvtest/putenvtest.doc
+++ b/testsuites/libtests/putenvtest/putenvtest.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/pwdgrp01/init.c b/testsuites/libtests/pwdgrp01/init.c
index 254eb695ef..e241237272 100644
--- a/testsuites/libtests/pwdgrp01/init.c
+++ b/testsuites/libtests/pwdgrp01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/pwdgrp02/init.c b/testsuites/libtests/pwdgrp02/init.c
index 85770a7a8d..3fb74b226c 100644
--- a/testsuites/libtests/pwdgrp02/init.c
+++ b/testsuites/libtests/pwdgrp02/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/rbheap01/init.c b/testsuites/libtests/rbheap01/init.c
index 71429dfba4..ab6d36ec34 100644
--- a/testsuites/libtests/rbheap01/init.c
+++ b/testsuites/libtests/rbheap01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012-2015 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2012, 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/rbheap01/rbheap.doc b/testsuites/libtests/rbheap01/rbheap.doc
index b86cc692a6..bc64fb2679 100644
--- a/testsuites/libtests/rbheap01/rbheap.doc
+++ b/testsuites/libtests/rbheap01/rbheap.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/record01/init.c b/testsuites/libtests/record01/init.c
index fea509089a..eb257b8a2e 100644
--- a/testsuites/libtests/record01/init.c
+++ b/testsuites/libtests/record01/init.c
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/record02/init.c b/testsuites/libtests/record02/init.c
index 7568f06e18..3c4dac25a0 100644
--- a/testsuites/libtests/record02/init.c
+++ b/testsuites/libtests/record02/init.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
- * Copyright (C) 2018, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2018, 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/regulator01/regulator01.c b/testsuites/libtests/regulator01/regulator01.c
new file mode 100644
index 0000000000..cc5af01223
--- /dev/null
+++ b/testsuites/libtests/regulator01/regulator01.c
@@ -0,0 +1,1310 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @defgroup RegulatorTests Regulator Test Cases
+ *
+ * @brief Unit test cases for the Regulator
+ *
+ * This is a set of unit test cases for the regulator.
+ */
+
+/**
+ * @ingroup RegulatorTests
+ *
+ * @file
+ *
+ * @brief Test 01 for Regulator Library
+ */
+
+/*
+ * Copyright (C) 2022 On-Line Applications Research Corporation (OAR)
+ *
+ * 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 OWNER 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.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <rtems.h>
+#include <rtems/test-info.h>
+#include <tmacros.h>
+
+#include <rtems/regulator.h>
+
+/**
+ * @brief Regulator Test Name
+ */
+const char rtems_test_name[] = "Regulator 1";
+
+/*
+ * Prototypes for wrapped functions
+ */
+void *__wrap_malloc(size_t size);
+void *__real_malloc(size_t size);
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Calloc Wrapper Trigger Count
+ */
+static int malloc_trigger_count;
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Calloc Wrapper Call Count
+ */
+static int malloc_call_count;
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Calloc Wrapper Trigger enable
+ */
+static bool malloc_trigger_enabled;
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Enable Calloc Wrapper Trigger
+ */
+static void malloc_trigger_enable(
+ int trigger_count
+)
+{
+ malloc_trigger_enabled = true;
+ malloc_trigger_count = trigger_count;
+ malloc_call_count = 0;
+}
+/**
+ * @ingroup RegulatorTests
+ * @brief Reset Calloc Wrapper Trigger and Count
+ */
+static void malloc_trigger_reset(void)
+{
+ malloc_trigger_enabled = 0;
+ malloc_trigger_count = 0;
+ malloc_call_count = 0;
+}
+/**
+ * @ingroup RegulatorTests
+ * @brief Calloc Wrapper to Trigger Allocation Errors
+ */
+void *__wrap_malloc(size_t size)
+{
+ if (malloc_trigger_enabled) {
+ malloc_call_count++;
+ if (malloc_call_count == malloc_trigger_count) {
+ return NULL;
+ }
+ }
+
+ return __real_malloc(size);
+}
+
+/**
+ * @brief Constant to simpify code
+ */
+#define FIVE_SECONDS (5 * rtems_clock_get_ticks_per_second())
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Empty Deliver Method for Testing
+ */
+static bool test_regulator_deliverer(
+ void *context,
+ void *message,
+ size_t length
+)
+{
+ (void) context;
+ (void) message;
+ (void) length;
+
+ return true;
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Maximum length of a test message that is delivered
+ */
+#define MAXIMUM_MESSAGE_LENGTH 32
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Maximum number of test messages to buffer
+ */
+#define MAXIMUM_MESSAGES_TO_BUFFER 10
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Structure for capturing messages as delivered
+ */
+typedef struct {
+ rtems_interval processed;
+ char message[MAXIMUM_MESSAGE_LENGTH];
+} message_log_t;
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Set of Delivered messages
+ */
+message_log_t delivered_messages[MAXIMUM_MESSAGES_TO_BUFFER];
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Count of Delivered messages
+ */
+int delivered_message_count;
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Reset Delivered Message Set
+ *
+ * This is used at the beginning of a test case which is going to
+ * check that message contents and delivery times were as expected.
+ */
+static void delivered_messages_reset(void)
+{
+ delivered_message_count = 0;
+ memset(delivered_messages, 0xc5, sizeof(delivered_messages));
+}
+
+/**
+ * @brief Context for Logger Delivery Function
+ */
+typedef struct {
+ /** Regulator instance being operated on */
+ rtems_regulator_instance *regulator;
+} deliverer_logger_context_t;
+
+/**
+ * @brief Context Instance for Logger Delivery Function
+ */
+static deliverer_logger_context_t deliverer_logger_context;
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Empty Deliver Method for Testing
+ *
+ * This deliverer method implementation logs the messages along with
+ * their time of arrival. This is used by the test cases to verify
+ * proper delivery.
+ */
+static bool test_regulator_deliverer_logger(
+ void *context,
+ void *message,
+ size_t length
+)
+{
+ deliverer_logger_context_t *the_context;
+
+ the_context = (deliverer_logger_context_t *)context;
+
+ static bool caller_releases_buffer = true;
+
+ size_t len;
+ rtems_interval ticks;
+ rtems_status_code sc;
+
+ len = strnlen(message, MAXIMUM_MESSAGE_LENGTH) + 1;
+ rtems_test_assert(len = length);
+
+ ticks = rtems_clock_get_ticks_since_boot();
+
+ delivered_messages[delivered_message_count].processed = ticks;
+
+ strcpy(delivered_messages[delivered_message_count].message, message);
+
+ delivered_message_count++;
+
+ /*
+ * Alternate releasing the buffer here and allowing the calling Delivery
+ * Thread to do it. This increases coverage of that logic.
+ */
+ if (caller_releases_buffer == true) {
+ caller_releases_buffer = false;
+ return true;
+ }
+
+ sc = rtems_regulator_release_buffer(the_context->regulator, message);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ return false;
+}
+
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Helper to create a Regulator instance
+ *
+ * This helper creates a regulator instance with some arbitrary attributes.
+ * This is used in multiple test cases to have a valie regulator instance to
+ * trigger error cases.
+ */
+static rtems_regulator_instance *test_regulator_create_regulator_OK(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_attributes attributes = {
+ .deliverer = test_regulator_deliverer,
+ .deliverer_context = NULL,
+ .maximum_message_size = 16,
+ .maximum_messages = 10,
+ .delivery_thread_priority = 16,
+ .delivery_thread_stack_size = 0,
+ .delivery_thread_period = RTEMS_MILLISECONDS_TO_TICKS(1000),
+ .maximum_to_dequeue_per_period = 3
+ };
+ rtems_regulator_instance *regulator;
+
+ regulator = NULL;
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(regulator != NULL);
+
+ return regulator;
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_create() maximum_to_dequeue_per_period
+ * attributes error
+ *
+ * This unit test verifies that rtems_regulator_create() returns an error when
+ * the maximum_to_dequeue_per_period attribute is zero.
+ */
+static void test_regulator_create_max_dequeue_zero(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_attributes attributes = {
+ .deliverer = test_regulator_deliverer,
+ .deliverer_context = NULL,
+ .maximum_message_size = 16,
+ .maximum_messages = 10,
+ .delivery_thread_priority = 16,
+ .delivery_thread_stack_size = 0,
+ .delivery_thread_period = RTEMS_MILLISECONDS_TO_TICKS(1000),
+ .maximum_to_dequeue_per_period = 0
+ };
+ rtems_regulator_instance *regulator;
+
+ regulator = NULL;
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_INVALID_NUMBER);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_create() NULL attributes error
+ *
+ * This unit test verifies that rtems_regulator_create() returns an error when
+ * the attributes argument is NULL.
+ */
+static void test_regulator_create_null_attributes(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_instance *regulator;
+
+ sc = rtems_regulator_create(NULL, &regulator);
+ rtems_test_assert(sc == RTEMS_INVALID_ADDRESS);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_create NULL regulator error
+ *
+ * This unit test verifies that rtems_regulator_create() returns an error when
+ * the regulator argument is NULL.
+ */
+static void test_regulator_create_null_regulator(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_attributes attributes;
+
+ sc = rtems_regulator_create(&attributes, NULL);
+ rtems_test_assert(sc == RTEMS_INVALID_ADDRESS);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_create deliverer is NULL
+ *
+ * This unit test verifies that rtems_regulator_create() returns an error when
+ * the the attributes deliverer field is NULL.
+ */
+static void test_regulator_create_deliverer_is_null(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_attributes attributes;
+ rtems_regulator_instance *regulator;
+
+ (void) memset(&attributes, 0, sizeof(rtems_regulator_attributes));
+
+ attributes.deliverer = NULL;
+ attributes.maximum_messages = 0;
+ attributes.maximum_message_size = 16;
+ attributes.maximum_to_dequeue_per_period = 1;
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_INVALID_ADDRESS);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_create maximum_messages is 0 error
+ *
+ * This unit test verifies that rtems_regulator_create() returns an error when
+ * the the attributes maximum_messages field is 0.
+ */
+static void test_regulator_create_maximum_messages_is_zero(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_attributes attributes;
+ rtems_regulator_instance *regulator;
+
+ (void) memset(&attributes, 0, sizeof(rtems_regulator_attributes));
+
+ attributes.deliverer = test_regulator_deliverer;
+ attributes.maximum_messages = 0;
+ attributes.maximum_message_size = 16;
+ attributes.maximum_to_dequeue_per_period = 1;
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_INVALID_NUMBER);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_create maximum_message_size is 0 error
+ *
+ * This unit test verifies that rtems_regulator_create() returns an error when
+ * the the attributes maximum_message_size field is 0.
+ */
+static void test_regulator_create_maximum_message_size_is_zero(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_attributes attributes;
+ rtems_regulator_instance *regulator;
+
+ (void) memset(&attributes, 0, sizeof(rtems_regulator_attributes));
+
+ attributes.deliverer = test_regulator_deliverer;
+ attributes.maximum_messages = 10;
+ attributes.maximum_message_size = 0;
+ attributes.maximum_to_dequeue_per_period = 1;
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_INVALID_SIZE);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_create maximum_to_dequeue_per_period is 0 error
+ *
+ * This unit test verifies that rtems_regulator_create() returns an error when
+ * the the attributes maximum_to_dequeue_per_period field is 0.
+ */
+static void test_regulator_create_maximum_to_dequeue_per_period_is_zero(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_attributes attributes;
+ rtems_regulator_instance *regulator;
+
+ (void) memset(&attributes, 0, sizeof(rtems_regulator_attributes));
+
+ attributes.deliverer = test_regulator_deliverer;
+ attributes.maximum_messages = 10;
+ attributes.maximum_message_size = 0;
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_INVALID_SIZE);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_create returns error on failure to allocate regulator
+ *
+ * This unit test verifies that rtems_regulator_create() returns an error when
+ * it is unable to allocate the mmemory for the regulator instance.
+ */
+static void test_regulator_create_malloc_regulator_fails(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_attributes attributes;
+ rtems_regulator_instance *regulator;
+
+ (void) memset(&attributes, 0, sizeof(rtems_regulator_attributes));
+
+ attributes.deliverer = test_regulator_deliverer;
+ attributes.maximum_messages = 10;
+ attributes.maximum_message_size = 16;
+ attributes.delivery_thread_priority = 32;
+ attributes.maximum_to_dequeue_per_period = 1;
+ attributes.delivery_thread_period = RTEMS_MILLISECONDS_TO_TICKS(1000);
+
+ malloc_trigger_enable(1);
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_NO_MEMORY);
+
+ malloc_trigger_reset();
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_create returns error on failure to allocate buffers
+ *
+ * This unit test verifies that rtems_regulator_create() returns an error when
+ * it is unable to allocate the mmemory for the regulator buffers.
+ */
+static void test_regulator_create_malloc_buffers_fails(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_attributes attributes;
+ rtems_regulator_instance *regulator;
+
+ (void) memset(&attributes, 0, sizeof(rtems_regulator_attributes));
+
+ attributes.deliverer = test_regulator_deliverer;
+ attributes.maximum_messages = 10;
+ attributes.maximum_message_size = 16;
+ attributes.delivery_thread_priority = 32;
+ attributes.maximum_to_dequeue_per_period = 1;
+ attributes.delivery_thread_period = RTEMS_MILLISECONDS_TO_TICKS(1000);
+
+ malloc_trigger_enable(2);
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_NO_MEMORY);
+
+ malloc_trigger_reset();
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_create and delete work
+ *
+ * This unit test verifies that rtems_regulator_create() can successfully create
+ * the the attributes delivery_thread_priority field is 0.
+ */
+static void test_regulator_create_delivery_thread_priority_is_zero(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_attributes attributes;
+ rtems_regulator_instance *regulator;
+
+ (void) memset(&attributes, 0, sizeof(rtems_regulator_attributes));
+
+ attributes.deliverer = test_regulator_deliverer;
+ attributes.maximum_messages = 10;
+ attributes.maximum_message_size = 16;
+ attributes.delivery_thread_priority = 0;
+ attributes.maximum_to_dequeue_per_period = 1;
+ attributes.delivery_thread_period = RTEMS_MILLISECONDS_TO_TICKS(1000);
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_INVALID_PRIORITY);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_create rtems_partition_create error
+ *
+ * This unit test verifies that rtems_regulator_create() correctly returns an
+ * error when the call to rtems_partition_create() fails.
+ */
+static void test_regulator_create_partition_create_fails(void)
+{
+ rtems_status_code sc;
+ rtems_id partition_id;
+ unsigned long partition_area[16];
+ rtems_regulator_attributes attributes;
+ rtems_regulator_instance *regulator;
+
+ sc = rtems_partition_create(
+ rtems_build_name('T', 'P', 'T', 'P'),
+ partition_area,
+ 16 * sizeof(unsigned long),
+ 2 * sizeof(unsigned long),
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &partition_id
+ );
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ (void) memset(&attributes, 0, sizeof(rtems_regulator_attributes));
+
+ attributes.deliverer = test_regulator_deliverer;
+ attributes.maximum_messages = 10;
+ attributes.maximum_message_size = 16;
+ attributes.delivery_thread_priority = 8;
+ attributes.maximum_to_dequeue_per_period = 1;
+ attributes.delivery_thread_period = RTEMS_MILLISECONDS_TO_TICKS(1000);
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_TOO_MANY);
+
+ sc = rtems_partition_delete(partition_id);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_create rtems_message_queue_create error
+ *
+ * This unit test verifies that rtems_regulator_create() correctly returns an
+ * error when the call to rtems_message_queue_create() fails.
+ */
+static void test_regulator_create_message_queue_create_fails(void)
+{
+ rtems_status_code sc;
+ rtems_id queue_id;
+ rtems_regulator_attributes attributes;
+ rtems_regulator_instance *regulator;
+
+ sc = rtems_message_queue_create(
+ rtems_build_name('T', 'Q', 'T', 'Q'),
+ 4,
+ sizeof(unsigned long),
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &queue_id
+ );
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ (void) memset(&attributes, 0, sizeof(rtems_regulator_attributes));
+
+ attributes.deliverer = test_regulator_deliverer;
+ attributes.maximum_messages = 10;
+ attributes.maximum_message_size = 16;
+ attributes.delivery_thread_priority = 8;
+ attributes.maximum_to_dequeue_per_period = 1;
+ attributes.delivery_thread_period = RTEMS_MILLISECONDS_TO_TICKS(1000);
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_TOO_MANY);
+
+ sc = rtems_message_queue_delete(queue_id);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_create rtems_task_create error
+ *
+ * This unit test verifies that rtems_regulator_create() correctly returns an
+ * error when the call to rtems_task_create() fails.
+ */
+static void test_regulator_create_task_create_fails(void)
+{
+ rtems_status_code sc;
+ rtems_id task_id;
+ rtems_regulator_attributes attributes;
+ rtems_regulator_instance *regulator;
+
+ sc = rtems_task_create(
+ rtems_build_name('T', 'T', 'T', 'T'),
+ 80,
+ 0,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &task_id
+ );
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ (void) memset(&attributes, 0, sizeof(rtems_regulator_attributes));
+
+ attributes.deliverer = test_regulator_deliverer;
+ attributes.maximum_messages = 10;
+ attributes.maximum_message_size = 16;
+ attributes.delivery_thread_priority = 8;
+ attributes.maximum_to_dequeue_per_period = 1;
+ attributes.delivery_thread_period = RTEMS_MILLISECONDS_TO_TICKS(1000);
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_TOO_MANY);
+
+ sc = rtems_task_delete(task_id);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify Regulator Output Thread Handles Error on Period Create
+ *
+ * This unit test verifies that regulator output thread correctly exits
+ * when the call to rtems_rate_monotonic_create() fails.
+ *
+ * This error condition/path cannot be directly detected via a return code,
+ * It is verified via a debugger or code coverage reports.
+ */
+static void test_regulator_create_rate_monotonic_create_fails(void)
+{
+ rtems_status_code sc;
+ rtems_id period_id;
+ rtems_regulator_attributes attributes;
+ rtems_regulator_instance *regulator;
+
+ sc = rtems_rate_monotonic_create(
+ rtems_build_name('T', 'S', 'T', 'P'),
+ &period_id
+ );
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ (void) memset(&attributes, 0, sizeof(rtems_regulator_attributes));
+
+ attributes.deliverer = test_regulator_deliverer;
+ attributes.maximum_messages = 10;
+ attributes.maximum_message_size = 16;
+ attributes.delivery_thread_priority = 8;
+ attributes.maximum_to_dequeue_per_period = 1;
+ attributes.delivery_thread_period = RTEMS_MILLISECONDS_TO_TICKS(1000);
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ /*
+ * Let the output thread execute and encounter the create error.
+ */
+
+ sleep(1);
+
+ /*
+ * Now deallocate the resources allocated earlier
+ */
+ sc = rtems_regulator_delete(regulator, FIVE_SECONDS);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ sc = rtems_rate_monotonic_delete(period_id);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_delete NULL regulator error
+ *
+ * This unit test verifies that rtems_regulator_delete() returns an error when
+ * the regulator argument is NULL.
+ */
+static void test_regulator_delete_null_regulator(void)
+{
+ rtems_status_code sc;
+
+ sc = rtems_regulator_delete(NULL, FIVE_SECONDS);
+ rtems_test_assert(sc == RTEMS_INVALID_ADDRESS);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_delete uninitialized regulator error
+ *
+ * This unit test verifies that rtems_regulator_delete() returns an error when
+ * the regulator argument is uninitialized.
+ */
+static void test_regulator_delete_uninitialized_regulator(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_instance regulator;
+
+ (void) memset(&regulator, 0, sizeof(regulator));
+
+ sc = rtems_regulator_delete(&regulator, 0);
+ rtems_test_assert(sc == RTEMS_INCORRECT_STATE);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_delete successful case
+ *
+ * This unit test verifies that rtems_regulator_delete() can be successfully
+ * deleted.
+ */
+static void test_regulator_delete_OK(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_instance *regulator;
+
+ regulator = test_regulator_create_regulator_OK();
+ rtems_test_assert(regulator != NULL);
+
+ sc = rtems_regulator_delete(regulator, FIVE_SECONDS);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_obtain_buffer NULL regulator error
+ *
+ * This unit test verifies that rtems_regulator_obtain_buffer() returns an error when
+ * the regulator argument is NULL.
+ */
+static void test_regulator_obtain_buffer_null_regulator(void)
+{
+ rtems_status_code sc;
+ void *buffer;
+
+ sc = rtems_regulator_obtain_buffer(NULL, &buffer);
+ rtems_test_assert(sc == RTEMS_INVALID_ADDRESS);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_obtain_buffer uninitialized regulator error
+ *
+ * This unit test verifies that rtems_regulator_obtain_buffer() returns an error when
+ * the regulator argument is uninitialized.
+ */
+static void test_regulator_obtain_buffer_uninitialized_regulator(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_instance regulator;
+ void *buffer;
+
+ (void) memset(&regulator, 0, sizeof(regulator));
+
+ sc = rtems_regulator_obtain_buffer(&regulator, &buffer);
+ rtems_test_assert(sc == RTEMS_INCORRECT_STATE);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_obtain_buffer successful case
+ *
+ * This unit test verifies that rtems_regulator_obtain_buffer() can be successfully
+ * obtained from an initialized regulator.
+ */
+static void test_regulator_obtain_buffer_OK(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_instance *regulator;
+ void *buffer;
+
+ regulator = test_regulator_create_regulator_OK();
+ rtems_test_assert(regulator != NULL);
+
+ sc = rtems_regulator_obtain_buffer(regulator, &buffer);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(buffer != NULL);
+
+ /*
+ * Not really testing this here but cannot delete underlying partition
+ * if there are buffers outstanding.
+ */
+ sc = rtems_regulator_release_buffer(regulator, buffer);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(buffer != NULL);
+
+ sc = rtems_regulator_delete(regulator, FIVE_SECONDS);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_release_buffer NULL regulator error
+ *
+ * This unit test verifies that rtems_regulator_release_buffer() returns an error when
+ * the regulator argument is NULL.
+ */
+static void test_regulator_release_buffer_null_regulator(void)
+{
+ rtems_status_code sc;
+ void *buffer;
+
+ sc = rtems_regulator_release_buffer(NULL, &buffer);
+ rtems_test_assert(sc == RTEMS_INVALID_ADDRESS);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_release_buffer uninitialized regulator error
+ *
+ * This unit test verifies that rtems_regulator_release_buffer() returns an
+ * error when the regulator argument is uninitialized.
+ */
+static void test_regulator_release_buffer_uninitialized_regulator(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_instance regulator;
+ void *buffer;
+
+ (void) memset(&regulator, 0, sizeof(regulator));
+
+ sc = rtems_regulator_release_buffer(&regulator, &buffer);
+ rtems_test_assert(sc == RTEMS_INCORRECT_STATE);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_release_buffer successful case
+ *
+ * This unit test verifies that rtems_regulator_release_buffer() can be successfully
+ * invoked with a buffer previously allocated by rtems_regulator_obtain_buffer().
+ */
+static void test_regulator_release_buffer_OK(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_instance *regulator;
+ void *buffer;
+
+ regulator = test_regulator_create_regulator_OK();
+ rtems_test_assert(regulator != NULL);
+
+ sc = rtems_regulator_obtain_buffer(regulator, &buffer);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(buffer != NULL);
+
+ sc = rtems_regulator_release_buffer(regulator, buffer);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ sc = rtems_regulator_delete(regulator, FIVE_SECONDS);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_send NULL regulator error
+ *
+ * This unit test verifies that rtems_regulator_send() returns an error when
+ * the regulator argument is NULL.
+ */
+static void test_regulator_send_null_regulator(void)
+{
+ rtems_status_code sc;
+ void *buffer;
+ size_t length;
+
+ buffer = &length;
+ length = sizeof(size_t);
+
+ sc = rtems_regulator_send(NULL, buffer, length);
+ rtems_test_assert(sc == RTEMS_INVALID_ADDRESS);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_send NULL message error
+ *
+ * This unit test verifies that rtems_regulator_send() returns an error when
+ * the message argument is NULL.
+ */
+static void test_regulator_send_null_message(void)
+{
+ rtems_status_code sc;
+ size_t length;
+ rtems_regulator_instance regulator;
+
+ length = sizeof(size_t);
+
+ sc = rtems_regulator_send(&regulator, NULL, length);
+ rtems_test_assert(sc == RTEMS_INVALID_ADDRESS);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_send zero length message error
+ *
+ * This unit test verifies that rtems_regulator_send() returns an
+ * error when the message length is 0.
+ */
+static void test_regulator_send_length_is_zero(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_instance regulator;
+ void *buffer;
+ size_t length;
+
+ buffer = &length;
+ length = 0;
+
+ sc = rtems_regulator_send(&regulator, buffer, length);
+ rtems_test_assert(sc == RTEMS_INVALID_NUMBER);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_send uninitialized regulator error
+ *
+ * This unit test verifies that rtems_regulator_send() returns an
+ * error when the regulator argument is uninitialized.
+ */
+static void test_regulator_send_uninitialized_regulator(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_instance regulator;
+ void *buffer;
+ size_t length;
+
+ buffer = &length;
+ length = sizeof(size_t);
+
+ (void) memset(&regulator, 0, sizeof(regulator));
+
+ sc = rtems_regulator_send(&regulator, buffer, length);
+ rtems_test_assert(sc == RTEMS_INCORRECT_STATE);
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify Cannot Delete with Message Outstanding
+ *
+ * This unit test verifies that when the regulator is successfully
+ * initialized, that it cannot be deleted with an undelivered message.
+ * It also verifies some basic statistics are working.
+ */
+static void test_regulator_cannot_delete_with_outstanding(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_instance *regulator;
+ char message[MAXIMUM_MESSAGE_LENGTH];
+ void *buffer;
+ size_t length;
+ int match;
+ rtems_regulator_attributes attributes = {
+ .deliverer = test_regulator_deliverer_logger,
+ .deliverer_context = &deliverer_logger_context,
+ .maximum_message_size = 16,
+ .maximum_messages = 10,
+ .delivery_thread_priority = 16,
+ .delivery_thread_stack_size = 0,
+ .delivery_thread_period = RTEMS_MILLISECONDS_TO_TICKS(250),
+ .maximum_to_dequeue_per_period = 3
+ };
+ rtems_regulator_statistics stats;
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(regulator != NULL);
+
+ deliverer_logger_context.regulator = regulator;
+
+ delivered_messages_reset();
+
+ // Ensure statistics show no buffers obtained or processed
+ sc = rtems_regulator_get_statistics(regulator, &stats);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(stats.obtained == 0);
+ rtems_test_assert(stats.released == 0);
+ rtems_test_assert(stats.delivered == 0);
+ rtems_test_assert(stats.period_statistics.count == 0);
+ rtems_test_assert(stats.period_statistics.missed_count == 0);
+
+ // Obtain a buffer which should change the statistics
+ sc = rtems_regulator_obtain_buffer(regulator, &buffer);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(buffer != NULL);
+
+ // Ensure statistics show one buffer obtained
+ sc = rtems_regulator_get_statistics(regulator, &stats);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(stats.obtained == 1);
+ rtems_test_assert(stats.released == 0);
+ rtems_test_assert(stats.delivered == 0);
+ rtems_test_assert(stats.period_statistics.count == 0);
+ rtems_test_assert(stats.period_statistics.missed_count == 0);
+
+
+ // Format and send the message -- statistics do not change
+ length = snprintf(message, MAXIMUM_MESSAGE_LENGTH, "message %d", 1024) + 1;
+ strcpy(buffer, message);
+
+ sc = rtems_regulator_send(regulator, buffer, length);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ // Ensure statistics show one buffer obtained
+ sc = rtems_regulator_get_statistics(regulator, &stats);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(stats.obtained == 1);
+ rtems_test_assert(stats.released == 0);
+ rtems_test_assert(stats.delivered == 0);
+ rtems_test_assert(stats.period_statistics.count == 0);
+ rtems_test_assert(stats.period_statistics.missed_count == 0);
+
+ // This is the actual failing case -- cannot delete w/outstanding
+ sc = rtems_regulator_delete(regulator, FIVE_SECONDS);
+ rtems_test_assert(sc == RTEMS_RESOURCE_IN_USE);
+
+ // Now let the deliveries happen
+ sleep(1);
+
+ // Ensure statistics show all buffers released
+ sc = rtems_regulator_get_statistics(regulator, &stats);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(stats.obtained == 1);
+ rtems_test_assert(stats.released == 1);
+ rtems_test_assert(stats.delivered == 1);
+ rtems_test_assert(stats.period_statistics.count != 0);
+ rtems_test_assert(stats.period_statistics.missed_count == 0);
+
+ rtems_test_assert(delivered_message_count == 1);
+ match = strncmp(
+ delivered_messages[0].message,
+ message,
+ MAXIMUM_MESSAGE_LENGTH
+ );
+ rtems_test_assert(match == 0);
+
+ sc = rtems_regulator_delete(regulator, FIVE_SECONDS);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ deliverer_logger_context.regulator = NULL;
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_send and output thread delivers message
+ *
+ * This unit test verifies that when the regulator is
+ * successfully initialized and used as expected, a message sent via
+ * rtems_regulator_send() is delivered as expected.
+ */
+static void test_regulator_send_one_message_OK(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_instance *regulator;
+ char message[MAXIMUM_MESSAGE_LENGTH];
+ void *buffer;
+ size_t length;
+ int match;
+ rtems_regulator_attributes attributes = {
+ .deliverer = test_regulator_deliverer_logger,
+ .deliverer_context = &deliverer_logger_context,
+ .maximum_message_size = 16,
+ .maximum_messages = 10,
+ .delivery_thread_priority = 16,
+ .delivery_thread_stack_size = 0,
+ .delivery_thread_period = RTEMS_MILLISECONDS_TO_TICKS(250),
+ .maximum_to_dequeue_per_period = 3
+ };
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(regulator != NULL);
+
+ deliverer_logger_context.regulator = regulator;
+
+ delivered_messages_reset();
+
+ sc = rtems_regulator_obtain_buffer(regulator, &buffer);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(buffer != NULL);
+
+ length = snprintf(message, MAXIMUM_MESSAGE_LENGTH, "message %d", 1024) + 1;
+ strcpy(buffer, message);
+
+ sc = rtems_regulator_send(regulator, buffer, length);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ sleep(1);
+
+ rtems_test_assert(delivered_message_count == 1);
+ match = strncmp(
+ delivered_messages[0].message,
+ message,
+ MAXIMUM_MESSAGE_LENGTH
+ );
+ rtems_test_assert(match == 0);
+
+ sc = rtems_regulator_delete(regulator, FIVE_SECONDS);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ deliverer_logger_context.regulator = NULL;
+}
+
+/**
+ * @ingroup RegulatorTests
+ * @brief Verify rtems_regulator_send and output thread delivers messages
+ *
+ * This unit test verifies that when the regulator is successfully initialized
+ * and used as expected, and multiple messages are sent via rtems_regulator_send()
+ * that they are delivered as expected.
+ */
+#include <stdio.h>
+static void test_regulator_send_multiple_messages_OK(void)
+{
+ rtems_status_code sc;
+ rtems_regulator_instance *regulator;
+ char message[MAXIMUM_MESSAGE_LENGTH];
+ void *buffer;
+ size_t length;
+ int match;
+ int i;
+ time_t base_time;
+ time_t tmp_time;
+ rtems_interval base_ticks;
+ rtems_interval ticks;
+ rtems_interval ticks_per_second;
+
+ rtems_regulator_attributes attributes = {
+ .deliverer = test_regulator_deliverer_logger,
+ .deliverer_context = &deliverer_logger_context,
+ .maximum_message_size = MAXIMUM_MESSAGE_LENGTH,
+ .maximum_messages = 10,
+ .delivery_thread_priority = 16,
+ .delivery_thread_stack_size = 0,
+ .delivery_thread_period = RTEMS_MILLISECONDS_TO_TICKS(1000),
+ .maximum_to_dequeue_per_period = 2
+ };
+
+ delivered_messages_reset();
+
+ sc = rtems_regulator_create(&attributes, &regulator);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(regulator != NULL);
+
+ deliverer_logger_context.regulator = regulator;
+
+ /*
+ * Ensure the messages are sent on a second boundary to ensure the
+ * output thread will process them as expected.
+ */
+ tmp_time = time(NULL);
+ do {
+ base_time = time(NULL);
+ } while (tmp_time == base_time);
+
+ /**
+ * Send five messages as a burst which will need to be smoothly sent at
+ * the configured rate.
+ */
+ for (i=1 ; i <= 5 ; i++) {
+ sc = rtems_regulator_obtain_buffer(regulator, &buffer);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(buffer != NULL);
+
+ length = snprintf(message, MAXIMUM_MESSAGE_LENGTH, "message %d", i);
+ strcpy(buffer, message);
+
+ sc = rtems_regulator_send(regulator, buffer, length);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ }
+
+ /*
+ * Let the output thread executed and deliver the messages.
+ */
+ sleep(5);
+
+ /**
+ * Ensure the five messages were delivered as follows:
+ *
+ * - deliver all 5
+ * - contents are "message N" where N is 1 to 5
+ * - message 1 and 2 delivered during the first second
+ * - message 3 and 4 delivered during the second second
+ * - message 5 delivered during the third second
+ * - no further messages delivered
+ */
+
+ rtems_test_assert(delivered_message_count == 5);
+
+ for (i=0 ; i < 5 ; i++) {
+ (void) snprintf(message, MAXIMUM_MESSAGE_LENGTH, "message %d", i+1);
+// printf("%d %s\n", i, delivered_messages[i].message);
+ match = strncmp(
+ delivered_messages[i].message,
+ message,
+ MAXIMUM_MESSAGE_LENGTH
+ );
+ rtems_test_assert(match == 0);
+ }
+
+ /**
+ * Verify that messages were delivered in the proper groups. Check that
+ * the delivery time matches expectations.
+ */
+ rtems_test_assert(delivered_messages[0].processed == delivered_messages[1].processed);
+ rtems_test_assert(delivered_messages[1].processed != delivered_messages[2].processed);
+ rtems_test_assert(delivered_messages[2].processed == delivered_messages[3].processed);
+ rtems_test_assert(delivered_messages[3].processed != delivered_messages[4].processed);
+
+ /**
+ * Verify that the message groups were properly spaced temporally. They
+ * should be one second apart.
+ */
+ ticks_per_second = rtems_clock_get_ticks_per_second();
+
+ base_ticks = delivered_messages[1].processed;
+ ticks = delivered_messages[2].processed;
+ rtems_test_assert(ticks_per_second == ticks - base_ticks);
+
+ base_ticks = delivered_messages[3].processed;
+ ticks = delivered_messages[4].processed;
+ rtems_test_assert(ticks_per_second == ticks - base_ticks);
+
+ sc = rtems_regulator_delete(regulator, FIVE_SECONDS);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ deliverer_logger_context.regulator = NULL;
+}
+
+/* Necessary prototype */
+rtems_task test_regulator(rtems_task_argument);
+
+/**
+ * @ingroup RegulatorTestshttps://devel.rtems.org/milestone/6.1
+ * @brief Test entry task which invokes test cases
+ */
+rtems_task test_regulator(rtems_task_argument arg)
+{
+ (void) arg;
+
+ TEST_BEGIN();
+
+ malloc_trigger_reset();
+
+ test_regulator_create_max_dequeue_zero();
+ test_regulator_create_null_attributes();
+ test_regulator_create_null_regulator();
+ test_regulator_create_deliverer_is_null();
+ test_regulator_create_maximum_messages_is_zero();
+ test_regulator_create_maximum_message_size_is_zero();
+ test_regulator_create_maximum_to_dequeue_per_period_is_zero();
+ test_regulator_create_malloc_regulator_fails();
+ test_regulator_create_malloc_buffers_fails();
+ test_regulator_create_delivery_thread_priority_is_zero();
+ test_regulator_create_partition_create_fails();
+ test_regulator_create_message_queue_create_fails();
+ test_regulator_create_task_create_fails();
+ test_regulator_create_rate_monotonic_create_fails();
+
+ test_regulator_delete_null_regulator();
+ test_regulator_delete_uninitialized_regulator();
+ test_regulator_delete_OK();
+
+ test_regulator_obtain_buffer_null_regulator();
+ test_regulator_obtain_buffer_uninitialized_regulator();
+ test_regulator_obtain_buffer_OK();
+
+ test_regulator_release_buffer_null_regulator();
+ test_regulator_release_buffer_uninitialized_regulator();
+ test_regulator_release_buffer_OK();
+
+ test_regulator_send_null_regulator();
+ test_regulator_send_null_message();
+ test_regulator_send_length_is_zero();
+ test_regulator_send_uninitialized_regulator();
+
+ test_regulator_send_one_message_OK();
+ test_regulator_cannot_delete_with_outstanding();
+
+ test_regulator_send_multiple_messages_OK();
+
+ TEST_END();
+
+ rtems_test_exit(0);
+}
diff --git a/testsuites/libtests/regulator01/regulator01.doc b/testsuites/libtests/regulator01/regulator01.doc
new file mode 100644
index 0000000000..ff4e8005ec
--- /dev/null
+++ b/testsuites/libtests/regulator01/regulator01.doc
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2023 OAR Corporation
+#
+# 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 OWNER 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.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: regulator01
+
+directives:
+ + rtems_regulator_create
+ + rtems_regulator_delete
+ + rtems_regulator_obtain_buffer
+ + rtems_regulator_release_buffer
+ + rtems_regulator_send
+
+concepts
+ + Verify rtems_regulator_create() maximum_to_dequeue_per_period
+ + Verify rtems_regulator_create() NULL attributes error
+ + Verify rtems_regulator_create NULL regulator error
+ + Verify rtems_regulator_create deliverer is NULL
+ + Verify rtems_regulator_create maximum_messages is 0 error
+ + Verify rtems_regulator_create maximum_message_size is 0 error
+ + Verify rtems_regulator_create maximum_to_dequeue_per_period is 0 error
+ + Verify rtems_regulator_create returns error on failure to allocate regulator
+ + Verify rtems_regulator_create returns error on failure to allocate buffers
+ + Verify rtems_regulator_create and delete work
+ + Verify rtems_regulator_create rtems_partition_create error
+ + Verify rtems_regulator_create rtems_message_queue_create error
+ + Verify rtems_regulator_create rtems_task_create error
+ + Verify Regulator Output Thread Handles Error on Period Create
+ + Verify rtems_regulator_delete NULL regulator error
+ + Verify rtems_regulator_delete uninitialized regulator error
+ + Verify rtems_regulator_delete successful case
+ + Verify rtems_regulator_obtain_buffer NULL regulator error
+ + Verify rtems_regulator_obtain_buffer uninitialized regulator error
+ + Verify rtems_regulator_obtain_buffer successful case
+ + Verify rtems_regulator_release_buffer NULL regulator error
+ + Verify rtems_regulator_release_buffer uninitialized regulator error
+ + Verify rtems_regulator_release_buffer successful case
+ + Verify rtems_regulator_send NULL regulator error
+ + Verify rtems_regulator_send NULL message error
+ + Verify rtems_regulator_send zero length message error
+ + Verify rtems_regulator_send uninitialized regulator error
+ + Verify rtems_regulator_send and output thread delivers message
+ + Verify rtems_regulator_send and cannot delete with outstanding messages
diff --git a/testsuites/libtests/regulator01/rtems_config.c b/testsuites/libtests/regulator01/rtems_config.c
new file mode 100644
index 0000000000..ca96e1b1dd
--- /dev/null
+++ b/testsuites/libtests/regulator01/rtems_config.c
@@ -0,0 +1,59 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @brief RTEMS Configuration for regulator tests
+ */
+
+/*
+ * COPYRIGHT (c) 2022. * On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
+
+#include <rtems.h>
+
+rtems_task test_regulator(rtems_task_argument);
+
+#include <bsp.h> /* for device driver prototypes */
+
+/* NOTICE: the clock driver is explicitly disabled */
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_INIT_TASK_ENTRY_POINT test_regulator
+#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
+
+/* Use hard limits to make it easier to trip object creation errors */
+#define CONFIGURE_MAXIMUM_TASKS 2
+#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
+#define CONFIGURE_MAXIMUM_PARTITIONS 1
+#define CONFIGURE_MAXIMUM_PERIODS 1
+
+#define CONFIGURE_UNIFIED_WORK_AREAS
+#define CONFIGURE_MINIMUM_TASK_STACK_SIZE (8 * 1024)
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
diff --git a/testsuites/libtests/rtmonuse/getall.c b/testsuites/libtests/rtmonuse/getall.c
index e9272f7b53..1965bd7c28 100644
--- a/testsuites/libtests/rtmonuse/getall.c
+++ b/testsuites/libtests/rtmonuse/getall.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Get_all_counters
*
* This routine allows TA5 to atomically obtain the iteration counters.
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/rtmonuse/init.c b/testsuites/libtests/rtmonuse/init.c
index a3f2ee10ca..bf7315e0d3 100644
--- a/testsuites/libtests/rtmonuse/init.c
+++ b/testsuites/libtests/rtmonuse/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/rtmonuse/system.h b/testsuites/libtests/rtmonuse/system.h
index 7f344a47e3..a83a2a3a0d 100644
--- a/testsuites/libtests/rtmonuse/system.h
+++ b/testsuites/libtests/rtmonuse/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/libtests/rtmonuse/task1.c b/testsuites/libtests/rtmonuse/task1.c
index b0db7fe4be..2d4baeb625 100644
--- a/testsuites/libtests/rtmonuse/task1.c
+++ b/testsuites/libtests/rtmonuse/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1_through_5
*
* This routine serves as a test task for the period capabilities of the
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/sha/init.c b/testsuites/libtests/sha/init.c
index 64d2d34b1f..7d8c4ada3e 100644
--- a/testsuites/libtests/sha/init.c
+++ b/testsuites/libtests/sha/init.c
@@ -1,23 +1,39 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#include <sha224.h>
#include <sha256.h>
+#include <sha384.h>
#include <sha512.h>
+#include <sha512t.h>
#include <stdio.h>
#include <string.h>
@@ -36,7 +52,32 @@ static const char *const test_vectors[] = {
};
static const unsigned char
-test_sha256_results[RTEMS_ARRAY_SIZE(test_vectors)][32] = {
+test_sha224_results[RTEMS_ARRAY_SIZE(test_vectors)][SHA224_DIGEST_LENGTH] = {
+ {
+ 0x23, 0x09, 0x7d, 0x22, 0x34, 0x05, 0xd8, 0x22,
+ 0x86, 0x42, 0xa4, 0x77, 0xbd, 0xa2, 0x55, 0xb3,
+ 0x2a, 0xad, 0xbc, 0xe4, 0xbd, 0xa0, 0xb3, 0xf7,
+ 0xe3, 0x6c, 0x9d, 0xa7
+ }, {
+ 0xd1, 0x4a, 0x02, 0x8c, 0x2a, 0x3a, 0x2b, 0xc9,
+ 0x47, 0x61, 0x02, 0xbb, 0x28, 0x82, 0x34, 0xc4,
+ 0x15, 0xa2, 0xb0, 0x1f, 0x82, 0x8e, 0xa6, 0x2a,
+ 0xc5, 0xb3, 0xe4, 0x2f
+ }, {
+ 0x75, 0x38, 0x8b, 0x16, 0x51, 0x27, 0x76, 0xcc,
+ 0x5d, 0xba, 0x5d, 0xa1, 0xfd, 0x89, 0x01, 0x50,
+ 0xb0, 0xc6, 0x45, 0x5c, 0xb4, 0xf5, 0x8b, 0x19,
+ 0x52, 0x52, 0x25, 0x25
+ }, {
+ 0xc9, 0x7c, 0xa9, 0xa5, 0x59, 0x85, 0x0c, 0xe9,
+ 0x7a, 0x04, 0xa9, 0x6d, 0xef, 0x6d, 0x99, 0xa9,
+ 0xe0, 0xe0, 0xe2, 0xab, 0x14, 0xe6, 0xb8, 0xdf,
+ 0x26, 0x5f, 0xc0, 0xb3
+ }
+};
+
+static const unsigned char
+test_sha256_results[RTEMS_ARRAY_SIZE(test_vectors)][SHA256_DIGEST_LENGTH] = {
{
0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea,
0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23,
@@ -61,7 +102,40 @@ test_sha256_results[RTEMS_ARRAY_SIZE(test_vectors)][32] = {
};
static const unsigned char
-test_sha512_results[RTEMS_ARRAY_SIZE(test_vectors)][64] = {
+test_sha384_results[RTEMS_ARRAY_SIZE(test_vectors)][SHA384_DIGEST_LENGTH] = {
+ {
+ 0xcb, 0x00, 0x75, 0x3f, 0x45, 0xa3, 0x5e, 0x8b,
+ 0xb5, 0xa0, 0x3d, 0x69, 0x9a, 0xc6, 0x50, 0x07,
+ 0x27, 0x2c, 0x32, 0xab, 0x0e, 0xde, 0xd1, 0x63,
+ 0x1a, 0x8b, 0x60, 0x5a, 0x43, 0xff, 0x5b, 0xed,
+ 0x80, 0x86, 0x07, 0x2b, 0xa1, 0xe7, 0xcc, 0x23,
+ 0x58, 0xba, 0xec, 0xa1, 0x34, 0xc8, 0x25, 0xa7
+ }, {
+ 0x38, 0xb0, 0x60, 0xa7, 0x51, 0xac, 0x96, 0x38,
+ 0x4c, 0xd9, 0x32, 0x7e, 0xb1, 0xb1, 0xe3, 0x6a,
+ 0x21, 0xfd, 0xb7, 0x11, 0x14, 0xbe, 0x07, 0x43,
+ 0x4c, 0x0c, 0xc7, 0xbf, 0x63, 0xf6, 0xe1, 0xda,
+ 0x27, 0x4e, 0xde, 0xbf, 0xe7, 0x6f, 0x65, 0xfb,
+ 0xd5, 0x1a, 0xd2, 0xf1, 0x48, 0x98, 0xb9, 0x5b
+ }, {
+ 0x33, 0x91, 0xfd, 0xdd, 0xfc, 0x8d, 0xc7, 0x39,
+ 0x37, 0x07, 0xa6, 0x5b, 0x1b, 0x47, 0x09, 0x39,
+ 0x7c, 0xf8, 0xb1, 0xd1, 0x62, 0xaf, 0x05, 0xab,
+ 0xfe, 0x8f, 0x45, 0x0d, 0xe5, 0xf3, 0x6b, 0xc6,
+ 0xb0, 0x45, 0x5a, 0x85, 0x20, 0xbc, 0x4e, 0x6f,
+ 0x5f, 0xe9, 0x5b, 0x1f, 0xe3, 0xc8, 0x45, 0x2b
+ }, {
+ 0x09, 0x33, 0x0c, 0x33, 0xf7, 0x11, 0x47, 0xe8,
+ 0x3d, 0x19, 0x2f, 0xc7, 0x82, 0xcd, 0x1b, 0x47,
+ 0x53, 0x11, 0x1b, 0x17, 0x3b, 0x3b, 0x05, 0xd2,
+ 0x2f, 0xa0, 0x80, 0x86, 0xe3, 0xb0, 0xf7, 0x12,
+ 0xfc, 0xc7, 0xc7, 0x1a, 0x55, 0x7e, 0x2d, 0xb9,
+ 0x66, 0xc3, 0xe9, 0xfa, 0x91, 0x74, 0x60, 0x39
+ }
+};
+
+static const unsigned char
+test_sha512_results[RTEMS_ARRAY_SIZE(test_vectors)][SHA512_DIGEST_LENGTH] = {
{
0xdd, 0xaf, 0x35, 0xa1, 0x93, 0x61, 0x7a, 0xba,
0xcc, 0x41, 0x73, 0x49, 0xae, 0x20, 0x41, 0x31,
@@ -101,6 +175,56 @@ test_sha512_results[RTEMS_ARRAY_SIZE(test_vectors)][64] = {
}
};
+static const unsigned char test_sha512_224_results
+[RTEMS_ARRAY_SIZE(test_vectors)][SHA512_224_DIGEST_LENGTH] = {
+ {
+ 0x46, 0x34, 0x27, 0x0f, 0x70, 0x7b, 0x6a, 0x54,
+ 0xda, 0xae, 0x75, 0x30, 0x46, 0x08, 0x42, 0xe2,
+ 0x0e, 0x37, 0xed, 0x26, 0x5c, 0xee, 0xe9, 0xa4,
+ 0x3e, 0x89, 0x24, 0xaa
+ }, {
+ 0x6e, 0xd0, 0xdd, 0x02, 0x80, 0x6f, 0xa8, 0x9e,
+ 0x25, 0xde, 0x06, 0x0c, 0x19, 0xd3, 0xac, 0x86,
+ 0xca, 0xbb, 0x87, 0xd6, 0xa0, 0xdd, 0xd0, 0x5c,
+ 0x33, 0x3b, 0x84, 0xf4
+ }, {
+ 0xe5, 0x30, 0x2d, 0x6d, 0x54, 0xbb, 0x24, 0x22,
+ 0x75, 0xd1, 0xe7, 0x62, 0x2d, 0x68, 0xdf, 0x6e,
+ 0xb0, 0x2d, 0xed, 0xd1, 0x3f, 0x56, 0x4c, 0x13,
+ 0xdb, 0xda, 0x21, 0x74
+ }, {
+ 0x23, 0xfe, 0xc5, 0xbb, 0x94, 0xd6, 0x0b, 0x23,
+ 0x30, 0x81, 0x92, 0x64, 0x0b, 0x0c, 0x45, 0x33,
+ 0x35, 0xd6, 0x64, 0x73, 0x4f, 0xe4, 0x0e, 0x72,
+ 0x68, 0x67, 0x4a, 0xf9
+ }
+};
+
+static const unsigned char test_sha512_256_results
+[RTEMS_ARRAY_SIZE(test_vectors)][SHA512_256_DIGEST_LENGTH] = {
+ {
+ 0x53, 0x04, 0x8e, 0x26, 0x81, 0x94, 0x1e, 0xf9,
+ 0x9b, 0x2e, 0x29, 0xb7, 0x6b, 0x4c, 0x7d, 0xab,
+ 0xe4, 0xc2, 0xd0, 0xc6, 0x34, 0xfc, 0x6d, 0x46,
+ 0xe0, 0xe2, 0xf1, 0x31, 0x07, 0xe7, 0xaf, 0x23
+ }, {
+ 0xc6, 0x72, 0xb8, 0xd1, 0xef, 0x56, 0xed, 0x28,
+ 0xab, 0x87, 0xc3, 0x62, 0x2c, 0x51, 0x14, 0x06,
+ 0x9b, 0xdd, 0x3a, 0xd7, 0xb8, 0xf9, 0x73, 0x74,
+ 0x98, 0xd0, 0xc0, 0x1e, 0xce, 0xf0, 0x96, 0x7a
+ }, {
+ 0xbd, 0xe8, 0xe1, 0xf9, 0xf1, 0x9b, 0xb9, 0xfd,
+ 0x34, 0x06, 0xc9, 0x0e, 0xc6, 0xbc, 0x47, 0xbd,
+ 0x36, 0xd8, 0xad, 0xa9, 0xf1, 0x18, 0x80, 0xdb,
+ 0xc8, 0xa2, 0x2a, 0x70, 0x78, 0xb6, 0xa4, 0x61
+ }, {
+ 0x39, 0x28, 0xe1, 0x84, 0xfb, 0x86, 0x90, 0xf8,
+ 0x40, 0xda, 0x39, 0x88, 0x12, 0x1d, 0x31, 0xbe,
+ 0x65, 0xcb, 0x9d, 0x3e, 0xf8, 0x3e, 0xe6, 0x14,
+ 0x6f, 0xea, 0xc8, 0x61, 0xe1, 0x9b, 0x56, 0x3a
+ }
+};
+
static void print_result(const unsigned char *r, size_t n)
{
size_t i;
@@ -120,6 +244,29 @@ static void print_result(const unsigned char *r, size_t n)
printf("\n");
}
+static void test_sha224(void)
+{
+ size_t i;
+
+ printf("test SHA224\n");
+
+ for (i = 0; i < RTEMS_ARRAY_SIZE(test_vectors); ++i) {
+ SHA224_CTX ctx;
+ unsigned char r[SHA224_DIGEST_LENGTH];
+ const char *s = test_vectors[i];
+
+ SHA224_Init(&ctx);
+ SHA224_Update(&ctx, s, strlen(s));
+ SHA224_Final(r, &ctx);
+
+ print_result(&r[0], sizeof(r));
+
+ rtems_test_assert(
+ memcmp(&r[0], &test_sha224_results[i][0], sizeof(r)) == 0
+ );
+ }
+}
+
static void test_sha256(void)
{
size_t i;
@@ -128,7 +275,7 @@ static void test_sha256(void)
for (i = 0; i < RTEMS_ARRAY_SIZE(test_vectors); ++i) {
SHA256_CTX ctx;
- unsigned char r[32];
+ unsigned char r[SHA256_DIGEST_LENGTH];
const char *s = test_vectors[i];
SHA256_Init(&ctx);
@@ -143,6 +290,29 @@ static void test_sha256(void)
}
}
+static void test_sha384(void)
+{
+ size_t i;
+
+ printf("test SHA384\n");
+
+ for (i = 0; i < RTEMS_ARRAY_SIZE(test_vectors); ++i) {
+ SHA384_CTX ctx;
+ unsigned char r[SHA384_DIGEST_LENGTH];
+ const char *s = test_vectors[i];
+
+ SHA384_Init(&ctx);
+ SHA384_Update(&ctx, s, strlen(s));
+ SHA384_Final(r, &ctx);
+
+ print_result(&r[0], sizeof(r));
+
+ rtems_test_assert(
+ memcmp(&r[0], &test_sha384_results[i][0], sizeof(r)) == 0
+ );
+ }
+}
+
static void test_sha512(void)
{
size_t i;
@@ -151,7 +321,7 @@ static void test_sha512(void)
for (i = 0; i < RTEMS_ARRAY_SIZE(test_vectors); ++i) {
SHA512_CTX ctx;
- unsigned char r[64];
+ unsigned char r[SHA512_DIGEST_LENGTH];
const char *s = test_vectors[i];
SHA512_Init(&ctx);
@@ -166,12 +336,62 @@ static void test_sha512(void)
}
}
+static void test_sha512_224(void)
+{
+ size_t i;
+
+ printf("test SHA512-224\n");
+
+ for (i = 0; i < RTEMS_ARRAY_SIZE(test_vectors); ++i) {
+ SHA512_CTX ctx;
+ unsigned char r[SHA512_224_DIGEST_LENGTH];
+ const char *s = test_vectors[i];
+
+ SHA512_224_Init(&ctx);
+ SHA512_224_Update(&ctx, s, strlen(s));
+ SHA512_224_Final(r, &ctx);
+
+ print_result(&r[0], sizeof(r));
+
+ rtems_test_assert(
+ memcmp(&r[0], &test_sha512_224_results[i][0], sizeof(r)) == 0
+ );
+ }
+}
+
+static void test_sha512_256(void)
+{
+ size_t i;
+
+ printf("test SHA512-256\n");
+
+ for (i = 0; i < RTEMS_ARRAY_SIZE(test_vectors); ++i) {
+ SHA512_CTX ctx;
+ unsigned char r[SHA512_256_DIGEST_LENGTH];
+ const char *s = test_vectors[i];
+
+ SHA512_256_Init(&ctx);
+ SHA512_256_Update(&ctx, s, strlen(s));
+ SHA512_256_Final(r, &ctx);
+
+ print_result(&r[0], sizeof(r));
+
+ rtems_test_assert(
+ memcmp(&r[0], &test_sha512_256_results[i][0], sizeof(r)) == 0
+ );
+ }
+}
+
static void Init(rtems_task_argument arg)
{
TEST_BEGIN();
+ test_sha224();
test_sha256();
+ test_sha384();
test_sha512();
+ test_sha512_224();
+ test_sha512_256();
rtems_stack_checker_report_usage();
TEST_END();
diff --git a/testsuites/libtests/shell01/init.c b/testsuites/libtests/shell01/init.c
index a69bbc0cdb..83564d9937 100644
--- a/testsuites/libtests/shell01/init.c
+++ b/testsuites/libtests/shell01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2019 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2019 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/sparsedisk01/init.c b/testsuites/libtests/sparsedisk01/init.c
index abb1ee394b..5398bf98ce 100644
--- a/testsuites/libtests/sparsedisk01/init.c
+++ b/testsuites/libtests/sparsedisk01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/spi01/init.c b/testsuites/libtests/spi01/init.c
index a32f34b5c0..7b68d0f76a 100644
--- a/testsuites/libtests/spi01/init.c
+++ b/testsuites/libtests/spi01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/stackchk/blow.c b/testsuites/libtests/stackchk/blow.c
index 3b8bb7842f..e394d7233d 100644
--- a/testsuites/libtests/stackchk/blow.c
+++ b/testsuites/libtests/stackchk/blow.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* task1.c
*
* This set of three tasks do some simple task switching for about
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/stackchk/init.c b/testsuites/libtests/stackchk/init.c
index da22a7ab50..b6f57f80fe 100644
--- a/testsuites/libtests/stackchk/init.c
+++ b/testsuites/libtests/stackchk/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/stackchk/stackchk.doc b/testsuites/libtests/stackchk/stackchk.doc
index febe9e3ac6..ebc01d4f96 100644
--- a/testsuites/libtests/stackchk/stackchk.doc
+++ b/testsuites/libtests/stackchk/stackchk.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/stackchk/system.h b/testsuites/libtests/stackchk/system.h
index cdadb78c69..8f984e07d1 100644
--- a/testsuites/libtests/stackchk/system.h
+++ b/testsuites/libtests/stackchk/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/libtests/stackchk/task1.c b/testsuites/libtests/stackchk/task1.c
index 7a9f488ff0..8c495c3f69 100644
--- a/testsuites/libtests/stackchk/task1.c
+++ b/testsuites/libtests/stackchk/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* task1.c
*
* This set of three tasks do some simple task switching for about
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -25,7 +44,7 @@ rtems_task Task_1_through_3(
rtems_time_of_day time;
rtems_status_code status;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident" );
while( FOREVER ) {
diff --git a/testsuites/libtests/stackchk01/init.c b/testsuites/libtests/stackchk01/init.c
index 8e907e6d48..b87b6baa2d 100644
--- a/testsuites/libtests/stackchk01/init.c
+++ b/testsuites/libtests/stackchk01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -16,14 +35,18 @@
const char rtems_test_name[] = "STACKCHK 1";
-/* forward declarations to avoid warnings */
-rtems_task Init(rtems_task_argument argument);
+static void stack_visitor( const rtems_stack_checker_info *info, void *arg )
+{
+ if ( rtems_object_id_get_api( info->id ) == 1 ) {
+ *(uintptr_t *) arg = info->used;
+ }
+}
-rtems_task Init(
- rtems_task_argument argument
-)
+static rtems_task Init( rtems_task_argument argument )
{
- bool blown;
+ bool blown;
+ uintptr_t used;
+ uintptr_t limit;
TEST_BEGIN();
@@ -31,14 +54,26 @@ rtems_task Init(
blown = rtems_stack_checker_is_blown();
rtems_test_assert(!blown);
+ rtems_task_wake_after( 2 );
+ used = 0;
+ rtems_stack_checker_iterate( stack_visitor, &used );
+ limit = CPU_STACK_MINIMUM_SIZE / 4;
+ printf(
+ "check used IDLE stack size: 0 < %" PRIuPTR " <= %" PRIuPTR "\n",
+ used,
+ limit
+ );
+ rtems_test_assert( used > 0 );
+ rtems_test_assert( used <= limit );
+
TEST_END();
rtems_test_exit(0);
}
/* configuration information */
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
diff --git a/testsuites/libtests/stackchk01/stackchk01.doc b/testsuites/libtests/stackchk01/stackchk01.doc
index c4dea4d9b6..cbb9fb62f9 100644
--- a/testsuites/libtests/stackchk01/stackchk01.doc
+++ b/testsuites/libtests/stackchk01/stackchk01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
@@ -11,9 +30,17 @@ This file describes the directives and concepts tested by this test set.
test set name: stackchk01
directives:
- rtems_stack_checker_is_blown
+
+* CPU_STACK_MINIMUM_SIZE
+
+* rtems_stack_checker_is_blown
+
+* rtems_stack_checker_iterate
concepts:
-+ ensure that dynamic checks for a blown stack work both when the stack
+* Ensure that dynamic checks for a blown stack work both when the stack
is not blown and when it is.
+
+* Ensure that the CPU_STACK_MINIMUM_SIZE is suffiently larger than the stack
+ usage in simple applications.
diff --git a/testsuites/libtests/stackchk02/init.c b/testsuites/libtests/stackchk02/init.c
new file mode 100644
index 0000000000..0904e37c68
--- /dev/null
+++ b/testsuites/libtests/stackchk02/init.c
@@ -0,0 +1,67 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup libtests
+ */
+
+/*
+ * Copyright (C) 2022 On-Line Applications Research Corporation (OAR)
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define CONFIGURE_INIT
+
+#include <tmacros.h>
+
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE*3)
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#include <rtems/confdefs.h>
+
+#include <rtems/stackchk.h>
+
+const char rtems_test_name[] = "STACKCHK02";
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ TEST_BEGIN();
+
+ rtems_stack_checker_report_usage();
+
+ TEST_END();
+ rtems_test_exit( 0 );
+}
diff --git a/testsuites/libtests/stackchk02/stackchk02.doc b/testsuites/libtests/stackchk02/stackchk02.doc
new file mode 100644
index 0000000000..e2fca9d890
--- /dev/null
+++ b/testsuites/libtests/stackchk02/stackchk02.doc
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
+# COPYRIGHT (c) 2022.
+# On-Line Applications Research Corporation (OAR).
+# 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 OWNER 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.
+#
+This file describes the directives and concepts tested by this test set.
+
+test set name: stackchk02
+
+directives:
+ + rtems_stack_checker_report_usage
+
+concepts:
+ + This task verifies that the stack checker will not perform bad
+ accesses when not properly enabled.
diff --git a/testsuites/libtests/stackchk02/stackchk02.scn b/testsuites/libtests/stackchk02/stackchk02.scn
new file mode 100644
index 0000000000..bb2b782490
--- /dev/null
+++ b/testsuites/libtests/stackchk02/stackchk02.scn
@@ -0,0 +1,7 @@
+*** TEST STACKCHK02 ***
+ STACK USAGE BY THREAD
+ID NAME LOW HIGH CURRENT AVAIL USED
+0x09010001 IDLE 0x10104940 0x1010713f 0x10107140 10224 N/A
+0x0a010001 UI1 0x10109950 0x1010c14f 0x1010c150 10224 N/A
+
+*** END OF TEST STACKCHK02 ***
diff --git a/testsuites/libtests/stringto01/init.c b/testsuites/libtests/stringto01/init.c
index 02a9360604..594ba3f08d 100644
--- a/testsuites/libtests/stringto01/init.c
+++ b/testsuites/libtests/stringto01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/stringto01/stringto01.doc b/testsuites/libtests/stringto01/stringto01.doc
index 88e0b8b7eb..590d4b8634 100644
--- a/testsuites/libtests/stringto01/stringto01.doc
+++ b/testsuites/libtests/stringto01/stringto01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/stringto01/stringto_test_template.h b/testsuites/libtests/stringto01/stringto_test_template.h
index 1309b4bda4..44e6c5cff1 100644
--- a/testsuites/libtests/stringto01/stringto_test_template.h
+++ b/testsuites/libtests/stringto01/stringto_test_template.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if defined(STRING_TO_POINTER)
diff --git a/testsuites/libtests/tar01/init.c b/testsuites/libtests/tar01/init.c
index 4cad67a6ae..00a723656a 100644
--- a/testsuites/libtests/tar01/init.c
+++ b/testsuites/libtests/tar01/init.c
@@ -1,10 +1,56 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
+ */
+
+/*
+ * Note on the used tar file: Generate the file on a system that supports
+ * symlinks with the following commands (tested on Linux - you might have to
+ * adapt on other systems):
+ *
+ * export WORK=some_work_directory
+ * rm -r ${WORK}
+ * mkdir -p ${WORK}/home/abc/def
+ * mkdir -p ${WORK}/home/dir
+ * cd ${WORK}
+ * echo "#! joel" > home/abc/def/test_script
+ * echo "ls -las /dev" >> home/abc/def/test_script
+ * chmod 755 home/abc/def/test_script
+ * echo "This is a test of loading an RTEMS filesystem from an" > home/test_file
+ * echo "initial tar image." >> home/test_file
+ * echo "Hello world" >> home/dir/file
+ * ln -s home/test_file symlink
+ * tar cf tar01.tar --format=ustar \
+ * symlink \
+ * home/test_file \
+ * home/abc/def/test_script \
+ * home/dir
+ *
+ * Note that "home/dir" is in the archive as separate directory. "home/abc" is
+ * only in the archive as a parent of the file "test_script".
*/
#ifdef HAVE_CONFIG_H
@@ -95,6 +141,84 @@ void test_untar_from_memory(void)
}
+static void assert_file_content(
+ const char *name,
+ const char *expected_content,
+ ssize_t expected_size
+)
+{
+ char buf[16];
+ int fd;
+ int rd;
+
+ fd = open(name, O_RDONLY);
+ rtems_test_assert( fd >= 0 );
+ do {
+ rd = read(fd, buf, sizeof(buf));
+ rtems_test_assert( rd >= 0 );
+ if (rd > 0) {
+ rtems_test_assert( expected_size - rd >= 0 );
+ rtems_test_assert( memcmp(buf, expected_content, rd) == 0 );
+ expected_content += rd;
+ expected_size -= rd;
+ }
+ } while(rd > 0);
+ rtems_test_assert( expected_size == 0 );
+ close(fd);
+}
+
+static void assert_content_like_expected(void)
+{
+ const char *directories[] = {
+ "home",
+ "home/abc",
+ "home/abc/def",
+ "home/dir",
+ };
+ const char *symlinks[] = {
+ "symlink",
+ };
+ const struct {
+ const char *name;
+ const char *content;
+ } files[] = {
+ {
+ .name = "home/abc/def/test_script",
+ .content = "#! joel\nls -las /dev\n",
+ }, {
+ .name = "home/test_file",
+ .content = "This is a test of loading an RTEMS filesystem from an\n"
+ "initial tar image.\n",
+ }, {
+ .name = "home/dir/file",
+ .content = "Hello world\n",
+ }
+ };
+ size_t i;
+ struct stat st;
+
+ for(i = 0; i < RTEMS_ARRAY_SIZE(directories); ++i) {
+ lstat(directories[i], &st);
+ rtems_test_assert( S_ISDIR(st.st_mode) );
+ }
+
+ for(i = 0; i < RTEMS_ARRAY_SIZE(symlinks); ++i) {
+ lstat(symlinks[i], &st);
+ rtems_test_assert( S_ISLNK(st.st_mode) );
+ }
+
+ for(i = 0; i < RTEMS_ARRAY_SIZE(files); ++i) {
+ lstat(files[i].name, &st);
+ rtems_test_assert( S_ISREG(st.st_mode) );
+
+ assert_file_content(
+ files[i].name,
+ files[i].content,
+ strlen(files[i].content)
+ );
+ }
+}
+
void test_untar_from_file(void)
{
int fd;
@@ -119,13 +243,105 @@ void test_untar_from_file(void)
rv = chdir( "/dest" );
rtems_test_assert( rv == 0 );
- /* Untar it */
+ /* Case 1: Untar it into empty directory */
rv = Untar_FromFile( "/test.tar" );
printf("Untaring from file - ");
if (rv != UNTAR_SUCCESSFUL) {
printf ("error: untar failed: %i\n", rv);
exit(1);
}
+ assert_content_like_expected();
+ printf ("successful\n");
+
+ /* Case 2: Most files exist */
+ rv = unlink("/dest/home/test_file");
+ rtems_test_assert( rv == 0 );
+
+ rv = Untar_FromFile( "/test.tar" );
+ printf("Untar from file into existing structure with one missing file - ");
+ if (rv != UNTAR_SUCCESSFUL) {
+ printf ("error: untar failed: %i\n", rv);
+ exit(1);
+ }
+ assert_content_like_expected();
+ printf ("successful\n");
+
+ /* Case 3: An empty directory exists where a file should be */
+ rv = unlink("/dest/home/test_file");
+ rtems_test_assert( rv == 0 );
+ rv = mkdir("/dest/home/test_file", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
+ rtems_test_assert( rv == 0 );
+
+ rv = Untar_FromFile( "/test.tar" );
+ printf("Untar from file; overwrite empty directory with file - ");
+ if (rv != UNTAR_SUCCESSFUL) {
+ printf ("error: untar failed: %i\n", rv);
+ exit(1);
+ }
+ assert_content_like_expected();
+ printf ("successful\n");
+
+ /* Case 4: A file exists where a parent directory should be created */
+ rv = unlink("/dest/home/abc/def/test_script");
+ rtems_test_assert( rv == 0 );
+ rv = unlink("/dest/home/abc/def");
+ rtems_test_assert( rv == 0 );
+ rv = unlink("/dest/home/abc");
+ rtems_test_assert( rv == 0 );
+ fd = creat("/dest/home/abc", S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ rtems_test_assert( fd >= 0 );
+ close(fd);
+
+ rv = Untar_FromFile( "/test.tar" );
+ printf("Untar from file; file exists where parent dir should be created - ");
+ if (rv != UNTAR_FAIL) {
+ printf ("error: untar didn't fail like expected: %i\n", rv);
+ exit(1);
+ }
+ printf ("expected fail\n");
+ /* cleanup so that the next one works */
+ rv = unlink("/dest/home/abc");
+ rtems_test_assert( rv == 0 );
+
+ /* Case 5: A non-empty directory exists where a file should be created */
+ rv = unlink("/dest/home/test_file");
+ rtems_test_assert( rv == 0 );
+ rv = mkdir("/dest/home/test_file", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
+ rtems_test_assert( rv == 0 );
+ fd = creat("/dest/home/test_file/file",
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ rtems_test_assert( fd >= 0 );
+ close(fd);
+
+ rv = Untar_FromFile( "/test.tar" );
+ printf("Untar from file; non-empty dir where file should be created - ");
+ if (rv != UNTAR_FAIL) {
+ printf ("error: untar didn't fail like expected: %i\n", rv);
+ exit(1);
+ }
+ printf ("expected fail\n");
+ /* cleanup so that the next one works */
+ rv = unlink("/dest/home/test_file/file");
+ rtems_test_assert( rv == 0 );
+ rv = unlink("/dest/home/test_file");
+ rtems_test_assert( rv == 0 );
+
+ /* Case 6: A file exists where a directory is explicitly in the archive */
+ rv = unlink("/dest/home/dir/file");
+ rtems_test_assert( rv == 0 );
+ rv = unlink("/dest/home/dir");
+ rtems_test_assert( rv == 0 );
+ fd = creat("/dest/home/dir", S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ rtems_test_assert( fd >= 0 );
+ close(fd);
+
+ rv = Untar_FromFile( "/test.tar" );
+ printf("Untar from file; overwrite file with explicit directory - ");
+ if (rv != UNTAR_SUCCESSFUL) {
+ printf ("error: untar failed: %i\n", rv);
+ exit(1);
+ }
+ assert_content_like_expected();
printf ("successful\n");
/******************/
diff --git a/testsuites/libtests/tar01/tar01.doc b/testsuites/libtests/tar01/tar01.doc
index 060f98a813..1530321f49 100644
--- a/testsuites/libtests/tar01/tar01.doc
+++ b/testsuites/libtests/tar01/tar01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
@@ -20,3 +39,4 @@ directives:
concepts:
+ exercise these routines
++ check whether existing files are overwritten or not overwritten like expected
diff --git a/testsuites/libtests/tar01/tar01.scn b/testsuites/libtests/tar01/tar01.scn
index 68fa951881..dd72f9517b 100644
--- a/testsuites/libtests/tar01/tar01.scn
+++ b/testsuites/libtests/tar01/tar01.scn
@@ -1,9 +1,24 @@
-*** TAR01 TEST ***
-Untaring from memory - successful
+*** BEGIN OF TEST TAR 1 ***
+*** TEST VERSION: 6.0.0.e1efb4eb8a9d6dd5f6f37dafc9feb0a9e6a888f1
+*** TEST STATE: EXPECTED_PASS
+*** TEST BUILD: RTEMS_POSIX_API
+*** TEST TOOLS: 10.3.1 20210409 (RTEMS 6, RSB ad54d1dd3cf8249d9d39deb1dd28b2f294df062d-modified, Newlib eb03ac1)
+Untaring from memory - untar: memory at 0x11ece8 (10240)
+untar: symlink: home/test_file -> symlink
+untar: file: home/test_file (s:73,m:0644)
+untar: file: home/abc/def/test_script (s:21,m:0755)
+untar: dir: home/dir
+untar: file: home/dir/file (s:12,m:0644)
+successful
========= /home/test_file =========
(0)This is a test of loading an RTEMS filesystem from an
initial tar image.
+========= /home/abc/def/test_script =========
+(0)#! joel
+ls -las /dev
+
+ /home/abc/def/test_script: mode: 0755 want: 0755
========= /symlink =========
(0)This is a test of loading an RTEMS filesystem from an
initial tar image.
@@ -11,35 +26,58 @@ initial tar image.
Copy tar image to test.tar
Untaring from file - successful
+Untar from file into existing structure with one missing file - successful
+Untar from file; overwrite empty directory with file - successful
+Untar from file; file exists where parent dir should be created - expected fail
+Untar from file; non-empty dir where file should be created - expected fail
+Untar from file; overwrite file with explicit directory - successful
========= /dest/home/test_file =========
(0)This is a test of loading an RTEMS filesystem from an
initial tar image.
+========= /dest/home/abc/def/test_script =========
+(0)#! joel
+ls -las /dev
+
+ /dest/home/abc/def/test_script: mode: 0755 want: 0755
========= /dest/symlink =========
(0)This is a test of loading an RTEMS filesystem from an
initial tar image.
-Untaring chunks from memory - untar: dir: home
-untar: file: home/test_file (73)
+Untaring chunks from memory - untar: symlink: home/test_file -> symlink
+untar: file: home/test_file (s:73,m:0644)
+untar: file: home/abc/def/test_script (s:21,m:0755)
+untar: dir: home/dir
+untar: file: home/dir/file (s:12,m:0644)
successful
========= /dest2/home/test_file =========
(0)This is a test of loading an RTEMS filesystem from an
initial tar image.
+========= /dest2/home/abc/def/test_script =========
+(0)#! joel
+ls -las /dev
+
+ /dest2/home/abc/def/test_script: mode: 0755 want: 0755
========= /dest2/symlink =========
(0)This is a test of loading an RTEMS filesystem from an
initial tar image.
-Untaring chunks from tgz- untar: dir: home
-untar: file: home/test_file (73)
-successful
+Untaring chunks from tgz - successful
========= /dest3/home/test_file =========
(0)This is a test of loading an RTEMS filesystem from an
initial tar image.
+========= /dest3/home/abc/def/test_script =========
+(0)#! joel
+ls -las /dev
+
+ /dest3/home/abc/def/test_script: mode: 0755 want: 0755
========= /dest3/symlink =========
(0)This is a test of loading an RTEMS filesystem from an
initial tar image.
-*** END OF TAR01 TEST ***
+
+
+*** END OF TEST TAR 1 ***
diff --git a/testsuites/libtests/tar01/tar01.tar b/testsuites/libtests/tar01/tar01.tar
index 6c6952ef18..9874f426d1 100644
--- a/testsuites/libtests/tar01/tar01.tar
+++ b/testsuites/libtests/tar01/tar01.tar
Binary files differ
diff --git a/testsuites/libtests/tar02/init.c b/testsuites/libtests/tar02/init.c
index 809923719b..f25c78ece6 100644
--- a/testsuites/libtests/tar02/init.c
+++ b/testsuites/libtests/tar02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/tar02/tar02.doc b/testsuites/libtests/tar02/tar02.doc
index f2d4c343f0..7e2a4dde16 100644
--- a/testsuites/libtests/tar02/tar02.doc
+++ b/testsuites/libtests/tar02/tar02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/tar03/init.c b/testsuites/libtests/tar03/init.c
index 142cdecfdf..50aee936bc 100644
--- a/testsuites/libtests/tar03/init.c
+++ b/testsuites/libtests/tar03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/tar03/tar03.doc b/testsuites/libtests/tar03/tar03.doc
index f09612f1e6..4a979e4ec3 100644
--- a/testsuites/libtests/tar03/tar03.doc
+++ b/testsuites/libtests/tar03/tar03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/termios/README b/testsuites/libtests/termios/README
index 2b8fcab856..7ff007c778 100644
--- a/testsuites/libtests/termios/README
+++ b/testsuites/libtests/termios/README
@@ -82,10 +82,7 @@ Clear???
---
Eric Norum
-eric@skatter.usask.ca
-Saskatchewan Accelerator Laboratory
-University of Saskatchewan
-Saskatoon, Canada.
+eric@norum.ca
Charles-Antoine Gauthier
Software Engineering Group
diff --git a/testsuites/libtests/termios/init.c b/testsuites/libtests/termios/init.c
index 558f095449..81ca5b75e6 100644
--- a/testsuites/libtests/termios/init.c
+++ b/testsuites/libtests/termios/init.c
@@ -1,19 +1,13 @@
/*
* RTEMS configuration/initialization
- *
+ */
+
+/*
* This program may be distributed and used for any purpose.
- * I ask only that you:
- * 1. Leave this author information intact.
- * 2. Document any changes you make.
*
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * eric@skatter.usask.ca
+ * Copyright (c) 1997 Eric Norum <eric@norum.ca>
*
- * Additions:
- * Charles-Antoine Gauthier
+ * Copyright (c) 2000 Charles-Antoine Gauthier <charles.gauthier@nrc.ca>
* Software Engineering Group
* Institute for Information Technology
* National Research Council of Canada
diff --git a/testsuites/libtests/termios01/init.c b/testsuites/libtests/termios01/init.c
index 09be07bbcc..13c28490e1 100644
--- a/testsuites/libtests/termios01/init.c
+++ b/testsuites/libtests/termios01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/termios01/termios01.doc b/testsuites/libtests/termios01/termios01.doc
index ebc9c7aef2..2ba39696c9 100644
--- a/testsuites/libtests/termios01/termios01.doc
+++ b/testsuites/libtests/termios01/termios01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/termios01/termios_testdriver.c b/testsuites/libtests/termios01/termios_testdriver.c
index bd5c7a12d2..49810a37e0 100644
--- a/testsuites/libtests/termios01/termios_testdriver.c
+++ b/testsuites/libtests/termios01/termios_testdriver.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -173,7 +192,7 @@ rtems_device_driver termios_test_driver_open(
termios_test_driver_set_attributes, /* setAttributes */
NULL, /* stopRemoteTx */
NULL, /* startRemoteTx */
- 0 /* outputUsesInterrupts */
+ TERMIOS_POLLED /* outputUsesInterrupts */
};
if ( minor > 2 ) {
diff --git a/testsuites/libtests/termios01/termios_testdriver.h b/testsuites/libtests/termios01/termios_testdriver.h
index f7f1241e9d..ba26a0485c 100644
--- a/testsuites/libtests/termios01/termios_testdriver.h
+++ b/testsuites/libtests/termios01/termios_testdriver.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file termios_testdriver.h
*/
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef _TERMIOS_TESTDRIVER_H
diff --git a/testsuites/libtests/termios02/init.c b/testsuites/libtests/termios02/init.c
index fe16150513..06869bc4a5 100644
--- a/testsuites/libtests/termios02/init.c
+++ b/testsuites/libtests/termios02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/termios02/termios02.doc b/testsuites/libtests/termios02/termios02.doc
index 4e0c03555c..5816810cec 100644
--- a/testsuites/libtests/termios02/termios02.doc
+++ b/testsuites/libtests/termios02/termios02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/termios03/init.c b/testsuites/libtests/termios03/init.c
index 6f602f4df9..5600d2584a 100644
--- a/testsuites/libtests/termios03/init.c
+++ b/testsuites/libtests/termios03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/termios03/termios03.doc b/testsuites/libtests/termios03/termios03.doc
index 5905f8cd6c..0e30571dc4 100644
--- a/testsuites/libtests/termios03/termios03.doc
+++ b/testsuites/libtests/termios03/termios03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/termios03/termios_testdriver_polled.c b/testsuites/libtests/termios03/termios_testdriver_polled.c
index 676c3aacbd..8daf8d6685 100644
--- a/testsuites/libtests/termios03/termios_testdriver_polled.c
+++ b/testsuites/libtests/termios03/termios_testdriver_polled.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -140,7 +159,7 @@ rtems_device_driver termios_test_driver_open(
termios_test_driver_set_attributes, /* setAttributes */
NULL, /* stopRemoteTx */
NULL, /* startRemoteTx */
- 0 /* outputUsesInterrupts */
+ TERMIOS_POLLED /* outputUsesInterrupts */
};
if ( minor > 2 ) {
diff --git a/testsuites/libtests/termios03/termios_testdriver_polled.h b/testsuites/libtests/termios03/termios_testdriver_polled.h
index 6288a09a41..d804a2107f 100644
--- a/testsuites/libtests/termios03/termios_testdriver_polled.h
+++ b/testsuites/libtests/termios03/termios_testdriver_polled.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file termios_testdriver.h
*/
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef _TERMIOS_TESTDRIVER_H
diff --git a/testsuites/libtests/termios04/init.c b/testsuites/libtests/termios04/init.c
index fe2adeb40d..4bee57def2 100644
--- a/testsuites/libtests/termios04/init.c
+++ b/testsuites/libtests/termios04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/termios04/termios04.doc b/testsuites/libtests/termios04/termios04.doc
index 3ad36a49d7..823c0d816e 100644
--- a/testsuites/libtests/termios04/termios04.doc
+++ b/testsuites/libtests/termios04/termios04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/termios04/termios_testdriver_impl.h b/testsuites/libtests/termios04/termios_testdriver_impl.h
index 53764fb9da..740f9e0778 100644
--- a/testsuites/libtests/termios04/termios_testdriver_impl.h
+++ b/testsuites/libtests/termios04/termios_testdriver_impl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -252,7 +271,7 @@ rtems_device_driver termios_test_driver_open(
#if defined(TASK_DRIVEN)
TERMIOS_TASK_DRIVEN /* outputUsesInterrupts */
#else
- 0 /* outputUsesInterrupts */
+ TERMIOS_POLLED /* outputUsesInterrupts */
#endif
};
diff --git a/testsuites/libtests/termios04/termios_testdriver_intr.c b/testsuites/libtests/termios04/termios_testdriver_intr.c
index 5946c29a4e..7d524ae151 100644
--- a/testsuites/libtests/termios04/termios_testdriver_intr.c
+++ b/testsuites/libtests/termios04/termios_testdriver_intr.c
@@ -1 +1,36 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup libtests
+ *
+ * @brief This is termios_testdriver_intr for termios04.
+ */
+
+/*
+ * Copyright (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#include "termios_testdriver_impl.h"
diff --git a/testsuites/libtests/termios04/termios_testdriver_intr.h b/testsuites/libtests/termios04/termios_testdriver_intr.h
index f4ebb59e53..f3f1815740 100644
--- a/testsuites/libtests/termios04/termios_testdriver_intr.h
+++ b/testsuites/libtests/termios04/termios_testdriver_intr.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file termios_testdriver.h
*/
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef _TERMIOS_TESTDRIVER_H
diff --git a/testsuites/libtests/termios05/init.c b/testsuites/libtests/termios05/init.c
index 1cd5c7371d..8f40ed5007 100644
--- a/testsuites/libtests/termios05/init.c
+++ b/testsuites/libtests/termios05/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/termios05/termios05.doc b/testsuites/libtests/termios05/termios05.doc
index 009a288664..08ae1d5ee1 100644
--- a/testsuites/libtests/termios05/termios05.doc
+++ b/testsuites/libtests/termios05/termios05.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/termios05/termios_testdriver_task.c b/testsuites/libtests/termios05/termios_testdriver_task.c
index e1b31810a7..d38182c631 100644
--- a/testsuites/libtests/termios05/termios_testdriver_task.c
+++ b/testsuites/libtests/termios05/termios_testdriver_task.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup libtests
+ *
+ * @brief This is termios_testdriver_task for termios05.
+ */
+
+/*
+ * Copyright (C) 1989-2010 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define TASK_DRIVEN
#include "../termios04/termios_testdriver_impl.h"
diff --git a/testsuites/libtests/termios06/init.c b/testsuites/libtests/termios06/init.c
index 5104d1b724..5705ecb35f 100644
--- a/testsuites/libtests/termios06/init.c
+++ b/testsuites/libtests/termios06/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/termios06/termios06.doc b/testsuites/libtests/termios06/termios06.doc
index 9bedda7a0b..beaf0ea64c 100644
--- a/testsuites/libtests/termios06/termios06.doc
+++ b/testsuites/libtests/termios06/termios06.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/termios06/test_pppd.c b/testsuites/libtests/termios06/test_pppd.c
index d674e7b5e4..a6f68a956c 100644
--- a/testsuites/libtests/termios06/test_pppd.c
+++ b/testsuites/libtests/termios06/test_pppd.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -25,7 +44,7 @@ int pppread(struct rtems_termios_tty *tty, rtems_libio_rw_args_t *rw_args);
int pppwrite(struct rtems_termios_tty *tty, rtems_libio_rw_args_t *rw_args);
int pppioctl(struct rtems_termios_tty *tty, rtems_libio_ioctl_args_t *args);
int pppinput(int c, struct rtems_termios_tty *tty);
-int pppstart(struct rtems_termios_tty *tp);
+int pppstart(struct rtems_termios_tty *tp, int len);
/*
* Define the PPP line discipline.
@@ -97,7 +116,7 @@ int pppinput(int c, struct rtems_termios_tty *tty)
return 0;
}
-int pppstart(struct rtems_termios_tty *tp)
+int pppstart(struct rtems_termios_tty *tp, int len)
{
puts( "pppstart called" );
return 0;
diff --git a/testsuites/libtests/termios07/init.c b/testsuites/libtests/termios07/init.c
index 1dd5315126..53486912f4 100644
--- a/testsuites/libtests/termios07/init.c
+++ b/testsuites/libtests/termios07/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/termios07/termios07.doc b/testsuites/libtests/termios07/termios07.doc
index 938a12636f..05550e0209 100644
--- a/testsuites/libtests/termios07/termios07.doc
+++ b/testsuites/libtests/termios07/termios07.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/termios08/init.c b/testsuites/libtests/termios08/init.c
index 4f237fb367..e3f5d236db 100644
--- a/testsuites/libtests/termios08/init.c
+++ b/testsuites/libtests/termios08/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/termios08/termios08.doc b/testsuites/libtests/termios08/termios08.doc
index 2a7eb09594..9fd2e1c340 100644
--- a/testsuites/libtests/termios08/termios08.doc
+++ b/testsuites/libtests/termios08/termios08.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/termios09/init.c b/testsuites/libtests/termios09/init.c
index 5490b2b918..a7c2518ecc 100644
--- a/testsuites/libtests/termios09/init.c
+++ b/testsuites/libtests/termios09/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/termios10/init.c b/testsuites/libtests/termios10/init.c
index 8655879500..397acd0879 100644
--- a/testsuites/libtests/termios10/init.c
+++ b/testsuites/libtests/termios10/init.c
@@ -1 +1,36 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup libtests
+ *
+ * @brief This is init for termios10.
+ */
+
+/*
+ * Copyright (C) 2019 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#include "termios10impl.h"
diff --git a/testsuites/libtests/termios11/init.c b/testsuites/libtests/termios11/init.c
index 3492a62753..6c8d45dda1 100644
--- a/testsuites/libtests/termios11/init.c
+++ b/testsuites/libtests/termios11/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup libtests
+ *
+ * @brief This is init for termios11.
+ */
+
+/*
+ * Copyright (C) 1989-2019 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define INTERRUPT_DRIVEN
#include "../termios10/termios10impl.h"
diff --git a/testsuites/libtests/top/init.c b/testsuites/libtests/top/init.c
index 8a824ae194..34ce3e5291 100644
--- a/testsuites/libtests/top/init.c
+++ b/testsuites/libtests/top/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test checks rtems_cpu_usage_top command with
* 30 tasks being created and deleted. The command
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/top/system.h b/testsuites/libtests/top/system.h
index 945fbcabca..9abcf0d555 100644
--- a/testsuites/libtests/top/system.h
+++ b/testsuites/libtests/top/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <bsp.h>
diff --git a/testsuites/libtests/top/task1.c b/testsuites/libtests/top/task1.c
index c9e62dffb6..8fcf23fc34 100644
--- a/testsuites/libtests/top/task1.c
+++ b/testsuites/libtests/top/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This test serves as a test task. It creates and deletes
@@ -13,9 +15,26 @@
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/top/task2.c b/testsuites/libtests/top/task2.c
index 5435d5b66a..e4fbaff812 100644
--- a/testsuites/libtests/top/task2.c
+++ b/testsuites/libtests/top/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task. It calls the
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/top/task3.c b/testsuites/libtests/top/task3.c
index 891351bad9..2a22a17b39 100644
--- a/testsuites/libtests/top/task3.c
+++ b/testsuites/libtests/top/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a test task. It receives a task
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/ttest01/init.c b/testsuites/libtests/ttest01/init.c
index 658f8f6289..433bc0581b 100644
--- a/testsuites/libtests/ttest01/init.c
+++ b/testsuites/libtests/ttest01/init.c
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/t-self-test.h b/testsuites/libtests/ttest01/t-self-test.h
index 1035872c9d..d2767d5e70 100644
--- a/testsuites/libtests/ttest01/t-self-test.h
+++ b/testsuites/libtests/ttest01/t-self-test.h
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (C) 2019 embedded brains GmbH
+ * Copyright (C) 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-assert.c b/testsuites/libtests/ttest01/test-assert.c
index 398539fe8e..2a401ca577 100644
--- a/testsuites/libtests/ttest01/test-assert.c
+++ b/testsuites/libtests/ttest01/test-assert.c
@@ -86,7 +86,7 @@ T_TEST_OUTPUT(assert2,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-checks.c b/testsuites/libtests/ttest01/test-checks.c
index fa5591121e..14f3cda44c 100644
--- a/testsuites/libtests/ttest01/test-checks.c
+++ b/testsuites/libtests/ttest01/test-checks.c
@@ -5415,7 +5415,7 @@ T_TEST_OUTPUT(check_false_no_fmt,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-destructor.c b/testsuites/libtests/ttest01/test-destructor.c
index 0a2f650ed2..5e30e6c203 100644
--- a/testsuites/libtests/ttest01/test-destructor.c
+++ b/testsuites/libtests/ttest01/test-destructor.c
@@ -31,7 +31,7 @@ T_TEST_OUTPUT(destructor,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-eno.c b/testsuites/libtests/ttest01/test-eno.c
index c334b5e1f7..744feb6434 100644
--- a/testsuites/libtests/ttest01/test-eno.c
+++ b/testsuites/libtests/ttest01/test-eno.c
@@ -50,7 +50,7 @@ T_TEST_OUTPUT(test_eno_success,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-example.c b/testsuites/libtests/ttest01/test-example.c
index 6fa062f6c8..94bd9487db 100644
--- a/testsuites/libtests/ttest01/test-example.c
+++ b/testsuites/libtests/ttest01/test-example.c
@@ -32,7 +32,7 @@ T_TEST_OUTPUT(example,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-fixture.c b/testsuites/libtests/ttest01/test-fixture.c
index e1f59876ca..3cc0f64d63 100644
--- a/testsuites/libtests/ttest01/test-fixture.c
+++ b/testsuites/libtests/ttest01/test-fixture.c
@@ -185,7 +185,7 @@ T_TEST_OUTPUT(fixture,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2020 embedded brains GmbH
+ * Copyright (C) 2018, 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-leak.c b/testsuites/libtests/ttest01/test-leak.c
index 923ad1989c..c63ef0cd48 100644
--- a/testsuites/libtests/ttest01/test-leak.c
+++ b/testsuites/libtests/ttest01/test-leak.c
@@ -215,7 +215,7 @@ T_TEST_OUTPUT(missing_key_delete,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-log.c b/testsuites/libtests/ttest01/test-log.c
index bf1b822c0e..38573f2f6b 100644
--- a/testsuites/libtests/ttest01/test-log.c
+++ b/testsuites/libtests/ttest01/test-log.c
@@ -23,7 +23,7 @@ T_TEST_OUTPUT(log,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-malloc.c b/testsuites/libtests/ttest01/test-malloc.c
index 14066ddf7b..ffaa4c6682 100644
--- a/testsuites/libtests/ttest01/test-malloc.c
+++ b/testsuites/libtests/ttest01/test-malloc.c
@@ -93,7 +93,7 @@ T_TEST_OUTPUT(calloc_auto,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-plan.c b/testsuites/libtests/ttest01/test-plan.c
index d7632b8590..0b8ccd4477 100644
--- a/testsuites/libtests/ttest01/test-plan.c
+++ b/testsuites/libtests/ttest01/test-plan.c
@@ -95,7 +95,7 @@ T_TEST_OUTPUT(nested_plan,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-psx.c b/testsuites/libtests/ttest01/test-psx.c
index b43fd96846..9b82543c26 100644
--- a/testsuites/libtests/ttest01/test-psx.c
+++ b/testsuites/libtests/ttest01/test-psx.c
@@ -72,7 +72,7 @@ T_TEST_OUTPUT(test_psx_success,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-rtems.c b/testsuites/libtests/ttest01/test-rtems.c
index 1f94b7318c..a44323886e 100644
--- a/testsuites/libtests/ttest01/test-rtems.c
+++ b/testsuites/libtests/ttest01/test-rtems.c
@@ -111,7 +111,7 @@ T_TEST_OUTPUT(rsc_success,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-simple.c b/testsuites/libtests/ttest01/test-simple.c
index f98e3a1dfa..7732d2f937 100644
--- a/testsuites/libtests/ttest01/test-simple.c
+++ b/testsuites/libtests/ttest01/test-simple.c
@@ -31,7 +31,7 @@ T_TEST_OUTPUT(a_test_case,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-step.c b/testsuites/libtests/ttest01/test-step.c
index 6d5ee9f7ab..38d0cb6518 100644
--- a/testsuites/libtests/ttest01/test-step.c
+++ b/testsuites/libtests/ttest01/test-step.c
@@ -23,7 +23,7 @@ T_TEST_OUTPUT(step,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-task-context.c b/testsuites/libtests/ttest01/test-task-context.c
index 56139f9474..884e3e3d34 100644
--- a/testsuites/libtests/ttest01/test-task-context.c
+++ b/testsuites/libtests/ttest01/test-task-context.c
@@ -23,7 +23,7 @@ T_TEST_OUTPUT(check_task_context,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2019 embedded brains GmbH
+ * Copyright (C) 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-time.c b/testsuites/libtests/ttest01/test-time.c
index a324290e56..2b5039015b 100644
--- a/testsuites/libtests/ttest01/test-time.c
+++ b/testsuites/libtests/ttest01/test-time.c
@@ -280,7 +280,7 @@ T_TEST_OUTPUT(begin_time,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest01/test-verbosity.c b/testsuites/libtests/ttest01/test-verbosity.c
index 486969c85c..fc54724ce1 100644
--- a/testsuites/libtests/ttest01/test-verbosity.c
+++ b/testsuites/libtests/ttest01/test-verbosity.c
@@ -34,7 +34,7 @@ T_TEST_OUTPUT(verbosity_changes,
/*
* SPDX-License-Identifier: BSD-2-Clause OR CC-BY-SA-4.0
*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/ttest02/init.c b/testsuites/libtests/ttest02/init.c
index 4d540c9a86..881bbedc92 100644
--- a/testsuites/libtests/ttest02/init.c
+++ b/testsuites/libtests/ttest02/init.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/libtests/tztest/init.c b/testsuites/libtests/tztest/init.c
index f3085078ed..c88472da04 100644
--- a/testsuites/libtests/tztest/init.c
+++ b/testsuites/libtests/tztest/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2007-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/uid01/init.c b/testsuites/libtests/uid01/init.c
index fcc3071345..be6b026f00 100644
--- a/testsuites/libtests/uid01/init.c
+++ b/testsuites/libtests/uid01/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2013 Daniel Ramirez <javamonn@gmail.com>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/uid01/msmouse.c b/testsuites/libtests/uid01/msmouse.c
index 35cbc2452e..18732ee534 100644
--- a/testsuites/libtests/uid01/msmouse.c
+++ b/testsuites/libtests/uid01/msmouse.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2013 Daniel Ramirez <javamonn@gmail.com>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/uid01/serial_mouse_config.c b/testsuites/libtests/uid01/serial_mouse_config.c
index 78c8602257..b05d303ade 100644
--- a/testsuites/libtests/uid01/serial_mouse_config.c
+++ b/testsuites/libtests/uid01/serial_mouse_config.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2013 Daniel Ramirez <javamonn@gmail.com>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/*
diff --git a/testsuites/libtests/uid01/uid01.doc b/testsuites/libtests/uid01/uid01.doc
index a86a00a8f0..7c266dc406 100644
--- a/testsuites/libtests/uid01/uid01.doc
+++ b/testsuites/libtests/uid01/uid01.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2013 Daniel Ramirez <javamonn@gmail.com>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/libtests/utf8proc01/init.c b/testsuites/libtests/utf8proc01/init.c
index 48120dd198..71a8936257 100644
--- a/testsuites/libtests/utf8proc01/init.c
+++ b/testsuites/libtests/utf8proc01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/libtests/utf8proc01/utf8proc01.doc b/testsuites/libtests/utf8proc01/utf8proc01.doc
index 099c98905d..ac573f49a1 100644
--- a/testsuites/libtests/utf8proc01/utf8proc01.doc
+++ b/testsuites/libtests/utf8proc01/utf8proc01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/mptests/mp01/init1.c b/testsuites/mptests/mp01/init1.c
index cfe033db60..16aeaeade2 100644
--- a/testsuites/mptests/mp01/init1.c
+++ b/testsuites/mptests/mp01/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init1 for mp01.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/mptests/mp01/init2.c b/testsuites/mptests/mp01/init2.c
index 40c2c81592..5ea7af1eae 100644
--- a/testsuites/mptests/mp01/init2.c
+++ b/testsuites/mptests/mp01/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init2 for mp01.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/mptests/mp01/initimpl.h b/testsuites/mptests/mp01/initimpl.h
index e9214c09c1..ee516aa9b2 100644
--- a/testsuites/mptests/mp01/initimpl.h
+++ b/testsuites/mptests/mp01/initimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp01/mp01-node1.doc b/testsuites/mptests/mp01/mp01-node1.doc
index dff9f2f8d2..db4be4808a 100644
--- a/testsuites/mptests/mp01/mp01-node1.doc
+++ b/testsuites/mptests/mp01/mp01-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp01/mp01-node2.doc b/testsuites/mptests/mp01/mp01-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/mptests/mp01/mp01-node2.doc
+++ b/testsuites/mptests/mp01/mp01-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp01/system.h b/testsuites/mptests/mp01/system.h
index 894771b9e5..935d0adf3c 100644
--- a/testsuites/mptests/mp01/system.h
+++ b/testsuites/mptests/mp01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/mptests/mp01/task1.c b/testsuites/mptests/mp01/task1.c
index 50821e1b49..0c6b32bec5 100644
--- a/testsuites/mptests/mp01/task1.c
+++ b/testsuites/mptests/mp01/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test_task
*
* This task is used for three test tasks. It obtains its task id and
@@ -16,9 +18,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -35,7 +54,7 @@ rtems_task Test_task(
rtems_id tid;
rtems_time_of_day time;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident" );
status = rtems_clock_get_tod( &time );
diff --git a/testsuites/mptests/mp03/delay.c b/testsuites/mptests/mp03/delay.c
index ee0278b227..bd07e22b77 100644
--- a/testsuites/mptests/mp03/delay.c
+++ b/testsuites/mptests/mp03/delay.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Delayed_send_event
*
* This routine is a timer service routine which sends an event to task 1.
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp03/init1.c b/testsuites/mptests/mp03/init1.c
index cfe033db60..1f871f36ce 100644
--- a/testsuites/mptests/mp03/init1.c
+++ b/testsuites/mptests/mp03/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init1 for mp03.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/mptests/mp03/init2.c b/testsuites/mptests/mp03/init2.c
index 40c2c81592..d45fa8803e 100644
--- a/testsuites/mptests/mp03/init2.c
+++ b/testsuites/mptests/mp03/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init2 for mp03.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/mptests/mp03/initimpl.h b/testsuites/mptests/mp03/initimpl.h
index ef4879d09c..6221d572d4 100644
--- a/testsuites/mptests/mp03/initimpl.h
+++ b/testsuites/mptests/mp03/initimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp03/mp03-node1.doc b/testsuites/mptests/mp03/mp03-node1.doc
index f2d149e85e..9fed0e2279 100644
--- a/testsuites/mptests/mp03/mp03-node1.doc
+++ b/testsuites/mptests/mp03/mp03-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp03/mp03-node2.doc b/testsuites/mptests/mp03/mp03-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/mptests/mp03/mp03-node2.doc
+++ b/testsuites/mptests/mp03/mp03-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp03/system.h b/testsuites/mptests/mp03/system.h
index 91cedd810c..7e7a3df9b5 100644
--- a/testsuites/mptests/mp03/system.h
+++ b/testsuites/mptests/mp03/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/mptests/mp03/task1.c b/testsuites/mptests/mp03/task1.c
index 48682e032c..c1ea7517a9 100644
--- a/testsuites/mptests/mp03/task1.c
+++ b/testsuites/mptests/mp03/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -94,7 +113,7 @@ rtems_task Test_task(
rtems_id tid;
rtems_status_code status;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident" );
puts( "Getting TID of remote task" );
diff --git a/testsuites/mptests/mp04/init1.c b/testsuites/mptests/mp04/init1.c
index cfe033db60..a5d128a032 100644
--- a/testsuites/mptests/mp04/init1.c
+++ b/testsuites/mptests/mp04/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init1 for mp04.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/mptests/mp04/init2.c b/testsuites/mptests/mp04/init2.c
index 40c2c81592..2af9de1eb0 100644
--- a/testsuites/mptests/mp04/init2.c
+++ b/testsuites/mptests/mp04/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init2 for mp04.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/mptests/mp04/initimpl.h b/testsuites/mptests/mp04/initimpl.h
index 4598944e00..4c8432274a 100644
--- a/testsuites/mptests/mp04/initimpl.h
+++ b/testsuites/mptests/mp04/initimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp04/mp04-node1.doc b/testsuites/mptests/mp04/mp04-node1.doc
index 4ff3647852..364201823f 100644
--- a/testsuites/mptests/mp04/mp04-node1.doc
+++ b/testsuites/mptests/mp04/mp04-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp04/mp04-node2.doc b/testsuites/mptests/mp04/mp04-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/mptests/mp04/mp04-node2.doc
+++ b/testsuites/mptests/mp04/mp04-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp04/system.h b/testsuites/mptests/mp04/system.h
index 88ae1bedc3..eaf114ba95 100644
--- a/testsuites/mptests/mp04/system.h
+++ b/testsuites/mptests/mp04/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/mptests/mp04/task1.c b/testsuites/mptests/mp04/task1.c
index 878effd237..c1977f961d 100644
--- a/testsuites/mptests/mp04/task1.c
+++ b/testsuites/mptests/mp04/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test_task
*
* This task tests the rtems_task_set_priority directive on a remote task.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -33,7 +52,7 @@ rtems_task Test_task(
rtems_task_priority previous_priority;
rtems_task_priority previous_priority_1;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident" );
puts( "Getting TID of remote task" );
diff --git a/testsuites/mptests/mp05/asr.c b/testsuites/mptests/mp05/asr.c
index cd21a241e2..28b10bf481 100644
--- a/testsuites/mptests/mp05/asr.c
+++ b/testsuites/mptests/mp05/asr.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Process_asr
*
* This routine performs the processing for task 1's RTEMS_ASR. It is called
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp05/init1.c b/testsuites/mptests/mp05/init1.c
index cfe033db60..f3a489718c 100644
--- a/testsuites/mptests/mp05/init1.c
+++ b/testsuites/mptests/mp05/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init1 for mp05.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/mptests/mp05/init2.c b/testsuites/mptests/mp05/init2.c
index 40c2c81592..7def57c495 100644
--- a/testsuites/mptests/mp05/init2.c
+++ b/testsuites/mptests/mp05/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init2 for mp05.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/mptests/mp05/initimpl.h b/testsuites/mptests/mp05/initimpl.h
index 40b1ea6d9e..a56414d46e 100644
--- a/testsuites/mptests/mp05/initimpl.h
+++ b/testsuites/mptests/mp05/initimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp05/mp05-node1.doc b/testsuites/mptests/mp05/mp05-node1.doc
index a9042ada9c..641d1a6f9a 100644
--- a/testsuites/mptests/mp05/mp05-node1.doc
+++ b/testsuites/mptests/mp05/mp05-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp05/mp05-node2.doc b/testsuites/mptests/mp05/mp05-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/mptests/mp05/mp05-node2.doc
+++ b/testsuites/mptests/mp05/mp05-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp05/system.h b/testsuites/mptests/mp05/system.h
index 3c32c99387..174a541831 100644
--- a/testsuites/mptests/mp05/system.h
+++ b/testsuites/mptests/mp05/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/mptests/mp05/task1.c b/testsuites/mptests/mp05/task1.c
index 17a72c4278..633813e2eb 100644
--- a/testsuites/mptests/mp05/task1.c
+++ b/testsuites/mptests/mp05/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test_task
*
* This task initializes the signal catcher, sends the first signal
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp06/init1.c b/testsuites/mptests/mp06/init1.c
index cfe033db60..2e22e863a9 100644
--- a/testsuites/mptests/mp06/init1.c
+++ b/testsuites/mptests/mp06/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init1 for mp06.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/mptests/mp06/init2.c b/testsuites/mptests/mp06/init2.c
index 40c2c81592..db07e11162 100644
--- a/testsuites/mptests/mp06/init2.c
+++ b/testsuites/mptests/mp06/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init2 for mp06.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/mptests/mp06/initimpl.h b/testsuites/mptests/mp06/initimpl.h
index 1155e49f46..2fdafe9acc 100644
--- a/testsuites/mptests/mp06/initimpl.h
+++ b/testsuites/mptests/mp06/initimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp06/mp06-node1.doc b/testsuites/mptests/mp06/mp06-node1.doc
index 03c278fd33..fb22dc3414 100644
--- a/testsuites/mptests/mp06/mp06-node1.doc
+++ b/testsuites/mptests/mp06/mp06-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp06/mp06-node2.doc b/testsuites/mptests/mp06/mp06-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/mptests/mp06/mp06-node2.doc
+++ b/testsuites/mptests/mp06/mp06-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp06/system.h b/testsuites/mptests/mp06/system.h
index d281a48aa3..a888b3f2ac 100644
--- a/testsuites/mptests/mp06/system.h
+++ b/testsuites/mptests/mp06/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/mptests/mp06/task1.c b/testsuites/mptests/mp06/task1.c
index 93b04924c6..293347be65 100644
--- a/testsuites/mptests/mp06/task1.c
+++ b/testsuites/mptests/mp06/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp07/init1.c b/testsuites/mptests/mp07/init1.c
index cfe033db60..fe5cef6838 100644
--- a/testsuites/mptests/mp07/init1.c
+++ b/testsuites/mptests/mp07/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init1 for mp07.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/mptests/mp07/init2.c b/testsuites/mptests/mp07/init2.c
index 40c2c81592..2b3238be2b 100644
--- a/testsuites/mptests/mp07/init2.c
+++ b/testsuites/mptests/mp07/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init2 for mp07.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/mptests/mp07/initimpl.h b/testsuites/mptests/mp07/initimpl.h
index de54663773..5f49e29d14 100644
--- a/testsuites/mptests/mp07/initimpl.h
+++ b/testsuites/mptests/mp07/initimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp07/mp07-node1.doc b/testsuites/mptests/mp07/mp07-node1.doc
index c66e75c08c..c44933ce7f 100644
--- a/testsuites/mptests/mp07/mp07-node1.doc
+++ b/testsuites/mptests/mp07/mp07-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp07/mp07-node2.doc b/testsuites/mptests/mp07/mp07-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/mptests/mp07/mp07-node2.doc
+++ b/testsuites/mptests/mp07/mp07-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp07/system.h b/testsuites/mptests/mp07/system.h
index d281a48aa3..a888b3f2ac 100644
--- a/testsuites/mptests/mp07/system.h
+++ b/testsuites/mptests/mp07/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/mptests/mp07/task1.c b/testsuites/mptests/mp07/task1.c
index 64db8b05b9..a021dd6eaf 100644
--- a/testsuites/mptests/mp07/task1.c
+++ b/testsuites/mptests/mp07/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test_task
*
* This task continuously sends an event to its counterpart on the
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp08/init1.c b/testsuites/mptests/mp08/init1.c
index cfe033db60..b53ec535c7 100644
--- a/testsuites/mptests/mp08/init1.c
+++ b/testsuites/mptests/mp08/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init1 for mp08.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/mptests/mp08/init2.c b/testsuites/mptests/mp08/init2.c
index 40c2c81592..5787729b7c 100644
--- a/testsuites/mptests/mp08/init2.c
+++ b/testsuites/mptests/mp08/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init2 for mp08.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/mptests/mp08/initimpl.h b/testsuites/mptests/mp08/initimpl.h
index 6a131c9705..489b20997f 100644
--- a/testsuites/mptests/mp08/initimpl.h
+++ b/testsuites/mptests/mp08/initimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp08/mp08-node1.doc b/testsuites/mptests/mp08/mp08-node1.doc
index f71bc3c1a3..5526bbf7be 100644
--- a/testsuites/mptests/mp08/mp08-node1.doc
+++ b/testsuites/mptests/mp08/mp08-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/mptests/mp08/mp08-node2.doc b/testsuites/mptests/mp08/mp08-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/mptests/mp08/mp08-node2.doc
+++ b/testsuites/mptests/mp08/mp08-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp08/system.h b/testsuites/mptests/mp08/system.h
index 080297cb6d..7e6916e692 100644
--- a/testsuites/mptests/mp08/system.h
+++ b/testsuites/mptests/mp08/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/mptests/mp08/task1.c b/testsuites/mptests/mp08/task1.c
index 3e914db227..117db4ce79 100644
--- a/testsuites/mptests/mp08/task1.c
+++ b/testsuites/mptests/mp08/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test_task
*
* This task tests global semaphore operations. It verifies that
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp09/init1.c b/testsuites/mptests/mp09/init1.c
index cfe033db60..0ce7b6c678 100644
--- a/testsuites/mptests/mp09/init1.c
+++ b/testsuites/mptests/mp09/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init1 for mp09.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/mptests/mp09/init2.c b/testsuites/mptests/mp09/init2.c
index 40c2c81592..2aecbf91b4 100644
--- a/testsuites/mptests/mp09/init2.c
+++ b/testsuites/mptests/mp09/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init2 for mp09.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/mptests/mp09/initimpl.h b/testsuites/mptests/mp09/initimpl.h
index c7377f319a..431ea3e4ef 100644
--- a/testsuites/mptests/mp09/initimpl.h
+++ b/testsuites/mptests/mp09/initimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp09/mp09-node1.doc b/testsuites/mptests/mp09/mp09-node1.doc
index fce639b0f8..64a2f65348 100644
--- a/testsuites/mptests/mp09/mp09-node1.doc
+++ b/testsuites/mptests/mp09/mp09-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/mptests/mp09/mp09-node2.doc b/testsuites/mptests/mp09/mp09-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/mptests/mp09/mp09-node2.doc
+++ b/testsuites/mptests/mp09/mp09-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp09/recvmsg.c b/testsuites/mptests/mp09/recvmsg.c
index 85a1b843e0..ce4020ca60 100644
--- a/testsuites/mptests/mp09/recvmsg.c
+++ b/testsuites/mptests/mp09/recvmsg.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Receive_messages
*
* This routine receives and prints three messages.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp09/sendmsg.c b/testsuites/mptests/mp09/sendmsg.c
index 4103943bc9..c2dc7b2794 100644
--- a/testsuites/mptests/mp09/sendmsg.c
+++ b/testsuites/mptests/mp09/sendmsg.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Send_messages
*
* This routine sends a series of three messages.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp09/system.h b/testsuites/mptests/mp09/system.h
index 9ecea2d971..9bc055918a 100644
--- a/testsuites/mptests/mp09/system.h
+++ b/testsuites/mptests/mp09/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/mptests/mp09/task1.c b/testsuites/mptests/mp09/task1.c
index b929a6e01b..f7f5f15579 100644
--- a/testsuites/mptests/mp09/task1.c
+++ b/testsuites/mptests/mp09/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test_task
*
* This task tests global message queue operations. It also generates
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp10/init1.c b/testsuites/mptests/mp10/init1.c
index cfe033db60..7784fc38bd 100644
--- a/testsuites/mptests/mp10/init1.c
+++ b/testsuites/mptests/mp10/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init1 for mp10.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/mptests/mp10/init2.c b/testsuites/mptests/mp10/init2.c
index 40c2c81592..3c16be416f 100644
--- a/testsuites/mptests/mp10/init2.c
+++ b/testsuites/mptests/mp10/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init2 for mp10.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/mptests/mp10/initimpl.h b/testsuites/mptests/mp10/initimpl.h
index 5e09662119..0843ebff20 100644
--- a/testsuites/mptests/mp10/initimpl.h
+++ b/testsuites/mptests/mp10/initimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization routine for this test program.
@@ -20,9 +22,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp10/mp10-node1.doc b/testsuites/mptests/mp10/mp10-node1.doc
index fc926b0519..651a6a3c9b 100644
--- a/testsuites/mptests/mp10/mp10-node1.doc
+++ b/testsuites/mptests/mp10/mp10-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/mptests/mp10/mp10-node2.doc b/testsuites/mptests/mp10/mp10-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/mptests/mp10/mp10-node2.doc
+++ b/testsuites/mptests/mp10/mp10-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp10/system.h b/testsuites/mptests/mp10/system.h
index 3181e4c619..a4293e7398 100644
--- a/testsuites/mptests/mp10/system.h
+++ b/testsuites/mptests/mp10/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/mptests/mp10/task1.c b/testsuites/mptests/mp10/task1.c
index 58d4e72bee..ce54a2b4cf 100644
--- a/testsuites/mptests/mp10/task1.c
+++ b/testsuites/mptests/mp10/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test_task1
*
* This task attempts to receive a message from a global message queue.
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp10/task2.c b/testsuites/mptests/mp10/task2.c
index 5e03031d64..8b5dbc332e 100644
--- a/testsuites/mptests/mp10/task2.c
+++ b/testsuites/mptests/mp10/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test_task2
*
* This task attempts to receive control of a global semaphore.
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp10/task3.c b/testsuites/mptests/mp10/task3.c
index 2554e4d90e..62c9778638 100644
--- a/testsuites/mptests/mp10/task3.c
+++ b/testsuites/mptests/mp10/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test_task3
*
* This task attempts to receive control of a global semaphore.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp11/init1.c b/testsuites/mptests/mp11/init1.c
index cfe033db60..805ba3d53c 100644
--- a/testsuites/mptests/mp11/init1.c
+++ b/testsuites/mptests/mp11/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init1 for mp11.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/mptests/mp11/init2.c b/testsuites/mptests/mp11/init2.c
index 40c2c81592..fbecc6d968 100644
--- a/testsuites/mptests/mp11/init2.c
+++ b/testsuites/mptests/mp11/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init2 for mp11.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/mptests/mp11/initimpl.h b/testsuites/mptests/mp11/initimpl.h
index 2f0a97a700..de680dfac8 100644
--- a/testsuites/mptests/mp11/initimpl.h
+++ b/testsuites/mptests/mp11/initimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization and test routine for
@@ -17,9 +19,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp11/mp11-node1.doc b/testsuites/mptests/mp11/mp11-node1.doc
index 0722980766..bb1ab37981 100644
--- a/testsuites/mptests/mp11/mp11-node1.doc
+++ b/testsuites/mptests/mp11/mp11-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/mptests/mp11/mp11-node2.doc b/testsuites/mptests/mp11/mp11-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/mptests/mp11/mp11-node2.doc
+++ b/testsuites/mptests/mp11/mp11-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp11/system.h b/testsuites/mptests/mp11/system.h
index 890d247981..5bcf94ff2f 100644
--- a/testsuites/mptests/mp11/system.h
+++ b/testsuites/mptests/mp11/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/mptests/mp12/init1.c b/testsuites/mptests/mp12/init1.c
index cfe033db60..5e72a87ced 100644
--- a/testsuites/mptests/mp12/init1.c
+++ b/testsuites/mptests/mp12/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init1 for mp12.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/mptests/mp12/init2.c b/testsuites/mptests/mp12/init2.c
index 40c2c81592..ff7a7ee58c 100644
--- a/testsuites/mptests/mp12/init2.c
+++ b/testsuites/mptests/mp12/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init2 for mp12.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/mptests/mp12/initimpl.h b/testsuites/mptests/mp12/initimpl.h
index 6eb38a904c..caa1635260 100644
--- a/testsuites/mptests/mp12/initimpl.h
+++ b/testsuites/mptests/mp12/initimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization routine and test code for
@@ -19,9 +21,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp12/mp12-node1.doc b/testsuites/mptests/mp12/mp12-node1.doc
index e655bfdff8..9b3fbf8273 100644
--- a/testsuites/mptests/mp12/mp12-node1.doc
+++ b/testsuites/mptests/mp12/mp12-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/mptests/mp12/mp12-node2.doc b/testsuites/mptests/mp12/mp12-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/mptests/mp12/mp12-node2.doc
+++ b/testsuites/mptests/mp12/mp12-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp12/system.h b/testsuites/mptests/mp12/system.h
index c1f00d0376..afde3b0050 100644
--- a/testsuites/mptests/mp12/system.h
+++ b/testsuites/mptests/mp12/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/mptests/mp13/init1.c b/testsuites/mptests/mp13/init1.c
index cfe033db60..ffd03242c6 100644
--- a/testsuites/mptests/mp13/init1.c
+++ b/testsuites/mptests/mp13/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init1 for mp13.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/mptests/mp13/init2.c b/testsuites/mptests/mp13/init2.c
index 40c2c81592..1728ddb4ca 100644
--- a/testsuites/mptests/mp13/init2.c
+++ b/testsuites/mptests/mp13/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init2 for mp13.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/mptests/mp13/initimpl.h b/testsuites/mptests/mp13/initimpl.h
index c6ac82ea9e..4bc7776ff7 100644
--- a/testsuites/mptests/mp13/initimpl.h
+++ b/testsuites/mptests/mp13/initimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp13/mp13-node1.doc b/testsuites/mptests/mp13/mp13-node1.doc
index 2033d6e8b9..9bddb0bdcc 100644
--- a/testsuites/mptests/mp13/mp13-node1.doc
+++ b/testsuites/mptests/mp13/mp13-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/mptests/mp13/mp13-node2.doc b/testsuites/mptests/mp13/mp13-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/mptests/mp13/mp13-node2.doc
+++ b/testsuites/mptests/mp13/mp13-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp13/system.h b/testsuites/mptests/mp13/system.h
index 3a3da8af16..20d785841d 100644
--- a/testsuites/mptests/mp13/system.h
+++ b/testsuites/mptests/mp13/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/mptests/mp13/task1.c b/testsuites/mptests/mp13/task1.c
index 127c4c8e86..07b8c6563a 100644
--- a/testsuites/mptests/mp13/task1.c
+++ b/testsuites/mptests/mp13/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test_task1
*
* This task attempts to receive a message from a global message queue.
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp13/task2.c b/testsuites/mptests/mp13/task2.c
index 0b7b5db71d..ff2a46071e 100644
--- a/testsuites/mptests/mp13/task2.c
+++ b/testsuites/mptests/mp13/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test_task2
*
* This task attempts to receive control of a global semaphore.
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp14/delay.c b/testsuites/mptests/mp14/delay.c
index b73700107e..fef542bb3a 100644
--- a/testsuites/mptests/mp14/delay.c
+++ b/testsuites/mptests/mp14/delay.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Delayed_send_event
*
* This routine is a timer service routine which sends an event to a task.
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp14/evtask1.c b/testsuites/mptests/mp14/evtask1.c
index c65853967f..aaeb8b7b85 100644
--- a/testsuites/mptests/mp14/evtask1.c
+++ b/testsuites/mptests/mp14/evtask1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test_task
*
* This task either continuously sends events to a remote task, or
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp14/evtmtask.c b/testsuites/mptests/mp14/evtmtask.c
index 892af9a6d0..b4e288f85c 100644
--- a/testsuites/mptests/mp14/evtmtask.c
+++ b/testsuites/mptests/mp14/evtmtask.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Delayed_events_task
*
* This task continuously sends itself events at one tick
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp14/exit.c b/testsuites/mptests/mp14/exit.c
index e958179daf..01850a9bce 100644
--- a/testsuites/mptests/mp14/exit.c
+++ b/testsuites/mptests/mp14/exit.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Exit_test
*
* This routine safely stops the test and prints some information
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp14/init1.c b/testsuites/mptests/mp14/init1.c
index cfe033db60..2407504b16 100644
--- a/testsuites/mptests/mp14/init1.c
+++ b/testsuites/mptests/mp14/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init1 for mp14.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/mptests/mp14/init2.c b/testsuites/mptests/mp14/init2.c
index 40c2c81592..446e3fb6c9 100644
--- a/testsuites/mptests/mp14/init2.c
+++ b/testsuites/mptests/mp14/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup mptests
+ *
+ * @brief This is init2 for mp14.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/mptests/mp14/initimpl.h b/testsuites/mptests/mp14/initimpl.h
index 1dbfb35c22..6be867d3ee 100644
--- a/testsuites/mptests/mp14/initimpl.h
+++ b/testsuites/mptests/mp14/initimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp14/mp14-node1.doc b/testsuites/mptests/mp14/mp14-node1.doc
index 3a9e7c6c4e..f743ca03f1 100644
--- a/testsuites/mptests/mp14/mp14-node1.doc
+++ b/testsuites/mptests/mp14/mp14-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp14/mp14-node2.doc b/testsuites/mptests/mp14/mp14-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/mptests/mp14/mp14-node2.doc
+++ b/testsuites/mptests/mp14/mp14-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/mptests/mp14/msgtask1.c b/testsuites/mptests/mp14/msgtask1.c
index 3bbeb7ecc2..975440c180 100644
--- a/testsuites/mptests/mp14/msgtask1.c
+++ b/testsuites/mptests/mp14/msgtask1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Message_queue_task
*
* This task continuously sends messages to and receives messages from
@@ -13,9 +15,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp14/pttask1.c b/testsuites/mptests/mp14/pttask1.c
index 409a3ff3ca..1fa6a14448 100644
--- a/testsuites/mptests/mp14/pttask1.c
+++ b/testsuites/mptests/mp14/pttask1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Partition_task
*
* This task continuously gets a buffer from and returns that buffer
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp14/smtask1.c b/testsuites/mptests/mp14/smtask1.c
index e4126dbf8b..a5806c10b0 100644
--- a/testsuites/mptests/mp14/smtask1.c
+++ b/testsuites/mptests/mp14/smtask1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Sm_test_task
*
* This task continuously obtains and releases a global semaphore.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/mptests/mp14/system.h b/testsuites/mptests/mp14/system.h
index 3797f0e559..ebf0a2cbaa 100644
--- a/testsuites/mptests/mp14/system.h
+++ b/testsuites/mptests/mp14/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/psxtests/include/pmacros.h b/testsuites/psxtests/include/pmacros.h
index 76e30f5392..c3f5f7c328 100644
--- a/testsuites/psxtests/include/pmacros.h
+++ b/testsuites/psxtests/include/pmacros.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009, 2017.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef __POSIX_TEST_MACROS_h
diff --git a/testsuites/psxtests/psx01/init.c b/testsuites/psxtests/psx01/init.c
index 2b2fafd0cd..9aaa1c567d 100644
--- a/testsuites/psxtests/psx01/init.c
+++ b/testsuites/psxtests/psx01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx01/psx01.doc b/testsuites/psxtests/psx01/psx01.doc
index 8f764aadd2..cea29799c7 100644
--- a/testsuites/psxtests/psx01/psx01.doc
+++ b/testsuites/psxtests/psx01/psx01.doc
@@ -1,11 +1,30 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# testsuites/psxtests/psx01/psx01.doc
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
# Copyright (c) 2013 Annelies Odermann <annelies.odermann@gmail.com>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psx01/system.h b/testsuites/psxtests/psx01/system.h
index d0507dfac4..7b81946357 100644
--- a/testsuites/psxtests/psx01/system.h
+++ b/testsuites/psxtests/psx01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psx01/task.c b/testsuites/psxtests/psx01/task.c
index 3aa88fe882..4e0cd46983 100644
--- a/testsuites/psxtests/psx01/task.c
+++ b/testsuites/psxtests/psx01/task.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1_through_3
*
* This routine serves as a test task. It verifies the basic task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx02/init.c b/testsuites/psxtests/psx02/init.c
index 0d2ab06c7e..c2df2baefa 100644
--- a/testsuites/psxtests/psx02/init.c
+++ b/testsuites/psxtests/psx02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx02/system.h b/testsuites/psxtests/psx02/system.h
index 22365ba76f..22165a2056 100644
--- a/testsuites/psxtests/psx02/system.h
+++ b/testsuites/psxtests/psx02/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psx02/task.c b/testsuites/psxtests/psx02/task.c
index e62c338478..5652bc4904 100644
--- a/testsuites/psxtests/psx02/task.c
+++ b/testsuites/psxtests/psx02/task.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1_through_3
*
* This routine serves as a test task. It verifies the basic task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx03/init.c b/testsuites/psxtests/psx03/init.c
index 5c5383ccfc..482c2b1d18 100644
--- a/testsuites/psxtests/psx03/init.c
+++ b/testsuites/psxtests/psx03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx03/psx03.doc b/testsuites/psxtests/psx03/psx03.doc
index a77efb2559..b23b1855c7 100644
--- a/testsuites/psxtests/psx03/psx03.doc
+++ b/testsuites/psxtests/psx03/psx03.doc
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# /testsuites/psxtests/psx03/psx03.scn
#
# Copyright (c) 2013 Rishi Sharma <rishisharma7361@gmail.com>.
diff --git a/testsuites/psxtests/psx03/system.h b/testsuites/psxtests/psx03/system.h
index 7949d4c3c0..271b488fcb 100644
--- a/testsuites/psxtests/psx03/system.h
+++ b/testsuites/psxtests/psx03/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psx03/task.c b/testsuites/psxtests/psx03/task.c
index 94f345b338..b6bdae640f 100644
--- a/testsuites/psxtests/psx03/task.c
+++ b/testsuites/psxtests/psx03/task.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1_through_3
*
* This routine serves as a test task. It verifies the basic task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx04/init.c b/testsuites/psxtests/psx04/init.c
index 76c76af55b..7f196ef716 100644
--- a/testsuites/psxtests/psx04/init.c
+++ b/testsuites/psxtests/psx04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx04/system.h b/testsuites/psxtests/psx04/system.h
index 630ac9178d..afaa8fc283 100644
--- a/testsuites/psxtests/psx04/system.h
+++ b/testsuites/psxtests/psx04/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psx04/task1.c b/testsuites/psxtests/psx04/task1.c
index 92eb9fe1b0..565c19701e 100644
--- a/testsuites/psxtests/psx04/task1.c
+++ b/testsuites/psxtests/psx04/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This routine serves as a test task.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx04/task2.c b/testsuites/psxtests/psx04/task2.c
index 3e6ef83576..da240177fa 100644
--- a/testsuites/psxtests/psx04/task2.c
+++ b/testsuites/psxtests/psx04/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx04/task3.c b/testsuites/psxtests/psx04/task3.c
index 5d4172cb2e..df207460f4 100644
--- a/testsuites/psxtests/psx04/task3.c
+++ b/testsuites/psxtests/psx04/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a test task.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx05/init.c b/testsuites/psxtests/psx05/init.c
index 4c1603daf3..96a7b2740b 100644
--- a/testsuites/psxtests/psx05/init.c
+++ b/testsuites/psxtests/psx05/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx05/psx05.doc b/testsuites/psxtests/psx05/psx05.doc
index 3f908d74fc..e5016ec318 100644
--- a/testsuites/psxtests/psx05/psx05.doc
+++ b/testsuites/psxtests/psx05/psx05.doc
@@ -1,11 +1,30 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# testsuites/psxtests/psx05/psx05.doc
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
# Copyright (c) 2013 Chirayu Desai <chirayudesai1@gmail.com>.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psx05/system.h b/testsuites/psxtests/psx05/system.h
index 58265150c3..91787096c3 100644
--- a/testsuites/psxtests/psx05/system.h
+++ b/testsuites/psxtests/psx05/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psx05/task.c b/testsuites/psxtests/psx05/task.c
index 09df524297..48a36a3dbc 100644
--- a/testsuites/psxtests/psx05/task.c
+++ b/testsuites/psxtests/psx05/task.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This routine serves as a test task. It verifies the basic task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx05/task2.c b/testsuites/psxtests/psx05/task2.c
index 1ab2c49b41..0dd7211ae5 100644
--- a/testsuites/psxtests/psx05/task2.c
+++ b/testsuites/psxtests/psx05/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx05/task3.c b/testsuites/psxtests/psx05/task3.c
index c505872a26..ee0d0e553a 100644
--- a/testsuites/psxtests/psx05/task3.c
+++ b/testsuites/psxtests/psx05/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a test task.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx06/init.c b/testsuites/psxtests/psx06/init.c
index e077a28597..2ec5983e9b 100644
--- a/testsuites/psxtests/psx06/init.c
+++ b/testsuites/psxtests/psx06/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx06/psx06.doc b/testsuites/psxtests/psx06/psx06.doc
index 71148d152b..f3e6ec1644 100644
--- a/testsuites/psxtests/psx06/psx06.doc
+++ b/testsuites/psxtests/psx06/psx06.doc
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# testsuites/psxtests/psx06/psx06.doc
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
diff --git a/testsuites/psxtests/psx06/system.h b/testsuites/psxtests/psx06/system.h
index 8bcaff7d38..6740815347 100644
--- a/testsuites/psxtests/psx06/system.h
+++ b/testsuites/psxtests/psx06/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psx06/task.c b/testsuites/psxtests/psx06/task.c
index d4eb255fcb..9c02dfaa09 100644
--- a/testsuites/psxtests/psx06/task.c
+++ b/testsuites/psxtests/psx06/task.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This routine serves as a test task. It verifies the basic task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx06/task2.c b/testsuites/psxtests/psx06/task2.c
index c0b14d4fc0..213f21d4ac 100644
--- a/testsuites/psxtests/psx06/task2.c
+++ b/testsuites/psxtests/psx06/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx07/init.c b/testsuites/psxtests/psx07/init.c
index 16d1fa260c..22f74ecac8 100644
--- a/testsuites/psxtests/psx07/init.c
+++ b/testsuites/psxtests/psx07/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx07/psx07.doc b/testsuites/psxtests/psx07/psx07.doc
index a1462fadc0..fd699af531 100644
--- a/testsuites/psxtests/psx07/psx07.doc
+++ b/testsuites/psxtests/psx07/psx07.doc
@@ -1,10 +1,29 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
# Copyright (c) 2013 Annelies Odermann <annelies.odermann@gmail.com>.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psx07/system.h b/testsuites/psxtests/psx07/system.h
index ee297e019d..06b519b366 100644
--- a/testsuites/psxtests/psx07/system.h
+++ b/testsuites/psxtests/psx07/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psx07/task.c b/testsuites/psxtests/psx07/task.c
index 41e215f495..b4735edb9c 100644
--- a/testsuites/psxtests/psx07/task.c
+++ b/testsuites/psxtests/psx07/task.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This routine serves as a test task. It verifies the basic task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx08/init.c b/testsuites/psxtests/psx08/init.c
index 781ac1ed30..3af6f83d7f 100644
--- a/testsuites/psxtests/psx08/init.c
+++ b/testsuites/psxtests/psx08/init.c
@@ -1,10 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -17,6 +38,119 @@
const char rtems_test_name[] = "PSX 8";
+static void *async_join_thread( void *arg )
+{
+ pthread_t *th;
+ int eno;
+ int type;
+
+ th = arg;
+
+ type = PTHREAD_CANCEL_ASYNCHRONOUS;
+ eno = pthread_setcanceltype( type, &type );
+ rtems_test_assert( eno == 0 );
+ rtems_test_assert( type == PTHREAD_CANCEL_DEFERRED );
+
+ (void) pthread_join( *th, NULL );
+ rtems_test_assert( 0 );
+}
+
+static void test_join_deadlock( void )
+{
+ pthread_t td;
+ pthread_t self;
+ int eno;
+ void *value;
+
+ self = pthread_self();
+
+ eno = pthread_create( &td, NULL, async_join_thread, &self );
+ rtems_test_assert( eno == 0 );
+
+ sched_yield();
+
+ eno = pthread_join( td, NULL );
+ rtems_test_assert( eno == EDEADLK );
+
+ eno = pthread_cancel( td );
+ rtems_test_assert( eno == 0 );
+
+ value = NULL;
+ eno = pthread_join( td, &value );
+ rtems_test_assert( eno == 0 );
+ rtems_test_assert( value == PTHREAD_CANCELED );
+}
+
+typedef struct {
+ pthread_t protected_join;
+ pthread_t deleter;
+ rtems_status_code delete_status;
+} delete_deadlock_context;
+
+static void *protected_join_thread( void *arg )
+{
+ delete_deadlock_context *ctx;
+ int state;
+ int eno;
+ void *value;
+
+ ctx = arg;
+
+ state = PTHREAD_CANCEL_DISABLE;
+ eno = pthread_setcancelstate( state, &state );
+ rtems_test_assert( eno == 0 );
+ rtems_test_assert( state == PTHREAD_CANCEL_ENABLE );
+
+ value = NULL;
+ eno = pthread_join( ctx->deleter, &value );
+ rtems_test_assert( eno == 0 );
+ rtems_test_assert( value == &ctx->deleter );
+
+ state = PTHREAD_CANCEL_ENABLE;
+ eno = pthread_setcancelstate( state, &state );
+ rtems_test_assert( eno == 0 );
+ rtems_test_assert( state == PTHREAD_CANCEL_DISABLE );
+
+ pthread_testcancel();
+ rtems_test_assert( 0 );
+}
+
+static void *deleter_thread( void *arg )
+{
+ delete_deadlock_context *ctx;
+
+ ctx = arg;
+ ctx->delete_status = rtems_task_delete( ctx->protected_join );
+ return &ctx->deleter;
+}
+
+static void test_delete_deadlock( void )
+{
+ delete_deadlock_context ctx;
+ int eno;
+ void *value;
+
+ ctx.delete_status = RTEMS_NOT_IMPLEMENTED;
+
+ eno = pthread_create(
+ &ctx.protected_join,
+ NULL,
+ protected_join_thread,
+ &ctx
+ );
+ rtems_test_assert( eno == 0 );
+
+ eno = pthread_create( &ctx.deleter, NULL, deleter_thread, &ctx );
+ rtems_test_assert( eno == 0 );
+
+ value = NULL;
+ eno = pthread_join( ctx.protected_join, &value );
+ rtems_test_assert( eno == 0 );
+ rtems_test_assert( value == PTHREAD_CANCELED );
+
+ rtems_test_assert( ctx.delete_status == RTEMS_INCORRECT_STATE );
+}
+
void *POSIX_Init(
void *argument
)
@@ -35,6 +169,9 @@ void *POSIX_Init(
Init_id = pthread_self();
printf( "Init's ID is 0x%08" PRIxpthread_t "\n", Init_id );
+ test_join_deadlock();
+ test_delete_deadlock();
+
puts( "Init: pthread_detach - ESRCH (invalid id)" );
status = pthread_detach( (pthread_t) -1 );
rtems_test_assert( status == ESRCH );
diff --git a/testsuites/psxtests/psx08/psx08.doc b/testsuites/psxtests/psx08/psx08.doc
index 52fada3ed1..121ea1bfa1 100644
--- a/testsuites/psxtests/psx08/psx08.doc
+++ b/testsuites/psxtests/psx08/psx08.doc
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# testsuites/psxtests/psx08/psx08.doc
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
diff --git a/testsuites/psxtests/psx08/system.h b/testsuites/psxtests/psx08/system.h
index 127febe449..72a77f0dc5 100644
--- a/testsuites/psxtests/psx08/system.h
+++ b/testsuites/psxtests/psx08/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psx08/task1.c b/testsuites/psxtests/psx08/task1.c
index eb6c9c654b..e958403f01 100644
--- a/testsuites/psxtests/psx08/task1.c
+++ b/testsuites/psxtests/psx08/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This routine serves as a test task. It verifies the basic task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx08/task2.c b/testsuites/psxtests/psx08/task2.c
index 37fe5f29fe..6123fbccc1 100644
--- a/testsuites/psxtests/psx08/task2.c
+++ b/testsuites/psxtests/psx08/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task. It verifies the basic task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx08/task3.c b/testsuites/psxtests/psx08/task3.c
index acbdb9951f..682285cd30 100644
--- a/testsuites/psxtests/psx08/task3.c
+++ b/testsuites/psxtests/psx08/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a test task. It verifies the basic task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx09/init.c b/testsuites/psxtests/psx09/init.c
index d9226c9abb..cd49ba27d4 100644
--- a/testsuites/psxtests/psx09/init.c
+++ b/testsuites/psxtests/psx09/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx09/psx09.doc b/testsuites/psxtests/psx09/psx09.doc
index b90367b669..1d20c18694 100644
--- a/testsuites/psxtests/psx09/psx09.doc
+++ b/testsuites/psxtests/psx09/psx09.doc
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# testsuites/psxtests/psx08/psx08.doc
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
diff --git a/testsuites/psxtests/psx09/system.h b/testsuites/psxtests/psx09/system.h
index aa03a1822d..ebe78ae557 100644
--- a/testsuites/psxtests/psx09/system.h
+++ b/testsuites/psxtests/psx09/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psx10/init.c b/testsuites/psxtests/psx10/init.c
index ad4e60e385..90ed097133 100644
--- a/testsuites/psxtests/psx10/init.c
+++ b/testsuites/psxtests/psx10/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx10/system.h b/testsuites/psxtests/psx10/system.h
index da720f1dd2..e3db02421f 100644
--- a/testsuites/psxtests/psx10/system.h
+++ b/testsuites/psxtests/psx10/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psx10/task.c b/testsuites/psxtests/psx10/task.c
index 1df57e590e..1d1775ea24 100644
--- a/testsuites/psxtests/psx10/task.c
+++ b/testsuites/psxtests/psx10/task.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This routine serves as a test task.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx10/task2.c b/testsuites/psxtests/psx10/task2.c
index ddcb23677c..88091df4c1 100644
--- a/testsuites/psxtests/psx10/task2.c
+++ b/testsuites/psxtests/psx10/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx10/task3.c b/testsuites/psxtests/psx10/task3.c
index 7f1851166f..2f7488503f 100644
--- a/testsuites/psxtests/psx10/task3.c
+++ b/testsuites/psxtests/psx10/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a test task.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx11/init.c b/testsuites/psxtests/psx11/init.c
index 9adde6e25b..fd5b0185cf 100644
--- a/testsuites/psxtests/psx11/init.c
+++ b/testsuites/psxtests/psx11/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx11/system.h b/testsuites/psxtests/psx11/system.h
index f1995a989f..83f5e9e356 100644
--- a/testsuites/psxtests/psx11/system.h
+++ b/testsuites/psxtests/psx11/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psx11/task.c b/testsuites/psxtests/psx11/task.c
index 07577a5d24..bf0412afc9 100644
--- a/testsuites/psxtests/psx11/task.c
+++ b/testsuites/psxtests/psx11/task.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx12/init.c b/testsuites/psxtests/psx12/init.c
index be0b8d6412..6526805313 100644
--- a/testsuites/psxtests/psx12/init.c
+++ b/testsuites/psxtests/psx12/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -207,6 +226,8 @@ static void *POSIX_Init( void *argument )
puts( "Init: pthread_create - SUCCESSFUL" );
+ pthread_setschedprio( pthread_self(), SS_PRIO_LOW );
+
/* Align with clock tick */
sleep( 1 );
diff --git a/testsuites/psxtests/psx13/test.c b/testsuites/psxtests/psx13/test.c
index 0754dbcf30..951953ae98 100644
--- a/testsuites/psxtests/psx13/test.c
+++ b/testsuites/psxtests/psx13/test.c
@@ -639,6 +639,8 @@ static void FutimensTest( void )
/* EBADF test case */
/* Case: Pass an invalid file descriptor */
+ _Timespec_Set_to_zero( &time[0] );
+ _Timespec_Set_to_zero( &time[1] );
rv = futimens( -1, time );
rtems_test_assert( rv == -1 );
rtems_test_assert( errno == EBADF );
diff --git a/testsuites/psxtests/psx14/init.c b/testsuites/psxtests/psx14/init.c
index 070501f065..7e387f64aa 100644
--- a/testsuites/psxtests/psx14/init.c
+++ b/testsuites/psxtests/psx14/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx14/psx14.doc b/testsuites/psxtests/psx14/psx14.doc
index 612ca2c210..ab20790532 100644
--- a/testsuites/psxtests/psx14/psx14.doc
+++ b/testsuites/psxtests/psx14/psx14.doc
@@ -1,10 +1,29 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# testsuites/psxtests/psx14/psx14.doc
#
# Copyright (c) 2013 Mandar Juvekar <mjuvekar0@gmail.com>.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psx14/system.h b/testsuites/psxtests/psx14/system.h
index f44b630c30..c919cde13e 100644
--- a/testsuites/psxtests/psx14/system.h
+++ b/testsuites/psxtests/psx14/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psx15/init.c b/testsuites/psxtests/psx15/init.c
index 03ddf71996..fff3db01c3 100644
--- a/testsuites/psxtests/psx15/init.c
+++ b/testsuites/psxtests/psx15/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2010 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2010 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx16/init.c b/testsuites/psxtests/psx16/init.c
index 8e20e6d376..1914186dee 100644
--- a/testsuites/psxtests/psx16/init.c
+++ b/testsuites/psxtests/psx16/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psx16/psx16.doc b/testsuites/psxtests/psx16/psx16.doc
index cb23efee10..73efd1b66d 100644
--- a/testsuites/psxtests/psx16/psx16.doc
+++ b/testsuites/psxtests/psx16/psx16.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxaio01/init.c b/testsuites/psxtests/psxaio01/init.c
index 283507f9cd..d9b5c8d54f 100644
--- a/testsuites/psxtests/psxaio01/init.c
+++ b/testsuites/psxtests/psxaio01/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright 2010, Alin Rus <alin.codejunkie@gmail.com>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxaio01/system.h b/testsuites/psxtests/psxaio01/system.h
index 2197339a7c..70224470e9 100644
--- a/testsuites/psxtests/psxaio01/system.h
+++ b/testsuites/psxtests/psxaio01/system.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright 2010, Alin Rus <alin.codejunkie@gmail.com>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxaio02/init.c b/testsuites/psxtests/psxaio02/init.c
index 3c75a365b5..0b416221c8 100644
--- a/testsuites/psxtests/psxaio02/init.c
+++ b/testsuites/psxtests/psxaio02/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright 2010, Alin Rus <alin.codejunkie@gmail.com>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxaio02/system.h b/testsuites/psxtests/psxaio02/system.h
index 2197339a7c..70224470e9 100644
--- a/testsuites/psxtests/psxaio02/system.h
+++ b/testsuites/psxtests/psxaio02/system.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright 2010, Alin Rus <alin.codejunkie@gmail.com>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxaio03/init.c b/testsuites/psxtests/psxaio03/init.c
index 0893696962..082937ea4a 100644
--- a/testsuites/psxtests/psxaio03/init.c
+++ b/testsuites/psxtests/psxaio03/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright 2011, Alin Rus <alin.codejunkie@gmail.com>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*
*/
diff --git a/testsuites/psxtests/psxaio03/system.h b/testsuites/psxtests/psxaio03/system.h
index 17baaf7f66..63f662eaf0 100644
--- a/testsuites/psxtests/psxaio03/system.h
+++ b/testsuites/psxtests/psxaio03/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright 2011, Alin Rus <alin.codejunkie@gmail.com>
*
diff --git a/testsuites/psxtests/psxalarm01/init.c b/testsuites/psxtests/psxalarm01/init.c
index f9556faf07..4c5b344d97 100644
--- a/testsuites/psxtests/psxalarm01/init.c
+++ b/testsuites/psxtests/psxalarm01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxalarm01/psxalarm01.doc b/testsuites/psxtests/psxalarm01/psxalarm01.doc
index 5db717cf77..2a5c91a4d8 100644
--- a/testsuites/psxtests/psxalarm01/psxalarm01.doc
+++ b/testsuites/psxtests/psxalarm01/psxalarm01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxautoinit01/init.c b/testsuites/psxtests/psxautoinit01/init.c
index f94879e60f..0e636b9e08 100644
--- a/testsuites/psxtests/psxautoinit01/init.c
+++ b/testsuites/psxtests/psxautoinit01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxautoinit02/init.c b/testsuites/psxtests/psxautoinit02/init.c
index d1a4d3a400..4f510c0408 100644
--- a/testsuites/psxtests/psxautoinit02/init.c
+++ b/testsuites/psxtests/psxautoinit02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxautoinit02/psxautoinit02.doc b/testsuites/psxtests/psxautoinit02/psxautoinit02.doc
index b1225fe819..ce5baf145b 100644
--- a/testsuites/psxtests/psxautoinit02/psxautoinit02.doc
+++ b/testsuites/psxtests/psxautoinit02/psxautoinit02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxbarrier01/main.c b/testsuites/psxtests/psxbarrier01/main.c
index 45d56d025b..d2cc3a01cf 100644
--- a/testsuites/psxtests/psxbarrier01/main.c
+++ b/testsuites/psxtests/psxbarrier01/main.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/psxtests/psxbarrier01/test.c b/testsuites/psxtests/psxbarrier01/test.c
index 4253b21057..1f3bdb138c 100644
--- a/testsuites/psxtests/psxbarrier01/test.c
+++ b/testsuites/psxtests/psxbarrier01/test.c
@@ -1,14 +1,33 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test exercises the POSIX Barrier manager.
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * Copyright (c) 2017 embedded brains GmbH
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxcancel/init.c b/testsuites/psxtests/psxcancel/init.c
index afef141001..9ce17dbd2a 100644
--- a/testsuites/psxtests/psxcancel/init.c
+++ b/testsuites/psxtests/psxcancel/init.c
@@ -1,7 +1,26 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxcancel/psxcancel.doc b/testsuites/psxtests/psxcancel/psxcancel.doc
index af56bd9ff0..63ff11792a 100644
--- a/testsuites/psxtests/psxcancel/psxcancel.doc
+++ b/testsuites/psxtests/psxcancel/psxcancel.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxcancel01/init.c b/testsuites/psxtests/psxcancel01/init.c
index 83c4d5e1a5..258d20b1c2 100644
--- a/testsuites/psxtests/psxcancel01/init.c
+++ b/testsuites/psxtests/psxcancel01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxcancel01/psxcancel01.doc b/testsuites/psxtests/psxcancel01/psxcancel01.doc
index 701d003526..6c658cded4 100644
--- a/testsuites/psxtests/psxcancel01/psxcancel01.doc
+++ b/testsuites/psxtests/psxcancel01/psxcancel01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxchroot01/main.c b/testsuites/psxtests/psxchroot01/main.c
index 2c1c48942f..ccb5609adc 100644
--- a/testsuites/psxtests/psxchroot01/main.c
+++ b/testsuites/psxtests/psxchroot01/main.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup psxtests
+ *
+ * @brief This is main for psxchroot01.
+ */
+
+/*
+ * Copyright (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
/*
* Simple test program -- simplified version of sample test hello.
*/
diff --git a/testsuites/psxtests/psxchroot01/test.c b/testsuites/psxtests/psxchroot01/test.c
index e7c8bbe1cf..7ac6a80d56 100644
--- a/testsuites/psxtests/psxchroot01/test.c
+++ b/testsuites/psxtests/psxchroot01/test.c
@@ -1,13 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* Modifications to support reference counting in the file system are
- * Copyright (c) 2012 embedded brains GmbH.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxclassic01/init.c b/testsuites/psxtests/psxclassic01/init.c
index 04a77b1c30..1324146a6e 100644
--- a/testsuites/psxtests/psxclassic01/init.c
+++ b/testsuites/psxtests/psxclassic01/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define _GNU_SOURCE
diff --git a/testsuites/psxtests/psxclassic01/psxclassic01.doc b/testsuites/psxtests/psxclassic01/psxclassic01.doc
index dd08967493..ef88e93d60 100644
--- a/testsuites/psxtests/psxclassic01/psxclassic01.doc
+++ b/testsuites/psxtests/psxclassic01/psxclassic01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxcleanup/psxcleanup.c b/testsuites/psxtests/psxcleanup/psxcleanup.c
index 2af4aaf78d..e52a02d77d 100644
--- a/testsuites/psxtests/psxcleanup/psxcleanup.c
+++ b/testsuites/psxtests/psxcleanup/psxcleanup.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
*
* This is a simple real-time applications XXX.
*
* Other POSIX facilities such as XXX, condition, .. is also used
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxcleanup/psxcleanup.doc b/testsuites/psxtests/psxcleanup/psxcleanup.doc
index 92c43576fe..c63576f632 100644
--- a/testsuites/psxtests/psxcleanup/psxcleanup.doc
+++ b/testsuites/psxtests/psxcleanup/psxcleanup.doc
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# testsuites/psxtests/psxcleanup/psxcleanup.doc
# Copyright (c) 2013 Anukul Sangwan <email.anukul@gmail.com>.
#
diff --git a/testsuites/psxtests/psxcleanup/system.h b/testsuites/psxtests/psxcleanup/system.h
index 19dde2f0be..c6d37e0c56 100644
--- a/testsuites/psxtests/psxcleanup/system.h
+++ b/testsuites/psxtests/psxcleanup/system.h
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
* function in the test set.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxcleanup01/init.c b/testsuites/psxtests/psxcleanup01/init.c
index b5e833b911..a6daa1fe3b 100644
--- a/testsuites/psxtests/psxcleanup01/init.c
+++ b/testsuites/psxtests/psxcleanup01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxcleanup01/psxcleanup01.doc b/testsuites/psxtests/psxcleanup01/psxcleanup01.doc
index 78aa310def..5ff73a638c 100644
--- a/testsuites/psxtests/psxcleanup01/psxcleanup01.doc
+++ b/testsuites/psxtests/psxcleanup01/psxcleanup01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxcleanup02/init.c b/testsuites/psxtests/psxcleanup02/init.c
index 3773f5b776..c123a817ea 100644
--- a/testsuites/psxtests/psxcleanup02/init.c
+++ b/testsuites/psxtests/psxcleanup02/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2015 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/psxtests/psxcleanup02/main.c b/testsuites/psxtests/psxcleanup02/main.c
index a09aa19312..a72c30970a 100644
--- a/testsuites/psxtests/psxcleanup02/main.c
+++ b/testsuites/psxtests/psxcleanup02/main.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2015 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/psxtests/psxclock/init.c b/testsuites/psxtests/psxclock/init.c
index 66d938868b..eb2f1d130c 100644
--- a/testsuites/psxtests/psxclock/init.c
+++ b/testsuites/psxtests/psxclock/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -31,6 +50,174 @@ static void check_enosys(int status)
rtems_test_exit(0);
}
+static void wait_ticks( rtems_interval ticks )
+{
+ /*
+ * Avoid any clock related sleep calls
+ */
+ rtems_test_assert( rtems_task_wake_after( ticks ) == RTEMS_SUCCESSFUL );
+}
+
+struct clock_context;
+typedef struct clock_context clock_context;
+typedef void (*clock_sleeper)(clock_context* ctx);
+struct clock_context {
+ const char* name;
+ int instance;
+ rtems_id tid;
+ int counter;
+ int result;
+ rtems_interval ticks;
+ struct timespec tspec;
+ clock_sleeper sleeper;
+};
+
+static void clock_context_init(
+ clock_context* ctx, const char* name, int instance,
+ time_t secs, long nsecs, clock_sleeper sleeper)
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->name = name;
+ ctx->instance = instance;
+ ctx->tspec.tv_sec = secs;
+ ctx->tspec.tv_nsec = nsecs;
+ ctx->sleeper = sleeper;
+}
+
+static void test_nanosleep( clock_context* ctx )
+{
+ if ( nanosleep ( &ctx->tspec, NULL ) < 0 )
+ {
+ ctx->result = errno;
+ }
+}
+
+static void test_clock_nanosleep_realtime( clock_context* ctx )
+{
+ if ( clock_nanosleep ( CLOCK_REALTIME, 0, &ctx->tspec, NULL ) < 0 )
+ {
+ ctx->result = errno;
+ }
+}
+
+static void test_clock_nanosleep_monotonic( clock_context* ctx )
+{
+ if ( clock_nanosleep ( CLOCK_MONOTONIC, 0, &ctx->tspec, NULL ) < 0 )
+ {
+ ctx->result = errno;
+ }
+}
+
+static void test_clock_check( clock_context* ctx, const rtems_interval ticks_per_sec )
+{
+ const long tick_period_nsec = 1000000000LLU / ticks_per_sec;
+ rtems_interval ticks =
+ (((ctx->tspec.tv_sec * 1000000000LLU) + ctx->tspec.tv_nsec) / tick_period_nsec) + 1;
+ rtems_test_assert( ctx->result == 0 );
+ printf(
+ "clock: %s: sec=%" PRIdtime_t" nsec=%li ticks=%u expected-ticks=%u\n",
+ ctx->name, ctx->tspec.tv_sec, ctx->tspec.tv_nsec, ctx->ticks, ticks);
+ rtems_test_assert( ctx->ticks == ticks );
+}
+
+static void task_clock( rtems_task_argument arg )
+{
+ clock_context* ctx = (clock_context*) arg;
+ rtems_interval start = rtems_clock_get_ticks_since_boot();
+ rtems_interval end;
+ ctx->result = 0;
+ ctx->sleeper( ctx );
+ end = rtems_clock_get_ticks_since_boot();
+ ctx->ticks = end - start;
+ ++ctx->counter;
+ rtems_task_delete( RTEMS_SELF );
+}
+
+static void test_start_task( clock_context* ctx )
+{
+ rtems_status_code sc;
+ sc = rtems_task_create(
+ rtems_build_name( 'C', 'R', 'T', '0' + ctx->instance ),
+ 1,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &ctx->tid
+ );
+ rtems_test_assert( sc == RTEMS_SUCCESSFUL );
+ sc = rtems_task_start( ctx->tid, task_clock, (rtems_task_argument) ctx );
+ rtems_test_assert( sc == RTEMS_SUCCESSFUL );
+}
+
+static void test_settime_and_sleeping_step( int step )
+{
+ const rtems_interval ticks_per_sec = rtems_clock_get_ticks_per_second();
+ struct timespec tv;
+
+ clock_context ns_ctx;
+ clock_context cnr_ctx;
+ clock_context cnm_ctx;
+
+ printf( "\nClock settime while sleeping: step=%i\n", step );
+
+ clock_context_init(
+ &ns_ctx, "nanosleep", 0, 0, 500000000,
+ test_nanosleep );
+ clock_context_init(
+ &cnr_ctx, "clock_nanosleep(CLOCK_REALTIME)", 0, 0, 500000000,
+ test_clock_nanosleep_realtime );
+ clock_context_init(
+ &cnm_ctx, "clock_nanosleep(CLOCK_MONOTONIC)", 0, 0, 500000000,
+ test_clock_nanosleep_monotonic );
+
+ /* Sat, 01 Jan 2000 00:00:00 GMT */
+ tv.tv_sec = 946684800;
+ tv.tv_nsec = 0;
+ rtems_test_assert( clock_settime( CLOCK_REALTIME, &tv ) == 0 );
+
+ wait_ticks( 1 );
+
+ test_start_task( &ns_ctx );
+ test_start_task( &cnr_ctx );
+ test_start_task( &cnm_ctx );
+
+ wait_ticks( 2 );
+
+ /*
+ * Jump forwards 1 second
+ */
+ if ( step != 0 )
+ {
+ tv.tv_sec = 946684800 + step;
+ tv.tv_nsec = 0;
+ rtems_test_assert( clock_settime( CLOCK_REALTIME, &tv ) == 0 );
+ }
+
+ while (true)
+ {
+ int counts = 0;
+ wait_ticks( ticks_per_sec / 4 );
+ counts += ns_ctx.counter;
+ counts += cnr_ctx.counter;
+ counts += cnm_ctx.counter;
+ if (counts == 3)
+ {
+ break;
+ }
+ }
+
+ test_clock_check( &ns_ctx, ticks_per_sec );
+ test_clock_check( &cnr_ctx, ticks_per_sec );
+ test_clock_check( &cnm_ctx, ticks_per_sec );
+}
+
+static void test_settime_and_sleeping( void )
+{
+ test_settime_and_sleeping_step( 0 );
+ test_settime_and_sleeping_step( 1 );
+ test_settime_and_sleeping_step( -1 );
+}
+
typedef struct {
int counter;
struct timespec delta;
@@ -339,6 +526,8 @@ static rtems_task Init(
}
#endif
+ test_settime_and_sleeping( );
+
TEST_END();
rtems_test_exit(0);
}
@@ -351,7 +540,7 @@ static rtems_task Init(
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_MAXIMUM_TASKS 2
+#define CONFIGURE_MAXIMUM_TASKS 4
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
diff --git a/testsuites/psxtests/psxclock/psxclock.doc b/testsuites/psxtests/psxclock/psxclock.doc
index 64932f4952..4bf8822e41 100644
--- a/testsuites/psxtests/psxclock/psxclock.doc
+++ b/testsuites/psxtests/psxclock/psxclock.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxclock01/init.c b/testsuites/psxtests/psxclock01/init.c
index 123774e1c6..0401745f14 100644
--- a/testsuites/psxtests/psxclock01/init.c
+++ b/testsuites/psxtests/psxclock01/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (C) 2015 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/psxtests/psxclockrealtime01/init.c b/testsuites/psxtests/psxclockrealtime01/init.c
index e8337068a2..722a756ebb 100644
--- a/testsuites/psxtests/psxclockrealtime01/init.c
+++ b/testsuites/psxtests/psxclockrealtime01/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/psxtests/psxconcurrency01/init.c b/testsuites/psxtests/psxconcurrency01/init.c
index 44aeb5f606..1f81530f54 100644
--- a/testsuites/psxtests/psxconcurrency01/init.c
+++ b/testsuites/psxtests/psxconcurrency01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2016
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxconcurrency01/psxconcurrency01.doc b/testsuites/psxtests/psxconcurrency01/psxconcurrency01.doc
index 62492adfc9..25122fab5c 100644
--- a/testsuites/psxtests/psxconcurrency01/psxconcurrency01.doc
+++ b/testsuites/psxtests/psxconcurrency01/psxconcurrency01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2016.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxcond01/init.c b/testsuites/psxtests/psxcond01/init.c
index 4d21531c8a..b1905599cc 100644
--- a/testsuites/psxtests/psxcond01/init.c
+++ b/testsuites/psxtests/psxcond01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxcond01/psxcond01.doc b/testsuites/psxtests/psxcond01/psxcond01.doc
index 5031b7ccdf..30b9643d03 100644
--- a/testsuites/psxtests/psxcond01/psxcond01.doc
+++ b/testsuites/psxtests/psxcond01/psxcond01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxcond02/init.c b/testsuites/psxtests/psxcond02/init.c
index aa6d973083..d141d63f93 100644
--- a/testsuites/psxtests/psxcond02/init.c
+++ b/testsuites/psxtests/psxcond02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2016.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxcond02/psxcond02.doc b/testsuites/psxtests/psxcond02/psxcond02.doc
index 9e6f88a212..9be7ec1daf 100644
--- a/testsuites/psxtests/psxcond02/psxcond02.doc
+++ b/testsuites/psxtests/psxcond02/psxcond02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2016
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxconfig01/init.c b/testsuites/psxtests/psxconfig01/init.c
index 96bd4d8b3d..77a96d1c67 100644
--- a/testsuites/psxtests/psxconfig01/init.c
+++ b/testsuites/psxtests/psxconfig01/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,17 +10,28 @@
/*
* Copyright (c) 2014. On-Line Applications Research Corporation (OAR).
- * Copyright (c) 2011-2014 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2011, 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define _GNU_SOURCE
@@ -187,7 +200,7 @@ static rtems_task Init(rtems_task_argument argument);
#include <rtems/confdefs.h>
typedef struct RTEMS_ALIGNED(RTEMS_PARTITION_ALIGNMENT) {
- uint64_t data [16];
+ uint64_t data [32];
} area;
#if CONFIGURE_MAXIMUM_PARTITIONS > 0
diff --git a/testsuites/psxtests/psxconfig01/psxconfig01.doc b/testsuites/psxtests/psxconfig01/psxconfig01.doc
index 9f45d91230..d8f70bded3 100644
--- a/testsuites/psxtests/psxconfig01/psxconfig01.doc
+++ b/testsuites/psxtests/psxconfig01/psxconfig01.doc
@@ -1,8 +1,27 @@
-# Copyright (c) 2011 embedded brains GmbH.
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2011 embedded brains GmbH & Co. KG
+#
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxdevctl01/main.c b/testsuites/psxtests/psxdevctl01/main.c
index 54776e2b24..652e95c178 100644
--- a/testsuites/psxtests/psxdevctl01/main.c
+++ b/testsuites/psxtests/psxdevctl01/main.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 2016.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/psxtests/psxdevctl01/psxdevctl01.doc b/testsuites/psxtests/psxdevctl01/psxdevctl01.doc
index 51f295d2f1..0251bf6a61 100644
--- a/testsuites/psxtests/psxdevctl01/psxdevctl01.doc
+++ b/testsuites/psxtests/psxdevctl01/psxdevctl01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2016.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxdevctl01/test.c b/testsuites/psxtests/psxdevctl01/test.c
index 2fe7df1834..b1d0e7a16c 100644
--- a/testsuites/psxtests/psxdevctl01/test.c
+++ b/testsuites/psxtests/psxdevctl01/test.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 2016.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define _POSIX_26_C_SOURCE
diff --git a/testsuites/psxtests/psxeintr_join/init.c b/testsuites/psxtests/psxeintr_join/init.c
index 725a198c95..13210db1b4 100644
--- a/testsuites/psxtests/psxeintr_join/init.c
+++ b/testsuites/psxtests/psxeintr_join/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxeintr_join/psxeintr_join.doc b/testsuites/psxtests/psxeintr_join/psxeintr_join.doc
index 40aa43be2f..a9db7cc475 100644
--- a/testsuites/psxtests/psxeintr_join/psxeintr_join.doc
+++ b/testsuites/psxtests/psxeintr_join/psxeintr_join.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxenosys/init.c b/testsuites/psxtests/psxenosys/init.c
index 00148eb50f..d9a4d835f7 100644
--- a/testsuites/psxtests/psxenosys/init.c
+++ b/testsuites/psxtests/psxenosys/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -85,9 +104,15 @@ void *POSIX_Init(
sc = fork();
check_enosys( sc );
- puts( "pthread_atfork -- ENOSYS" );
+ /*
+ * The behavior of pthread_atfork() in single process environments was
+ * undefined by POSIX but the fACE Technical Standard required returning
+ * 0. Before ticket #4713, this did return ENOSYS. Just leaving this test
+ * case here for convenience.
+ */
+ puts( "pthread_atfork -- 0" );
sc = pthread_atfork( NULL, NULL, NULL );
- check_enosys( sc );
+ rtems_test_assert( !sc );
puts( "pthread_getcpuclockid -- ENOSYS" );
sc = pthread_getcpuclockid( 0, NULL );
diff --git a/testsuites/psxtests/psxenosys/psxenosys.doc b/testsuites/psxtests/psxenosys/psxenosys.doc
index e90b97433f..6a5aad871c 100644
--- a/testsuites/psxtests/psxenosys/psxenosys.doc
+++ b/testsuites/psxtests/psxenosys/psxenosys.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxenosys/psxenosys.scn b/testsuites/psxtests/psxenosys/psxenosys.scn
index 1ed64f92e9..9e88acd05a 100644
--- a/testsuites/psxtests/psxenosys/psxenosys.scn
+++ b/testsuites/psxtests/psxenosys/psxenosys.scn
@@ -9,7 +9,7 @@ execv -- ENOSYS
execve -- ENOSYS
execvp -- ENOSYS
fork -- ENOSYS
-pthread_atfork -- ENOSYS
+pthread_atfork -- 0
pthread_getcpuclockid -- ENOSYS
sched_setparam -- ENOSYS
sched_getparam -- ENOSYS
diff --git a/testsuites/psxtests/psxenosys/system.h b/testsuites/psxtests/psxenosys/system.h
index d0eaed6ca3..65458ef3f3 100644
--- a/testsuites/psxtests/psxenosys/system.h
+++ b/testsuites/psxtests/psxenosys/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxfatal01/init.c b/testsuites/psxtests/psxfatal01/init.c
index ffc5b35b12..8162b0e821 100644
--- a/testsuites/psxtests/psxfatal01/init.c
+++ b/testsuites/psxtests/psxfatal01/init.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup psxtests
+ *
+ * @brief This is init for psxfatal01.
+ */
+
+/*
+ * Copyright (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/testsuites/psxtests/psxfatal01/psxfatal01.doc b/testsuites/psxtests/psxfatal01/psxfatal01.doc
index 067fc55a7e..0eac138dcc 100644
--- a/testsuites/psxtests/psxfatal01/psxfatal01.doc
+++ b/testsuites/psxtests/psxfatal01/psxfatal01.doc
@@ -1,10 +1,29 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# testsuites/psxtests/psxfatal01/psxfatal01.doc
#
# Copyright (c) 2013 Mandar Juvekar <mjuvekar0@gmail.com>.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxfatal02/init.c b/testsuites/psxtests/psxfatal02/init.c
index eaf933092d..50dbd43a44 100644
--- a/testsuites/psxtests/psxfatal02/init.c
+++ b/testsuites/psxtests/psxfatal02/init.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup psxtests
+ *
+ * @brief This is init for psxfatal02.
+ */
+
+/*
+ * Copyright (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/testsuites/psxtests/psxfatal_support/psxfatal.h b/testsuites/psxtests/psxfatal_support/psxfatal.h
index 253828bdbd..601d299f1a 100644
--- a/testsuites/psxtests/psxfatal_support/psxfatal.h
+++ b/testsuites/psxtests/psxfatal_support/psxfatal.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems/bspIo.h>
diff --git a/testsuites/psxtests/psxfatal_support/psxfatalimpl.h b/testsuites/psxtests/psxfatal_support/psxfatalimpl.h
index 928b07f335..4ad3cbdd1a 100644
--- a/testsuites/psxtests/psxfatal_support/psxfatalimpl.h
+++ b/testsuites/psxtests/psxfatal_support/psxfatalimpl.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
const char rtems_test_name[] = "PSXFATAL " FATAL_ERROR_TEST_NAME;
diff --git a/testsuites/psxtests/psxfchx01/init.c b/testsuites/psxtests/psxfchx01/init.c
index 081db4050e..5367ea06f0 100644
--- a/testsuites/psxtests/psxfchx01/init.c
+++ b/testsuites/psxtests/psxfchx01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxfchx01/psxfchx01.doc b/testsuites/psxtests/psxfchx01/psxfchx01.doc
index d3a4e0133a..d28a5eb316 100644
--- a/testsuites/psxtests/psxfchx01/psxfchx01.doc
+++ b/testsuites/psxtests/psxfchx01/psxfchx01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxfile01/main.c b/testsuites/psxtests/psxfile01/main.c
index 1703602d39..abe6cd3869 100644
--- a/testsuites/psxtests/psxfile01/main.c
+++ b/testsuites/psxtests/psxfile01/main.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/psxtests/psxfile01/test.c b/testsuites/psxtests/psxfile01/test.c
index 121b08f648..0aa8b1c062 100644
--- a/testsuites/psxtests/psxfile01/test.c
+++ b/testsuites/psxtests/psxfile01/test.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -17,9 +19,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxfile01/test_cat.c b/testsuites/psxtests/psxfile01/test_cat.c
index 9eade89374..c2b3c4bb25 100644
--- a/testsuites/psxtests/psxfile01/test_cat.c
+++ b/testsuites/psxtests/psxfile01/test_cat.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxfile01/test_extend.c b/testsuites/psxtests/psxfile01/test_extend.c
index 86272b6114..45ee32bd67 100644
--- a/testsuites/psxtests/psxfile01/test_extend.c
+++ b/testsuites/psxtests/psxfile01/test_extend.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -13,9 +15,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxfile01/test_write.c b/testsuites/psxtests/psxfile01/test_write.c
index 1830da7480..1e7bcffea9 100644
--- a/testsuites/psxtests/psxfile01/test_write.c
+++ b/testsuites/psxtests/psxfile01/test_write.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxfile02/init.c b/testsuites/psxtests/psxfile02/init.c
index e419d96310..96f72fc97e 100644
--- a/testsuites/psxtests/psxfile02/init.c
+++ b/testsuites/psxtests/psxfile02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxfile02/psxfile02.doc b/testsuites/psxtests/psxfile02/psxfile02.doc
index 035b97b15f..2376ee9c1c 100644
--- a/testsuites/psxtests/psxfile02/psxfile02.doc
+++ b/testsuites/psxtests/psxfile02/psxfile02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxfilelock01/init.c b/testsuites/psxtests/psxfilelock01/init.c
index 6ad9818be6..98a39b8175 100644
--- a/testsuites/psxtests/psxfilelock01/init.c
+++ b/testsuites/psxtests/psxfilelock01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxfilelock01/psxfilelock01.doc b/testsuites/psxtests/psxfilelock01/psxfilelock01.doc
index 375d3bf2e0..2fcaded77d 100644
--- a/testsuites/psxtests/psxfilelock01/psxfilelock01.doc
+++ b/testsuites/psxtests/psxfilelock01/psxfilelock01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxftw01/init.c b/testsuites/psxtests/psxftw01/init.c
index ee0e40c84a..5bd89928d1 100644
--- a/testsuites/psxtests/psxftw01/init.c
+++ b/testsuites/psxtests/psxftw01/init.c
@@ -6,7 +6,7 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (C) 2020 Eshan Dhawan, embedded brains GmbH, Joel Sherrill
+ * Copyright (C) 2020 Eshan Dhawan, embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -66,36 +66,6 @@ void *POSIX_Init (void * argument);
static char file_traverse_order[6][20];
static int file_order;
-static char buffer[512];
-
-static const T_action actions[] = {
- T_report_hash_sha256,
- T_check_task_context,
- T_check_file_descriptors,
- T_check_rtems_barriers,
- T_check_rtems_extensions,
- T_check_rtems_message_queues,
- T_check_rtems_partitions,
- T_check_rtems_periods,
- T_check_rtems_regions,
- T_check_rtems_semaphores,
- T_check_rtems_tasks,
- T_check_rtems_timers,
- T_check_posix_keys
-};
-
-static const T_config config = {
- .name = "psxftw01",
- .buf = buffer,
- .buf_size = sizeof(buffer),
- .putchar = rtems_put_char,
- .verbosity = T_VERBOSE,
- .now = T_now_clock,
- .action_count = T_ARRAY_SIZE(actions),
- .actions = actions
-};
-
-
static int fn_function (const char *fpath, const struct stat *sb,
int tflag, struct FTW *ftwbuf)
{
@@ -122,9 +92,7 @@ T_TEST_CASE(ftw)
TARFILE_SIZE,
&rtems_test_printer
);
- if (sc != RTEMS_SUCCESSFUL) {
- printf ("error: untar failed: %s\n", rtems_status_text (sc));
- }
+ T_rsc_success( sc );
/* Array with expected file order */
char arr_ftw_depth[5][20] = { "test_file", "test_script", "def", "abc", "home" };
@@ -136,49 +104,31 @@ T_TEST_CASE(ftw)
file_order = 0;
flags |= FTW_DEPTH;
r = nftw( files_path, fn_function, 5, flags );
-
- T_quiet_psx_success(r);
+ T_psx_success( r );
/*comparing the nftw file tree to the expexted file tree traversal */
for (i = 0; i < file_order; i++){
r = strcmp( arr_ftw_depth[i], file_traverse_order[i]);
- if (r){
- printf( "Incorrect Order " );
- }
- T_quiet_psx_success(r);
+ T_eq_int( r, 0 );
}
/*----------------Test Block 2--------------------*/
flags = 0;
file_order = 0;
flags |= FTW_PHYS;
r = nftw( files_path, fn_function, 5, flags );
- T_quiet_psx_success(r);
+ T_psx_success(r);
/*comparing the nftw file tree to the expected file tree traversal*/
for (i = 0; i < file_order; i++){
r = strcmp( arr_ftw_phys[i], file_traverse_order[i]);
- if (r){
- printf( "Incorrect Order " );
- }
- T_quiet_psx_success(r);
+ T_eq_int( r, 0 );
}
}
void *POSIX_Init (void * argument)
{
- int exit_code;
-
- TEST_BEGIN();
-
- T_register();
- exit_code = T_main(&config);
- if (exit_code == 0) {
- TEST_END();
- }
-
- rtems_test_exit(exit_code);
-
+ rtems_test_run( (rtems_task_argument) argument, TEST_STATE );
}
/* NOTICE: the clock driver is explicitly disabled */
diff --git a/testsuites/psxtests/psxgetattrnp01/init.c b/testsuites/psxtests/psxgetattrnp01/init.c
index dca5a25dae..ac2bab5d27 100644
--- a/testsuites/psxtests/psxgetattrnp01/init.c
+++ b/testsuites/psxtests/psxgetattrnp01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define _GNU_SOURCE
diff --git a/testsuites/psxtests/psxgetattrnp01/psxgetattrnp01.doc b/testsuites/psxtests/psxgetattrnp01/psxgetattrnp01.doc
index 52366e091f..c0d4446067 100644
--- a/testsuites/psxtests/psxgetattrnp01/psxgetattrnp01.doc
+++ b/testsuites/psxtests/psxgetattrnp01/psxgetattrnp01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxgetrusage01/init.c b/testsuites/psxtests/psxgetrusage01/init.c
index ee69c998f1..91ea1d3a11 100644
--- a/testsuites/psxtests/psxgetrusage01/init.c
+++ b/testsuites/psxtests/psxgetrusage01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxgetrusage01/psxgetrusage01.doc b/testsuites/psxtests/psxgetrusage01/psxgetrusage01.doc
index 603f7a752c..b4ee0515d6 100644
--- a/testsuites/psxtests/psxgetrusage01/psxgetrusage01.doc
+++ b/testsuites/psxtests/psxgetrusage01/psxgetrusage01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxglobalcon01/init.cc b/testsuites/psxtests/psxglobalcon01/init.cc
index 994cf7f8d8..a61734bcd1 100644
--- a/testsuites/psxtests/psxglobalcon01/init.cc
+++ b/testsuites/psxtests/psxglobalcon01/init.cc
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxglobalcon02/init.cc b/testsuites/psxtests/psxglobalcon02/init.cc
index 917f205f10..3d8206261a 100644
--- a/testsuites/psxtests/psxglobalcon02/init.cc
+++ b/testsuites/psxtests/psxglobalcon02/init.cc
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/arpa/inet/inet_ntop.c b/testsuites/psxtests/psxhdrs/arpa/inet/inet_ntop.c
index c3e3828b0b..5b64b565cc 100644
--- a/testsuites/psxtests/psxhdrs/arpa/inet/inet_ntop.c
+++ b/testsuites/psxtests/psxhdrs/arpa/inet/inet_ntop.c
@@ -32,7 +32,7 @@ int test(void);
int test(void)
{
int af = 0;
- struct in_addr addr;
+ struct in_addr addr = { 0 };
char *dst = "string";
const char *ret = inet_ntop(af, &addr, dst, sizeof(dst));
diff --git a/testsuites/psxtests/psxhdrs/devctl/posix_devctl.c b/testsuites/psxtests/psxhdrs/devctl/posix_devctl.c
index db034599de..93826a8d5b 100644
--- a/testsuites/psxtests/psxhdrs/devctl/posix_devctl.c
+++ b/testsuites/psxtests/psxhdrs/devctl/posix_devctl.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2016.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define _POSIX_26_C_SOURCE
diff --git a/testsuites/psxtests/psxhdrs/fcntl/openat.c b/testsuites/psxtests/psxhdrs/fcntl/openat.c
index 927d56774b..1c15cd0867 100644
--- a/testsuites/psxtests/psxhdrs/fcntl/openat.c
+++ b/testsuites/psxtests/psxhdrs/fcntl/openat.c
@@ -5,7 +5,7 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
- *
+ *
* Copyright (C) 2018, Zenon
*
* Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,7 @@ int test(void);
int test(void){
int i0, i1;
- char c;
+ char c = '\0';
i0 = 0;
i1 = 0;
diff --git a/testsuites/psxtests/psxhdrs/netdb/gethostbyaddr.c b/testsuites/psxtests/psxhdrs/netdb/gethostbyaddr.c
index 07d734334b..cd2a271c37 100644
--- a/testsuites/psxtests/psxhdrs/netdb/gethostbyaddr.c
+++ b/testsuites/psxtests/psxhdrs/netdb/gethostbyaddr.c
@@ -43,7 +43,7 @@
int test( void )
{
struct hostent *host;
- struct in_addr ipv4addr;
+ struct in_addr ipv4addr = { 0 };
host = gethostbyaddr( &ipv4addr, sizeof(ipv4addr), AF_INET );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_destroy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_destroy.c
index 3cae3a90ae..7a2af68609 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_destroy.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_destroy.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_destroy() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getdetachstate.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getdetachstate.c
index 216e77b683..e2341a582d 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getdetachstate.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getdetachstate.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_getdetachstate() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -26,8 +42,8 @@ int test( void );
int test( void )
{
- pthread_attr_t attribute;
- int state;
+ pthread_attr_t attribute = { 0 };
+ int state = 0;
int result;
result = pthread_attr_getdetachstate( &attribute, &state );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c
index 4bdc4d8fc4..5a816d2115 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_getguardsize() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -26,8 +42,8 @@ int test( void );
int test( void )
{
- pthread_attr_t attribute;
- size_t size;
+ pthread_attr_t attribute = { 0 };
+ size_t size = 0;
int result;
result = pthread_attr_getguardsize( &attribute, &size );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getinheritsched.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getinheritsched.c
index a2c524ae54..86a4547164 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getinheritsched.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getinheritsched.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_getinheritsched() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -26,8 +42,8 @@ int test( void );
int test( void )
{
- pthread_attr_t attr;
- int inheritsched;
+ pthread_attr_t attr = { 0 };
+ int inheritsched = 0;
int result;
result = pthread_attr_getinheritsched( &attr, &inheritsched );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedparam.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedparam.c
index 8dbf8bad24..743e2c4d21 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedparam.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedparam.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_getschedparam() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -26,8 +42,8 @@ int test( void );
int test( void )
{
- pthread_attr_t attr;
- struct sched_param param;
+ pthread_attr_t attr = { 0 };
+ struct sched_param param = { 0 };
int result;
result = pthread_attr_getschedparam( &attr, &param );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedpolicy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedpolicy.c
index 2958826cbd..60595d1a7a 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedpolicy.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedpolicy.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_getschedpolicy() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -26,8 +42,8 @@ int test( void );
int test( void )
{
- pthread_attr_t attr;
- int policy;
+ pthread_attr_t attr = { 0 };
+ int policy = 0;
int result;
result = pthread_attr_getschedpolicy( &attr, &policy );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getscope.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getscope.c
index c24f80758a..7b97a7859c 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getscope.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getscope.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_getscope() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -26,8 +42,8 @@ int test( void );
int test( void )
{
- pthread_attr_t attr;
- int contentionscope;
+ pthread_attr_t attr = { 0 };
+ int contentionscope = 0;
int result;
result = pthread_attr_getscope( &attr, &contentionscope );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c
index c1ca327d94..f2d8a76362 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_getstack() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -31,7 +47,7 @@ int test( void );
int test( void )
{
- pthread_attr_t attribute;
+ pthread_attr_t attribute = { 0 };
void *stackaddr;
size_t stacksize;
int result;
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstackaddr.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstackaddr.c
index 5ece105af1..ed718c76d9 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstackaddr.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstackaddr.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_getstackaddr() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -31,7 +47,7 @@ int test( void );
int test( void )
{
- pthread_attr_t attribute;
+ pthread_attr_t attribute = { 0 };
void *stackaddr;
int result;
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstacksize.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstacksize.c
index cc5affd0c6..ff9237a8eb 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstacksize.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstacksize.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_getstacksize() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -30,8 +46,8 @@ int test( void );
int test( void )
{
- pthread_attr_t attribute;
- size_t size;
+ pthread_attr_t attribute = { 0 };
+ size_t size = 0;
int result;
result = pthread_attr_getstacksize( &attribute, &size );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_init.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_init.c
index b81a4538e1..12c656b8ae 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_init.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_init.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_init() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setdetachstate.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setdetachstate.c
index 40f84df96f..ffa9a70ef7 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setdetachstate.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setdetachstate.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c
index 907b3d9753..89db862450 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_setguardsize() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setinheritsched.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setinheritsched.c
index 0d87708c76..049ee150bf 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setinheritsched.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setinheritsched.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_setinheritsched() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedparam.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedparam.c
index b97608dfe1..643ccde907 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedparam.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedparam.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_setschedparam() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -26,8 +42,8 @@ int test( void );
int test( void )
{
- pthread_attr_t attr;
- struct sched_param param;
+ pthread_attr_t attr = { 0 };
+ struct sched_param param = { 0 };
int result;
result = pthread_attr_setschedparam( &attr, &param );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedpolicy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedpolicy.c
index 6fe244294c..909efe8d4b 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedpolicy.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedpolicy.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_setschedpolicy() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setscope.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setscope.c
index 9f7db4a511..ab34eb18ac 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setscope.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setscope.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_setscope() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c
index f19ee9497e..773143ff56 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_setstack() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstackaddr.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstackaddr.c
index 191891ad0d..6b0c43fb29 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstackaddr.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstackaddr.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_setstackaddr() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstacksize.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstacksize.c
index 7e17a50527..6a2855e265 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstacksize.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstacksize.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_attr_setstacksize() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cancel.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cancel.c
index 8b2632e4c0..6e0864812c 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_cancel.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cancel.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_cancel() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cleanup.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cleanup.c
index 0220b0e21e..cf234a192b 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_cleanup.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cleanup.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_cleanup_push() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_broadcast.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_broadcast.c
index 8577ef944b..2589bd9a63 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_broadcast.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_broadcast.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_cond_broadcast() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_destroy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_destroy.c
index afd5fa132c..a5b0d9303d 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_destroy.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_destroy.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_cond_destroy() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_init.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_init.c
index c02ab5c996..b7e2e2ad34 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_init.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_init.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_cond_init() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -27,7 +43,7 @@ int test( void );
int test( void )
{
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
- pthread_condattr_t attribute;
+ pthread_condattr_t attribute = { 0 };
int result;
result = pthread_cond_init( &cond, &attribute );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_signal.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_signal.c
index fcf32cb689..9c8c934898 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_signal.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_signal.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_cond_signal() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_timedwait.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_timedwait.c
index a531b0d638..72427266c1 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_timedwait.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_timedwait.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_cond_timedwait() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,7 +44,7 @@ int test( void )
{
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- struct timespec abstime;
+ struct timespec abstime = { 0 };
int result;
result = pthread_cond_timedwait( &cond, &mutex, &abstime );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_wait.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_wait.c
index 40a65ffbf3..7064f68201 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_wait.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_wait.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_cond_wait() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_destroy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_destroy.c
index 3e56912668..502a32ddfd 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_destroy.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_destroy.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_condattr_destroy() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_getpshared.c b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_getpshared.c
index ea0766a378..21af201c65 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_getpshared.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_getpshared.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_condattr_setpshared() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -29,7 +45,7 @@ int test( void );
int test( void )
{
- pthread_condattr_t attribute;
+ pthread_condattr_t attribute = { 0 };
int pshared;
int result;
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_init.c b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_init.c
index 51a0d39b68..b194ae4fce 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_init.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_init.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_condattr_init() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_setpshared.c b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_setpshared.c
index 618507373e..49a9d156cf 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_setpshared.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_setpshared.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_condattr_setpshared() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_create.c b/testsuites/psxtests/psxhdrs/pthread/pthread_create.c
index 56eb182ce8..de4f6b0bec 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_create.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_create.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_create() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -37,7 +53,7 @@ void *test_task(
int test( void )
{
pthread_t thread;
- pthread_attr_t attribute;
+ pthread_attr_t attribute = { 0 };
void *arg = NULL;
int result;
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_detach.c b/testsuites/psxtests/psxhdrs/pthread/pthread_detach.c
index 08eb13b641..b62dd66378 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_detach.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_detach.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_detach() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_equal.c b/testsuites/psxtests/psxhdrs/pthread/pthread_equal.c
index 81b1a699a0..df7f4ce7cb 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_equal.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_equal.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_equal() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_exit.c b/testsuites/psxtests/psxhdrs/pthread/pthread_exit.c
index 09a43ad0c0..b3a6d785b4 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_exit.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_exit.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_exit() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_getconcurrency.c b/testsuites/psxtests/psxhdrs/pthread/pthread_getconcurrency.c
index 179e526597..cb17f692b8 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_getconcurrency.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_getconcurrency.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_getconcurrency() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_getcpuclockid.c b/testsuites/psxtests/psxhdrs/pthread/pthread_getcpuclockid.c
index cb6383be4d..9f67a30a2f 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_getcpuclockid.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_getcpuclockid.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_getcpuclockid() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_getschedparam.c b/testsuites/psxtests/psxhdrs/pthread/pthread_getschedparam.c
index f3c18629c2..622dbd5dbb 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_getschedparam.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_getschedparam.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_getschedparam() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_getspecific.c b/testsuites/psxtests/psxhdrs/pthread/pthread_getspecific.c
index 1f2ecee101..cad3b166c8 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_getspecific.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_getspecific.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_getspecific() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_join.c b/testsuites/psxtests/psxhdrs/pthread/pthread_join.c
index 2455224ec8..cec5900a81 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_join.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_join.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_join() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_key_create.c b/testsuites/psxtests/psxhdrs/pthread/pthread_key_create.c
index 649b178c9f..2606b34594 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_key_create.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_key_create.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_key_create() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_key_delete.c b/testsuites/psxtests/psxhdrs/pthread/pthread_key_delete.c
index e824a7d7a4..4e03c3c4a9 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_key_delete.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_key_delete.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_key_delete() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_destroy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_destroy.c
index 5b8cbe2703..a64d7c8f10 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_destroy.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_destroy.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutex_destroy() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_getprioceiling.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_getprioceiling.c
index 103bdc6f4c..65b44fa779 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_getprioceiling.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_getprioceiling.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutex_getprioceiling() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -29,8 +45,8 @@ int test( void );
int test( void )
{
- pthread_mutex_t mutex;
- int prioceiling;
+ pthread_mutex_t mutex = { 0 };
+ int prioceiling = 0;
int result;
result = pthread_mutex_getprioceiling( &mutex, &prioceiling );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_init.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_init.c
index b4d619ee25..1b42dbc0f3 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_init.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_init.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutex_init() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -27,7 +43,7 @@ int test( void );
int test( void )
{
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- pthread_mutexattr_t attribute;
+ pthread_mutexattr_t attribute = { 0 };
int result;
result = pthread_mutex_init( &mutex, &attribute );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_lock.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_lock.c
index bed9cb5a97..a4e2bd277f 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_lock.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_lock.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutex_lock() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_setprioceiling.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_setprioceiling.c
index 7b8a4e5e21..441c2d2b03 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_setprioceiling.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_setprioceiling.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutex_setprioceiling() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_timedlock.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_timedlock.c
index 57d91c7466..02f864493d 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_timedlock.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_timedlock.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutex_timedlock() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -30,7 +46,7 @@ int test( void );
int test( void )
{
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- struct timespec timeout;
+ struct timespec timeout = { 0 };
int result;
result = pthread_mutex_timedlock( &mutex, &timeout );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_trylock.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_trylock.c
index a2dc94264a..696a59401a 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_trylock.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_trylock.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutex_trylock() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_unlock.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_unlock.c
index 451937a0f6..738d3088fd 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_unlock.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_unlock.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutex_unlock() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_destroy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_destroy.c
index c4e1f1c67f..269270418f 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_destroy.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_destroy.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutexattr_destroy() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprioceiling.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprioceiling.c
index 6eda0c713d..675ef02d38 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprioceiling.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprioceiling.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutexattr_getprioceiling() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -29,7 +45,7 @@ int test( void );
int test( void )
{
- pthread_mutexattr_t attribute;
+ pthread_mutexattr_t attribute = { 0 };
int prioceiling = 0;
int result;
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprotocol.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprotocol.c
index bf4a74cf40..da16c786b0 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprotocol.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprotocol.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutexattr_getprotocol() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -29,8 +45,8 @@ int test( void );
int test( void )
{
- pthread_mutexattr_t attribute;
- int protocol;
+ pthread_mutexattr_t attribute = { 0 };
+ int protocol = 0;
int result;
result = pthread_mutexattr_getprotocol( &attribute, &protocol );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getpshared.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getpshared.c
index f123cbfe10..d8e8eaabeb 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getpshared.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getpshared.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutexattr_getpshared() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -29,8 +45,8 @@ int test( void );
int test( void )
{
- pthread_mutexattr_t attribute;
- int pshared;
+ pthread_mutexattr_t attribute = { 0 };
+ int pshared = 0;
int result;
result = pthread_mutexattr_getpshared( &attribute, &pshared );
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_init.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_init.c
index e7d607d345..7c3ff0270f 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_init.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_init.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutexattr_init() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprioceiling.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprioceiling.c
index bac37a7a98..da891d3e94 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprioceiling.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprioceiling.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutexattr_setprioceiling() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprotocol.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprotocol.c
index 1f56389908..4814a26c38 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprotocol.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprotocol.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutexattr_setprotocol() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setpshared.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setpshared.c
index d798d70661..1cb2714a71 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setpshared.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setpshared.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_mutexattr_setpshared() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_once.c b/testsuites/psxtests/psxhdrs/pthread/pthread_once.c
index dbd6b00bf6..d764d27327 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_once.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_once.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_once() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_self.c b/testsuites/psxtests/psxhdrs/pthread/pthread_self.c
index cb663a2d64..6b620c71d9 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_self.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_self.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_self() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_setcancelstate.c b/testsuites/psxtests/psxhdrs/pthread/pthread_setcancelstate.c
index ba780977cc..b6c02bbb77 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_setcancelstate.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_setcancelstate.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_setcancelstate() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_setcanceltype.c b/testsuites/psxtests/psxhdrs/pthread/pthread_setcanceltype.c
index 947447887c..069286435d 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_setcanceltype.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_setcanceltype.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_setcanceltype() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_setconcurrency.c b/testsuites/psxtests/psxhdrs/pthread/pthread_setconcurrency.c
index 1e2b7cb4b1..975d81a3a7 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_setconcurrency.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_setconcurrency.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_setconcurrency() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_setschedparam.c b/testsuites/psxtests/psxhdrs/pthread/pthread_setschedparam.c
index df2ab2b40c..af0bc42dfe 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_setschedparam.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_setschedparam.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_setschedparam() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_setspecific.c b/testsuites/psxtests/psxhdrs/pthread/pthread_setspecific.c
index 9b638d0677..13fe314bd6 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_setspecific.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_setspecific.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_setspecific() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_testcancel.c b/testsuites/psxtests/psxhdrs/pthread/pthread_testcancel.c
index 22406c31ac..67b6742811 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_testcancel.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_testcancel.c
@@ -1,16 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
* @brief pthread_testcancel() API Conformance Test
*/
/*
-* COPYRIGHT (c) 1989-2009.
-* On-Line Applications Research Corporation (OAR).
-*
-* The license and distribution terms for this file may be
-* found in the file LICENSE in this distribution or at
-* http://www.rtems.org/license/LICENSE.
-*/
+ * 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 OWNER 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.
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/testsuites/psxtests/psxhdrs/sched/sched_get_priority_max.c b/testsuites/psxtests/psxhdrs/sched/sched_get_priority_max.c
index 1180af5af0..4f29137aec 100644
--- a/testsuites/psxtests/psxhdrs/sched/sched_get_priority_max.c
+++ b/testsuites/psxtests/psxhdrs/sched/sched_get_priority_max.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sched/sched_get_priority_min.c b/testsuites/psxtests/psxhdrs/sched/sched_get_priority_min.c
index f9cabaf95c..d9a1a71739 100644
--- a/testsuites/psxtests/psxhdrs/sched/sched_get_priority_min.c
+++ b/testsuites/psxtests/psxhdrs/sched/sched_get_priority_min.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sched/sched_getparam.c b/testsuites/psxtests/psxhdrs/sched/sched_getparam.c
index 00a9a81656..6dda45340b 100644
--- a/testsuites/psxtests/psxhdrs/sched/sched_getparam.c
+++ b/testsuites/psxtests/psxhdrs/sched/sched_getparam.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sched/sched_getscheduler.c b/testsuites/psxtests/psxhdrs/sched/sched_getscheduler.c
index 111597d70f..4f91d02bca 100644
--- a/testsuites/psxtests/psxhdrs/sched/sched_getscheduler.c
+++ b/testsuites/psxtests/psxhdrs/sched/sched_getscheduler.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sched/sched_rr_get_interval.c b/testsuites/psxtests/psxhdrs/sched/sched_rr_get_interval.c
index 6fe2a1b22d..ae114ac247 100644
--- a/testsuites/psxtests/psxhdrs/sched/sched_rr_get_interval.c
+++ b/testsuites/psxtests/psxhdrs/sched/sched_rr_get_interval.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sched/sched_setparam.c b/testsuites/psxtests/psxhdrs/sched/sched_setparam.c
index f653d228b7..b3cfd8f3d6 100644
--- a/testsuites/psxtests/psxhdrs/sched/sched_setparam.c
+++ b/testsuites/psxtests/psxhdrs/sched/sched_setparam.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sched/sched_setscheduler.c b/testsuites/psxtests/psxhdrs/sched/sched_setscheduler.c
index 54bfbb8f28..5d42c0c0fc 100644
--- a/testsuites/psxtests/psxhdrs/sched/sched_setscheduler.c
+++ b/testsuites/psxtests/psxhdrs/sched/sched_setscheduler.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sched/sched_yield.c b/testsuites/psxtests/psxhdrs/sched/sched_yield.c
index 0f2ac9200d..b10b7abd5b 100644
--- a/testsuites/psxtests/psxhdrs/sched/sched_yield.c
+++ b/testsuites/psxtests/psxhdrs/sched/sched_yield.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/signal/pthread_sigmask.c b/testsuites/psxtests/psxhdrs/signal/pthread_sigmask.c
index 2820038d16..e1c2e989c5 100644
--- a/testsuites/psxtests/psxhdrs/signal/pthread_sigmask.c
+++ b/testsuites/psxtests/psxhdrs/signal/pthread_sigmask.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/signal/raise.c b/testsuites/psxtests/psxhdrs/signal/raise.c
index d504de881d..4fd920c4ce 100644
--- a/testsuites/psxtests/psxhdrs/signal/raise.c
+++ b/testsuites/psxtests/psxhdrs/signal/raise.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/signal/signal.c b/testsuites/psxtests/psxhdrs/signal/signal.c
index 8985ee9647..4900f3814d 100644
--- a/testsuites/psxtests/psxhdrs/signal/signal.c
+++ b/testsuites/psxtests/psxhdrs/signal/signal.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/signal/sigpending.c b/testsuites/psxtests/psxhdrs/signal/sigpending.c
index abe00ad25c..5436017382 100644
--- a/testsuites/psxtests/psxhdrs/signal/sigpending.c
+++ b/testsuites/psxtests/psxhdrs/signal/sigpending.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/signal/sigprocmask.c b/testsuites/psxtests/psxhdrs/signal/sigprocmask.c
index f020395f5c..40e787c747 100644
--- a/testsuites/psxtests/psxhdrs/signal/sigprocmask.c
+++ b/testsuites/psxtests/psxhdrs/signal/sigprocmask.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/signal/sigsuspend.c b/testsuites/psxtests/psxhdrs/signal/sigsuspend.c
index b4204af143..282125386e 100644
--- a/testsuites/psxtests/psxhdrs/signal/sigsuspend.c
+++ b/testsuites/psxtests/psxhdrs/signal/sigsuspend.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/signal/sigtimedwait.c b/testsuites/psxtests/psxhdrs/signal/sigtimedwait.c
index dce7c974af..32e7ac6e41 100644
--- a/testsuites/psxtests/psxhdrs/signal/sigtimedwait.c
+++ b/testsuites/psxtests/psxhdrs/signal/sigtimedwait.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/signal/sigwait.c b/testsuites/psxtests/psxhdrs/signal/sigwait.c
index f007005b2a..9cd59f5abe 100644
--- a/testsuites/psxtests/psxhdrs/signal/sigwait.c
+++ b/testsuites/psxtests/psxhdrs/signal/sigwait.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/signal/sigwaitinfo.c b/testsuites/psxtests/psxhdrs/signal/sigwaitinfo.c
index 836b1ba0fc..e6a0485680 100644
--- a/testsuites/psxtests/psxhdrs/signal/sigwaitinfo.c
+++ b/testsuites/psxtests/psxhdrs/signal/sigwaitinfo.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/mman/mlock.c b/testsuites/psxtests/psxhdrs/sys/mman/mlock.c
index 04c392ee80..52beb4edaa 100644
--- a/testsuites/psxtests/psxhdrs/sys/mman/mlock.c
+++ b/testsuites/psxtests/psxhdrs/sys/mman/mlock.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -6,9 +8,26 @@
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/mman/mlockall.c b/testsuites/psxtests/psxhdrs/sys/mman/mlockall.c
index 12dbd83ab8..f8bea96b6c 100644
--- a/testsuites/psxtests/psxhdrs/sys/mman/mlockall.c
+++ b/testsuites/psxtests/psxhdrs/sys/mman/mlockall.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -6,9 +8,26 @@
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/mman/mmap.c b/testsuites/psxtests/psxhdrs/sys/mman/mmap.c
index 8426b12855..0ae29467c4 100644
--- a/testsuites/psxtests/psxhdrs/sys/mman/mmap.c
+++ b/testsuites/psxtests/psxhdrs/sys/mman/mmap.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -6,9 +8,26 @@
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/mman/mprotect.c b/testsuites/psxtests/psxhdrs/sys/mman/mprotect.c
index 5503c94bd2..4c0e29673e 100644
--- a/testsuites/psxtests/psxhdrs/sys/mman/mprotect.c
+++ b/testsuites/psxtests/psxhdrs/sys/mman/mprotect.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -6,9 +8,26 @@
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/mman/msync.c b/testsuites/psxtests/psxhdrs/sys/mman/msync.c
index 4cd239a2b8..80dac614a6 100644
--- a/testsuites/psxtests/psxhdrs/sys/mman/msync.c
+++ b/testsuites/psxtests/psxhdrs/sys/mman/msync.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -6,9 +8,26 @@
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/mman/munlock.c b/testsuites/psxtests/psxhdrs/sys/mman/munlock.c
index 42af198fa9..8e0cacd443 100644
--- a/testsuites/psxtests/psxhdrs/sys/mman/munlock.c
+++ b/testsuites/psxtests/psxhdrs/sys/mman/munlock.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -6,9 +8,26 @@
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/mman/munlockall.c b/testsuites/psxtests/psxhdrs/sys/mman/munlockall.c
index 4b8294302d..b2d2434c54 100644
--- a/testsuites/psxtests/psxhdrs/sys/mman/munlockall.c
+++ b/testsuites/psxtests/psxhdrs/sys/mman/munlockall.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -6,9 +8,26 @@
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/mman/munmap.c b/testsuites/psxtests/psxhdrs/sys/mman/munmap.c
index 1c42973a9f..d3260af09e 100644
--- a/testsuites/psxtests/psxhdrs/sys/mman/munmap.c
+++ b/testsuites/psxtests/psxhdrs/sys/mman/munmap.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -6,9 +8,26 @@
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/mman/posix_madvise.c b/testsuites/psxtests/psxhdrs/sys/mman/posix_madvise.c
index 3457973a3e..9afca5a600 100644
--- a/testsuites/psxtests/psxhdrs/sys/mman/posix_madvise.c
+++ b/testsuites/psxtests/psxhdrs/sys/mman/posix_madvise.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -6,9 +8,26 @@
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/mman/shm_open.c b/testsuites/psxtests/psxhdrs/sys/mman/shm_open.c
index c44ded4abd..4f9b160ef8 100644
--- a/testsuites/psxtests/psxhdrs/sys/mman/shm_open.c
+++ b/testsuites/psxtests/psxhdrs/sys/mman/shm_open.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -6,9 +8,26 @@
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/mman/shm_unlink.c b/testsuites/psxtests/psxhdrs/sys/mman/shm_unlink.c
index 3d1b9bb463..5bb38bea8c 100644
--- a/testsuites/psxtests/psxhdrs/sys/mman/shm_unlink.c
+++ b/testsuites/psxtests/psxhdrs/sys/mman/shm_unlink.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -6,9 +8,26 @@
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/select/pselect.c b/testsuites/psxtests/psxhdrs/sys/select/pselect.c
index d35a0d0921..ad96dda686 100644
--- a/testsuites/psxtests/psxhdrs/sys/select/pselect.c
+++ b/testsuites/psxtests/psxhdrs/sys/select/pselect.c
@@ -45,8 +45,8 @@ int test( void )
fd_set readfds;
fd_set writefds;
fd_set errorfds;
- struct timespec timeout;
- sigset_t sigmask;
+ struct timespec timeout = { 0 };
+ sigset_t sigmask = { 0 };
return_value = pselect(nfds, &readfds, &writefds, &errorfds, &timeout, &sigmask);
return return_value;
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/accept.c b/testsuites/psxtests/psxhdrs/sys/socket/accept.c
index f57ecd5410..5dc58ba595 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/accept.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/accept.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/bind.c b/testsuites/psxtests/psxhdrs/sys/socket/bind.c
index 8572fc20b3..2fa19f2c26 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/bind.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/bind.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -25,7 +44,7 @@ int test(void);
int test(void)
{
int sockfd = 4;
- struct sockaddr addr;
+ struct sockaddr addr = { 0 };
socklen_t addrlen = sizeof(addr);
return bind(sockfd, &addr, addrlen);
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/connect.c b/testsuites/psxtests/psxhdrs/sys/socket/connect.c
index 2f852bfc97..afb560ff52 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/connect.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/connect.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -24,9 +43,9 @@ int test(void);
int test(void)
{
- int sockfd = 4;
- struct sockaddr addr;
- socklen_t addrlen = sizeof(addr);
+ int sockfd = 4;
+ struct sockaddr addr = { 0 };
+ socklen_t addrlen = sizeof(addr);
return connect(sockfd, &addr, addrlen);
}
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/getpeername.c b/testsuites/psxtests/psxhdrs/sys/socket/getpeername.c
index 94c5988466..0027d9ad15 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/getpeername.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/getpeername.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/getsockname.c b/testsuites/psxtests/psxhdrs/sys/socket/getsockname.c
index 53863a8b00..1f80eeca41 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/getsockname.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/getsockname.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/getsockopt.c b/testsuites/psxtests/psxhdrs/sys/socket/getsockopt.c
index 9554068a98..e0cd442441 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/getsockopt.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/getsockopt.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -29,7 +48,7 @@ int test(void)
int optname = 67;
int value;
void *optval = &value;
- socklen_t optlen;
+ socklen_t optlen = { 0 };
return getsockopt(sockfd, level, optname, optval, &optlen);
}
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/listen.c b/testsuites/psxtests/psxhdrs/sys/socket/listen.c
index 0edb16bc8b..9e243a5c22 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/listen.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/listen.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/recv.c b/testsuites/psxtests/psxhdrs/sys/socket/recv.c
index 05bc608b10..3e99e0a3a3 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/recv.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/recv.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/recvfrom.c b/testsuites/psxtests/psxhdrs/sys/socket/recvfrom.c
index 0f9f948e5d..4473ef4ac6 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/recvfrom.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/recvfrom.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/recvmsg.c b/testsuites/psxtests/psxhdrs/sys/socket/recvmsg.c
index 76723268af..b10550864f 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/recvmsg.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/recvmsg.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/send.c b/testsuites/psxtests/psxhdrs/sys/socket/send.c
index 65394a9586..de2ad3ba5a 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/send.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/send.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -25,7 +44,7 @@ ssize_t test(void);
ssize_t test(void)
{
int sockfd = 4;
- int buffer;
+ int buffer = 0;
void *buf = &buffer;
size_t len = sizeof(buffer);
int flags = 7;
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/sendmsg.c b/testsuites/psxtests/psxhdrs/sys/socket/sendmsg.c
index bf6115b00f..a14b8ff8d4 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/sendmsg.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/sendmsg.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -25,7 +44,7 @@ ssize_t test(void);
ssize_t test(void)
{
int sockfd = 4;
- struct msghdr msg;
+ struct msghdr msg = { 0 };
int flags = 7;
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/sendto.c b/testsuites/psxtests/psxhdrs/sys/socket/sendto.c
index e93f4c1aac..5050f1a0a5 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/sendto.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/sendto.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -25,11 +44,11 @@ ssize_t test(void);
ssize_t test(void)
{
int sockfd = 4;
- int buffer;
+ int buffer = 0;
const void *buf = &buffer;
size_t len = sizeof(buffer);
int flags = 7;
- struct sockaddr dest_addr;
+ struct sockaddr dest_addr = { 0 };
socklen_t addrlen = sizeof(dest_addr);
return sendto(sockfd, buf, len, flags, &dest_addr, addrlen);
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/setsockopt.c b/testsuites/psxtests/psxhdrs/sys/socket/setsockopt.c
index 2dd396a1a1..e4d21d3837 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/setsockopt.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/setsockopt.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -27,7 +46,7 @@ int test(void)
int sockfd = 4;
int level = SOL_SOCKET;
int optname = 67;
- int value;
+ int value = 0;
void *optval = &value;
socklen_t optlen = sizeof(value);
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/shutdown.c b/testsuites/psxtests/psxhdrs/sys/socket/shutdown.c
index d804295aa3..03d14836fc 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/shutdown.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/shutdown.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/socket.c b/testsuites/psxtests/psxhdrs/sys/socket/socket.c
index ac692fe443..c2fe0331c6 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/socket.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/socket.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/socketpair.c b/testsuites/psxtests/psxhdrs/sys/socket/socketpair.c
index 9cc67a9b63..41018fa48c 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/socketpair.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/socketpair.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/sys/stat/futimens.c b/testsuites/psxtests/psxhdrs/sys/stat/futimens.c
index 75fa0ce0e6..9892352b71 100644
--- a/testsuites/psxtests/psxhdrs/sys/stat/futimens.c
+++ b/testsuites/psxtests/psxhdrs/sys/stat/futimens.c
@@ -42,9 +42,9 @@ int test( void )
{
int return_value;
int fd = 1;
- struct timespec times[2];
+ struct timespec times[2] = { 0 };
return_value = futimens(fd, times);
return (return_value != -1);
-} \ No newline at end of file
+}
diff --git a/testsuites/psxtests/psxhdrs/sys/stat/utimensat.c b/testsuites/psxtests/psxhdrs/sys/stat/utimensat.c
index c8c0767ce3..b74cc1a44b 100644
--- a/testsuites/psxtests/psxhdrs/sys/stat/utimensat.c
+++ b/testsuites/psxtests/psxhdrs/sys/stat/utimensat.c
@@ -44,9 +44,9 @@ int test( void )
int return_value;
int fd = 1;
char *path = "/";
- struct timespec times[2];
+ struct timespec times[2] = { 0 };
int flag = AT_SYMLINK_NOFOLLOW;
return_value = utimensat(fd, path, times, flag);
return (return_value != -1);
-} \ No newline at end of file
+}
diff --git a/testsuites/psxtests/psxhdrs/sys/time/utimes.c b/testsuites/psxtests/psxhdrs/sys/time/utimes.c
index ae69eb5ded..bebc7a77b4 100644
--- a/testsuites/psxtests/psxhdrs/sys/time/utimes.c
+++ b/testsuites/psxtests/psxhdrs/sys/time/utimes.c
@@ -5,7 +5,7 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
- *
+ *
* Copyright (C) 2018, Zenon
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,8 @@ int test(void);
int test(void)
{
int callback;
- struct timeval tv;
-
- callback = utimes(NULL, &tv);
+ struct timeval tv[2] = { 0 };
+
+ callback = utimes(NULL, &tv[0]);
return (callback == -1);
}
diff --git a/testsuites/psxtests/psxhdrs/termios/cfgetispeed.c b/testsuites/psxtests/psxhdrs/termios/cfgetispeed.c
index e98a28179e..0c8d304a71 100644
--- a/testsuites/psxtests/psxhdrs/termios/cfgetispeed.c
+++ b/testsuites/psxtests/psxhdrs/termios/cfgetispeed.c
@@ -40,11 +40,11 @@ int test( void );
int test( void )
{
- struct termios term;
+ struct termios term = { 0 };
speed_t rate;
rate = cfgetispeed(&term);
(void) rate;
return 0;
-} \ No newline at end of file
+}
diff --git a/testsuites/psxtests/psxhdrs/termios/cfgetospeed.c b/testsuites/psxtests/psxhdrs/termios/cfgetospeed.c
index b326a78378..4d2e23ed50 100644
--- a/testsuites/psxtests/psxhdrs/termios/cfgetospeed.c
+++ b/testsuites/psxtests/psxhdrs/termios/cfgetospeed.c
@@ -40,11 +40,11 @@ int test( void );
int test( void )
{
- struct termios term;
+ struct termios term = { 0 };
speed_t rate;
rate = cfgetospeed(&term);
(void) rate;
return 0;
-} \ No newline at end of file
+}
diff --git a/testsuites/psxtests/psxhdrs/termios/cfsetispeed.c b/testsuites/psxtests/psxhdrs/termios/cfsetispeed.c
index b73dbffce1..0f8ddfff57 100644
--- a/testsuites/psxtests/psxhdrs/termios/cfsetispeed.c
+++ b/testsuites/psxtests/psxhdrs/termios/cfsetispeed.c
@@ -41,10 +41,10 @@ int test( void );
int test( void )
{
int result;
- struct termios term;
+ struct termios term = { 0 };
speed_t speed = B0;
result = cfsetispeed(&term, speed);
return result;
-} \ No newline at end of file
+}
diff --git a/testsuites/psxtests/psxhdrs/termios/cfsetospeed.c b/testsuites/psxtests/psxhdrs/termios/cfsetospeed.c
index 8377fc6e26..8d5404c954 100644
--- a/testsuites/psxtests/psxhdrs/termios/cfsetospeed.c
+++ b/testsuites/psxtests/psxhdrs/termios/cfsetospeed.c
@@ -41,10 +41,10 @@ int test( void );
int test( void )
{
int result;
- struct termios term;
+ struct termios term = { 0 };
speed_t speed = B0;
result = cfsetospeed(&term, speed);
return result;
-} \ No newline at end of file
+}
diff --git a/testsuites/psxtests/psxhdrs/termios/tcgetattr.c b/testsuites/psxtests/psxhdrs/termios/tcgetattr.c
index d00336b214..843b7c8281 100644
--- a/testsuites/psxtests/psxhdrs/termios/tcgetattr.c
+++ b/testsuites/psxtests/psxhdrs/termios/tcgetattr.c
@@ -42,9 +42,9 @@ int test( void )
{
int result;
int fildes = 0;
- struct termios term;
+ struct termios term = { 0 };
result = tcgetattr(fildes, &term);
return result;
-} \ No newline at end of file
+}
diff --git a/testsuites/psxtests/psxhdrs/termios/tcsetattr.c b/testsuites/psxtests/psxhdrs/termios/tcsetattr.c
index e2bd6980a9..da0e0ea62d 100644
--- a/testsuites/psxtests/psxhdrs/termios/tcsetattr.c
+++ b/testsuites/psxtests/psxhdrs/termios/tcsetattr.c
@@ -43,9 +43,9 @@ int test( void )
int result;
int fildes = 0;
int optional_actions = 0;
- struct termios term;
+ struct termios term = { 0 };
result = tcsetattr(fildes, optional_actions, &term);
return result;
-} \ No newline at end of file
+}
diff --git a/testsuites/psxtests/psxhdrs/time/asctime.c b/testsuites/psxtests/psxhdrs/time/asctime.c
index 1145fc9936..400dbf5258 100644
--- a/testsuites/psxtests/psxhdrs/time/asctime.c
+++ b/testsuites/psxtests/psxhdrs/time/asctime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -23,7 +42,7 @@ int test( void );
int test( void )
{
char *buffer;
- struct tm timestruct;
+ struct tm timestruct = { 0 };
buffer = asctime( &timestruct );
diff --git a/testsuites/psxtests/psxhdrs/time/asctime_r.c b/testsuites/psxtests/psxhdrs/time/asctime_r.c
index 609709b223..c0a22b7d6b 100644
--- a/testsuites/psxtests/psxhdrs/time/asctime_r.c
+++ b/testsuites/psxtests/psxhdrs/time/asctime_r.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -23,7 +42,7 @@ int test( void );
int test( void )
{
char *buffer_pointer;
- struct tm timestruct;
+ struct tm timestruct = { 0 };
char buffer[ 80 ];
buffer_pointer = asctime_r( &timestruct, buffer );
diff --git a/testsuites/psxtests/psxhdrs/time/clock.c b/testsuites/psxtests/psxhdrs/time/clock.c
index de836968e0..2ea3e09f00 100644
--- a/testsuites/psxtests/psxhdrs/time/clock.c
+++ b/testsuites/psxtests/psxhdrs/time/clock.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/time/clock_getcpuclockid.c b/testsuites/psxtests/psxhdrs/time/clock_getcpuclockid.c
index b15210ebc4..3d50bfc580 100644
--- a/testsuites/psxtests/psxhdrs/time/clock_getcpuclockid.c
+++ b/testsuites/psxtests/psxhdrs/time/clock_getcpuclockid.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/time/clock_getres.c b/testsuites/psxtests/psxhdrs/time/clock_getres.c
index 9e11405d73..773f057399 100644
--- a/testsuites/psxtests/psxhdrs/time/clock_getres.c
+++ b/testsuites/psxtests/psxhdrs/time/clock_getres.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/time/clock_gettime.c b/testsuites/psxtests/psxhdrs/time/clock_gettime.c
index c45141ab78..a992fac632 100644
--- a/testsuites/psxtests/psxhdrs/time/clock_gettime.c
+++ b/testsuites/psxtests/psxhdrs/time/clock_gettime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/time/clock_nanosleep.c b/testsuites/psxtests/psxhdrs/time/clock_nanosleep.c
index 1c0fe0b496..6298d0c045 100644
--- a/testsuites/psxtests/psxhdrs/time/clock_nanosleep.c
+++ b/testsuites/psxtests/psxhdrs/time/clock_nanosleep.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -6,9 +8,26 @@
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/time/clock_settime.c b/testsuites/psxtests/psxhdrs/time/clock_settime.c
index f81a148f89..8584e1c61f 100644
--- a/testsuites/psxtests/psxhdrs/time/clock_settime.c
+++ b/testsuites/psxtests/psxhdrs/time/clock_settime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -27,7 +46,7 @@ int test( void );
int test( void )
{
clockid_t clock_id = 0;
- struct timespec tp;
+ struct timespec tp = { 0 };
int result;
result = clock_settime( clock_id, &tp );
diff --git a/testsuites/psxtests/psxhdrs/time/ctime.c b/testsuites/psxtests/psxhdrs/time/ctime.c
index bc22186d2c..67dddf21ca 100644
--- a/testsuites/psxtests/psxhdrs/time/ctime.c
+++ b/testsuites/psxtests/psxhdrs/time/ctime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -23,7 +42,7 @@ int test( void );
int test( void )
{
char *buffer;
- time_t time;
+ time_t time = { 0 };
buffer = ctime( &time );
diff --git a/testsuites/psxtests/psxhdrs/time/ctime_r.c b/testsuites/psxtests/psxhdrs/time/ctime_r.c
index b28f185d34..30f1285d0a 100644
--- a/testsuites/psxtests/psxhdrs/time/ctime_r.c
+++ b/testsuites/psxtests/psxhdrs/time/ctime_r.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -24,7 +43,7 @@ int test( void )
{
char *buffer_pointer;
char buffer[ 80 ];
- time_t time;
+ time_t time = { 0 };
buffer_pointer = ctime_r( &time, buffer );
diff --git a/testsuites/psxtests/psxhdrs/time/difftime.c b/testsuites/psxtests/psxhdrs/time/difftime.c
index 59d7ec9214..df357c5650 100644
--- a/testsuites/psxtests/psxhdrs/time/difftime.c
+++ b/testsuites/psxtests/psxhdrs/time/difftime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/time/gmtime.c b/testsuites/psxtests/psxhdrs/time/gmtime.c
index 6f9160175b..d7c08726ad 100644
--- a/testsuites/psxtests/psxhdrs/time/gmtime.c
+++ b/testsuites/psxtests/psxhdrs/time/gmtime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -22,7 +41,7 @@ int test( void );
int test( void )
{
- time_t time;
+ time_t time = { 0 };
struct tm *timestruct;
timestruct = gmtime( &time );
diff --git a/testsuites/psxtests/psxhdrs/time/gmtime_r.c b/testsuites/psxtests/psxhdrs/time/gmtime_r.c
index 4b3a53c980..128e5107e0 100644
--- a/testsuites/psxtests/psxhdrs/time/gmtime_r.c
+++ b/testsuites/psxtests/psxhdrs/time/gmtime_r.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -22,7 +41,7 @@ int test( void );
int test( void )
{
- time_t time;
+ time_t time = { 0 };
struct tm *timestruct_pointer;
struct tm timestruct;
diff --git a/testsuites/psxtests/psxhdrs/time/localtime.c b/testsuites/psxtests/psxhdrs/time/localtime.c
index be6a5fd117..7f1b4e481d 100644
--- a/testsuites/psxtests/psxhdrs/time/localtime.c
+++ b/testsuites/psxtests/psxhdrs/time/localtime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -22,7 +41,7 @@ int test( void );
int test( void )
{
- time_t time;
+ time_t time = { 0 };
struct tm *timestruct;
timestruct = localtime( &time );
diff --git a/testsuites/psxtests/psxhdrs/time/localtime_r.c b/testsuites/psxtests/psxhdrs/time/localtime_r.c
index 19bb6917f7..10338db9fe 100644
--- a/testsuites/psxtests/psxhdrs/time/localtime_r.c
+++ b/testsuites/psxtests/psxhdrs/time/localtime_r.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -22,7 +41,7 @@ int test( void );
int test( void )
{
- time_t time;
+ time_t time = { 0 };
struct tm *timestruct_pointer;
struct tm timestruct;
diff --git a/testsuites/psxtests/psxhdrs/time/mktime.c b/testsuites/psxtests/psxhdrs/time/mktime.c
index c8654b813c..07920211a8 100644
--- a/testsuites/psxtests/psxhdrs/time/mktime.c
+++ b/testsuites/psxtests/psxhdrs/time/mktime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/time/nanosleep.c b/testsuites/psxtests/psxhdrs/time/nanosleep.c
index ef41e67c87..1082dc162e 100644
--- a/testsuites/psxtests/psxhdrs/time/nanosleep.c
+++ b/testsuites/psxtests/psxhdrs/time/nanosleep.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/time/strftime.c b/testsuites/psxtests/psxhdrs/time/strftime.c
index 5c456ca079..6b75cdac1e 100644
--- a/testsuites/psxtests/psxhdrs/time/strftime.c
+++ b/testsuites/psxtests/psxhdrs/time/strftime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -25,7 +44,7 @@ int test( void )
size_t length;
size_t max_length;
char buffer[ 80 ];
- struct tm timestruct;
+ struct tm timestruct = { 0 };
max_length = sizeof( buffer );
diff --git a/testsuites/psxtests/psxhdrs/time/time.c b/testsuites/psxtests/psxhdrs/time/time.c
index a940748b43..2932e898c2 100644
--- a/testsuites/psxtests/psxhdrs/time/time.c
+++ b/testsuites/psxtests/psxhdrs/time/time.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/time/timer_create.c b/testsuites/psxtests/psxhdrs/time/timer_create.c
index 7291b97c09..0b2e705ffe 100644
--- a/testsuites/psxtests/psxhdrs/time/timer_create.c
+++ b/testsuites/psxtests/psxhdrs/time/timer_create.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/time/timer_delete.c b/testsuites/psxtests/psxhdrs/time/timer_delete.c
index f64c8a2f09..8e6a3ce30e 100644
--- a/testsuites/psxtests/psxhdrs/time/timer_delete.c
+++ b/testsuites/psxtests/psxhdrs/time/timer_delete.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/time/timer_getoverrun.c b/testsuites/psxtests/psxhdrs/time/timer_getoverrun.c
index d5808b4844..14946f5793 100644
--- a/testsuites/psxtests/psxhdrs/time/timer_getoverrun.c
+++ b/testsuites/psxtests/psxhdrs/time/timer_getoverrun.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/time/timer_gettime.c b/testsuites/psxtests/psxhdrs/time/timer_gettime.c
index b722daf13f..f941a89b7e 100644
--- a/testsuites/psxtests/psxhdrs/time/timer_gettime.c
+++ b/testsuites/psxtests/psxhdrs/time/timer_gettime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/time/timer_settime.c b/testsuites/psxtests/psxhdrs/time/timer_settime.c
index 99b13267d3..9332e01813 100644
--- a/testsuites/psxtests/psxhdrs/time/timer_settime.c
+++ b/testsuites/psxtests/psxhdrs/time/timer_settime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/alarm.c b/testsuites/psxtests/psxhdrs/unistd/alarm.c
index 7bafabddbb..b3d20f0f8a 100644
--- a/testsuites/psxtests/psxhdrs/unistd/alarm.c
+++ b/testsuites/psxtests/psxhdrs/unistd/alarm.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/fdatasync.c b/testsuites/psxtests/psxhdrs/unistd/fdatasync.c
index 8d1900b9e7..01b53148f1 100644
--- a/testsuites/psxtests/psxhdrs/unistd/fdatasync.c
+++ b/testsuites/psxtests/psxhdrs/unistd/fdatasync.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/fsync.c b/testsuites/psxtests/psxhdrs/unistd/fsync.c
index f7ef722bfb..d7b9454c05 100644
--- a/testsuites/psxtests/psxhdrs/unistd/fsync.c
+++ b/testsuites/psxtests/psxhdrs/unistd/fsync.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/getegid.c b/testsuites/psxtests/psxhdrs/unistd/getegid.c
index 1626223c90..44b8e90838 100644
--- a/testsuites/psxtests/psxhdrs/unistd/getegid.c
+++ b/testsuites/psxtests/psxhdrs/unistd/getegid.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/geteuid.c b/testsuites/psxtests/psxhdrs/unistd/geteuid.c
index a580ecf18a..cc68ff7b86 100644
--- a/testsuites/psxtests/psxhdrs/unistd/geteuid.c
+++ b/testsuites/psxtests/psxhdrs/unistd/geteuid.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/getgid.c b/testsuites/psxtests/psxhdrs/unistd/getgid.c
index 6f0d9328be..633b4506d4 100644
--- a/testsuites/psxtests/psxhdrs/unistd/getgid.c
+++ b/testsuites/psxtests/psxhdrs/unistd/getgid.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/getgroups.c b/testsuites/psxtests/psxhdrs/unistd/getgroups.c
index 6101e2aa0c..9b0b68b784 100644
--- a/testsuites/psxtests/psxhdrs/unistd/getgroups.c
+++ b/testsuites/psxtests/psxhdrs/unistd/getgroups.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/getlogin.c b/testsuites/psxtests/psxhdrs/unistd/getlogin.c
index 6646461751..310fa97ed4 100644
--- a/testsuites/psxtests/psxhdrs/unistd/getlogin.c
+++ b/testsuites/psxtests/psxhdrs/unistd/getlogin.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/getlogin_r.c b/testsuites/psxtests/psxhdrs/unistd/getlogin_r.c
index 587206e44c..279494497b 100644
--- a/testsuites/psxtests/psxhdrs/unistd/getlogin_r.c
+++ b/testsuites/psxtests/psxhdrs/unistd/getlogin_r.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/getpgrp.c b/testsuites/psxtests/psxhdrs/unistd/getpgrp.c
index 22d1cc5d2c..4c525fb833 100644
--- a/testsuites/psxtests/psxhdrs/unistd/getpgrp.c
+++ b/testsuites/psxtests/psxhdrs/unistd/getpgrp.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/getpid.c b/testsuites/psxtests/psxhdrs/unistd/getpid.c
index f46bbff2ad..15eaf2689d 100644
--- a/testsuites/psxtests/psxhdrs/unistd/getpid.c
+++ b/testsuites/psxtests/psxhdrs/unistd/getpid.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/getppid.c b/testsuites/psxtests/psxhdrs/unistd/getppid.c
index 2be588847c..04525178fd 100644
--- a/testsuites/psxtests/psxhdrs/unistd/getppid.c
+++ b/testsuites/psxtests/psxhdrs/unistd/getppid.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/getuid.c b/testsuites/psxtests/psxhdrs/unistd/getuid.c
index e06b407232..7132bfb00d 100644
--- a/testsuites/psxtests/psxhdrs/unistd/getuid.c
+++ b/testsuites/psxtests/psxhdrs/unistd/getuid.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/pause.c b/testsuites/psxtests/psxhdrs/unistd/pause.c
index 47898bce0e..5c2b267d98 100644
--- a/testsuites/psxtests/psxhdrs/unistd/pause.c
+++ b/testsuites/psxtests/psxhdrs/unistd/pause.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/setgid.c b/testsuites/psxtests/psxhdrs/unistd/setgid.c
index 5a3a984d2e..43f5f0d0cc 100644
--- a/testsuites/psxtests/psxhdrs/unistd/setgid.c
+++ b/testsuites/psxtests/psxhdrs/unistd/setgid.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/setgroups.c b/testsuites/psxtests/psxhdrs/unistd/setgroups.c
index ae1fedfa2a..a29cb05978 100644
--- a/testsuites/psxtests/psxhdrs/unistd/setgroups.c
+++ b/testsuites/psxtests/psxhdrs/unistd/setgroups.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -23,7 +42,7 @@ int test( void );
int test( void )
{
- gid_t grouplist[ 20 ];
+ gid_t grouplist[ 20 ] = { 0 } ;
int gidsetsize;
int result;
diff --git a/testsuites/psxtests/psxhdrs/unistd/setpgid.c b/testsuites/psxtests/psxhdrs/unistd/setpgid.c
index 5bf1f7833a..8af4ee0c07 100644
--- a/testsuites/psxtests/psxhdrs/unistd/setpgid.c
+++ b/testsuites/psxtests/psxhdrs/unistd/setpgid.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/setsid.c b/testsuites/psxtests/psxhdrs/unistd/setsid.c
index cb0e65ff62..f984830852 100644
--- a/testsuites/psxtests/psxhdrs/unistd/setsid.c
+++ b/testsuites/psxtests/psxhdrs/unistd/setsid.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/setuid.c b/testsuites/psxtests/psxhdrs/unistd/setuid.c
index 55a42515d5..6948b51cfb 100644
--- a/testsuites/psxtests/psxhdrs/unistd/setuid.c
+++ b/testsuites/psxtests/psxhdrs/unistd/setuid.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/sleep.c b/testsuites/psxtests/psxhdrs/unistd/sleep.c
index 2807eef9e8..9c3f94abeb 100644
--- a/testsuites/psxtests/psxhdrs/unistd/sleep.c
+++ b/testsuites/psxtests/psxhdrs/unistd/sleep.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/sync.c b/testsuites/psxtests/psxhdrs/unistd/sync.c
index decdbefbc1..0b78be5e1f 100644
--- a/testsuites/psxtests/psxhdrs/unistd/sync.c
+++ b/testsuites/psxtests/psxhdrs/unistd/sync.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/ualarm.c b/testsuites/psxtests/psxhdrs/unistd/ualarm.c
index ba2ec219a6..9472f05399 100644
--- a/testsuites/psxtests/psxhdrs/unistd/ualarm.c
+++ b/testsuites/psxtests/psxhdrs/unistd/ualarm.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/unistd/usleep.c b/testsuites/psxtests/psxhdrs/unistd/usleep.c
index 738c088c85..624f613e69 100644
--- a/testsuites/psxtests/psxhdrs/unistd/usleep.c
+++ b/testsuites/psxtests/psxhdrs/unistd/usleep.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This test file is used to verify that the header files associated with
* invoking this function are correct.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxhdrs/utime/utime.c b/testsuites/psxtests/psxhdrs/utime/utime.c
index 6236a84637..db619baecc 100644
--- a/testsuites/psxtests/psxhdrs/utime/utime.c
+++ b/testsuites/psxtests/psxhdrs/utime/utime.c
@@ -43,7 +43,7 @@ int test( void );
int test( void )
{
int result;
- const struct utimbuf buff;
+ const struct utimbuf buff = { 0 };
const char *path = "/tmp/myfile";
result = utime(path, &buff);
diff --git a/testsuites/psxtests/psxhdrs/wchar/mbsinit.c b/testsuites/psxtests/psxhdrs/wchar/mbsinit.c
index 21a39ee2ce..5432520f86 100644
--- a/testsuites/psxtests/psxhdrs/wchar/mbsinit.c
+++ b/testsuites/psxtests/psxhdrs/wchar/mbsinit.c
@@ -5,7 +5,7 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
- *
+ *
* Copyright (C) 2018, Zenon
*
* Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,7 @@ int test(void);
int test(void)
{
- const mbstate_t state;
+ const mbstate_t state = { 0 };
return mbsinit(&state);
}
diff --git a/testsuites/psxtests/psxid01/init.c b/testsuites/psxtests/psxid01/init.c
index 85cb40a7e9..383f1bc7a0 100644
--- a/testsuites/psxtests/psxid01/init.c
+++ b/testsuites/psxtests/psxid01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxid01/psxid01.doc b/testsuites/psxtests/psxid01/psxid01.doc
index a8ce42abd5..26f3df555e 100644
--- a/testsuites/psxtests/psxid01/psxid01.doc
+++ b/testsuites/psxtests/psxid01/psxid01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psximfs01/init.c b/testsuites/psxtests/psximfs01/init.c
index f8bea196b7..324baa5723 100644
--- a/testsuites/psxtests/psximfs01/init.c
+++ b/testsuites/psxtests/psximfs01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psximfs01/psximfs01.doc b/testsuites/psxtests/psximfs01/psximfs01.doc
index 88c884b975..0471605e56 100644
--- a/testsuites/psxtests/psximfs01/psximfs01.doc
+++ b/testsuites/psxtests/psximfs01/psximfs01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psximfs02/init.c b/testsuites/psxtests/psximfs02/init.c
index 15b9137121..1d196aa6ba 100644
--- a/testsuites/psxtests/psximfs02/init.c
+++ b/testsuites/psxtests/psximfs02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2015.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -23,6 +42,8 @@
#include <rtems/malloc.h>
#include <rtems/libcsupport.h>
+#define MEMFILE_BYTES_PER_BLOCK 16
+
const char rtems_test_name[] = "PSXIMFS 2";
/* forward declarations to avoid warnings */
@@ -43,12 +64,17 @@ rtems_task Init(
static const uintptr_t slink_2_name_size [] = {
sizeof( slink_2_name )
};
+ static const uintptr_t some_blocks [] = {
+ MEMFILE_BYTES_PER_BLOCK * 10
+ };
+ static const char some_data[MEMFILE_BYTES_PER_BLOCK * 11];
int status = 0;
void *opaque;
char linkname_n[32] = {0};
char linkname_p[32] = {0};
int i;
+ int fd;
struct stat stat_buf;
TEST_BEGIN();
@@ -102,6 +128,27 @@ rtems_task Init(
rtems_test_assert( status == -1 );
rtems_test_assert( errno == EACCES );
+ puts( "Allocate most of heap with a little bit left" );
+ opaque = rtems_heap_greedy_allocate( some_blocks, 1 );
+
+ puts( "Create an empty file.");
+ status = mknod( "/foo", S_IFREG | S_IRWXU, 0LL );
+ rtems_test_assert( status == 0 );
+
+ puts( "Then increase it's size to more than remaining space" );
+ fd = open( "/foo", O_WRONLY | O_TRUNC);
+ rtems_test_assert( fd >= 0 );
+ status = write(fd, some_data, sizeof(some_data));
+ rtems_test_assert( status == -1);
+ rtems_test_assert( errno == ENOSPC );
+
+ puts( "Clean up again" );
+ status = close(fd);
+ rtems_test_assert( status == 0);
+ status = remove( "/foo" );
+ rtems_test_assert( status == 0);
+ rtems_heap_greedy_free( opaque );
+
puts( "Allocate most of heap" );
opaque = rtems_heap_greedy_allocate( mount_table_entry_size, 1 );
@@ -202,7 +249,7 @@ rtems_task Init(
#define CONFIGURE_FILESYSTEM_IMFS
#define CONFIGURE_MAXIMUM_TASKS 1
-#define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK 16
+#define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK MEMFILE_BYTES_PER_BLOCK
#define CONFIGURE_IMFS_ENABLE_MKFIFO
#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 4
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
diff --git a/testsuites/psxtests/psximfs02/psximfs02.doc b/testsuites/psxtests/psximfs02/psximfs02.doc
index 4ee23d6e69..a8ccbdc1fc 100644
--- a/testsuites/psxtests/psximfs02/psximfs02.doc
+++ b/testsuites/psxtests/psximfs02/psximfs02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxintrcritical01/init.c b/testsuites/psxtests/psxintrcritical01/init.c
index ea60b38c5b..27126e31ec 100644
--- a/testsuites/psxtests/psxintrcritical01/init.c
+++ b/testsuites/psxtests/psxintrcritical01/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxintrcritical01/psxintrcritical01.doc b/testsuites/psxtests/psxintrcritical01/psxintrcritical01.doc
index f1f3415e73..de06bad80c 100644
--- a/testsuites/psxtests/psxintrcritical01/psxintrcritical01.doc
+++ b/testsuites/psxtests/psxintrcritical01/psxintrcritical01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxitimer/init.c b/testsuites/psxtests/psxitimer/init.c
index 8292b6ebe7..2cb00851da 100644
--- a/testsuites/psxtests/psxitimer/init.c
+++ b/testsuites/psxtests/psxitimer/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxkey01/init.c b/testsuites/psxtests/psxkey01/init.c
index 6b8f57eccc..089a469f29 100644
--- a/testsuites/psxtests/psxkey01/init.c
+++ b/testsuites/psxtests/psxkey01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxkey01/system.h b/testsuites/psxtests/psxkey01/system.h
index 186e1b71f0..66304b9684 100644
--- a/testsuites/psxtests/psxkey01/system.h
+++ b/testsuites/psxtests/psxkey01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxkey02/init.c b/testsuites/psxtests/psxkey02/init.c
index 6c6a3a0be5..500b809cfb 100644
--- a/testsuites/psxtests/psxkey02/init.c
+++ b/testsuites/psxtests/psxkey02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxkey02/psxkey02.doc b/testsuites/psxtests/psxkey02/psxkey02.doc
index 92a33b2250..5adf5d49c9 100644
--- a/testsuites/psxtests/psxkey02/psxkey02.doc
+++ b/testsuites/psxtests/psxkey02/psxkey02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxkey03/init.c b/testsuites/psxtests/psxkey03/init.c
index 8f0a890752..c154f614bc 100644
--- a/testsuites/psxtests/psxkey03/init.c
+++ b/testsuites/psxtests/psxkey03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxkey03/psxkey03.doc b/testsuites/psxtests/psxkey03/psxkey03.doc
index 2f9fa7c298..046fb9be6c 100644
--- a/testsuites/psxtests/psxkey03/psxkey03.doc
+++ b/testsuites/psxtests/psxkey03/psxkey03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxkey04/init.c b/testsuites/psxtests/psxkey04/init.c
index d42633ce25..0cd12361cf 100644
--- a/testsuites/psxtests/psxkey04/init.c
+++ b/testsuites/psxtests/psxkey04/init.c
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2012 Zhongwei Yao.
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxkey04/psxkey04.doc b/testsuites/psxtests/psxkey04/psxkey04.doc
index 73302caaa9..5aefb2fc75 100644
--- a/testsuites/psxtests/psxkey04/psxkey04.doc
+++ b/testsuites/psxtests/psxkey04/psxkey04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxkey05/init.c b/testsuites/psxtests/psxkey05/init.c
index e849e7bae5..88eb0c2329 100644
--- a/testsuites/psxtests/psxkey05/init.c
+++ b/testsuites/psxtests/psxkey05/init.c
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2012 Zhongwei Yao.
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxkey05/psxkey05.doc b/testsuites/psxtests/psxkey05/psxkey05.doc
index 90158eb3e2..95ae8c73c8 100644
--- a/testsuites/psxtests/psxkey05/psxkey05.doc
+++ b/testsuites/psxtests/psxkey05/psxkey05.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxkey06/init.c b/testsuites/psxtests/psxkey06/init.c
index aa5977759d..615e196807 100644
--- a/testsuites/psxtests/psxkey06/init.c
+++ b/testsuites/psxtests/psxkey06/init.c
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2012 Zhongwei Yao.
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxkey06/psxkey06.doc b/testsuites/psxtests/psxkey06/psxkey06.doc
index 0c0c3d4ba7..ae8c8b8364 100644
--- a/testsuites/psxtests/psxkey06/psxkey06.doc
+++ b/testsuites/psxtests/psxkey06/psxkey06.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxkey07/init.c b/testsuites/psxtests/psxkey07/init.c
index 378349bbe6..ff7b3a0bd0 100644
--- a/testsuites/psxtests/psxkey07/init.c
+++ b/testsuites/psxtests/psxkey07/init.c
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2012 Zhongwei Yao.
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -20,22 +39,25 @@
const char rtems_test_name[] = "PSXKEY 7";
-/* forward declarations to avoid warnings */
-rtems_task Init(rtems_task_argument argument);
-rtems_task Test_Thread(rtems_task_argument argument);
+#define INITIAL_TASK_COUNT 10
-pthread_key_t Key;
-int created_thread_count, setted_thread_count, got_thread_count;
-int all_thread_created;
-pthread_mutex_t mutex1, mutex2;
-pthread_cond_t create_condition_var, set_condition_var;
+#define ADDITIONAL_TASK_COUNT 13
-rtems_task Test_Thread(rtems_task_argument argument)
+static pthread_key_t Key;
+static int created_thread_count, setted_thread_count, got_thread_count;
+static int all_thread_created;
+static pthread_mutex_t mutex1, mutex2;
+static pthread_cond_t create_condition_var, set_condition_var;
+
+static rtems_task Test_Thread(rtems_task_argument argument)
{
int sc;
int *value_p, *value_p2;
value_p = malloc( sizeof( int ) );
+ rtems_test_assert(value_p != NULL);
+
+ *value_p = 123;
sc = pthread_setspecific( Key, value_p );
rtems_test_assert( !sc );
@@ -59,12 +81,13 @@ rtems_task Test_Thread(rtems_task_argument argument)
rtems_task_exit();
}
-rtems_task Init(rtems_task_argument argument)
+static rtems_task Init(rtems_task_argument argument)
{
rtems_status_code rc;
int sc;
struct timespec delay_request;
- uintptr_t max_free_size = 13 * RTEMS_MINIMUM_STACK_SIZE;
+ uintptr_t max_free_size =
+ ADDITIONAL_TASK_COUNT * RTEMS_MINIMUM_STACK_SIZE;
void *greedy;
all_thread_created = 0;
@@ -100,7 +123,7 @@ rtems_task Init(rtems_task_argument argument)
pthread_mutex_lock( &mutex1 );
rc = rtems_task_create(
- rtems_build_name( 'T', 'E', 'S', 'T' ),
+ rtems_build_name( 'T', 'E', 'S', 'T' ),
1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
@@ -195,8 +218,10 @@ rtems_task Init(rtems_task_argument argument)
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
-#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(10)
-#define CONFIGURE_MAXIMUM_POSIX_KEYS 1
+#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(INITIAL_TASK_COUNT)
+#define CONFIGURE_MAXIMUM_POSIX_KEYS 1
+#define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS \
+ (INITIAL_TASK_COUNT + ADDITIONAL_TASK_COUNT)
#define CONFIGURE_UNIFIED_WORK_AREAS
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/psxtests/psxkey07/psxkey07.doc b/testsuites/psxtests/psxkey07/psxkey07.doc
index 120e26b7b9..b16297872d 100644
--- a/testsuites/psxtests/psxkey07/psxkey07.doc
+++ b/testsuites/psxtests/psxkey07/psxkey07.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxkey08/init.c b/testsuites/psxtests/psxkey08/init.c
index e5277baf8a..ed0b6e8554 100644
--- a/testsuites/psxtests/psxkey08/init.c
+++ b/testsuites/psxtests/psxkey08/init.c
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2012 Zhongwei Yao.
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -32,7 +51,7 @@ static rtems_name name1, name2;
static rtems_task test_task(rtems_task_argument arg)
{
- rtems_status_code sc;
+ rtems_status_code sc = 0;
const void *value_p;
const void *value_p2;
diff --git a/testsuites/psxtests/psxkey08/psxkey08.doc b/testsuites/psxtests/psxkey08/psxkey08.doc
index 63d0b402bc..86229745a2 100644
--- a/testsuites/psxtests/psxkey08/psxkey08.doc
+++ b/testsuites/psxtests/psxkey08/psxkey08.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxkey09/init.c b/testsuites/psxtests/psxkey09/init.c
index ac346b4289..b01a1dde61 100644
--- a/testsuites/psxtests/psxkey09/init.c
+++ b/testsuites/psxtests/psxkey09/init.c
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2012 Zhongwei Yao.
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxkey09/psxkey09.doc b/testsuites/psxtests/psxkey09/psxkey09.doc
index 46a9332e45..210edfd00e 100644
--- a/testsuites/psxtests/psxkey09/psxkey09.doc
+++ b/testsuites/psxtests/psxkey09/psxkey09.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxkey10/init.c b/testsuites/psxtests/psxkey10/init.c
index 0cd24c0a14..9c57e6b752 100644
--- a/testsuites/psxtests/psxkey10/init.c
+++ b/testsuites/psxtests/psxkey10/init.c
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2012 Zhongwei Yao.
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxkey10/psxkey10.doc b/testsuites/psxtests/psxkey10/psxkey10.doc
index de01699274..37f510f350 100644
--- a/testsuites/psxtests/psxkey10/psxkey10.doc
+++ b/testsuites/psxtests/psxkey10/psxkey10.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxmmap01/system.h b/testsuites/psxtests/psxmmap01/system.h
index 526465b5e9..418523f5b8 100644
--- a/testsuites/psxtests/psxmmap01/system.h
+++ b/testsuites/psxtests/psxmmap01/system.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2017 Kevin Kirspel.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <pmacros.h>
diff --git a/testsuites/psxtests/psxmmap01/test_driver.c b/testsuites/psxtests/psxmmap01/test_driver.c
index 95edd3e9c8..839334f346 100644
--- a/testsuites/psxtests/psxmmap01/test_driver.c
+++ b/testsuites/psxtests/psxmmap01/test_driver.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2017 Kevin Kirspel.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxmmap01/test_driver.h b/testsuites/psxtests/psxmmap01/test_driver.h
index 5afdb9b46e..351073fb98 100644
--- a/testsuites/psxtests/psxmmap01/test_driver.h
+++ b/testsuites/psxtests/psxmmap01/test_driver.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2017 Kevin Kirspel.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/psxtests/psxmmap01/test_helper.c b/testsuites/psxtests/psxmmap01/test_helper.c
index cf68e8f6cd..bf71b345fa 100644
--- a/testsuites/psxtests/psxmmap01/test_helper.c
+++ b/testsuites/psxtests/psxmmap01/test_helper.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2017 Kevin Kirspel.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxmmap01/test_helper.h b/testsuites/psxtests/psxmmap01/test_helper.h
index 65ca3c11bd..fa42371307 100644
--- a/testsuites/psxtests/psxmmap01/test_helper.h
+++ b/testsuites/psxtests/psxmmap01/test_helper.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2017 Kevin Kirspel.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <string.h>
diff --git a/testsuites/psxtests/psxmount/main.c b/testsuites/psxtests/psxmount/main.c
index cbac28d948..7949ee06cf 100644
--- a/testsuites/psxtests/psxmount/main.c
+++ b/testsuites/psxtests/psxmount/main.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup psxtests
+ *
+ * @brief This is main for psxmount.
+ */
+
+/*
+ * Copyright (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
/*
* Simple test program -- check out of the basic file system mounting
* capabilities
diff --git a/testsuites/psxtests/psxmount/test.c b/testsuites/psxtests/psxmount/test.c
index 57f43db9a8..202baed46c 100644
--- a/testsuites/psxtests/psxmount/test.c
+++ b/testsuites/psxtests/psxmount/test.c
@@ -1,13 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* Modifications to support reference counting in the file system are
- * Copyright (c) 2012 embedded brains GmbH.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxmsgq01/init.c b/testsuites/psxtests/psxmsgq01/init.c
index d22238dfb8..c6b3d92464 100644
--- a/testsuites/psxtests/psxmsgq01/init.c
+++ b/testsuites/psxtests/psxmsgq01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -1114,7 +1133,7 @@ void verify_with_threads(void)
void validate_mq_setattr(void)
{
- struct mq_attr attr;
+ struct mq_attr attr = { 0 };
struct mq_attr save_attr[ NUMBER_OF_TEST_QUEUES ];
int status;
int i;
diff --git a/testsuites/psxtests/psxmsgq01/system.h b/testsuites/psxtests/psxmsgq01/system.h
index 27d158a3da..b153e74cf6 100644
--- a/testsuites/psxtests/psxmsgq01/system.h
+++ b/testsuites/psxtests/psxmsgq01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxmsgq02/init.c b/testsuites/psxtests/psxmsgq02/init.c
index 290663d22d..5949cac4f0 100644
--- a/testsuites/psxtests/psxmsgq02/init.c
+++ b/testsuites/psxtests/psxmsgq02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxmsgq02/system.h b/testsuites/psxtests/psxmsgq02/system.h
index 5b87dab619..5a1084f3ec 100644
--- a/testsuites/psxtests/psxmsgq02/system.h
+++ b/testsuites/psxtests/psxmsgq02/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxmsgq03/init.c b/testsuites/psxtests/psxmsgq03/init.c
index 281d8b837e..961ab61601 100644
--- a/testsuites/psxtests/psxmsgq03/init.c
+++ b/testsuites/psxtests/psxmsgq03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxmsgq03/psxmsgq03.doc b/testsuites/psxtests/psxmsgq03/psxmsgq03.doc
index b5d093bdc9..6c6b13e1b1 100644
--- a/testsuites/psxtests/psxmsgq03/psxmsgq03.doc
+++ b/testsuites/psxtests/psxmsgq03/psxmsgq03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxmsgq03/system.h b/testsuites/psxtests/psxmsgq03/system.h
index a2a3d73284..7da0b6a7f7 100644
--- a/testsuites/psxtests/psxmsgq03/system.h
+++ b/testsuites/psxtests/psxmsgq03/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxmsgq04/init.c b/testsuites/psxtests/psxmsgq04/init.c
index 07bd5ef87b..6057b6cb40 100644
--- a/testsuites/psxtests/psxmsgq04/init.c
+++ b/testsuites/psxtests/psxmsgq04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxmsgq04/psxmsgq04.doc b/testsuites/psxtests/psxmsgq04/psxmsgq04.doc
index 6d0b3a7931..62afee510a 100644
--- a/testsuites/psxtests/psxmsgq04/psxmsgq04.doc
+++ b/testsuites/psxtests/psxmsgq04/psxmsgq04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxmutexattr01/init.c b/testsuites/psxtests/psxmutexattr01/init.c
index b65eeefccd..3c5f99d610 100644
--- a/testsuites/psxtests/psxmutexattr01/init.c
+++ b/testsuites/psxtests/psxmutexattr01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxmutexattr01/psxmutexattr01.doc b/testsuites/psxtests/psxmutexattr01/psxmutexattr01.doc
index f198119252..762806a693 100644
--- a/testsuites/psxtests/psxmutexattr01/psxmutexattr01.doc
+++ b/testsuites/psxtests/psxmutexattr01/psxmutexattr01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxobj01/init.c b/testsuites/psxtests/psxobj01/init.c
index fef749b3e9..f9ea271b37 100644
--- a/testsuites/psxtests/psxobj01/init.c
+++ b/testsuites/psxtests/psxobj01/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
* Odd Object Name/Id Error Cases
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxobj01/psxobj01.doc b/testsuites/psxtests/psxobj01/psxobj01.doc
index 7c4d731a23..d028331b65 100644
--- a/testsuites/psxtests/psxobj01/psxobj01.doc
+++ b/testsuites/psxtests/psxobj01/psxobj01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxonce01/init.c b/testsuites/psxtests/psxonce01/init.c
index 3b50c945ab..033b1a02f3 100644
--- a/testsuites/psxtests/psxonce01/init.c
+++ b/testsuites/psxtests/psxonce01/init.c
@@ -1,13 +1,32 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2019 embedded brains GmbH
+ * Copyright (C) 2019 embedded brains GmbH & Co. KG
* Copyright (C) 2019 Sebastian Huber
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxonce01/psxonce01.doc b/testsuites/psxtests/psxonce01/psxonce01.doc
index 4f4da56c0a..3ca5d680c7 100644
--- a/testsuites/psxtests/psxonce01/psxonce01.doc
+++ b/testsuites/psxtests/psxonce01/psxonce01.doc
@@ -1,11 +1,30 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
# Copyright (c) 2013 Annelies Odermann <annelies.odermann@gmail.com>
-# Copyright (c) 2014 embedded brains GmbH.
+# Copyright (c) 2014 embedded brains GmbH & Co. KG
+#
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxonce01/system.h b/testsuites/psxtests/psxonce01/system.h
index fe95285d5f..2ac48cf74e 100644
--- a/testsuites/psxtests/psxonce01/system.h
+++ b/testsuites/psxtests/psxonce01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxpasswd01/init.c b/testsuites/psxtests/psxpasswd01/init.c
index 66dc5f0c49..d15d3a294a 100644
--- a/testsuites/psxtests/psxpasswd01/init.c
+++ b/testsuites/psxtests/psxpasswd01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxpasswd01/psxpasswd01.doc b/testsuites/psxtests/psxpasswd01/psxpasswd01.doc
index 02b02929e1..7964d9272e 100644
--- a/testsuites/psxtests/psxpasswd01/psxpasswd01.doc
+++ b/testsuites/psxtests/psxpasswd01/psxpasswd01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxpasswd02/init.c b/testsuites/psxtests/psxpasswd02/init.c
index ce250fce6e..f78f633d97 100644
--- a/testsuites/psxtests/psxpasswd02/init.c
+++ b/testsuites/psxtests/psxpasswd02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxpasswd02/psxpasswd02.doc b/testsuites/psxtests/psxpasswd02/psxpasswd02.doc
index b6a5b2cebd..b8d3c9dc0f 100644
--- a/testsuites/psxtests/psxpasswd02/psxpasswd02.doc
+++ b/testsuites/psxtests/psxpasswd02/psxpasswd02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxpipe01/init.c b/testsuites/psxtests/psxpipe01/init.c
index 90d4c5d8bc..5ae774a647 100644
--- a/testsuites/psxtests/psxpipe01/init.c
+++ b/testsuites/psxtests/psxpipe01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxpipe01/psxpipe01.doc b/testsuites/psxtests/psxpipe01/psxpipe01.doc
index 3fe5436d1a..92b07b8000 100644
--- a/testsuites/psxtests/psxpipe01/psxpipe01.doc
+++ b/testsuites/psxtests/psxpipe01/psxpipe01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxrdwrv/main.c b/testsuites/psxtests/psxrdwrv/main.c
index 44eda9e0d9..846cbd1dab 100644
--- a/testsuites/psxtests/psxrdwrv/main.c
+++ b/testsuites/psxtests/psxrdwrv/main.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/psxtests/psxrdwrv/test.c b/testsuites/psxtests/psxrdwrv/test.c
index d9582d8d01..0d66ffd720 100644
--- a/testsuites/psxtests/psxrdwrv/test.c
+++ b/testsuites/psxtests/psxrdwrv/test.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/psxtests/psxreaddir/main.c b/testsuites/psxtests/psxreaddir/main.c
index 238d8e9ff1..50b2903672 100644
--- a/testsuites/psxtests/psxreaddir/main.c
+++ b/testsuites/psxtests/psxreaddir/main.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup psxtests
+ *
+ * @brief This is main for psxreaddir.
+ */
+
+/*
+ * Copyright (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
/*
* Simple test program -- simplified version of sample test hello.
*/
diff --git a/testsuites/psxtests/psxreaddir/test.c b/testsuites/psxtests/psxreaddir/test.c
index 25d7844bfc..09afb82b83 100644
--- a/testsuites/psxtests/psxreaddir/test.c
+++ b/testsuites/psxtests/psxreaddir/test.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -22,9 +24,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxrwlock01/main.c b/testsuites/psxtests/psxrwlock01/main.c
index d71218bfff..4d0af07742 100644
--- a/testsuites/psxtests/psxrwlock01/main.c
+++ b/testsuites/psxtests/psxrwlock01/main.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/psxtests/psxrwlock01/test.c b/testsuites/psxtests/psxrwlock01/test.c
index 3599d1f64e..f6954007c0 100644
--- a/testsuites/psxtests/psxrwlock01/test.c
+++ b/testsuites/psxtests/psxrwlock01/test.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -435,10 +454,6 @@ int main(
status = pthread_rwlock_timedrdlock( NULL, &abstime);
rtems_test_assert( status == EINVAL );
- puts( "pthread_rwlock_timedrdlock( &rwlock, NULL) -- EINVAL" );
- status = pthread_rwlock_timedrdlock( &rwlock, NULL);
- rtems_test_assert( status == EINVAL );
-
puts( "pthread_rwlock_tryrdlock(NULL) -- EINVAL" );
status = pthread_rwlock_tryrdlock(NULL);
rtems_test_assert( status == EINVAL );
@@ -451,10 +466,6 @@ int main(
status = pthread_rwlock_timedwrlock( NULL, &abstime );
rtems_test_assert( status == EINVAL );
- puts( "pthread_rwlock_timedwrlock( &rwlock, NULL) -- EINVAL" );
- status = pthread_rwlock_timedwrlock( &rwlock, NULL);
- rtems_test_assert( status == EINVAL );
-
puts( "pthread_rwlock_trywrlock(NULL) -- EINVAL" );
status = pthread_rwlock_trywrlock(NULL);
rtems_test_assert( status == EINVAL );
@@ -463,6 +474,26 @@ int main(
status = pthread_rwlock_unlock(NULL);
rtems_test_assert( status == EINVAL );
+ status = pthread_rwlock_init( &rwlock, NULL );
+ rtems_test_assert( status == 0 );
+
+ status = pthread_rwlock_wrlock( &rwlock );
+ rtems_test_assert( status == 0 );
+
+ puts( "pthread_rwlock_timedrdlock( &rwlock, NULL) -- EINVAL" );
+ status = pthread_rwlock_timedrdlock( &rwlock, NULL);
+ rtems_test_assert( status == EINVAL );
+
+ puts( "pthread_rwlock_timedwrlock( &rwlock, NULL) -- EINVAL" );
+ status = pthread_rwlock_timedwrlock( &rwlock, NULL);
+ rtems_test_assert( status == EINVAL );
+
+ status = pthread_rwlock_unlock( &rwlock );
+ rtems_test_assert( status == 0 );
+
+ status = pthread_rwlock_destroy( &rwlock );
+ rtems_test_assert( status == 0 );
+
/*************** BAD ID CHECK *****************/
/* make a valid abstime */
puts( "clock_gettime(CLOCK_REALTIME, &abstime) -- OK" );
diff --git a/testsuites/psxtests/psxsem01/init.c b/testsuites/psxtests/psxsem01/init.c
index 899e324fa0..988854193d 100644
--- a/testsuites/psxtests/psxsem01/init.c
+++ b/testsuites/psxtests/psxsem01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxshm01/init.c b/testsuites/psxtests/psxshm01/init.c
index 4636f9a0af..eb155ddbf5 100644
--- a/testsuites/psxtests/psxshm01/init.c
+++ b/testsuites/psxtests/psxshm01/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/*
diff --git a/testsuites/psxtests/psxshm01/system.h b/testsuites/psxtests/psxshm01/system.h
index 846d92d4e3..fdd9cf09ec 100644
--- a/testsuites/psxtests/psxshm01/system.h
+++ b/testsuites/psxtests/psxshm01/system.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <pmacros.h>
diff --git a/testsuites/psxtests/psxshm02/init.c b/testsuites/psxtests/psxshm02/init.c
index 071f4c4da8..0f0221b658 100644
--- a/testsuites/psxtests/psxshm02/init.c
+++ b/testsuites/psxtests/psxshm02/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/*
diff --git a/testsuites/psxtests/psxshm02/system.h b/testsuites/psxtests/psxshm02/system.h
index 90e40d2c5d..b148f1f555 100644
--- a/testsuites/psxtests/psxshm02/system.h
+++ b/testsuites/psxtests/psxshm02/system.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2016 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <pmacros.h>
diff --git a/testsuites/psxtests/psxsignal01/init.c b/testsuites/psxtests/psxsignal01/init.c
index 6df3695c98..9cd3e31112 100644
--- a/testsuites/psxtests/psxsignal01/init.c
+++ b/testsuites/psxtests/psxsignal01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxsignal01/system.h b/testsuites/psxtests/psxsignal01/system.h
index 418434bc80..2f26575602 100644
--- a/testsuites/psxtests/psxsignal01/system.h
+++ b/testsuites/psxtests/psxsignal01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxsignal01/task1.c b/testsuites/psxtests/psxsignal01/task1.c
index 1fe88db268..4dde698f15 100644
--- a/testsuites/psxtests/psxsignal01/task1.c
+++ b/testsuites/psxtests/psxsignal01/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This routine serves as a test task.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxsignal02/init.c b/testsuites/psxtests/psxsignal02/init.c
index c7a9432415..2a117d15f4 100644
--- a/testsuites/psxtests/psxsignal02/init.c
+++ b/testsuites/psxtests/psxsignal02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxsignal02/psxsignal02.doc b/testsuites/psxtests/psxsignal02/psxsignal02.doc
index a587c46ccd..a88e011880 100644
--- a/testsuites/psxtests/psxsignal02/psxsignal02.doc
+++ b/testsuites/psxtests/psxsignal02/psxsignal02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxsignal03/init.c b/testsuites/psxtests/psxsignal03/init.c
index bc9daf8bfb..bf59ba0074 100644
--- a/testsuites/psxtests/psxsignal03/init.c
+++ b/testsuites/psxtests/psxsignal03/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup psxtests
+ *
+ * @brief This is init for psxsignal03.
+ */
+
+/*
+ * Copyright (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define USE_USER_SIGNALS_PROCESS
#include "psxsignal0ximpl.h"
diff --git a/testsuites/psxtests/psxsignal03/psxsignal03.doc b/testsuites/psxtests/psxsignal03/psxsignal03.doc
index 22f3d199bf..baa1ea9b50 100644
--- a/testsuites/psxtests/psxsignal03/psxsignal03.doc
+++ b/testsuites/psxtests/psxsignal03/psxsignal03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxsignal03/psxsignal0ximpl.h b/testsuites/psxtests/psxsignal03/psxsignal0ximpl.h
index 6410be1020..f727545c3f 100644
--- a/testsuites/psxtests/psxsignal03/psxsignal0ximpl.h
+++ b/testsuites/psxtests/psxsignal03/psxsignal0ximpl.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxsignal04/init.c b/testsuites/psxtests/psxsignal04/init.c
index 449634153a..80db780858 100644
--- a/testsuites/psxtests/psxsignal04/init.c
+++ b/testsuites/psxtests/psxsignal04/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup psxtests
+ *
+ * @brief This is init for psxsignal04.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define USE_REAL_TIME_SIGNALS_PROCESS
#include "../psxsignal03/psxsignal0ximpl.h"
diff --git a/testsuites/psxtests/psxsignal04/psxsignal04.doc b/testsuites/psxtests/psxsignal04/psxsignal04.doc
index f8e5599f7d..21ba1c30ba 100644
--- a/testsuites/psxtests/psxsignal04/psxsignal04.doc
+++ b/testsuites/psxtests/psxsignal04/psxsignal04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxsignal05/init.c b/testsuites/psxtests/psxsignal05/init.c
index 40db63e4a1..85bb571e5d 100644
--- a/testsuites/psxtests/psxsignal05/init.c
+++ b/testsuites/psxtests/psxsignal05/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxsignal05/psxsignal05.doc b/testsuites/psxtests/psxsignal05/psxsignal05.doc
index 9a21333ec7..02419690c2 100644
--- a/testsuites/psxtests/psxsignal05/psxsignal05.doc
+++ b/testsuites/psxtests/psxsignal05/psxsignal05.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxsignal06/init.c b/testsuites/psxtests/psxsignal06/init.c
index 650a0fa6c5..8770746639 100644
--- a/testsuites/psxtests/psxsignal06/init.c
+++ b/testsuites/psxtests/psxsignal06/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxsignal06/psxsignal06.doc b/testsuites/psxtests/psxsignal06/psxsignal06.doc
index 81db95f381..0ce55de625 100644
--- a/testsuites/psxtests/psxsignal06/psxsignal06.doc
+++ b/testsuites/psxtests/psxsignal06/psxsignal06.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxsignal09/init.c b/testsuites/psxtests/psxsignal09/init.c
new file mode 100644
index 0000000000..12883cc28c
--- /dev/null
+++ b/testsuites/psxtests/psxsignal09/init.c
@@ -0,0 +1,73 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup psxtests
+ */
+
+/*
+ * Copyright (C) 2021 On-Line Applications Research Corporation (OAR)
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define CONFIGURE_INIT
+#include "system.h"
+#include <signal.h>
+#include <errno.h>
+#include <reent.h>
+
+const char rtems_test_name[] = "PSXSIGNAL 9";
+
+static void Handler_1( int signo )
+{
+ TEST_END();
+ rtems_test_exit(0);
+}
+
+void *POSIX_Init( void *argument )
+{
+ int status;
+ struct sigaction act;
+
+ TEST_BEGIN();
+
+ /* Hook signals that can be generated from machine exceptions */
+ act.sa_handler = Handler_1;
+ act.sa_flags = 0;
+ status = sigaction( SIGFPE, &act, NULL );
+ rtems_test_assert( !status );
+ status = sigaction( SIGILL, &act, NULL );
+ rtems_test_assert( !status );
+ status = sigaction( SIGSEGV, &act, NULL );
+ rtems_test_assert( !status );
+
+ /* Generate machine exception */
+ _CPU_Instruction_illegal();
+
+ return NULL;
+}
diff --git a/testsuites/psxtests/psxsignal09/psxsignal09.doc b/testsuites/psxtests/psxsignal09/psxsignal09.doc
new file mode 100644
index 0000000000..5375ee6c20
--- /dev/null
+++ b/testsuites/psxtests/psxsignal09/psxsignal09.doc
@@ -0,0 +1,7 @@
+# COPYRIGHT (c) 2021.
+# On-Line Applications Research Corporation (OAR).
+#
+# SPDX-License-Identifier: BSD-2-Clause
+
+This test ensures that machine exceptions are mapped to POSIX signals when
+required by the application.
diff --git a/testsuites/psxtests/psxsignal09/psxsignal09.scn b/testsuites/psxtests/psxsignal09/psxsignal09.scn
new file mode 100644
index 0000000000..b0d092a60c
--- /dev/null
+++ b/testsuites/psxtests/psxsignal09/psxsignal09.scn
@@ -0,0 +1,3 @@
+*** BEGIN OF TEST PSXSIGNAL 9 ***
+
+*** END OF TEST PSXSIGNAL 9 ***
diff --git a/testsuites/psxtests/psxsignal09/system.h b/testsuites/psxtests/psxsignal09/system.h
new file mode 100644
index 0000000000..9f83634b6d
--- /dev/null
+++ b/testsuites/psxtests/psxsignal09/system.h
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup psxtests
+ */
+
+/*
+ * Copyright (C) 2021 On-Line Applications Research Corporation (OAR)
+ *
+ * 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 OWNER 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.
+ */
+
+#include <pmacros.h>
+
+void *POSIX_Init( void *argument );
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+#define CONFIGURE_EXCEPTION_TO_SIGNAL_MAPPING
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
+#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 1
+
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
+ (RTEMS_MINIMUM_STACK_SIZE * 4)
+
+#include <rtems/confdefs.h>
+
+/* end of include file */
diff --git a/testsuites/psxtests/psxspin01/main.c b/testsuites/psxtests/psxspin01/main.c
index 2c35d33b4e..a867527a5e 100644
--- a/testsuites/psxtests/psxspin01/main.c
+++ b/testsuites/psxtests/psxspin01/main.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/psxtests/psxspin01/psxspin01.doc b/testsuites/psxtests/psxspin01/psxspin01.doc
index 39f13fb8b5..c32e28499f 100644
--- a/testsuites/psxtests/psxspin01/psxspin01.doc
+++ b/testsuites/psxtests/psxspin01/psxspin01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxspin01/test.c b/testsuites/psxtests/psxspin01/test.c
index e27db73d78..212b568e29 100644
--- a/testsuites/psxtests/psxspin01/test.c
+++ b/testsuites/psxtests/psxspin01/test.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxstack01/init.c b/testsuites/psxtests/psxstack01/init.c
index 762e3950f9..7abb0dc7ba 100644
--- a/testsuites/psxtests/psxstack01/init.c
+++ b/testsuites/psxtests/psxstack01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxstack01/psxstack01.doc b/testsuites/psxtests/psxstack01/psxstack01.doc
index c946a5944b..e3b0af3657 100644
--- a/testsuites/psxtests/psxstack01/psxstack01.doc
+++ b/testsuites/psxtests/psxstack01/psxstack01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxstack02/init.c b/testsuites/psxtests/psxstack02/init.c
index 2f7ba56e68..d58ff4d2a7 100644
--- a/testsuites/psxtests/psxstack02/init.c
+++ b/testsuites/psxtests/psxstack02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxstack02/psxstack02.doc b/testsuites/psxtests/psxstack02/psxstack02.doc
index a3d9f96219..07a344df2c 100644
--- a/testsuites/psxtests/psxstack02/psxstack02.doc
+++ b/testsuites/psxtests/psxstack02/psxstack02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxstat/main.c b/testsuites/psxtests/psxstat/main.c
index 472b91848c..a9bacbc4dc 100644
--- a/testsuites/psxtests/psxstat/main.c
+++ b/testsuites/psxtests/psxstat/main.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/psxtests/psxstat/test.c b/testsuites/psxtests/psxstat/test.c
index 09ebb9613e..e24d09fbf1 100644
--- a/testsuites/psxtests/psxstat/test.c
+++ b/testsuites/psxtests/psxstat/test.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxstrsignal01/init.c b/testsuites/psxtests/psxstrsignal01/init.c
index 6c3a37cb52..e9970bf07a 100644
--- a/testsuites/psxtests/psxstrsignal01/init.c
+++ b/testsuites/psxtests/psxstrsignal01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2017.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxstrsignal01/psxstrsignal01.doc b/testsuites/psxtests/psxstrsignal01/psxstrsignal01.doc
index 43b362d0be..47c85cb06a 100644
--- a/testsuites/psxtests/psxstrsignal01/psxstrsignal01.doc
+++ b/testsuites/psxtests/psxstrsignal01/psxstrsignal01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2017.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxsysconf/init.c b/testsuites/psxtests/psxsysconf/init.c
index 66d6dd3761..796496feb3 100644
--- a/testsuites/psxtests/psxsysconf/init.c
+++ b/testsuites/psxtests/psxsysconf/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxsysconf/system.h b/testsuites/psxtests/psxsysconf/system.h
index d0eaed6ca3..65458ef3f3 100644
--- a/testsuites/psxtests/psxsysconf/system.h
+++ b/testsuites/psxtests/psxsysconf/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxthreadname01/init.c b/testsuites/psxtests/psxthreadname01/init.c
index ccc2ea1031..c5d5cef604 100644
--- a/testsuites/psxtests/psxthreadname01/init.c
+++ b/testsuites/psxtests/psxthreadname01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define _GNU_SOURCE
diff --git a/testsuites/psxtests/psxtime/main.c b/testsuites/psxtests/psxtime/main.c
index c45efbb019..28c29e5846 100644
--- a/testsuites/psxtests/psxtime/main.c
+++ b/testsuites/psxtests/psxtime/main.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Simple RTEMS startup to call main
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxtime/psxtime.doc b/testsuites/psxtests/psxtime/psxtime.doc
index ec46f9293b..88f416713d 100644
--- a/testsuites/psxtests/psxtime/psxtime.doc
+++ b/testsuites/psxtests/psxtime/psxtime.doc
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# testsuites/psxtests/psxtime/psxtime.doc
# Copyright (c) 2013 Shaily Sangwan <shailysangwan@gmail.com>.
#
diff --git a/testsuites/psxtests/psxtime/test.c b/testsuites/psxtests/psxtime/test.c
index d9f5537152..796d3d5d35 100644
--- a/testsuites/psxtests/psxtime/test.c
+++ b/testsuites/psxtests/psxtime/test.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -122,17 +141,15 @@ void test_adjtime(void)
olddelta.tv_sec = 0;
olddelta.tv_usec = 0;
- puts( "adjtime - NULL delta - EINVAL" );
+ puts( "adjtime - NULL delta - OK" );
sc = adjtime( NULL, &olddelta );
- rtems_test_assert( sc == -1 );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( sc == 0 );
- puts( "adjtime - delta out of range - EINVAL" );
+ puts( "adjtime - large us delta - OK" );
delta.tv_sec = 0;
delta.tv_usec = 1000000000; /* 100 seconds worth */
sc = adjtime( &delta, &olddelta );
- rtems_test_assert( sc == -1 );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( sc == 0 );
puts( "adjtime - delta range of 0 - OK" );
delta.tv_sec = 0;
diff --git a/testsuites/psxtests/psxtimer01/psxtimer.c b/testsuites/psxtests/psxtimer01/psxtimer.c
index 6ec049ac54..57d23c1582 100644
--- a/testsuites/psxtests/psxtimer01/psxtimer.c
+++ b/testsuites/psxtests/psxtimer01/psxtimer.c
@@ -1,4 +1,7 @@
-/*
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file POSIX Timer Test
*
* This is a simple real-time applications which contains 3 periodic tasks.
*
@@ -10,14 +13,33 @@
*
* The share data is protected with a POSIX mutex.
*
- * Other POSIX facilities such as timers, condition, .. is also used
- *
+ * Other POSIX facilities such as timers, condition, .. are also used.
+ */
+
+/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxtimer01/system.h b/testsuites/psxtests/psxtimer01/system.h
index 9cfd408d86..c04d81b3ef 100644
--- a/testsuites/psxtests/psxtimer01/system.h
+++ b/testsuites/psxtests/psxtimer01/system.h
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
* function in the test set.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxtimer02/psxtimer.c b/testsuites/psxtests/psxtimer02/psxtimer.c
index 874a789b7f..26d1d5a67c 100644
--- a/testsuites/psxtests/psxtimer02/psxtimer.c
+++ b/testsuites/psxtests/psxtimer02/psxtimer.c
@@ -1,4 +1,7 @@
-/*
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file POSIX Timer Test #2
*
* This is a simple real-time applications which contains 3 periodic tasks.
*
@@ -10,14 +13,33 @@
*
* The share data is protected with a POSIX mutex.
*
- * Other POSIX facilities such as timers, condition, .. is also used
- *
+ * Other POSIX facilities such as timers, condition, .. are also used.
+ */
+
+/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxtimer02/system.h b/testsuites/psxtests/psxtimer02/system.h
index a173f3eb02..57a73325ce 100644
--- a/testsuites/psxtests/psxtimer02/system.h
+++ b/testsuites/psxtests/psxtimer02/system.h
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
* function in the test set.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxtimer_face01/psxtimer.c b/testsuites/psxtests/psxtimer_face01/psxtimer.c
new file mode 100644
index 0000000000..155afc5ce0
--- /dev/null
+++ b/testsuites/psxtests/psxtimer_face01/psxtimer.c
@@ -0,0 +1,123 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file POSIX Timer Test of FACE Behavior
+ */
+
+/*
+ * COPYRIGHT (c) 2022. On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <pmacros.h>
+#include "tmacros.h"
+
+#include <unistd.h>
+#include <errno.h>
+#include <sched.h>
+#include <time.h> /* time facilities */
+#include <stdio.h> /* console facilities */
+
+const char rtems_test_name[] = "PSXTIMER FACE 1";
+
+static void *POSIX_Init (
+ void *argument
+)
+
+{
+ struct sigevent event;
+ int status;
+ timer_t timer;
+
+ /*
+ * If these are not filled in correctly, we do not execute pass the
+ * error checking for a NULL event pointer.
+ */
+ event.sigev_notify = SIGEV_SIGNAL;
+ event.sigev_signo = SIGUSR1;
+
+ TEST_BEGIN();
+
+ /*
+ * When FACE timer behavior is configured, creating a POSIX timer
+ * using CLOCK_REALTIME is not allowed.
+ */
+ puts( "timer_create - CLOCK_REALTIME forbidden - EPERM" );
+ status = timer_create( CLOCK_REALTIME, &event, &timer );
+ fatal_posix_service_status_errno( status, EPERM, "not allowed" );
+
+ /*
+ * When FACE timer behavior is configured, creating a POSIX timer
+ * on a value other than CLOCK_REALTIME or CLOCK_MONOTONIC is not allowed.
+ */
+ puts( "timer_create - CLOCK_PROCESS_CPUTIME_ID not allowed - EINVAL" );
+ status = timer_create( CLOCK_PROCESS_CPUTIME_ID, &event, &timer );
+ fatal_posix_service_status_errno( status, EINVAL, "invalid clock" );
+
+ /*
+ * When FACE timer behavior is configured, creating a POSIX timer
+ * on CLOCK_MONOTONIC allowed.
+ */
+ puts( "timer_create - OK" );
+ status = timer_create( CLOCK_MONOTONIC, &event, &timer );
+ posix_service_failed( status, "timer_create OK" );
+
+ /*
+ * Delete the previously created timer.
+ */
+ puts( "timer_delete - OK" );
+ status = timer_delete( timer );
+ posix_service_failed( status, "timer_delete ok" );
+
+ /*
+ */
+ puts( "timer_create - CLOCK_MONOTONIC is allowed - OK" );
+ status = timer_create( CLOCK_MONOTONIC, &event, &timer );
+ posix_service_failed( status, "timer_create ok" );
+
+ TEST_END();
+ rtems_test_exit (0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
+#define CONFIGURE_MAXIMUM_POSIX_TIMERS 1
+
+#define CONFIGURE_POSIX_TIMERS_FACE_BEHAVIOR
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+
+/* end of include file */
diff --git a/testsuites/psxtests/psxtimer_face01/psxtimer_face01.doc b/testsuites/psxtests/psxtimer_face01/psxtimer_face01.doc
new file mode 100644
index 0000000000..e975419539
--- /dev/null
+++ b/testsuites/psxtests/psxtimer_face01/psxtimer_face01.doc
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
+# COPYRIGHT (c) 1989-2009.
+# On-Line Applications Research Corporation (OAR).
+#
+# 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 OWNER 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.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: psxtimer_face01
+
+directives:
+ timer_create
+ CONFIGURE_POSIX_TIMERS_FACE_BEHAVIOR
+
+concepts:
+
++ This test exercises the CONFIGURE_POSIX_TIMERS_FACE_BEHAVIOR configure
+ option which alters the behavior of timer_create().
+
+ - With CONFIGURE_POSIX_TIMERS_FACE_BEHAVIOR defined, timer_create()
+ returns EPERM to indicate this is not allowed.
+
+ - With CONFIGURE_POSIX_TIMERS_FACE_BEHAVIOR defined, timer_create()
+ for CLOCK_MONOTONIC is allowed.
+
+ - With CONFIGURE_POSIX_TIMERS_FACE_BEHAVIOR defined, timer_create()
+ for any other clock value is an error.
+
diff --git a/testsuites/psxtests/psxtimer_face01/psxtimer_face01.scn b/testsuites/psxtests/psxtimer_face01/psxtimer_face01.scn
new file mode 100644
index 0000000000..b83b41f281
--- /dev/null
+++ b/testsuites/psxtests/psxtimer_face01/psxtimer_face01.scn
@@ -0,0 +1,6 @@
+*** BEGIN OF TEST FACE 1 ***
+timer_create - CLOCK_REALTIME forbidden - EPERM
+timer_create - CLOCK_PROCESS_CPUTIME_ID not allowed - EINVAL
+timer_create - OK
+timer_delete - OK
+*** END OF TEST PSXTIMER FACE 1 ***
diff --git a/testsuites/psxtests/psxtimes01/init.c b/testsuites/psxtests/psxtimes01/init.c
index d5b573bf15..b7cf491d25 100644
--- a/testsuites/psxtests/psxtimes01/init.c
+++ b/testsuites/psxtests/psxtimes01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxtimes01/psxtimes01.doc b/testsuites/psxtests/psxtimes01/psxtimes01.doc
index 452a0dc252..f4479756dd 100644
--- a/testsuites/psxtests/psxtimes01/psxtimes01.doc
+++ b/testsuites/psxtests/psxtimes01/psxtimes01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtests/psxualarm/init.c b/testsuites/psxtests/psxualarm/init.c
index 2aa133bcd4..4a8ce86e05 100644
--- a/testsuites/psxtests/psxualarm/init.c
+++ b/testsuites/psxtests/psxualarm/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxualarm/system.h b/testsuites/psxtests/psxualarm/system.h
index 418434bc80..2f26575602 100644
--- a/testsuites/psxtests/psxualarm/system.h
+++ b/testsuites/psxtests/psxualarm/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* functions */
diff --git a/testsuites/psxtests/psxusleep/init.c b/testsuites/psxtests/psxusleep/init.c
index 84eedd98dc..ab7600066c 100644
--- a/testsuites/psxtests/psxusleep/init.c
+++ b/testsuites/psxtests/psxusleep/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtests/psxusleep/psxusleep.doc b/testsuites/psxtests/psxusleep/psxusleep.doc
index ae62fd69f5..7b0b297f88 100644
--- a/testsuites/psxtests/psxusleep/psxusleep.doc
+++ b/testsuites/psxtests/psxusleep/psxusleep.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/psxtmtests/psxtmbarrier01/init.c b/testsuites/psxtmtests/psxtmbarrier01/init.c
index 4c9697a8a3..1dd66b8c7b 100644
--- a/testsuites/psxtmtests/psxtmbarrier01/init.c
+++ b/testsuites/psxtmtests/psxtmbarrier01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/psxtmtests/psxtmbarrier01/psxtmbarrier01.doc b/testsuites/psxtmtests/psxtmbarrier01/psxtmbarrier01.doc
index 74f74c67d5..9e9fba5e0d 100644
--- a/testsuites/psxtmtests/psxtmbarrier01/psxtmbarrier01.doc
+++ b/testsuites/psxtmtests/psxtmbarrier01/psxtmbarrier01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmbarrier02/init.c b/testsuites/psxtmtests/psxtmbarrier02/init.c
index 47b5a964e6..a54eed4d87 100644
--- a/testsuites/psxtmtests/psxtmbarrier02/init.c
+++ b/testsuites/psxtmtests/psxtmbarrier02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/psxtmtests/psxtmbarrier02/psxtmbarrier02.doc b/testsuites/psxtmtests/psxtmbarrier02/psxtmbarrier02.doc
index 276f878c8b..4099a21557 100644
--- a/testsuites/psxtmtests/psxtmbarrier02/psxtmbarrier02.doc
+++ b/testsuites/psxtmtests/psxtmbarrier02/psxtmbarrier02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmbarrier03/init.c b/testsuites/psxtmtests/psxtmbarrier03/init.c
index 49c3ed893d..d3e7b0157d 100644
--- a/testsuites/psxtmtests/psxtmbarrier03/init.c
+++ b/testsuites/psxtmtests/psxtmbarrier03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/psxtmtests/psxtmbarrier03/psxtmbarrier03.doc b/testsuites/psxtmtests/psxtmbarrier03/psxtmbarrier03.doc
index 6a5cab0d81..a5f576902d 100644
--- a/testsuites/psxtmtests/psxtmbarrier03/psxtmbarrier03.doc
+++ b/testsuites/psxtmtests/psxtmbarrier03/psxtmbarrier03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmbarrier04/init.c b/testsuites/psxtmtests/psxtmbarrier04/init.c
index a463d9a8d2..2ee520b6e2 100644
--- a/testsuites/psxtmtests/psxtmbarrier04/init.c
+++ b/testsuites/psxtmtests/psxtmbarrier04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/psxtmtests/psxtmbarrier04/psxtmbarrier04.doc b/testsuites/psxtmtests/psxtmbarrier04/psxtmbarrier04.doc
index 767fd36484..bbb75b9af5 100644
--- a/testsuites/psxtmtests/psxtmbarrier04/psxtmbarrier04.doc
+++ b/testsuites/psxtmtests/psxtmbarrier04/psxtmbarrier04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2012.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmclocknanosleep01/init.c b/testsuites/psxtmtests/psxtmclocknanosleep01/init.c
index c0dab16b9d..458b257194 100644
--- a/testsuites/psxtmtests/psxtmclocknanosleep01/init.c
+++ b/testsuites/psxtmtests/psxtmclocknanosleep01/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
* Copyright (c) 2016. Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmclocknanosleep01/psxtmclocknanosleep01.doc b/testsuites/psxtmtests/psxtmclocknanosleep01/psxtmclocknanosleep01.doc
index 67370cfa36..b228c9b3d4 100644
--- a/testsuites/psxtmtests/psxtmclocknanosleep01/psxtmclocknanosleep01.doc
+++ b/testsuites/psxtmtests/psxtmclocknanosleep01/psxtmclocknanosleep01.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright 2016. Gedare Bloom.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmclocknanosleep02/init.c b/testsuites/psxtmtests/psxtmclocknanosleep02/init.c
index 77d4dabc34..c4fc962791 100644
--- a/testsuites/psxtmtests/psxtmclocknanosleep02/init.c
+++ b/testsuites/psxtmtests/psxtmclocknanosleep02/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
* Copyright (c) 2016. Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmclocknanosleep02/psxtmclocknanosleep02.doc b/testsuites/psxtmtests/psxtmclocknanosleep02/psxtmclocknanosleep02.doc
index 4724ae50f3..12f8baf32c 100644
--- a/testsuites/psxtmtests/psxtmclocknanosleep02/psxtmclocknanosleep02.doc
+++ b/testsuites/psxtmtests/psxtmclocknanosleep02/psxtmclocknanosleep02.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2016. Gedare Bloom
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmclocknanosleep03/init.c b/testsuites/psxtmtests/psxtmclocknanosleep03/init.c
index 12e2db96fc..067c05c1cf 100644
--- a/testsuites/psxtmtests/psxtmclocknanosleep03/init.c
+++ b/testsuites/psxtmtests/psxtmclocknanosleep03/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
* Copyright (c) 2016. Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmclocknanosleep03/psxtmclocknanosleep03.doc b/testsuites/psxtmtests/psxtmclocknanosleep03/psxtmclocknanosleep03.doc
index 8ea20f6efd..31dcdda21b 100644
--- a/testsuites/psxtmtests/psxtmclocknanosleep03/psxtmclocknanosleep03.doc
+++ b/testsuites/psxtmtests/psxtmclocknanosleep03/psxtmclocknanosleep03.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (c) 2016. Gedare Bloom
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmcond01/init.c b/testsuites/psxtmtests/psxtmcond01/init.c
index e201ab0844..f797113724 100644
--- a/testsuites/psxtmtests/psxtmcond01/init.c
+++ b/testsuites/psxtmtests/psxtmcond01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmcond02/init.c b/testsuites/psxtmtests/psxtmcond02/init.c
index ec5a2e9572..044e74f9bb 100644
--- a/testsuites/psxtmtests/psxtmcond02/init.c
+++ b/testsuites/psxtmtests/psxtmcond02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmcond02/psxtmcond02.doc b/testsuites/psxtmtests/psxtmcond02/psxtmcond02.doc
index 3aab0e7cdd..c3353964b1 100644
--- a/testsuites/psxtmtests/psxtmcond02/psxtmcond02.doc
+++ b/testsuites/psxtmtests/psxtmcond02/psxtmcond02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2013
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmcond03/init.c b/testsuites/psxtmtests/psxtmcond03/init.c
index 1aa958819d..1243b7130a 100644
--- a/testsuites/psxtmtests/psxtmcond03/init.c
+++ b/testsuites/psxtmtests/psxtmcond03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmcond03/psxtmcond03.doc b/testsuites/psxtmtests/psxtmcond03/psxtmcond03.doc
index 436f1fe302..2934e34a7f 100644
--- a/testsuites/psxtmtests/psxtmcond03/psxtmcond03.doc
+++ b/testsuites/psxtmtests/psxtmcond03/psxtmcond03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2013
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmcond04/init.c b/testsuites/psxtmtests/psxtmcond04/init.c
index 316205a8ef..d5d14ae025 100644
--- a/testsuites/psxtmtests/psxtmcond04/init.c
+++ b/testsuites/psxtmtests/psxtmcond04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmcond04/psxtmcond04.doc b/testsuites/psxtmtests/psxtmcond04/psxtmcond04.doc
index 42188820af..2ba306f7a9 100644
--- a/testsuites/psxtmtests/psxtmcond04/psxtmcond04.doc
+++ b/testsuites/psxtmtests/psxtmcond04/psxtmcond04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2013
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmcond05/init.c b/testsuites/psxtmtests/psxtmcond05/init.c
index 7791768fa2..b6ce4dc447 100644
--- a/testsuites/psxtmtests/psxtmcond05/init.c
+++ b/testsuites/psxtmtests/psxtmcond05/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmcond05/psxtmcond05.doc b/testsuites/psxtmtests/psxtmcond05/psxtmcond05.doc
index 32ea709e23..3ed4b09eb1 100644
--- a/testsuites/psxtmtests/psxtmcond05/psxtmcond05.doc
+++ b/testsuites/psxtmtests/psxtmcond05/psxtmcond05.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2013
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmcond06/init.c b/testsuites/psxtmtests/psxtmcond06/init.c
index c385cbfa30..1deec68850 100644
--- a/testsuites/psxtmtests/psxtmcond06/init.c
+++ b/testsuites/psxtmtests/psxtmcond06/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmcond06/psxtmcond06.doc b/testsuites/psxtmtests/psxtmcond06/psxtmcond06.doc
index 77d835d478..92d8d3cfcb 100644
--- a/testsuites/psxtmtests/psxtmcond06/psxtmcond06.doc
+++ b/testsuites/psxtmtests/psxtmcond06/psxtmcond06.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2013
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmcond07/init.c b/testsuites/psxtmtests/psxtmcond07/init.c
index 42394f7633..816d64a90f 100644
--- a/testsuites/psxtmtests/psxtmcond07/init.c
+++ b/testsuites/psxtmtests/psxtmcond07/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmcond07/psxtmcond07.doc b/testsuites/psxtmtests/psxtmcond07/psxtmcond07.doc
index 0cdfe271f7..66a8995c50 100644
--- a/testsuites/psxtmtests/psxtmcond07/psxtmcond07.doc
+++ b/testsuites/psxtmtests/psxtmcond07/psxtmcond07.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2013
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmcond08/init.c b/testsuites/psxtmtests/psxtmcond08/init.c
index c4fa9146e3..d2dab86119 100644
--- a/testsuites/psxtmtests/psxtmcond08/init.c
+++ b/testsuites/psxtmtests/psxtmcond08/init.c
@@ -1,2 +1,17 @@
+/*
+ * Copyright (C) 2013 Christopher Kerl <zargyyoyo@gmail.com>
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
#define USE_WAIT
#include "psxtmcond08impl.h"
diff --git a/testsuites/psxtmtests/psxtmcond08/psxtmcond08.doc b/testsuites/psxtmtests/psxtmcond08/psxtmcond08.doc
index 68ca20512e..7002430c6c 100644
--- a/testsuites/psxtmtests/psxtmcond08/psxtmcond08.doc
+++ b/testsuites/psxtmtests/psxtmcond08/psxtmcond08.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2013
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmcond08/psxtmcond08impl.h b/testsuites/psxtmtests/psxtmcond08/psxtmcond08impl.h
index 15664d5d6d..91f5b4f638 100644
--- a/testsuites/psxtmtests/psxtmcond08/psxtmcond08impl.h
+++ b/testsuites/psxtmtests/psxtmcond08/psxtmcond08impl.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/psxtmtests/psxtmcond09/init.c b/testsuites/psxtmtests/psxtmcond09/init.c
index 5a40a7a407..f08dc7173e 100644
--- a/testsuites/psxtmtests/psxtmcond09/init.c
+++ b/testsuites/psxtmtests/psxtmcond09/init.c
@@ -1,2 +1,17 @@
+/*
+ * Copyright (C) 2013 Christopher Kerl <zargyyoyo@gmail.com>
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
#define USE_TIMEDWAIT_WITH_VALUE
#include "../psxtmcond08/psxtmcond08impl.h"
diff --git a/testsuites/psxtmtests/psxtmcond09/psxtmcond09.doc b/testsuites/psxtmtests/psxtmcond09/psxtmcond09.doc
index 459a871d7c..b49a3d65b6 100644
--- a/testsuites/psxtmtests/psxtmcond09/psxtmcond09.doc
+++ b/testsuites/psxtmtests/psxtmcond09/psxtmcond09.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmcond10/init.c b/testsuites/psxtmtests/psxtmcond10/init.c
index ba08dc195c..74522ab4d4 100644
--- a/testsuites/psxtmtests/psxtmcond10/init.c
+++ b/testsuites/psxtmtests/psxtmcond10/init.c
@@ -1,2 +1,17 @@
+/*
+ * Copyright (C) 2013 Christopher Kerl <zargyyoyo@gmail.com>
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
#define USE_TIMEDWAIT_WAIT_VALUE_IN_PAST
#include "../psxtmcond08/psxtmcond08impl.h"
diff --git a/testsuites/psxtmtests/psxtmkey01/init.c b/testsuites/psxtmtests/psxtmkey01/init.c
index fc5b8174b0..d09160b449 100644
--- a/testsuites/psxtmtests/psxtmkey01/init.c
+++ b/testsuites/psxtmtests/psxtmkey01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmkey01/psxtmkey01.doc b/testsuites/psxtmtests/psxtmkey01/psxtmkey01.doc
index 266e6d6202..143687fb8e 100644
--- a/testsuites/psxtmtests/psxtmkey01/psxtmkey01.doc
+++ b/testsuites/psxtmtests/psxtmkey01/psxtmkey01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmkey02/init.c b/testsuites/psxtmtests/psxtmkey02/init.c
index 268bbfe3a3..fa24387f9b 100644
--- a/testsuites/psxtmtests/psxtmkey02/init.c
+++ b/testsuites/psxtmtests/psxtmkey02/init.c
@@ -2,9 +2,26 @@
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http:www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmkey02/psxtmkey02.doc b/testsuites/psxtmtests/psxtmkey02/psxtmkey02.doc
index 626a8dbe27..490f3fa6c3 100644
--- a/testsuites/psxtmtests/psxtmkey02/psxtmkey02.doc
+++ b/testsuites/psxtmtests/psxtmkey02/psxtmkey02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmmq01/init.c b/testsuites/psxtmtests/psxtmmq01/init.c
index d4bdf6d8f6..90505d6458 100644
--- a/testsuites/psxtmtests/psxtmmq01/init.c
+++ b/testsuites/psxtmtests/psxtmmq01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmmq01/psxtmmq01.doc b/testsuites/psxtmtests/psxtmmq01/psxtmmq01.doc
index 5a13e02b3c..18714df593 100644
--- a/testsuites/psxtmtests/psxtmmq01/psxtmmq01.doc
+++ b/testsuites/psxtmtests/psxtmmq01/psxtmmq01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmmutex01/init.c b/testsuites/psxtmtests/psxtmmutex01/init.c
index 3356113014..4af8cf14e0 100644
--- a/testsuites/psxtmtests/psxtmmutex01/init.c
+++ b/testsuites/psxtmtests/psxtmmutex01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmmutex01/psxtmmutex01.doc b/testsuites/psxtmtests/psxtmmutex01/psxtmmutex01.doc
index 55fcc81389..8387ecf7f8 100644
--- a/testsuites/psxtmtests/psxtmmutex01/psxtmmutex01.doc
+++ b/testsuites/psxtmtests/psxtmmutex01/psxtmmutex01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmmutex02/init.c b/testsuites/psxtmtests/psxtmmutex02/init.c
index 6cd29468a0..69aa67be74 100644
--- a/testsuites/psxtmtests/psxtmmutex02/init.c
+++ b/testsuites/psxtmtests/psxtmmutex02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc b/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc
index ce460f0f1c..b3fb1b0800 100644
--- a/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc
+++ b/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmmutex03/init.c b/testsuites/psxtmtests/psxtmmutex03/init.c
index bda72ac80e..9e990281b4 100644
--- a/testsuites/psxtmtests/psxtmmutex03/init.c
+++ b/testsuites/psxtmtests/psxtmmutex03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmmutex03/psxtmmutex03.doc b/testsuites/psxtmtests/psxtmmutex03/psxtmmutex03.doc
index 2a1f007194..9c444a05a3 100644
--- a/testsuites/psxtmtests/psxtmmutex03/psxtmmutex03.doc
+++ b/testsuites/psxtmtests/psxtmmutex03/psxtmmutex03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmmutex04/init.c b/testsuites/psxtmtests/psxtmmutex04/init.c
index ce439c5eb3..d79f424206 100644
--- a/testsuites/psxtmtests/psxtmmutex04/init.c
+++ b/testsuites/psxtmtests/psxtmmutex04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmmutex04/psxtmmutex04.doc b/testsuites/psxtmtests/psxtmmutex04/psxtmmutex04.doc
index 38860aae68..60c0a20f81 100644
--- a/testsuites/psxtmtests/psxtmmutex04/psxtmmutex04.doc
+++ b/testsuites/psxtmtests/psxtmmutex04/psxtmmutex04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmmutex05/init.c b/testsuites/psxtmtests/psxtmmutex05/init.c
index c2934ce53b..af485c38be 100644
--- a/testsuites/psxtmtests/psxtmmutex05/init.c
+++ b/testsuites/psxtmtests/psxtmmutex05/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmmutex05/psxtmmutex05.doc b/testsuites/psxtmtests/psxtmmutex05/psxtmmutex05.doc
index 10b6ca0aab..9360a05852 100644
--- a/testsuites/psxtmtests/psxtmmutex05/psxtmmutex05.doc
+++ b/testsuites/psxtmtests/psxtmmutex05/psxtmmutex05.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmmutex06/init.c b/testsuites/psxtmtests/psxtmmutex06/init.c
index 402c1cca82..5325c4efd4 100644
--- a/testsuites/psxtmtests/psxtmmutex06/init.c
+++ b/testsuites/psxtmtests/psxtmmutex06/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/psxtmtests/psxtmmutex06/psxtmmutex06.doc b/testsuites/psxtmtests/psxtmmutex06/psxtmmutex06.doc
index 88cece9e28..7213fab2f3 100644
--- a/testsuites/psxtmtests/psxtmmutex06/psxtmmutex06.doc
+++ b/testsuites/psxtmtests/psxtmmutex06/psxtmmutex06.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmmutex07/init.c b/testsuites/psxtmtests/psxtmmutex07/init.c
index b86fe419de..acd4a5c3d9 100644
--- a/testsuites/psxtmtests/psxtmmutex07/init.c
+++ b/testsuites/psxtmtests/psxtmmutex07/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmmutex07/psxtmmutex07.doc b/testsuites/psxtmtests/psxtmmutex07/psxtmmutex07.doc
index 3eecb346bf..8be220bb80 100644
--- a/testsuites/psxtmtests/psxtmmutex07/psxtmmutex07.doc
+++ b/testsuites/psxtmtests/psxtmmutex07/psxtmmutex07.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmnanosleep01/init.c b/testsuites/psxtmtests/psxtmnanosleep01/init.c
index 24a34ee7fa..aab6fd0f67 100644
--- a/testsuites/psxtmtests/psxtmnanosleep01/init.c
+++ b/testsuites/psxtmtests/psxtmnanosleep01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmnanosleep01/psxtmnanosleep01.doc b/testsuites/psxtmtests/psxtmnanosleep01/psxtmnanosleep01.doc
index c8601464ea..b48acb9c91 100644
--- a/testsuites/psxtmtests/psxtmnanosleep01/psxtmnanosleep01.doc
+++ b/testsuites/psxtmtests/psxtmnanosleep01/psxtmnanosleep01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmnanosleep02/init.c b/testsuites/psxtmtests/psxtmnanosleep02/init.c
index 97138f0426..0f4083defc 100644
--- a/testsuites/psxtmtests/psxtmnanosleep02/init.c
+++ b/testsuites/psxtmtests/psxtmnanosleep02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmnanosleep02/psxtmnanosleep02.doc b/testsuites/psxtmtests/psxtmnanosleep02/psxtmnanosleep02.doc
index 2f2797f84d..a3077b8f41 100644
--- a/testsuites/psxtmtests/psxtmnanosleep02/psxtmnanosleep02.doc
+++ b/testsuites/psxtmtests/psxtmnanosleep02/psxtmnanosleep02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmrwlock01/init.c b/testsuites/psxtmtests/psxtmrwlock01/init.c
index 4b791e4652..1132867dae 100644
--- a/testsuites/psxtmtests/psxtmrwlock01/init.c
+++ b/testsuites/psxtmtests/psxtmrwlock01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmrwlock01/psxtmrwlock01.doc b/testsuites/psxtmtests/psxtmrwlock01/psxtmrwlock01.doc
index 00bbd7a758..0166b4fb24 100644
--- a/testsuites/psxtmtests/psxtmrwlock01/psxtmrwlock01.doc
+++ b/testsuites/psxtmtests/psxtmrwlock01/psxtmrwlock01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmrwlock02/init.c b/testsuites/psxtmtests/psxtmrwlock02/init.c
index 99d2c0eabc..dfbf5420ab 100644
--- a/testsuites/psxtmtests/psxtmrwlock02/init.c
+++ b/testsuites/psxtmtests/psxtmrwlock02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmrwlock02/psxtmrwlock02.doc b/testsuites/psxtmtests/psxtmrwlock02/psxtmrwlock02.doc
index 87ea8ef71e..7378cca31f 100644
--- a/testsuites/psxtmtests/psxtmrwlock02/psxtmrwlock02.doc
+++ b/testsuites/psxtmtests/psxtmrwlock02/psxtmrwlock02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmrwlock03/init.c b/testsuites/psxtmtests/psxtmrwlock03/init.c
index 100e7d0394..6cd239acac 100644
--- a/testsuites/psxtmtests/psxtmrwlock03/init.c
+++ b/testsuites/psxtmtests/psxtmrwlock03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmrwlock03/psxtmrwlock03.doc b/testsuites/psxtmtests/psxtmrwlock03/psxtmrwlock03.doc
index 7941646a43..9dab57a0dc 100644
--- a/testsuites/psxtmtests/psxtmrwlock03/psxtmrwlock03.doc
+++ b/testsuites/psxtmtests/psxtmrwlock03/psxtmrwlock03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmrwlock04/init.c b/testsuites/psxtmtests/psxtmrwlock04/init.c
index c0c795e0b0..6200306cbf 100644
--- a/testsuites/psxtmtests/psxtmrwlock04/init.c
+++ b/testsuites/psxtmtests/psxtmrwlock04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmrwlock04/psxtmrwlock04.doc b/testsuites/psxtmtests/psxtmrwlock04/psxtmrwlock04.doc
index a398ca44ca..c3c12baf0b 100644
--- a/testsuites/psxtmtests/psxtmrwlock04/psxtmrwlock04.doc
+++ b/testsuites/psxtmtests/psxtmrwlock04/psxtmrwlock04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmrwlock05/init.c b/testsuites/psxtmtests/psxtmrwlock05/init.c
index 49eccd6d68..1bd440fcbf 100644
--- a/testsuites/psxtmtests/psxtmrwlock05/init.c
+++ b/testsuites/psxtmtests/psxtmrwlock05/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmrwlock05/psxtmrwlock05.doc b/testsuites/psxtmtests/psxtmrwlock05/psxtmrwlock05.doc
index b1a467fc80..b910db70de 100644
--- a/testsuites/psxtmtests/psxtmrwlock05/psxtmrwlock05.doc
+++ b/testsuites/psxtmtests/psxtmrwlock05/psxtmrwlock05.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmrwlock06/init.c b/testsuites/psxtmtests/psxtmrwlock06/init.c
index 67fb69272d..0dcdc0e5d0 100644
--- a/testsuites/psxtmtests/psxtmrwlock06/init.c
+++ b/testsuites/psxtmtests/psxtmrwlock06/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmrwlock06/psxtmrwlock06.doc b/testsuites/psxtmtests/psxtmrwlock06/psxtmrwlock06.doc
index 8984eafc85..04cb933558 100644
--- a/testsuites/psxtmtests/psxtmrwlock06/psxtmrwlock06.doc
+++ b/testsuites/psxtmtests/psxtmrwlock06/psxtmrwlock06.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmrwlock07/init.c b/testsuites/psxtmtests/psxtmrwlock07/init.c
index 836c4eb84b..f2f28bfde4 100644
--- a/testsuites/psxtmtests/psxtmrwlock07/init.c
+++ b/testsuites/psxtmtests/psxtmrwlock07/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmrwlock07/psxtmrwlock07.doc b/testsuites/psxtmtests/psxtmrwlock07/psxtmrwlock07.doc
index 3b643cf408..c373a4ac78 100644
--- a/testsuites/psxtmtests/psxtmrwlock07/psxtmrwlock07.doc
+++ b/testsuites/psxtmtests/psxtmrwlock07/psxtmrwlock07.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmsem01/init.c b/testsuites/psxtmtests/psxtmsem01/init.c
index 4409b89b81..e20fa73a7f 100644
--- a/testsuites/psxtmtests/psxtmsem01/init.c
+++ b/testsuites/psxtmtests/psxtmsem01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc b/testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc
index ceb7691bc7..1912f114e5 100644
--- a/testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc
+++ b/testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmsem02/init.c b/testsuites/psxtmtests/psxtmsem02/init.c
index 4f1f4026d9..ab9b440ff2 100644
--- a/testsuites/psxtmtests/psxtmsem02/init.c
+++ b/testsuites/psxtmtests/psxtmsem02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc b/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc
index bec8910adc..fa894f9b80 100644
--- a/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc
+++ b/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmsem03/init.c b/testsuites/psxtmtests/psxtmsem03/init.c
index 69ac86d070..51f8b12363 100644
--- a/testsuites/psxtmtests/psxtmsem03/init.c
+++ b/testsuites/psxtmtests/psxtmsem03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/psxtmtests/psxtmsem03/psxtmsem03.doc b/testsuites/psxtmtests/psxtmsem03/psxtmsem03.doc
index 7b27c269b4..320cbed3ad 100644
--- a/testsuites/psxtmtests/psxtmsem03/psxtmsem03.doc
+++ b/testsuites/psxtmtests/psxtmsem03/psxtmsem03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmsem04/init.c b/testsuites/psxtmtests/psxtmsem04/init.c
index 7d490c7bb5..68cee9e119 100644
--- a/testsuites/psxtmtests/psxtmsem04/init.c
+++ b/testsuites/psxtmtests/psxtmsem04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmsem04/psxtmsem04.doc b/testsuites/psxtmtests/psxtmsem04/psxtmsem04.doc
index bcab3f3d7a..6ff2eede30 100644
--- a/testsuites/psxtmtests/psxtmsem04/psxtmsem04.doc
+++ b/testsuites/psxtmtests/psxtmsem04/psxtmsem04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmsem05/init.c b/testsuites/psxtmtests/psxtmsem05/init.c
index 9d4a763f32..2bdb447692 100644
--- a/testsuites/psxtmtests/psxtmsem05/init.c
+++ b/testsuites/psxtmtests/psxtmsem05/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmsem05/psxtmsem05.doc b/testsuites/psxtmtests/psxtmsem05/psxtmsem05.doc
index 713d7403e6..7e17512a4d 100644
--- a/testsuites/psxtmtests/psxtmsem05/psxtmsem05.doc
+++ b/testsuites/psxtmtests/psxtmsem05/psxtmsem05.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmsleep01/init.c b/testsuites/psxtmtests/psxtmsleep01/init.c
index 3ce4e58aa6..3d8bd444cf 100644
--- a/testsuites/psxtmtests/psxtmsleep01/init.c
+++ b/testsuites/psxtmtests/psxtmsleep01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmsleep01/psxtmsleep01.doc b/testsuites/psxtmtests/psxtmsleep01/psxtmsleep01.doc
index e650ecf9f1..a4e86ba69d 100644
--- a/testsuites/psxtmtests/psxtmsleep01/psxtmsleep01.doc
+++ b/testsuites/psxtmtests/psxtmsleep01/psxtmsleep01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmsleep02/init.c b/testsuites/psxtmtests/psxtmsleep02/init.c
index ffc87e2070..c474513177 100644
--- a/testsuites/psxtmtests/psxtmsleep02/init.c
+++ b/testsuites/psxtmtests/psxtmsleep02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmsleep02/psxtmsleep02.doc b/testsuites/psxtmtests/psxtmsleep02/psxtmsleep02.doc
index dfd4720006..e9e3a2e477 100644
--- a/testsuites/psxtmtests/psxtmsleep02/psxtmsleep02.doc
+++ b/testsuites/psxtmtests/psxtmsleep02/psxtmsleep02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmthread01/init.c b/testsuites/psxtmtests/psxtmthread01/init.c
index c7c27559dc..189e56509a 100644
--- a/testsuites/psxtmtests/psxtmthread01/init.c
+++ b/testsuites/psxtmtests/psxtmthread01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc b/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc
index a8284e00a2..edc9667008 100644
--- a/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc
+++ b/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmthread02/init.c b/testsuites/psxtmtests/psxtmthread02/init.c
index e7cfd7d724..8f087ddc0f 100644
--- a/testsuites/psxtmtests/psxtmthread02/init.c
+++ b/testsuites/psxtmtests/psxtmthread02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmthread03/init.c b/testsuites/psxtmtests/psxtmthread03/init.c
index ae30e305e6..3747e422a9 100644
--- a/testsuites/psxtmtests/psxtmthread03/init.c
+++ b/testsuites/psxtmtests/psxtmthread03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmthread03/psxtmthread03.doc b/testsuites/psxtmtests/psxtmthread03/psxtmthread03.doc
index 2fde771fff..a2a2eb07dd 100644
--- a/testsuites/psxtmtests/psxtmthread03/psxtmthread03.doc
+++ b/testsuites/psxtmtests/psxtmthread03/psxtmthread03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmthread04/init.c b/testsuites/psxtmtests/psxtmthread04/init.c
index ed8e4bb9b4..cd46f7eda2 100644
--- a/testsuites/psxtmtests/psxtmthread04/init.c
+++ b/testsuites/psxtmtests/psxtmthread04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmthread04/psxtmthread04.doc b/testsuites/psxtmtests/psxtmthread04/psxtmthread04.doc
index ed75cab026..6aaa03b339 100644
--- a/testsuites/psxtmtests/psxtmthread04/psxtmthread04.doc
+++ b/testsuites/psxtmtests/psxtmthread04/psxtmthread04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmthread05/init.c b/testsuites/psxtmtests/psxtmthread05/init.c
index 4203e4b951..50bea75825 100644
--- a/testsuites/psxtmtests/psxtmthread05/init.c
+++ b/testsuites/psxtmtests/psxtmthread05/init.c
@@ -1,11 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
- * COPYRIGHT (c) 2013.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/psxtmtests/psxtmthread05/psxtmthread05.doc b/testsuites/psxtmtests/psxtmthread05/psxtmthread05.doc
index d635f1d80b..34554df1d3 100644
--- a/testsuites/psxtmtests/psxtmthread05/psxtmthread05.doc
+++ b/testsuites/psxtmtests/psxtmthread05/psxtmthread05.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/psxtmtests/psxtmthread06/init.c b/testsuites/psxtmtests/psxtmthread06/init.c
index 7499d98df1..4b1b345cac 100644
--- a/testsuites/psxtmtests/psxtmthread06/init.c
+++ b/testsuites/psxtmtests/psxtmthread06/init.c
@@ -1,8 +1,7 @@
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
- * COPYRIGHT (c) 2013.
- * Chirayu Desai (chirayudesai1@gmail.com).
+ * COPYRIGHT (c) 2013 Chirayu Desai (chirayudesai1@gmail.com).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/rhealstone/rhdeadlockbrk/deadlockbrk.c b/testsuites/rhealstone/rhdeadlockbrk/deadlockbrk.c
index 3538003a4a..8154c93338 100644
--- a/testsuites/rhealstone/rhdeadlockbrk/deadlockbrk.c
+++ b/testsuites/rhealstone/rhdeadlockbrk/deadlockbrk.c
@@ -206,7 +206,6 @@ rtems_task Task03( rtems_task_argument ignored )
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
#define CONFIGURE_MAXIMUM_TASKS 4
diff --git a/testsuites/rhealstone/rhilatency/ilatency.c b/testsuites/rhealstone/rhilatency/ilatency.c
index f4a450795f..8985453619 100644
--- a/testsuites/rhealstone/rhilatency/ilatency.c
+++ b/testsuites/rhealstone/rhilatency/ilatency.c
@@ -22,7 +22,6 @@
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 2
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_SCHEDULER_PRIORITY
@@ -45,10 +44,6 @@ uint32_t Interrupt_nest;
uint32_t timer_overhead;
uint32_t Interrupt_enter_time;
-rtems_isr Isr_handler(
- rtems_vector_number vector
-);
-
rtems_task Init(
rtems_task_argument argument
)
@@ -91,6 +86,19 @@ rtems_task Init(
rtems_task_exit();
}
+#ifdef TM27_USE_VECTOR_HANDLER
+static rtems_isr Isr_handler( rtems_vector_number arg )
+#else
+static void Isr_handler( void *arg )
+#endif
+{
+ (void) arg;
+
+ /* See how long it took system to recognize interrupt */
+ Interrupt_enter_time = benchmark_timer_read();
+ Clear_tm27_intr();
+}
+
rtems_task Task_1(
rtems_task_argument argument
)
@@ -114,12 +122,3 @@ rtems_task Task_1(
TEST_END();
rtems_test_exit( 0 );
}
-
-rtems_isr Isr_handler(
- rtems_vector_number vector
-)
-{
- /* See how long it took system to recognize interrupt */
- Interrupt_enter_time = benchmark_timer_read();
- Clear_tm27_intr();
-}
diff --git a/testsuites/rhealstone/rhmlatency/mlatency.c b/testsuites/rhealstone/rhmlatency/mlatency.c
index a61e1917e5..76b1113644 100644
--- a/testsuites/rhealstone/rhmlatency/mlatency.c
+++ b/testsuites/rhealstone/rhmlatency/mlatency.c
@@ -151,7 +151,6 @@ rtems_task Task02( rtems_task_argument ignored )
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(1, MESSAGE_SIZE)
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
diff --git a/testsuites/rhealstone/rhtaskpreempt/taskpreempt.c b/testsuites/rhealstone/rhtaskpreempt/taskpreempt.c
index c5d2b6c809..00534b094d 100644
--- a/testsuites/rhealstone/rhtaskpreempt/taskpreempt.c
+++ b/testsuites/rhealstone/rhtaskpreempt/taskpreempt.c
@@ -113,7 +113,6 @@ rtems_task Init( rtems_task_argument ignored )
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_MAXIMUM_TASKS 3
#define CONFIGURE_INIT
diff --git a/testsuites/rhealstone/rhtaskswitch/taskswitch.c b/testsuites/rhealstone/rhtaskswitch/taskswitch.c
index a2cef9fe32..3bcf1ec354 100644
--- a/testsuites/rhealstone/rhtaskswitch/taskswitch.c
+++ b/testsuites/rhealstone/rhtaskswitch/taskswitch.c
@@ -115,7 +115,6 @@ rtems_task Init( rtems_task_argument ignored )
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_MAXIMUM_TASKS 3
#define CONFIGURE_INIT
diff --git a/testsuites/samples/base_mp/apptask.c b/testsuites/samples/base_mp/apptask.c
index e54e08afe8..154748b05b 100644
--- a/testsuites/samples/base_mp/apptask.c
+++ b/testsuites/samples/base_mp/apptask.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1999, 2016.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -32,7 +51,7 @@ rtems_task Application_task(
rtems_id tid;
rtems_status_code status;
- rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
(void) status;
printf( "This task was invoked with the node argument (%" PRIdrtems_task_argument ")\n", node );
printf( "This task has the id of 0x%" PRIxrtems_id "\n", tid );
diff --git a/testsuites/samples/base_mp/base_mp-node1.doc b/testsuites/samples/base_mp/base_mp-node1.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/samples/base_mp/base_mp-node1.doc
+++ b/testsuites/samples/base_mp/base_mp-node1.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/samples/base_mp/base_mp-node2.doc b/testsuites/samples/base_mp/base_mp-node2.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/samples/base_mp/base_mp-node2.doc
+++ b/testsuites/samples/base_mp/base_mp-node2.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/samples/base_mp/init1.c b/testsuites/samples/base_mp/init1.c
index cfe033db60..ee853b4319 100644
--- a/testsuites/samples/base_mp/init1.c
+++ b/testsuites/samples/base_mp/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup samples
+ *
+ * @brief This is init1 for base_mp.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 1
#include "initimpl.h"
diff --git a/testsuites/samples/base_mp/init2.c b/testsuites/samples/base_mp/init2.c
index 40c2c81592..e1cff622a6 100644
--- a/testsuites/samples/base_mp/init2.c
+++ b/testsuites/samples/base_mp/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup samples
+ *
+ * @brief This is init2 for base_mp.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define CONFIGURE_MP_NODE_NUMBER 2
#include "initimpl.h"
diff --git a/testsuites/samples/base_mp/initimpl.h b/testsuites/samples/base_mp/initimpl.h
index f2bd12d0fc..93ac5fa0d0 100644
--- a/testsuites/samples/base_mp/initimpl.h
+++ b/testsuites/samples/base_mp/initimpl.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/base_mp/system.h b/testsuites/samples/base_mp/system.h
index 97c76f5e24..d4c163aa94 100644
--- a/testsuites/samples/base_mp/system.h
+++ b/testsuites/samples/base_mp/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/samples/base_sp/apptask.c b/testsuites/samples/base_sp/apptask.c
index f450f71467..940a05dc93 100644
--- a/testsuites/samples/base_sp/apptask.c
+++ b/testsuites/samples/base_sp/apptask.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Application_task
*
* This routine is as an example of an application task which
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -34,7 +53,7 @@ rtems_task Application_task(
rtems_status_code status;
unsigned int a = (unsigned int) argument;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "ident" );
printf(
diff --git a/testsuites/samples/base_sp/base_sp.doc b/testsuites/samples/base_sp/base_sp.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/samples/base_sp/base_sp.doc
+++ b/testsuites/samples/base_sp/base_sp.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/samples/base_sp/init.c b/testsuites/samples/base_sp/init.c
index 071913a390..ad8b1c41b8 100644
--- a/testsuites/samples/base_sp/init.c
+++ b/testsuites/samples/base_sp/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/base_sp/system.h b/testsuites/samples/base_sp/system.h
index 0b49edb465..2a88767323 100644
--- a/testsuites/samples/base_sp/system.h
+++ b/testsuites/samples/base_sp/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/samples/capture/capture.doc b/testsuites/samples/capture/capture.doc
index bb8f4f321b..05b5d0478f 100644
--- a/testsuites/samples/capture/capture.doc
+++ b/testsuites/samples/capture/capture.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
Capture Engine Tutorial
diff --git a/testsuites/samples/capture/init.c b/testsuites/samples/capture/init.c
index 2bf395fdad..78b1082b7f 100644
--- a/testsuites/samples/capture/init.c
+++ b/testsuites/samples/capture/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define CONFIGURE_INIT
diff --git a/testsuites/samples/capture/system.h b/testsuites/samples/capture/system.h
index 7f915dc830..181235d0df 100644
--- a/testsuites/samples/capture/system.h
+++ b/testsuites/samples/capture/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/samples/capture/test1.c b/testsuites/samples/capture/test1.c
index 2f4193adb2..9a538e27fe 100644
--- a/testsuites/samples/capture/test1.c
+++ b/testsuites/samples/capture/test1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test1
*
* This test uses creates a number of tasks so the capture engine
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/cdtest/init.c b/testsuites/samples/cdtest/init.c
index 1cf2b20f77..77b5878b79 100644
--- a/testsuites/samples/cdtest/init.c
+++ b/testsuites/samples/cdtest/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/cdtest/main.cc b/testsuites/samples/cdtest/main.cc
index 894e404ba1..1c5057a32b 100644
--- a/testsuites/samples/cdtest/main.cc
+++ b/testsuites/samples/cdtest/main.cc
@@ -25,9 +25,11 @@
#include <rtems.h>
#include <rtems/bspIo.h>
#include <rtems/test-info.h>
+#include <rtems/sysinit.h>
#include <cstdio>
#include <cstdlib>
+#include <cstring>
#include <stdexcept>
#ifdef RTEMS_TEST_IO_STREAM
@@ -44,13 +46,6 @@ extern rtems_task main_task(rtems_task_argument);
static int num_inst = 0;
-static void check_begin_of_test(void)
-{
- if ( num_inst == 0 ) {
- TEST_BEGIN();
- }
-}
-
static void check_end_of_test(void)
{
if ( num_inst == 0 ) {
@@ -62,7 +57,6 @@ class AClass {
public:
AClass(const char *p = "LOCAL" ) : ptr( p )
{
- check_begin_of_test();
num_inst++;
printf(
"%s: Hey I'm in base class constructor number %d for %p.\n",
@@ -104,7 +98,6 @@ class BClass : public AClass {
public:
BClass(const char *p = "LOCAL" ) : AClass( p )
{
- check_begin_of_test();
num_inst++;
printf(
"%s: Hey I'm in derived class constructor number %d for %p.\n",
@@ -244,3 +237,50 @@ rtems_task main_task(
printf( "Global Dtors should be called after this line....\n" );
exit(0);
}
+
+/*
+ * Exceptions during system initialization work only on targets which do not
+ * need a registration of exception frames during the global construction. In
+ * particular, targets which use the DWARF2 unwinder cannot use exceptions
+ * during system initialization.
+ */
+#if defined(__arm__)
+#define CAN_DO_EXCEPTIONS_DURING_SYSINIT
+#endif
+
+#ifdef CAN_DO_EXCEPTIONS_DURING_SYSINIT
+static void early_exception()
+{
+ try
+ {
+ throw "early exception";
+ }
+ catch( const char *e )
+ {
+ rtems_test_assert(strcmp(e, "early exception") == 0);
+ throw "early exception 2";
+ }
+}
+#endif
+
+static void test_exceptions_during_system_init()
+{
+ TEST_BEGIN();
+
+#ifdef CAN_DO_EXCEPTIONS_DURING_SYSINIT
+ try
+ {
+ early_exception();
+ }
+ catch( const char *e )
+ {
+ rtems_test_assert(strcmp(e, "early exception 2") == 0);
+ }
+#endif
+}
+
+RTEMS_SYSINIT_ITEM(
+ test_exceptions_during_system_init,
+ RTEMS_SYSINIT_IDLE_THREADS,
+ RTEMS_SYSINIT_ORDER_LAST
+);
diff --git a/testsuites/samples/cdtest/system.h b/testsuites/samples/cdtest/system.h
index 7d14747a32..748e2ef1bc 100644
--- a/testsuites/samples/cdtest/system.h
+++ b/testsuites/samples/cdtest/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/samples/fileio/fileio.doc b/testsuites/samples/fileio/fileio.doc
index 0a436014f6..a8f84966d6 100644
--- a/testsuites/samples/fileio/fileio.doc
+++ b/testsuites/samples/fileio/fileio.doc
@@ -1,12 +1,31 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
#
# fileio.doc,v
#
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This sample implements some basic tests for the file systems
diff --git a/testsuites/samples/fileio/init.c b/testsuites/samples/fileio/init.c
index c552d33613..084d54d81a 100644
--- a/testsuites/samples/fileio/init.c
+++ b/testsuites/samples/fileio/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/fileio/system.h b/testsuites/samples/fileio/system.h
index 54e2441184..711facf94e 100644
--- a/testsuites/samples/fileio/system.h
+++ b/testsuites/samples/fileio/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/samples/hello/hello.doc b/testsuites/samples/hello/hello.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/samples/hello/hello.doc
+++ b/testsuites/samples/hello/hello.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c
index 34ded37c55..83f6342ab3 100644
--- a/testsuites/samples/hello/init.c
+++ b/testsuites/samples/hello/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/iostream/init.cc b/testsuites/samples/iostream/init.cc
index d80d4df9eb..ddd38a9d15 100644
--- a/testsuites/samples/iostream/init.cc
+++ b/testsuites/samples/iostream/init.cc
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -13,9 +15,26 @@
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define CONFIGURE_INIT
@@ -25,16 +44,17 @@
#include <stdlib.h>
+#include <tmacros.h>
+
const char rtems_test_name[] = "IOSTREAM";
rtems_task Init(
rtems_task_argument ignored
)
{
- std::cout << std::endl << std::endl
- << "*** BEGIN OF TEST " << rtems_test_name << " ***" << std::endl;
+ TEST_BEGIN();
std::cout << "Hello World" << std::endl;
- std::cout << "*** END OF TEST " << rtems_test_name << " ***" << std::endl;
- exit( 0 );
+ TEST_END();
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/samples/iostream/iostream.doc b/testsuites/samples/iostream/iostream.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/samples/iostream/iostream.doc
+++ b/testsuites/samples/iostream/iostream.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/samples/iostream/system.h b/testsuites/samples/iostream/system.h
index 696cb8df34..63d27f9996 100644
--- a/testsuites/samples/iostream/system.h
+++ b/testsuites/samples/iostream/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/samples/minimum/init.c b/testsuites/samples/minimum/init.c
index a63e7783da..ee14a1aef4 100644
--- a/testsuites/samples/minimum/init.c
+++ b/testsuites/samples/minimum/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -62,7 +81,12 @@ static void *Init( uintptr_t ignored )
* demonstrates that the user can specify how small of a minimum
* stack they want.
*/
+#ifdef RTEMS_GCOV_COVERAGE
+#define CONFIGURE_MINIMUM_TASK_STACK_SIZE \
+ (CPU_STACK_MINIMUM_SIZE - CPU_STACK_ALIGNMENT)
+#else
#define CONFIGURE_MINIMUM_TASK_STACK_SIZE 512
+#endif
/*
* Keep the interrupt/initialization stack as is. Otherwise, the test may fail
@@ -81,21 +105,6 @@ static void *Init( uintptr_t ignored )
#define CONFIGURE_MAXIMUM_PRIORITY 15
/*
- * This configures RTEMS to use a single memory pool for the RTEMS Workspace
- * and C Program Heap. If not defined, there will be separate memory pools
- * for the RTEMS Workspace and C Program Heap. Having separate pools
- * does haved some advantages in the event a task blows a stack or writes
- * outside its memory area. However, in low memory systems the overhead of
- * the two pools plus the potential for unused memory in either pool is
- * very undesirable.
- *
- * In high memory environments, this is desirable when you want to use
- * the RTEMS "unlimited" objects option. You will be able to create objects
- * until you run out of memory.
- */
-#define CONFIGURE_UNIFIED_WORK_AREAS
-
-/*
* In this application, the initialization task performs the system
* initialization and then transforms itself into the idle task.
*/
diff --git a/testsuites/samples/minimum/minimum.doc b/testsuites/samples/minimum/minimum.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/samples/minimum/minimum.doc
+++ b/testsuites/samples/minimum/minimum.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/samples/nsecs/empty.c b/testsuites/samples/nsecs/empty.c
index e426455bca..ba41878347 100644
--- a/testsuites/samples/nsecs/empty.c
+++ b/testsuites/samples/nsecs/empty.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/nsecs/init.c b/testsuites/samples/nsecs/init.c
index 59995f1da8..6f63cbd51f 100644
--- a/testsuites/samples/nsecs/init.c
+++ b/testsuites/samples/nsecs/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/nsecs/nsecs.doc b/testsuites/samples/nsecs/nsecs.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/samples/nsecs/nsecs.doc
+++ b/testsuites/samples/nsecs/nsecs.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/samples/nsecs/system.h b/testsuites/samples/nsecs/system.h
index 31c17a4073..b2d31e160c 100644
--- a/testsuites/samples/nsecs/system.h
+++ b/testsuites/samples/nsecs/system.h
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup samples
+ *
+ * @brief This is the system header file for nsecs.
+ */
+
+/*
+ * Copyright (C) 1989-2007 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#ifndef SYSTEM_H
#define SYSTEM_H
diff --git a/testsuites/samples/paranoia/init.c b/testsuites/samples/paranoia/init.c
index f2420baaf6..b40ad9e0bc 100644
--- a/testsuites/samples/paranoia/init.c
+++ b/testsuites/samples/paranoia/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/paranoia/paranoia.doc b/testsuites/samples/paranoia/paranoia.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/samples/paranoia/paranoia.doc
+++ b/testsuites/samples/paranoia/paranoia.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/samples/paranoia/system.h b/testsuites/samples/paranoia/system.h
index 740c8ec5b9..7915a78c44 100644
--- a/testsuites/samples/paranoia/system.h
+++ b/testsuites/samples/paranoia/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/samples/ticker/init.c b/testsuites/samples/ticker/init.c
index 5bd5568c18..86f87ad736 100644
--- a/testsuites/samples/ticker/init.c
+++ b/testsuites/samples/ticker/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/ticker/system.h b/testsuites/samples/ticker/system.h
index 4ac3f59f16..9495f45547 100644
--- a/testsuites/samples/ticker/system.h
+++ b/testsuites/samples/ticker/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/samples/ticker/tasks.c b/testsuites/samples/ticker/tasks.c
index 12e806884d..26fe228646 100644
--- a/testsuites/samples/ticker/tasks.c
+++ b/testsuites/samples/ticker/tasks.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test_task
*
* This routine serves as a test task. It verifies the basic task
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -30,7 +49,7 @@ rtems_task Test_task(
uint32_t task_index;
rtems_status_code status;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "task ident" );
task_index = task_number( tid );
diff --git a/testsuites/samples/ticker/ticker.doc b/testsuites/samples/ticker/ticker.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/samples/ticker/ticker.doc
+++ b/testsuites/samples/ticker/ticker.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/samples/unlimited/init.c b/testsuites/samples/unlimited/init.c
index 77f4dedd3a..c80ec87786 100644
--- a/testsuites/samples/unlimited/init.c
+++ b/testsuites/samples/unlimited/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/unlimited/system.h b/testsuites/samples/unlimited/system.h
index 4138b658fe..daf80975a7 100644
--- a/testsuites/samples/unlimited/system.h
+++ b/testsuites/samples/unlimited/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/samples/unlimited/test1.c b/testsuites/samples/unlimited/test1.c
index 3fe2688681..5c5e427761 100644
--- a/testsuites/samples/unlimited/test1.c
+++ b/testsuites/samples/unlimited/test1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Test1
*
* This test uses a hack to disable suto-extend then checks to see only the
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/unlimited/test2.c b/testsuites/samples/unlimited/test2.c
index 411a401c4e..72546c4f91 100644
--- a/testsuites/samples/unlimited/test2.c
+++ b/testsuites/samples/unlimited/test2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -13,9 +15,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/unlimited/test3.c b/testsuites/samples/unlimited/test3.c
index 6330f3c445..c67bdb9351 100644
--- a/testsuites/samples/unlimited/test3.c
+++ b/testsuites/samples/unlimited/test3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -13,9 +15,26 @@
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/samples/unlimited/unlimited.doc b/testsuites/samples/unlimited/unlimited.doc
index efab1de603..87dbb2e689 100644
--- a/testsuites/samples/unlimited/unlimited.doc
+++ b/testsuites/samples/unlimited/unlimited.doc
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1997.
# On-Line Applications Research Corporation (OAR).
#
diff --git a/testsuites/smptests/smp01/init.c b/testsuites/smptests/smp01/init.c
index cbfd205010..a0f75d51c0 100644
--- a/testsuites/smptests/smp01/init.c
+++ b/testsuites/smptests/smp01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smp01/smp01.doc b/testsuites/smptests/smp01/smp01.doc
index e3bed542d7..4cfb25e2fa 100644
--- a/testsuites/smptests/smp01/smp01.doc
+++ b/testsuites/smptests/smp01/smp01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This is a simple test that verifies that each of the smp
diff --git a/testsuites/smptests/smp01/system.h b/testsuites/smptests/smp01/system.h
index c1019b6858..d4675589d0 100644
--- a/testsuites/smptests/smp01/system.h
+++ b/testsuites/smptests/smp01/system.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "tmacros.h"
diff --git a/testsuites/smptests/smp01/tasks.c b/testsuites/smptests/smp01/tasks.c
index ae75b718dc..a0d01cd22e 100644
--- a/testsuites/smptests/smp01/tasks.c
+++ b/testsuites/smptests/smp01/tasks.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smp02/init.c b/testsuites/smptests/smp02/init.c
index f7ce857ee3..cfbea04ec7 100644
--- a/testsuites/smptests/smp02/init.c
+++ b/testsuites/smptests/smp02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smp02/smp02.doc b/testsuites/smptests/smp02/smp02.doc
index ba916d32dc..a197328dc2 100644
--- a/testsuites/smptests/smp02/smp02.doc
+++ b/testsuites/smptests/smp02/smp02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test creates tasks for each process (other than the
one that Init is running on). Then drops into a loop waiting
diff --git a/testsuites/smptests/smp02/system.h b/testsuites/smptests/smp02/system.h
index da69df9568..f010ad4e51 100644
--- a/testsuites/smptests/smp02/system.h
+++ b/testsuites/smptests/smp02/system.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "tmacros.h"
diff --git a/testsuites/smptests/smp02/tasks.c b/testsuites/smptests/smp02/tasks.c
index ff82d58826..85e4187465 100644
--- a/testsuites/smptests/smp02/tasks.c
+++ b/testsuites/smptests/smp02/tasks.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smp03/init.c b/testsuites/smptests/smp03/init.c
index 9f5171128c..64968604f9 100644
--- a/testsuites/smptests/smp03/init.c
+++ b/testsuites/smptests/smp03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smp03/smp03.doc b/testsuites/smptests/smp03/smp03.doc
index b7c3bb2853..c032ca6c60 100644
--- a/testsuites/smptests/smp03/smp03.doc
+++ b/testsuites/smptests/smp03/smp03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test runs the init task on the first CPU at a priority
of 5. The Init task creates tasks for each remaining processor
diff --git a/testsuites/smptests/smp03/system.h b/testsuites/smptests/smp03/system.h
index a5bcd06b64..e4d81cd6e7 100644
--- a/testsuites/smptests/smp03/system.h
+++ b/testsuites/smptests/smp03/system.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "tmacros.h"
diff --git a/testsuites/smptests/smp03/tasks.c b/testsuites/smptests/smp03/tasks.c
index 8d5ac4af94..0852339279 100644
--- a/testsuites/smptests/smp03/tasks.c
+++ b/testsuites/smptests/smp03/tasks.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smp05/init.c b/testsuites/smptests/smp05/init.c
index 75033ff5ae..eb6461f3bc 100644
--- a/testsuites/smptests/smp05/init.c
+++ b/testsuites/smptests/smp05/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -16,6 +35,8 @@
const char rtems_test_name[] = "SMP 5";
+static volatile bool init_task_done;
+
rtems_task Init(
rtems_task_argument argument
);
@@ -35,6 +56,10 @@ rtems_task Test_task(
rtems_task_argument argument
)
{
+ while (!init_task_done) {
+ /* Wait */
+ }
+
locked_printf( "Shut down from CPU %" PRIu32 "\n", rtems_scheduler_get_processor() );
success();
}
@@ -76,6 +101,8 @@ rtems_task Init(
directive_failed( status, "task start" );
}
+ init_task_done = true;
+
while (1)
;
}
diff --git a/testsuites/smptests/smp05/smp05.doc b/testsuites/smptests/smp05/smp05.doc
index 8132fa18d7..10e57b05b3 100644
--- a/testsuites/smptests/smp05/smp05.doc
+++ b/testsuites/smptests/smp05/smp05.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/smptests/smp07/init.c b/testsuites/smptests/smp07/init.c
index c53642054c..7066720a47 100644
--- a/testsuites/smptests/smp07/init.c
+++ b/testsuites/smptests/smp07/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -59,8 +78,6 @@ rtems_task Test_task(
if ( !TSRFired )
locked_printf( "*** ERROR TSR DID NOT FIRE BUT TEST TASK AWAKE***" );
- TaskRan = true;
-
/* Print that the task is up and running. */
locked_printf(
" CPU %" PRIu32 " running Task %s after semaphore release\n",
@@ -68,6 +85,8 @@ rtems_task Test_task(
name
);
+ TaskRan = true;
+
rtems_task_exit();
}
diff --git a/testsuites/smptests/smp07/smp07.doc b/testsuites/smptests/smp07/smp07.doc
index 1132584f10..c9d021fa83 100644
--- a/testsuites/smptests/smp07/smp07.doc
+++ b/testsuites/smptests/smp07/smp07.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/smptests/smp08/init.c b/testsuites/smptests/smp08/init.c
index 5c27a6a084..b165ad9e36 100644
--- a/testsuites/smptests/smp08/init.c
+++ b/testsuites/smptests/smp08/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smp08/smp08.doc b/testsuites/smptests/smp08/smp08.doc
index a2feb9c45d..513dbc6036 100644
--- a/testsuites/smptests/smp08/smp08.doc
+++ b/testsuites/smptests/smp08/smp08.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/smptests/smp08/system.h b/testsuites/smptests/smp08/system.h
index b0a8edfc87..22cbf620d2 100644
--- a/testsuites/smptests/smp08/system.h
+++ b/testsuites/smptests/smp08/system.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "tmacros.h"
diff --git a/testsuites/smptests/smp08/tasks.c b/testsuites/smptests/smp08/tasks.c
index 40a097d034..446c0d11da 100644
--- a/testsuites/smptests/smp08/tasks.c
+++ b/testsuites/smptests/smp08/tasks.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -28,15 +47,19 @@ rtems_task Test_task(
p = rtems_object_get_name( RTEMS_SELF, 5, name );
rtems_test_assert( p != NULL );
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
rtems_test_assert( status == RTEMS_SUCCESSFUL );
task_index = task_number( tid );
for ( ; ; ) {
status = rtems_clock_get_tod( &time );
rtems_test_assert( status == RTEMS_SUCCESSFUL );
if ( time.second >= 35 ) {
- TEST_END();
- rtems_test_exit( 0 );
+ if ( task_index == 1 ) {
+ TEST_END();
+ rtems_test_exit( 0 );
+ } else {
+ rtems_task_exit();
+ }
}
PrintTaskInfo( p, &time );
diff --git a/testsuites/smptests/smp09/init.c b/testsuites/smptests/smp09/init.c
index ce8334bcd4..b469258778 100644
--- a/testsuites/smptests/smp09/init.c
+++ b/testsuites/smptests/smp09/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smp09/smp09.doc b/testsuites/smptests/smp09/smp09.doc
index 8836c94bc6..283234c858 100644
--- a/testsuites/smptests/smp09/smp09.doc
+++ b/testsuites/smptests/smp09/smp09.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/smptests/smpaffinity01/init.c b/testsuites/smptests/smpaffinity01/init.c
index 9ec687d816..1504388d29 100644
--- a/testsuites/smptests/smpaffinity01/init.c
+++ b/testsuites/smptests/smpaffinity01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -213,7 +232,7 @@ static void Init(rtems_task_argument arg)
TEST_BEGIN();
/* Initialize thread id */
- sc = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &Init_id );
+ sc = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &Init_id );
directive_failed( sc, "Identify Init Task" );
Validate_setaffinity_errors();
diff --git a/testsuites/smptests/smpaffinity01/smpaffinity01.doc b/testsuites/smptests/smpaffinity01/smpaffinity01.doc
index fe6225ba62..c1f1c8518c 100644
--- a/testsuites/smptests/smpaffinity01/smpaffinity01.doc
+++ b/testsuites/smptests/smpaffinity01/smpaffinity01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/smptests/smpatomic01/init.c b/testsuites/smptests/smpatomic01/init.c
index ba2ec7baba..a10c3d5990 100644
--- a/testsuites/smptests/smpatomic01/init.c
+++ b/testsuites/smptests/smpatomic01/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2013, 2016 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (C) 2013, 2016 embedded brains GmbH & Co. KG
*
* Copyright (c) 2013 Deng Hengyi.
*
diff --git a/testsuites/smptests/smpcache01/init.c b/testsuites/smptests/smpcache01/init.c
index d3145d1de3..148a0fd9b7 100644
--- a/testsuites/smptests/smpcache01/init.c
+++ b/testsuites/smptests/smpcache01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 Aeroflex Gaisler AB. All rights reserved.
- * Copyright (c) 2017 embedded brains GmbH.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpcapture01/init.c b/testsuites/smptests/smpcapture01/init.c
index 74e538559b..7e98dc49ab 100644
--- a/testsuites/smptests/smpcapture01/init.c
+++ b/testsuites/smptests/smpcapture01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/*
diff --git a/testsuites/smptests/smpcapture02/init.c b/testsuites/smptests/smpcapture02/init.c
index 4b11e6bbd7..e15945cb91 100644
--- a/testsuites/smptests/smpcapture02/init.c
+++ b/testsuites/smptests/smpcapture02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2015
* Cobham Gaisler
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/*
diff --git a/testsuites/smptests/smpclock01/init.c b/testsuites/smptests/smpclock01/init.c
index 6d3ddb94c1..ffecf0ddaa 100644
--- a/testsuites/smptests/smpclock01/init.c
+++ b/testsuites/smptests/smpclock01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpfatal01/init.c b/testsuites/smptests/smpfatal01/init.c
index 4b01763a92..21673521b9 100644
--- a/testsuites/smptests/smpfatal01/init.c
+++ b/testsuites/smptests/smpfatal01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpfatal02/init.c b/testsuites/smptests/smpfatal02/init.c
index 5528a4315d..19299a730f 100644
--- a/testsuites/smptests/smpfatal02/init.c
+++ b/testsuites/smptests/smpfatal02/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpfatal03/init.c b/testsuites/smptests/smpfatal03/init.c
index 7eb681b9f9..ff42bd8b38 100644
--- a/testsuites/smptests/smpfatal03/init.c
+++ b/testsuites/smptests/smpfatal03/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2016 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2016 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/smptests/smpfatal04/init.c b/testsuites/smptests/smpfatal04/init.c
index 92a2d84881..7674fde288 100644
--- a/testsuites/smptests/smpfatal04/init.c
+++ b/testsuites/smptests/smpfatal04/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpfatal05/init.c b/testsuites/smptests/smpfatal05/init.c
index 511ce28209..ad9e32240f 100644
--- a/testsuites/smptests/smpfatal05/init.c
+++ b/testsuites/smptests/smpfatal05/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpfatal06/init.c b/testsuites/smptests/smpfatal06/init.c
index d18a31b858..b48664f253 100644
--- a/testsuites/smptests/smpfatal06/init.c
+++ b/testsuites/smptests/smpfatal06/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpfatal08/init.c b/testsuites/smptests/smpfatal08/init.c
index 0964a6047c..6ad59f204b 100644
--- a/testsuites/smptests/smpfatal08/init.c
+++ b/testsuites/smptests/smpfatal08/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpfatal09/init.c b/testsuites/smptests/smpfatal09/init.c
index dfdd11d84c..6caca32c82 100644
--- a/testsuites/smptests/smpfatal09/init.c
+++ b/testsuites/smptests/smpfatal09/init.c
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (C) 2018 embedded brains GmbH
+ * Copyright (C) 2018 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/smptests/smpipi01/init.c b/testsuites/smptests/smpipi01/init.c
index 5f992f8de1..f8172fed96 100644
--- a/testsuites/smptests/smpipi01/init.c
+++ b/testsuites/smptests/smpipi01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2019 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2019 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -185,6 +198,43 @@ static const Per_CPU_Job_context counter_1_job_context = {
.arg = &test_instance
};
+static void sync_handler(void *arg)
+{
+ test_context *ctx = arg;
+ SMP_barrier_State *bs = &ctx->worker_barrier_state;
+
+ /* (E) */
+ barrier(ctx, bs);
+}
+
+static const Per_CPU_Job_context sync_context = {
+ .handler = sync_handler,
+ .arg = &test_instance
+};
+
+static void wait_for_ipi_done(test_context *ctx, Per_CPU_Control *cpu)
+{
+ Per_CPU_Job job;
+ unsigned long done;
+
+ job.context = &sync_context;
+ _Per_CPU_Submit_job(cpu, &job);
+
+ while (cpu->isr_nest_level == 0) {
+ RTEMS_COMPILER_MEMORY_BARRIER();
+ }
+
+ /* (E) */
+ barrier(ctx, &ctx->main_barrier_state);
+
+ while (cpu->isr_nest_level != 0) {
+ RTEMS_COMPILER_MEMORY_BARRIER();
+ }
+
+ done = _Atomic_Load_ulong( &job.done, ATOMIC_ORDER_ACQUIRE );
+ rtems_test_assert( done == PER_CPU_JOB_DONE );
+}
+
static void test_send_message_flood(
test_context *ctx,
uint32_t cpu_count
@@ -198,20 +248,15 @@ static void test_send_message_flood(
ctx->jobs[cpu_index][0].context = &counter_0_job_context;
ctx->jobs[cpu_index][1].context = &counter_1_job_context;
- _Per_CPU_Submit_job(cpu, &ctx->jobs[cpu_index][0]);
+ _Per_CPU_Add_job(cpu, &ctx->jobs[cpu_index][0]);
}
for (cpu_index = 0; cpu_index < cpu_count; ++cpu_index) {
Per_CPU_Control *cpu;
- Per_CPU_Control *cpu_self;
uint32_t i;
cpu = _Per_CPU_Get_by_index(cpu_index);
- cpu_self = _Thread_Dispatch_disable();
- _SMP_Synchronize();
- _Thread_Dispatch_enable(cpu_self);
-
for (i = 0; i < cpu_count; ++i) {
if (i != cpu_index) {
ctx->copy_counters[i] = ctx->counters[i].value;
@@ -222,6 +267,10 @@ static void test_send_message_flood(
_SMP_Send_message(cpu, SMP_MESSAGE_PERFORM_JOBS);
}
+ if (cpu_index != cpu_index_self) {
+ wait_for_ipi_done(ctx, cpu);
+ }
+
for (i = 0; i < cpu_count; ++i) {
if (i != cpu_index) {
rtems_test_assert(ctx->copy_counters[i] == ctx->counters[i].value);
diff --git a/testsuites/smptests/smpirqs01/init.c b/testsuites/smptests/smpirqs01/init.c
index 03238227fd..7404c77418 100644
--- a/testsuites/smptests/smpirqs01/init.c
+++ b/testsuites/smptests/smpirqs01/init.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/smptests/smpload01/init.c b/testsuites/smptests/smpload01/init.c
index 1ca5a80773..5fb26acff9 100644
--- a/testsuites/smptests/smpload01/init.c
+++ b/testsuites/smptests/smpload01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smplock01/init.c b/testsuites/smptests/smplock01/init.c
index 1c33911732..2defa2b5c0 100644
--- a/testsuites/smptests/smplock01/init.c
+++ b/testsuites/smptests/smplock01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2013, 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2013, 2024 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -34,6 +47,8 @@ const char rtems_test_name[] = "SMPLOCK 1";
typedef struct {
rtems_test_parallel_context base;
+ const char *test_sep;
+ const char *counter_sep;
unsigned long counter[TEST_COUNT];
unsigned long local_counter[CPU_COUNT][TEST_COUNT][CPU_COUNT];
SMP_lock_Control lock RTEMS_ALIGNED(CPU_CACHE_LINE_BYTES);
@@ -71,40 +86,69 @@ static rtems_interval test_init(
return test_duration();
}
+static const rtems_test_parallel_job test_jobs[TEST_COUNT];
+
static void test_fini(
test_context *ctx,
- const char *name,
+ const char *lock_type,
+ bool global_lock,
+ const char *section_type,
size_t test,
size_t active_workers
)
{
+ bool cascade = test_jobs[test].cascade;
unsigned long sum = 0;
- unsigned long n = active_workers;
- unsigned long i;
+ const char *value_sep;
+ size_t i;
- printf(" <%s activeWorker=\"%lu\">\n", name, n);
+ if (active_workers == 1 || !cascade) {
+ printf(
+ "%s{\n"
+ " \"lock-type\": \"%s\",\n"
+ " \"lock-object\": \"%s\",\n"
+ " \"section-type\": \"%s\",\n"
+ " \"results\": [",
+ ctx->test_sep,
+ lock_type,
+ global_lock ? "global" : "local",
+ section_type
+ );
+ ctx->test_sep = ", ";
+ ctx->counter_sep = "\n ";
+ }
- for (i = 0; i < n; ++i) {
+ printf(
+ "%s{\n"
+ " \"counter\": [", ctx->counter_sep);
+ ctx->counter_sep = "\n }, ";
+ value_sep = "";
+
+ for (i = 0; i < active_workers; ++i) {
unsigned long local_counter =
ctx->local_counter[active_workers - 1][test][i];
sum += local_counter;
printf(
- " <LocalCounter worker=\"%lu\">%lu</LocalCounter>\n",
- i,
+ "%s%lu",
+ value_sep,
local_counter
);
+ value_sep = ", ";
}
printf(
- " <GlobalCounter>%lu</GlobalCounter>\n"
- " <SumOfLocalCounter>%lu</SumOfLocalCounter>\n"
- " </%s>\n",
+ "],\n"
+ " \"global-counter\": %lu,\n"
+ " \"sum-of-local-counter\": %lu",
ctx->counter[test],
- sum,
- name
+ sum
);
+
+ if (active_workers == rtems_scheduler_get_processor_maximum() || !cascade) {
+ printf("\n }\n ]\n }");
+ }
}
static void test_0_body(
@@ -138,7 +182,9 @@ static void test_0_fini(
test_fini(
ctx,
- "GlobalTicketLockWithLocalCounter",
+ "Ticket Lock",
+ true,
+ "local counter",
0,
active_workers
);
@@ -175,7 +221,9 @@ static void test_1_fini(
test_fini(
ctx,
- "GlobalMCSLockWithLocalCounter",
+ "MCS Lock",
+ true,
+ "local counter",
1,
active_workers
);
@@ -213,7 +261,9 @@ static void test_2_fini(
test_fini(
ctx,
- "GlobalTicketLockWithGlobalCounter",
+ "Ticket Lock",
+ true,
+ "global counter",
2,
active_workers
);
@@ -251,7 +301,9 @@ static void test_3_fini(
test_fini(
ctx,
- "GlobalMCSLockWithGlobalCounter",
+ "MCS Lock",
+ true,
+ "global counter",
3,
active_workers
);
@@ -293,7 +345,9 @@ static void test_4_fini(
test_fini(
ctx,
- "LocalTicketLockWithLocalCounter",
+ "Ticket Lock",
+ false,
+ "local counter",
4,
active_workers
);
@@ -340,7 +394,9 @@ static void test_5_fini(
test_fini(
ctx,
- "LocalMCSLockWithLocalCounter",
+ "MCS Lock",
+ false,
+ "local counter",
5,
active_workers
);
@@ -386,7 +442,9 @@ static void test_6_fini(
test_fini(
ctx,
- "LocalTicketLockWithGlobalCounter",
+ "Ticket Lock",
+ false,
+ "global counter",
6,
active_workers
);
@@ -437,7 +495,9 @@ static void test_7_fini(
test_fini(
ctx,
- "LocalMCSLockWithGlobalCounter",
+ "MCS Lock",
+ false,
+ "global counter",
7,
active_workers
);
@@ -484,7 +544,9 @@ static void test_8_fini(
test_fini(
ctx,
- "GlobalTicketLockWithBusySection",
+ "Ticket Lock",
+ true,
+ "busy loop",
8,
active_workers
);
@@ -522,7 +584,9 @@ static void test_9_fini(
test_fini(
ctx,
- "GlobalMCSLockWithBusySection",
+ "MCS Lock",
+ true,
+ "busy loop",
9,
active_workers
);
@@ -582,7 +646,9 @@ static void test_10_fini(
test_fini(
ctx,
- "SequenceLock",
+ "Sequence Lock",
+ true,
+ "two global counter",
10,
active_workers
);
@@ -621,7 +687,9 @@ static void test_11_fini(
test_fini(
ctx,
- "GlobalTASLockWithLocalCounter",
+ "TAS Lock",
+ true,
+ "local counter",
11,
active_workers
);
@@ -662,7 +730,9 @@ static void test_12_fini(
test_fini(
ctx,
- "GlobalTTASLockWithLocalCounter",
+ "TTAS Lock",
+ true,
+ "local counter",
12,
active_workers
);
@@ -740,11 +810,11 @@ static const rtems_test_parallel_job test_jobs[TEST_COUNT] = {
static void test(void)
{
test_context *ctx = &test_instance;
- const char *test = "SMPLock01";
- printf("<%s>\n", test);
+ printf("*** BEGIN OF JSON DATA ***\n[\n ");
+ ctx->test_sep = "";
rtems_test_parallel(&ctx->base, NULL, &test_jobs[0], TEST_COUNT);
- printf("</%s>\n", test);
+ printf("\n]\n*** END OF JSON DATA ***\n");
}
static void Init(rtems_task_argument arg)
diff --git a/testsuites/smptests/smplock01/smplock01.scn b/testsuites/smptests/smplock01/smplock01.scn
index 3d4b90f507..1d2e3c98e1 100644
--- a/testsuites/smptests/smplock01/smplock01.scn
+++ b/testsuites/smptests/smplock01/smplock01.scn
@@ -1,2576 +1,239 @@
+
+ SIS - SPARC/RISCV instruction simulator 2.30, copyright Jiri Gaisler 2020
+ Bug-reports to jiri@gaisler.se
+
+ GR740/LEON4 emulation enabled, 4 cpus online, delta 50 clocks
+
+ Loaded build/sparc/gr740/testsuites/smptests/smplock01.exe, entry 0x00000000
+
+
*** BEGIN OF TEST SMPLOCK 1 ***
-<SMPLock01>
- <GlobalTicketLockWithLocalCounter activeWorker="1">
- <LocalCounter worker="0">18357037</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>18357037</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="2">
- <LocalCounter worker="0">10121166</LocalCounter>
- <LocalCounter worker="1">10121320</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>20242486</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="3">
- <LocalCounter worker="0">5707325</LocalCounter>
- <LocalCounter worker="1">5707356</LocalCounter>
- <LocalCounter worker="2">5707357</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>17122038</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="4">
- <LocalCounter worker="0">4194779</LocalCounter>
- <LocalCounter worker="1">4194794</LocalCounter>
- <LocalCounter worker="2">4194790</LocalCounter>
- <LocalCounter worker="3">4194794</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>16779157</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="5">
- <LocalCounter worker="0">3328106</LocalCounter>
- <LocalCounter worker="1">3328112</LocalCounter>
- <LocalCounter worker="2">3328107</LocalCounter>
- <LocalCounter worker="3">3328109</LocalCounter>
- <LocalCounter worker="4">3328114</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>16640548</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="6">
- <LocalCounter worker="0">2719456</LocalCounter>
- <LocalCounter worker="1">2719464</LocalCounter>
- <LocalCounter worker="2">2719465</LocalCounter>
- <LocalCounter worker="3">2719465</LocalCounter>
- <LocalCounter worker="4">2719465</LocalCounter>
- <LocalCounter worker="5">2719464</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>16316779</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="7">
- <LocalCounter worker="0">2281694</LocalCounter>
- <LocalCounter worker="1">2281698</LocalCounter>
- <LocalCounter worker="2">2281695</LocalCounter>
- <LocalCounter worker="3">2281700</LocalCounter>
- <LocalCounter worker="4">2281700</LocalCounter>
- <LocalCounter worker="5">2281697</LocalCounter>
- <LocalCounter worker="6">2281699</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>15971883</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="8">
- <LocalCounter worker="0">1973749</LocalCounter>
- <LocalCounter worker="1">1973751</LocalCounter>
- <LocalCounter worker="2">1973749</LocalCounter>
- <LocalCounter worker="3">1973754</LocalCounter>
- <LocalCounter worker="4">1973753</LocalCounter>
- <LocalCounter worker="5">1973751</LocalCounter>
- <LocalCounter worker="6">1973749</LocalCounter>
- <LocalCounter worker="7">1973749</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>15790005</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="9">
- <LocalCounter worker="0">531562</LocalCounter>
- <LocalCounter worker="1">531561</LocalCounter>
- <LocalCounter worker="2">531558</LocalCounter>
- <LocalCounter worker="3">531556</LocalCounter>
- <LocalCounter worker="4">531562</LocalCounter>
- <LocalCounter worker="5">531566</LocalCounter>
- <LocalCounter worker="6">531561</LocalCounter>
- <LocalCounter worker="7">531560</LocalCounter>
- <LocalCounter worker="8">531589</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4784075</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="10">
- <LocalCounter worker="0">467120</LocalCounter>
- <LocalCounter worker="1">467127</LocalCounter>
- <LocalCounter worker="2">467117</LocalCounter>
- <LocalCounter worker="3">467120</LocalCounter>
- <LocalCounter worker="4">467123</LocalCounter>
- <LocalCounter worker="5">467116</LocalCounter>
- <LocalCounter worker="6">467122</LocalCounter>
- <LocalCounter worker="7">467116</LocalCounter>
- <LocalCounter worker="8">467180</LocalCounter>
- <LocalCounter worker="9">467179</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4671320</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="11">
- <LocalCounter worker="0">426740</LocalCounter>
- <LocalCounter worker="1">426739</LocalCounter>
- <LocalCounter worker="2">426742</LocalCounter>
- <LocalCounter worker="3">426737</LocalCounter>
- <LocalCounter worker="4">426740</LocalCounter>
- <LocalCounter worker="5">426741</LocalCounter>
- <LocalCounter worker="6">426747</LocalCounter>
- <LocalCounter worker="7">426735</LocalCounter>
- <LocalCounter worker="8">426768</LocalCounter>
- <LocalCounter worker="9">426765</LocalCounter>
- <LocalCounter worker="10">426767</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4694221</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="12">
- <LocalCounter worker="0">388705</LocalCounter>
- <LocalCounter worker="1">388703</LocalCounter>
- <LocalCounter worker="2">388710</LocalCounter>
- <LocalCounter worker="3">388706</LocalCounter>
- <LocalCounter worker="4">388701</LocalCounter>
- <LocalCounter worker="5">388702</LocalCounter>
- <LocalCounter worker="6">388702</LocalCounter>
- <LocalCounter worker="7">388705</LocalCounter>
- <LocalCounter worker="8">388740</LocalCounter>
- <LocalCounter worker="9">388739</LocalCounter>
- <LocalCounter worker="10">388740</LocalCounter>
- <LocalCounter worker="11">388739</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4664592</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="13">
- <LocalCounter worker="0">356920</LocalCounter>
- <LocalCounter worker="1">356917</LocalCounter>
- <LocalCounter worker="2">356916</LocalCounter>
- <LocalCounter worker="3">356917</LocalCounter>
- <LocalCounter worker="4">356920</LocalCounter>
- <LocalCounter worker="5">356919</LocalCounter>
- <LocalCounter worker="6">356920</LocalCounter>
- <LocalCounter worker="7">356917</LocalCounter>
- <LocalCounter worker="8">356948</LocalCounter>
- <LocalCounter worker="9">356947</LocalCounter>
- <LocalCounter worker="10">356948</LocalCounter>
- <LocalCounter worker="11">356947</LocalCounter>
- <LocalCounter worker="12">356953</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4640089</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="14">
- <LocalCounter worker="0">330192</LocalCounter>
- <LocalCounter worker="1">330192</LocalCounter>
- <LocalCounter worker="2">330186</LocalCounter>
- <LocalCounter worker="3">330185</LocalCounter>
- <LocalCounter worker="4">330190</LocalCounter>
- <LocalCounter worker="5">330183</LocalCounter>
- <LocalCounter worker="6">330187</LocalCounter>
- <LocalCounter worker="7">330187</LocalCounter>
- <LocalCounter worker="8">330226</LocalCounter>
- <LocalCounter worker="9">330225</LocalCounter>
- <LocalCounter worker="10">330225</LocalCounter>
- <LocalCounter worker="11">330228</LocalCounter>
- <LocalCounter worker="12">330225</LocalCounter>
- <LocalCounter worker="13">330226</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4622857</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="15">
- <LocalCounter worker="0">303180</LocalCounter>
- <LocalCounter worker="1">303186</LocalCounter>
- <LocalCounter worker="2">303190</LocalCounter>
- <LocalCounter worker="3">303180</LocalCounter>
- <LocalCounter worker="4">303188</LocalCounter>
- <LocalCounter worker="5">303181</LocalCounter>
- <LocalCounter worker="6">303183</LocalCounter>
- <LocalCounter worker="7">303191</LocalCounter>
- <LocalCounter worker="8">303199</LocalCounter>
- <LocalCounter worker="9">303204</LocalCounter>
- <LocalCounter worker="10">303209</LocalCounter>
- <LocalCounter worker="11">303207</LocalCounter>
- <LocalCounter worker="12">303212</LocalCounter>
- <LocalCounter worker="13">303215</LocalCounter>
- <LocalCounter worker="14">303217</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4547942</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="16">
- <LocalCounter worker="0">274980</LocalCounter>
- <LocalCounter worker="1">274975</LocalCounter>
- <LocalCounter worker="2">274979</LocalCounter>
- <LocalCounter worker="3">274983</LocalCounter>
- <LocalCounter worker="4">274979</LocalCounter>
- <LocalCounter worker="5">274977</LocalCounter>
- <LocalCounter worker="6">274974</LocalCounter>
- <LocalCounter worker="7">274980</LocalCounter>
- <LocalCounter worker="8">274977</LocalCounter>
- <LocalCounter worker="9">274984</LocalCounter>
- <LocalCounter worker="10">274983</LocalCounter>
- <LocalCounter worker="11">274981</LocalCounter>
- <LocalCounter worker="12">274982</LocalCounter>
- <LocalCounter worker="13">274978</LocalCounter>
- <LocalCounter worker="14">274980</LocalCounter>
- <LocalCounter worker="15">274977</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4399669</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="17">
- <LocalCounter worker="0">261695</LocalCounter>
- <LocalCounter worker="1">261697</LocalCounter>
- <LocalCounter worker="2">261696</LocalCounter>
- <LocalCounter worker="3">261696</LocalCounter>
- <LocalCounter worker="4">261694</LocalCounter>
- <LocalCounter worker="5">261695</LocalCounter>
- <LocalCounter worker="6">261697</LocalCounter>
- <LocalCounter worker="7">261692</LocalCounter>
- <LocalCounter worker="8">261696</LocalCounter>
- <LocalCounter worker="9">261692</LocalCounter>
- <LocalCounter worker="10">261696</LocalCounter>
- <LocalCounter worker="11">261697</LocalCounter>
- <LocalCounter worker="12">261697</LocalCounter>
- <LocalCounter worker="13">261695</LocalCounter>
- <LocalCounter worker="14">261692</LocalCounter>
- <LocalCounter worker="15">261691</LocalCounter>
- <LocalCounter worker="16">261708</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4448826</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="18">
- <LocalCounter worker="0">240007</LocalCounter>
- <LocalCounter worker="1">240008</LocalCounter>
- <LocalCounter worker="2">240007</LocalCounter>
- <LocalCounter worker="3">240008</LocalCounter>
- <LocalCounter worker="4">240010</LocalCounter>
- <LocalCounter worker="5">240007</LocalCounter>
- <LocalCounter worker="6">240006</LocalCounter>
- <LocalCounter worker="7">240008</LocalCounter>
- <LocalCounter worker="8">240008</LocalCounter>
- <LocalCounter worker="9">240007</LocalCounter>
- <LocalCounter worker="10">240010</LocalCounter>
- <LocalCounter worker="11">240007</LocalCounter>
- <LocalCounter worker="12">240010</LocalCounter>
- <LocalCounter worker="13">240007</LocalCounter>
- <LocalCounter worker="14">240007</LocalCounter>
- <LocalCounter worker="15">240010</LocalCounter>
- <LocalCounter worker="16">240020</LocalCounter>
- <LocalCounter worker="17">240017</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4320164</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="19">
- <LocalCounter worker="0">225896</LocalCounter>
- <LocalCounter worker="1">225897</LocalCounter>
- <LocalCounter worker="2">225897</LocalCounter>
- <LocalCounter worker="3">225898</LocalCounter>
- <LocalCounter worker="4">225899</LocalCounter>
- <LocalCounter worker="5">225898</LocalCounter>
- <LocalCounter worker="6">225898</LocalCounter>
- <LocalCounter worker="7">225896</LocalCounter>
- <LocalCounter worker="8">225896</LocalCounter>
- <LocalCounter worker="9">225896</LocalCounter>
- <LocalCounter worker="10">225897</LocalCounter>
- <LocalCounter worker="11">225898</LocalCounter>
- <LocalCounter worker="12">225900</LocalCounter>
- <LocalCounter worker="13">225899</LocalCounter>
- <LocalCounter worker="14">225895</LocalCounter>
- <LocalCounter worker="15">225894</LocalCounter>
- <LocalCounter worker="16">225906</LocalCounter>
- <LocalCounter worker="17">225905</LocalCounter>
- <LocalCounter worker="18">225907</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4292072</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="20">
- <LocalCounter worker="0">214338</LocalCounter>
- <LocalCounter worker="1">214338</LocalCounter>
- <LocalCounter worker="2">214338</LocalCounter>
- <LocalCounter worker="3">214336</LocalCounter>
- <LocalCounter worker="4">214338</LocalCounter>
- <LocalCounter worker="5">214337</LocalCounter>
- <LocalCounter worker="6">214335</LocalCounter>
- <LocalCounter worker="7">214337</LocalCounter>
- <LocalCounter worker="8">214338</LocalCounter>
- <LocalCounter worker="9">214337</LocalCounter>
- <LocalCounter worker="10">214337</LocalCounter>
- <LocalCounter worker="11">214338</LocalCounter>
- <LocalCounter worker="12">214337</LocalCounter>
- <LocalCounter worker="13">214337</LocalCounter>
- <LocalCounter worker="14">214339</LocalCounter>
- <LocalCounter worker="15">214338</LocalCounter>
- <LocalCounter worker="16">214343</LocalCounter>
- <LocalCounter worker="17">214343</LocalCounter>
- <LocalCounter worker="18">214345</LocalCounter>
- <LocalCounter worker="19">214345</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4286774</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="21">
- <LocalCounter worker="0">198227</LocalCounter>
- <LocalCounter worker="1">198229</LocalCounter>
- <LocalCounter worker="2">198227</LocalCounter>
- <LocalCounter worker="3">198228</LocalCounter>
- <LocalCounter worker="4">198228</LocalCounter>
- <LocalCounter worker="5">198229</LocalCounter>
- <LocalCounter worker="6">198229</LocalCounter>
- <LocalCounter worker="7">198228</LocalCounter>
- <LocalCounter worker="8">198227</LocalCounter>
- <LocalCounter worker="9">198230</LocalCounter>
- <LocalCounter worker="10">198227</LocalCounter>
- <LocalCounter worker="11">198228</LocalCounter>
- <LocalCounter worker="12">198229</LocalCounter>
- <LocalCounter worker="13">198230</LocalCounter>
- <LocalCounter worker="14">198228</LocalCounter>
- <LocalCounter worker="15">198230</LocalCounter>
- <LocalCounter worker="16">198231</LocalCounter>
- <LocalCounter worker="17">198232</LocalCounter>
- <LocalCounter worker="18">198233</LocalCounter>
- <LocalCounter worker="19">198233</LocalCounter>
- <LocalCounter worker="20">198232</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4162815</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="22">
- <LocalCounter worker="0">192321</LocalCounter>
- <LocalCounter worker="1">192322</LocalCounter>
- <LocalCounter worker="2">192322</LocalCounter>
- <LocalCounter worker="3">192323</LocalCounter>
- <LocalCounter worker="4">192325</LocalCounter>
- <LocalCounter worker="5">192324</LocalCounter>
- <LocalCounter worker="6">192323</LocalCounter>
- <LocalCounter worker="7">192324</LocalCounter>
- <LocalCounter worker="8">192325</LocalCounter>
- <LocalCounter worker="9">192325</LocalCounter>
- <LocalCounter worker="10">192323</LocalCounter>
- <LocalCounter worker="11">192323</LocalCounter>
- <LocalCounter worker="12">192323</LocalCounter>
- <LocalCounter worker="13">192323</LocalCounter>
- <LocalCounter worker="14">192324</LocalCounter>
- <LocalCounter worker="15">192324</LocalCounter>
- <LocalCounter worker="16">192329</LocalCounter>
- <LocalCounter worker="17">192326</LocalCounter>
- <LocalCounter worker="18">192325</LocalCounter>
- <LocalCounter worker="19">192329</LocalCounter>
- <LocalCounter worker="20">192326</LocalCounter>
- <LocalCounter worker="21">192327</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4231136</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="23">
- <LocalCounter worker="0">177893</LocalCounter>
- <LocalCounter worker="1">177892</LocalCounter>
- <LocalCounter worker="2">177895</LocalCounter>
- <LocalCounter worker="3">177894</LocalCounter>
- <LocalCounter worker="4">177892</LocalCounter>
- <LocalCounter worker="5">177891</LocalCounter>
- <LocalCounter worker="6">177893</LocalCounter>
- <LocalCounter worker="7">177893</LocalCounter>
- <LocalCounter worker="8">177893</LocalCounter>
- <LocalCounter worker="9">177893</LocalCounter>
- <LocalCounter worker="10">177894</LocalCounter>
- <LocalCounter worker="11">177894</LocalCounter>
- <LocalCounter worker="12">177893</LocalCounter>
- <LocalCounter worker="13">177893</LocalCounter>
- <LocalCounter worker="14">177894</LocalCounter>
- <LocalCounter worker="15">177894</LocalCounter>
- <LocalCounter worker="16">177895</LocalCounter>
- <LocalCounter worker="17">177895</LocalCounter>
- <LocalCounter worker="18">177896</LocalCounter>
- <LocalCounter worker="19">177897</LocalCounter>
- <LocalCounter worker="20">177894</LocalCounter>
- <LocalCounter worker="21">177896</LocalCounter>
- <LocalCounter worker="22">177894</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4091558</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalTicketLockWithLocalCounter activeWorker="24">
- <LocalCounter worker="0">168726</LocalCounter>
- <LocalCounter worker="1">168726</LocalCounter>
- <LocalCounter worker="2">168726</LocalCounter>
- <LocalCounter worker="3">168726</LocalCounter>
- <LocalCounter worker="4">168726</LocalCounter>
- <LocalCounter worker="5">168725</LocalCounter>
- <LocalCounter worker="6">168726</LocalCounter>
- <LocalCounter worker="7">168726</LocalCounter>
- <LocalCounter worker="8">168726</LocalCounter>
- <LocalCounter worker="9">168726</LocalCounter>
- <LocalCounter worker="10">168728</LocalCounter>
- <LocalCounter worker="11">168727</LocalCounter>
- <LocalCounter worker="12">168727</LocalCounter>
- <LocalCounter worker="13">168726</LocalCounter>
- <LocalCounter worker="14">168726</LocalCounter>
- <LocalCounter worker="15">168728</LocalCounter>
- <LocalCounter worker="16">168727</LocalCounter>
- <LocalCounter worker="17">168729</LocalCounter>
- <LocalCounter worker="18">168726</LocalCounter>
- <LocalCounter worker="19">168725</LocalCounter>
- <LocalCounter worker="20">168728</LocalCounter>
- <LocalCounter worker="21">168727</LocalCounter>
- <LocalCounter worker="22">168726</LocalCounter>
- <LocalCounter worker="23">168726</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4049435</SumOfLocalCounter>
- </GlobalTicketLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="1">
- <LocalCounter worker="0">13090449</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>13090449</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="2">
- <LocalCounter worker="0">6384726</LocalCounter>
- <LocalCounter worker="1">6384887</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>12769613</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="3">
- <LocalCounter worker="0">2955420</LocalCounter>
- <LocalCounter worker="1">2955434</LocalCounter>
- <LocalCounter worker="2">2955434</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>8866288</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="4">
- <LocalCounter worker="0">2866696</LocalCounter>
- <LocalCounter worker="1">2866710</LocalCounter>
- <LocalCounter worker="2">2866711</LocalCounter>
- <LocalCounter worker="3">2866708</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>11466825</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="5">
- <LocalCounter worker="0">2996690</LocalCounter>
- <LocalCounter worker="1">2996699</LocalCounter>
- <LocalCounter worker="2">2996701</LocalCounter>
- <LocalCounter worker="3">2996698</LocalCounter>
- <LocalCounter worker="4">2996701</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>14983489</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="6">
- <LocalCounter worker="0">2540852</LocalCounter>
- <LocalCounter worker="1">2540864</LocalCounter>
- <LocalCounter worker="2">2540864</LocalCounter>
- <LocalCounter worker="3">2540862</LocalCounter>
- <LocalCounter worker="4">2540861</LocalCounter>
- <LocalCounter worker="5">2540863</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>15245166</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="7">
- <LocalCounter worker="0">2182035</LocalCounter>
- <LocalCounter worker="1">2182054</LocalCounter>
- <LocalCounter worker="2">2182053</LocalCounter>
- <LocalCounter worker="3">2182053</LocalCounter>
- <LocalCounter worker="4">2182053</LocalCounter>
- <LocalCounter worker="5">2182055</LocalCounter>
- <LocalCounter worker="6">2182055</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>15274358</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="8">
- <LocalCounter worker="0">1920366</LocalCounter>
- <LocalCounter worker="1">1920373</LocalCounter>
- <LocalCounter worker="2">1920374</LocalCounter>
- <LocalCounter worker="3">1920373</LocalCounter>
- <LocalCounter worker="4">1920371</LocalCounter>
- <LocalCounter worker="5">1920374</LocalCounter>
- <LocalCounter worker="6">1920373</LocalCounter>
- <LocalCounter worker="7">1920372</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>15362976</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="9">
- <LocalCounter worker="0">1216597</LocalCounter>
- <LocalCounter worker="1">1216602</LocalCounter>
- <LocalCounter worker="2">1216602</LocalCounter>
- <LocalCounter worker="3">1216602</LocalCounter>
- <LocalCounter worker="4">1216601</LocalCounter>
- <LocalCounter worker="5">1216602</LocalCounter>
- <LocalCounter worker="6">1216603</LocalCounter>
- <LocalCounter worker="7">1216601</LocalCounter>
- <LocalCounter worker="8">1216600</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>10949410</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="10">
- <LocalCounter worker="0">1007168</LocalCounter>
- <LocalCounter worker="1">1007170</LocalCounter>
- <LocalCounter worker="2">1007171</LocalCounter>
- <LocalCounter worker="3">1007170</LocalCounter>
- <LocalCounter worker="4">1007170</LocalCounter>
- <LocalCounter worker="5">1007170</LocalCounter>
- <LocalCounter worker="6">1007171</LocalCounter>
- <LocalCounter worker="7">1007170</LocalCounter>
- <LocalCounter worker="8">1007170</LocalCounter>
- <LocalCounter worker="9">1007171</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>10071701</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="11">
- <LocalCounter worker="0">772281</LocalCounter>
- <LocalCounter worker="1">772283</LocalCounter>
- <LocalCounter worker="2">772283</LocalCounter>
- <LocalCounter worker="3">772284</LocalCounter>
- <LocalCounter worker="4">772281</LocalCounter>
- <LocalCounter worker="5">772283</LocalCounter>
- <LocalCounter worker="6">772283</LocalCounter>
- <LocalCounter worker="7">772282</LocalCounter>
- <LocalCounter worker="8">772281</LocalCounter>
- <LocalCounter worker="9">772282</LocalCounter>
- <LocalCounter worker="10">772282</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>8495105</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="12">
- <LocalCounter worker="0">672837</LocalCounter>
- <LocalCounter worker="1">672841</LocalCounter>
- <LocalCounter worker="2">672841</LocalCounter>
- <LocalCounter worker="3">672841</LocalCounter>
- <LocalCounter worker="4">672841</LocalCounter>
- <LocalCounter worker="5">672842</LocalCounter>
- <LocalCounter worker="6">672841</LocalCounter>
- <LocalCounter worker="7">672841</LocalCounter>
- <LocalCounter worker="8">672842</LocalCounter>
- <LocalCounter worker="9">672841</LocalCounter>
- <LocalCounter worker="10">672841</LocalCounter>
- <LocalCounter worker="11">672841</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>8074090</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="13">
- <LocalCounter worker="0">595160</LocalCounter>
- <LocalCounter worker="1">595163</LocalCounter>
- <LocalCounter worker="2">595162</LocalCounter>
- <LocalCounter worker="3">595163</LocalCounter>
- <LocalCounter worker="4">595161</LocalCounter>
- <LocalCounter worker="5">595162</LocalCounter>
- <LocalCounter worker="6">595162</LocalCounter>
- <LocalCounter worker="7">595163</LocalCounter>
- <LocalCounter worker="8">595162</LocalCounter>
- <LocalCounter worker="9">595162</LocalCounter>
- <LocalCounter worker="10">595162</LocalCounter>
- <LocalCounter worker="11">595162</LocalCounter>
- <LocalCounter worker="12">595162</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>7737106</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="14">
- <LocalCounter worker="0">581536</LocalCounter>
- <LocalCounter worker="1">581540</LocalCounter>
- <LocalCounter worker="2">581539</LocalCounter>
- <LocalCounter worker="3">581539</LocalCounter>
- <LocalCounter worker="4">581539</LocalCounter>
- <LocalCounter worker="5">581539</LocalCounter>
- <LocalCounter worker="6">581539</LocalCounter>
- <LocalCounter worker="7">581538</LocalCounter>
- <LocalCounter worker="8">581540</LocalCounter>
- <LocalCounter worker="9">581539</LocalCounter>
- <LocalCounter worker="10">581538</LocalCounter>
- <LocalCounter worker="11">581539</LocalCounter>
- <LocalCounter worker="12">581539</LocalCounter>
- <LocalCounter worker="13">581540</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>8141544</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="15">
- <LocalCounter worker="0">578439</LocalCounter>
- <LocalCounter worker="1">578441</LocalCounter>
- <LocalCounter worker="2">578442</LocalCounter>
- <LocalCounter worker="3">578441</LocalCounter>
- <LocalCounter worker="4">578442</LocalCounter>
- <LocalCounter worker="5">578441</LocalCounter>
- <LocalCounter worker="6">578442</LocalCounter>
- <LocalCounter worker="7">578444</LocalCounter>
- <LocalCounter worker="8">578441</LocalCounter>
- <LocalCounter worker="9">578442</LocalCounter>
- <LocalCounter worker="10">578441</LocalCounter>
- <LocalCounter worker="11">578440</LocalCounter>
- <LocalCounter worker="12">578441</LocalCounter>
- <LocalCounter worker="13">578441</LocalCounter>
- <LocalCounter worker="14">578442</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>8676620</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="16">
- <LocalCounter worker="0">527784</LocalCounter>
- <LocalCounter worker="1">527783</LocalCounter>
- <LocalCounter worker="2">527785</LocalCounter>
- <LocalCounter worker="3">527784</LocalCounter>
- <LocalCounter worker="4">527784</LocalCounter>
- <LocalCounter worker="5">527783</LocalCounter>
- <LocalCounter worker="6">527782</LocalCounter>
- <LocalCounter worker="7">527784</LocalCounter>
- <LocalCounter worker="8">527782</LocalCounter>
- <LocalCounter worker="9">527782</LocalCounter>
- <LocalCounter worker="10">527784</LocalCounter>
- <LocalCounter worker="11">527783</LocalCounter>
- <LocalCounter worker="12">527783</LocalCounter>
- <LocalCounter worker="13">527783</LocalCounter>
- <LocalCounter worker="14">527783</LocalCounter>
- <LocalCounter worker="15">527783</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>8444532</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="17">
- <LocalCounter worker="0">468012</LocalCounter>
- <LocalCounter worker="1">468009</LocalCounter>
- <LocalCounter worker="2">468009</LocalCounter>
- <LocalCounter worker="3">468010</LocalCounter>
- <LocalCounter worker="4">468011</LocalCounter>
- <LocalCounter worker="5">468010</LocalCounter>
- <LocalCounter worker="6">468011</LocalCounter>
- <LocalCounter worker="7">468009</LocalCounter>
- <LocalCounter worker="8">468009</LocalCounter>
- <LocalCounter worker="9">468010</LocalCounter>
- <LocalCounter worker="10">468011</LocalCounter>
- <LocalCounter worker="11">468012</LocalCounter>
- <LocalCounter worker="12">468009</LocalCounter>
- <LocalCounter worker="13">468011</LocalCounter>
- <LocalCounter worker="14">468011</LocalCounter>
- <LocalCounter worker="15">468011</LocalCounter>
- <LocalCounter worker="16">468012</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>7956177</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="18">
- <LocalCounter worker="0">439238</LocalCounter>
- <LocalCounter worker="1">439222</LocalCounter>
- <LocalCounter worker="2">439228</LocalCounter>
- <LocalCounter worker="3">439225</LocalCounter>
- <LocalCounter worker="4">439226</LocalCounter>
- <LocalCounter worker="5">439228</LocalCounter>
- <LocalCounter worker="6">439226</LocalCounter>
- <LocalCounter worker="7">439219</LocalCounter>
- <LocalCounter worker="8">439231</LocalCounter>
- <LocalCounter worker="9">439213</LocalCounter>
- <LocalCounter worker="10">439226</LocalCounter>
- <LocalCounter worker="11">439215</LocalCounter>
- <LocalCounter worker="12">439215</LocalCounter>
- <LocalCounter worker="13">439222</LocalCounter>
- <LocalCounter worker="14">439224</LocalCounter>
- <LocalCounter worker="15">439217</LocalCounter>
- <LocalCounter worker="16">439226</LocalCounter>
- <LocalCounter worker="17">439230</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>7906031</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="19">
- <LocalCounter worker="0">392577</LocalCounter>
- <LocalCounter worker="1">392658</LocalCounter>
- <LocalCounter worker="2">392677</LocalCounter>
- <LocalCounter worker="3">392625</LocalCounter>
- <LocalCounter worker="4">392645</LocalCounter>
- <LocalCounter worker="5">392611</LocalCounter>
- <LocalCounter worker="6">392643</LocalCounter>
- <LocalCounter worker="7">392617</LocalCounter>
- <LocalCounter worker="8">392519</LocalCounter>
- <LocalCounter worker="9">392507</LocalCounter>
- <LocalCounter worker="10">392525</LocalCounter>
- <LocalCounter worker="11">392515</LocalCounter>
- <LocalCounter worker="12">392513</LocalCounter>
- <LocalCounter worker="13">392488</LocalCounter>
- <LocalCounter worker="14">392567</LocalCounter>
- <LocalCounter worker="15">392567</LocalCounter>
- <LocalCounter worker="16">392175</LocalCounter>
- <LocalCounter worker="17">392148</LocalCounter>
- <LocalCounter worker="18">392153</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>7457730</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="20">
- <LocalCounter worker="0">393189</LocalCounter>
- <LocalCounter worker="1">393145</LocalCounter>
- <LocalCounter worker="2">393365</LocalCounter>
- <LocalCounter worker="3">393284</LocalCounter>
- <LocalCounter worker="4">393215</LocalCounter>
- <LocalCounter worker="5">393191</LocalCounter>
- <LocalCounter worker="6">393247</LocalCounter>
- <LocalCounter worker="7">393229</LocalCounter>
- <LocalCounter worker="8">392255</LocalCounter>
- <LocalCounter worker="9">392239</LocalCounter>
- <LocalCounter worker="10">392268</LocalCounter>
- <LocalCounter worker="11">392259</LocalCounter>
- <LocalCounter worker="12">392312</LocalCounter>
- <LocalCounter worker="13">392395</LocalCounter>
- <LocalCounter worker="14">392318</LocalCounter>
- <LocalCounter worker="15">392431</LocalCounter>
- <LocalCounter worker="16">389204</LocalCounter>
- <LocalCounter worker="17">389161</LocalCounter>
- <LocalCounter worker="18">389146</LocalCounter>
- <LocalCounter worker="19">389191</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>7841044</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="21">
- <LocalCounter worker="0">333867</LocalCounter>
- <LocalCounter worker="1">333818</LocalCounter>
- <LocalCounter worker="2">333796</LocalCounter>
- <LocalCounter worker="3">333998</LocalCounter>
- <LocalCounter worker="4">333786</LocalCounter>
- <LocalCounter worker="5">333970</LocalCounter>
- <LocalCounter worker="6">333966</LocalCounter>
- <LocalCounter worker="7">333946</LocalCounter>
- <LocalCounter worker="8">331691</LocalCounter>
- <LocalCounter worker="9">331644</LocalCounter>
- <LocalCounter worker="10">331574</LocalCounter>
- <LocalCounter worker="11">331570</LocalCounter>
- <LocalCounter worker="12">331815</LocalCounter>
- <LocalCounter worker="13">331757</LocalCounter>
- <LocalCounter worker="14">331873</LocalCounter>
- <LocalCounter worker="15">331902</LocalCounter>
- <LocalCounter worker="16">321858</LocalCounter>
- <LocalCounter worker="17">321819</LocalCounter>
- <LocalCounter worker="18">321778</LocalCounter>
- <LocalCounter worker="19">321915</LocalCounter>
- <LocalCounter worker="20">322036</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>6934379</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="22">
- <LocalCounter worker="0">336076</LocalCounter>
- <LocalCounter worker="1">336030</LocalCounter>
- <LocalCounter worker="2">335863</LocalCounter>
- <LocalCounter worker="3">335861</LocalCounter>
- <LocalCounter worker="4">335954</LocalCounter>
- <LocalCounter worker="5">336069</LocalCounter>
- <LocalCounter worker="6">335963</LocalCounter>
- <LocalCounter worker="7">335891</LocalCounter>
- <LocalCounter worker="8">336178</LocalCounter>
- <LocalCounter worker="9">335697</LocalCounter>
- <LocalCounter worker="10">335574</LocalCounter>
- <LocalCounter worker="11">335581</LocalCounter>
- <LocalCounter worker="12">335586</LocalCounter>
- <LocalCounter worker="13">336068</LocalCounter>
- <LocalCounter worker="14">336138</LocalCounter>
- <LocalCounter worker="15">336049</LocalCounter>
- <LocalCounter worker="16">330987</LocalCounter>
- <LocalCounter worker="17">330865</LocalCounter>
- <LocalCounter worker="18">331086</LocalCounter>
- <LocalCounter worker="19">330937</LocalCounter>
- <LocalCounter worker="20">331150</LocalCounter>
- <LocalCounter worker="21">330937</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>7360540</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="23">
- <LocalCounter worker="0">317093</LocalCounter>
- <LocalCounter worker="1">317207</LocalCounter>
- <LocalCounter worker="2">317153</LocalCounter>
- <LocalCounter worker="3">317177</LocalCounter>
- <LocalCounter worker="4">317207</LocalCounter>
- <LocalCounter worker="5">317164</LocalCounter>
- <LocalCounter worker="6">317198</LocalCounter>
- <LocalCounter worker="7">317132</LocalCounter>
- <LocalCounter worker="8">317445</LocalCounter>
- <LocalCounter worker="9">317166</LocalCounter>
- <LocalCounter worker="10">317044</LocalCounter>
- <LocalCounter worker="11">317000</LocalCounter>
- <LocalCounter worker="12">317012</LocalCounter>
- <LocalCounter worker="13">317587</LocalCounter>
- <LocalCounter worker="14">317522</LocalCounter>
- <LocalCounter worker="15">317568</LocalCounter>
- <LocalCounter worker="16">315579</LocalCounter>
- <LocalCounter worker="17">315563</LocalCounter>
- <LocalCounter worker="18">315657</LocalCounter>
- <LocalCounter worker="19">315582</LocalCounter>
- <LocalCounter worker="20">315453</LocalCounter>
- <LocalCounter worker="21">315445</LocalCounter>
- <LocalCounter worker="22">315774</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>7284728</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalMCSLockWithLocalCounter activeWorker="24">
- <LocalCounter worker="0">312519</LocalCounter>
- <LocalCounter worker="1">312750</LocalCounter>
- <LocalCounter worker="2">312612</LocalCounter>
- <LocalCounter worker="3">312671</LocalCounter>
- <LocalCounter worker="4">312685</LocalCounter>
- <LocalCounter worker="5">312707</LocalCounter>
- <LocalCounter worker="6">312543</LocalCounter>
- <LocalCounter worker="7">312680</LocalCounter>
- <LocalCounter worker="8">313250</LocalCounter>
- <LocalCounter worker="9">312566</LocalCounter>
- <LocalCounter worker="10">312775</LocalCounter>
- <LocalCounter worker="11">312827</LocalCounter>
- <LocalCounter worker="12">312652</LocalCounter>
- <LocalCounter worker="13">313141</LocalCounter>
- <LocalCounter worker="14">313261</LocalCounter>
- <LocalCounter worker="15">313270</LocalCounter>
- <LocalCounter worker="16">312883</LocalCounter>
- <LocalCounter worker="17">312649</LocalCounter>
- <LocalCounter worker="18">312529</LocalCounter>
- <LocalCounter worker="19">312615</LocalCounter>
- <LocalCounter worker="20">312755</LocalCounter>
- <LocalCounter worker="21">312833</LocalCounter>
- <LocalCounter worker="22">312673</LocalCounter>
- <LocalCounter worker="23">312728</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>7506574</SumOfLocalCounter>
- </GlobalMCSLockWithLocalCounter>
- <GlobalTicketLockWithGlobalCounter activeWorker="24">
- <LocalCounter worker="0">149325</LocalCounter>
- <LocalCounter worker="1">149327</LocalCounter>
- <LocalCounter worker="2">149325</LocalCounter>
- <LocalCounter worker="3">149325</LocalCounter>
- <LocalCounter worker="4">149325</LocalCounter>
- <LocalCounter worker="5">149327</LocalCounter>
- <LocalCounter worker="6">149325</LocalCounter>
- <LocalCounter worker="7">149324</LocalCounter>
- <LocalCounter worker="8">149326</LocalCounter>
- <LocalCounter worker="9">149325</LocalCounter>
- <LocalCounter worker="10">149326</LocalCounter>
- <LocalCounter worker="11">149326</LocalCounter>
- <LocalCounter worker="12">149326</LocalCounter>
- <LocalCounter worker="13">149325</LocalCounter>
- <LocalCounter worker="14">149325</LocalCounter>
- <LocalCounter worker="15">149325</LocalCounter>
- <LocalCounter worker="16">149325</LocalCounter>
- <LocalCounter worker="17">149325</LocalCounter>
- <LocalCounter worker="18">149325</LocalCounter>
- <LocalCounter worker="19">149326</LocalCounter>
- <LocalCounter worker="20">149325</LocalCounter>
- <LocalCounter worker="21">149326</LocalCounter>
- <LocalCounter worker="22">149325</LocalCounter>
- <LocalCounter worker="23">149325</LocalCounter>
- <GlobalCounter>3583809</GlobalCounter>
- <SumOfLocalCounter>3583809</SumOfLocalCounter>
- </GlobalTicketLockWithGlobalCounter>
- <GlobalMCSLockWithGlobalCounter activeWorker="24">
- <LocalCounter worker="0">219612</LocalCounter>
- <LocalCounter worker="1">219612</LocalCounter>
- <LocalCounter worker="2">219612</LocalCounter>
- <LocalCounter worker="3">219612</LocalCounter>
- <LocalCounter worker="4">219612</LocalCounter>
- <LocalCounter worker="5">219612</LocalCounter>
- <LocalCounter worker="6">219613</LocalCounter>
- <LocalCounter worker="7">219612</LocalCounter>
- <LocalCounter worker="8">219612</LocalCounter>
- <LocalCounter worker="9">219614</LocalCounter>
- <LocalCounter worker="10">219612</LocalCounter>
- <LocalCounter worker="11">219611</LocalCounter>
- <LocalCounter worker="12">219613</LocalCounter>
- <LocalCounter worker="13">219614</LocalCounter>
- <LocalCounter worker="14">219612</LocalCounter>
- <LocalCounter worker="15">219612</LocalCounter>
- <LocalCounter worker="16">219613</LocalCounter>
- <LocalCounter worker="17">219613</LocalCounter>
- <LocalCounter worker="18">219611</LocalCounter>
- <LocalCounter worker="19">219612</LocalCounter>
- <LocalCounter worker="20">219611</LocalCounter>
- <LocalCounter worker="21">219612</LocalCounter>
- <LocalCounter worker="22">219612</LocalCounter>
- <LocalCounter worker="23">219613</LocalCounter>
- <GlobalCounter>5270694</GlobalCounter>
- <SumOfLocalCounter>5270694</SumOfLocalCounter>
- </GlobalMCSLockWithGlobalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="1">
- <LocalCounter worker="0">17976591</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>17976591</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="2">
- <LocalCounter worker="0">17093434</LocalCounter>
- <LocalCounter worker="1">17094750</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>34188184</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="3">
- <LocalCounter worker="0">16126005</LocalCounter>
- <LocalCounter worker="1">16127191</LocalCounter>
- <LocalCounter worker="2">16875254</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>49128450</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="4">
- <LocalCounter worker="0">15412620</LocalCounter>
- <LocalCounter worker="1">15413887</LocalCounter>
- <LocalCounter worker="2">15366643</LocalCounter>
- <LocalCounter worker="3">15366578</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>61559728</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="5">
- <LocalCounter worker="0">16308721</LocalCounter>
- <LocalCounter worker="1">16310021</LocalCounter>
- <LocalCounter worker="2">16318960</LocalCounter>
- <LocalCounter worker="3">16318983</LocalCounter>
- <LocalCounter worker="4">16426938</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>81683623</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="6">
- <LocalCounter worker="0">15193884</LocalCounter>
- <LocalCounter worker="1">15195117</LocalCounter>
- <LocalCounter worker="2">15113407</LocalCounter>
- <LocalCounter worker="3">15121476</LocalCounter>
- <LocalCounter worker="4">15104027</LocalCounter>
- <LocalCounter worker="5">15104373</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>90832284</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="7">
- <LocalCounter worker="0">15794728</LocalCounter>
- <LocalCounter worker="1">15792858</LocalCounter>
- <LocalCounter worker="2">15790710</LocalCounter>
- <LocalCounter worker="3">15798703</LocalCounter>
- <LocalCounter worker="4">15746011</LocalCounter>
- <LocalCounter worker="5">15746393</LocalCounter>
- <LocalCounter worker="6">15839713</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>110509116</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="8">
- <LocalCounter worker="0">14538979</LocalCounter>
- <LocalCounter worker="1">14540011</LocalCounter>
- <LocalCounter worker="2">14540067</LocalCounter>
- <LocalCounter worker="3">14543590</LocalCounter>
- <LocalCounter worker="4">14523331</LocalCounter>
- <LocalCounter worker="5">14523800</LocalCounter>
- <LocalCounter worker="6">14541196</LocalCounter>
- <LocalCounter worker="7">14543759</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>116294733</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="9">
- <LocalCounter worker="0">14597172</LocalCounter>
- <LocalCounter worker="1">14598178</LocalCounter>
- <LocalCounter worker="2">14594621</LocalCounter>
- <LocalCounter worker="3">14598190</LocalCounter>
- <LocalCounter worker="4">14558148</LocalCounter>
- <LocalCounter worker="5">14558565</LocalCounter>
- <LocalCounter worker="6">14603981</LocalCounter>
- <LocalCounter worker="7">14614317</LocalCounter>
- <LocalCounter worker="8">18013252</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>134736424</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="10">
- <LocalCounter worker="0">14529346</LocalCounter>
- <LocalCounter worker="1">14530425</LocalCounter>
- <LocalCounter worker="2">14525274</LocalCounter>
- <LocalCounter worker="3">14530395</LocalCounter>
- <LocalCounter worker="4">14501600</LocalCounter>
- <LocalCounter worker="5">14501959</LocalCounter>
- <LocalCounter worker="6">14539379</LocalCounter>
- <LocalCounter worker="7">14546701</LocalCounter>
- <LocalCounter worker="8">16764576</LocalCounter>
- <LocalCounter worker="9">16764953</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>149734608</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="11">
- <LocalCounter worker="0">14552313</LocalCounter>
- <LocalCounter worker="1">14545774</LocalCounter>
- <LocalCounter worker="2">14543859</LocalCounter>
- <LocalCounter worker="3">14545590</LocalCounter>
- <LocalCounter worker="4">14521699</LocalCounter>
- <LocalCounter worker="5">14522178</LocalCounter>
- <LocalCounter worker="6">14548350</LocalCounter>
- <LocalCounter worker="7">14554882</LocalCounter>
- <LocalCounter worker="8">15834293</LocalCounter>
- <LocalCounter worker="9">15834734</LocalCounter>
- <LocalCounter worker="10">16861946</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>164865618</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="12">
- <LocalCounter worker="0">14544735</LocalCounter>
- <LocalCounter worker="1">14545749</LocalCounter>
- <LocalCounter worker="2">14545348</LocalCounter>
- <LocalCounter worker="3">14545729</LocalCounter>
- <LocalCounter worker="4">14531175</LocalCounter>
- <LocalCounter worker="5">14531582</LocalCounter>
- <LocalCounter worker="6">14545221</LocalCounter>
- <LocalCounter worker="7">14552316</LocalCounter>
- <LocalCounter worker="8">15709806</LocalCounter>
- <LocalCounter worker="9">15710183</LocalCounter>
- <LocalCounter worker="10">15613298</LocalCounter>
- <LocalCounter worker="11">15613336</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>178988478</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="13">
- <LocalCounter worker="0">14631943</LocalCounter>
- <LocalCounter worker="1">14629081</LocalCounter>
- <LocalCounter worker="2">14626428</LocalCounter>
- <LocalCounter worker="3">14629173</LocalCounter>
- <LocalCounter worker="4">14592751</LocalCounter>
- <LocalCounter worker="5">14593171</LocalCounter>
- <LocalCounter worker="6">14633428</LocalCounter>
- <LocalCounter worker="7">14642988</LocalCounter>
- <LocalCounter worker="8">16103014</LocalCounter>
- <LocalCounter worker="9">16103498</LocalCounter>
- <LocalCounter worker="10">16121344</LocalCounter>
- <LocalCounter worker="11">16121522</LocalCounter>
- <LocalCounter worker="12">16592935</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>198021276</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="14">
- <LocalCounter worker="0">14663977</LocalCounter>
- <LocalCounter worker="1">14657392</LocalCounter>
- <LocalCounter worker="2">14653868</LocalCounter>
- <LocalCounter worker="3">14657385</LocalCounter>
- <LocalCounter worker="4">14618995</LocalCounter>
- <LocalCounter worker="5">14619260</LocalCounter>
- <LocalCounter worker="6">14663280</LocalCounter>
- <LocalCounter worker="7">14669006</LocalCounter>
- <LocalCounter worker="8">14932649</LocalCounter>
- <LocalCounter worker="9">14933133</LocalCounter>
- <LocalCounter worker="10">14914884</LocalCounter>
- <LocalCounter worker="11">14922839</LocalCounter>
- <LocalCounter worker="12">14912239</LocalCounter>
- <LocalCounter worker="13">14912618</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>206731525</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="15">
- <LocalCounter worker="0">14574685</LocalCounter>
- <LocalCounter worker="1">14571820</LocalCounter>
- <LocalCounter worker="2">14569180</LocalCounter>
- <LocalCounter worker="3">14571882</LocalCounter>
- <LocalCounter worker="4">14535038</LocalCounter>
- <LocalCounter worker="5">14535448</LocalCounter>
- <LocalCounter worker="6">14576273</LocalCounter>
- <LocalCounter worker="7">14588007</LocalCounter>
- <LocalCounter worker="8">15847051</LocalCounter>
- <LocalCounter worker="9">15847907</LocalCounter>
- <LocalCounter worker="10">15842926</LocalCounter>
- <LocalCounter worker="11">15845292</LocalCounter>
- <LocalCounter worker="12">15844741</LocalCounter>
- <LocalCounter worker="13">15845144</LocalCounter>
- <LocalCounter worker="14">15858663</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>227454057</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="16">
- <LocalCounter worker="0">14565742</LocalCounter>
- <LocalCounter worker="1">14566794</LocalCounter>
- <LocalCounter worker="2">14563059</LocalCounter>
- <LocalCounter worker="3">14566698</LocalCounter>
- <LocalCounter worker="4">14539138</LocalCounter>
- <LocalCounter worker="5">14539550</LocalCounter>
- <LocalCounter worker="6">14572545</LocalCounter>
- <LocalCounter worker="7">14582815</LocalCounter>
- <LocalCounter worker="8">14708684</LocalCounter>
- <LocalCounter worker="9">14709444</LocalCounter>
- <LocalCounter worker="10">14704986</LocalCounter>
- <LocalCounter worker="11">14705363</LocalCounter>
- <LocalCounter worker="12">14739299</LocalCounter>
- <LocalCounter worker="13">14739959</LocalCounter>
- <LocalCounter worker="14">14685047</LocalCounter>
- <LocalCounter worker="15">14684929</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>234174052</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="17">
- <LocalCounter worker="0">14578846</LocalCounter>
- <LocalCounter worker="1">14579881</LocalCounter>
- <LocalCounter worker="2">14577981</LocalCounter>
- <LocalCounter worker="3">14579886</LocalCounter>
- <LocalCounter worker="4">14572709</LocalCounter>
- <LocalCounter worker="5">14573049</LocalCounter>
- <LocalCounter worker="6">14582536</LocalCounter>
- <LocalCounter worker="7">14584350</LocalCounter>
- <LocalCounter worker="8">15007742</LocalCounter>
- <LocalCounter worker="9">15008395</LocalCounter>
- <LocalCounter worker="10">15007420</LocalCounter>
- <LocalCounter worker="11">15007658</LocalCounter>
- <LocalCounter worker="12">15014167</LocalCounter>
- <LocalCounter worker="13">15014785</LocalCounter>
- <LocalCounter worker="14">15005244</LocalCounter>
- <LocalCounter worker="15">15005419</LocalCounter>
- <LocalCounter worker="16">18174844</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>254874912</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="18">
- <LocalCounter worker="0">14520800</LocalCounter>
- <LocalCounter worker="1">14521760</LocalCounter>
- <LocalCounter worker="2">14516500</LocalCounter>
- <LocalCounter worker="3">14519179</LocalCounter>
- <LocalCounter worker="4">14488245</LocalCounter>
- <LocalCounter worker="5">14488682</LocalCounter>
- <LocalCounter worker="6">14533956</LocalCounter>
- <LocalCounter worker="7">14545682</LocalCounter>
- <LocalCounter worker="8">14854184</LocalCounter>
- <LocalCounter worker="9">14854859</LocalCounter>
- <LocalCounter worker="10">14853940</LocalCounter>
- <LocalCounter worker="11">14854226</LocalCounter>
- <LocalCounter worker="12">14853922</LocalCounter>
- <LocalCounter worker="13">14854597</LocalCounter>
- <LocalCounter worker="14">14853928</LocalCounter>
- <LocalCounter worker="15">14854269</LocalCounter>
- <LocalCounter worker="16">16695502</LocalCounter>
- <LocalCounter worker="17">16695771</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>268360002</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="19">
- <LocalCounter worker="0">14767102</LocalCounter>
- <LocalCounter worker="1">14756811</LocalCounter>
- <LocalCounter worker="2">14754774</LocalCounter>
- <LocalCounter worker="3">14756725</LocalCounter>
- <LocalCounter worker="4">14720166</LocalCounter>
- <LocalCounter worker="5">14720526</LocalCounter>
- <LocalCounter worker="6">14759446</LocalCounter>
- <LocalCounter worker="7">14768164</LocalCounter>
- <LocalCounter worker="8">15010901</LocalCounter>
- <LocalCounter worker="9">15011570</LocalCounter>
- <LocalCounter worker="10">15010636</LocalCounter>
- <LocalCounter worker="11">15010954</LocalCounter>
- <LocalCounter worker="12">15010667</LocalCounter>
- <LocalCounter worker="13">15011279</LocalCounter>
- <LocalCounter worker="14">15010747</LocalCounter>
- <LocalCounter worker="15">15011090</LocalCounter>
- <LocalCounter worker="16">16740850</LocalCounter>
- <LocalCounter worker="17">16741140</LocalCounter>
- <LocalCounter worker="18">16740556</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>288314104</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="20">
- <LocalCounter worker="0">14503694</LocalCounter>
- <LocalCounter worker="1">14504695</LocalCounter>
- <LocalCounter worker="2">14504309</LocalCounter>
- <LocalCounter worker="3">14504656</LocalCounter>
- <LocalCounter worker="4">14481517</LocalCounter>
- <LocalCounter worker="5">14481930</LocalCounter>
- <LocalCounter worker="6">14504225</LocalCounter>
- <LocalCounter worker="7">14511441</LocalCounter>
- <LocalCounter worker="8">14881230</LocalCounter>
- <LocalCounter worker="9">14881959</LocalCounter>
- <LocalCounter worker="10">14880910</LocalCounter>
- <LocalCounter worker="11">14881278</LocalCounter>
- <LocalCounter worker="12">14881048</LocalCounter>
- <LocalCounter worker="13">14881629</LocalCounter>
- <LocalCounter worker="14">14881078</LocalCounter>
- <LocalCounter worker="15">14881274</LocalCounter>
- <LocalCounter worker="16">15921487</LocalCounter>
- <LocalCounter worker="17">15921957</LocalCounter>
- <LocalCounter worker="18">15772241</LocalCounter>
- <LocalCounter worker="19">15772141</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>298434699</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="21">
- <LocalCounter worker="0">14585345</LocalCounter>
- <LocalCounter worker="1">14586417</LocalCounter>
- <LocalCounter worker="2">14584462</LocalCounter>
- <LocalCounter worker="3">14586324</LocalCounter>
- <LocalCounter worker="4">14561834</LocalCounter>
- <LocalCounter worker="5">14562194</LocalCounter>
- <LocalCounter worker="6">14589003</LocalCounter>
- <LocalCounter worker="7">14593127</LocalCounter>
- <LocalCounter worker="8">14651792</LocalCounter>
- <LocalCounter worker="9">14652414</LocalCounter>
- <LocalCounter worker="10">14651588</LocalCounter>
- <LocalCounter worker="11">14651811</LocalCounter>
- <LocalCounter worker="12">14651560</LocalCounter>
- <LocalCounter worker="13">14652081</LocalCounter>
- <LocalCounter worker="14">14651657</LocalCounter>
- <LocalCounter worker="15">14651849</LocalCounter>
- <LocalCounter worker="16">15956242</LocalCounter>
- <LocalCounter worker="17">15956591</LocalCounter>
- <LocalCounter worker="18">15917381</LocalCounter>
- <LocalCounter worker="19">15917342</LocalCounter>
- <LocalCounter worker="20">16692459</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>314303473</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="22">
- <LocalCounter worker="0">14567398</LocalCounter>
- <LocalCounter worker="1">14564632</LocalCounter>
- <LocalCounter worker="2">14561858</LocalCounter>
- <LocalCounter worker="3">14564593</LocalCounter>
- <LocalCounter worker="4">14537808</LocalCounter>
- <LocalCounter worker="5">14538183</LocalCounter>
- <LocalCounter worker="6">14568901</LocalCounter>
- <LocalCounter worker="7">14571570</LocalCounter>
- <LocalCounter worker="8">14824939</LocalCounter>
- <LocalCounter worker="9">14825595</LocalCounter>
- <LocalCounter worker="10">14824563</LocalCounter>
- <LocalCounter worker="11">14824936</LocalCounter>
- <LocalCounter worker="12">14824664</LocalCounter>
- <LocalCounter worker="13">14825180</LocalCounter>
- <LocalCounter worker="14">14824622</LocalCounter>
- <LocalCounter worker="15">14824869</LocalCounter>
- <LocalCounter worker="16">15000394</LocalCounter>
- <LocalCounter worker="17">15000816</LocalCounter>
- <LocalCounter worker="18">15132415</LocalCounter>
- <LocalCounter worker="19">15132390</LocalCounter>
- <LocalCounter worker="20">14957113</LocalCounter>
- <LocalCounter worker="21">14957467</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>325254906</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="23">
- <LocalCounter worker="0">14533130</LocalCounter>
- <LocalCounter worker="1">14526680</LocalCounter>
- <LocalCounter worker="2">14523900</LocalCounter>
- <LocalCounter worker="3">14526694</LocalCounter>
- <LocalCounter worker="4">14473827</LocalCounter>
- <LocalCounter worker="5">14474177</LocalCounter>
- <LocalCounter worker="6">14530917</LocalCounter>
- <LocalCounter worker="7">14540399</LocalCounter>
- <LocalCounter worker="8">14689348</LocalCounter>
- <LocalCounter worker="9">14690045</LocalCounter>
- <LocalCounter worker="10">14689080</LocalCounter>
- <LocalCounter worker="11">14689352</LocalCounter>
- <LocalCounter worker="12">14689191</LocalCounter>
- <LocalCounter worker="13">14689822</LocalCounter>
- <LocalCounter worker="14">14689153</LocalCounter>
- <LocalCounter worker="15">14689383</LocalCounter>
- <LocalCounter worker="16">15149225</LocalCounter>
- <LocalCounter worker="17">15149721</LocalCounter>
- <LocalCounter worker="18">15149099</LocalCounter>
- <LocalCounter worker="19">15149020</LocalCounter>
- <LocalCounter worker="20">15149087</LocalCounter>
- <LocalCounter worker="21">15149374</LocalCounter>
- <LocalCounter worker="22">15723066</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>340263690</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalTicketLockWithLocalCounter activeWorker="24">
- <LocalCounter worker="0">14520191</LocalCounter>
- <LocalCounter worker="1">14521316</LocalCounter>
- <LocalCounter worker="2">14520064</LocalCounter>
- <LocalCounter worker="3">14521273</LocalCounter>
- <LocalCounter worker="4">14508861</LocalCounter>
- <LocalCounter worker="5">14509277</LocalCounter>
- <LocalCounter worker="6">14522439</LocalCounter>
- <LocalCounter worker="7">14523376</LocalCounter>
- <LocalCounter worker="8">14971139</LocalCounter>
- <LocalCounter worker="9">14971788</LocalCounter>
- <LocalCounter worker="10">14970834</LocalCounter>
- <LocalCounter worker="11">14971145</LocalCounter>
- <LocalCounter worker="12">14970850</LocalCounter>
- <LocalCounter worker="13">14971356</LocalCounter>
- <LocalCounter worker="14">14970773</LocalCounter>
- <LocalCounter worker="15">14971212</LocalCounter>
- <LocalCounter worker="16">14302288</LocalCounter>
- <LocalCounter worker="17">14302674</LocalCounter>
- <LocalCounter worker="18">14292318</LocalCounter>
- <LocalCounter worker="19">14292258</LocalCounter>
- <LocalCounter worker="20">14327757</LocalCounter>
- <LocalCounter worker="21">14328109</LocalCounter>
- <LocalCounter worker="22">14203917</LocalCounter>
- <LocalCounter worker="23">14204596</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>350169811</SumOfLocalCounter>
- </LocalTicketLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="1">
- <LocalCounter worker="0">12082070</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>12082070</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="2">
- <LocalCounter worker="0">11860565</LocalCounter>
- <LocalCounter worker="1">11861524</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>23722089</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="3">
- <LocalCounter worker="0">10937185</LocalCounter>
- <LocalCounter worker="1">11666176</LocalCounter>
- <LocalCounter worker="2">11377885</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>33981246</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="4">
- <LocalCounter worker="0">10711169</LocalCounter>
- <LocalCounter worker="1">11044642</LocalCounter>
- <LocalCounter worker="2">10712186</LocalCounter>
- <LocalCounter worker="3">10711772</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>43179769</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="5">
- <LocalCounter worker="0">10681736</LocalCounter>
- <LocalCounter worker="1">10803241</LocalCounter>
- <LocalCounter worker="2">10697774</LocalCounter>
- <LocalCounter worker="3">10697365</LocalCounter>
- <LocalCounter worker="4">10786731</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>53666847</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="6">
- <LocalCounter worker="0">10202899</LocalCounter>
- <LocalCounter worker="1">10453899</LocalCounter>
- <LocalCounter worker="2">10236078</LocalCounter>
- <LocalCounter worker="3">10235641</LocalCounter>
- <LocalCounter worker="4">10203405</LocalCounter>
- <LocalCounter worker="5">10435466</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>61767388</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="7">
- <LocalCounter worker="0">10057432</LocalCounter>
- <LocalCounter worker="1">10126310</LocalCounter>
- <LocalCounter worker="2">10062880</LocalCounter>
- <LocalCounter worker="3">10062441</LocalCounter>
- <LocalCounter worker="4">10056560</LocalCounter>
- <LocalCounter worker="5">10117801</LocalCounter>
- <LocalCounter worker="6">10136814</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>70620238</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="8">
- <LocalCounter worker="0">9534620</LocalCounter>
- <LocalCounter worker="1">9563972</LocalCounter>
- <LocalCounter worker="2">9529566</LocalCounter>
- <LocalCounter worker="3">9529136</LocalCounter>
- <LocalCounter worker="4">9534974</LocalCounter>
- <LocalCounter worker="5">9559121</LocalCounter>
- <LocalCounter worker="6">9532504</LocalCounter>
- <LocalCounter worker="7">9532098</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>76315991</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="9">
- <LocalCounter worker="0">9588196</LocalCounter>
- <LocalCounter worker="1">9644812</LocalCounter>
- <LocalCounter worker="2">9569541</LocalCounter>
- <LocalCounter worker="3">9569144</LocalCounter>
- <LocalCounter worker="4">9588269</LocalCounter>
- <LocalCounter worker="5">9635446</LocalCounter>
- <LocalCounter worker="6">9587520</LocalCounter>
- <LocalCounter worker="7">9587124</LocalCounter>
- <LocalCounter worker="8">12171038</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>88941090</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="10">
- <LocalCounter worker="0">9494406</LocalCounter>
- <LocalCounter worker="1">9569092</LocalCounter>
- <LocalCounter worker="2">9483166</LocalCounter>
- <LocalCounter worker="3">9482828</LocalCounter>
- <LocalCounter worker="4">9494096</LocalCounter>
- <LocalCounter worker="5">9549855</LocalCounter>
- <LocalCounter worker="6">9493566</LocalCounter>
- <LocalCounter worker="7">9493228</LocalCounter>
- <LocalCounter worker="8">11870461</LocalCounter>
- <LocalCounter worker="9">11870751</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>99801449</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="11">
- <LocalCounter worker="0">9547513</LocalCounter>
- <LocalCounter worker="1">9618639</LocalCounter>
- <LocalCounter worker="2">9531079</LocalCounter>
- <LocalCounter worker="3">9530708</LocalCounter>
- <LocalCounter worker="4">9544013</LocalCounter>
- <LocalCounter worker="5">9582528</LocalCounter>
- <LocalCounter worker="6">9546188</LocalCounter>
- <LocalCounter worker="7">9545855</LocalCounter>
- <LocalCounter worker="8">10981480</LocalCounter>
- <LocalCounter worker="9">11695200</LocalCounter>
- <LocalCounter worker="10">11417956</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>110541159</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="12">
- <LocalCounter worker="0">9480940</LocalCounter>
- <LocalCounter worker="1">9534711</LocalCounter>
- <LocalCounter worker="2">9471781</LocalCounter>
- <LocalCounter worker="3">9471472</LocalCounter>
- <LocalCounter worker="4">9481875</LocalCounter>
- <LocalCounter worker="5">9525995</LocalCounter>
- <LocalCounter worker="6">9478339</LocalCounter>
- <LocalCounter worker="7">9478029</LocalCounter>
- <LocalCounter worker="8">10711265</LocalCounter>
- <LocalCounter worker="9">11114755</LocalCounter>
- <LocalCounter worker="10">10711627</LocalCounter>
- <LocalCounter worker="11">10711294</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>119172083</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="13">
- <LocalCounter worker="0">9546022</LocalCounter>
- <LocalCounter worker="1">9587726</LocalCounter>
- <LocalCounter worker="2">9539512</LocalCounter>
- <LocalCounter worker="3">9539112</LocalCounter>
- <LocalCounter worker="4">9546798</LocalCounter>
- <LocalCounter worker="5">9572802</LocalCounter>
- <LocalCounter worker="6">9547437</LocalCounter>
- <LocalCounter worker="7">9547014</LocalCounter>
- <LocalCounter worker="8">10700918</LocalCounter>
- <LocalCounter worker="9">10778357</LocalCounter>
- <LocalCounter worker="10">10711682</LocalCounter>
- <LocalCounter worker="11">10711355</LocalCounter>
- <LocalCounter worker="12">10766560</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>130095295</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="14">
- <LocalCounter worker="0">9529110</LocalCounter>
- <LocalCounter worker="1">9587899</LocalCounter>
- <LocalCounter worker="2">9523029</LocalCounter>
- <LocalCounter worker="3">9522600</LocalCounter>
- <LocalCounter worker="4">9529393</LocalCounter>
- <LocalCounter worker="5">9562307</LocalCounter>
- <LocalCounter worker="6">9531767</LocalCounter>
- <LocalCounter worker="7">9531364</LocalCounter>
- <LocalCounter worker="8">10124795</LocalCounter>
- <LocalCounter worker="9">10538492</LocalCounter>
- <LocalCounter worker="10">10167869</LocalCounter>
- <LocalCounter worker="11">10167494</LocalCounter>
- <LocalCounter worker="12">10101866</LocalCounter>
- <LocalCounter worker="13">10500389</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>137918374</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="15">
- <LocalCounter worker="0">9566449</LocalCounter>
- <LocalCounter worker="1">9604833</LocalCounter>
- <LocalCounter worker="2">9559288</LocalCounter>
- <LocalCounter worker="3">9558898</LocalCounter>
- <LocalCounter worker="4">9567098</LocalCounter>
- <LocalCounter worker="5">9599387</LocalCounter>
- <LocalCounter worker="6">9566496</LocalCounter>
- <LocalCounter worker="7">9566147</LocalCounter>
- <LocalCounter worker="8">10075047</LocalCounter>
- <LocalCounter worker="9">10164135</LocalCounter>
- <LocalCounter worker="10">10082703</LocalCounter>
- <LocalCounter worker="11">10082326</LocalCounter>
- <LocalCounter worker="12">10075244</LocalCounter>
- <LocalCounter worker="13">10155140</LocalCounter>
- <LocalCounter worker="14">10178314</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>147401505</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="16">
- <LocalCounter worker="0">9508977</LocalCounter>
- <LocalCounter worker="1">9585956</LocalCounter>
- <LocalCounter worker="2">9501428</LocalCounter>
- <LocalCounter worker="3">9501014</LocalCounter>
- <LocalCounter worker="4">9508465</LocalCounter>
- <LocalCounter worker="5">9556360</LocalCounter>
- <LocalCounter worker="6">9512315</LocalCounter>
- <LocalCounter worker="7">9511916</LocalCounter>
- <LocalCounter worker="8">9534416</LocalCounter>
- <LocalCounter worker="9">9549972</LocalCounter>
- <LocalCounter worker="10">9531251</LocalCounter>
- <LocalCounter worker="11">9530849</LocalCounter>
- <LocalCounter worker="12">9535299</LocalCounter>
- <LocalCounter worker="13">9547690</LocalCounter>
- <LocalCounter worker="14">9533669</LocalCounter>
- <LocalCounter worker="15">9533330</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>152482907</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="17">
- <LocalCounter worker="0">9456577</LocalCounter>
- <LocalCounter worker="1">9518572</LocalCounter>
- <LocalCounter worker="2">9448329</LocalCounter>
- <LocalCounter worker="3">9447904</LocalCounter>
- <LocalCounter worker="4">9456755</LocalCounter>
- <LocalCounter worker="5">9492156</LocalCounter>
- <LocalCounter worker="6">9456619</LocalCounter>
- <LocalCounter worker="7">9456290</LocalCounter>
- <LocalCounter worker="8">9469695</LocalCounter>
- <LocalCounter worker="9">9504090</LocalCounter>
- <LocalCounter worker="10">9467165</LocalCounter>
- <LocalCounter worker="11">9466779</LocalCounter>
- <LocalCounter worker="12">9469736</LocalCounter>
- <LocalCounter worker="13">9490753</LocalCounter>
- <LocalCounter worker="14">9470460</LocalCounter>
- <LocalCounter worker="15">9470100</LocalCounter>
- <LocalCounter worker="16">12081737</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>163623717</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="18">
- <LocalCounter worker="0">9528572</LocalCounter>
- <LocalCounter worker="1">9578324</LocalCounter>
- <LocalCounter worker="2">9512159</LocalCounter>
- <LocalCounter worker="3">9511743</LocalCounter>
- <LocalCounter worker="4">9526173</LocalCounter>
- <LocalCounter worker="5">9569951</LocalCounter>
- <LocalCounter worker="6">9534866</LocalCounter>
- <LocalCounter worker="7">9534526</LocalCounter>
- <LocalCounter worker="8">9544758</LocalCounter>
- <LocalCounter worker="9">9593215</LocalCounter>
- <LocalCounter worker="10">9539533</LocalCounter>
- <LocalCounter worker="11">9539119</LocalCounter>
- <LocalCounter worker="12">9545198</LocalCounter>
- <LocalCounter worker="13">9585695</LocalCounter>
- <LocalCounter worker="14">9543578</LocalCounter>
- <LocalCounter worker="15">9543186</LocalCounter>
- <LocalCounter worker="16">11927396</LocalCounter>
- <LocalCounter worker="17">11927804</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>176585796</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="19">
- <LocalCounter worker="0">9477447</LocalCounter>
- <LocalCounter worker="1">9564597</LocalCounter>
- <LocalCounter worker="2">9452396</LocalCounter>
- <LocalCounter worker="3">9451981</LocalCounter>
- <LocalCounter worker="4">9473225</LocalCounter>
- <LocalCounter worker="5">9533594</LocalCounter>
- <LocalCounter worker="6">9478730</LocalCounter>
- <LocalCounter worker="7">9478355</LocalCounter>
- <LocalCounter worker="8">9491282</LocalCounter>
- <LocalCounter worker="9">9542542</LocalCounter>
- <LocalCounter worker="10">9469974</LocalCounter>
- <LocalCounter worker="11">9469570</LocalCounter>
- <LocalCounter worker="12">9488649</LocalCounter>
- <LocalCounter worker="13">9533937</LocalCounter>
- <LocalCounter worker="14">9493941</LocalCounter>
- <LocalCounter worker="15">9493595</LocalCounter>
- <LocalCounter worker="16">10869069</LocalCounter>
- <LocalCounter worker="17">11610326</LocalCounter>
- <LocalCounter worker="18">11333158</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>185706368</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="20">
- <LocalCounter worker="0">9513336</LocalCounter>
- <LocalCounter worker="1">9581580</LocalCounter>
- <LocalCounter worker="2">9502256</LocalCounter>
- <LocalCounter worker="3">9501888</LocalCounter>
- <LocalCounter worker="4">9514403</LocalCounter>
- <LocalCounter worker="5">9561923</LocalCounter>
- <LocalCounter worker="6">9510586</LocalCounter>
- <LocalCounter worker="7">9510218</LocalCounter>
- <LocalCounter worker="8">9577756</LocalCounter>
- <LocalCounter worker="9">9601845</LocalCounter>
- <LocalCounter worker="10">9576720</LocalCounter>
- <LocalCounter worker="11">9576333</LocalCounter>
- <LocalCounter worker="12">9576562</LocalCounter>
- <LocalCounter worker="13">9591627</LocalCounter>
- <LocalCounter worker="14">9575875</LocalCounter>
- <LocalCounter worker="15">9575454</LocalCounter>
- <LocalCounter worker="16">10774344</LocalCounter>
- <LocalCounter worker="17">11131500</LocalCounter>
- <LocalCounter worker="18">10795173</LocalCounter>
- <LocalCounter worker="19">10794817</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>196344196</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="21">
- <LocalCounter worker="0">9489784</LocalCounter>
- <LocalCounter worker="1">9553505</LocalCounter>
- <LocalCounter worker="2">9480407</LocalCounter>
- <LocalCounter worker="3">9480031</LocalCounter>
- <LocalCounter worker="4">9487187</LocalCounter>
- <LocalCounter worker="5">9517609</LocalCounter>
- <LocalCounter worker="6">9490215</LocalCounter>
- <LocalCounter worker="7">9489795</LocalCounter>
- <LocalCounter worker="8">9480100</LocalCounter>
- <LocalCounter worker="9">9512956</LocalCounter>
- <LocalCounter worker="10">9469789</LocalCounter>
- <LocalCounter worker="11">9469408</LocalCounter>
- <LocalCounter worker="12">9478224</LocalCounter>
- <LocalCounter worker="13">9507407</LocalCounter>
- <LocalCounter worker="14">9480884</LocalCounter>
- <LocalCounter worker="15">9480522</LocalCounter>
- <LocalCounter worker="16">10558463</LocalCounter>
- <LocalCounter worker="17">10781768</LocalCounter>
- <LocalCounter worker="18">10586536</LocalCounter>
- <LocalCounter worker="19">10586157</LocalCounter>
- <LocalCounter worker="20">10751665</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>205132412</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="22">
- <LocalCounter worker="0">9529280</LocalCounter>
- <LocalCounter worker="1">9596479</LocalCounter>
- <LocalCounter worker="2">9526225</LocalCounter>
- <LocalCounter worker="3">9525841</LocalCounter>
- <LocalCounter worker="4">9530068</LocalCounter>
- <LocalCounter worker="5">9560604</LocalCounter>
- <LocalCounter worker="6">9526967</LocalCounter>
- <LocalCounter worker="7">9526692</LocalCounter>
- <LocalCounter worker="8">9535973</LocalCounter>
- <LocalCounter worker="9">9579641</LocalCounter>
- <LocalCounter worker="10">9521811</LocalCounter>
- <LocalCounter worker="11">9521452</LocalCounter>
- <LocalCounter worker="12">9533157</LocalCounter>
- <LocalCounter worker="13">9572320</LocalCounter>
- <LocalCounter worker="14">9537636</LocalCounter>
- <LocalCounter worker="15">9537265</LocalCounter>
- <LocalCounter worker="16">10282870</LocalCounter>
- <LocalCounter worker="17">10460861</LocalCounter>
- <LocalCounter worker="18">10307364</LocalCounter>
- <LocalCounter worker="19">10307036</LocalCounter>
- <LocalCounter worker="20">10284193</LocalCounter>
- <LocalCounter worker="21">10447335</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>214751070</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="23">
- <LocalCounter worker="0">9474195</LocalCounter>
- <LocalCounter worker="1">9526351</LocalCounter>
- <LocalCounter worker="2">9466045</LocalCounter>
- <LocalCounter worker="3">9465650</LocalCounter>
- <LocalCounter worker="4">9474273</LocalCounter>
- <LocalCounter worker="5">9509635</LocalCounter>
- <LocalCounter worker="6">9475163</LocalCounter>
- <LocalCounter worker="7">9474803</LocalCounter>
- <LocalCounter worker="8">9527687</LocalCounter>
- <LocalCounter worker="9">9582242</LocalCounter>
- <LocalCounter worker="10">9516774</LocalCounter>
- <LocalCounter worker="11">9516407</LocalCounter>
- <LocalCounter worker="12">9526734</LocalCounter>
- <LocalCounter worker="13">9556254</LocalCounter>
- <LocalCounter worker="14">9528842</LocalCounter>
- <LocalCounter worker="15">9528456</LocalCounter>
- <LocalCounter worker="16">9971596</LocalCounter>
- <LocalCounter worker="17">10094615</LocalCounter>
- <LocalCounter worker="18">9984885</LocalCounter>
- <LocalCounter worker="19">9984498</LocalCounter>
- <LocalCounter worker="20">9969546</LocalCounter>
- <LocalCounter worker="21">10080306</LocalCounter>
- <LocalCounter worker="22">10113352</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>222348309</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalMCSLockWithLocalCounter activeWorker="24">
- <LocalCounter worker="0">9570183</LocalCounter>
- <LocalCounter worker="1">9596856</LocalCounter>
- <LocalCounter worker="2">9566396</LocalCounter>
- <LocalCounter worker="3">9565955</LocalCounter>
- <LocalCounter worker="4">9570347</LocalCounter>
- <LocalCounter worker="5">9592890</LocalCounter>
- <LocalCounter worker="6">9571708</LocalCounter>
- <LocalCounter worker="7">9571344</LocalCounter>
- <LocalCounter worker="8">9568931</LocalCounter>
- <LocalCounter worker="9">9609557</LocalCounter>
- <LocalCounter worker="10">9562498</LocalCounter>
- <LocalCounter worker="11">9562127</LocalCounter>
- <LocalCounter worker="12">9567335</LocalCounter>
- <LocalCounter worker="13">9602518</LocalCounter>
- <LocalCounter worker="14">9566096</LocalCounter>
- <LocalCounter worker="15">9565736</LocalCounter>
- <LocalCounter worker="16">9608409</LocalCounter>
- <LocalCounter worker="17">9631716</LocalCounter>
- <LocalCounter worker="18">9604886</LocalCounter>
- <LocalCounter worker="19">9604505</LocalCounter>
- <LocalCounter worker="20">9607807</LocalCounter>
- <LocalCounter worker="21">9629640</LocalCounter>
- <LocalCounter worker="22">9603907</LocalCounter>
- <LocalCounter worker="23">9629626</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>230130973</SumOfLocalCounter>
- </LocalMCSLockWithLocalCounter>
- <LocalTicketLockWithGlobalCounter activeWorker="24">
- <LocalCounter worker="0">903446</LocalCounter>
- <LocalCounter worker="1">903762</LocalCounter>
- <LocalCounter worker="2">903658</LocalCounter>
- <LocalCounter worker="3">903679</LocalCounter>
- <LocalCounter worker="4">903658</LocalCounter>
- <LocalCounter worker="5">903690</LocalCounter>
- <LocalCounter worker="6">903665</LocalCounter>
- <LocalCounter worker="7">903667</LocalCounter>
- <LocalCounter worker="8">905432</LocalCounter>
- <LocalCounter worker="9">905463</LocalCounter>
- <LocalCounter worker="10">905415</LocalCounter>
- <LocalCounter worker="11">905426</LocalCounter>
- <LocalCounter worker="12">905442</LocalCounter>
- <LocalCounter worker="13">905442</LocalCounter>
- <LocalCounter worker="14">905434</LocalCounter>
- <LocalCounter worker="15">905417</LocalCounter>
- <LocalCounter worker="16">902746</LocalCounter>
- <LocalCounter worker="17">902734</LocalCounter>
- <LocalCounter worker="18">902731</LocalCounter>
- <LocalCounter worker="19">902719</LocalCounter>
- <LocalCounter worker="20">902734</LocalCounter>
- <LocalCounter worker="21">902750</LocalCounter>
- <LocalCounter worker="22">902746</LocalCounter>
- <LocalCounter worker="23">902708</LocalCounter>
- <GlobalCounter>2057722</GlobalCounter>
- <SumOfLocalCounter>21694564</SumOfLocalCounter>
- </LocalTicketLockWithGlobalCounter>
- <LocalMCSLockWithGlobalCounter activeWorker="24">
- <LocalCounter worker="0">859801</LocalCounter>
- <LocalCounter worker="1">967785</LocalCounter>
- <LocalCounter worker="2">883645</LocalCounter>
- <LocalCounter worker="3">883619</LocalCounter>
- <LocalCounter worker="4">860037</LocalCounter>
- <LocalCounter worker="5">968025</LocalCounter>
- <LocalCounter worker="6">883058</LocalCounter>
- <LocalCounter worker="7">883016</LocalCounter>
- <LocalCounter worker="8">865337</LocalCounter>
- <LocalCounter worker="9">974824</LocalCounter>
- <LocalCounter worker="10">882369</LocalCounter>
- <LocalCounter worker="11">882341</LocalCounter>
- <LocalCounter worker="12">863544</LocalCounter>
- <LocalCounter worker="13">972159</LocalCounter>
- <LocalCounter worker="14">892721</LocalCounter>
- <LocalCounter worker="15">892715</LocalCounter>
- <LocalCounter worker="16">857049</LocalCounter>
- <LocalCounter worker="17">963725</LocalCounter>
- <LocalCounter worker="18">880627</LocalCounter>
- <LocalCounter worker="19">880584</LocalCounter>
- <LocalCounter worker="20">856853</LocalCounter>
- <LocalCounter worker="21">963380</LocalCounter>
- <LocalCounter worker="22">854026</LocalCounter>
- <LocalCounter worker="23">952345</LocalCounter>
- <GlobalCounter>1763851</GlobalCounter>
- <SumOfLocalCounter>21623585</SumOfLocalCounter>
- </LocalMCSLockWithGlobalCounter>
- <GlobalTicketLockWithBusySection activeWorker="24">
- <LocalCounter worker="0">122500</LocalCounter>
- <LocalCounter worker="1">122500</LocalCounter>
- <LocalCounter worker="2">122500</LocalCounter>
- <LocalCounter worker="3">122500</LocalCounter>
- <LocalCounter worker="4">122499</LocalCounter>
- <LocalCounter worker="5">122500</LocalCounter>
- <LocalCounter worker="6">122500</LocalCounter>
- <LocalCounter worker="7">122500</LocalCounter>
- <LocalCounter worker="8">122500</LocalCounter>
- <LocalCounter worker="9">122500</LocalCounter>
- <LocalCounter worker="10">122500</LocalCounter>
- <LocalCounter worker="11">122500</LocalCounter>
- <LocalCounter worker="12">122500</LocalCounter>
- <LocalCounter worker="13">122500</LocalCounter>
- <LocalCounter worker="14">122500</LocalCounter>
- <LocalCounter worker="15">122500</LocalCounter>
- <LocalCounter worker="16">122499</LocalCounter>
- <LocalCounter worker="17">122501</LocalCounter>
- <LocalCounter worker="18">122500</LocalCounter>
- <LocalCounter worker="19">122500</LocalCounter>
- <LocalCounter worker="20">122501</LocalCounter>
- <LocalCounter worker="21">122501</LocalCounter>
- <LocalCounter worker="22">122501</LocalCounter>
- <LocalCounter worker="23">122501</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2940003</SumOfLocalCounter>
- </GlobalTicketLockWithBusySection>
- <GlobalMCSLockWithBusySection activeWorker="24">
- <LocalCounter worker="0">109856</LocalCounter>
- <LocalCounter worker="1">109857</LocalCounter>
- <LocalCounter worker="2">109857</LocalCounter>
- <LocalCounter worker="3">109856</LocalCounter>
- <LocalCounter worker="4">109857</LocalCounter>
- <LocalCounter worker="5">109856</LocalCounter>
- <LocalCounter worker="6">109857</LocalCounter>
- <LocalCounter worker="7">109857</LocalCounter>
- <LocalCounter worker="8">109856</LocalCounter>
- <LocalCounter worker="9">109856</LocalCounter>
- <LocalCounter worker="10">109857</LocalCounter>
- <LocalCounter worker="11">109858</LocalCounter>
- <LocalCounter worker="12">109858</LocalCounter>
- <LocalCounter worker="13">109857</LocalCounter>
- <LocalCounter worker="14">109856</LocalCounter>
- <LocalCounter worker="15">109856</LocalCounter>
- <LocalCounter worker="16">109858</LocalCounter>
- <LocalCounter worker="17">109857</LocalCounter>
- <LocalCounter worker="18">109857</LocalCounter>
- <LocalCounter worker="19">109857</LocalCounter>
- <LocalCounter worker="20">109856</LocalCounter>
- <LocalCounter worker="21">109857</LocalCounter>
- <LocalCounter worker="22">109856</LocalCounter>
- <LocalCounter worker="23">109857</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2636562</SumOfLocalCounter>
- </GlobalMCSLockWithBusySection>
- <SequenceLock activeWorker="24">
- <LocalCounter worker="0">2443697</LocalCounter>
- <LocalCounter worker="1">1</LocalCounter>
- <LocalCounter worker="2">11</LocalCounter>
- <LocalCounter worker="3">19</LocalCounter>
- <LocalCounter worker="4">34</LocalCounter>
- <LocalCounter worker="5">4</LocalCounter>
- <LocalCounter worker="6">11</LocalCounter>
- <LocalCounter worker="7">27</LocalCounter>
- <LocalCounter worker="8">738</LocalCounter>
- <LocalCounter worker="9">715</LocalCounter>
- <LocalCounter worker="10">708</LocalCounter>
- <LocalCounter worker="11">710</LocalCounter>
- <LocalCounter worker="12">716</LocalCounter>
- <LocalCounter worker="13">722</LocalCounter>
- <LocalCounter worker="14">663</LocalCounter>
- <LocalCounter worker="15">680</LocalCounter>
- <LocalCounter worker="16">818</LocalCounter>
- <LocalCounter worker="17">816</LocalCounter>
- <LocalCounter worker="18">798</LocalCounter>
- <LocalCounter worker="19">793</LocalCounter>
- <LocalCounter worker="20">749</LocalCounter>
- <LocalCounter worker="21">737</LocalCounter>
- <LocalCounter worker="22">681</LocalCounter>
- <LocalCounter worker="23">713</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2455561</SumOfLocalCounter>
- </SequenceLock>
- <GlobalTASLockWithLocalCounter activeWorker="1">
- <LocalCounter worker="0">19899718</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>19899718</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="2">
- <LocalCounter worker="0">11323121</LocalCounter>
- <LocalCounter worker="1">8390566</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>19713687</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="3">
- <LocalCounter worker="0">3505442</LocalCounter>
- <LocalCounter worker="1">3505599</LocalCounter>
- <LocalCounter worker="2">12137521</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>19148562</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="4">
- <LocalCounter worker="0">3973366</LocalCounter>
- <LocalCounter worker="1">3973543</LocalCounter>
- <LocalCounter worker="2">5643661</LocalCounter>
- <LocalCounter worker="3">5644098</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>19234668</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="5">
- <LocalCounter worker="0">3605358</LocalCounter>
- <LocalCounter worker="1">3605432</LocalCounter>
- <LocalCounter worker="2">5184535</LocalCounter>
- <LocalCounter worker="3">5184801</LocalCounter>
- <LocalCounter worker="4">1514959</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>19095085</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="6">
- <LocalCounter worker="0">3062204</LocalCounter>
- <LocalCounter worker="1">3061638</LocalCounter>
- <LocalCounter worker="2">2657329</LocalCounter>
- <LocalCounter worker="3">2657997</LocalCounter>
- <LocalCounter worker="4">3694149</LocalCounter>
- <LocalCounter worker="5">3693569</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>18826886</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="7">
- <LocalCounter worker="0">1413952</LocalCounter>
- <LocalCounter worker="1">1413322</LocalCounter>
- <LocalCounter worker="2">5634774</LocalCounter>
- <LocalCounter worker="3">5634907</LocalCounter>
- <LocalCounter worker="4">807079</LocalCounter>
- <LocalCounter worker="5">806823</LocalCounter>
- <LocalCounter worker="6">2780299</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>18491156</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="8">
- <LocalCounter worker="0">2266504</LocalCounter>
- <LocalCounter worker="1">2264023</LocalCounter>
- <LocalCounter worker="2">2150464</LocalCounter>
- <LocalCounter worker="3">2152501</LocalCounter>
- <LocalCounter worker="4">2234184</LocalCounter>
- <LocalCounter worker="5">2235885</LocalCounter>
- <LocalCounter worker="6">2045159</LocalCounter>
- <LocalCounter worker="7">2042094</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>17390814</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="9">
- <LocalCounter worker="0">378978</LocalCounter>
- <LocalCounter worker="1">493897</LocalCounter>
- <LocalCounter worker="2">540956</LocalCounter>
- <LocalCounter worker="3">307717</LocalCounter>
- <LocalCounter worker="4">559266</LocalCounter>
- <LocalCounter worker="5">435771</LocalCounter>
- <LocalCounter worker="6">289002</LocalCounter>
- <LocalCounter worker="7">524768</LocalCounter>
- <LocalCounter worker="8">904</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>3531259</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="10">
- <LocalCounter worker="0">315240</LocalCounter>
- <LocalCounter worker="1">314639</LocalCounter>
- <LocalCounter worker="2">343225</LocalCounter>
- <LocalCounter worker="3">343430</LocalCounter>
- <LocalCounter worker="4">330617</LocalCounter>
- <LocalCounter worker="5">273430</LocalCounter>
- <LocalCounter worker="6">114457</LocalCounter>
- <LocalCounter worker="7">400594</LocalCounter>
- <LocalCounter worker="8">199708</LocalCounter>
- <LocalCounter worker="9">398954</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>3034294</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="11">
- <LocalCounter worker="0">398649</LocalCounter>
- <LocalCounter worker="1">243725</LocalCounter>
- <LocalCounter worker="2">313197</LocalCounter>
- <LocalCounter worker="3">341559</LocalCounter>
- <LocalCounter worker="4">400879</LocalCounter>
- <LocalCounter worker="5">485957</LocalCounter>
- <LocalCounter worker="6">256149</LocalCounter>
- <LocalCounter worker="7">312463</LocalCounter>
- <LocalCounter worker="8">79929</LocalCounter>
- <LocalCounter worker="9">79959</LocalCounter>
- <LocalCounter worker="10">61</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2912527</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="12">
- <LocalCounter worker="0">200097</LocalCounter>
- <LocalCounter worker="1">314280</LocalCounter>
- <LocalCounter worker="2">484541</LocalCounter>
- <LocalCounter worker="3">400413</LocalCounter>
- <LocalCounter worker="4">187776</LocalCounter>
- <LocalCounter worker="5">244998</LocalCounter>
- <LocalCounter worker="6">244859</LocalCounter>
- <LocalCounter worker="7">330577</LocalCounter>
- <LocalCounter worker="8">159931</LocalCounter>
- <LocalCounter worker="9">122121</LocalCounter>
- <LocalCounter worker="10">159973</LocalCounter>
- <LocalCounter worker="11">199451</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>3049017</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="13">
- <LocalCounter worker="0">104</LocalCounter>
- <LocalCounter worker="1">145</LocalCounter>
- <LocalCounter worker="2">209</LocalCounter>
- <LocalCounter worker="3">169</LocalCounter>
- <LocalCounter worker="4">206</LocalCounter>
- <LocalCounter worker="5">120</LocalCounter>
- <LocalCounter worker="6">166</LocalCounter>
- <LocalCounter worker="7">188</LocalCounter>
- <LocalCounter worker="8">798353</LocalCounter>
- <LocalCounter worker="9">639101</LocalCounter>
- <LocalCounter worker="10">1237960</LocalCounter>
- <LocalCounter worker="11">840661</LocalCounter>
- <LocalCounter worker="12">439274</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>3956656</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="14">
- <LocalCounter worker="0">80</LocalCounter>
- <LocalCounter worker="1">111</LocalCounter>
- <LocalCounter worker="2">119</LocalCounter>
- <LocalCounter worker="3">149</LocalCounter>
- <LocalCounter worker="4">169</LocalCounter>
- <LocalCounter worker="5">117</LocalCounter>
- <LocalCounter worker="6">126</LocalCounter>
- <LocalCounter worker="7">139</LocalCounter>
- <LocalCounter worker="8">574829</LocalCounter>
- <LocalCounter worker="9">803988</LocalCounter>
- <LocalCounter worker="10">370549</LocalCounter>
- <LocalCounter worker="11">846318</LocalCounter>
- <LocalCounter worker="12">608269</LocalCounter>
- <LocalCounter worker="13">608119</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>3813082</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="15">
- <LocalCounter worker="0">8</LocalCounter>
- <LocalCounter worker="1">20</LocalCounter>
- <LocalCounter worker="2">34</LocalCounter>
- <LocalCounter worker="3">65</LocalCounter>
- <LocalCounter worker="4">84</LocalCounter>
- <LocalCounter worker="5">38</LocalCounter>
- <LocalCounter worker="6">60</LocalCounter>
- <LocalCounter worker="7">95</LocalCounter>
- <LocalCounter worker="8">482715</LocalCounter>
- <LocalCounter worker="9">607538</LocalCounter>
- <LocalCounter worker="10">482392</LocalCounter>
- <LocalCounter worker="11">667855</LocalCounter>
- <LocalCounter worker="12">409336</LocalCounter>
- <LocalCounter worker="13">630426</LocalCounter>
- <LocalCounter worker="14">408163</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>3688829</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="16">
- <LocalCounter worker="0">117285</LocalCounter>
- <LocalCounter worker="1">117670</LocalCounter>
- <LocalCounter worker="2">117122</LocalCounter>
- <LocalCounter worker="3">116813</LocalCounter>
- <LocalCounter worker="4">117713</LocalCounter>
- <LocalCounter worker="5">117774</LocalCounter>
- <LocalCounter worker="6">117459</LocalCounter>
- <LocalCounter worker="7">117328</LocalCounter>
- <LocalCounter worker="8">303833</LocalCounter>
- <LocalCounter worker="9">326784</LocalCounter>
- <LocalCounter worker="10">277325</LocalCounter>
- <LocalCounter worker="11">373516</LocalCounter>
- <LocalCounter worker="12">263215</LocalCounter>
- <LocalCounter worker="13">390871</LocalCounter>
- <LocalCounter worker="14">446935</LocalCounter>
- <LocalCounter worker="15">301501</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>3623144</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="17">
- <LocalCounter worker="0">341558</LocalCounter>
- <LocalCounter worker="1">231787</LocalCounter>
- <LocalCounter worker="2">347677</LocalCounter>
- <LocalCounter worker="3">218478</LocalCounter>
- <LocalCounter worker="4">303719</LocalCounter>
- <LocalCounter worker="5">154437</LocalCounter>
- <LocalCounter worker="6">229631</LocalCounter>
- <LocalCounter worker="7">216461</LocalCounter>
- <LocalCounter worker="8">123537</LocalCounter>
- <LocalCounter worker="9">103366</LocalCounter>
- <LocalCounter worker="10">55161</LocalCounter>
- <LocalCounter worker="11">90025</LocalCounter>
- <LocalCounter worker="12">84691</LocalCounter>
- <LocalCounter worker="13">68924</LocalCounter>
- <LocalCounter worker="14">53786</LocalCounter>
- <LocalCounter worker="15">190767</LocalCounter>
- <LocalCounter worker="16">986</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2814991</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="18">
- <LocalCounter worker="0">200069</LocalCounter>
- <LocalCounter worker="1">264598</LocalCounter>
- <LocalCounter worker="2">170182</LocalCounter>
- <LocalCounter worker="3">138554</LocalCounter>
- <LocalCounter worker="4">102824</LocalCounter>
- <LocalCounter worker="5">175867</LocalCounter>
- <LocalCounter worker="6">284187</LocalCounter>
- <LocalCounter worker="7">164345</LocalCounter>
- <LocalCounter worker="8">233732</LocalCounter>
- <LocalCounter worker="9">178177</LocalCounter>
- <LocalCounter worker="10">140189</LocalCounter>
- <LocalCounter worker="11">153958</LocalCounter>
- <LocalCounter worker="12">123252</LocalCounter>
- <LocalCounter worker="13">227322</LocalCounter>
- <LocalCounter worker="14">194095</LocalCounter>
- <LocalCounter worker="15">54981</LocalCounter>
- <LocalCounter worker="16">1079</LocalCounter>
- <LocalCounter worker="17">1026</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2808437</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="19">
- <LocalCounter worker="0">321115</LocalCounter>
- <LocalCounter worker="1">371397</LocalCounter>
- <LocalCounter worker="2">225899</LocalCounter>
- <LocalCounter worker="3">354262</LocalCounter>
- <LocalCounter worker="4">361476</LocalCounter>
- <LocalCounter worker="5">350114</LocalCounter>
- <LocalCounter worker="6">291933</LocalCounter>
- <LocalCounter worker="7">196999</LocalCounter>
- <LocalCounter worker="8">22397</LocalCounter>
- <LocalCounter worker="9">25153</LocalCounter>
- <LocalCounter worker="10">102182</LocalCounter>
- <LocalCounter worker="11">21372</LocalCounter>
- <LocalCounter worker="12">70582</LocalCounter>
- <LocalCounter worker="13">29948</LocalCounter>
- <LocalCounter worker="14">18969</LocalCounter>
- <LocalCounter worker="15">57177</LocalCounter>
- <LocalCounter worker="16">477</LocalCounter>
- <LocalCounter worker="17">391</LocalCounter>
- <LocalCounter worker="18">916</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2822759</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="20">
- <LocalCounter worker="0">393436</LocalCounter>
- <LocalCounter worker="1">309283</LocalCounter>
- <LocalCounter worker="2">168529</LocalCounter>
- <LocalCounter worker="3">224983</LocalCounter>
- <LocalCounter worker="4">196844</LocalCounter>
- <LocalCounter worker="5">140974</LocalCounter>
- <LocalCounter worker="6">197196</LocalCounter>
- <LocalCounter worker="7">84830</LocalCounter>
- <LocalCounter worker="8">111946</LocalCounter>
- <LocalCounter worker="9">111914</LocalCounter>
- <LocalCounter worker="10">112325</LocalCounter>
- <LocalCounter worker="11">112014</LocalCounter>
- <LocalCounter worker="12">168007</LocalCounter>
- <LocalCounter worker="13">111972</LocalCounter>
- <LocalCounter worker="14">112201</LocalCounter>
- <LocalCounter worker="15">252562</LocalCounter>
- <LocalCounter worker="16">49</LocalCounter>
- <LocalCounter worker="17">41</LocalCounter>
- <LocalCounter worker="18">37</LocalCounter>
- <LocalCounter worker="19">44</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2809187</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="21">
- <LocalCounter worker="0">183153</LocalCounter>
- <LocalCounter worker="1">263091</LocalCounter>
- <LocalCounter worker="2">196238</LocalCounter>
- <LocalCounter worker="3">56135</LocalCounter>
- <LocalCounter worker="4">252253</LocalCounter>
- <LocalCounter worker="5">112377</LocalCounter>
- <LocalCounter worker="6">168624</LocalCounter>
- <LocalCounter worker="7">252596</LocalCounter>
- <LocalCounter worker="8">195948</LocalCounter>
- <LocalCounter worker="9">43703</LocalCounter>
- <LocalCounter worker="10">140073</LocalCounter>
- <LocalCounter worker="11">223721</LocalCounter>
- <LocalCounter worker="12">251924</LocalCounter>
- <LocalCounter worker="13">169611</LocalCounter>
- <LocalCounter worker="14">112360</LocalCounter>
- <LocalCounter worker="15">168176</LocalCounter>
- <LocalCounter worker="16">41</LocalCounter>
- <LocalCounter worker="17">14</LocalCounter>
- <LocalCounter worker="18">29</LocalCounter>
- <LocalCounter worker="19">41</LocalCounter>
- <LocalCounter worker="20">41</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2790149</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="22">
- <LocalCounter worker="0">84315</LocalCounter>
- <LocalCounter worker="1">168428</LocalCounter>
- <LocalCounter worker="2">56084</LocalCounter>
- <LocalCounter worker="3">280784</LocalCounter>
- <LocalCounter worker="4">160642</LocalCounter>
- <LocalCounter worker="5">195812</LocalCounter>
- <LocalCounter worker="6">224182</LocalCounter>
- <LocalCounter worker="7">112335</LocalCounter>
- <LocalCounter worker="8">223416</LocalCounter>
- <LocalCounter worker="9">279221</LocalCounter>
- <LocalCounter worker="10">223306</LocalCounter>
- <LocalCounter worker="11">195550</LocalCounter>
- <LocalCounter worker="12">83826</LocalCounter>
- <LocalCounter worker="13">83644</LocalCounter>
- <LocalCounter worker="14">153478</LocalCounter>
- <LocalCounter worker="15">251574</LocalCounter>
- <LocalCounter worker="16">31</LocalCounter>
- <LocalCounter worker="17">17</LocalCounter>
- <LocalCounter worker="18">26</LocalCounter>
- <LocalCounter worker="19">27</LocalCounter>
- <LocalCounter worker="20">31</LocalCounter>
- <LocalCounter worker="21">22</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2776751</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="23">
- <LocalCounter worker="0">251094</LocalCounter>
- <LocalCounter worker="1">111612</LocalCounter>
- <LocalCounter worker="2">111946</LocalCounter>
- <LocalCounter worker="3">250878</LocalCounter>
- <LocalCounter worker="4">270360</LocalCounter>
- <LocalCounter worker="5">83918</LocalCounter>
- <LocalCounter worker="6">167667</LocalCounter>
- <LocalCounter worker="7">251032</LocalCounter>
- <LocalCounter worker="8">201670</LocalCounter>
- <LocalCounter worker="9">195227</LocalCounter>
- <LocalCounter worker="10">167446</LocalCounter>
- <LocalCounter worker="11">194880</LocalCounter>
- <LocalCounter worker="12">194852</LocalCounter>
- <LocalCounter worker="13">83768</LocalCounter>
- <LocalCounter worker="14">160169</LocalCounter>
- <LocalCounter worker="15">83658</LocalCounter>
- <LocalCounter worker="16">141</LocalCounter>
- <LocalCounter worker="17">133</LocalCounter>
- <LocalCounter worker="18">122</LocalCounter>
- <LocalCounter worker="19">117</LocalCounter>
- <LocalCounter worker="20">136</LocalCounter>
- <LocalCounter worker="21">115</LocalCounter>
- <LocalCounter worker="22">104</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2781045</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTASLockWithLocalCounter activeWorker="24">
- <LocalCounter worker="0">132034</LocalCounter>
- <LocalCounter worker="1">131676</LocalCounter>
- <LocalCounter worker="2">132311</LocalCounter>
- <LocalCounter worker="3">131443</LocalCounter>
- <LocalCounter worker="4">132250</LocalCounter>
- <LocalCounter worker="5">131733</LocalCounter>
- <LocalCounter worker="6">131193</LocalCounter>
- <LocalCounter worker="7">131281</LocalCounter>
- <LocalCounter worker="8">122650</LocalCounter>
- <LocalCounter worker="9">123113</LocalCounter>
- <LocalCounter worker="10">123745</LocalCounter>
- <LocalCounter worker="11">123264</LocalCounter>
- <LocalCounter worker="12">123158</LocalCounter>
- <LocalCounter worker="13">122764</LocalCounter>
- <LocalCounter worker="14">123050</LocalCounter>
- <LocalCounter worker="15">123616</LocalCounter>
- <LocalCounter worker="16">122054</LocalCounter>
- <LocalCounter worker="17">122876</LocalCounter>
- <LocalCounter worker="18">122080</LocalCounter>
- <LocalCounter worker="19">121904</LocalCounter>
- <LocalCounter worker="20">122223</LocalCounter>
- <LocalCounter worker="21">122088</LocalCounter>
- <LocalCounter worker="22">121899</LocalCounter>
- <LocalCounter worker="23">122670</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>3017075</SumOfLocalCounter>
- </GlobalTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="1">
- <LocalCounter worker="0">19645977</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>19645977</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="2">
- <LocalCounter worker="0">4310217</LocalCounter>
- <LocalCounter worker="1">15293675</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>19603892</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="3">
- <LocalCounter worker="0">9402863</LocalCounter>
- <LocalCounter worker="1">9226207</LocalCounter>
- <LocalCounter worker="2">437594</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>19066664</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="4">
- <LocalCounter worker="0">3386951</LocalCounter>
- <LocalCounter worker="1">3201931</LocalCounter>
- <LocalCounter worker="2">6304744</LocalCounter>
- <LocalCounter worker="3">6305238</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>19198864</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="5">
- <LocalCounter worker="0">4092852</LocalCounter>
- <LocalCounter worker="1">3899527</LocalCounter>
- <LocalCounter worker="2">2520768</LocalCounter>
- <LocalCounter worker="3">2175848</LocalCounter>
- <LocalCounter worker="4">5948549</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>18637544</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="6">
- <LocalCounter worker="0">2597841</LocalCounter>
- <LocalCounter worker="1">2443137</LocalCounter>
- <LocalCounter worker="2">3331024</LocalCounter>
- <LocalCounter worker="3">2708000</LocalCounter>
- <LocalCounter worker="4">4093981</LocalCounter>
- <LocalCounter worker="5">3080494</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>18254477</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="7">
- <LocalCounter worker="0">1216614</LocalCounter>
- <LocalCounter worker="1">2258952</LocalCounter>
- <LocalCounter worker="2">1291063</LocalCounter>
- <LocalCounter worker="3">1114575</LocalCounter>
- <LocalCounter worker="4">5532606</LocalCounter>
- <LocalCounter worker="5">5466345</LocalCounter>
- <LocalCounter worker="6">1405693</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>18285848</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="8">
- <LocalCounter worker="0">2086492</LocalCounter>
- <LocalCounter worker="1">2244683</LocalCounter>
- <LocalCounter worker="2">2112130</LocalCounter>
- <LocalCounter worker="3">2067114</LocalCounter>
- <LocalCounter worker="4">2081711</LocalCounter>
- <LocalCounter worker="5">2090180</LocalCounter>
- <LocalCounter worker="6">2168032</LocalCounter>
- <LocalCounter worker="7">2534478</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>17384820</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="9">
- <LocalCounter worker="0">634132</LocalCounter>
- <LocalCounter worker="1">601192</LocalCounter>
- <LocalCounter worker="2">480382</LocalCounter>
- <LocalCounter worker="3">657643</LocalCounter>
- <LocalCounter worker="4">592079</LocalCounter>
- <LocalCounter worker="5">740174</LocalCounter>
- <LocalCounter worker="6">465043</LocalCounter>
- <LocalCounter worker="7">642726</LocalCounter>
- <LocalCounter worker="8">3226</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>4816597</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="10">
- <LocalCounter worker="0">142972</LocalCounter>
- <LocalCounter worker="1">387723</LocalCounter>
- <LocalCounter worker="2">457567</LocalCounter>
- <LocalCounter worker="3">302196</LocalCounter>
- <LocalCounter worker="4">314638</LocalCounter>
- <LocalCounter worker="5">457645</LocalCounter>
- <LocalCounter worker="6">371900</LocalCounter>
- <LocalCounter worker="7">428999</LocalCounter>
- <LocalCounter worker="8">691</LocalCounter>
- <LocalCounter worker="9">362</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2864693</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="11">
- <LocalCounter worker="0">355770</LocalCounter>
- <LocalCounter worker="1">383778</LocalCounter>
- <LocalCounter worker="2">369646</LocalCounter>
- <LocalCounter worker="3">256341</LocalCounter>
- <LocalCounter worker="4">327558</LocalCounter>
- <LocalCounter worker="5">242178</LocalCounter>
- <LocalCounter worker="6">398681</LocalCounter>
- <LocalCounter worker="7">483955</LocalCounter>
- <LocalCounter worker="8">176</LocalCounter>
- <LocalCounter worker="9">201</LocalCounter>
- <LocalCounter worker="10">67</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2818351</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="12">
- <LocalCounter worker="0">457238</LocalCounter>
- <LocalCounter worker="1">142885</LocalCounter>
- <LocalCounter worker="2">416308</LocalCounter>
- <LocalCounter worker="3">318737</LocalCounter>
- <LocalCounter worker="4">371610</LocalCounter>
- <LocalCounter worker="5">228382</LocalCounter>
- <LocalCounter worker="6">429095</LocalCounter>
- <LocalCounter worker="7">502040</LocalCounter>
- <LocalCounter worker="8">160</LocalCounter>
- <LocalCounter worker="9">115</LocalCounter>
- <LocalCounter worker="10">191</LocalCounter>
- <LocalCounter worker="11">108</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2866869</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="13">
- <LocalCounter worker="0">155562</LocalCounter>
- <LocalCounter worker="1">155271</LocalCounter>
- <LocalCounter worker="2">154524</LocalCounter>
- <LocalCounter worker="3">155620</LocalCounter>
- <LocalCounter worker="4">155737</LocalCounter>
- <LocalCounter worker="5">155945</LocalCounter>
- <LocalCounter worker="6">156319</LocalCounter>
- <LocalCounter worker="7">155596</LocalCounter>
- <LocalCounter worker="8">526245</LocalCounter>
- <LocalCounter worker="9">524881</LocalCounter>
- <LocalCounter worker="10">495452</LocalCounter>
- <LocalCounter worker="11">497374</LocalCounter>
- <LocalCounter worker="12">586585</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>3875111</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="14">
- <LocalCounter worker="0">862</LocalCounter>
- <LocalCounter worker="1">739</LocalCounter>
- <LocalCounter worker="2">902</LocalCounter>
- <LocalCounter worker="3">876</LocalCounter>
- <LocalCounter worker="4">922</LocalCounter>
- <LocalCounter worker="5">881</LocalCounter>
- <LocalCounter worker="6">877</LocalCounter>
- <LocalCounter worker="7">945</LocalCounter>
- <LocalCounter worker="8">798225</LocalCounter>
- <LocalCounter worker="9">545250</LocalCounter>
- <LocalCounter worker="10">758729</LocalCounter>
- <LocalCounter worker="11">466001</LocalCounter>
- <LocalCounter worker="12">638255</LocalCounter>
- <LocalCounter worker="13">660193</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>3873657</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="15">
- <LocalCounter worker="0">198289</LocalCounter>
- <LocalCounter worker="1">203179</LocalCounter>
- <LocalCounter worker="2">199945</LocalCounter>
- <LocalCounter worker="3">199124</LocalCounter>
- <LocalCounter worker="4">201799</LocalCounter>
- <LocalCounter worker="5">199812</LocalCounter>
- <LocalCounter worker="6">199839</LocalCounter>
- <LocalCounter worker="7">199732</LocalCounter>
- <LocalCounter worker="8">314842</LocalCounter>
- <LocalCounter worker="9">291197</LocalCounter>
- <LocalCounter worker="10">294608</LocalCounter>
- <LocalCounter worker="11">286440</LocalCounter>
- <LocalCounter worker="12">375388</LocalCounter>
- <LocalCounter worker="13">316600</LocalCounter>
- <LocalCounter worker="14">354856</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>3835650</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="16">
- <LocalCounter worker="0">104577</LocalCounter>
- <LocalCounter worker="1">489911</LocalCounter>
- <LocalCounter worker="2">466186</LocalCounter>
- <LocalCounter worker="3">366690</LocalCounter>
- <LocalCounter worker="4">252721</LocalCounter>
- <LocalCounter worker="5">460887</LocalCounter>
- <LocalCounter worker="6">253823</LocalCounter>
- <LocalCounter worker="7">113506</LocalCounter>
- <LocalCounter worker="8">120249</LocalCounter>
- <LocalCounter worker="9">46275</LocalCounter>
- <LocalCounter worker="10">159071</LocalCounter>
- <LocalCounter worker="11">83449</LocalCounter>
- <LocalCounter worker="12">177618</LocalCounter>
- <LocalCounter worker="13">120903</LocalCounter>
- <LocalCounter worker="14">191314</LocalCounter>
- <LocalCounter worker="15">263287</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>3670467</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="17">
- <LocalCounter worker="0">234559</LocalCounter>
- <LocalCounter worker="1">118245</LocalCounter>
- <LocalCounter worker="2">219127</LocalCounter>
- <LocalCounter worker="3">295109</LocalCounter>
- <LocalCounter worker="4">248960</LocalCounter>
- <LocalCounter worker="5">181934</LocalCounter>
- <LocalCounter worker="6">297815</LocalCounter>
- <LocalCounter worker="7">322059</LocalCounter>
- <LocalCounter worker="8">163004</LocalCounter>
- <LocalCounter worker="9">174212</LocalCounter>
- <LocalCounter worker="10">26569</LocalCounter>
- <LocalCounter worker="11">77433</LocalCounter>
- <LocalCounter worker="12">133062</LocalCounter>
- <LocalCounter worker="13">232843</LocalCounter>
- <LocalCounter worker="14">33886</LocalCounter>
- <LocalCounter worker="15">82456</LocalCounter>
- <LocalCounter worker="16">4914</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2846187</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="18">
- <LocalCounter worker="0">271262</LocalCounter>
- <LocalCounter worker="1">355312</LocalCounter>
- <LocalCounter worker="2">50921</LocalCounter>
- <LocalCounter worker="3">148825</LocalCounter>
- <LocalCounter worker="4">245230</LocalCounter>
- <LocalCounter worker="5">182256</LocalCounter>
- <LocalCounter worker="6">187273</LocalCounter>
- <LocalCounter worker="7">255451</LocalCounter>
- <LocalCounter worker="8">185514</LocalCounter>
- <LocalCounter worker="9">44729</LocalCounter>
- <LocalCounter worker="10">112757</LocalCounter>
- <LocalCounter worker="11">98411</LocalCounter>
- <LocalCounter worker="12">207969</LocalCounter>
- <LocalCounter worker="13">185668</LocalCounter>
- <LocalCounter worker="14">172032</LocalCounter>
- <LocalCounter worker="15">109135</LocalCounter>
- <LocalCounter worker="16">2423</LocalCounter>
- <LocalCounter worker="17">2380</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2817548</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="19">
- <LocalCounter worker="0">261804</LocalCounter>
- <LocalCounter worker="1">234937</LocalCounter>
- <LocalCounter worker="2">211116</LocalCounter>
- <LocalCounter worker="3">198275</LocalCounter>
- <LocalCounter worker="4">153636</LocalCounter>
- <LocalCounter worker="5">353607</LocalCounter>
- <LocalCounter worker="6">368351</LocalCounter>
- <LocalCounter worker="7">369817</LocalCounter>
- <LocalCounter worker="8">117702</LocalCounter>
- <LocalCounter worker="9">41853</LocalCounter>
- <LocalCounter worker="10">75374</LocalCounter>
- <LocalCounter worker="11">125194</LocalCounter>
- <LocalCounter worker="12">87239</LocalCounter>
- <LocalCounter worker="13">58610</LocalCounter>
- <LocalCounter worker="14">63622</LocalCounter>
- <LocalCounter worker="15">96700</LocalCounter>
- <LocalCounter worker="16">1021</LocalCounter>
- <LocalCounter worker="17">966</LocalCounter>
- <LocalCounter worker="18">985</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2820809</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="20">
- <LocalCounter worker="0">251976</LocalCounter>
- <LocalCounter worker="1">118001</LocalCounter>
- <LocalCounter worker="2">84641</LocalCounter>
- <LocalCounter worker="3">140476</LocalCounter>
- <LocalCounter worker="4">77669</LocalCounter>
- <LocalCounter worker="5">274047</LocalCounter>
- <LocalCounter worker="6">318570</LocalCounter>
- <LocalCounter worker="7">170363</LocalCounter>
- <LocalCounter worker="8">252676</LocalCounter>
- <LocalCounter worker="9">140874</LocalCounter>
- <LocalCounter worker="10">189186</LocalCounter>
- <LocalCounter worker="11">121034</LocalCounter>
- <LocalCounter worker="12">161358</LocalCounter>
- <LocalCounter worker="13">165381</LocalCounter>
- <LocalCounter worker="14">141826</LocalCounter>
- <LocalCounter worker="15">205937</LocalCounter>
- <LocalCounter worker="16">118</LocalCounter>
- <LocalCounter worker="17">77</LocalCounter>
- <LocalCounter worker="18">70</LocalCounter>
- <LocalCounter worker="19">94</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2814374</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="21">
- <LocalCounter worker="0">84213</LocalCounter>
- <LocalCounter worker="1">196158</LocalCounter>
- <LocalCounter worker="2">196680</LocalCounter>
- <LocalCounter worker="3">112159</LocalCounter>
- <LocalCounter worker="4">224637</LocalCounter>
- <LocalCounter worker="5">252342</LocalCounter>
- <LocalCounter worker="6">140314</LocalCounter>
- <LocalCounter worker="7">84179</LocalCounter>
- <LocalCounter worker="8">223626</LocalCounter>
- <LocalCounter worker="9">196078</LocalCounter>
- <LocalCounter worker="10">111882</LocalCounter>
- <LocalCounter worker="11">238331</LocalCounter>
- <LocalCounter worker="12">252259</LocalCounter>
- <LocalCounter worker="13">195491</LocalCounter>
- <LocalCounter worker="14">83883</LocalCounter>
- <LocalCounter worker="15">195126</LocalCounter>
- <LocalCounter worker="16">52</LocalCounter>
- <LocalCounter worker="17">26</LocalCounter>
- <LocalCounter worker="18">35</LocalCounter>
- <LocalCounter worker="19">44</LocalCounter>
- <LocalCounter worker="20">41</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2787556</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="22">
- <LocalCounter worker="0">31503</LocalCounter>
- <LocalCounter worker="1">252623</LocalCounter>
- <LocalCounter worker="2">196406</LocalCounter>
- <LocalCounter worker="3">168591</LocalCounter>
- <LocalCounter worker="4">140544</LocalCounter>
- <LocalCounter worker="5">168154</LocalCounter>
- <LocalCounter worker="6">280249</LocalCounter>
- <LocalCounter worker="7">168483</LocalCounter>
- <LocalCounter worker="8">195559</LocalCounter>
- <LocalCounter worker="9">55718</LocalCounter>
- <LocalCounter worker="10">139401</LocalCounter>
- <LocalCounter worker="11">251481</LocalCounter>
- <LocalCounter worker="12">222605</LocalCounter>
- <LocalCounter worker="13">111214</LocalCounter>
- <LocalCounter worker="14">139519</LocalCounter>
- <LocalCounter worker="15">251258</LocalCounter>
- <LocalCounter worker="16">46</LocalCounter>
- <LocalCounter worker="17">26</LocalCounter>
- <LocalCounter worker="18">31</LocalCounter>
- <LocalCounter worker="19">39</LocalCounter>
- <LocalCounter worker="20">39</LocalCounter>
- <LocalCounter worker="21">41</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2773530</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="23">
- <LocalCounter worker="0">139311</LocalCounter>
- <LocalCounter worker="1">167336</LocalCounter>
- <LocalCounter worker="2">278426</LocalCounter>
- <LocalCounter worker="3">55951</LocalCounter>
- <LocalCounter worker="4">139626</LocalCounter>
- <LocalCounter worker="5">250691</LocalCounter>
- <LocalCounter worker="6">223121</LocalCounter>
- <LocalCounter worker="7">83809</LocalCounter>
- <LocalCounter worker="8">194537</LocalCounter>
- <LocalCounter worker="9">278533</LocalCounter>
- <LocalCounter worker="10">139061</LocalCounter>
- <LocalCounter worker="11">223216</LocalCounter>
- <LocalCounter worker="12">194994</LocalCounter>
- <LocalCounter worker="13">111343</LocalCounter>
- <LocalCounter worker="14">186244</LocalCounter>
- <LocalCounter worker="15">111364</LocalCounter>
- <LocalCounter worker="16">142</LocalCounter>
- <LocalCounter worker="17">126</LocalCounter>
- <LocalCounter worker="18">121</LocalCounter>
- <LocalCounter worker="19">122</LocalCounter>
- <LocalCounter worker="20">124</LocalCounter>
- <LocalCounter worker="21">125</LocalCounter>
- <LocalCounter worker="22">124</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2778447</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
- <GlobalTTASLockWithLocalCounter activeWorker="24">
- <LocalCounter worker="0">127539</LocalCounter>
- <LocalCounter worker="1">128004</LocalCounter>
- <LocalCounter worker="2">127243</LocalCounter>
- <LocalCounter worker="3">128231</LocalCounter>
- <LocalCounter worker="4">128122</LocalCounter>
- <LocalCounter worker="5">127956</LocalCounter>
- <LocalCounter worker="6">128394</LocalCounter>
- <LocalCounter worker="7">128093</LocalCounter>
- <LocalCounter worker="8">121225</LocalCounter>
- <LocalCounter worker="9">120770</LocalCounter>
- <LocalCounter worker="10">120549</LocalCounter>
- <LocalCounter worker="11">120785</LocalCounter>
- <LocalCounter worker="12">120461</LocalCounter>
- <LocalCounter worker="13">120591</LocalCounter>
- <LocalCounter worker="14">121214</LocalCounter>
- <LocalCounter worker="15">120733</LocalCounter>
- <LocalCounter worker="16">120387</LocalCounter>
- <LocalCounter worker="17">121153</LocalCounter>
- <LocalCounter worker="18">121255</LocalCounter>
- <LocalCounter worker="19">120737</LocalCounter>
- <LocalCounter worker="20">120859</LocalCounter>
- <LocalCounter worker="21">121071</LocalCounter>
- <LocalCounter worker="22">121031</LocalCounter>
- <LocalCounter worker="23">121163</LocalCounter>
- <GlobalCounter>0</GlobalCounter>
- <SumOfLocalCounter>2957566</SumOfLocalCounter>
- </GlobalTTASLockWithLocalCounter>
-</SMPLock01>
+*** TEST VERSION: 6.0.0.90c8934179f2ba4c042caa95b3473d37835bed80
+*** TEST STATE: EXPECTED_PASS
+*** TEST BUILD: RTEMS_SMP
+*** TEST TOOLS: 13.2.0 20230727 (RTEMS 6, RSB d3d738c35a71ca05f675b188539225099401ac79, Newlib a021448)
+*** BEGIN OF JSON DATA ***
+[
+ {
+ "lock-type": "Ticket Lock",
+ "lock-object": "global",
+ "section-type": "local counter",
+ "results": [
+ {
+ "counter": [1385097],
+ "global-counter": 0,
+ "sum-of-local-counter": 1385097
+ }, {
+ "counter": [997876, 997974],
+ "global-counter": 0,
+ "sum-of-local-counter": 1995850
+ }, {
+ "counter": [998024, 998123, 998123],
+ "global-counter": 0,
+ "sum-of-local-counter": 2994270
+ }, {
+ "counter": [997988, 998086, 998086, 998086],
+ "global-counter": 0,
+ "sum-of-local-counter": 3992246
+ }
+ ]
+ }, {
+ "lock-type": "MCS Lock",
+ "lock-object": "global",
+ "section-type": "local counter",
+ "results": [
+ {
+ "counter": [1512045],
+ "global-counter": 0,
+ "sum-of-local-counter": 1512045
+ }, {
+ "counter": [997877, 997878],
+ "global-counter": 0,
+ "sum-of-local-counter": 1995755
+ }, {
+ "counter": [998023, 998122, 998122],
+ "global-counter": 0,
+ "sum-of-local-counter": 2994267
+ }, {
+ "counter": [997987, 998086, 998086, 998086],
+ "global-counter": 0,
+ "sum-of-local-counter": 3992245
+ }
+ ]
+ }, {
+ "lock-type": "Ticket Lock",
+ "lock-object": "global",
+ "section-type": "global counter",
+ "results": [
+ {
+ "counter": [997921, 997945, 997945, 997945],
+ "global-counter": 3991756,
+ "sum-of-local-counter": 3991756
+ }
+ ]
+ }, {
+ "lock-type": "MCS Lock",
+ "lock-object": "global",
+ "section-type": "global counter",
+ "results": [
+ {
+ "counter": [527090, 527096, 527096, 527096],
+ "global-counter": 2108378,
+ "sum-of-local-counter": 2108378
+ }
+ ]
+ }, {
+ "lock-type": "Ticket Lock",
+ "lock-object": "local",
+ "section-type": "local counter",
+ "results": [
+ {
+ "counter": [1385769],
+ "global-counter": 0,
+ "sum-of-local-counter": 1385769
+ }, {
+ "counter": [1385995, 1387328],
+ "global-counter": 0,
+ "sum-of-local-counter": 2773323
+ }, {
+ "counter": [1386191, 1387525, 1387526],
+ "global-counter": 0,
+ "sum-of-local-counter": 4161242
+ }, {
+ "counter": [1386136, 1387468, 1387470, 1387407],
+ "global-counter": 0,
+ "sum-of-local-counter": 5548481
+ }
+ ]
+ }, {
+ "lock-type": "MCS Lock",
+ "lock-object": "local",
+ "section-type": "local counter",
+ "results": [
+ {
+ "counter": [1512021],
+ "global-counter": 0,
+ "sum-of-local-counter": 1512021
+ }, {
+ "counter": [1511993, 1513445],
+ "global-counter": 0,
+ "sum-of-local-counter": 3025438
+ }, {
+ "counter": [1512208, 1513656, 1513656],
+ "global-counter": 0,
+ "sum-of-local-counter": 4539520
+ }, {
+ "counter": [1512149, 1513595, 1513595, 1513533],
+ "global-counter": 0,
+ "sum-of-local-counter": 6052872
+ }
+ ]
+ }, {
+ "lock-type": "Ticket Lock",
+ "lock-object": "local",
+ "section-type": "global counter",
+ "results": [
+ {
+ "counter": [1160403, 1161527, 1161527, 1161469],
+ "global-counter": 3727827,
+ "sum-of-local-counter": 4644926
+ }
+ ]
+ }, {
+ "lock-type": "MCS Lock",
+ "lock-object": "local",
+ "section-type": "global counter",
+ "results": [
+ {
+ "counter": [1247164, 1248373, 1248373, 1248313],
+ "global-counter": 3876384,
+ "sum-of-local-counter": 4992223
+ }
+ ]
+ }, {
+ "lock-type": "Ticket Lock",
+ "lock-object": "global",
+ "section-type": "busy loop",
+ "results": [
+ {
+ "counter": [39932, 39932, 39932, 39932],
+ "global-counter": 0,
+ "sum-of-local-counter": 159728
+ }
+ ]
+ }, {
+ "lock-type": "MCS Lock",
+ "lock-object": "global",
+ "section-type": "busy loop",
+ "results": [
+ {
+ "counter": [39934, 39935, 39934, 39934],
+ "global-counter": 0,
+ "sum-of-local-counter": 159737
+ }
+ ]
+ }, {
+ "lock-type": "Sequence Lock",
+ "lock-object": "global",
+ "section-type": "two global counter",
+ "results": [
+ {
+ "counter": [1847772, 666526, 666526, 666488],
+ "global-counter": 0,
+ "sum-of-local-counter": 3847312
+ }
+ ]
+ }, {
+ "lock-type": "TAS Lock",
+ "lock-object": "global",
+ "section-type": "local counter",
+ "results": [
+ {
+ "counter": [2934600],
+ "global-counter": 0,
+ "sum-of-local-counter": 2934600
+ }, {
+ "counter": [2217444, 2219107],
+ "global-counter": 0,
+ "sum-of-local-counter": 4436551
+ }, {
+ "counter": [1833240, 1836467, 1835261],
+ "global-counter": 0,
+ "sum-of-local-counter": 5504968
+ }, {
+ "counter": [1652247, 1652937, 1653163, 1652725],
+ "global-counter": 0,
+ "sum-of-local-counter": 6611072
+ }
+ ]
+ }, {
+ "lock-type": "TTAS Lock",
+ "lock-object": "global",
+ "section-type": "local counter",
+ "results": [
+ {
+ "counter": [2935135],
+ "global-counter": 0,
+ "sum-of-local-counter": 2935135
+ }, {
+ "counter": [1732426, 1758193],
+ "global-counter": 0,
+ "sum-of-local-counter": 3490619
+ }, {
+ "counter": [1202763, 1204087, 1203894],
+ "global-counter": 0,
+ "sum-of-local-counter": 3610744
+ }, {
+ "counter": [845721, 846759, 848543, 838946],
+ "global-counter": 0,
+ "sum-of-local-counter": 3379969
+ }
+ ]
+ }
+]
+*** END OF JSON DATA ***
+
*** END OF TEST SMPLOCK 1 ***
+
+cpu 0 in error mode (tt = 0x80)
+ 1550147550 000091c0: 91d02000 ta 0x0
diff --git a/testsuites/smptests/smplock01/smplock01fair.py b/testsuites/smptests/smplock01/smplock01fair.py
index 378dfd8028..a3851ad4c6 100755
--- a/testsuites/smptests/smplock01/smplock01fair.py
+++ b/testsuites/smptests/smplock01/smplock01fair.py
@@ -1,59 +1,71 @@
-#!/usr/bin/env python
+# SPDX-License-Identifier: BSD-2-Clause
+# Copyright (C) 2016, 2024 embedded brains GmbH & Co. KG
#
-# Copyright (c) 2016 embedded brains GmbH. All rights reserved.
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
-import re
-import libxml2
+import json
import math
+import re
import statistics
-from libxml2 import xmlNode
-import matplotlib.pyplot as plt
-data = open('smplock01.scn').read()
-data = re.sub(r'\*\*\*.*\*\*\*', '', data)
-doc = libxml2.parseDoc(data)
-ctx = doc.xpathNewContext()
-
-plt.title('SMP Lock Fairness')
-plt.xlabel('Active Workers')
-plt.ylabel('Normed Coefficient of Variation')
-
-i = 1
-ticket = []
-mcs = []
-tas = []
-ttas = []
-
-def m(n):
- return int(xmlNode.getContent(n))
-
-def normedCoefficientOfVariation(name, i):
- y = map(m, ctx.xpathEval('/SMPLock01/' + name + '[@activeWorker=' + str(i) + ']/LocalCounter'))
- if len(y) == 0:
- raise
- return (statistics.stdev(y) / statistics.mean(y)) / math.sqrt(len(y))
-
-try:
- while True:
- i = i + 1
- ticket.append(normedCoefficientOfVariation('GlobalTicketLockWithLocalCounter', i))
- mcs.append(normedCoefficientOfVariation('GlobalMCSLockWithLocalCounter', i))
- tas.append(normedCoefficientOfVariation('GlobalTASLockWithLocalCounter', i))
- ttas.append(normedCoefficientOfVariation('GlobalTTASLockWithLocalCounter', i))
-except:
- pass
-
-x = range(2, len(ticket) + 2)
-plt.xticks(x)
-plt.yscale('symlog', linthreshy = 1e-6)
-plt.plot(x, ticket, label = 'Ticket Lock', marker = 'o')
-plt.plot(x, mcs, label = 'MCS Lock', marker = 'o')
-plt.plot(x, tas, label = 'TAS Lock', marker = 'o')
-plt.plot(x, ttas, label = 'TTAS Lock', marker = 'o')
-plt.legend(loc = 'best')
-plt.show()
+import matplotlib.pyplot as plt # type: ignore
+from matplotlib import ticker # type: ignore
+
+
+def _normed_coefficient_of_variation(counter: list[int]) -> float:
+ return (statistics.stdev(counter) / statistics.mean(counter)) / math.sqrt(
+ len(counter))
+
+
+def _plot(data: dict) -> None:
+ _, axes = plt.subplots()
+ axes.set_title("SMP Lock Fairness")
+ axes.set_xlabel("Active Workers")
+ axes.set_ylabel("Normed Coefficient of Variation")
+ axes.set_yscale("symlog", linthresh=1e-6)
+ x = list(range(2, len(data[0]["results"]) + 1))
+ axes.xaxis.set_major_locator(ticker.FixedLocator(x))
+ for samples in data:
+ if samples["lock-object"] != "global":
+ continue
+ if samples["section-type"] != "local counter":
+ continue
+ y = [
+ _normed_coefficient_of_variation(results["counter"])
+ for results in samples["results"][1:]
+ ]
+ axes.plot(x, y, label=samples["lock-type"], marker="o")
+ axes.legend(loc="best")
+ plt.savefig("smplock01fair.png")
+ plt.savefig("smplock01fair.pdf")
+ plt.close()
+
+
+_JSON_DATA = re.compile(
+ r"\*\*\* BEGIN OF JSON DATA \*\*\*(.*)"
+ r"\*\*\* END OF JSON DATA \*\*\*", re.DOTALL)
+
+with open("smplock01.scn", "r", encoding="utf-8") as src:
+ match = _JSON_DATA.search(src.read())
+ data = json.loads(match.group(1))
+
+_plot(data)
diff --git a/testsuites/smptests/smplock01/smplock01perf.py b/testsuites/smptests/smplock01/smplock01perf.py
index 43816814f8..09c7fb10b4 100755
--- a/testsuites/smptests/smplock01/smplock01perf.py
+++ b/testsuites/smptests/smplock01/smplock01perf.py
@@ -1,39 +1,60 @@
-#!/usr/bin/env python
+# SPDX-License-Identifier: BSD-2-Clause
+# Copyright (C) 2016, 2024 embedded brains GmbH & Co. KG
#
-# Copyright (c) 2016 embedded brains GmbH. All rights reserved.
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
-#
-
+# 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 OWNER 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.
+
+import json
import re
-import libxml2
-from libxml2 import xmlNode
-import matplotlib.pyplot as plt
-data = open('smplock01.scn').read()
-data = re.sub(r'\*\*\*.*\*\*\*', '', data)
-doc = libxml2.parseDoc(data)
-ctx = doc.xpathNewContext()
-
-plt.title('SMP Lock Performance')
-plt.xlabel('Active Workers')
-plt.ylabel('Operation Count')
-
-y = map(xmlNode.getContent, ctx.xpathEval('/SMPLock01/GlobalTicketLockWithLocalCounter/SumOfLocalCounter'))
-x = range(1, len(y) + 1)
-plt.xticks(x)
-plt.plot(x, y, label = 'Ticket Lock', marker = 'o')
-
-y = map(xmlNode.getContent, ctx.xpathEval('/SMPLock01/GlobalMCSLockWithLocalCounter/SumOfLocalCounter'))
-plt.plot(x, y, label = 'MCS Lock', marker = 'o')
-
-y = map(xmlNode.getContent, ctx.xpathEval('/SMPLock01/GlobalTASLockWithLocalCounter/SumOfLocalCounter'))
-plt.plot(x, y, label = 'TAS Lock', marker = 'o')
-
-y = map(xmlNode.getContent, ctx.xpathEval('/SMPLock01/GlobalTTASLockWithLocalCounter/SumOfLocalCounter'))
-plt.plot(x, y, label = 'TTAS Lock', marker = 'o')
-
-plt.legend(loc = 'best')
-plt.show()
+import matplotlib.pyplot as plt # type: ignore
+from matplotlib import ticker # type: ignore
+
+
+def _plot(data: dict) -> None:
+ _, axes = plt.subplots()
+ axes.set_title("SMP Lock Performance")
+ axes.set_xlabel("Active Workers")
+ axes.set_ylabel("Operation Count")
+ x = list(range(1, len(data[0]["results"]) + 1))
+ axes.xaxis.set_major_locator(ticker.FixedLocator(x))
+ for samples in data:
+ if samples["lock-object"] != "global":
+ continue
+ if samples["section-type"] != "local counter":
+ continue
+ y = [sum(results["counter"]) for results in samples["results"]]
+ axes.plot(x, y, label=samples["lock-type"], marker="o")
+ axes.legend(loc="best")
+ plt.savefig("smplock01perf.png")
+ plt.savefig("smplock01perf.pdf")
+ plt.close()
+
+
+_JSON_DATA = re.compile(
+ r"\*\*\* BEGIN OF JSON DATA \*\*\*(.*)"
+ r"\*\*\* END OF JSON DATA \*\*\*", re.DOTALL)
+
+with open("smplock01.scn", "r", encoding="utf-8") as src:
+ match = _JSON_DATA.search(src.read())
+ data = json.loads(match.group(1))
+
+_plot(data)
diff --git a/testsuites/smptests/smpmigration01/init.c b/testsuites/smptests/smpmigration01/init.c
index c78c057510..7829d658d9 100644
--- a/testsuites/smptests/smpmigration01/init.c
+++ b/testsuites/smptests/smpmigration01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2013-2015 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2013, 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpmigration02/init.c b/testsuites/smptests/smpmigration02/init.c
index 2539e7ac0a..a81d6b8fe2 100644
--- a/testsuites/smptests/smpmigration02/init.c
+++ b/testsuites/smptests/smpmigration02/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpmrsp01/init.c b/testsuites/smptests/smpmrsp01/init.c
index 147838957d..481328cec7 100644
--- a/testsuites/smptests/smpmrsp01/init.c
+++ b/testsuites/smptests/smpmrsp01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014-2015 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpmulticast01/init.c b/testsuites/smptests/smpmulticast01/init.c
index ec4bab922d..51a4624ea1 100644
--- a/testsuites/smptests/smpmulticast01/init.c
+++ b/testsuites/smptests/smpmulticast01/init.c
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (C) 2019 embedded brains GmbH
+ * Copyright (C) 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -563,14 +563,16 @@ static void fatal_extension(
bool ok;
if (source == RTEMS_FATAL_SOURCE_SMP) {
- T_step_eq_int(1, source, RTEMS_FATAL_SOURCE_SMP);
- T_step_false(2, always_set_to_false, "unexpected argument value");
- T_step_eq_int(3, code, SMP_FATAL_WRONG_CPU_STATE_TO_PERFORM_JOBS);
- T_case_end();
-
- ok = T_run_finalize();
- rtems_test_assert(ok);
- TEST_END();
+ if (code != SMP_FATAL_SHUTDOWN_RESPONSE) {
+ T_step_eq_int(1, source, RTEMS_FATAL_SOURCE_SMP);
+ T_step_false(2, always_set_to_false, "unexpected argument value");
+ T_step_eq_int(3, code, SMP_FATAL_WRONG_CPU_STATE_TO_PERFORM_JOBS);
+ T_case_end();
+
+ ok = T_run_finalize();
+ rtems_test_assert(ok);
+ TEST_END();
+ }
} else if (source == RTEMS_FATAL_SOURCE_APPLICATION) {
ok = T_run_finalize();
rtems_test_assert(ok);
diff --git a/testsuites/smptests/smpmutex01/init.c b/testsuites/smptests/smpmutex01/init.c
index 5a695f016f..ad887318ab 100644
--- a/testsuites/smptests/smpmutex01/init.c
+++ b/testsuites/smptests/smpmutex01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2015, 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpmutex02/init.c b/testsuites/smptests/smpmutex02/init.c
index fe800fac3d..b219f9a2c7 100644
--- a/testsuites/smptests/smpmutex02/init.c
+++ b/testsuites/smptests/smpmutex02/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpopenmp01/init.c b/testsuites/smptests/smpopenmp01/init.c
index 802f5bb05c..d37fe852cf 100644
--- a/testsuites/smptests/smpopenmp01/init.c
+++ b/testsuites/smptests/smpopenmp01/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (C) 2017, 2024 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -149,21 +143,31 @@ static void do_bench(const char *name, void (*bench)(void), int n)
(*bench)();
}
delta = omp_get_wtime() - start;
- printf("\t\t<%sBench unit=\"s\">%f</%sBench>\n", name, delta, name);
+ printf(",\n \"%s-bench\": %f", name, delta);
}
+static const char *test_sep = "";
+
static void microbench(int num_threads, int n)
{
- printf("\t<Microbench numThreads=\"%i\" majorLoopCount=\"%i\">\n", num_threads, n);
omp_set_num_threads(num_threads);
- do_bench("Barrier", barrier_bench, n);
- do_bench("Parallel", parallel_bench, n);
- do_bench("Static", static_bench, n);
- do_bench("Dynamic", dynamic_bench, n);
- do_bench("Guided", guided_bench, n);
- do_bench("Runtime", runtime_bench, n);
- do_bench("Single", single_bench, n);
- printf("\t</Microbench>\n");
+ printf(
+ "%s{\n"
+ " \"num-threads\": %i,\n"
+ " \"major-loop-count\": %i",
+ test_sep,
+ num_threads,
+ n
+ );
+ test_sep = ", ";
+ do_bench("barrier", barrier_bench, n);
+ do_bench("parallel", parallel_bench, n);
+ do_bench("static", static_bench, n);
+ do_bench("dynamic", dynamic_bench, n);
+ do_bench("guided", guided_bench, n);
+ do_bench("runtime", runtime_bench, n);
+ do_bench("single", single_bench, n);
+ printf("\n }");
}
static int estimate_3s_runtime_with_one_proc(void)
@@ -192,7 +196,7 @@ static void test(void)
int num_procs;
int n;
- printf("<SMPOpenMP01>\n");
+ printf("*** BEGIN OF JSON DATA ***\n[\n ");
n = estimate_3s_runtime_with_one_proc();
num_procs = omp_get_num_procs();
@@ -202,7 +206,7 @@ static void test(void)
microbench(i, n);
}
- printf("</SMPOpenMP01>\n");
+ printf("\n]\n*** END OF JSON DATA ***\n");
}
#ifdef __rtems__
diff --git a/testsuites/smptests/smpopenmp01/smpopenmp01.py b/testsuites/smptests/smpopenmp01/smpopenmp01.py
index 139aedd4af..227b089926 100644
--- a/testsuites/smptests/smpopenmp01/smpopenmp01.py
+++ b/testsuites/smptests/smpopenmp01/smpopenmp01.py
@@ -1,42 +1,60 @@
-#!/usr/bin/env python
+# SPDX-License-Identifier: BSD-2-Clause
+# Copyright (C) 2017, 2024 embedded brains GmbH & Co. KG
#
-# Copyright (c) 2017 embedded brains GmbH. All rights reserved.
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
+import json
import re
-import libxml2
-from libxml2 import xmlNode
-import matplotlib.pyplot as plt
-data = open('smpopenmp01.scn').read()
-data = re.sub(r'\*\*\*.*', '', data)
-doc = libxml2.parseDoc(data)
-ctx = doc.xpathNewContext()
-
-plt.title('OpenMP Microbench')
-plt.xlabel('Number of Threads')
-plt.ylabel('Relative Duration')
-
-def m(n):
- return float(n.getContent())
-
-def p(bench):
- d = map(m, ctx.xpathEval('/SMPOpenMP01/Microbench/' + bench))
- y = [x / d[0] for x in d]
- x = range(1, len(y) + 1)
- plt.xticks(x)
- plt.plot(x, y, label = bench, marker = 'o')
-
-p('BarrierBench')
-p('ParallelBench')
-p('StaticBench')
-p('DynamicBench')
-p('GuidedBench')
-p('RuntimeBench')
-p('SingleBench')
-plt.legend(loc = 'best')
-plt.show()
+import matplotlib.pyplot as plt # type: ignore
+from matplotlib import ticker # type: ignore
+
+
+def _plot(data: dict) -> None:
+ _, axes = plt.subplots()
+ axes.set_title("OpenMP Microbench")
+ axes.set_xlabel("Number of Threads")
+ axes.set_ylabel("Relative Duration")
+ x = list(range(1, len(data) + 1))
+ axes.xaxis.set_major_locator(ticker.FixedLocator(x))
+ for key in [
+ "barrier-bench", "dynamic-bench", "guided-bench", "parallel-bench",
+ "runtime-bench", "single-bench", "static-bench"
+ ]:
+ d = [results[key] for results in data]
+ y = [x / d[0] for x in d]
+ axes.plot(x, y, label=key.replace("-bench", ""), marker="o")
+ axes.legend(loc="best")
+ plt.savefig("smpopenmp01.png")
+ plt.savefig("smpopenmp01.pdf")
+ plt.close()
+
+
+_JSON_DATA = re.compile(
+ r"\*\*\* BEGIN OF JSON DATA \*\*\*(.*)"
+ r"\*\*\* END OF JSON DATA \*\*\*", re.DOTALL)
+
+with open("smpopenmp01.scn", "r", encoding="utf-8") as src:
+ match = _JSON_DATA.search(src.read())
+ data = json.loads(match.group(1))
+
+_plot(data)
diff --git a/testsuites/smptests/smpopenmp01/smpopenmp01.scn b/testsuites/smptests/smpopenmp01/smpopenmp01.scn
index 6f63ddca1d..2d6c944d3f 100644
--- a/testsuites/smptests/smpopenmp01/smpopenmp01.scn
+++ b/testsuites/smptests/smpopenmp01/smpopenmp01.scn
@@ -1,81 +1,64 @@
+
+ SIS - SPARC/RISCV instruction simulator 2.30, copyright Jiri Gaisler 2020
+ Bug-reports to jiri@gaisler.se
+
+ GR740/LEON4 emulation enabled, 4 cpus online, delta 50 clocks
+
+ Loaded build/sparc/gr740/testsuites/smptests/smpopenmp01.exe, entry 0x00000000
+
+
*** BEGIN OF TEST SMPOPENMP 1 ***
-*** TEST VERSION: 5.0.0.4c8cffc19865eaa3b033ce2776bcce9992f24b18
+*** TEST VERSION: 6.0.0.43eecff0b1b2915b87d5324ae562888851cabdaf
*** TEST STATE: EXPECTED_PASS
-*** TEST BUILD: RTEMS_POSIX_API RTEMS_SMP
-*** TEST TOOLS: 7.3.0 20180125 (RTEMS 5, RSB 6d9c77c77d271d1fc2dfe8493d6713930b52a6dd, Newlib 3.0.0)
-<SMPOpenMP01>
- <Microbench numThreads="1" majorLoopCount="20">
- <BarrierBench unit="s">0.720318</BarrierBench>
- <ParallelBench unit="s">1.121403</ParallelBench>
- <StaticBench unit="s">0.059288</StaticBench>
- <DynamicBench unit="s">0.440113</DynamicBench>
- <GuidedBench unit="s">0.003230</GuidedBench>
- <RuntimeBench unit="s">0.440121</RuntimeBench>
- <SingleBench unit="s">0.116486</SingleBench>
- </Microbench>
- <Microbench numThreads="2" majorLoopCount="20">
- <BarrierBench unit="s">0.416734</BarrierBench>
- <ParallelBench unit="s">0.259013</ParallelBench>
- <StaticBench unit="s">0.015311</StaticBench>
- <DynamicBench unit="s">0.196751</DynamicBench>
- <GuidedBench unit="s">0.002367</GuidedBench>
- <RuntimeBench unit="s">0.199640</RuntimeBench>
- <SingleBench unit="s">0.077629</SingleBench>
- </Microbench>
- <Microbench numThreads="3" majorLoopCount="20">
- <BarrierBench unit="s">0.748332</BarrierBench>
- <ParallelBench unit="s">0.387318</ParallelBench>
- <StaticBench unit="s">0.021244</StaticBench>
- <DynamicBench unit="s">0.141558</DynamicBench>
- <GuidedBench unit="s">0.001544</GuidedBench>
- <RuntimeBench unit="s">0.142693</RuntimeBench>
- <SingleBench unit="s">0.117683</SingleBench>
- </Microbench>
- <Microbench numThreads="4" majorLoopCount="20">
- <BarrierBench unit="s">0.552830</BarrierBench>
- <ParallelBench unit="s">0.323241</ParallelBench>
- <StaticBench unit="s">0.017796</StaticBench>
- <DynamicBench unit="s">0.099475</DynamicBench>
- <GuidedBench unit="s">0.001259</GuidedBench>
- <RuntimeBench unit="s">0.100053</RuntimeBench>
- <SingleBench unit="s">0.091069</SingleBench>
- </Microbench>
- <Microbench numThreads="5" majorLoopCount="20">
- <BarrierBench unit="s">0.882791</BarrierBench>
- <ParallelBench unit="s">0.452561</ParallelBench>
- <StaticBench unit="s">0.023620</StaticBench>
- <DynamicBench unit="s">0.094107</DynamicBench>
- <GuidedBench unit="s">0.000989</GuidedBench>
- <RuntimeBench unit="s">0.093911</RuntimeBench>
- <SingleBench unit="s">0.130070</SingleBench>
- </Microbench>
- <Microbench numThreads="6" majorLoopCount="20">
- <BarrierBench unit="s">0.670385</BarrierBench>
- <ParallelBench unit="s">0.393587</ParallelBench>
- <StaticBench unit="s">0.021141</StaticBench>
- <DynamicBench unit="s">0.072322</DynamicBench>
- <GuidedBench unit="s">0.000937</GuidedBench>
- <RuntimeBench unit="s">0.069804</RuntimeBench>
- <SingleBench unit="s">0.104107</SingleBench>
- </Microbench>
- <Microbench numThreads="7" majorLoopCount="20">
- <BarrierBench unit="s">1.031511</BarrierBench>
- <ParallelBench unit="s">0.466571</ParallelBench>
- <StaticBench unit="s">0.024944</StaticBench>
- <DynamicBench unit="s">0.069194</DynamicBench>
- <GuidedBench unit="s">0.000814</GuidedBench>
- <RuntimeBench unit="s">0.069596</RuntimeBench>
- <SingleBench unit="s">0.133137</SingleBench>
- </Microbench>
- <Microbench numThreads="8" majorLoopCount="20">
- <BarrierBench unit="s">0.761015</BarrierBench>
- <ParallelBench unit="s">0.452577</ParallelBench>
- <StaticBench unit="s">0.023979</StaticBench>
- <DynamicBench unit="s">0.061193</DynamicBench>
- <GuidedBench unit="s">0.000799</GuidedBench>
- <RuntimeBench unit="s">0.061519</RuntimeBench>
- <SingleBench unit="s">0.114285</SingleBench>
- </Microbench>
-</SMPOpenMP01>
+*** TEST BUILD: RTEMS_SMP
+*** TEST TOOLS: 13.2.0 20230727 (RTEMS 6, RSB d3d738c35a71ca05f675b188539225099401ac79, Newlib a021448)
+*** BEGIN OF JSON DATA ***
+[
+ {
+ "num-threads": 1,
+ "major-loop-count": 1,
+ "barrier-bench": 0.269517,
+ "parallel-bench": 1.277477,
+ "static-bench": 0.073541,
+ "dynamic-bench": 0.118271,
+ "guided-bench": 0.008089,
+ "runtime-bench": 0.142307,
+ "single-bench": 0.034294
+ }, {
+ "num-threads": 2,
+ "major-loop-count": 1,
+ "barrier-bench": 0.269345,
+ "parallel-bench": 0.557423,
+ "static-bench": 0.033622,
+ "dynamic-bench": 0.059762,
+ "guided-bench": 0.004065,
+ "runtime-bench": 0.072107,
+ "single-bench": 0.033129
+ }, {
+ "num-threads": 3,
+ "major-loop-count": 1,
+ "barrier-bench": 0.271522,
+ "parallel-bench": 0.631576,
+ "static-bench": 0.036074,
+ "dynamic-bench": 0.039981,
+ "guided-bench": 0.002757,
+ "runtime-bench": 0.049072,
+ "single-bench": 0.033129
+ }, {
+ "num-threads": 4,
+ "major-loop-count": 1,
+ "barrier-bench": 0.272048,
+ "parallel-bench": 0.705746,
+ "static-bench": 0.039061,
+ "dynamic-bench": 0.030069,
+ "guided-bench": 0.002095,
+ "runtime-bench": 0.037570,
+ "single-bench": 0.033176
+ }
+]
+*** END OF JSON DATA ***
*** END OF TEST SMPOPENMP 1 ***
+
+cpu 0 in error mode (tt = 0x80)
+ 706370700 0000cac0: 91d02000 ta 0x0
diff --git a/testsuites/smptests/smppsxaffinity01/init.c b/testsuites/smptests/smppsxaffinity01/init.c
index 336fbeba48..91756a1d0d 100644
--- a/testsuites/smptests/smppsxaffinity01/init.c
+++ b/testsuites/smptests/smppsxaffinity01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smppsxaffinity01/smppsxaffinity01.doc b/testsuites/smptests/smppsxaffinity01/smppsxaffinity01.doc
index db4ab87c8e..9ed60c4616 100644
--- a/testsuites/smptests/smppsxaffinity01/smppsxaffinity01.doc
+++ b/testsuites/smptests/smppsxaffinity01/smppsxaffinity01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/smptests/smppsxaffinity02/init.c b/testsuites/smptests/smppsxaffinity02/init.c
index e4d002f21e..5e0346bf78 100644
--- a/testsuites/smptests/smppsxaffinity02/init.c
+++ b/testsuites/smptests/smppsxaffinity02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smppsxaffinity02/smppsxaffinity02.doc b/testsuites/smptests/smppsxaffinity02/smppsxaffinity02.doc
index 857282c508..08d1000f0c 100644
--- a/testsuites/smptests/smppsxaffinity02/smppsxaffinity02.doc
+++ b/testsuites/smptests/smppsxaffinity02/smppsxaffinity02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
directives:
diff --git a/testsuites/smptests/smppsxmutex01/init.c b/testsuites/smptests/smppsxmutex01/init.c
index 6dd0d020fd..6532f5868d 100644
--- a/testsuites/smptests/smppsxmutex01/init.c
+++ b/testsuites/smptests/smppsxmutex01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -42,25 +55,11 @@ static test_context test_instance;
static void *thread_b(void *arg)
{
test_context *ctx;
- rtems_id scheduler_b_id;
- rtems_status_code sc;
- rtems_task_priority prio;
int prio_ceiling;
int eno;
ctx = arg;
- rtems_test_assert(rtems_scheduler_get_processor() == 0);
-
- sc = rtems_scheduler_ident(SCHED_B, &scheduler_b_id);
- rtems_test_assert(sc == RTEMS_SUCCESSFUL);
-
- sc = rtems_task_set_priority(pthread_self(), RTEMS_CURRENT_PRIORITY, &prio);
- rtems_test_assert(sc == RTEMS_SUCCESSFUL);
-
- sc = rtems_task_set_scheduler(pthread_self(), scheduler_b_id, prio);
- rtems_test_assert(sc == RTEMS_SUCCESSFUL);
-
rtems_test_assert(rtems_scheduler_get_processor() == 1);
eno = pthread_mutex_init(&ctx->mtx_b, &ctx->mtx_attr);
@@ -119,8 +118,24 @@ static void test(test_context *ctx)
rtems_test_assert(eno == 0);
if (cpu_count > 1) {
+ rtems_id scheduler_a_id;
+ rtems_id scheduler_b_id;
+ rtems_status_code sc;
+ rtems_task_priority prio;
void *exit_code;
+ sc = rtems_scheduler_ident(SCHED_A, &scheduler_a_id);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ sc = rtems_scheduler_ident(SCHED_B, &scheduler_b_id);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ sc = rtems_task_set_priority(pthread_self(), RTEMS_CURRENT_PRIORITY, &prio);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ sc = rtems_task_set_scheduler(pthread_self(), scheduler_b_id, prio);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
eno = pthread_create(&ctx->thread_b, NULL, thread_b, ctx);
rtems_test_assert(eno == 0);
@@ -128,6 +143,9 @@ static void test(test_context *ctx)
eno = pthread_join(ctx->thread_b, &exit_code);
rtems_test_assert(eno == 0);
rtems_test_assert(exit_code == ctx);
+
+ sc = rtems_task_set_scheduler(pthread_self(), scheduler_a_id, prio);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
}
eno = pthread_mutex_destroy(&ctx->mtx_a);
diff --git a/testsuites/smptests/smppsxsignal01/init.c b/testsuites/smptests/smppsxsignal01/init.c
index d23a664e9a..4b7109399a 100644
--- a/testsuites/smptests/smppsxsignal01/init.c
+++ b/testsuites/smptests/smppsxsignal01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2013 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpschedaffinity01/init.c b/testsuites/smptests/smpschedaffinity01/init.c
index a2ab9638a9..cdefc6ed96 100644
--- a/testsuites/smptests/smpschedaffinity01/init.c
+++ b/testsuites/smptests/smpschedaffinity01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/*
diff --git a/testsuites/smptests/smpschedaffinity02/init.c b/testsuites/smptests/smpschedaffinity02/init.c
index effbee32a8..69569b0350 100644
--- a/testsuites/smptests/smpschedaffinity02/init.c
+++ b/testsuites/smptests/smpschedaffinity02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/*
diff --git a/testsuites/smptests/smpschedaffinity03/init.c b/testsuites/smptests/smpschedaffinity03/init.c
index 10ece65f63..a0ca92e222 100644
--- a/testsuites/smptests/smpschedaffinity03/init.c
+++ b/testsuites/smptests/smpschedaffinity03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/*
diff --git a/testsuites/smptests/smpschedaffinity04/init.c b/testsuites/smptests/smpschedaffinity04/init.c
index 9d8b5999a6..b2394e50a8 100644
--- a/testsuites/smptests/smpschedaffinity04/init.c
+++ b/testsuites/smptests/smpschedaffinity04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/*
diff --git a/testsuites/smptests/smpschedaffinity05/init.c b/testsuites/smptests/smpschedaffinity05/init.c
index 1d554222d3..db90746222 100644
--- a/testsuites/smptests/smpschedaffinity05/init.c
+++ b/testsuites/smptests/smpschedaffinity05/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/*
diff --git a/testsuites/smptests/smpschededf01/init.c b/testsuites/smptests/smpschededf01/init.c
index c87d31dea1..16af1b58e7 100644
--- a/testsuites/smptests/smpschededf01/init.c
+++ b/testsuites/smptests/smpschededf01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2017, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpschededf02/init.c b/testsuites/smptests/smpschededf02/init.c
index fae2d76bf3..01b52cb056 100644
--- a/testsuites/smptests/smpschededf02/init.c
+++ b/testsuites/smptests/smpschededf02/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2016, 2020 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2016, 2020 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpschededf03/init.c b/testsuites/smptests/smpschededf03/init.c
index f9693f27d2..ca205b758b 100644
--- a/testsuites/smptests/smpschededf03/init.c
+++ b/testsuites/smptests/smpschededf03/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpschededf04/init.c b/testsuites/smptests/smpschededf04/init.c
index 00801d02c1..11a477d9a0 100644
--- a/testsuites/smptests/smpschededf04/init.c
+++ b/testsuites/smptests/smpschededf04/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpschedsem01/init.c b/testsuites/smptests/smpschedsem01/init.c
index bf16bd3aa8..44b1cacde2 100644
--- a/testsuites/smptests/smpschedsem01/init.c
+++ b/testsuites/smptests/smpschedsem01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpscheduler01/init.c b/testsuites/smptests/smpscheduler01/init.c
index 93c0cfe50e..30c5f44f80 100644
--- a/testsuites/smptests/smpscheduler01/init.c
+++ b/testsuites/smptests/smpscheduler01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2013 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpscheduler02/init.c b/testsuites/smptests/smpscheduler02/init.c
index b337fc667e..593dc80a5d 100644
--- a/testsuites/smptests/smpscheduler02/init.c
+++ b/testsuites/smptests/smpscheduler02/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -282,7 +295,7 @@ static void test(void)
prio = 1;
sc = rtems_semaphore_set_priority(cmtx_id, scheduler_b_id, prio, &prio);
rtems_test_assert(sc == RTEMS_NOT_DEFINED);
- rtems_test_assert(prio == 2);
+ rtems_test_assert(prio == 1);
}
CPU_ZERO(&cpuset);
diff --git a/testsuites/smptests/smpscheduler03/init.c b/testsuites/smptests/smpscheduler03/init.c
index 33b076b045..39dea836e1 100644
--- a/testsuites/smptests/smpscheduler03/init.c
+++ b/testsuites/smptests/smpscheduler03/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpscheduler03/test.c b/testsuites/smptests/smpscheduler03/test.c
index 6e519c7425..a49fac72f8 100644
--- a/testsuites/smptests/smpscheduler03/test.c
+++ b/testsuites/smptests/smpscheduler03/test.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpscheduler04/init.c b/testsuites/smptests/smpscheduler04/init.c
index f235bdd21c..a3b4666c32 100644
--- a/testsuites/smptests/smpscheduler04/init.c
+++ b/testsuites/smptests/smpscheduler04/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpscheduler05/init.c b/testsuites/smptests/smpscheduler05/init.c
index 90147ea9d7..733e9924b0 100644
--- a/testsuites/smptests/smpscheduler05/init.c
+++ b/testsuites/smptests/smpscheduler05/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpscheduler06/init.c b/testsuites/smptests/smpscheduler06/init.c
index 6f26639a86..2650f37ffb 100644
--- a/testsuites/smptests/smpscheduler06/init.c
+++ b/testsuites/smptests/smpscheduler06/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpscheduler07/init.c b/testsuites/smptests/smpscheduler07/init.c
index cdd3370413..c97788eb0e 100644
--- a/testsuites/smptests/smpscheduler07/init.c
+++ b/testsuites/smptests/smpscheduler07/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpsignal01/init.c b/testsuites/smptests/smpsignal01/init.c
index 471c058348..1d22bce6da 100644
--- a/testsuites/smptests/smpsignal01/init.c
+++ b/testsuites/smptests/smpsignal01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2013, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2013, 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpstart01/init.c b/testsuites/smptests/smpstart01/init.c
new file mode 100644
index 0000000000..28f185eb2d
--- /dev/null
+++ b/testsuites/smptests/smpstart01/init.c
@@ -0,0 +1,155 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/percpu.h>
+#include <rtems/score/smpimpl.h>
+#include <rtems/score/smpbarrier.h>
+#include <rtems.h>
+#include <rtems/sysinit.h>
+
+#include <tmacros.h>
+
+const char rtems_test_name[] = "SMPSTART 1";
+
+typedef struct {
+ const rtems_tcb *main_tcb;
+ SMP_barrier_Control barrier;
+ Per_CPU_Job job;
+} test_context;
+
+static test_context test_instance;
+
+static void barrier(test_context *ctx)
+{
+ SMP_barrier_State bs;
+
+ _SMP_barrier_State_initialize(&bs);
+ _SMP_barrier_Wait(&ctx->barrier, &bs, 2);
+}
+
+static void prepare_second_cpu(void *arg)
+{
+ test_context *ctx;
+ Per_CPU_Control *cpu_self;
+
+ ctx = arg;
+ cpu_self = _Per_CPU_Get();
+
+ barrier(ctx);
+
+ while (cpu_self->heir != ctx->main_tcb) {
+ RTEMS_COMPILER_MEMORY_BARRIER();
+ }
+}
+
+static const Per_CPU_Job_context job_context = {
+ .handler = prepare_second_cpu,
+ .arg = &test_instance
+};
+
+static void submit_job(void)
+{
+ test_context *ctx;
+
+ ctx = &test_instance;
+ _SMP_barrier_Control_initialize(&ctx->barrier);
+ ctx->job.context = &job_context;
+
+ _Per_CPU_Submit_job(_Per_CPU_Get_by_index(1), &ctx->job);
+}
+
+RTEMS_SYSINIT_ITEM(
+ submit_job,
+ RTEMS_SYSINIT_LAST,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
+static void test(void)
+{
+ test_context *ctx;
+ rtems_status_code sc;
+ rtems_id id;
+
+ ctx = &test_instance;
+ ctx->main_tcb = _Thread_Get_executing();
+
+ barrier(ctx);
+
+ sc = rtems_scheduler_ident_by_processor(1, &id);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ sc = rtems_task_set_scheduler(RTEMS_SELF, id, 1);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ rtems_test_assert(rtems_scheduler_get_processor() == 1);
+ rtems_test_assert(_ISR_Get_level() == 0);
+}
+
+static void Init(rtems_task_argument arg)
+{
+ TEST_BEGIN();
+
+ test();
+
+ TEST_END();
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+#define CONFIGURE_SCHEDULER_EDF_SMP
+
+#include <rtems/scheduler.h>
+
+RTEMS_SCHEDULER_EDF_SMP(a);
+
+RTEMS_SCHEDULER_EDF_SMP(b);
+
+#define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
+ RTEMS_SCHEDULER_TABLE_EDF_SMP(a, rtems_build_name('A', ' ', ' ', ' ')), \
+ RTEMS_SCHEDULER_TABLE_EDF_SMP(b, rtems_build_name('B', ' ', ' ', ' '))
+
+#define CONFIGURE_SCHEDULER_ASSIGNMENTS \
+ RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \
+ RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY)
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/smptests/smpstart01/smpstart01.doc b/testsuites/smptests/smpstart01/smpstart01.doc
new file mode 100644
index 0000000000..10dc9d0615
--- /dev/null
+++ b/testsuites/smptests/smpstart01/smpstart01.doc
@@ -0,0 +1,12 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: smpstart01
+
+directives:
+
+ - _Thread_Start_multitasking()
+
+concepts:
+
+ - Ensure that the multitasking start works in case the first context switch
+ has an heir thread which already executes the thread body.
diff --git a/testsuites/smptests/smpstrongapa01/init.c b/testsuites/smptests/smpstrongapa01/init.c
index 8a02265615..26fc2e9c4c 100644
--- a/testsuites/smptests/smpstrongapa01/init.c
+++ b/testsuites/smptests/smpstrongapa01/init.c
@@ -1,16 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2020 Richi Dubey ( richidubey@gmail.com )
- * Copyright (c) 2016, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2016, 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpswitchextension01/init.c b/testsuites/smptests/smpswitchextension01/init.c
index cee5ae1635..5f8d834305 100644
--- a/testsuites/smptests/smpswitchextension01/init.c
+++ b/testsuites/smptests/smpswitchextension01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2013 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpthreadlife01/init.c b/testsuites/smptests/smpthreadlife01/init.c
index bcbfa48326..baec637dac 100644
--- a/testsuites/smptests/smpthreadlife01/init.c
+++ b/testsuites/smptests/smpthreadlife01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpthreadpin01/init.c b/testsuites/smptests/smpthreadpin01/init.c
index 7c3c9b2309..2eae74c961 100644
--- a/testsuites/smptests/smpthreadpin01/init.c
+++ b/testsuites/smptests/smpthreadpin01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpunsupported01/init.c b/testsuites/smptests/smpunsupported01/init.c
index 01129faf1e..4a6a088148 100644
--- a/testsuites/smptests/smpunsupported01/init.c
+++ b/testsuites/smptests/smpunsupported01/init.c
@@ -1,16 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2014 On-Line Applications Research Corporation (OAR).
- * Copyright (c) 2013, 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2013, 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/smptests/smpwakeafter01/init.c b/testsuites/smptests/smpwakeafter01/init.c
index e4a0e34ae9..88953d4b34 100644
--- a/testsuites/smptests/smpwakeafter01/init.c
+++ b/testsuites/smptests/smpwakeafter01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp01/init.c b/testsuites/sptests/sp01/init.c
index e0072a615c..26d715b0ba 100644
--- a/testsuites/sptests/sp01/init.c
+++ b/testsuites/sptests/sp01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -16,7 +35,8 @@
const char rtems_test_name[] = "SP 1";
-RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT ) static char Task_1_storage[
+static RTEMS_NOINIT RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT ) char
+Task_1_storage[
RTEMS_TASK_STORAGE_SIZE( 2 * RTEMS_MINIMUM_STACK_SIZE, RTEMS_FLOATING_POINT )
];
@@ -25,6 +45,8 @@ static const rtems_task_config Task_1_config = {
.initial_priority = 1,
.storage_area = Task_1_storage,
.storage_size = sizeof( Task_1_storage ),
+ .maximum_thread_local_storage_size = 0,
+ .storage_free = NULL,
.initial_modes = RTEMS_DEFAULT_MODES,
.attributes = RTEMS_FLOATING_POINT
};
diff --git a/testsuites/sptests/sp01/sp01.doc b/testsuites/sptests/sp01/sp01.doc
index 43c8ee0116..e0a4f9f9a2 100644
--- a/testsuites/sptests/sp01/sp01.doc
+++ b/testsuites/sptests/sp01/sp01.doc
@@ -1,13 +1,34 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
test name: sp01
+The test expects that no thread-local object is present.
+
directives:
rtems_task_construct
rtems_task_create
diff --git a/testsuites/sptests/sp01/system.h b/testsuites/sptests/sp01/system.h
index d7990aeca8..782fd929a7 100644
--- a/testsuites/sptests/sp01/system.h
+++ b/testsuites/sptests/sp01/system.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
@@ -21,9 +40,21 @@ rtems_task Task_1_through_3(
/* configuration information */
-#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+/*
+ * Avoid a dependency on errno which might be a thread-local object. This test
+ * assumes that no thread-local storage object is present.
+ */
+#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
+
+/*
+ * This test requires full control over the present thread-local objects. In
+ * certain Newlib configurations, the Newlib reentrancy support may add
+ * thread-local objects.
+ */
+#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
+
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/sptests/sp01/task1.c b/testsuites/sptests/sp01/task1.c
index dcf2ba068c..13d55de3f4 100644
--- a/testsuites/sptests/sp01/task1.c
+++ b/testsuites/sptests/sp01/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp02/init.c b/testsuites/sptests/sp02/init.c
index 170e5441d0..7a3e446a4d 100644
--- a/testsuites/sptests/sp02/init.c
+++ b/testsuites/sptests/sp02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp02/preempt.c b/testsuites/sptests/sp02/preempt.c
index ebc484bcb9..182f2d044e 100644
--- a/testsuites/sptests/sp02/preempt.c
+++ b/testsuites/sptests/sp02/preempt.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp02/sp02.doc b/testsuites/sptests/sp02/sp02.doc
index 30722c0615..dc4f25e83d 100644
--- a/testsuites/sptests/sp02/sp02.doc
+++ b/testsuites/sptests/sp02/sp02.doc
@@ -1,9 +1,28 @@
-# COPYRIGHT (c) 1989-2013.
+# SPDX-License-Identifier: BSD-2-Clause
+
+# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
test set name: sp02
diff --git a/testsuites/sptests/sp02/system.h b/testsuites/sptests/sp02/system.h
index aea6dbc217..0f23f013a8 100644
--- a/testsuites/sptests/sp02/system.h
+++ b/testsuites/sptests/sp02/system.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp02/task1.c b/testsuites/sptests/sp02/task1.c
index 6abed245a7..6b6b73d500 100644
--- a/testsuites/sptests/sp02/task1.c
+++ b/testsuites/sptests/sp02/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp02/task2.c b/testsuites/sptests/sp02/task2.c
index 21df951c0a..e3da167955 100644
--- a/testsuites/sptests/sp02/task2.c
+++ b/testsuites/sptests/sp02/task2.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp02/task3.c b/testsuites/sptests/sp02/task3.c
index 9c43bbac1b..e6c8f0a1c2 100644
--- a/testsuites/sptests/sp02/task3.c
+++ b/testsuites/sptests/sp02/task3.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp03/init.c b/testsuites/sptests/sp03/init.c
index fa423fceb0..cfb3ce20b8 100644
--- a/testsuites/sptests/sp03/init.c
+++ b/testsuites/sptests/sp03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp03/sp03.doc b/testsuites/sptests/sp03/sp03.doc
index 91777f6d51..2013f80f5e 100644
--- a/testsuites/sptests/sp03/sp03.doc
+++ b/testsuites/sptests/sp03/sp03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp03/system.h b/testsuites/sptests/sp03/system.h
index 53e7b56323..ff28a9cc5f 100644
--- a/testsuites/sptests/sp03/system.h
+++ b/testsuites/sptests/sp03/system.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp03/task1.c b/testsuites/sptests/sp03/task1.c
index af05691fe4..de81850e0c 100644
--- a/testsuites/sptests/sp03/task1.c
+++ b/testsuites/sptests/sp03/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp03/task2.c b/testsuites/sptests/sp03/task2.c
index 9e33c2bf4b..24ac739bc7 100644
--- a/testsuites/sptests/sp03/task2.c
+++ b/testsuites/sptests/sp03/task2.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp04/init.c b/testsuites/sptests/sp04/init.c
index b163aec8ed..fb1bb323ed 100644
--- a/testsuites/sptests/sp04/init.c
+++ b/testsuites/sptests/sp04/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp04/sp04.doc b/testsuites/sptests/sp04/sp04.doc
index 16985d2a01..63995be20f 100644
--- a/testsuites/sptests/sp04/sp04.doc
+++ b/testsuites/sptests/sp04/sp04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp04/system.h b/testsuites/sptests/sp04/system.h
index 67ed49cba6..242a17ea61 100644
--- a/testsuites/sptests/sp04/system.h
+++ b/testsuites/sptests/sp04/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp04/task1.c b/testsuites/sptests/sp04/task1.c
index eac1bf6d51..f55b44e8ca 100644
--- a/testsuites/sptests/sp04/task1.c
+++ b/testsuites/sptests/sp04/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This test serves as a test task. It verifies timeslicing activities
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp04/task2.c b/testsuites/sptests/sp04/task2.c
index 1e2645ed98..35d95466f4 100644
--- a/testsuites/sptests/sp04/task2.c
+++ b/testsuites/sptests/sp04/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task. It is just a CPU bound task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp04/task3.c b/testsuites/sptests/sp04/task3.c
index 77b6206e6b..ae40b14b66 100644
--- a/testsuites/sptests/sp04/task3.c
+++ b/testsuites/sptests/sp04/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a test task. It is just a CPU bound task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp04/tswitch.c b/testsuites/sptests/sp04/tswitch.c
index 25263ef02c..81100bdc1d 100644
--- a/testsuites/sptests/sp04/tswitch.c
+++ b/testsuites/sptests/sp04/tswitch.c
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp05/init.c b/testsuites/sptests/sp05/init.c
index 18286a2606..5a04d0c3bb 100644
--- a/testsuites/sptests/sp05/init.c
+++ b/testsuites/sptests/sp05/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp05/sp05.doc b/testsuites/sptests/sp05/sp05.doc
index 895228fffe..6619c8d7d0 100644
--- a/testsuites/sptests/sp05/sp05.doc
+++ b/testsuites/sptests/sp05/sp05.doc
@@ -1,9 +1,28 @@
-# COPYRIGHT (c) 1989-2013.
+# SPDX-License-Identifier: BSD-2-Clause
+
+# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
test set name: sp05
diff --git a/testsuites/sptests/sp05/system.h b/testsuites/sptests/sp05/system.h
index d20217105e..c8ef19efb2 100644
--- a/testsuites/sptests/sp05/system.h
+++ b/testsuites/sptests/sp05/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp05/task1.c b/testsuites/sptests/sp05/task1.c
index b529768c7e..29b10c5f64 100644
--- a/testsuites/sptests/sp05/task1.c
+++ b/testsuites/sptests/sp05/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This routine serves as a test task. It verifies that tasks can
@@ -13,9 +15,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp05/task2.c b/testsuites/sptests/sp05/task2.c
index 1cf52cabea..d4e7c16562 100644
--- a/testsuites/sptests/sp05/task2.c
+++ b/testsuites/sptests/sp05/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task. Makes sure a task can suspend
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp05/task3.c b/testsuites/sptests/sp05/task3.c
index a8addade00..7662b2afbb 100644
--- a/testsuites/sptests/sp05/task3.c
+++ b/testsuites/sptests/sp05/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a test task. Makes sure a task can suspend
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp06/init.c b/testsuites/sptests/sp06/init.c
index 4fa723057f..c88d9eb8c4 100644
--- a/testsuites/sptests/sp06/init.c
+++ b/testsuites/sptests/sp06/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp06/sp06.doc b/testsuites/sptests/sp06/sp06.doc
index 3f0734c190..605fa695aa 100644
--- a/testsuites/sptests/sp06/sp06.doc
+++ b/testsuites/sptests/sp06/sp06.doc
@@ -1,9 +1,28 @@
-# COPYRIGHT (c) 1989-2013.
+# SPDX-License-Identifier: BSD-2-Clause
+
+# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
test set name: sp06
diff --git a/testsuites/sptests/sp06/system.h b/testsuites/sptests/sp06/system.h
index 272399ab6f..41624899f2 100644
--- a/testsuites/sptests/sp06/system.h
+++ b/testsuites/sptests/sp06/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp06/task1.c b/testsuites/sptests/sp06/task1.c
index cc66000c45..61d8c38881 100644
--- a/testsuites/sptests/sp06/task1.c
+++ b/testsuites/sptests/sp06/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This task serves as a test task. Verifies that a task can restart
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp06/task2.c b/testsuites/sptests/sp06/task2.c
index 8b07b58e4a..1aa9a25264 100644
--- a/testsuites/sptests/sp06/task2.c
+++ b/testsuites/sptests/sp06/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task. It simply runs forever so
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp06/task3.c b/testsuites/sptests/sp06/task3.c
index c0750fc09b..0baa8d6236 100644
--- a/testsuites/sptests/sp06/task3.c
+++ b/testsuites/sptests/sp06/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a test task. It is started, has its priority
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp07/init.c b/testsuites/sptests/sp07/init.c
index 083fd21317..e55c0fa474 100644
--- a/testsuites/sptests/sp07/init.c
+++ b/testsuites/sptests/sp07/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp07/sp07.doc b/testsuites/sptests/sp07/sp07.doc
index bb21464c63..949e30a1dd 100644
--- a/testsuites/sptests/sp07/sp07.doc
+++ b/testsuites/sptests/sp07/sp07.doc
@@ -1,9 +1,28 @@
-# COPYRIGHT (c) 1989-2013.
+# SPDX-License-Identifier: BSD-2-Clause
+
+# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
test set name: sp07
diff --git a/testsuites/sptests/sp07/system.h b/testsuites/sptests/sp07/system.h
index 5e319661e1..bcd7b50d1c 100644
--- a/testsuites/sptests/sp07/system.h
+++ b/testsuites/sptests/sp07/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
@@ -92,7 +111,7 @@ TEST_EXTERN int Task_restarted[ RTEMS_ARRAY_SIZE( Task_id ) ];
TEST_EXTERN int Task_deleted[ RTEMS_ARRAY_SIZE( Task_id ) ];
-RTEMS_INLINE_ROUTINE void assert_extension_counts( const int *table, int tasks )
+static inline void assert_extension_counts( const int *table, int tasks )
{
size_t i;
diff --git a/testsuites/sptests/sp07/task1.c b/testsuites/sptests/sp07/task1.c
index c1896b9c70..56e6c65d39 100644
--- a/testsuites/sptests/sp07/task1.c
+++ b/testsuites/sptests/sp07/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp07/task2.c b/testsuites/sptests/sp07/task2.c
index efa66b6114..74c8d9bdc4 100644
--- a/testsuites/sptests/sp07/task2.c
+++ b/testsuites/sptests/sp07/task2.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp07/task3.c b/testsuites/sptests/sp07/task3.c
index 4277e1e92b..598af3c403 100644
--- a/testsuites/sptests/sp07/task3.c
+++ b/testsuites/sptests/sp07/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a low priority test task that should never
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp07/task4.c b/testsuites/sptests/sp07/task4.c
index 365b595d81..6b354428e8 100644
--- a/testsuites/sptests/sp07/task4.c
+++ b/testsuites/sptests/sp07/task4.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_4
*
* This routine serves as a low priority test task that should exit
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp07/taskexit.c b/testsuites/sptests/sp07/taskexit.c
index 6066038d49..8d21b516ae 100644
--- a/testsuites/sptests/sp07/taskexit.c
+++ b/testsuites/sptests/sp07/taskexit.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_exit_extension
*
* This routine is the task exitted user extension.
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp07/tcreate.c b/testsuites/sptests/sp07/tcreate.c
index 351aacd715..0460358525 100644
--- a/testsuites/sptests/sp07/tcreate.c
+++ b/testsuites/sptests/sp07/tcreate.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_create_extension
*
* This routine is the tcreate user extension.
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp07/tdelete.c b/testsuites/sptests/sp07/tdelete.c
index a7136e2551..59fe9eeb68 100644
--- a/testsuites/sptests/sp07/tdelete.c
+++ b/testsuites/sptests/sp07/tdelete.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_delete_extension
*
* This routine is the delete user extension.
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp07/trestart.c b/testsuites/sptests/sp07/trestart.c
index d821562f2b..1f51fec274 100644
--- a/testsuites/sptests/sp07/trestart.c
+++ b/testsuites/sptests/sp07/trestart.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_restart_extension
*
* This routine is the trestart user extension.
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp07/tstart.c b/testsuites/sptests/sp07/tstart.c
index c2f29cb2dd..6b0ef3ee57 100644
--- a/testsuites/sptests/sp07/tstart.c
+++ b/testsuites/sptests/sp07/tstart.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_start_extension
*
* This routine is the tstart user extension.
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp08/init.c b/testsuites/sptests/sp08/init.c
index 4229feb15c..4717839a6e 100644
--- a/testsuites/sptests/sp08/init.c
+++ b/testsuites/sptests/sp08/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp08/sp08.doc b/testsuites/sptests/sp08/sp08.doc
index 2dc9731ea6..1332228cb1 100644
--- a/testsuites/sptests/sp08/sp08.doc
+++ b/testsuites/sptests/sp08/sp08.doc
@@ -1,9 +1,28 @@
-# COPYRIGHT (c) 1989-2013.
+# SPDX-License-Identifier: BSD-2-Clause
+
+# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
test set name: sp08
diff --git a/testsuites/sptests/sp11/init.c b/testsuites/sptests/sp11/init.c
index 729cbf052f..9c8e3eeb19 100644
--- a/testsuites/sptests/sp11/init.c
+++ b/testsuites/sptests/sp11/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp11/sp11.doc b/testsuites/sptests/sp11/sp11.doc
index 85e143d83b..58c1abb495 100644
--- a/testsuites/sptests/sp11/sp11.doc
+++ b/testsuites/sptests/sp11/sp11.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp11/system.h b/testsuites/sptests/sp11/system.h
index a3ce85daea..e717eae143 100644
--- a/testsuites/sptests/sp11/system.h
+++ b/testsuites/sptests/sp11/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp11/task1.c b/testsuites/sptests/sp11/task1.c
index d10746bae9..720aab70cc 100644
--- a/testsuites/sptests/sp11/task1.c
+++ b/testsuites/sptests/sp11/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp11/task2.c b/testsuites/sptests/sp11/task2.c
index 7cda7a773c..c2a05a9269 100644
--- a/testsuites/sptests/sp11/task2.c
+++ b/testsuites/sptests/sp11/task2.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp11/timer.c b/testsuites/sptests/sp11/timer.c
index e606503159..17fdea3a2a 100644
--- a/testsuites/sptests/sp11/timer.c
+++ b/testsuites/sptests/sp11/timer.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Timer_functions
*
* These routines are the timer service routines used by this test.
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp12/init.c b/testsuites/sptests/sp12/init.c
index 7aa09d3676..5120a2303c 100644
--- a/testsuites/sptests/sp12/init.c
+++ b/testsuites/sptests/sp12/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp12/pridrv.c b/testsuites/sptests/sp12/pridrv.c
index 83fe65bf0b..33b454125e 100644
--- a/testsuites/sptests/sp12/pridrv.c
+++ b/testsuites/sptests/sp12/pridrv.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp12/pritask.c b/testsuites/sptests/sp12/pritask.c
index 2de764a524..33f2c0a4c9 100644
--- a/testsuites/sptests/sp12/pritask.c
+++ b/testsuites/sptests/sp12/pritask.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp12/sp12.doc b/testsuites/sptests/sp12/sp12.doc
index 6fbad76e00..ba471d3d3b 100644
--- a/testsuites/sptests/sp12/sp12.doc
+++ b/testsuites/sptests/sp12/sp12.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp12/system.h b/testsuites/sptests/sp12/system.h
index 107831b3a0..f81e492154 100644
--- a/testsuites/sptests/sp12/system.h
+++ b/testsuites/sptests/sp12/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp12/task1.c b/testsuites/sptests/sp12/task1.c
index 633e0ab32f..60a31f3368 100644
--- a/testsuites/sptests/sp12/task1.c
+++ b/testsuites/sptests/sp12/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This routine serves as a test task. It verifies the semaphore manager.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp12/task2.c b/testsuites/sptests/sp12/task2.c
index b701b4b6f1..04e2e1dc11 100644
--- a/testsuites/sptests/sp12/task2.c
+++ b/testsuites/sptests/sp12/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task. It simply obtains semaphores
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/sptests/sp12/task3.c b/testsuites/sptests/sp12/task3.c
index 0045f94767..1e1c1fe163 100644
--- a/testsuites/sptests/sp12/task3.c
+++ b/testsuites/sptests/sp12/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a test task. It simply obtains semaphore
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp12/task4.c b/testsuites/sptests/sp12/task4.c
index b5c2585198..cfaccbb4a1 100644
--- a/testsuites/sptests/sp12/task4.c
+++ b/testsuites/sptests/sp12/task4.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_4
*
* This routine serves as a test task. It waits forever attempting
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp12/task5.c b/testsuites/sptests/sp12/task5.c
index a8dfa333fc..9f6411c8db 100644
--- a/testsuites/sptests/sp12/task5.c
+++ b/testsuites/sptests/sp12/task5.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task5
*
* This routine serves as a test task. It obtains semaphore 1 correctly
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp13/fillbuff.c b/testsuites/sptests/sp13/fillbuff.c
index d39d073fc0..5a559af7e4 100644
--- a/testsuites/sptests/sp13/fillbuff.c
+++ b/testsuites/sptests/sp13/fillbuff.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Fill_buffer
*
* This test routine copies a given source string to a given destination
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp13/init.c b/testsuites/sptests/sp13/init.c
index f8ffd55426..1dfb457955 100644
--- a/testsuites/sptests/sp13/init.c
+++ b/testsuites/sptests/sp13/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp13/putbuff.c b/testsuites/sptests/sp13/putbuff.c
index d6c22568d6..0bc9d7c51f 100644
--- a/testsuites/sptests/sp13/putbuff.c
+++ b/testsuites/sptests/sp13/putbuff.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Put_buffer
*
* This test routine prints the given buffer.
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp13/sp13.doc b/testsuites/sptests/sp13/sp13.doc
index d76a598208..08b634d5bd 100644
--- a/testsuites/sptests/sp13/sp13.doc
+++ b/testsuites/sptests/sp13/sp13.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp13/system.h b/testsuites/sptests/sp13/system.h
index 1abfc96b1d..522ac9db41 100644
--- a/testsuites/sptests/sp13/system.h
+++ b/testsuites/sptests/sp13/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp13/task1.c b/testsuites/sptests/sp13/task1.c
index ccf543b791..df98d24101 100644
--- a/testsuites/sptests/sp13/task1.c
+++ b/testsuites/sptests/sp13/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011, 2016.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp13/task2.c b/testsuites/sptests/sp13/task2.c
index 71a7c1457e..8020ec2d5c 100644
--- a/testsuites/sptests/sp13/task2.c
+++ b/testsuites/sptests/sp13/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task. Multiple tasks are required to
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp13/task3.c b/testsuites/sptests/sp13/task3.c
index af65b88334..827d91c6cd 100644
--- a/testsuites/sptests/sp13/task3.c
+++ b/testsuites/sptests/sp13/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a test task. Its major function is to
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp14/asr.c b/testsuites/sptests/sp14/asr.c
index 4239a34183..9a1c82f04e 100644
--- a/testsuites/sptests/sp14/asr.c
+++ b/testsuites/sptests/sp14/asr.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp14/init.c b/testsuites/sptests/sp14/init.c
index 8baa9b0d74..78c8a3188f 100644
--- a/testsuites/sptests/sp14/init.c
+++ b/testsuites/sptests/sp14/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp14/sp14.doc b/testsuites/sptests/sp14/sp14.doc
index a0a568c373..bd7afab5af 100644
--- a/testsuites/sptests/sp14/sp14.doc
+++ b/testsuites/sptests/sp14/sp14.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp14/system.h b/testsuites/sptests/sp14/system.h
index b0e04a129e..307fc8e5c3 100644
--- a/testsuites/sptests/sp14/system.h
+++ b/testsuites/sptests/sp14/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp14/task1.c b/testsuites/sptests/sp14/task1.c
index 07657272dc..5f4ec745b8 100644
--- a/testsuites/sptests/sp14/task1.c
+++ b/testsuites/sptests/sp14/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp14/task2.c b/testsuites/sptests/sp14/task2.c
index da14dc8ce3..4ac8b62649 100644
--- a/testsuites/sptests/sp14/task2.c
+++ b/testsuites/sptests/sp14/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task. It verifies that one task can
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp15/init.c b/testsuites/sptests/sp15/init.c
index 2565495a06..799dc9ae6a 100644
--- a/testsuites/sptests/sp15/init.c
+++ b/testsuites/sptests/sp15/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp15/sp15.doc b/testsuites/sptests/sp15/sp15.doc
index 7c82afd84c..b542f0121a 100644
--- a/testsuites/sptests/sp15/sp15.doc
+++ b/testsuites/sptests/sp15/sp15.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp15/system.h b/testsuites/sptests/sp15/system.h
index 68fd100a6a..0af8fa486b 100644
--- a/testsuites/sptests/sp15/system.h
+++ b/testsuites/sptests/sp15/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp15/task1.c b/testsuites/sptests/sp15/task1.c
index 609d37fc2e..e411f311a2 100644
--- a/testsuites/sptests/sp15/task1.c
+++ b/testsuites/sptests/sp15/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This routine serves as a test task. It tests the partition manager.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp16/init.c b/testsuites/sptests/sp16/init.c
index efb0a3e903..92c18cb44a 100644
--- a/testsuites/sptests/sp16/init.c
+++ b/testsuites/sptests/sp16/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp16/sp16.doc b/testsuites/sptests/sp16/sp16.doc
index 2a52d85516..7070411afe 100644
--- a/testsuites/sptests/sp16/sp16.doc
+++ b/testsuites/sptests/sp16/sp16.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp16/system.h b/testsuites/sptests/sp16/system.h
index 8299e7e8ca..51f6aae008 100644
--- a/testsuites/sptests/sp16/system.h
+++ b/testsuites/sptests/sp16/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp16/task1.c b/testsuites/sptests/sp16/task1.c
index aa147a9260..5b05319dc1 100644
--- a/testsuites/sptests/sp16/task1.c
+++ b/testsuites/sptests/sp16/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This routine serves as a test task. It tests the region manager.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp16/task2.c b/testsuites/sptests/sp16/task2.c
index 399517854f..3b4c773cce 100644
--- a/testsuites/sptests/sp16/task2.c
+++ b/testsuites/sptests/sp16/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task. It competes with the other tasks
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp16/task3.c b/testsuites/sptests/sp16/task3.c
index bb7acf1248..fdf66e92a5 100644
--- a/testsuites/sptests/sp16/task3.c
+++ b/testsuites/sptests/sp16/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a test task. It competes with the other tasks
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp16/task4.c b/testsuites/sptests/sp16/task4.c
index ce39191c2f..7f7ce799b5 100644
--- a/testsuites/sptests/sp16/task4.c
+++ b/testsuites/sptests/sp16/task4.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_4
*
* This routine serves as a test task. It competes with the other tasks
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp16/task5.c b/testsuites/sptests/sp16/task5.c
index e5e524a790..c67a1fa641 100644
--- a/testsuites/sptests/sp16/task5.c
+++ b/testsuites/sptests/sp16/task5.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task5
*
* This routine serves as a test task. It competes with the other tasks
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp17/asr.c b/testsuites/sptests/sp17/asr.c
index fa364a7861..94b0fa365c 100644
--- a/testsuites/sptests/sp17/asr.c
+++ b/testsuites/sptests/sp17/asr.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Process_asr
*
* This routine performs the processing for task 1's RTEMS_ASR. It is called
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp17/init.c b/testsuites/sptests/sp17/init.c
index fd6023caa9..bb4a3a353b 100644
--- a/testsuites/sptests/sp17/init.c
+++ b/testsuites/sptests/sp17/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp17/sp17.doc b/testsuites/sptests/sp17/sp17.doc
index 448d7bf04f..17fb25a7f3 100644
--- a/testsuites/sptests/sp17/sp17.doc
+++ b/testsuites/sptests/sp17/sp17.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp17/system.h b/testsuites/sptests/sp17/system.h
index 52884269da..0f78218560 100644
--- a/testsuites/sptests/sp17/system.h
+++ b/testsuites/sptests/sp17/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp17/task1.c b/testsuites/sptests/sp17/task1.c
index d21c782ae0..7fcc9bf11b 100644
--- a/testsuites/sptests/sp17/task1.c
+++ b/testsuites/sptests/sp17/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This task initializes the signal catcher, sends the first signal
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp17/task2.c b/testsuites/sptests/sp17/task2.c
index 34c89f13b8..2254842e09 100644
--- a/testsuites/sptests/sp17/task2.c
+++ b/testsuites/sptests/sp17/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This task initializes the signal catcher, sends the first signal
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp18/init.c b/testsuites/sptests/sp18/init.c
index 7a4bb14d26..e38e9d1738 100644
--- a/testsuites/sptests/sp18/init.c
+++ b/testsuites/sptests/sp18/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp18/sp18.doc b/testsuites/sptests/sp18/sp18.doc
index 098bbeba72..e1adad668a 100644
--- a/testsuites/sptests/sp18/sp18.doc
+++ b/testsuites/sptests/sp18/sp18.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp19/first.c b/testsuites/sptests/sp19/first.c
index 69ff29762f..f602c927e4 100644
--- a/testsuites/sptests/sp19/first.c
+++ b/testsuites/sptests/sp19/first.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -26,7 +45,7 @@ rtems_task First_FP_task(
INTEGER_DECLARE;
FP_DECLARE;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident" );
task_index = task_number( tid );
diff --git a/testsuites/sptests/sp19/fptask.c b/testsuites/sptests/sp19/fptask.c
index 5ffff37f7e..79e7dbf760 100644
--- a/testsuites/sptests/sp19/fptask.c
+++ b/testsuites/sptests/sp19/fptask.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -27,7 +46,7 @@ rtems_task FP_task(
INTEGER_DECLARE;
FP_DECLARE;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident of self" );
task_index = task_number( tid );
diff --git a/testsuites/sptests/sp19/fptest.h b/testsuites/sptests/sp19/fptest.h
index 285b5ddcb1..c9dd5351ac 100644
--- a/testsuites/sptests/sp19/fptest.h
+++ b/testsuites/sptests/sp19/fptest.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
* @brief Floating Point Register Pressure and Check
@@ -19,9 +21,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/sptests/sp19/init.c b/testsuites/sptests/sp19/init.c
index ca15fb8cfa..eb87a382a3 100644
--- a/testsuites/sptests/sp19/init.c
+++ b/testsuites/sptests/sp19/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp19/inttest.h b/testsuites/sptests/sp19/inttest.h
index bf2156e848..1f07090547 100644
--- a/testsuites/sptests/sp19/inttest.h
+++ b/testsuites/sptests/sp19/inttest.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains the CPU dependent implementation
* of the following routines needed to test RTEMS floating
@@ -16,9 +18,26 @@
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/sptests/sp19/sp19.doc b/testsuites/sptests/sp19/sp19.doc
index 08de5a2bca..49e8c8342a 100644
--- a/testsuites/sptests/sp19/sp19.doc
+++ b/testsuites/sptests/sp19/sp19.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp19/system.h b/testsuites/sptests/sp19/system.h
index 59ae0104f0..e99c2a22b6 100644
--- a/testsuites/sptests/sp19/system.h
+++ b/testsuites/sptests/sp19/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp19/task1.c b/testsuites/sptests/sp19/task1.c
index 912ed26ac6..cd23973ad5 100644
--- a/testsuites/sptests/sp19/task1.c
+++ b/testsuites/sptests/sp19/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -24,7 +43,7 @@ rtems_task Task_1(
uint32_t task_index;
INTEGER_DECLARE;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident" );
task_index = task_number( tid );
diff --git a/testsuites/sptests/sp20/getall.c b/testsuites/sptests/sp20/getall.c
index 60392a831a..b4b63597fb 100644
--- a/testsuites/sptests/sp20/getall.c
+++ b/testsuites/sptests/sp20/getall.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Get_all_counters
*
* This routine allows TA5 to atomically obtain the iteration counters.
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp20/init.c b/testsuites/sptests/sp20/init.c
index 24920c15de..9d62beadd7 100644
--- a/testsuites/sptests/sp20/init.c
+++ b/testsuites/sptests/sp20/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp20/sp20.doc b/testsuites/sptests/sp20/sp20.doc
index 558aa1b6f3..cc097ace09 100644
--- a/testsuites/sptests/sp20/sp20.doc
+++ b/testsuites/sptests/sp20/sp20.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp20/system.h b/testsuites/sptests/sp20/system.h
index 4585639fe3..f0e339def4 100644
--- a/testsuites/sptests/sp20/system.h
+++ b/testsuites/sptests/sp20/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp20/task1.c b/testsuites/sptests/sp20/task1.c
index 497b4f09ff..c8072a0181 100644
--- a/testsuites/sptests/sp20/task1.c
+++ b/testsuites/sptests/sp20/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp2038/init.c b/testsuites/sptests/sp2038/init.c
index 02789e55a5..89462beb84 100644
--- a/testsuites/sptests/sp2038/init.c
+++ b/testsuites/sptests/sp2038/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2011, 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2011, 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp2038/sp2038.doc b/testsuites/sptests/sp2038/sp2038.doc
index db6fa10045..056814a58e 100644
--- a/testsuites/sptests/sp2038/sp2038.doc
+++ b/testsuites/sptests/sp2038/sp2038.doc
@@ -1,8 +1,27 @@
-# Copyright (c) 2011 embedded brains GmbH. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2011 embedded brains GmbH & Co. KG
+#
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp21/init.c b/testsuites/sptests/sp21/init.c
index bd0ae2b6a1..2dc46dc692 100644
--- a/testsuites/sptests/sp21/init.c
+++ b/testsuites/sptests/sp21/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp21/sp21.doc b/testsuites/sptests/sp21/sp21.doc
index 191abd1f87..02e5666fbd 100644
--- a/testsuites/sptests/sp21/sp21.doc
+++ b/testsuites/sptests/sp21/sp21.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp21/sp21.scn b/testsuites/sptests/sp21/sp21.scn
index 6c099dfc13..87c798d5bd 100644
--- a/testsuites/sptests/sp21/sp21.scn
+++ b/testsuites/sptests/sp21/sp21.scn
@@ -25,8 +25,5 @@ rtems_io_register_driver - RTEMS_SUCCESSFUL - overwrite NULL
rtems_io_register_driver - RTEMS_TOO_MANY - no slots
rtems_io_register_driver - RTEMS_RESOURCE_IN_USE - major in use
rtems_io_unregister_driver - RTEMS_SUCCESSFUL
-rtems_io_lookup_name( "", &info ) - RTEMS_UNSATISFIED
-rtems_io_lookup_name( "/dev", &info ) - RTEMS_UNSATISFIED
-rtems_io_lookup_name( "/dev/null", &info ) - RTEMS_SUCCESSFUL
----- TESTING THE ZERO DRIVER CHECKS -----
*** END OF TEST 21 ***
diff --git a/testsuites/sptests/sp22/delay.c b/testsuites/sptests/sp22/delay.c
index 58ad6dc1da..7863800687 100644
--- a/testsuites/sptests/sp22/delay.c
+++ b/testsuites/sptests/sp22/delay.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Delayed_resume
*
* This routine is scheduled to be fired as a timer service routine.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp22/init.c b/testsuites/sptests/sp22/init.c
index f7f9e2e8ed..f60f4279cf 100644
--- a/testsuites/sptests/sp22/init.c
+++ b/testsuites/sptests/sp22/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp22/prtime.c b/testsuites/sptests/sp22/prtime.c
index 865e0fe0d3..9f9d2c463b 100644
--- a/testsuites/sptests/sp22/prtime.c
+++ b/testsuites/sptests/sp22/prtime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Print_time
*
* This routine prints the name of Task_1 and the current time of day.
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp22/sp22.doc b/testsuites/sptests/sp22/sp22.doc
index cf5b8d984e..1633171351 100644
--- a/testsuites/sptests/sp22/sp22.doc
+++ b/testsuites/sptests/sp22/sp22.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp22/system.h b/testsuites/sptests/sp22/system.h
index 9b5ba9f8e7..16a2d5a93d 100644
--- a/testsuites/sptests/sp22/system.h
+++ b/testsuites/sptests/sp22/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp22/task1.c b/testsuites/sptests/sp22/task1.c
index c44be77f7a..239b564a20 100644
--- a/testsuites/sptests/sp22/task1.c
+++ b/testsuites/sptests/sp22/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This routine serves as a test task. It verifies the basic task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp23/init.c b/testsuites/sptests/sp23/init.c
index 3605dcca55..e2fba33cf9 100644
--- a/testsuites/sptests/sp23/init.c
+++ b/testsuites/sptests/sp23/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp23/sp23.doc b/testsuites/sptests/sp23/sp23.doc
index 1e559489af..8c43265bc1 100644
--- a/testsuites/sptests/sp23/sp23.doc
+++ b/testsuites/sptests/sp23/sp23.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp23/system.h b/testsuites/sptests/sp23/system.h
index b7c1107008..b0debbc262 100644
--- a/testsuites/sptests/sp23/system.h
+++ b/testsuites/sptests/sp23/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp23/task1.c b/testsuites/sptests/sp23/task1.c
index 659eef11d8..e7d0dc6696 100644
--- a/testsuites/sptests/sp23/task1.c
+++ b/testsuites/sptests/sp23/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This task verifies that the dual ported RAM directives work
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp24/init.c b/testsuites/sptests/sp24/init.c
index cac46fdc2a..ef83de1730 100644
--- a/testsuites/sptests/sp24/init.c
+++ b/testsuites/sptests/sp24/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp24/resume.c b/testsuites/sptests/sp24/resume.c
index b4718a564e..7c3e7e0f75 100644
--- a/testsuites/sptests/sp24/resume.c
+++ b/testsuites/sptests/sp24/resume.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Resume_task
*
* This subprogram is scheduled as a timer service routine. When
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp24/sp24.doc b/testsuites/sptests/sp24/sp24.doc
index 4d3b10d132..f8a02ddba6 100644
--- a/testsuites/sptests/sp24/sp24.doc
+++ b/testsuites/sptests/sp24/sp24.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp24/system.h b/testsuites/sptests/sp24/system.h
index b0bcad44a1..0b4915644d 100644
--- a/testsuites/sptests/sp24/system.h
+++ b/testsuites/sptests/sp24/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp24/task1.c b/testsuites/sptests/sp24/task1.c
index 9a2de67f40..85273158a9 100644
--- a/testsuites/sptests/sp24/task1.c
+++ b/testsuites/sptests/sp24/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1_through_3
*
* This task is a cyclic version of test1 to asssure that the times
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -30,7 +49,7 @@ rtems_task Task_1_through_3(
rtems_time_of_day time;
rtems_status_code status;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident of self" );
while ( FOREVER ) {
diff --git a/testsuites/sptests/sp25/init.c b/testsuites/sptests/sp25/init.c
index 2a5af0cede..6aaae407c0 100644
--- a/testsuites/sptests/sp25/init.c
+++ b/testsuites/sptests/sp25/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp25/sp25.doc b/testsuites/sptests/sp25/sp25.doc
index 85f2fe28a5..b38fd913e6 100644
--- a/testsuites/sptests/sp25/sp25.doc
+++ b/testsuites/sptests/sp25/sp25.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp25/system.h b/testsuites/sptests/sp25/system.h
index 820fee0578..682aa7e12d 100644
--- a/testsuites/sptests/sp25/system.h
+++ b/testsuites/sptests/sp25/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp25/task1.c b/testsuites/sptests/sp25/task1.c
index 69fe6309d4..d52690fec2 100644
--- a/testsuites/sptests/sp25/task1.c
+++ b/testsuites/sptests/sp25/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp26/init.c b/testsuites/sptests/sp26/init.c
index 0ac7157e7c..d0b5f0b472 100644
--- a/testsuites/sptests/sp26/init.c
+++ b/testsuites/sptests/sp26/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp26/sp26.doc b/testsuites/sptests/sp26/sp26.doc
index 5ddc8e3c8f..761da1f1d3 100644
--- a/testsuites/sptests/sp26/sp26.doc
+++ b/testsuites/sptests/sp26/sp26.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp26/system.h b/testsuites/sptests/sp26/system.h
index e1defb94e2..4a1a5e6479 100644
--- a/testsuites/sptests/sp26/system.h
+++ b/testsuites/sptests/sp26/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2006.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp26/task1.c b/testsuites/sptests/sp26/task1.c
index 45aa08d7b3..cc04d53de3 100644
--- a/testsuites/sptests/sp26/task1.c
+++ b/testsuites/sptests/sp26/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp27/init.c b/testsuites/sptests/sp27/init.c
index c1e9ba5996..3dfb2f6c00 100644
--- a/testsuites/sptests/sp27/init.c
+++ b/testsuites/sptests/sp27/init.c
@@ -1 +1,36 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is init for sp27.
+ */
+
+/*
+ * Copyright (C) 1999 Eric Norum <eric@norum.ca>.
+ *
+ * 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 OWNER 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.
+ */
+
#include "sp27impl.h"
diff --git a/testsuites/sptests/sp27/sp27.doc b/testsuites/sptests/sp27/sp27.doc
index 4149d9eb35..34a6d310d8 100644
--- a/testsuites/sptests/sp27/sp27.doc
+++ b/testsuites/sptests/sp27/sp27.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp27/sp27impl.h b/testsuites/sptests/sp27/sp27impl.h
index b9522fd364..0b68ed0cd9 100644
--- a/testsuites/sptests/sp27/sp27impl.h
+++ b/testsuites/sptests/sp27/sp27impl.h
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Test for rtems_semaphore_flush
*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp27a/init.c b/testsuites/sptests/sp27a/init.c
index 23a5033dd7..e9cdd278d3 100644
--- a/testsuites/sptests/sp27a/init.c
+++ b/testsuites/sptests/sp27a/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is init for sp27a.
+ */
+
+/*
+ * Copyright (C) 1999 Eric Norum <eric@norum.ca>.
+ *
+ * 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 OWNER 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.
+ */
+
#define USE_COUNTING_SEMAPHORE
#include "../sp27/sp27impl.h"
diff --git a/testsuites/sptests/sp27a/sp27a.doc b/testsuites/sptests/sp27a/sp27a.doc
index 31496d7099..521df7676b 100644
--- a/testsuites/sptests/sp27a/sp27a.doc
+++ b/testsuites/sptests/sp27a/sp27a.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp30/init.c b/testsuites/sptests/sp30/init.c
index df6324b5a7..9a5ea7330c 100644
--- a/testsuites/sptests/sp30/init.c
+++ b/testsuites/sptests/sp30/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-2002.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp30/resume.c b/testsuites/sptests/sp30/resume.c
index c5ff7fb60b..6dc874ebfe 100644
--- a/testsuites/sptests/sp30/resume.c
+++ b/testsuites/sptests/sp30/resume.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Resume_task
*
* This subprogram is scheduled as a timer service routine. When
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp30/sp30.doc b/testsuites/sptests/sp30/sp30.doc
index 85e7749ff1..840b40fc00 100644
--- a/testsuites/sptests/sp30/sp30.doc
+++ b/testsuites/sptests/sp30/sp30.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2002.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp30/system.h b/testsuites/sptests/sp30/system.h
index 0ec1ed9f57..c19bb62423 100644
--- a/testsuites/sptests/sp30/system.h
+++ b/testsuites/sptests/sp30/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2002.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp30/task1.c b/testsuites/sptests/sp30/task1.c
index da4b0d20e7..4891dab141 100644
--- a/testsuites/sptests/sp30/task1.c
+++ b/testsuites/sptests/sp30/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1_through_3
*
* This task is a cyclic version of test1 to asssure that the times
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -30,7 +49,7 @@ rtems_task Task_1_through_3(
rtems_time_of_day time;
rtems_status_code status;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident of self" );
while ( FOREVER ) {
diff --git a/testsuites/sptests/sp31/delay.c b/testsuites/sptests/sp31/delay.c
index 0daac3afa7..d49f578b89 100644
--- a/testsuites/sptests/sp31/delay.c
+++ b/testsuites/sptests/sp31/delay.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Delayed_resume
*
* This routine is scheduled to be fired as a timer service routine.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2002.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp31/init.c b/testsuites/sptests/sp31/init.c
index adbbcb2366..d1b2873d04 100644
--- a/testsuites/sptests/sp31/init.c
+++ b/testsuites/sptests/sp31/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-2002.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp31/prtime.c b/testsuites/sptests/sp31/prtime.c
index 7d75a9303b..791e1c3f0f 100644
--- a/testsuites/sptests/sp31/prtime.c
+++ b/testsuites/sptests/sp31/prtime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Print_time
*
* This routine prints the name of Task_1 and the current time of day.
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2002.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp31/sp31.doc b/testsuites/sptests/sp31/sp31.doc
index a7b55c9fa7..660d1befec 100644
--- a/testsuites/sptests/sp31/sp31.doc
+++ b/testsuites/sptests/sp31/sp31.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2002.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp31/system.h b/testsuites/sptests/sp31/system.h
index 05c0009e5a..7cc1ac7a27 100644
--- a/testsuites/sptests/sp31/system.h
+++ b/testsuites/sptests/sp31/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2002.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp31/task1.c b/testsuites/sptests/sp31/task1.c
index 0abc0efc11..09580ee457 100644
--- a/testsuites/sptests/sp31/task1.c
+++ b/testsuites/sptests/sp31/task1.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * Copyright (c) 2009 embedded brains GmbH.
+ * Copyright (c) 2009 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp32/init.c b/testsuites/sptests/sp32/init.c
index 2432a14d2f..21cdaa21f9 100644
--- a/testsuites/sptests/sp32/init.c
+++ b/testsuites/sptests/sp32/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp32/sp32.doc b/testsuites/sptests/sp32/sp32.doc
index 2757e4f555..5d2b1f7795 100644
--- a/testsuites/sptests/sp32/sp32.doc
+++ b/testsuites/sptests/sp32/sp32.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp33/init.c b/testsuites/sptests/sp33/init.c
index 72945a6fe5..c6fb8c5714 100644
--- a/testsuites/sptests/sp33/init.c
+++ b/testsuites/sptests/sp33/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp33/sp33.doc b/testsuites/sptests/sp33/sp33.doc
index 28052c7163..a7d3fb304a 100644
--- a/testsuites/sptests/sp33/sp33.doc
+++ b/testsuites/sptests/sp33/sp33.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp37/init.c b/testsuites/sptests/sp37/init.c
index 4c8e1a7f64..e8af725a75 100644
--- a/testsuites/sptests/sp37/init.c
+++ b/testsuites/sptests/sp37/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @brief Test for Bodies of Macros
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -21,6 +40,8 @@
#define CONFIGURE_INIT
#include "system.h"
+#include <rtems/sysinit.h>
+
const char rtems_test_name[] = "SP 37";
/* prototypes */
@@ -48,6 +69,19 @@ rtems_timer_service_routine test_isr_in_progress(
#define TEST_ISR_EVENT RTEMS_EVENT_0
+static uint32_t boot_isr_level;
+
+static void set_boot_isr_level( void )
+{
+ boot_isr_level = _ISR_Get_level();
+}
+
+RTEMS_SYSINIT_ITEM(
+ set_boot_isr_level,
+ RTEMS_SYSINIT_DEVICE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
typedef struct {
ISR_Level actual_level;
rtems_id master_task_id;
@@ -135,6 +169,9 @@ static void test_isr_level( void )
ISR_Level current = 0;
ISR_Level last_proper_level;
+ /* Interrupts shall be disabled during system initialization */
+ rtems_test_assert( boot_isr_level != 0 );
+
_ISR_Set_level( current );
rtems_test_assert( _ISR_Get_level() == current );
diff --git a/testsuites/sptests/sp37/sp37.doc b/testsuites/sptests/sp37/sp37.doc
index b98faa1caa..bfd290788e 100644
--- a/testsuites/sptests/sp37/sp37.doc
+++ b/testsuites/sptests/sp37/sp37.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp37/system.h b/testsuites/sptests/sp37/system.h
index d7b98e40f5..25df9b4115 100644
--- a/testsuites/sptests/sp37/system.h
+++ b/testsuites/sptests/sp37/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp38/init.c b/testsuites/sptests/sp38/init.c
index d77d5d2a1c..20a6f9066b 100644
--- a/testsuites/sptests/sp38/init.c
+++ b/testsuites/sptests/sp38/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Classic API Signal to Task from ISR
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp38/sp38.doc b/testsuites/sptests/sp38/sp38.doc
index e6e876e61a..1b15fad606 100644
--- a/testsuites/sptests/sp38/sp38.doc
+++ b/testsuites/sptests/sp38/sp38.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp38/system.h b/testsuites/sptests/sp38/system.h
index 24fb0e6bf0..91ff72c66e 100644
--- a/testsuites/sptests/sp38/system.h
+++ b/testsuites/sptests/sp38/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp40/init.c b/testsuites/sptests/sp40/init.c
index ff63f66e7f..523e074cc6 100644
--- a/testsuites/sptests/sp40/init.c
+++ b/testsuites/sptests/sp40/init.c
@@ -1,14 +1,33 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* IO Manager Dynamic Registration
*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * Copyright (c) 2009 embedded brains GmbH.
+ * Copyright (c) 2009 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp40/sp40.doc b/testsuites/sptests/sp40/sp40.doc
index a40c18f8df..7c1c756c33 100644
--- a/testsuites/sptests/sp40/sp40.doc
+++ b/testsuites/sptests/sp40/sp40.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp41/init.c b/testsuites/sptests/sp41/init.c
index 02fb5254d7..b3cb74b88e 100644
--- a/testsuites/sptests/sp41/init.c
+++ b/testsuites/sptests/sp41/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp41/sp41.doc b/testsuites/sptests/sp41/sp41.doc
index 8bd8f47010..9ada29e1f6 100644
--- a/testsuites/sptests/sp41/sp41.doc
+++ b/testsuites/sptests/sp41/sp41.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp42/init.c b/testsuites/sptests/sp42/init.c
index 10e49275e5..24d5a68d81 100644
--- a/testsuites/sptests/sp42/init.c
+++ b/testsuites/sptests/sp42/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Exercise thread queue enqueue and dequeue priority
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -74,7 +93,7 @@ static rtems_task Locker_task(
rtems_status_code status;
rtems_task_argument my_obtain_counter;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident" );
rtems_test_assert( task_index == task_number( tid ) - 1 );
diff --git a/testsuites/sptests/sp42/sp42.doc b/testsuites/sptests/sp42/sp42.doc
index 386297f519..bc87e376d7 100644
--- a/testsuites/sptests/sp42/sp42.doc
+++ b/testsuites/sptests/sp42/sp42.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp43/init.c b/testsuites/sptests/sp43/init.c
index 09c60cdb0d..c396f680bd 100644
--- a/testsuites/sptests/sp43/init.c
+++ b/testsuites/sptests/sp43/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Exercise Object Manager Services
*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp43/sp43.doc b/testsuites/sptests/sp43/sp43.doc
index 46e88bc299..56a21b8a66 100644
--- a/testsuites/sptests/sp43/sp43.doc
+++ b/testsuites/sptests/sp43/sp43.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp43/system.h b/testsuites/sptests/sp43/system.h
index 333ad972ab..96b122f8ab 100644
--- a/testsuites/sptests/sp43/system.h
+++ b/testsuites/sptests/sp43/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sp44/init.c b/testsuites/sptests/sp44/init.c
index 7354618a5f..d3255a9094 100644
--- a/testsuites/sptests/sp44/init.c
+++ b/testsuites/sptests/sp44/init.c
@@ -1,4 +1,19 @@
/*
+ * Copyright (C) 2008 Xudong Guan <xudong.guan@criticalsoftware.com>
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
* Original version submitted as part of PR1212
*
* This example shows a possible blocking of timeslicing if task mode is
diff --git a/testsuites/sptests/sp44/sp44.doc b/testsuites/sptests/sp44/sp44.doc
index 8856ba9a05..8fe2606b1c 100644
--- a/testsuites/sptests/sp44/sp44.doc
+++ b/testsuites/sptests/sp44/sp44.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp45/init.c b/testsuites/sptests/sp45/init.c
index da9e740208..323100ebd5 100644
--- a/testsuites/sptests/sp45/init.c
+++ b/testsuites/sptests/sp45/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp45/sp45.doc b/testsuites/sptests/sp45/sp45.doc
index 0ffd4958a1..ea958b8f47 100644
--- a/testsuites/sptests/sp45/sp45.doc
+++ b/testsuites/sptests/sp45/sp45.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2002.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp46/init.c b/testsuites/sptests/sp46/init.c
index 3fa907a647..8604dbbed6 100644
--- a/testsuites/sptests/sp46/init.c
+++ b/testsuites/sptests/sp46/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp46/sp46.doc b/testsuites/sptests/sp46/sp46.doc
index 04064e3d1d..c16e53845e 100644
--- a/testsuites/sptests/sp46/sp46.doc
+++ b/testsuites/sptests/sp46/sp46.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2008.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sp47/init.c b/testsuites/sptests/sp47/init.c
index c0503477ab..50be4012e6 100644
--- a/testsuites/sptests/sp47/init.c
+++ b/testsuites/sptests/sp47/init.c
@@ -1,4 +1,19 @@
/*
+ * Copyright (C) 2009 Nickolay Kolchin <nbkolchin@gmail.com>
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
* Submitted as part of PR1357
*/
diff --git a/testsuites/sptests/sp47/sp47.doc b/testsuites/sptests/sp47/sp47.doc
index aa81d69cb5..da1b4c2867 100644
--- a/testsuites/sptests/sp47/sp47.doc
+++ b/testsuites/sptests/sp47/sp47.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2008.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp48/init.c b/testsuites/sptests/sp48/init.c
index 3af65f5f12..397b3295cb 100644
--- a/testsuites/sptests/sp48/init.c
+++ b/testsuites/sptests/sp48/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Verify creation of semaphores with unlimited attribute works.
*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp48/sp48.doc b/testsuites/sptests/sp48/sp48.doc
index a236f8003b..3371e1d6ea 100644
--- a/testsuites/sptests/sp48/sp48.doc
+++ b/testsuites/sptests/sp48/sp48.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2008.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp49/init.c b/testsuites/sptests/sp49/init.c
index d1f6f05216..b48903123c 100644
--- a/testsuites/sptests/sp49/init.c
+++ b/testsuites/sptests/sp49/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp49/sp49.doc b/testsuites/sptests/sp49/sp49.doc
index 58cd4be63b..e588dc3c69 100644
--- a/testsuites/sptests/sp49/sp49.doc
+++ b/testsuites/sptests/sp49/sp49.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2008.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp50/init.c b/testsuites/sptests/sp50/init.c
index 6852c4a28c..55e777cc63 100644
--- a/testsuites/sptests/sp50/init.c
+++ b/testsuites/sptests/sp50/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp50/sp50.doc b/testsuites/sptests/sp50/sp50.doc
index 586108fc73..e5bb1a6c88 100644
--- a/testsuites/sptests/sp50/sp50.doc
+++ b/testsuites/sptests/sp50/sp50.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp51/init.c b/testsuites/sptests/sp51/init.c
index ff6b56205b..bb83fd0074 100644
--- a/testsuites/sptests/sp51/init.c
+++ b/testsuites/sptests/sp51/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp51/sp51.doc b/testsuites/sptests/sp51/sp51.doc
index fac553475e..ced8d81e7d 100644
--- a/testsuites/sptests/sp51/sp51.doc
+++ b/testsuites/sptests/sp51/sp51.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp52/init.c b/testsuites/sptests/sp52/init.c
index 6cf79eb97f..d1c8662e10 100644
--- a/testsuites/sptests/sp52/init.c
+++ b/testsuites/sptests/sp52/init.c
@@ -1 +1,36 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for sp52.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#include "sp52impl.h"
diff --git a/testsuites/sptests/sp52/sp52.doc b/testsuites/sptests/sp52/sp52.doc
index 60c1ff4d89..3f1ff1d727 100644
--- a/testsuites/sptests/sp52/sp52.doc
+++ b/testsuites/sptests/sp52/sp52.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp53/init.c b/testsuites/sptests/sp53/init.c
index 3ff09bcb7f..9a81e1728f 100644
--- a/testsuites/sptests/sp53/init.c
+++ b/testsuites/sptests/sp53/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for sp53.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define USE_TIMER_SERVER
#include "../sp52/sp52impl.h"
diff --git a/testsuites/sptests/sp53/sp53.doc b/testsuites/sptests/sp53/sp53.doc
index 2c925a4828..6fe0a5e10c 100644
--- a/testsuites/sptests/sp53/sp53.doc
+++ b/testsuites/sptests/sp53/sp53.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp54/init.c b/testsuites/sptests/sp54/init.c
index 71437fac8e..172eb2b1b0 100644
--- a/testsuites/sptests/sp54/init.c
+++ b/testsuites/sptests/sp54/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @@file
*
@@ -9,15 +11,36 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#include <rtems/sysinit.h>
+#include <rtems/score/memory.h>
+#include <rtems/score/thread.h>
+
#include <tmacros.h>
const char rtems_test_name[] = "SP 54";
@@ -29,12 +52,6 @@ static void *Init( uintptr_t ignored )
rtems_id id;
const rtems_api_configuration_table *config;
- /*
- * It is possible that since this thread prints and there is no idle
- * task, that the system could fail miserably. :(
- */
- TEST_BEGIN();
-
puts( "Init - use valid id of API class with no objects" );
status = rtems_task_set_priority(
rtems_build_id(0x2,0x1,0x01,0x0001) /* 0xa010001 */,
@@ -61,6 +78,44 @@ static void *Init( uintptr_t ignored )
rtems_test_exit(0);
}
+static void check_dirty_memory( void )
+{
+ unsigned char *p;
+
+ TEST_BEGIN();
+
+ p = _Memory_Allocate( _Memory_Get(), sizeof( *p ), RTEMS_ALIGNOF( *p ) );
+ rtems_test_assert( p != NULL );
+ rtems_test_assert( *p == 0xcf );
+
+ p = (unsigned char *) _Thread_Information.Objects.initial_objects;
+ rtems_test_assert( *p == 0xcf );
+}
+
+RTEMS_SYSINIT_ITEM(
+ check_dirty_memory,
+ RTEMS_SYSINIT_DIRTY_MEMORY,
+ RTEMS_SYSINIT_ORDER_LAST
+);
+
+static void check_zero_workspace_automatically( void )
+{
+ unsigned char *p;
+
+ p = _Memory_Allocate( _Memory_Get(), sizeof( *p ), RTEMS_ALIGNOF( *p ) );
+ rtems_test_assert( p != NULL );
+ rtems_test_assert( *p == 0 );
+
+ p = (unsigned char *) _Thread_Information.Objects.initial_objects;
+ rtems_test_assert( *p == 0 );
+}
+
+RTEMS_SYSINIT_ITEM(
+ check_zero_workspace_automatically,
+ RTEMS_SYSINIT_ZERO_MEMORY,
+ RTEMS_SYSINIT_ORDER_LAST
+);
+
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
diff --git a/testsuites/sptests/sp54/sp54.doc b/testsuites/sptests/sp54/sp54.doc
index 1c1d61a7ee..59a7af3ae8 100644
--- a/testsuites/sptests/sp54/sp54.doc
+++ b/testsuites/sptests/sp54/sp54.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp55/init.c b/testsuites/sptests/sp55/init.c
index b89aecdad6..58221f2e2c 100644
--- a/testsuites/sptests/sp55/init.c
+++ b/testsuites/sptests/sp55/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp55/sp55.doc b/testsuites/sptests/sp55/sp55.doc
index 38fa48258c..770e0d0e85 100644
--- a/testsuites/sptests/sp55/sp55.doc
+++ b/testsuites/sptests/sp55/sp55.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp56/init.c b/testsuites/sptests/sp56/init.c
index 5e0fde79ee..7dcab1b01f 100644
--- a/testsuites/sptests/sp56/init.c
+++ b/testsuites/sptests/sp56/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp56/sp56.doc b/testsuites/sptests/sp56/sp56.doc
index 38ce62a413..139b09f550 100644
--- a/testsuites/sptests/sp56/sp56.doc
+++ b/testsuites/sptests/sp56/sp56.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp57/init.c b/testsuites/sptests/sp57/init.c
index 8d1573aede..3c1d4ad73a 100644
--- a/testsuites/sptests/sp57/init.c
+++ b/testsuites/sptests/sp57/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp57/sp57.doc b/testsuites/sptests/sp57/sp57.doc
index b16ab01835..83cfa999ce 100644
--- a/testsuites/sptests/sp57/sp57.doc
+++ b/testsuites/sptests/sp57/sp57.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp58/init.c b/testsuites/sptests/sp58/init.c
index f15a9229c4..5d5428777b 100644
--- a/testsuites/sptests/sp58/init.c
+++ b/testsuites/sptests/sp58/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp58/sp58.doc b/testsuites/sptests/sp58/sp58.doc
index b1d01bcb50..4faa232a4d 100644
--- a/testsuites/sptests/sp58/sp58.doc
+++ b/testsuites/sptests/sp58/sp58.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp59/init.c b/testsuites/sptests/sp59/init.c
index a38e59775f..c87b4a5470 100644
--- a/testsuites/sptests/sp59/init.c
+++ b/testsuites/sptests/sp59/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp59/sp59.doc b/testsuites/sptests/sp59/sp59.doc
index e32e79c89d..c89fc6ae39 100644
--- a/testsuites/sptests/sp59/sp59.doc
+++ b/testsuites/sptests/sp59/sp59.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp60/init.c b/testsuites/sptests/sp60/init.c
index 887747fd54..727a3eefb6 100644
--- a/testsuites/sptests/sp60/init.c
+++ b/testsuites/sptests/sp60/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp60/sp60.doc b/testsuites/sptests/sp60/sp60.doc
index 8618d34cc9..3e2133af16 100644
--- a/testsuites/sptests/sp60/sp60.doc
+++ b/testsuites/sptests/sp60/sp60.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp62/init.c b/testsuites/sptests/sp62/init.c
index 3bb40447bb..47a39dc812 100644
--- a/testsuites/sptests/sp62/init.c
+++ b/testsuites/sptests/sp62/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp62/sp62.doc b/testsuites/sptests/sp62/sp62.doc
index 4ca28f9afb..ee9c6d19a7 100644
--- a/testsuites/sptests/sp62/sp62.doc
+++ b/testsuites/sptests/sp62/sp62.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp63/init.c b/testsuites/sptests/sp63/init.c
index c63917ac1c..b564a9ddb2 100644
--- a/testsuites/sptests/sp63/init.c
+++ b/testsuites/sptests/sp63/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp63/sp63.doc b/testsuites/sptests/sp63/sp63.doc
index 8018449343..25e24891b7 100644
--- a/testsuites/sptests/sp63/sp63.doc
+++ b/testsuites/sptests/sp63/sp63.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp64/init.c b/testsuites/sptests/sp64/init.c
index 0e1cdd131f..74d2888304 100644
--- a/testsuites/sptests/sp64/init.c
+++ b/testsuites/sptests/sp64/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp64/sp64.doc b/testsuites/sptests/sp64/sp64.doc
index 3050b30425..98e68f03a4 100644
--- a/testsuites/sptests/sp64/sp64.doc
+++ b/testsuites/sptests/sp64/sp64.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp65/init.c b/testsuites/sptests/sp65/init.c
index 8360add865..d074dc48a2 100644
--- a/testsuites/sptests/sp65/init.c
+++ b/testsuites/sptests/sp65/init.c
@@ -1 +1,16 @@
+/*
+ * Copyright (C) 2009 Santosh G Vattam <vattam.santosh@gmail.com>
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
#include "sp65impl.h"
diff --git a/testsuites/sptests/sp65/sp65.doc b/testsuites/sptests/sp65/sp65.doc
index 854dedeb07..c2b798a82b 100644
--- a/testsuites/sptests/sp65/sp65.doc
+++ b/testsuites/sptests/sp65/sp65.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp65/sp65impl.h b/testsuites/sptests/sp65/sp65impl.h
index c5644b38b9..03e1ba561f 100644
--- a/testsuites/sptests/sp65/sp65impl.h
+++ b/testsuites/sptests/sp65/sp65impl.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp66/init.c b/testsuites/sptests/sp66/init.c
index 3dd8e75a32..ba29515b2b 100644
--- a/testsuites/sptests/sp66/init.c
+++ b/testsuites/sptests/sp66/init.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for sp66.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define INHERIT_CEILING
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT
#include "../sp65/sp65impl.h"
diff --git a/testsuites/sptests/sp66/sp66.doc b/testsuites/sptests/sp66/sp66.doc
index dac8aa545e..0ace55124f 100644
--- a/testsuites/sptests/sp66/sp66.doc
+++ b/testsuites/sptests/sp66/sp66.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp67/sp67.doc b/testsuites/sptests/sp67/sp67.doc
index 4620e2dc4b..d0cbbe1d09 100644
--- a/testsuites/sptests/sp67/sp67.doc
+++ b/testsuites/sptests/sp67/sp67.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp68/init.c b/testsuites/sptests/sp68/init.c
index 66f456cea6..6f8d02e945 100644
--- a/testsuites/sptests/sp68/init.c
+++ b/testsuites/sptests/sp68/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2009-2015 embedded brains GmbH.
+ * Copyright (C) 2009, 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -153,7 +166,7 @@ static void obtain_callback(rtems_id timer_id, void *arg)
static void release_callback(rtems_id timer_id, void *arg)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
- char buf [1];
+ char buf [1] = { 0 };
size_t size = sizeof(buf);
uint32_t released = 0;
diff --git a/testsuites/sptests/sp68/sp68.doc b/testsuites/sptests/sp68/sp68.doc
index b426aed8e0..91e385ef2f 100644
--- a/testsuites/sptests/sp68/sp68.doc
+++ b/testsuites/sptests/sp68/sp68.doc
@@ -1,8 +1,27 @@
-# Copyright (c) 2009 embedded brains GmbH.
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2009 embedded brains GmbH & Co. KG
+#
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp69/init.c b/testsuites/sptests/sp69/init.c
index 38c40ccdf8..558432bae7 100644
--- a/testsuites/sptests/sp69/init.c
+++ b/testsuites/sptests/sp69/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -60,31 +79,6 @@ rtems_task Init(
rtems_test_assert( period_status.executed_since_last_period.tv_sec == 0 );
rtems_test_assert( period_status.executed_since_last_period.tv_nsec == 0 );
- /*
- * Check get_status error cases.
- */
- puts( "rtems_rate_monotonic_get_status - check RTEMS_NOT_DEFINED" );
-
- /* Do some work to get a non-zero cpu usage */
- rtems_test_spin_for_ticks( 10 );
-
- status = rtems_rate_monotonic_period( period_id, 100 );
- directive_failed( status, "rate_monotonic_period" );
-
- /* Do some more work */
- rtems_test_spin_for_ticks( 10 );
-
- /* Reset the cpu usage statistics. */
- rtems_cpu_usage_reset();
-
- /* Status should be undefined. */
- status = rtems_rate_monotonic_get_status( period_id, &period_status );
- fatal_directive_status(
- status,
- RTEMS_NOT_DEFINED,
- "rtems_rate_monotonic_get_status after cpu usage reset"
- );
-
/* Clean up. */
status = rtems_rate_monotonic_cancel( period_id );
directive_failed( status, "rate_monotonic_cancel" );
diff --git a/testsuites/sptests/sp70/init.c b/testsuites/sptests/sp70/init.c
index becd7fb511..b3b0def1de 100644
--- a/testsuites/sptests/sp70/init.c
+++ b/testsuites/sptests/sp70/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp70/sp70.doc b/testsuites/sptests/sp70/sp70.doc
index 1a961e7250..e4215c69f8 100644
--- a/testsuites/sptests/sp70/sp70.doc
+++ b/testsuites/sptests/sp70/sp70.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp71/init.c b/testsuites/sptests/sp71/init.c
index cc85f8fdc6..8d2b7dbf83 100644
--- a/testsuites/sptests/sp71/init.c
+++ b/testsuites/sptests/sp71/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(PER_ALLOCATION)
diff --git a/testsuites/sptests/sp71/sp71.doc b/testsuites/sptests/sp71/sp71.doc
index 25a6e18946..fd847f8a07 100644
--- a/testsuites/sptests/sp71/sp71.doc
+++ b/testsuites/sptests/sp71/sp71.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp72/init.c b/testsuites/sptests/sp72/init.c
index 188498f923..49d649a45c 100644
--- a/testsuites/sptests/sp72/init.c
+++ b/testsuites/sptests/sp72/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp72/sp72.doc b/testsuites/sptests/sp72/sp72.doc
index 50fa188da5..dd02885d28 100644
--- a/testsuites/sptests/sp72/sp72.doc
+++ b/testsuites/sptests/sp72/sp72.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp73/init.c b/testsuites/sptests/sp73/init.c
index 243fd2c54a..e5c6c5060d 100644
--- a/testsuites/sptests/sp73/init.c
+++ b/testsuites/sptests/sp73/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp73/sp73.doc b/testsuites/sptests/sp73/sp73.doc
index dedbc29dfc..605f585d31 100644
--- a/testsuites/sptests/sp73/sp73.doc
+++ b/testsuites/sptests/sp73/sp73.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp74/init.c b/testsuites/sptests/sp74/init.c
index 2dd00861c7..3b983df0e6 100644
--- a/testsuites/sptests/sp74/init.c
+++ b/testsuites/sptests/sp74/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp74/sp74.doc b/testsuites/sptests/sp74/sp74.doc
index 58eec2d22e..5db16f4371 100644
--- a/testsuites/sptests/sp74/sp74.doc
+++ b/testsuites/sptests/sp74/sp74.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2011, 2014.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp75/init.c b/testsuites/sptests/sp75/init.c
index dafa775339..0692a1f486 100644
--- a/testsuites/sptests/sp75/init.c
+++ b/testsuites/sptests/sp75/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sp75/sp75.doc b/testsuites/sptests/sp75/sp75.doc
index 8fc9de0bc8..e504bf6979 100644
--- a/testsuites/sptests/sp75/sp75.doc
+++ b/testsuites/sptests/sp75/sp75.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp76/init.c b/testsuites/sptests/sp76/init.c
index c7e451c32a..63d18cacb9 100644
--- a/testsuites/sptests/sp76/init.c
+++ b/testsuites/sptests/sp76/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -49,7 +68,7 @@ static rtems_task Init(
TEST_BEGIN();
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &id );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &id );
directive_failed( status, "task ident" );
/* to make sure it is equal to TA2 */
diff --git a/testsuites/sptests/sp76/sp76.doc b/testsuites/sptests/sp76/sp76.doc
index 1ff4a0ed76..d5fc7d4318 100644
--- a/testsuites/sptests/sp76/sp76.doc
+++ b/testsuites/sptests/sp76/sp76.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sp77/sp77.doc b/testsuites/sptests/sp77/sp77.doc
index 4e1dcc8ce5..b7392ebb3e 100644
--- a/testsuites/sptests/sp77/sp77.doc
+++ b/testsuites/sptests/sp77/sp77.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2012.
# Krzysztof Miesowicz <krzysztof.miesowicz@gmail.com>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spassoc01/init.c b/testsuites/sptests/spassoc01/init.c
index 51d651c046..6b76a44728 100644
--- a/testsuites/sptests/spassoc01/init.c
+++ b/testsuites/sptests/spassoc01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spassoc01/spassoc01.doc b/testsuites/sptests/spassoc01/spassoc01.doc
index 682ef22dab..95a25cec1b 100644
--- a/testsuites/sptests/spassoc01/spassoc01.doc
+++ b/testsuites/sptests/spassoc01/spassoc01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spatomic01/init.c b/testsuites/sptests/spatomic01/init.c
index 9fda1d246b..58414b042a 100644
--- a/testsuites/sptests/spatomic01/init.c
+++ b/testsuites/sptests/spatomic01/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2013-2015 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (C) 2013, 2015 embedded brains GmbH & Co. KG
*
* Copyright (c) 2013 Deng Hengyi.
*
diff --git a/testsuites/sptests/spcache01/init.c b/testsuites/sptests/spcache01/init.c
index b6ad797dd3..89fe6794fe 100644
--- a/testsuites/sptests/spcache01/init.c
+++ b/testsuites/sptests/spcache01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spcbssched01/init.c b/testsuites/sptests/spcbssched01/init.c
index dcb7f372c3..143731e6c8 100644
--- a/testsuites/sptests/spcbssched01/init.c
+++ b/testsuites/sptests/spcbssched01/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spcbssched01/spcbssched01.doc b/testsuites/sptests/spcbssched01/spcbssched01.doc
index 985e11ee43..81087c2cc4 100644
--- a/testsuites/sptests/spcbssched01/spcbssched01.doc
+++ b/testsuites/sptests/spcbssched01/spcbssched01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spcbssched01/system.h b/testsuites/sptests/spcbssched01/system.h
index 0bc64fc501..b2d6b3f6b9 100644
--- a/testsuites/sptests/spcbssched01/system.h
+++ b/testsuites/sptests/spcbssched01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spcbssched01/task1.c b/testsuites/sptests/spcbssched01/task1.c
index f5d180831f..0bac004e6d 100644
--- a/testsuites/sptests/spcbssched01/task1.c
+++ b/testsuites/sptests/spcbssched01/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1_through_3
*
* This routine serves as a test task. It verifies the basic task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -31,7 +50,7 @@ rtems_task Task_1_through_3(
rtems_status_code status;
rtems_interval ticks;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident" );
ticks = RTEMS_MILLISECONDS_TO_TICKS( task_number( tid ) * 5 * 1000 );
diff --git a/testsuites/sptests/spcbssched02/spcbssched02.doc b/testsuites/sptests/spcbssched02/spcbssched02.doc
index df5b989538..cf63640eee 100644
--- a/testsuites/sptests/spcbssched02/spcbssched02.doc
+++ b/testsuites/sptests/spcbssched02/spcbssched02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/spcbssched02/system.h b/testsuites/sptests/spcbssched02/system.h
index fe3bdc7e21..1a916428f5 100644
--- a/testsuites/sptests/spcbssched02/system.h
+++ b/testsuites/sptests/spcbssched02/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spcbssched03/cbsparams.h b/testsuites/sptests/spcbssched03/cbsparams.h
index 8f800b701c..6876d52785 100644
--- a/testsuites/sptests/spcbssched03/cbsparams.h
+++ b/testsuites/sptests/spcbssched03/cbsparams.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* cbsparams.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* This file was generated with the following parameters:
diff --git a/testsuites/sptests/spcbssched03/spcbssched03.doc b/testsuites/sptests/spcbssched03/spcbssched03.doc
index a558870ee5..a67998be88 100644
--- a/testsuites/sptests/spcbssched03/spcbssched03.doc
+++ b/testsuites/sptests/spcbssched03/spcbssched03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/spcbssched03/system.h b/testsuites/sptests/spcbssched03/system.h
index da20c575ca..d939d837cb 100644
--- a/testsuites/sptests/spcbssched03/system.h
+++ b/testsuites/sptests/spcbssched03/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spchain/init.c b/testsuites/sptests/spchain/init.c
index 51278d52f3..2165ba81ac 100644
--- a/testsuites/sptests/spchain/init.c
+++ b/testsuites/sptests/spchain/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -426,8 +445,14 @@ static void test_chain_node_count(void)
}
}
-static bool test_order( const void *left, const Chain_Node *right )
+static bool test_order(
+ const void *key,
+ const Chain_Node *left,
+ const Chain_Node *right
+)
{
+ rtems_test_assert( key == left );
+
return (uintptr_t) left < (uintptr_t) right;
}
diff --git a/testsuites/sptests/spchain/spchain.doc b/testsuites/sptests/spchain/spchain.doc
index 4962426083..87ff973c1b 100644
--- a/testsuites/sptests/spchain/spchain.doc
+++ b/testsuites/sptests/spchain/spchain.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spclock_err01/delay.c b/testsuites/sptests/spclock_err01/delay.c
index cdd54c84f8..da738a71b9 100644
--- a/testsuites/sptests/spclock_err01/delay.c
+++ b/testsuites/sptests/spclock_err01/delay.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Delayed_routine
*
* This routine is used as the timer routine for Timer Manager tests.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spclock_err01/init.c b/testsuites/sptests/spclock_err01/init.c
index 087c8d4a05..b6d5f196af 100644
--- a/testsuites/sptests/spclock_err01/init.c
+++ b/testsuites/sptests/spclock_err01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -207,4 +226,5 @@ rtems_task Init(
print_time( "TA1 - current time - ", &time, "\n" );
TEST_END();
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/spclock_err01/system.h b/testsuites/sptests/spclock_err01/system.h
index 90238247d1..9866d39e7e 100644
--- a/testsuites/sptests/spclock_err01/system.h
+++ b/testsuites/sptests/spclock_err01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spclock_err02/init.c b/testsuites/sptests/spclock_err02/init.c
index 2200b24ec6..91519fbf43 100644
--- a/testsuites/sptests/spclock_err02/init.c
+++ b/testsuites/sptests/spclock_err02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -117,6 +136,7 @@ rtems_task Init(
print_time( "TA1 - rtems_clock_get_tod - ", &time, " - RTEMS_SUCCESSFUL\n" );
TEST_END();
+ rtems_test_exit( 0 );
}
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
diff --git a/testsuites/sptests/spclock_err02/spclock_err02.doc b/testsuites/sptests/spclock_err02/spclock_err02.doc
index 2f660b8e43..04e300f164 100644
--- a/testsuites/sptests/spclock_err02/spclock_err02.doc
+++ b/testsuites/sptests/spclock_err02/spclock_err02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/spconfig01/init.c b/testsuites/sptests/spconfig01/init.c
index 2d1b5d4145..90157028a9 100644
--- a/testsuites/sptests/spconfig01/init.c
+++ b/testsuites/sptests/spconfig01/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2018 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/sptests/spconfig02/init.c b/testsuites/sptests/spconfig02/init.c
index ee889293bc..f25ff5efe7 100644
--- a/testsuites/sptests/spconfig02/init.c
+++ b/testsuites/sptests/spconfig02/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2018 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/sptests/spconsole01/init.c b/testsuites/sptests/spconsole01/init.c
index ebfb651fab..87924a35dc 100644
--- a/testsuites/sptests/spconsole01/init.c
+++ b/testsuites/sptests/spconsole01/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/sptests/spcontext01/init.c b/testsuites/sptests/spcontext01/init.c
index 9499f5dcbd..d8d0a2d3aa 100644
--- a/testsuites/sptests/spcontext01/init.c
+++ b/testsuites/sptests/spcontext01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2013-2015 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2013, 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spcpucounter01/init.c b/testsuites/sptests/spcpucounter01/init.c
index b2721dc2f5..0022806ec6 100644
--- a/testsuites/sptests/spcpucounter01/init.c
+++ b/testsuites/sptests/spcpucounter01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spcpuset01/init.c b/testsuites/sptests/spcpuset01/init.c
index b13be4913d..4033adf2d0 100644
--- a/testsuites/sptests/spcpuset01/init.c
+++ b/testsuites/sptests/spcpuset01/init.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for spcpuset01.
+ */
+
+/*
+ * Copyright (C) 1989-2013 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
/*
* Fully exercise CPU_SET() methods
*/
diff --git a/testsuites/sptests/spcpuset01/spcpuset01.doc b/testsuites/sptests/spcpuset01/spcpuset01.doc
index 7477cc7cd3..2c97626e62 100644
--- a/testsuites/sptests/spcpuset01/spcpuset01.doc
+++ b/testsuites/sptests/spcpuset01/spcpuset01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This is a set of simple tests that verify that the fixed size
diff --git a/testsuites/sptests/spcpuset01/system.h b/testsuites/sptests/spcpuset01/system.h
index 37b56af1a8..ab4414f631 100644
--- a/testsuites/sptests/spcpuset01/system.h
+++ b/testsuites/sptests/spcpuset01/system.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include "tmacros.h"
diff --git a/testsuites/sptests/spcpuset01/test.c b/testsuites/sptests/spcpuset01/test.c
index 2e44270546..d93be69bd3 100644
--- a/testsuites/sptests/spcpuset01/test.c
+++ b/testsuites/sptests/spcpuset01/test.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the test for spcpuset01.
+ */
+
+/*
+ * Copyright (C) 1989-2013 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -48,9 +83,19 @@ void test_cpu_nand_case_1(size_t cpu1, size_t cpu2)
{
size_t i;
+ /*
+ * FreeBSD renamed CPU_NAND to CPU_ANDNOT. This change was included in
+ * Newlib at some point in time.
+ */
+#ifdef __BIT_ANDNOT2
+ /* ANDNOT set1 and set2 */
+ DPRINT( "Exercise CPU_ANDNOT with bits %zd,%zd\n", cpu1, cpu2 );
+ CPU_ANDNOT(&set3, &set1, &set2);
+#else
/* NAND set1 and set2 */
DPRINT( "Exercise CPU_NAND with bits %zd,%zd\n", cpu1, cpu2 );
CPU_NAND(&set3, &set1, &set2);
+#endif
/* test if all bits clear except cpu1 */
for (i=0 ; i<CPU_SETSIZE ; i++) {
diff --git a/testsuites/sptests/spcxx01/init.cc b/testsuites/sptests/spcxx01/init.cc
index b7be220092..0f1412f292 100644
--- a/testsuites/sptests/spcxx01/init.cc
+++ b/testsuites/sptests/spcxx01/init.cc
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (C) 2018 embedded brains GmbH
+ * Copyright (C) 2018 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/sptests/spedfsched01/init.c b/testsuites/sptests/spedfsched01/init.c
index f19e93c9d5..85142a6717 100644
--- a/testsuites/sptests/spedfsched01/init.c
+++ b/testsuites/sptests/spedfsched01/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spedfsched01/spedfsched01.doc b/testsuites/sptests/spedfsched01/spedfsched01.doc
index 6913870723..81160dc56b 100644
--- a/testsuites/sptests/spedfsched01/spedfsched01.doc
+++ b/testsuites/sptests/spedfsched01/spedfsched01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spedfsched01/system.h b/testsuites/sptests/spedfsched01/system.h
index add030ae48..5c6c8817b6 100644
--- a/testsuites/sptests/spedfsched01/system.h
+++ b/testsuites/sptests/spedfsched01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spedfsched01/task1.c b/testsuites/sptests/spedfsched01/task1.c
index f5d180831f..0bac004e6d 100644
--- a/testsuites/sptests/spedfsched01/task1.c
+++ b/testsuites/sptests/spedfsched01/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1_through_3
*
* This routine serves as a test task. It verifies the basic task
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -31,7 +50,7 @@ rtems_task Task_1_through_3(
rtems_status_code status;
rtems_interval ticks;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident" );
ticks = RTEMS_MILLISECONDS_TO_TICKS( task_number( tid ) * 5 * 1000 );
diff --git a/testsuites/sptests/spedfsched02/getall.c b/testsuites/sptests/spedfsched02/getall.c
index adb00b5224..9525db0c51 100644
--- a/testsuites/sptests/spedfsched02/getall.c
+++ b/testsuites/sptests/spedfsched02/getall.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Get_all_counters
*
* This routine allows TA5 to atomically obtain the iteration counters.
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spedfsched02/init.c b/testsuites/sptests/spedfsched02/init.c
index 0aea4c5dbb..834deb2f42 100644
--- a/testsuites/sptests/spedfsched02/init.c
+++ b/testsuites/sptests/spedfsched02/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spedfsched02/spedfsched02.doc b/testsuites/sptests/spedfsched02/spedfsched02.doc
index dc52f1f8db..721309ee1f 100644
--- a/testsuites/sptests/spedfsched02/spedfsched02.doc
+++ b/testsuites/sptests/spedfsched02/spedfsched02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/spedfsched02/system.h b/testsuites/sptests/spedfsched02/system.h
index 71bc96bbe2..b4c49811d9 100644
--- a/testsuites/sptests/spedfsched02/system.h
+++ b/testsuites/sptests/spedfsched02/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spedfsched02/task1.c b/testsuites/sptests/spedfsched02/task1.c
index 8ced5f7f19..991279f08b 100644
--- a/testsuites/sptests/spedfsched02/task1.c
+++ b/testsuites/sptests/spedfsched02/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1_through_6
*
* This routine serves as a test task for the EDF scheduling
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spedfsched03/edfparams.h b/testsuites/sptests/spedfsched03/edfparams.h
index 9eaaa1bfc9..2c55d6e368 100644
--- a/testsuites/sptests/spedfsched03/edfparams.h
+++ b/testsuites/sptests/spedfsched03/edfparams.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* edfparams.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* This file was generated with the following parameters:
diff --git a/testsuites/sptests/spedfsched03/spedfsched03.doc b/testsuites/sptests/spedfsched03/spedfsched03.doc
index 31e78d1ca0..ef940999ec 100644
--- a/testsuites/sptests/spedfsched03/spedfsched03.doc
+++ b/testsuites/sptests/spedfsched03/spedfsched03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/spedfsched03/system.h b/testsuites/sptests/spedfsched03/system.h
index 6d6bb3d3be..e880b07d80 100644
--- a/testsuites/sptests/spedfsched03/system.h
+++ b/testsuites/sptests/spedfsched03/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sperror01/init.c b/testsuites/sptests/sperror01/init.c
index b3b220bc66..2593c860fa 100644
--- a/testsuites/sptests/sperror01/init.c
+++ b/testsuites/sptests/sperror01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sperror01/sperror01.doc b/testsuites/sptests/sperror01/sperror01.doc
index 2a0d7e834a..de75698f50 100644
--- a/testsuites/sptests/sperror01/sperror01.doc
+++ b/testsuites/sptests/sperror01/sperror01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sperror02/init.c b/testsuites/sptests/sperror02/init.c
index 324e38d43d..a8c1cfbd52 100644
--- a/testsuites/sptests/sperror02/init.c
+++ b/testsuites/sptests/sperror02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sperror02/sperror02.doc b/testsuites/sptests/sperror02/sperror02.doc
index 8595438065..18ce266fa5 100644
--- a/testsuites/sptests/sperror02/sperror02.doc
+++ b/testsuites/sptests/sperror02/sperror02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sperror03/init.c b/testsuites/sptests/sperror03/init.c
index ad42d96a47..9139ff116f 100644
--- a/testsuites/sptests/sperror03/init.c
+++ b/testsuites/sptests/sperror03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sperror03/sperror03.doc b/testsuites/sptests/sperror03/sperror03.doc
index eaea83ffe3..6b22759ac5 100644
--- a/testsuites/sptests/sperror03/sperror03.doc
+++ b/testsuites/sptests/sperror03/sperror03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spevent_err03/init.c b/testsuites/sptests/spevent_err03/init.c
index b13960e16d..5cca270a2a 100644
--- a/testsuites/sptests/spevent_err03/init.c
+++ b/testsuites/sptests/spevent_err03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spevent_err03/system.h b/testsuites/sptests/spevent_err03/system.h
index df7deb109d..00a74d1931 100644
--- a/testsuites/sptests/spevent_err03/system.h
+++ b/testsuites/sptests/spevent_err03/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/speventsystem01/init.c b/testsuites/sptests/speventsystem01/init.c
index 907ebf4c8f..063e161a71 100644
--- a/testsuites/sptests/speventsystem01/init.c
+++ b/testsuites/sptests/speventsystem01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/speventtransient01/init.c b/testsuites/sptests/speventtransient01/init.c
index 454253fd58..c07a77d710 100644
--- a/testsuites/sptests/speventtransient01/init.c
+++ b/testsuites/sptests/speventtransient01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spextensions01/init.c b/testsuites/sptests/spextensions01/init.c
index a056ba1612..59a22293c1 100644
--- a/testsuites/sptests/spextensions01/init.c
+++ b/testsuites/sptests/spextensions01/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2016, 2017 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (C) 2016, 2017 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -36,6 +30,11 @@ static int active_extensions = 2;
static rtems_id master_task;
+static bool before_initialization(void)
+{
+ return _System_state_Is_before_initialization(_System_state_Get());
+}
+
static bool before_multitasking(void)
{
return _System_state_Is_before_multitasking(_System_state_Get());
@@ -67,9 +66,13 @@ static void assert_life_protected_thread_context(void)
static void assert_allocator_protected_thread_context(void)
{
- assert(_Thread_Dispatch_is_enabled() || before_multitasking());
+ assert(
+ _Thread_Dispatch_is_enabled() ||
+ before_initialization() ||
+ before_multitasking()
+ );
assert(_RTEMS_Allocator_is_owner());
- assert(life_protected() || before_multitasking());
+ assert(life_protected());
}
static void assert_thread_dispatch_disabled_context(void)
diff --git a/testsuites/sptests/spfatal01/init.c b/testsuites/sptests/spfatal01/init.c
index 4f0c008855..268220039a 100644
--- a/testsuites/sptests/spfatal01/init.c
+++ b/testsuites/sptests/spfatal01/init.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for spfatal01.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/testsuites/sptests/spfatal01/spfatal01.doc b/testsuites/sptests/spfatal01/spfatal01.doc
index 7fed165afa..12395b1b2d 100644
--- a/testsuites/sptests/spfatal01/spfatal01.doc
+++ b/testsuites/sptests/spfatal01/spfatal01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfatal03/init.c b/testsuites/sptests/spfatal03/init.c
index 10a9f277e8..38177a33f4 100644
--- a/testsuites/sptests/spfatal03/init.c
+++ b/testsuites/sptests/spfatal03/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems/bspIo.h>
diff --git a/testsuites/sptests/spfatal03/spfatal03.doc b/testsuites/sptests/spfatal03/spfatal03.doc
index 5d643cc0dc..c42993319f 100644
--- a/testsuites/sptests/spfatal03/spfatal03.doc
+++ b/testsuites/sptests/spfatal03/spfatal03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfatal04/init.c b/testsuites/sptests/spfatal04/init.c
index 89a4be88ad..24d5d10f67 100644
--- a/testsuites/sptests/spfatal04/init.c
+++ b/testsuites/sptests/spfatal04/init.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for spfatal04.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/testsuites/sptests/spfatal04/spfatal04.doc b/testsuites/sptests/spfatal04/spfatal04.doc
index 67413fe952..8a861c4d1a 100644
--- a/testsuites/sptests/spfatal04/spfatal04.doc
+++ b/testsuites/sptests/spfatal04/spfatal04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfatal05/init.c b/testsuites/sptests/spfatal05/init.c
index d17077c401..b2820dd692 100644
--- a/testsuites/sptests/spfatal05/init.c
+++ b/testsuites/sptests/spfatal05/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define SPFATAL_TEST_CASE_EXTRA_TASKS 1
diff --git a/testsuites/sptests/spfatal05/spfatal05.doc b/testsuites/sptests/spfatal05/spfatal05.doc
index 354673d308..79f56937ac 100644
--- a/testsuites/sptests/spfatal05/spfatal05.doc
+++ b/testsuites/sptests/spfatal05/spfatal05.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfatal09/init.c b/testsuites/sptests/spfatal09/init.c
index df462bcacf..b8fe1f0c3e 100644
--- a/testsuites/sptests/spfatal09/init.c
+++ b/testsuites/sptests/spfatal09/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems/score/memory.h>
diff --git a/testsuites/sptests/spfatal09/spfatal09.doc b/testsuites/sptests/spfatal09/spfatal09.doc
index 5459523f7c..f6521d688b 100644
--- a/testsuites/sptests/spfatal09/spfatal09.doc
+++ b/testsuites/sptests/spfatal09/spfatal09.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfatal10/init.c b/testsuites/sptests/spfatal10/init.c
index 221f117f3a..bfe4450608 100644
--- a/testsuites/sptests/spfatal10/init.c
+++ b/testsuites/sptests/spfatal10/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <assert.h>
diff --git a/testsuites/sptests/spfatal10/spfatal10.doc b/testsuites/sptests/spfatal10/spfatal10.doc
index d13f410e4a..a92c9535e6 100644
--- a/testsuites/sptests/spfatal10/spfatal10.doc
+++ b/testsuites/sptests/spfatal10/spfatal10.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfatal11/init.c b/testsuites/sptests/spfatal11/init.c
index af1596d1b6..a5c9dadba3 100644
--- a/testsuites/sptests/spfatal11/init.c
+++ b/testsuites/sptests/spfatal11/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <assert.h>
diff --git a/testsuites/sptests/spfatal11/spfatal11.doc b/testsuites/sptests/spfatal11/spfatal11.doc
index 5527c917e4..1e76abd6b6 100644
--- a/testsuites/sptests/spfatal11/spfatal11.doc
+++ b/testsuites/sptests/spfatal11/spfatal11.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfatal12/init.c b/testsuites/sptests/spfatal12/init.c
index 3fbd6d1fc6..19c391df5f 100644
--- a/testsuites/sptests/spfatal12/init.c
+++ b/testsuites/sptests/spfatal12/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems/score/wkspace.h>
diff --git a/testsuites/sptests/spfatal12/spfatal12.doc b/testsuites/sptests/spfatal12/spfatal12.doc
index dda170f4a0..28f7bcf44f 100644
--- a/testsuites/sptests/spfatal12/spfatal12.doc
+++ b/testsuites/sptests/spfatal12/spfatal12.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfatal14/init.c b/testsuites/sptests/spfatal14/init.c
index e3b928c38c..7fc779c985 100644
--- a/testsuites/sptests/spfatal14/init.c
+++ b/testsuites/sptests/spfatal14/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* generate fatal errors in open_dev_console.c */
diff --git a/testsuites/sptests/spfatal14/spfatal14.doc b/testsuites/sptests/spfatal14/spfatal14.doc
index f9c49af47e..b844551c0a 100644
--- a/testsuites/sptests/spfatal14/spfatal14.doc
+++ b/testsuites/sptests/spfatal14/spfatal14.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfatal15/init.c b/testsuites/sptests/spfatal15/init.c
index d5c5bc55a4..e4d50a8a08 100644
--- a/testsuites/sptests/spfatal15/init.c
+++ b/testsuites/sptests/spfatal15/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/* generate fatal errors in open_dev_console.c */
diff --git a/testsuites/sptests/spfatal15/spfatal15.doc b/testsuites/sptests/spfatal15/spfatal15.doc
index abeeb77eae..f1b7b894c7 100644
--- a/testsuites/sptests/spfatal15/spfatal15.doc
+++ b/testsuites/sptests/spfatal15/spfatal15.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfatal24/init.c b/testsuites/sptests/spfatal24/init.c
deleted file mode 100644
index 6522ef7be2..0000000000
--- a/testsuites/sptests/spfatal24/init.c
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "../spfatal_support/spfatal.h"
-
-/*
- * COPYRIGHT (c) 1989-2010.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include <rtems/gxx_wrappers.h>
-#include <rtems/malloc.h>
-
-#define FATAL_ERROR_TEST_NAME "GXX KEY ADD FAILURE"
-#define FATAL_ERROR_DESCRIPTION "GXX KEY ADD FAILURE"
-#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
-#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_GXX_KEY_ADD_FAILED
-
-static void force_error(void)
-{
- pthread_key_t key = -1;
-
- rtems_gxx_setspecific( &key, NULL );
-}
-
-#include "../spfatal_support/spfatalimpl.h"
diff --git a/testsuites/sptests/spfatal24/spfatal24.doc b/testsuites/sptests/spfatal24/spfatal24.doc
deleted file mode 100644
index b697770085..0000000000
--- a/testsuites/sptests/spfatal24/spfatal24.doc
+++ /dev/null
@@ -1,19 +0,0 @@
-# COPYRIGHT (c) 1989-2010.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: spfatal24
-
-directives:
-
- rtems_gxx_setspecific();
-
-concepts:
-
-+ Trigger fatal error.
diff --git a/testsuites/sptests/spfatal24/spfatal24.scn b/testsuites/sptests/spfatal24/spfatal24.scn
deleted file mode 100644
index 46a4f20409..0000000000
--- a/testsuites/sptests/spfatal24/spfatal24.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** TEST FATAL GXX KEY ADD FAILURE ***
-Fatal error (GXX KEY ADD FAILURE) hit
-*** END OF TEST FATAL GXX KEY ADD FAILURE ***
diff --git a/testsuites/sptests/spfatal25/init.c b/testsuites/sptests/spfatal25/init.c
deleted file mode 100644
index 83042557e5..0000000000
--- a/testsuites/sptests/spfatal25/init.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "../spfatal_support/spfatal.h"
-
-/*
- * COPYRIGHT (c) 1989-2010.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include <rtems/gxx_wrappers.h>
-
-#define FATAL_ERROR_TEST_NAME "GXX MUTEX INIT FAILED"
-#define FATAL_ERROR_DESCRIPTION "GXX MUTEX INIT FAILED"
-#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
-#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED
-
-static void force_error(void)
-{
- __gthread_mutex_t mutex;
-
- while ( true ) {
- rtems_gxx_mutex_init( &mutex );
- rtems_test_assert( mutex != 0 );
- }
-}
-
-#include "../spfatal_support/spfatalimpl.h"
diff --git a/testsuites/sptests/spfatal25/spfatal25.doc b/testsuites/sptests/spfatal25/spfatal25.doc
deleted file mode 100644
index e30241bc8b..0000000000
--- a/testsuites/sptests/spfatal25/spfatal25.doc
+++ /dev/null
@@ -1,19 +0,0 @@
-# COPYRIGHT (c) 1989-2010.
-# On-Line Applications Research Corporation (OAR).
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: spfatal24
-
-directives:
-
- rtems_gxx_getspecific();
-
-concepts:
-
-+ Trigger fatal error.
diff --git a/testsuites/sptests/spfatal25/spfatal25.scn b/testsuites/sptests/spfatal25/spfatal25.scn
deleted file mode 100644
index 93a6b729b8..0000000000
--- a/testsuites/sptests/spfatal25/spfatal25.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** TEST FATAL GXX MUTEX INIT FAILED ***
-Fatal error (GXX MUTEX INIT FAILED) hit
-*** END OF TEST FATAL GXX MUTEX INIT FAILED ***
diff --git a/testsuites/sptests/spfatal26/init.c b/testsuites/sptests/spfatal26/init.c
index c849ae0e2a..892d4b941d 100644
--- a/testsuites/sptests/spfatal26/init.c
+++ b/testsuites/sptests/spfatal26/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2012, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spfatal28/init.c b/testsuites/sptests/spfatal28/init.c
index c827b297c3..17da04ff7f 100644
--- a/testsuites/sptests/spfatal28/init.c
+++ b/testsuites/sptests/spfatal28/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -5,17 +7,28 @@
#include "../spfatal_support/spfatal.h"
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define FATAL_ERROR_TEST_NAME "28"
diff --git a/testsuites/sptests/spfatal29/init.c b/testsuites/sptests/spfatal29/init.c
index 5df872d3d6..6da87fdaab 100644
--- a/testsuites/sptests/spfatal29/init.c
+++ b/testsuites/sptests/spfatal29/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -5,17 +7,28 @@
#include "../spfatal_support/spfatal.h"
/*
- * Copyright (c) 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define FATAL_ERROR_TEST_NAME "29"
diff --git a/testsuites/sptests/spfatal30/init.c b/testsuites/sptests/spfatal30/init.c
index a76fe1f309..e6656e1694 100644
--- a/testsuites/sptests/spfatal30/init.c
+++ b/testsuites/sptests/spfatal30/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spfatal31/init.c b/testsuites/sptests/spfatal31/init.c
index 782e7632cc..9d93988628 100644
--- a/testsuites/sptests/spfatal31/init.c
+++ b/testsuites/sptests/spfatal31/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spfatal32/init.c b/testsuites/sptests/spfatal32/init.c
index c4851cbd6f..48979cebd8 100644
--- a/testsuites/sptests/spfatal32/init.c
+++ b/testsuites/sptests/spfatal32/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -5,17 +7,28 @@
#include "../spfatal_support/spfatal.h"
/*
- * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <stdint.h>
@@ -26,6 +39,11 @@
#define FATAL_ERROR_EXPECTED_SOURCE RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE
#define FATAL_ERROR_EXPECTED_ERROR 1
+/*
+ * Disable for the specific test case.
+ */
+#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
+
static void force_error(void)
{
uintptr_t invalid = 1;
diff --git a/testsuites/sptests/spfatal33/init.c b/testsuites/sptests/spfatal33/init.c
index a7218c596f..f60e3d38d9 100644
--- a/testsuites/sptests/spfatal33/init.c
+++ b/testsuites/sptests/spfatal33/init.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/sptests/spfatal34/init.c b/testsuites/sptests/spfatal34/init.c
index 5c2ab0e735..608a50fcdb 100644
--- a/testsuites/sptests/spfatal34/init.c
+++ b/testsuites/sptests/spfatal34/init.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/sptests/spfatal35/init.c b/testsuites/sptests/spfatal35/init.c
new file mode 100644
index 0000000000..11690fa0bf
--- /dev/null
+++ b/testsuites/sptests/spfatal35/init.c
@@ -0,0 +1,89 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ */
+
+/*
+ * Copyright (C) 2021 On-Line Applications Research Corporation (OAR)
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/cpu.h>
+#include <rtems/score/cpuimpl.h>
+
+#include <tmacros.h>
+
+const char rtems_test_name[] = "SPFATAL 35";
+
+static void Init( rtems_task_argument arg )
+{
+ TEST_BEGIN();
+ _CPU_Instruction_illegal();
+ TEST_END();
+ rtems_test_exit(0);
+}
+
+static void fatal_extension(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+)
+{
+ CPU_Exception_frame *ef;
+
+ rtems_test_assert( !always_set_to_false );
+
+ if ( source != RTEMS_FATAL_SOURCE_EXCEPTION ) {
+ return;
+ }
+
+ ef = (rtems_exception_frame *) code;
+
+ _CPU_Exception_frame_make_resume_next_instruction( ef );
+
+ _CPU_Exception_resume( ef );
+}
+
+#define CONFIGURE_INITIAL_EXTENSIONS \
+ { .fatal = fatal_extension }, \
+ RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/sptests/spfatal35/spfatal35.doc b/testsuites/sptests/spfatal35/spfatal35.doc
new file mode 100644
index 0000000000..e041f21391
--- /dev/null
+++ b/testsuites/sptests/spfatal35/spfatal35.doc
@@ -0,0 +1,7 @@
+This file describes the concepts tested by this test set.
+
+test set name: spfatal35
+
+concepts:
+
+ - Ensure that a RTEMS_FATAL_SOURCE_EXCEPTION can be recovered from.
diff --git a/testsuites/sptests/spfatal35/spfatal35.scn b/testsuites/sptests/spfatal35/spfatal35.scn
new file mode 100644
index 0000000000..0890b04556
--- /dev/null
+++ b/testsuites/sptests/spfatal35/spfatal35.scn
@@ -0,0 +1,2 @@
+*** TEST SPFATAL 35 ***
+*** END OF TEST SPFATAL 35 ***
diff --git a/testsuites/sptests/spfatal36/init.c b/testsuites/sptests/spfatal36/init.c
new file mode 100644
index 0000000000..b5e0fbdeed
--- /dev/null
+++ b/testsuites/sptests/spfatal36/init.c
@@ -0,0 +1,63 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "../spfatal_support/spfatal.h"
+
+#include <rtems/sysinit.h>
+#include <rtems/score/heapimpl.h>
+#include <rtems/score/wkspace.h>
+
+#define FATAL_ERROR_TEST_NAME "36"
+
+#define FATAL_ERROR_DESCRIPTION "failure in idle task storage allocation"
+
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
+
+#define FATAL_ERROR_EXPECTED_ERROR \
+ INTERNAL_ERROR_NO_MEMORY_FOR_IDLE_TASK_STORAGE
+
+static void force_error( void )
+{
+ RTEMS_UNREACHABLE();
+}
+
+static void empty_workspace( void )
+{
+ (void) _Heap_Greedy_allocate( &_Workspace_Area, NULL, 0 );
+}
+
+RTEMS_SYSINIT_ITEM(
+ empty_workspace,
+ RTEMS_SYSINIT_IDLE_THREADS,
+ RTEMS_SYSINIT_ORDER_FIRST
+);
+
+#include "../spfatal_support/spfatalimpl.h"
diff --git a/testsuites/sptests/spfatal36/spfatal36.doc b/testsuites/sptests/spfatal36/spfatal36.doc
new file mode 100644
index 0000000000..0719e8e01c
--- /dev/null
+++ b/testsuites/sptests/spfatal36/spfatal36.doc
@@ -0,0 +1,11 @@
+This file describes the concepts tested by this test set.
+
+test set name: spfatal36
+
+directives:
+
+ - _Stack_Allocator_allocate_for_idle_workspace()
+
+concepts:
+
+ - Provoke a memory allocation failure in the directive.
diff --git a/testsuites/sptests/spfatal_support/spfatal.h b/testsuites/sptests/spfatal_support/spfatal.h
index 2a49ca2e54..1b5c238701 100644
--- a/testsuites/sptests/spfatal_support/spfatal.h
+++ b/testsuites/sptests/spfatal_support/spfatal.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems/bspIo.h>
diff --git a/testsuites/sptests/spfatal_support/spfatalimpl.h b/testsuites/sptests/spfatal_support/spfatalimpl.h
index 83f0d25ab7..6f0c9139e3 100644
--- a/testsuites/sptests/spfatal_support/spfatalimpl.h
+++ b/testsuites/sptests/spfatal_support/spfatalimpl.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems/bspIo.h>
diff --git a/testsuites/sptests/spfifo02/init.c b/testsuites/sptests/spfifo02/init.c
index c9e9012532..7759c10785 100644
--- a/testsuites/sptests/spfifo02/init.c
+++ b/testsuites/sptests/spfifo02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spfifo02/spfifo02.doc b/testsuites/sptests/spfifo02/spfifo02.doc
index b8d66acbd9..f3717b86d7 100644
--- a/testsuites/sptests/spfifo02/spfifo02.doc
+++ b/testsuites/sptests/spfifo02/spfifo02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfifo03/init.c b/testsuites/sptests/spfifo03/init.c
index 287f899c36..199143e5da 100644
--- a/testsuites/sptests/spfifo03/init.c
+++ b/testsuites/sptests/spfifo03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spfifo03/spfifo03.doc b/testsuites/sptests/spfifo03/spfifo03.doc
index c23437da0a..be8b7f3e1a 100644
--- a/testsuites/sptests/spfifo03/spfifo03.doc
+++ b/testsuites/sptests/spfifo03/spfifo03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfifo04/init.c b/testsuites/sptests/spfifo04/init.c
index 4c85228d92..8d9870ac90 100644
--- a/testsuites/sptests/spfifo04/init.c
+++ b/testsuites/sptests/spfifo04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spfifo04/spfifo04.doc b/testsuites/sptests/spfifo04/spfifo04.doc
index f7d263adf5..92a65413af 100644
--- a/testsuites/sptests/spfifo04/spfifo04.doc
+++ b/testsuites/sptests/spfifo04/spfifo04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfifo05/init.c b/testsuites/sptests/spfifo05/init.c
index 21021650b7..b4030112c9 100644
--- a/testsuites/sptests/spfifo05/init.c
+++ b/testsuites/sptests/spfifo05/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spfifo05/spfifo05.doc b/testsuites/sptests/spfifo05/spfifo05.doc
index 5df605d87d..3646389c28 100644
--- a/testsuites/sptests/spfifo05/spfifo05.doc
+++ b/testsuites/sptests/spfifo05/spfifo05.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spfreechain01/spfreechain01.doc b/testsuites/sptests/spfreechain01/spfreechain01.doc
index 7e58ea3cdc..2d53e5fbe9 100644
--- a/testsuites/sptests/spfreechain01/spfreechain01.doc
+++ b/testsuites/sptests/spfreechain01/spfreechain01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spglobalcon01/init.cc b/testsuites/sptests/spglobalcon01/init.cc
index 2f4c19a141..e81ae9b88b 100644
--- a/testsuites/sptests/spglobalcon01/init.cc
+++ b/testsuites/sptests/spglobalcon01/init.cc
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spglobalcon02/init.c b/testsuites/sptests/spglobalcon02/init.c
index aa4c4793b8..bf7bcc080b 100644
--- a/testsuites/sptests/spglobalcon02/init.c
+++ b/testsuites/sptests/spglobalcon02/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2018 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/sptests/spheapprot/init.c b/testsuites/sptests/spheapprot/init.c
index 7428f38830..8cda04ba95 100644
--- a/testsuites/sptests/spheapprot/init.c
+++ b/testsuites/sptests/spheapprot/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2010 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2010 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spheapprot/spheapprot.doc b/testsuites/sptests/spheapprot/spheapprot.doc
index 5b4ca4da25..24660789ca 100644
--- a/testsuites/sptests/spheapprot/spheapprot.doc
+++ b/testsuites/sptests/spheapprot/spheapprot.doc
@@ -1,15 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2010 embedded brains GmbH & Co. KG
#
-# Copyright (c) 2010 embedded brains GmbH. All rights reserved.
-#
-# embedded brains GmbH
-# Obere Lagerstr. 30
-# 82178 Puchheim
-# Germany
-# <rtems@embedded-brains.de>
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spinternalerror01/init.c b/testsuites/sptests/spinternalerror01/init.c
index b1143304d0..78d59b832d 100644
--- a/testsuites/sptests/spinternalerror01/init.c
+++ b/testsuites/sptests/spinternalerror01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spinternalerror02/init.c b/testsuites/sptests/spinternalerror02/init.c
index 30f09de6cc..961321cb23 100644
--- a/testsuites/sptests/spinternalerror02/init.c
+++ b/testsuites/sptests/spinternalerror02/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2012, 2020 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2012, 2020 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Donierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -36,7 +49,7 @@ static void test_internal_error_text(void)
} while ( text != text_last );
rtems_test_assert(
- error - 3 == INTERNAL_ERROR_RTEMS_INIT_TASK_CONSTRUCT_FAILED
+ error - 3 == INTERNAL_ERROR_IDLE_THREAD_STACK_TOO_SMALL
);
}
diff --git a/testsuites/sptests/spintr_err01/init.c b/testsuites/sptests/spintr_err01/init.c
index 9bc39bf4dc..f2e17f60c4 100644
--- a/testsuites/sptests/spintr_err01/init.c
+++ b/testsuites/sptests/spintr_err01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spintr_err01/isr.c b/testsuites/sptests/spintr_err01/isr.c
index 1144760338..04c58f6aab 100644
--- a/testsuites/sptests/spintr_err01/isr.c
+++ b/testsuites/sptests/spintr_err01/isr.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Service_routine
*
* This routine is used as the timer routine for Interrupt Manager tests.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spintr_err01/system.h b/testsuites/sptests/spintr_err01/system.h
index bfece39291..af1bac365b 100644
--- a/testsuites/sptests/spintr_err01/system.h
+++ b/testsuites/sptests/spintr_err01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spintrcritical01/init.c b/testsuites/sptests/spintrcritical01/init.c
index 0df5160c8f..d3dc015d31 100644
--- a/testsuites/sptests/spintrcritical01/init.c
+++ b/testsuites/sptests/spintrcritical01/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for spintrcritical01.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define FIFO_NO_TIMEOUT
#include "spintrcritical01impl.h"
diff --git a/testsuites/sptests/spintrcritical01/spintrcritical01.doc b/testsuites/sptests/spintrcritical01/spintrcritical01.doc
index 6f47afe9b9..6233206f8f 100644
--- a/testsuites/sptests/spintrcritical01/spintrcritical01.doc
+++ b/testsuites/sptests/spintrcritical01/spintrcritical01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical01/spintrcritical01impl.h b/testsuites/sptests/spintrcritical01/spintrcritical01impl.h
index 57c88fb423..8f18e08d0c 100644
--- a/testsuites/sptests/spintrcritical01/spintrcritical01impl.h
+++ b/testsuites/sptests/spintrcritical01/spintrcritical01impl.h
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spintrcritical02/init.c b/testsuites/sptests/spintrcritical02/init.c
index 2559eea587..864e202bde 100644
--- a/testsuites/sptests/spintrcritical02/init.c
+++ b/testsuites/sptests/spintrcritical02/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for spintrcritical02.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define FIFO_WITH_TIMEOUT
#include "../spintrcritical01/spintrcritical01impl.h"
diff --git a/testsuites/sptests/spintrcritical02/spintrcritical02.doc b/testsuites/sptests/spintrcritical02/spintrcritical02.doc
index 9c352dc007..2169f5ed2a 100644
--- a/testsuites/sptests/spintrcritical02/spintrcritical02.doc
+++ b/testsuites/sptests/spintrcritical02/spintrcritical02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical03/init.c b/testsuites/sptests/spintrcritical03/init.c
index 46e8bbb8e9..8b50b29ee6 100644
--- a/testsuites/sptests/spintrcritical03/init.c
+++ b/testsuites/sptests/spintrcritical03/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for spintrcritical03.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define PRIORITY_NO_TIMEOUT
#include "../spintrcritical01/spintrcritical01impl.h"
diff --git a/testsuites/sptests/spintrcritical03/spintrcritical03.doc b/testsuites/sptests/spintrcritical03/spintrcritical03.doc
index fbb53e9046..8eeb4e8dab 100644
--- a/testsuites/sptests/spintrcritical03/spintrcritical03.doc
+++ b/testsuites/sptests/spintrcritical03/spintrcritical03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical04/init.c b/testsuites/sptests/spintrcritical04/init.c
index 16d07528f1..eab2f8cd01 100644
--- a/testsuites/sptests/spintrcritical04/init.c
+++ b/testsuites/sptests/spintrcritical04/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for spintrcritical04.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define PRIORITY_WITH_TIMEOUT
#include "../spintrcritical01/spintrcritical01impl.h"
diff --git a/testsuites/sptests/spintrcritical04/spintrcritical04.doc b/testsuites/sptests/spintrcritical04/spintrcritical04.doc
index 82086f0de2..2aefd5a601 100644
--- a/testsuites/sptests/spintrcritical04/spintrcritical04.doc
+++ b/testsuites/sptests/spintrcritical04/spintrcritical04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical05/init.c b/testsuites/sptests/spintrcritical05/init.c
index d77a683e19..9894482939 100644
--- a/testsuites/sptests/spintrcritical05/init.c
+++ b/testsuites/sptests/spintrcritical05/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for spintrcritical05.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define PRIORITY_NO_TIMEOUT_REVERSE
#include "../spintrcritical01/spintrcritical01impl.h"
diff --git a/testsuites/sptests/spintrcritical05/spintrcritical05.doc b/testsuites/sptests/spintrcritical05/spintrcritical05.doc
index cb872940e9..16e9bd65f7 100644
--- a/testsuites/sptests/spintrcritical05/spintrcritical05.doc
+++ b/testsuites/sptests/spintrcritical05/spintrcritical05.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical08/init.c b/testsuites/sptests/spintrcritical08/init.c
index 7b55a2e328..d8cf13740b 100644
--- a/testsuites/sptests/spintrcritical08/init.c
+++ b/testsuites/sptests/spintrcritical08/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -78,7 +97,7 @@ static T_interrupt_test_state interrupt( void *arg )
T_quiet_eq_int( previous_period_state, RATE_MONOTONIC_ACTIVE );
T_quiet_eq_int( getState( ctx ), RATE_MONOTONIC_ACTIVE );
state = T_INTERRUPT_TEST_DONE;
- } else if ( flags == THREAD_WAIT_FLAGS_INITIAL ) {
+ } else if ( flags == THREAD_WAIT_STATE_READY ) {
T_quiet_true(
previous_period_state == RATE_MONOTONIC_ACTIVE
|| previous_period_state == RATE_MONOTONIC_EXPIRED
@@ -100,8 +119,6 @@ static void prepare( void *arg )
{
test_context *ctx;
rtems_status_code sc;
- ISR_Level level;
- bool success;
ctx = arg;
@@ -119,15 +136,6 @@ static void prepare( void *arg )
*/
sc = rtems_rate_monotonic_period( ctx->period, 1 );
} while ( sc != RTEMS_SUCCESSFUL );
-
- _ISR_Local_disable( level );
- success = _Thread_Wait_flags_try_change_release(
- ctx->thread,
- RATE_MONOTONIC_READY_AGAIN,
- THREAD_WAIT_FLAGS_INITIAL
- );
- _ISR_Local_enable( level );
- T_quiet_true( success );
}
static void action( void *arg )
diff --git a/testsuites/sptests/spintrcritical08/spintrcritical08.doc b/testsuites/sptests/spintrcritical08/spintrcritical08.doc
index aa5c524e69..ccd702a311 100644
--- a/testsuites/sptests/spintrcritical08/spintrcritical08.doc
+++ b/testsuites/sptests/spintrcritical08/spintrcritical08.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical09/init.c b/testsuites/sptests/spintrcritical09/init.c
index 3d82febd6f..f63d19ac63 100644
--- a/testsuites/sptests/spintrcritical09/init.c
+++ b/testsuites/sptests/spintrcritical09/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -32,7 +51,7 @@ static bool is_interrupt_timeout( test_context *ctx )
{
Thread_Wait_flags flags = _Thread_Wait_flags_get( ctx->thread );
- return flags == ( THREAD_WAIT_CLASS_OBJECT | THREAD_WAIT_STATE_READY_AGAIN );
+ return flags == THREAD_WAIT_STATE_READY;
}
static T_interrupt_test_state interrupt( void *arg )
diff --git a/testsuites/sptests/spintrcritical09/spintrcritical09.doc b/testsuites/sptests/spintrcritical09/spintrcritical09.doc
index 72481e518e..52750f3214 100644
--- a/testsuites/sptests/spintrcritical09/spintrcritical09.doc
+++ b/testsuites/sptests/spintrcritical09/spintrcritical09.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical10/init.c b/testsuites/sptests/spintrcritical10/init.c
index 8210853588..d69af9cabd 100644
--- a/testsuites/sptests/spintrcritical10/init.c
+++ b/testsuites/sptests/spintrcritical10/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * Copyright (c) 2013, 2020 embedded brains GmbH.
+ * Copyright (C) 2013, 2020 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -92,8 +111,7 @@ static T_interrupt_test_state any_satisfy_before_timeout_interrupt(void *arg)
if (state == T_INTERRUPT_TEST_DONE) {
rtems_test_assert(
- _Thread_Wait_flags_get(thread)
- == (THREAD_WAIT_CLASS_EVENT | THREAD_WAIT_STATE_READY_AGAIN)
+ _Thread_Wait_flags_get(thread) == THREAD_WAIT_STATE_READY
);
}
@@ -184,8 +202,7 @@ static T_interrupt_test_state all_satisfy_before_timeout_interrupt(void *arg)
if (state == T_INTERRUPT_TEST_DONE) {
rtems_test_assert(
- _Thread_Wait_flags_get(thread)
- == (THREAD_WAIT_CLASS_EVENT | THREAD_WAIT_STATE_READY_AGAIN)
+ _Thread_Wait_flags_get(thread) == THREAD_WAIT_STATE_READY
);
}
@@ -261,8 +278,7 @@ static T_interrupt_test_state timeout_before_satisfied_interrupt(void *arg)
if (state == T_INTERRUPT_TEST_DONE) {
rtems_test_assert(
- _Thread_Wait_flags_get(thread)
- == (THREAD_WAIT_CLASS_EVENT | THREAD_WAIT_STATE_READY_AGAIN)
+ _Thread_Wait_flags_get(thread) == THREAD_WAIT_STATE_READY
);
}
diff --git a/testsuites/sptests/spintrcritical10/spintrcritical10.doc b/testsuites/sptests/spintrcritical10/spintrcritical10.doc
index e9702c1591..8f4ec90afc 100644
--- a/testsuites/sptests/spintrcritical10/spintrcritical10.doc
+++ b/testsuites/sptests/spintrcritical10/spintrcritical10.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical11/init.c b/testsuites/sptests/spintrcritical11/init.c
index 126a76d1a9..e55887b444 100644
--- a/testsuites/sptests/spintrcritical11/init.c
+++ b/testsuites/sptests/spintrcritical11/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for spintrcritical11.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define EVENT_ANY
#include "spintrcritical11impl.h"
diff --git a/testsuites/sptests/spintrcritical11/spintrcritical11.doc b/testsuites/sptests/spintrcritical11/spintrcritical11.doc
index c742b79127..4a519970ef 100644
--- a/testsuites/sptests/spintrcritical11/spintrcritical11.doc
+++ b/testsuites/sptests/spintrcritical11/spintrcritical11.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical11/spintrcritical11impl.h b/testsuites/sptests/spintrcritical11/spintrcritical11impl.h
index 162fb431b0..73f0dd66ba 100644
--- a/testsuites/sptests/spintrcritical11/spintrcritical11impl.h
+++ b/testsuites/sptests/spintrcritical11/spintrcritical11impl.h
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spintrcritical12/init.c b/testsuites/sptests/spintrcritical12/init.c
index 243acfde61..259ae4be7a 100644
--- a/testsuites/sptests/spintrcritical12/init.c
+++ b/testsuites/sptests/spintrcritical12/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for spintrcritical12.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define EVENT_ALL
#include "../spintrcritical11/spintrcritical11impl.h"
diff --git a/testsuites/sptests/spintrcritical12/spintrcritical12.doc b/testsuites/sptests/spintrcritical12/spintrcritical12.doc
index c9711e4045..f089d04b30 100644
--- a/testsuites/sptests/spintrcritical12/spintrcritical12.doc
+++ b/testsuites/sptests/spintrcritical12/spintrcritical12.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2012.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical13/init.c b/testsuites/sptests/spintrcritical13/init.c
index 86d9cc4cb1..23a545d3fb 100644
--- a/testsuites/sptests/spintrcritical13/init.c
+++ b/testsuites/sptests/spintrcritical13/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for spintrcritical13.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define FIRE_AFTER
#include "spintrcritical13impl.h"
diff --git a/testsuites/sptests/spintrcritical13/spintrcritical13.doc b/testsuites/sptests/spintrcritical13/spintrcritical13.doc
index f0e9e49d12..bcdee6cc6b 100644
--- a/testsuites/sptests/spintrcritical13/spintrcritical13.doc
+++ b/testsuites/sptests/spintrcritical13/spintrcritical13.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical13/spintrcritical13impl.h b/testsuites/sptests/spintrcritical13/spintrcritical13impl.h
index 55fc964bb6..3b7604ac92 100644
--- a/testsuites/sptests/spintrcritical13/spintrcritical13impl.h
+++ b/testsuites/sptests/spintrcritical13/spintrcritical13impl.h
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spintrcritical14/init.c b/testsuites/sptests/spintrcritical14/init.c
index b9c972c371..b52024a172 100644
--- a/testsuites/sptests/spintrcritical14/init.c
+++ b/testsuites/sptests/spintrcritical14/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup sptests
+ *
+ * @brief This is the init for spintrcritical14.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define SERVER_FIRE_AFTER
#include "../spintrcritical13/spintrcritical13impl.h"
diff --git a/testsuites/sptests/spintrcritical14/spintrcritical14.doc b/testsuites/sptests/spintrcritical14/spintrcritical14.doc
index de923c9b5c..f2f4c2bbe0 100644
--- a/testsuites/sptests/spintrcritical14/spintrcritical14.doc
+++ b/testsuites/sptests/spintrcritical14/spintrcritical14.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical15/init.c b/testsuites/sptests/spintrcritical15/init.c
index 3b58dc045c..3295b6214b 100644
--- a/testsuites/sptests/spintrcritical15/init.c
+++ b/testsuites/sptests/spintrcritical15/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spintrcritical15/spintrcritical15.doc b/testsuites/sptests/spintrcritical15/spintrcritical15.doc
index 2bc08f6a90..c9494f9f7e 100644
--- a/testsuites/sptests/spintrcritical15/spintrcritical15.doc
+++ b/testsuites/sptests/spintrcritical15/spintrcritical15.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical16/init.c b/testsuites/sptests/spintrcritical16/init.c
index 6f087dad7f..612f92f4e1 100644
--- a/testsuites/sptests/spintrcritical16/init.c
+++ b/testsuites/sptests/spintrcritical16/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spintrcritical16/spintrcritical16.doc b/testsuites/sptests/spintrcritical16/spintrcritical16.doc
index bd715be65d..3b7cb1ba38 100644
--- a/testsuites/sptests/spintrcritical16/spintrcritical16.doc
+++ b/testsuites/sptests/spintrcritical16/spintrcritical16.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical18/init.c b/testsuites/sptests/spintrcritical18/init.c
index 64adda80b7..61ff82df55 100644
--- a/testsuites/sptests/spintrcritical18/init.c
+++ b/testsuites/sptests/spintrcritical18/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2012, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2012, 2020 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spintrcritical20/init.c b/testsuites/sptests/spintrcritical20/init.c
index df83ee416a..c1521c8969 100644
--- a/testsuites/sptests/spintrcritical20/init.c
+++ b/testsuites/sptests/spintrcritical20/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2013, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2013, 2020 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spintrcritical21/init.c b/testsuites/sptests/spintrcritical21/init.c
index 032ee89eac..6c675e1669 100644
--- a/testsuites/sptests/spintrcritical21/init.c
+++ b/testsuites/sptests/spintrcritical21/init.c
@@ -1,14 +1,33 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Classic API Signal to Task from ISR
*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -31,6 +50,18 @@ typedef struct {
rtems_id other_task;
} test_context;
+static void clear_pending_events( void )
+{
+ rtems_event_set out;
+
+ (void) rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &out
+ );
+}
+
static bool is_blocked( Thread_Wait_flags flags )
{
return flags == ( THREAD_WAIT_CLASS_EVENT | THREAD_WAIT_STATE_BLOCKED );
@@ -123,6 +154,8 @@ T_TEST_CASE(EventFromISR)
status = rtems_task_delete( ctx.other_task );
T_rsc_success( status );
+
+ clear_pending_events();
}
static T_interrupt_test_state event_with_timeout_from_isr_interrupt(
@@ -183,6 +216,8 @@ T_TEST_CASE( EventWithTimeoutFromISR )
state = T_interrupt_test( &event_with_timeout_from_isr_config, &ctx );
T_eq_int( state, T_INTERRUPT_TEST_DONE );
+
+ clear_pending_events();
}
static rtems_task Init( rtems_task_argument argument )
diff --git a/testsuites/sptests/spintrcritical21/spintrcritical21.doc b/testsuites/sptests/spintrcritical21/spintrcritical21.doc
index 94423e107f..2888e0895f 100644
--- a/testsuites/sptests/spintrcritical21/spintrcritical21.doc
+++ b/testsuites/sptests/spintrcritical21/spintrcritical21.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spintrcritical22/init.c b/testsuites/sptests/spintrcritical22/init.c
index 192a5a98b3..73c9c6226c 100644
--- a/testsuites/sptests/spintrcritical22/init.c
+++ b/testsuites/sptests/spintrcritical22/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2014, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2014, 2020 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -56,7 +75,7 @@ static T_interrupt_test_state release_semaphore(void *arg)
rtems_test_assert(
_Thread_Wait_flags_get(ctx->main_task_control)
- == (THREAD_WAIT_CLASS_OBJECT | THREAD_WAIT_STATE_READY_AGAIN)
+ == THREAD_WAIT_STATE_READY
);
sem = &ctx->semaphore_control->Core_control.Semaphore;
rtems_test_assert(sem->count == 0);
diff --git a/testsuites/sptests/spintrcritical23/init.c b/testsuites/sptests/spintrcritical23/init.c
index 5959153b71..ebc50fdb2d 100644
--- a/testsuites/sptests/spintrcritical23/init.c
+++ b/testsuites/sptests/spintrcritical23/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2015, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2015, 2020 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spintrcritical24/init.c b/testsuites/sptests/spintrcritical24/init.c
index 347b707355..6f686b1564 100644
--- a/testsuites/sptests/spintrcritical24/init.c
+++ b/testsuites/sptests/spintrcritical24/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2017, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2017, 2020 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/splinkersets01/content.c b/testsuites/sptests/splinkersets01/content.c
index 4de2827575..5dedcb9060 100644
--- a/testsuites/sptests/splinkersets01/content.c
+++ b/testsuites/sptests/splinkersets01/content.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (C) 2015, 2016 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/sptests/splinkersets01/init.c b/testsuites/sptests/splinkersets01/init.c
index 504ea75fc6..059b4e230c 100644
--- a/testsuites/sptests/splinkersets01/init.c
+++ b/testsuites/sptests/splinkersets01/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (C) 2015, 2016 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/sptests/splinkersets01/item-a.c b/testsuites/sptests/splinkersets01/item-a.c
index 30f81bf776..305c952d83 100644
--- a/testsuites/sptests/splinkersets01/item-a.c
+++ b/testsuites/sptests/splinkersets01/item-a.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (C) 2015, 2016 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/sptests/splinkersets01/item-ca.c b/testsuites/sptests/splinkersets01/item-ca.c
index 23937db925..e85c0c0855 100644
--- a/testsuites/sptests/splinkersets01/item-ca.c
+++ b/testsuites/sptests/splinkersets01/item-ca.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (C) 2015, 2016 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/sptests/splinkersets01/sets.c b/testsuites/sptests/splinkersets01/sets.c
index 83f8f71180..a7b930dbf5 100644
--- a/testsuites/sptests/splinkersets01/sets.c
+++ b/testsuites/sptests/splinkersets01/sets.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2015 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/sptests/splinkersets01/splinkersets01.h b/testsuites/sptests/splinkersets01/splinkersets01.h
index 1133fce388..0581204765 100644
--- a/testsuites/sptests/splinkersets01/splinkersets01.h
+++ b/testsuites/sptests/splinkersets01/splinkersets01.h
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (C) 2015, 2016 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/sptests/spmisc01/init.c b/testsuites/sptests/spmisc01/init.c
index 6fbc0eeff8..8c46245af9 100644
--- a/testsuites/sptests/spmisc01/init.c
+++ b/testsuites/sptests/spmisc01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2019 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -109,9 +122,14 @@ static int obfuscate_variable(int i)
return i;
}
+static int global_symbol_base;
+
RTEMS_DECLARE_GLOBAL_SYMBOL(a_global_symbol);
-RTEMS_DEFINE_GLOBAL_SYMBOL(a_global_symbol, 0xabc);
+RTEMS_DEFINE_GLOBAL_SYMBOL(
+ a_global_symbol,
+ RTEMS_SYMBOL_NAME(global_symbol_base) + 0xabc
+);
RTEMS_STATIC_ASSERT(0 != 1, zero_neq_one);
@@ -230,7 +248,9 @@ static void Init(rtems_task_argument arg)
unreachable();
rtems_test_assert(printflike_func("%i", 0) == 56);
rtems_test_assert(obfuscate_variable(63) == 63);
- rtems_test_assert((uintptr_t)a_global_symbol == 0xabc);
+ rtems_test_assert(
+ (uintptr_t) a_global_symbol - (uintptr_t) &global_symbol_base == 0xabc
+ );
rtems_test_assert(RTEMS_ARRAY_SIZE(array) == 3);
rtems_test_assert(sizeof(zero_length_array_struct) == 4);
container_of();
diff --git a/testsuites/sptests/spmisc01/spmisc01.h b/testsuites/sptests/spmisc01/spmisc01.h
index 6dbf9ca23c..ee04e36cde 100644
--- a/testsuites/sptests/spmisc01/spmisc01.h
+++ b/testsuites/sptests/spmisc01/spmisc01.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/sptests/spmisc01/strong.c b/testsuites/sptests/spmisc01/strong.c
index 6a3d9c8561..d330e5ed44 100644
--- a/testsuites/sptests/spmisc01/strong.c
+++ b/testsuites/sptests/spmisc01/strong.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/sptests/spmkdir/init.c b/testsuites/sptests/spmkdir/init.c
index fb186e7e93..7eea58d86d 100644
--- a/testsuites/sptests/spmkdir/init.c
+++ b/testsuites/sptests/spmkdir/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,16 +9,28 @@
*/
/*
- * Copyright (c) 2010
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * D-82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2010 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spmountmgr01/init.c b/testsuites/sptests/spmountmgr01/init.c
index a55beace39..44a2ec6c58 100644
--- a/testsuites/sptests/spmountmgr01/init.c
+++ b/testsuites/sptests/spmountmgr01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spmountmgr01/spmountmgr01.doc b/testsuites/sptests/spmountmgr01/spmountmgr01.doc
index d734845634..c347be48a9 100644
--- a/testsuites/sptests/spmountmgr01/spmountmgr01.doc
+++ b/testsuites/sptests/spmountmgr01/spmountmgr01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spmrsp01/init.c b/testsuites/sptests/spmrsp01/init.c
index ca35d90595..a5c130e1c2 100644
--- a/testsuites/sptests/spmrsp01/init.c
+++ b/testsuites/sptests/spmrsp01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spmsgq_err01/init.c b/testsuites/sptests/spmsgq_err01/init.c
index cb1a82c0e1..0baa9577d5 100644
--- a/testsuites/sptests/spmsgq_err01/init.c
+++ b/testsuites/sptests/spmsgq_err01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spmsgq_err01/system.h b/testsuites/sptests/spmsgq_err01/system.h
index 9d1dd7e96e..e77feb7942 100644
--- a/testsuites/sptests/spmsgq_err01/system.h
+++ b/testsuites/sptests/spmsgq_err01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spmsgq_err02/init.c b/testsuites/sptests/spmsgq_err02/init.c
index 2ed5057007..86d46752a2 100644
--- a/testsuites/sptests/spmsgq_err02/init.c
+++ b/testsuites/sptests/spmsgq_err02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spmsgq_err02/system.h b/testsuites/sptests/spmsgq_err02/system.h
index 32ee6cc7c4..81b9cf323b 100644
--- a/testsuites/sptests/spmsgq_err02/system.h
+++ b/testsuites/sptests/spmsgq_err02/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spmsgq_err02/task3.c b/testsuites/sptests/spmsgq_err02/task3.c
index 3c622d1007..9b9b4b9aa6 100644
--- a/testsuites/sptests/spmsgq_err02/task3.c
+++ b/testsuites/sptests/spmsgq_err02/task3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_3
*
* This routine serves as a test task. Its only purpose in life is to
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spmutex01/init.c b/testsuites/sptests/spmutex01/init.c
index d87dd07f3e..12590317c5 100644
--- a/testsuites/sptests/spmutex01/init.c
+++ b/testsuites/sptests/spmutex01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2015, 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spnsext01/init.c b/testsuites/sptests/spnsext01/init.c
index 0bde2cc2f1..b45da45a49 100644
--- a/testsuites/sptests/spnsext01/init.c
+++ b/testsuites/sptests/spnsext01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2011 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2011 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spnsext01/spnsext01.doc b/testsuites/sptests/spnsext01/spnsext01.doc
index 5830dade7c..27c9f0c32e 100644
--- a/testsuites/sptests/spnsext01/spnsext01.doc
+++ b/testsuites/sptests/spnsext01/spnsext01.doc
@@ -1,15 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2011 embedded brains GmbH & Co. KG
#
-# Copyright (c) 2011 embedded brains GmbH. All rights reserved.
-#
-# embedded brains GmbH
-# Obere Lagerstr. 30
-# 82178 Puchheim
-# Germany
-# <rtems@embedded-brains.de>
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spntp01/init.c b/testsuites/sptests/spntp01/init.c
new file mode 100644
index 0000000000..f6f6252bcf
--- /dev/null
+++ b/testsuites/sptests/spntp01/init.c
@@ -0,0 +1,111 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/time.h>
+#include <sys/timex.h>
+#include <errno.h>
+#include <string.h>
+
+#include <rtems/test.h>
+#include <rtems/test-info.h>
+
+const char rtems_test_name[] = "SPNTP 1";
+
+T_TEST_CASE( NTP )
+{
+ struct ntptimeval ntv;
+ struct timex tx;
+ int status;
+
+ errno = 0;
+ status = ntp_gettime( NULL );
+ T_eq_int( status, -1 );
+ T_eq_int( errno, EFAULT );
+
+ memset( &ntv, 0xff, sizeof( ntv ) );
+ status = ntp_gettime( &ntv );
+ T_eq_int( status, TIME_ERROR );
+
+ T_eq_i64( ntv.time.tv_sec, 567993600 );
+ T_eq_long( ntv.time.tv_nsec, 0 );
+ T_eq_long( ntv.maxerror, 500000 );
+ T_eq_long( ntv.esterror, 500000 );
+ T_eq_long( ntv.tai, 0 );
+ T_eq_long( ntv.time_state, TIME_ERROR );
+
+ errno = 0;
+ status = ntp_adjtime( NULL );
+ T_eq_int( status, -1 );
+ T_eq_int( errno, EFAULT );
+
+ memset( &tx, 0xff, sizeof( tx ) );
+ tx.modes = 0;
+ status = ntp_adjtime( &tx );
+ T_eq_int( status, TIME_ERROR );
+ T_eq_uint( tx.modes, 0 );
+ T_eq_long( tx.offset, 0 );
+ T_eq_long( tx.freq, 0 );
+ T_eq_long( tx.maxerror, 500000 );
+ T_eq_long( tx.esterror, 500000 );
+ T_eq_int( tx.status, STA_UNSYNC );
+ T_eq_long( tx.constant, 0 );
+ T_eq_long( tx.precision, 0 );
+ T_eq_long( tx.tolerance, 32500000 );
+ T_eq_long( tx.ppsfreq, 0 );
+ T_eq_long( tx.jitter, 0 );
+ T_eq_int( tx.shift, 2 );
+ T_eq_long( tx.stabil, 0 );
+ T_eq_long( tx.jitcnt, 0 );
+ T_eq_long( tx.calcnt, 0 );
+ T_eq_long( tx.errcnt, 0 );
+ T_eq_long( tx.stbcnt, 0 );
+
+ status = adjtime( NULL, NULL );
+ T_eq_int( status, 0 );
+}
+
+static rtems_task Init( rtems_task_argument argument )
+{
+ rtems_test_run( argument, TEST_STATE );
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/sptests/spobjgetnext/init.c b/testsuites/sptests/spobjgetnext/init.c
index 620185c1f3..875184e9cc 100644
--- a/testsuites/sptests/spobjgetnext/init.c
+++ b/testsuites/sptests/spobjgetnext/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Exercise SuperCore Object Get Next
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spobjgetnext/spobjgetnext.doc b/testsuites/sptests/spobjgetnext/spobjgetnext.doc
index 966ebcfa35..048b0beb6f 100644
--- a/testsuites/sptests/spobjgetnext/spobjgetnext.doc
+++ b/testsuites/sptests/spobjgetnext/spobjgetnext.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spobjgetnext/system.h b/testsuites/sptests/spobjgetnext/system.h
index 37941c3d0e..63d865d851 100644
--- a/testsuites/sptests/spobjgetnext/system.h
+++ b/testsuites/sptests/spobjgetnext/system.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sppartition_err01/init.c b/testsuites/sptests/sppartition_err01/init.c
index a2297d53cc..5855184bc7 100644
--- a/testsuites/sptests/sppartition_err01/init.c
+++ b/testsuites/sptests/sppartition_err01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sppartition_err01/sppartition_err01.doc b/testsuites/sptests/sppartition_err01/sppartition_err01.doc
index 75917559c2..38e9df408a 100644
--- a/testsuites/sptests/sppartition_err01/sppartition_err01.doc
+++ b/testsuites/sptests/sppartition_err01/sppartition_err01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/sppartition_err01/system.h b/testsuites/sptests/sppartition_err01/system.h
index c57a85a844..c2f7b18df3 100644
--- a/testsuites/sptests/sppartition_err01/system.h
+++ b/testsuites/sptests/sppartition_err01/system.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sppercpudata01/init.c b/testsuites/sptests/sppercpudata01/init.c
index fbdf4c50ad..24ad75b607 100644
--- a/testsuites/sptests/sppercpudata01/init.c
+++ b/testsuites/sptests/sppercpudata01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sppercpudata01/item.c b/testsuites/sptests/sppercpudata01/item.c
index 2c29449a28..295e2855ee 100644
--- a/testsuites/sptests/sppercpudata01/item.c
+++ b/testsuites/sptests/sppercpudata01/item.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sppercpudata01/sppercpudata01.h b/testsuites/sptests/sppercpudata01/sppercpudata01.h
index efed3cf5f5..2913d3456f 100644
--- a/testsuites/sptests/sppercpudata01/sppercpudata01.h
+++ b/testsuites/sptests/sppercpudata01/sppercpudata01.h
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef SPPERCPUDATA01_H
diff --git a/testsuites/sptests/spport_err01/init.c b/testsuites/sptests/spport_err01/init.c
index 20e66737b9..0478985474 100644
--- a/testsuites/sptests/spport_err01/init.c
+++ b/testsuites/sptests/spport_err01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spport_err01/system.h b/testsuites/sptests/spport_err01/system.h
index 9d1dd7e96e..e77feb7942 100644
--- a/testsuites/sptests/spport_err01/system.h
+++ b/testsuites/sptests/spport_err01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sppps01/init.c b/testsuites/sptests/sppps01/init.c
new file mode 100644
index 0000000000..8dcce17769
--- /dev/null
+++ b/testsuites/sptests/sppps01/init.c
@@ -0,0 +1,240 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2022 German Aerospace Center (DLR)
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <errno.h>
+#include <rtems/test.h>
+#include <rtems/test-info.h>
+#include <rtems/timespec.h>
+#include <rtems/rtems/event.h>
+#define _KERNEL
+#include <sys/timepps.h>
+
+const char rtems_test_name[] = "SPPPS 1";
+
+#define PPS_EVENT RTEMS_EVENT_0
+#define TASK_WAITING RTEMS_EVENT_1
+#define PPS_EVENT_RECEIVED RTEMS_EVENT_2
+
+struct test_pps_device {
+ struct pps_state pps;
+ rtems_id task_waiting;
+ int wokenup;
+};
+
+typedef struct {
+ rtems_id main_task;
+ struct test_pps_device *pps_dev;
+} test_context;
+
+T_TEST_CASE( WaitPPSEventDefaultHandler )
+{
+ int status;
+ struct test_pps_device pps_dev;
+ struct pps_fetch_args fetch;
+
+ memset( &pps_dev, 0, sizeof( pps_dev ) );
+ pps_dev.task_waiting = RTEMS_INVALID_ID;
+
+ pps_dev.pps.ppscap = PPS_CAPTUREBOTH;
+ pps_init_abi( &pps_dev.pps );
+ pps_dev.pps.ppsparam.mode = PPS_CAPTUREASSERT;
+
+ /* If no timeout is requested, pps_fetch() doesn't call the default handler */
+ memset( &fetch, 0, sizeof( fetch ) );
+ status = pps_ioctl( PPS_IOC_FETCH, (caddr_t)&fetch, &pps_dev.pps );
+ T_eq_int( status, 0 );
+
+ fetch.timeout.tv_sec = 1;
+ status = pps_ioctl( PPS_IOC_FETCH, (caddr_t)&fetch, &pps_dev.pps );
+ T_eq_int( status, ETIMEDOUT );
+}
+
+static void fake_wakeup(struct pps_state *pps)
+{
+ struct test_pps_device *pps_dev;
+
+ pps_dev = RTEMS_CONTAINER_OF( pps, struct test_pps_device, pps );
+ pps_dev->wokenup++;
+}
+
+T_TEST_CASE( PPSEventEarlyReturns )
+{
+ struct test_pps_device pps_dev;
+
+ memset( &pps_dev, 0, sizeof( pps_dev ) );
+ pps_dev.task_waiting = RTEMS_INVALID_ID;
+
+ pps_dev.pps.ppscap = PPS_CAPTUREBOTH;
+ pps_init_abi( &pps_dev.pps );
+ pps_dev.pps.wakeup = fake_wakeup;
+ pps_dev.pps.ppsparam.mode = PPS_CAPTUREASSERT;
+
+ pps_capture( &pps_dev.pps );
+ /* Trigger event with a different event than the one previously selected */
+ pps_event( &pps_dev.pps, PPS_CAPTURECLEAR );
+ T_eq_int( pps_dev.wokenup, 0 );
+
+ pps_dev.pps.ppsparam.mode = PPS_CAPTURECLEAR;
+
+ /* Wait th_generation to be updated */
+ rtems_task_wake_after( 2 );
+ pps_event( &pps_dev.pps, PPS_CAPTURECLEAR );
+ T_eq_int( pps_dev.wokenup, 0 );
+
+ /* Save current timecounter in pps_state object */
+ pps_capture( &pps_dev.pps );
+ pps_event( &pps_dev.pps, PPS_CAPTURECLEAR );
+ T_eq_int( pps_dev.wokenup, 0 );
+
+ pps_capture( &pps_dev.pps );
+ pps_event( &pps_dev.pps, PPS_CAPTURECLEAR );
+ T_eq_int( pps_dev.wokenup, 1 );
+}
+
+static void wakeup(struct pps_state *pps)
+{
+ struct test_pps_device *pps_dev;
+
+ pps_dev = RTEMS_CONTAINER_OF( pps, struct test_pps_device, pps );
+ if (pps_dev->task_waiting != RTEMS_INVALID_ID)
+ rtems_event_send( pps_dev->task_waiting, PPS_EVENT );
+}
+
+static int wait(struct pps_state *pps, struct timespec timeout)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+ uint32_t timeoutticks;
+ struct test_pps_device *pps_dev;
+
+ pps_dev = RTEMS_CONTAINER_OF( pps, struct test_pps_device, pps );
+ pps_dev->task_waiting = rtems_task_self();
+
+ timeoutticks = rtems_timespec_to_ticks(&timeout);
+ sc = rtems_event_receive( PPS_EVENT, RTEMS_DEFAULT_OPTIONS, timeoutticks, &out );
+ return rtems_status_code_to_errno(sc);
+}
+
+static void pps_task(rtems_task_argument arg)
+{
+ int status;
+ rtems_status_code sc;
+ struct pps_fetch_args fetch;
+ test_context *ctx;
+
+ ctx = (test_context *) arg;
+
+ fetch.tsformat = PPS_TSFMT_TSPEC;
+ fetch.timeout.tv_sec = 1;
+ fetch.timeout.tv_nsec = 0;
+
+ sc = rtems_event_send( ctx->main_task, TASK_WAITING );
+ T_rsc_success( sc );
+ status = pps_ioctl( PPS_IOC_FETCH, (caddr_t)&fetch, &ctx->pps_dev->pps );
+ T_eq_int( status, 0 );
+ sc = rtems_event_send( ctx->main_task, PPS_EVENT_RECEIVED );
+ T_rsc_success( sc );
+
+ rtems_task_exit();
+}
+
+T_TEST_CASE( WakeupTaskWithPPSEvent )
+{
+ int status;
+ rtems_status_code sc;
+ struct test_pps_device pps_dev;
+ struct pps_kcbind_args kcbind;
+ test_context ctx;
+ rtems_id pps_task_id;
+ rtems_task_priority pps_task_prio = 1;
+ rtems_event_set out;
+
+ memset( &pps_dev, 0, sizeof( pps_dev ) );
+ pps_dev.task_waiting = RTEMS_INVALID_ID;
+ ctx.pps_dev = &pps_dev;
+ ctx.main_task = rtems_task_self();
+
+ pps_dev.pps.ppscap = PPS_CAPTUREBOTH;
+ pps_init_abi( &pps_dev.pps );
+ pps_dev.pps.wait = wait;
+ pps_dev.pps.wakeup = wakeup;
+ pps_dev.pps.ppsparam.mode = PPS_CAPTUREASSERT;
+
+ kcbind.kernel_consumer = PPS_KC_HARDPPS;
+ kcbind.edge = PPS_CAPTUREASSERT;
+ kcbind.tsformat = PPS_TSFMT_TSPEC;
+ status = pps_ioctl( PPS_IOC_KCBIND, (caddr_t)&kcbind, &pps_dev.pps );
+ T_eq_int( status, 0 );
+
+ /* Save current timecounter in pps_state object */
+ pps_capture( &pps_dev.pps );
+ pps_event( &pps_dev.pps, PPS_CAPTUREASSERT );
+
+ sc = rtems_task_create(
+ rtems_build_name('P', 'P', 'S', 'E'),
+ pps_task_prio,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &pps_task_id
+ );
+ T_rsc_success( sc );
+ sc = rtems_task_start( pps_task_id, pps_task, (rtems_task_argument) &ctx );
+ T_rsc_success( sc );
+
+ sc = rtems_event_receive( TASK_WAITING, RTEMS_DEFAULT_OPTIONS, RTEMS_MILLISECONDS_TO_TICKS(100), &out );
+ T_rsc_success( sc );
+
+ /* Capture event and send wake-up */
+ pps_capture( &pps_dev.pps );
+ pps_event( &pps_dev.pps, PPS_CAPTUREASSERT );
+
+ sc = rtems_event_receive( PPS_EVENT_RECEIVED, RTEMS_DEFAULT_OPTIONS, RTEMS_MILLISECONDS_TO_TICKS(100), &out );
+ T_rsc_success( sc );
+}
+
+static rtems_task Init( rtems_task_argument argument )
+{
+ rtems_test_run( argument, TEST_STATE );
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 2
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/sptests/spprintk/init.c b/testsuites/sptests/spprintk/init.c
index ffabb9ae91..4fc1c0cc97 100644
--- a/testsuites/sptests/spprintk/init.c
+++ b/testsuites/sptests/spprintk/init.c
@@ -1,19 +1,39 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Exercise putk, printk, and getchark
*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include <rtems/score/io.h>
+#include <rtems/base64.h>
+#include <rtems/dev/io.h>
/*
* Undefined the RTEMS_PRINTFLIKE and make it nothing. The test code
@@ -193,52 +213,52 @@ static void test_io_base64( test_context *ctx )
int n;
clear( ctx );
- n = _IO_Base64( put_char, ctx, buf, 9, "\n", 0 );
+ n = _Base64_Encode( put_char, ctx, buf, 9, "\n", 0 );
rtems_test_assert( n == 14 );
rtems_test_assert( strcmp( ctx->buf, "YWJj\nZGVm\nZ2hp" ) == 0 );
clear( ctx );
- n = _IO_Base64( put_char, ctx, buf, 8, "\n", 4 );
+ n = _Base64_Encode( put_char, ctx, buf, 8, "\n", 4 );
rtems_test_assert( n == 14 );
rtems_test_assert( strcmp( ctx->buf, "YWJj\nZGVm\nZ2g=" ) == 0 );
clear( ctx );
- n = _IO_Base64( put_char, ctx, buf, 7, "\n", 4 );
+ n = _Base64_Encode( put_char, ctx, buf, 7, "\n", 4 );
rtems_test_assert( n == 14 );
rtems_test_assert( strcmp( ctx->buf, "YWJj\nZGVm\nZw==" ) == 0 );
clear( ctx );
- n = _IO_Base64( put_char, ctx, buf, 6, "\n", 4 );
+ n = _Base64_Encode( put_char, ctx, buf, 6, "\n", 4 );
rtems_test_assert( n == 9 );
rtems_test_assert( strcmp( ctx->buf, "YWJj\nZGVm" ) == 0 );
clear( ctx );
- n = _IO_Base64( put_char, ctx, buf, 5, "\n", 4 );
+ n = _Base64_Encode( put_char, ctx, buf, 5, "\n", 4 );
rtems_test_assert( n == 9 );
rtems_test_assert( strcmp( ctx->buf, "YWJj\nZGU=" ) == 0 );
clear( ctx );
- n = _IO_Base64( put_char, ctx, buf, 4, "\n", 4 );
+ n = _Base64_Encode( put_char, ctx, buf, 4, "\n", 4 );
rtems_test_assert( n == 9 );
rtems_test_assert( strcmp( ctx->buf, "YWJj\nZA==" ) == 0 );
clear( ctx );
- n = _IO_Base64( put_char, ctx, buf, 3, "\n", 4 );
+ n = _Base64_Encode( put_char, ctx, buf, 3, "\n", 4 );
rtems_test_assert( n == 4 );
rtems_test_assert( strcmp( ctx->buf, "YWJj" ) == 0 );
clear( ctx );
- n = _IO_Base64( put_char, ctx, buf, 2, "\n", 4 );
+ n = _Base64_Encode( put_char, ctx, buf, 2, "\n", 4 );
rtems_test_assert( n == 4 );
rtems_test_assert( strcmp( ctx->buf, "YWI=" ) == 0 );
clear( ctx );
- n = _IO_Base64( put_char, ctx, buf, 1, "\n", 4 );
+ n = _Base64_Encode( put_char, ctx, buf, 1, "\n", 4 );
rtems_test_assert( n == 4 );
rtems_test_assert( strcmp( ctx->buf, "YQ==" ) == 0 );
clear( ctx );
- n = _IO_Base64( put_char, ctx, buf, 0, "\n", 4 );
+ n = _Base64_Encode( put_char, ctx, buf, 0, "\n", 4 );
rtems_test_assert( n == 0 );
}
@@ -248,7 +268,7 @@ static void test_io_base64url( test_context *ctx )
int n;
clear( ctx );
- n = _IO_Base64url( put_char, ctx, buf, sizeof( buf ), "\n", 0 );
+ n = _Base64url_Encode( put_char, ctx, buf, sizeof( buf ), "\n", 0 );
rtems_test_assert( n == 9 );
rtems_test_assert( strcmp( ctx->buf, "AAA-\nAAA_" ) == 0 );
}
diff --git a/testsuites/sptests/spprintk/spprintk.doc b/testsuites/sptests/spprintk/spprintk.doc
index 0043c4f24d..067501d4e9 100644
--- a/testsuites/sptests/spprintk/spprintk.doc
+++ b/testsuites/sptests/spprintk/spprintk.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spprivenv01/init.c b/testsuites/sptests/spprivenv01/init.c
index 2ba21b0e68..50cdce571e 100644
--- a/testsuites/sptests/spprivenv01/init.c
+++ b/testsuites/sptests/spprivenv01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spprivenv01/spprivenv01.doc b/testsuites/sptests/spprivenv01/spprivenv01.doc
index 71ed4264ed..ea95306557 100644
--- a/testsuites/sptests/spprivenv01/spprivenv01.doc
+++ b/testsuites/sptests/spprivenv01/spprivenv01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spprofiling01/init.c b/testsuites/sptests/spprofiling01/init.c
index 54b4bfbefb..aa8a7b7098 100644
--- a/testsuites/sptests/spprofiling01/init.c
+++ b/testsuites/sptests/spprofiling01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spqreslib/spqreslib.doc b/testsuites/sptests/spqreslib/spqreslib.doc
index e2c93a117a..1f1cd0bcf4 100644
--- a/testsuites/sptests/spqreslib/spqreslib.doc
+++ b/testsuites/sptests/spqreslib/spqreslib.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/spqreslib/system.h b/testsuites/sptests/spqreslib/system.h
index 80cb528e46..42cea3a717 100644
--- a/testsuites/sptests/spqreslib/system.h
+++ b/testsuites/sptests/spqreslib/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spratemon_err01/init.c b/testsuites/sptests/spratemon_err01/init.c
index ccc2361295..ac1c84ae25 100644
--- a/testsuites/sptests/spratemon_err01/init.c
+++ b/testsuites/sptests/spratemon_err01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spratemon_err01/screen10.c b/testsuites/sptests/spratemon_err01/screen10.c
index e7a883a489..feea4de2d0 100644
--- a/testsuites/sptests/spratemon_err01/screen10.c
+++ b/testsuites/sptests/spratemon_err01/screen10.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Screen10
*
* This routine generates error screen 10 for test 9.
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spratemon_err01/system.h b/testsuites/sptests/spratemon_err01/system.h
index 7c1993cad5..5ec49865d4 100644
--- a/testsuites/sptests/spratemon_err01/system.h
+++ b/testsuites/sptests/spratemon_err01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spratemon_err01/task4.c b/testsuites/sptests/spratemon_err01/task4.c
index 5b719b5e91..60fa4b066c 100644
--- a/testsuites/sptests/spratemon_err01/task4.c
+++ b/testsuites/sptests/spratemon_err01/task4.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_4
*
* This routine serves as a test task. Its only purpose in life is to
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sprbtree01/init.c b/testsuites/sptests/sprbtree01/init.c
index 16c1ee5edb..1e3cba69d0 100644
--- a/testsuites/sptests/sprbtree01/init.c
+++ b/testsuites/sptests/sprbtree01/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2010 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sprbtree01/sprbtree01.doc b/testsuites/sptests/sprbtree01/sprbtree01.doc
index bffb5625b2..2cb722de88 100644
--- a/testsuites/sptests/sprbtree01/sprbtree01.doc
+++ b/testsuites/sptests/sprbtree01/sprbtree01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spregion_err01/init.c b/testsuites/sptests/spregion_err01/init.c
index 20f297c379..c1b60ff20c 100644
--- a/testsuites/sptests/spregion_err01/init.c
+++ b/testsuites/sptests/spregion_err01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spregion_err01/spregion_err01.doc b/testsuites/sptests/spregion_err01/spregion_err01.doc
index cc2d52f5b1..4a7ed9cc2a 100644
--- a/testsuites/sptests/spregion_err01/spregion_err01.doc
+++ b/testsuites/sptests/spregion_err01/spregion_err01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/sptests/spregion_err01/system.h b/testsuites/sptests/spregion_err01/system.h
index 865085fde7..edac56a2c7 100644
--- a/testsuites/sptests/spregion_err01/system.h
+++ b/testsuites/sptests/spregion_err01/system.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spscheduler01/init.c b/testsuites/sptests/spscheduler01/init.c
index 7b24dae5b0..c2dfc954fc 100644
--- a/testsuites/sptests/spscheduler01/init.c
+++ b/testsuites/sptests/spscheduler01/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (C) 2014, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2014, 2020 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#define _GNU_SOURCE
diff --git a/testsuites/sptests/spsem01/init.c b/testsuites/sptests/spsem01/init.c
index 42ae2a65d4..0f869f2e9b 100644
--- a/testsuites/sptests/spsem01/init.c
+++ b/testsuites/sptests/spsem01/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2013 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/sptests/spsem02/init.c b/testsuites/sptests/spsem02/init.c
index a9c681f45d..4ffeee1aaf 100644
--- a/testsuites/sptests/spsem02/init.c
+++ b/testsuites/sptests/spsem02/init.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2013 Gedare Bloom.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <rtems.h>
diff --git a/testsuites/sptests/spsem03/init.c b/testsuites/sptests/spsem03/init.c
index d326314b90..11e6cb6827 100644
--- a/testsuites/sptests/spsem03/init.c
+++ b/testsuites/sptests/spsem03/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spsem_err01/init.c b/testsuites/sptests/spsem_err01/init.c
index f1f1592ebf..0812d5dc8a 100644
--- a/testsuites/sptests/spsem_err01/init.c
+++ b/testsuites/sptests/spsem_err01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spsem_err01/system.h b/testsuites/sptests/spsem_err01/system.h
index 2c023e52f3..3b3386bafa 100644
--- a/testsuites/sptests/spsem_err01/system.h
+++ b/testsuites/sptests/spsem_err01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spsem_err02/init.c b/testsuites/sptests/spsem_err02/init.c
index 4c0acb9039..af6acfa252 100644
--- a/testsuites/sptests/spsem_err02/init.c
+++ b/testsuites/sptests/spsem_err02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spsem_err02/system.h b/testsuites/sptests/spsem_err02/system.h
index 72654922e2..fe46365be6 100644
--- a/testsuites/sptests/spsem_err02/system.h
+++ b/testsuites/sptests/spsem_err02/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spsem_err02/task2.c b/testsuites/sptests/spsem_err02/task2.c
index 14feeec502..3347a49811 100644
--- a/testsuites/sptests/spsem_err02/task2.c
+++ b/testsuites/sptests/spsem_err02/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task. Its only purpose is to generate the
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spsignal_err01/init.c b/testsuites/sptests/spsignal_err01/init.c
index 6f8cd3ef60..9d1c83e91d 100644
--- a/testsuites/sptests/spsignal_err01/init.c
+++ b/testsuites/sptests/spsignal_err01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spsignal_err01/isr.c b/testsuites/sptests/spsignal_err01/isr.c
index 1144760338..04c58f6aab 100644
--- a/testsuites/sptests/spsignal_err01/isr.c
+++ b/testsuites/sptests/spsignal_err01/isr.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Service_routine
*
* This routine is used as the timer routine for Interrupt Manager tests.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spsignal_err01/system.h b/testsuites/sptests/spsignal_err01/system.h
index bfece39291..af1bac365b 100644
--- a/testsuites/sptests/spsignal_err01/system.h
+++ b/testsuites/sptests/spsignal_err01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spsimplesched01/init.c b/testsuites/sptests/spsimplesched01/init.c
index f2a06732d8..9b58ad5ad8 100644
--- a/testsuites/sptests/spsimplesched01/init.c
+++ b/testsuites/sptests/spsimplesched01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -34,7 +53,7 @@ rtems_task Test_task(
uint32_t task_index;
rtems_status_code status;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "task ident" );
task_index = task_number( tid );
diff --git a/testsuites/sptests/spsimplesched01/spsimplesched01.doc b/testsuites/sptests/spsimplesched01/spsimplesched01.doc
index ff55b857cb..50555b4e30 100644
--- a/testsuites/sptests/spsimplesched01/spsimplesched01.doc
+++ b/testsuites/sptests/spsimplesched01/spsimplesched01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spsimplesched02/init.c b/testsuites/sptests/spsimplesched02/init.c
index d19d3553d9..eb338a84fa 100644
--- a/testsuites/sptests/spsimplesched02/init.c
+++ b/testsuites/sptests/spsimplesched02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -38,7 +57,7 @@ rtems_task Test_task(
rtems_id tid;
rtems_status_code status;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "wake after" );
for ( ; ; ) {
diff --git a/testsuites/sptests/spsimplesched02/spsimplesched02.doc b/testsuites/sptests/spsimplesched02/spsimplesched02.doc
index 0c38533ab4..5a1b4cff9e 100644
--- a/testsuites/sptests/spsimplesched02/spsimplesched02.doc
+++ b/testsuites/sptests/spsimplesched02/spsimplesched02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spsimplesched03/init.c b/testsuites/sptests/spsimplesched03/init.c
index a5970ee8ab..b9b1d2719a 100644
--- a/testsuites/sptests/spsimplesched03/init.c
+++ b/testsuites/sptests/spsimplesched03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spsimplesched03/spsimplesched03.doc b/testsuites/sptests/spsimplesched03/spsimplesched03.doc
index e7f88ce053..e25ef1b4fa 100644
--- a/testsuites/sptests/spsimplesched03/spsimplesched03.doc
+++ b/testsuites/sptests/spsimplesched03/spsimplesched03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2011.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spsize/getint.c b/testsuites/sptests/spsize/getint.c
index c0b364994d..166f64f4e5 100644
--- a/testsuites/sptests/spsize/getint.c
+++ b/testsuites/sptests/spsize/getint.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* getint
*
* This routine reads and returns an integer.
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spsize/init.c b/testsuites/sptests/spsize/init.c
index c26ba06c70..eb89068fa6 100644
--- a/testsuites/sptests/spsize/init.c
+++ b/testsuites/sptests/spsize/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the initialization task for this test program.
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
index 1b6881bb24..c353f3bd5d 100644
--- a/testsuites/sptests/spsize/size.c
+++ b/testsuites/sptests/spsize/size.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spsize/spsize.doc b/testsuites/sptests/spsize/spsize.doc
index 5309482c09..8f409dd87e 100644
--- a/testsuites/sptests/spsize/spsize.doc
+++ b/testsuites/sptests/spsize/spsize.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spsize/system.h b/testsuites/sptests/spsize/system.h
index 3e80b1f43d..2ce14a5925 100644
--- a/testsuites/sptests/spsize/system.h
+++ b/testsuites/sptests/spsize/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spstdc17/init.c b/testsuites/sptests/spstdc17/init.c
new file mode 100644
index 0000000000..0a1a5571ac
--- /dev/null
+++ b/testsuites/sptests/spstdc17/init.c
@@ -0,0 +1,57 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2022
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <tmacros.h>
+
+const char rtems_test_name[] = "SPSTDC17";
+
+static rtems_task Init( rtems_task_argument arg )
+{
+ (void) arg;
+
+ TEST_BEGIN();
+ TEST_END();
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/sptests/spstdc17/spstdc17.doc b/testsuites/sptests/spstdc17/spstdc17.doc
new file mode 100644
index 0000000000..7f83fd9ad3
--- /dev/null
+++ b/testsuites/sptests/spstdc17/spstdc17.doc
@@ -0,0 +1,12 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: spstdc17
+
+directives:
+
+ - Header file <rtems.h>
+ - Header file <rtems/confdefs.h>
+
+concepts:
+
+ - Ensure that the API header files are compatible with the C17 standard.
diff --git a/testsuites/sptests/spstdthreads01/init.c b/testsuites/sptests/spstdthreads01/init.c
index 3133d11368..d1cacc1705 100644
--- a/testsuites/sptests/spstdthreads01/init.c
+++ b/testsuites/sptests/spstdthreads01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spstkalloc/init.c b/testsuites/sptests/spstkalloc/init.c
index 60169435c4..ddbcbd0024 100644
--- a/testsuites/sptests/spstkalloc/init.c
+++ b/testsuites/sptests/spstkalloc/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spstkalloc/spstkalloc.doc b/testsuites/sptests/spstkalloc/spstkalloc.doc
index 957952b746..816b15cf10 100644
--- a/testsuites/sptests/spstkalloc/spstkalloc.doc
+++ b/testsuites/sptests/spstkalloc/spstkalloc.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spstkalloc02/init.c b/testsuites/sptests/spstkalloc02/init.c
index a2805d1164..30803bfc8e 100644
--- a/testsuites/sptests/spstkalloc02/init.c
+++ b/testsuites/sptests/spstkalloc02/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2011 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2011 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -31,6 +44,7 @@ const char rtems_test_name[] = "SPSTKALLOC 2";
#include <stdio.h>
#include <inttypes.h>
+#include <rtems/malloc.h>
#include <rtems/score/heapimpl.h>
#define TASK_COUNT 5
@@ -43,6 +57,8 @@ static void task_stack_init(size_t stack_space_size);
static void *task_stack_allocate(size_t stack_size);
+static void *task_stack_allocate_for_idle(uint32_t unused, size_t *stack_size);
+
static void task_stack_free(void *addr);
static void print_info(void)
@@ -117,13 +133,26 @@ static rtems_task Init(rtems_task_argument argument)
rtems_test_exit(0);
}
-#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+/*
+ * Avoid a dependency on errno which might be a thread-local object. This test
+ * assumes that no thread-local storage object is present.
+ */
+#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
+
+/*
+ * This test requires full control over the present thread-local objects. This
+ * is necessary for the custom stack allocator below. In certain Newlib
+ * configurations, the Newlib reentrancy support may add thread-local objects.
+ */
+#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
+
#define CONFIGURE_MAXIMUM_TASKS TASK_COUNT
#define CONFIGURE_TASK_STACK_ALLOCATOR_INIT task_stack_init
#define CONFIGURE_TASK_STACK_ALLOCATOR task_stack_allocate
+#define CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE task_stack_allocate_for_idle
#define CONFIGURE_TASK_STACK_DEALLOCATOR task_stack_free
#define CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE
#define CONFIGURE_TASK_STACK_FROM_ALLOCATOR(stack_size) \
@@ -158,6 +187,15 @@ static void *task_stack_allocate(size_t stack_size)
return _Heap_Allocate(&task_stack_heap, stack_size);
}
+static void *task_stack_allocate_for_idle(uint32_t unused, size_t *stack_size)
+{
+ return rtems_heap_allocate_aligned_with_boundary(
+ *stack_size,
+ CPU_STACK_ALIGNMENT,
+ 0
+ );
+}
+
static void task_stack_free(void *addr)
{
_Heap_Free(&task_stack_heap, addr);
diff --git a/testsuites/sptests/spstkalloc02/spstkalloc02.doc b/testsuites/sptests/spstkalloc02/spstkalloc02.doc
index a5e4e275b7..96cdfb52c2 100644
--- a/testsuites/sptests/spstkalloc02/spstkalloc02.doc
+++ b/testsuites/sptests/spstkalloc02/spstkalloc02.doc
@@ -1,13 +1,34 @@
-# Copyright (c) 2011 embedded brains GmbH.
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2011 embedded brains GmbH & Co. KG
+#
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
-test set name: spstkalloc01
+test set name: spstkalloc02
+
+The test expects that no thread-local object is present.
directives:
diff --git a/testsuites/sptests/spstkalloc03/init.c b/testsuites/sptests/spstkalloc03/init.c
index 348afe7328..5ee7de26ec 100644
--- a/testsuites/sptests/spstkalloc03/init.c
+++ b/testsuites/sptests/spstkalloc03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2021.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -68,12 +87,12 @@ static void thread_stacks_free(void *addr)
static void *thread_stacks_allocate_for_idle(
uint32_t cpu,
- size_t stack_size
+ size_t *stack_size
)
{
rtems_test_assert(thread_stacks_count == 0);
thread_stacks_count++;
- return allocate_helper(stack_size);
+ return allocate_helper(*stack_size);
}
/*
diff --git a/testsuites/sptests/spstkalloc03/spstkalloc03.doc b/testsuites/sptests/spstkalloc03/spstkalloc03.doc
index 797716b623..3dbedbf95b 100644
--- a/testsuites/sptests/spstkalloc03/spstkalloc03.doc
+++ b/testsuites/sptests/spstkalloc03/spstkalloc03.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2021.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spstkalloc04/init.c b/testsuites/sptests/spstkalloc04/init.c
index 16f4ec65ca..9678f6e00c 100644
--- a/testsuites/sptests/spstkalloc04/init.c
+++ b/testsuites/sptests/spstkalloc04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2021.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -50,12 +69,12 @@ static void *allocate_helper(size_t size)
static void *thread_stacks_allocate_for_idle(
uint32_t cpu,
- size_t stack_size
+ size_t *stack_size
)
{
rtems_test_assert(thread_stacks_count == 0);
thread_stacks_count++;
- return allocate_helper(stack_size);
+ return allocate_helper(*stack_size);
}
/*
diff --git a/testsuites/sptests/spstkalloc04/spstkalloc04.doc b/testsuites/sptests/spstkalloc04/spstkalloc04.doc
index a1ed5b22cb..bc64b3c4ca 100644
--- a/testsuites/sptests/spstkalloc04/spstkalloc04.doc
+++ b/testsuites/sptests/spstkalloc04/spstkalloc04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 2021.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spsysinit01/init.c b/testsuites/sptests/spsysinit01/init.c
index 13b4a1a802..f756dc7a23 100644
--- a/testsuites/sptests/spsysinit01/init.c
+++ b/testsuites/sptests/spsysinit01/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2015, 2020 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (C) 2015, 2020 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -347,13 +341,13 @@ LAST(RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE)
FIRST(RTEMS_SYSINIT_CLASSIC_SEMAPHORE)
{
- assert(_Semaphore_Information.initial_objects[0].id == 0);
+ assert(info_not_init(&_Semaphore_Information));
next_step(CLASSIC_SEMAPHORE_PRE);
}
LAST(RTEMS_SYSINIT_CLASSIC_SEMAPHORE)
{
- assert(_Semaphore_Information.initial_objects[0].id != 0);
+ assert(info_is_init(&_Semaphore_Information, 1));
next_step(CLASSIC_SEMAPHORE_POST);
}
@@ -914,7 +908,7 @@ static void do_posix_sem_open(void)
sem_t *sem;
int rv;
- sem = sem_open("sem", O_CREAT | O_RDWR, S_IRWXU | S_IRWXG | S_IRWXO);
+ sem = sem_open("sem", O_CREAT | O_RDWR, S_IRWXU | S_IRWXG | S_IRWXO, 0);
rtems_test_assert(sem != SEM_FAILED);
rv = sem_close(sem);
diff --git a/testsuites/sptests/spsyslock01/init.c b/testsuites/sptests/spsyslock01/init.c
index e667d98229..74e3d67530 100644
--- a/testsuites/sptests/spsyslock01/init.c
+++ b/testsuites/sptests/spsyslock01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2015, 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sptask_err01/init.c b/testsuites/sptests/sptask_err01/init.c
index b57e751aa6..b49645c4ea 100644
--- a/testsuites/sptests/sptask_err01/init.c
+++ b/testsuites/sptests/sptask_err01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sptask_err01/system.h b/testsuites/sptests/sptask_err01/system.h
index 4edc5aae04..7224f5fe25 100644
--- a/testsuites/sptests/sptask_err01/system.h
+++ b/testsuites/sptests/sptask_err01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sptask_err01/task2.c b/testsuites/sptests/sptask_err01/task2.c
index 5294f35720..c9065e4ae9 100644
--- a/testsuites/sptests/sptask_err01/task2.c
+++ b/testsuites/sptests/sptask_err01/task2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_2
*
* This routine serves as a test task. Its only purpose is to generate the
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sptask_err02/init.c b/testsuites/sptests/sptask_err02/init.c
index dfdaf396d0..b55bed4470 100644
--- a/testsuites/sptests/sptask_err02/init.c
+++ b/testsuites/sptests/sptask_err02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sptask_err02/system.h b/testsuites/sptests/sptask_err02/system.h
index 98fd96b6cf..c9e57a6c79 100644
--- a/testsuites/sptests/sptask_err02/system.h
+++ b/testsuites/sptests/sptask_err02/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sptask_err03/init.c b/testsuites/sptests/sptask_err03/init.c
index bda2cd4a1f..6f72ede180 100644
--- a/testsuites/sptests/sptask_err03/init.c
+++ b/testsuites/sptests/sptask_err03/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sptask_err03/system.h b/testsuites/sptests/sptask_err03/system.h
index eac27fc7a6..b399f71e8c 100644
--- a/testsuites/sptests/sptask_err03/system.h
+++ b/testsuites/sptests/sptask_err03/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sptask_err04/init.c b/testsuites/sptests/sptask_err04/init.c
index 197dff7f3e..a01e75c2f9 100644
--- a/testsuites/sptests/sptask_err04/init.c
+++ b/testsuites/sptests/sptask_err04/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sptask_err04/system.h b/testsuites/sptests/sptask_err04/system.h
index 91f16400c6..9cafac3aaf 100644
--- a/testsuites/sptests/sptask_err04/system.h
+++ b/testsuites/sptests/sptask_err04/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This include file contains information that is included in every
* function in the test set.
@@ -7,9 +9,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sptask_err04/task1.c b/testsuites/sptests/sptask_err04/task1.c
index c1f59d81fb..1743bc790b 100644
--- a/testsuites/sptests/sptask_err04/task1.c
+++ b/testsuites/sptests/sptask_err04/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This task generates all possible errors for the RTEMS executive.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -50,7 +69,7 @@ rtems_task Task_1(
puts( "TA1 - rtems_task_delete - RTEMS_INVALID_ID" );
/* NULL param */
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, NULL );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, NULL );
fatal_directive_status(
status,
RTEMS_INVALID_ADDRESS,
@@ -59,7 +78,7 @@ rtems_task Task_1(
puts( "TA1 - rtems_task_ident - RTEMS_INVALID_ADDRESS" );
/* OK */
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &self_id );
+ status = rtems_task_ident( RTEMS_WHO_AM_I, RTEMS_SEARCH_ALL_NODES, &self_id );
directive_failed( status, "rtems_task_ident of self" );
if ( self_id != Task_id[ 1 ] ) {
puts( "ERROR - rtems_task_ident - incorrect ID returned!" );
diff --git a/testsuites/sptests/sptasknopreempt01/init.c b/testsuites/sptests/sptasknopreempt01/init.c
index b2d6625c89..5828d602de 100644
--- a/testsuites/sptests/sptasknopreempt01/init.c
+++ b/testsuites/sptests/sptasknopreempt01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2015, 2022 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -24,12 +37,7 @@ static bool did_run;
static void do_not_run(rtems_task_argument arg)
{
-#if 0
rtems_test_assert(0);
-#else
- did_run = true;
- rtems_task_suspend(RTEMS_SELF);
-#endif
}
static void test(void)
@@ -51,9 +59,9 @@ static void test(void)
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
/*
- * This will start a pseudo interrupt task pre-empting the non-preemtive
- * executing task. Later the high priority do_not_run() task is scheduled.
- * See also https://devel.rtems.org/ticket/2365.
+ * This will start a task with a priority of PRIORITY_MINIMUM. Check that
+ * this task and the test task did not preempt the current task. See also
+ * https://devel.rtems.org/ticket/2365.
*/
sc = rtems_timer_initiate_server(
RTEMS_TIMER_SERVER_DEFAULT_PRIORITY,
@@ -62,8 +70,7 @@ static void test(void)
);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
- /* This is probably a bug and not a feature */
- rtems_test_assert(did_run);
+ rtems_test_assert(!did_run);
sc = rtems_task_delete(task);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
@@ -86,6 +93,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_INIT_TASK_PRIORITY 2
+#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT
+
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/sptests/spthread01/init.c b/testsuites/sptests/spthread01/init.c
index 9044ca2601..4baf0dba2f 100644
--- a/testsuites/sptests/spthread01/init.c
+++ b/testsuites/sptests/spthread01/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/testsuites/sptests/spthreadlife01/init.c b/testsuites/sptests/spthreadlife01/init.c
index a4fdd94bac..c33e8fef35 100644
--- a/testsuites/sptests/spthreadlife01/init.c
+++ b/testsuites/sptests/spthreadlife01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spthreadq01/init.c b/testsuites/sptests/spthreadq01/init.c
index 8af99408b8..bb6423ec4f 100644
--- a/testsuites/sptests/spthreadq01/init.c
+++ b/testsuites/sptests/spthreadq01/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * Copyright (c) 2016 embedded brains GmbH.
+ * Copyright (c) 2016 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spthreadq01/spthreadq01.doc b/testsuites/sptests/spthreadq01/spthreadq01.doc
index c3837af168..42f3c18369 100644
--- a/testsuites/sptests/spthreadq01/spthreadq01.doc
+++ b/testsuites/sptests/spthreadq01/spthreadq01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sptimecounter01/init.c b/testsuites/sptests/sptimecounter01/init.c
index dc601d7acb..ff5fe25a2d 100644
--- a/testsuites/sptests/sptimecounter01/init.c
+++ b/testsuites/sptests/sptimecounter01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015, 2019 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2015, 2019 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -23,6 +36,7 @@
#include <bsp/bootcard.h>
#include <rtems/score/timecounterimpl.h>
+#include <rtems/score/percpu.h>
#include <rtems/score/todimpl.h>
#include <rtems/timecounter.h>
#include <rtems/bsd.h>
@@ -42,6 +56,8 @@ typedef struct {
static test_context test_instance;
+static Thread_Control executing;
+
static uint32_t test_get_timecount(struct timecounter *tc)
{
test_context *ctx;
@@ -106,12 +122,17 @@ void boot_card(const char *cmdline)
struct bintime bt;
struct timeval tv;
struct timespec ts;
+ Per_CPU_Control *cpu_self;
ctx = &test_instance;
tc = &ctx->tc;
TEST_BEGIN();
+ cpu_self = _Per_CPU_Get();
+ cpu_self->executing = &executing;
+ cpu_self->heir = &executing;
+
assert(time(NULL) == TOD_SECONDS_1970_THROUGH_1988);
rtems_bsd_bintime(&bt);
@@ -196,11 +217,11 @@ void boot_card(const char *cmdline)
assert(bt.sec == 1);
assert(bt.frac == 18446744073708);
- /* Ensure that the fraction overflows and the second remains constant */
+ /* Check that a large delta yields a correct time */
ctx->counter = (0xf0000000 | 1) + TEST_FREQ;
rtems_bsd_binuptime(&bt);
assert(ctx->counter == (0xf0000000 | 2) + TEST_FREQ);
- assert(bt.sec == 1);
+ assert(bt.sec == 2);
assert(bt.frac == 18446742522092);
test_install(ctx);
diff --git a/testsuites/sptests/sptimecounter01/sptimecounter01.doc b/testsuites/sptests/sptimecounter01/sptimecounter01.doc
index 4a7442c2e6..85a236e68f 100644
--- a/testsuites/sptests/sptimecounter01/sptimecounter01.doc
+++ b/testsuites/sptests/sptimecounter01/sptimecounter01.doc
@@ -1,16 +1,27 @@
-/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (c) 2015 embedded brains GmbH & Co. KG
+#
+# 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 OWNER 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.
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sptimecounter02/init.c b/testsuites/sptests/sptimecounter02/init.c
index ffa53edfd8..ff05f147de 100644
--- a/testsuites/sptests/sptimecounter02/init.c
+++ b/testsuites/sptests/sptimecounter02/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2015, 2024 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -48,6 +61,8 @@ const char rtems_test_name[] = "SPTIMECOUNTER 2";
typedef struct {
rtems_test_parallel_context base;
+ const char *test_sep;
+ const char *counter_sep;
struct timecounter tc_null;
uint32_t binuptime_per_job[CPU_COUNT];
sbintime_t duration_per_job[CPU_COUNT];
@@ -77,6 +92,45 @@ static void install_tc_null(timecounter_context *ctx)
rtems_timecounter_install(tc_cpu);
}
+static void test_print_results(
+ const char *driver,
+ timecounter_context *ctx,
+ size_t active_workers
+)
+{
+ const char *value_sep;
+ size_t i;
+
+ if (active_workers == 1) {
+ printf(
+ "%s{\n"
+ " \"timecounter\": \"%s\",\n"
+ " \"counter\": [",
+ ctx->test_sep,
+ driver
+ );
+ ctx->test_sep = ", ";
+ ctx->counter_sep = "\n ";
+ }
+
+ printf("%s[", ctx->counter_sep);
+ ctx->counter_sep = "],\n ";
+ value_sep = "";
+
+ for (i = 0; i < active_workers; ++i) {
+ printf(
+ "%s%" PRIu32,
+ value_sep,
+ ctx->binuptime_per_job[i]
+ );
+ value_sep = ", ";
+ }
+
+ if (active_workers == rtems_scheduler_get_processor_maximum()) {
+ printf("]\n ]\n }");
+ }
+}
+
static rtems_interval test_bintime_init(
rtems_test_parallel_context *base,
void *arg,
@@ -120,25 +174,14 @@ static void test_bintime_fini(
timecounter_context *ctx = (timecounter_context *) base;
size_t i;
- printf(" <BinuptimeTest activeWorker=\"%zu\">\n", active_workers);
-
for (i = 0; i < active_workers; ++i) {
sbintime_t error;
- printf(
- " <Counter worker=\"%zu\">%" PRIu32 "</Counter>\n"
- " <Duration worker=\"%zu\" unit=\"sbintime\">%" PRId64 "</Duration>\n",
- i + 1,
- ctx->binuptime_per_job[i],
- i + 1,
- ctx->duration_per_job[i]
- );
-
error = DURATION_IN_SECONDS * SBT_1S - ctx->duration_per_job[i];
rtems_test_assert(error * error < SBT_1MS * SBT_1MS);
}
- printf(" </BinuptimeTest>\n");
+ test_print_results("Clock Driver", ctx, active_workers);
}
static rtems_interval test_bintime_null_init(
@@ -179,20 +222,7 @@ static void test_bintime_null_fini(
size_t active_workers
)
{
- timecounter_context *ctx = (timecounter_context *) base;
- size_t i;
-
- printf(" <BinuptimeNullTest activeWorker=\"%zu\">\n", active_workers);
-
- for (i = 0; i < active_workers; ++i) {
- printf(
- " <Counter worker=\"%zu\">%" PRIu32 "</Counter>\n",
- i + 1,
- ctx->binuptime_per_job[i]
- );
- }
-
- printf(" </BinuptimeNullTest>\n");
+ test_print_results("Null", (timecounter_context *) base, active_workers);
}
static const rtems_test_parallel_job timecounter_jobs[] = {
@@ -218,8 +248,9 @@ static void Init(rtems_task_argument arg)
TEST_BEGIN();
- printf("<SPTimecounter01>\n");
+ printf("*** BEGIN OF JSON DATA ***\n[\n ");
+ ctx->test_sep = "";
rtems_test_parallel(
&ctx->base,
NULL,
@@ -227,6 +258,8 @@ static void Init(rtems_task_argument arg)
RTEMS_ARRAY_SIZE(timecounter_jobs)
);
+ printf("\n]\n*** END OF JSON DATA ***\n");
+
/* Check for all functions available in the bsd.h user space */
rtems_bsd_bintime(&bt);
@@ -242,8 +275,6 @@ static void Init(rtems_task_argument arg)
rtems_bsd_getmicrouptime(&tv);
rtems_bsd_getnanouptime(&ts);
- printf("</SPTimecounter01>\n");
-
TEST_END();
rtems_test_exit(0);
}
diff --git a/testsuites/sptests/sptimecounter02/sptimecounter02.py b/testsuites/sptests/sptimecounter02/sptimecounter02.py
index 925b3f1d6c..198255c140 100755
--- a/testsuites/sptests/sptimecounter02/sptimecounter02.py
+++ b/testsuites/sptests/sptimecounter02/sptimecounter02.py
@@ -1,42 +1,59 @@
-#!/usr/bin/env python
+# SPDX-License-Identifier: BSD-2-Clause
+# Copyright (C) 2016, 2024 embedded brains GmbH & Co. KG
#
-# Copyright (c) 2016 embedded brains GmbH. All rights reserved.
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
+import json
import re
-import libxml2
-from libxml2 import xmlNode
-import matplotlib.pyplot as plt
-data = open('sptimecounter02.scn').read()
-data = re.sub(r'\*\*\*.*\*\*\*', '', data)
-doc = libxml2.parseDoc(data)
-ctx = doc.xpathNewContext()
-
-plt.title('Timestamp Performance')
-plt.xlabel('Active Workers')
-plt.ylabel('Operation Count')
-
-def m(n):
- return int(n.getContent())
-
-def getCounterSums(variant):
- w = 1
- y = []
- while True:
- c = map(m, ctx.xpathEval('/SPTimecounter01/' + variant + '[@activeWorker="' + str(w) + '"]/Counter'))
- if not c:
- break
- y.append(sum(c))
- w = w + 1
- return y
-
-y = getCounterSums('BinuptimeTest')
-x = range(1, len(y) + 1)
-plt.xticks(x)
-plt.plot(x, y, marker = 'o')
-plt.show()
+import matplotlib.pyplot as plt # type: ignore
+from matplotlib import ticker # type: ignore
+
+
+def _plot(data: dict) -> None:
+ _, axes = plt.subplots()
+ axes.set_title("Timestamp Performance")
+ axes.set_xlabel("Active Workers")
+ axes.set_ylabel("Operation Count")
+ x = list(range(1, len(data[0]["counter"]) + 1))
+ axes.xaxis.set_major_locator(ticker.FixedLocator(x))
+ for samples in data:
+ y = [sum(values) for values in samples["counter"]]
+ axes.plot(x,
+ y,
+ label=samples["timecounter"],
+ marker="o")
+ axes.legend(loc="best")
+ plt.savefig("sptimecounter02.png")
+ plt.savefig("sptimecounter02.pdf")
+ plt.close()
+
+
+_JSON_DATA = re.compile(
+ r"\*\*\* BEGIN OF JSON DATA \*\*\*(.*)"
+ r"\*\*\* END OF JSON DATA \*\*\*", re.DOTALL)
+
+with open("sptimecounter02.scn", "r", encoding="utf-8") as src:
+ match = _JSON_DATA.search(src.read())
+ data = json.loads(match.group(1))
+
+_plot(data)
diff --git a/testsuites/sptests/sptimecounter02/sptimecounter02.scn b/testsuites/sptests/sptimecounter02/sptimecounter02.scn
index 0ad38c6f4a..6acc521873 100644
--- a/testsuites/sptests/sptimecounter02/sptimecounter02.scn
+++ b/testsuites/sptests/sptimecounter02/sptimecounter02.scn
@@ -1,1000 +1,40 @@
+
+ SIS - SPARC/RISCV instruction simulator 2.30, copyright Jiri Gaisler 2020
+ Bug-reports to jiri@gaisler.se
+
+ GR740/LEON4 emulation enabled, 4 cpus online, delta 50 clocks
+
+ Loaded build/sparc/gr740/testsuites/sptests/sptimecounter02.exe, entry 0x00000000
+
+
*** BEGIN OF TEST SPTIMECOUNTER 2 ***
-<SPTimecounter01>
- <BinuptimeTest activeWorker="1">
- <Counter worker="1">5433429</Counter>
- <Duration worker="1" unit="sbintime">4291225979</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="2">
- <Counter worker="1">3832225</Counter>
- <Duration worker="1" unit="sbintime">4290792130</Duration>
- <Counter worker="2">3834316</Counter>
- <Duration worker="2" unit="sbintime">4290790869</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="3">
- <Counter worker="1">2557440</Counter>
- <Duration worker="1" unit="sbintime">4294943244</Duration>
- <Counter worker="2">2559261</Counter>
- <Duration worker="2" unit="sbintime">4294946681</Duration>
- <Counter worker="3">2559529</Counter>
- <Duration worker="3" unit="sbintime">4294943817</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="4">
- <Counter worker="1">1916358</Counter>
- <Duration worker="1" unit="sbintime">4291303174</Duration>
- <Counter worker="2">1918101</Counter>
- <Duration worker="2" unit="sbintime">4291303746</Duration>
- <Counter worker="3">1918236</Counter>
- <Duration worker="3" unit="sbintime">4291301112</Duration>
- <Counter worker="4">1918182</Counter>
- <Duration worker="4" unit="sbintime">4291303861</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="5">
- <Counter worker="1">1437861</Counter>
- <Duration worker="1" unit="sbintime">4292771136</Duration>
- <Counter worker="2">1439416</Counter>
- <Duration worker="2" unit="sbintime">4292769991</Duration>
- <Counter worker="3">1439361</Counter>
- <Duration worker="3" unit="sbintime">4292774000</Duration>
- <Counter worker="4">1439373</Counter>
- <Duration worker="4" unit="sbintime">4292773427</Duration>
- <Counter worker="5">1919046</Counter>
- <Duration worker="5" unit="sbintime">4292771480</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="6">
- <Counter worker="1">1278255</Counter>
- <Duration worker="1" unit="sbintime">4292980616</Duration>
- <Counter worker="2">1279690</Counter>
- <Duration worker="2" unit="sbintime">4292981762</Duration>
- <Counter worker="3">1279546</Counter>
- <Duration worker="3" unit="sbintime">4292978440</Duration>
- <Counter worker="4">1279558</Counter>
- <Duration worker="4" unit="sbintime">4292978096</Duration>
- <Counter worker="5">1279611</Counter>
- <Duration worker="5" unit="sbintime">4292980043</Duration>
- <Counter worker="6">1279619</Counter>
- <Duration worker="6" unit="sbintime">4292976150</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="7">
- <Counter worker="1">1022765</Counter>
- <Duration worker="1" unit="sbintime">4294000413</Duration>
- <Counter worker="2">1024240</Counter>
- <Duration worker="2" unit="sbintime">4294002246</Duration>
- <Counter worker="3">1024022</Counter>
- <Duration worker="3" unit="sbintime">4293998007</Duration>
- <Counter worker="4">1024036</Counter>
- <Duration worker="4" unit="sbintime">4293998924</Duration>
- <Counter worker="5">1024020</Counter>
- <Duration worker="5" unit="sbintime">4293998809</Duration>
- <Counter worker="6">1024010</Counter>
- <Duration worker="6" unit="sbintime">4293999382</Duration>
- <Counter worker="7">1535866</Counter>
- <Duration worker="7" unit="sbintime">4293999955</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="8">
- <Counter worker="1">958721</Counter>
- <Duration worker="1" unit="sbintime">4293767683</Duration>
- <Counter worker="2">960000</Counter>
- <Duration worker="2" unit="sbintime">4293768599</Duration>
- <Counter worker="3">960007</Counter>
- <Duration worker="3" unit="sbintime">4293764018</Duration>
- <Counter worker="4">960007</Counter>
- <Duration worker="4" unit="sbintime">4293764132</Duration>
- <Counter worker="5">960030</Counter>
- <Duration worker="5" unit="sbintime">4293764705</Duration>
- <Counter worker="6">960042</Counter>
- <Duration worker="6" unit="sbintime">4293764590</Duration>
- <Counter worker="7">960019</Counter>
- <Duration worker="7" unit="sbintime">4293768026</Duration>
- <Counter worker="8">959998</Counter>
- <Duration worker="8" unit="sbintime">4293763446</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="9">
- <Counter worker="1">942346</Counter>
- <Duration worker="1" unit="sbintime">4292128953</Duration>
- <Counter worker="2">943991</Counter>
- <Duration worker="2" unit="sbintime">4292136282</Duration>
- <Counter worker="3">940622</Counter>
- <Duration worker="3" unit="sbintime">4292123913</Duration>
- <Counter worker="4">940597</Counter>
- <Duration worker="4" unit="sbintime">4292128494</Duration>
- <Counter worker="5">941505</Counter>
- <Duration worker="5" unit="sbintime">4292126203</Duration>
- <Counter worker="6">941481</Counter>
- <Duration worker="6" unit="sbintime">4292126204</Duration>
- <Counter worker="7">944352</Counter>
- <Duration worker="7" unit="sbintime">4292126089</Duration>
- <Counter worker="8">944344</Counter>
- <Duration worker="8" unit="sbintime">4292126204</Duration>
- <Counter worker="9">5373049</Counter>
- <Duration worker="9" unit="sbintime">4292132044</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="10">
- <Counter worker="1">958924</Counter>
- <Duration worker="1" unit="sbintime">4292784422</Duration>
- <Counter worker="2">960306</Counter>
- <Duration worker="2" unit="sbintime">4292785452</Duration>
- <Counter worker="3">958656</Counter>
- <Duration worker="3" unit="sbintime">4292782704</Duration>
- <Counter worker="4">958632</Counter>
- <Duration worker="4" unit="sbintime">4292782704</Duration>
- <Counter worker="5">960299</Counter>
- <Duration worker="5" unit="sbintime">4292781444</Duration>
- <Counter worker="6">960321</Counter>
- <Duration worker="6" unit="sbintime">4292786026</Duration>
- <Counter worker="7">959742</Counter>
- <Duration worker="7" unit="sbintime">4292778810</Duration>
- <Counter worker="8">959726</Counter>
- <Duration worker="8" unit="sbintime">4292783162</Duration>
- <Counter worker="9">3835189</Counter>
- <Duration worker="9" unit="sbintime">4292783734</Duration>
- <Counter worker="10">3835159</Counter>
- <Duration worker="10" unit="sbintime">4292782475</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="11">
- <Counter worker="1">958317</Counter>
- <Duration worker="1" unit="sbintime">4292020376</Duration>
- <Counter worker="2">959720</Counter>
- <Duration worker="2" unit="sbintime">4292020490</Duration>
- <Counter worker="3">959141</Counter>
- <Duration worker="3" unit="sbintime">4292016024</Duration>
- <Counter worker="4">959171</Counter>
- <Duration worker="4" unit="sbintime">4292020376</Duration>
- <Counter worker="5">959183</Counter>
- <Duration worker="5" unit="sbintime">4292018199</Duration>
- <Counter worker="6">959176</Counter>
- <Duration worker="6" unit="sbintime">4292022666</Duration>
- <Counter worker="7">960245</Counter>
- <Duration worker="7" unit="sbintime">4292020376</Duration>
- <Counter worker="8">960256</Counter>
- <Duration worker="8" unit="sbintime">4292024041</Duration>
- <Counter worker="9">2556834</Counter>
- <Duration worker="9" unit="sbintime">4292019460</Duration>
- <Counter worker="10">2556892</Counter>
- <Duration worker="10" unit="sbintime">4292018314</Duration>
- <Counter worker="11">2556777</Counter>
- <Duration worker="11" unit="sbintime">4292018543</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="12">
- <Counter worker="1">958527</Counter>
- <Duration worker="1" unit="sbintime">4291119807</Duration>
- <Counter worker="2">959937</Counter>
- <Duration worker="2" unit="sbintime">4291119807</Duration>
- <Counter worker="3">959932</Counter>
- <Duration worker="3" unit="sbintime">4291120379</Duration>
- <Counter worker="4">959924</Counter>
- <Duration worker="4" unit="sbintime">4291120380</Duration>
- <Counter worker="5">959389</Counter>
- <Duration worker="5" unit="sbintime">4291120838</Duration>
- <Counter worker="6">959393</Counter>
- <Duration worker="6" unit="sbintime">4291123701</Duration>
- <Counter worker="7">958279</Counter>
- <Duration worker="7" unit="sbintime">4291118204</Duration>
- <Counter worker="8">958288</Counter>
- <Duration worker="8" unit="sbintime">4291118089</Duration>
- <Counter worker="9">1917514</Counter>
- <Duration worker="9" unit="sbintime">4291120609</Duration>
- <Counter worker="10">1917516</Counter>
- <Duration worker="10" unit="sbintime">4291118318</Duration>
- <Counter worker="11">1917496</Counter>
- <Duration worker="11" unit="sbintime">4291119463</Duration>
- <Counter worker="12">1917477</Counter>
- <Duration worker="12" unit="sbintime">4291116829</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="13">
- <Counter worker="1">957469</Counter>
- <Duration worker="1" unit="sbintime">4291772986</Duration>
- <Counter worker="2">958901</Counter>
- <Duration worker="2" unit="sbintime">4291772184</Duration>
- <Counter worker="3">959855</Counter>
- <Duration worker="3" unit="sbintime">4291766114</Duration>
- <Counter worker="4">959906</Counter>
- <Duration worker="4" unit="sbintime">4291770695</Duration>
- <Counter worker="5">959953</Counter>
- <Duration worker="5" unit="sbintime">4291779743</Duration>
- <Counter worker="6">959977</Counter>
- <Duration worker="6" unit="sbintime">4291769092</Duration>
- <Counter worker="7">959389</Counter>
- <Duration worker="7" unit="sbintime">4291770810</Duration>
- <Counter worker="8">959385</Counter>
- <Duration worker="8" unit="sbintime">4291766228</Duration>
- <Counter worker="9">1438521</Counter>
- <Duration worker="9" unit="sbintime">4291768748</Duration>
- <Counter worker="10">1438502</Counter>
- <Duration worker="10" unit="sbintime">4291768977</Duration>
- <Counter worker="11">1438548</Counter>
- <Duration worker="11" unit="sbintime">4291766687</Duration>
- <Counter worker="12">1438497</Counter>
- <Duration worker="12" unit="sbintime">4291770237</Duration>
- <Counter worker="13">1917953</Counter>
- <Duration worker="13" unit="sbintime">4291765999</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="14">
- <Counter worker="1">958554</Counter>
- <Duration worker="1" unit="sbintime">4293977506</Duration>
- <Counter worker="2">959986</Counter>
- <Duration worker="2" unit="sbintime">4293974643</Duration>
- <Counter worker="3">959942</Counter>
- <Duration worker="3" unit="sbintime">4293976246</Duration>
- <Counter worker="4">959946</Counter>
- <Duration worker="4" unit="sbintime">4293971894</Duration>
- <Counter worker="5">959422</Counter>
- <Duration worker="5" unit="sbintime">4293972467</Duration>
- <Counter worker="6">959466</Counter>
- <Duration worker="6" unit="sbintime">4293976819</Duration>
- <Counter worker="7">960436</Counter>
- <Duration worker="7" unit="sbintime">4293975216</Duration>
- <Counter worker="8">960437</Counter>
- <Duration worker="8" unit="sbintime">4293975216</Duration>
- <Counter worker="9">1280753</Counter>
- <Duration worker="9" unit="sbintime">4293970749</Duration>
- <Counter worker="10">1280760</Counter>
- <Duration worker="10" unit="sbintime">4293974529</Duration>
- <Counter worker="11">1278618</Counter>
- <Duration worker="11" unit="sbintime">4293975445</Duration>
- <Counter worker="12">1278603</Counter>
- <Duration worker="12" unit="sbintime">4293971665</Duration>
- <Counter worker="13">1278806</Counter>
- <Duration worker="13" unit="sbintime">4293971894</Duration>
- <Counter worker="14">1278798</Counter>
- <Duration worker="14" unit="sbintime">4293975673</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="15">
- <Counter worker="1">958175</Counter>
- <Duration worker="1" unit="sbintime">4291365823</Duration>
- <Counter worker="2">959788</Counter>
- <Duration worker="2" unit="sbintime">4291366969</Duration>
- <Counter worker="3">959270</Counter>
- <Duration worker="3" unit="sbintime">4291360783</Duration>
- <Counter worker="4">959251</Counter>
- <Duration worker="4" unit="sbintime">4291365250</Duration>
- <Counter worker="5">958544</Counter>
- <Duration worker="5" unit="sbintime">4291366854</Duration>
- <Counter worker="6">958536</Counter>
- <Duration worker="6" unit="sbintime">4291362502</Duration>
- <Counter worker="7">959264</Counter>
- <Duration worker="7" unit="sbintime">4291364105</Duration>
- <Counter worker="8">959249</Counter>
- <Duration worker="8" unit="sbintime">4291368571</Duration>
- <Counter worker="9">1021329</Counter>
- <Duration worker="9" unit="sbintime">4291362960</Duration>
- <Counter worker="10">1021315</Counter>
- <Duration worker="10" unit="sbintime">4291366854</Duration>
- <Counter worker="11">1022881</Counter>
- <Duration worker="11" unit="sbintime">4291367426</Duration>
- <Counter worker="12">1022857</Counter>
- <Duration worker="12" unit="sbintime">4291365135</Duration>
- <Counter worker="13">1022969</Counter>
- <Duration worker="13" unit="sbintime">4291365135</Duration>
- <Counter worker="14">1022963</Counter>
- <Duration worker="14" unit="sbintime">4291364677</Duration>
- <Counter worker="15">1536939</Counter>
- <Duration worker="15" unit="sbintime">4291362960</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="16">
- <Counter worker="1">958710</Counter>
- <Duration worker="1" unit="sbintime">4294622324</Duration>
- <Counter worker="2">960272</Counter>
- <Duration worker="2" unit="sbintime">4294611444</Duration>
- <Counter worker="3">960318</Counter>
- <Duration worker="3" unit="sbintime">4294610413</Duration>
- <Counter worker="4">960325</Counter>
- <Duration worker="4" unit="sbintime">4294610298</Duration>
- <Counter worker="5">957982</Counter>
- <Duration worker="5" unit="sbintime">4294606977</Duration>
- <Counter worker="6">958010</Counter>
- <Duration worker="6" unit="sbintime">4294611558</Duration>
- <Counter worker="7">960811</Counter>
- <Duration worker="7" unit="sbintime">4294608122</Duration>
- <Counter worker="8">960866</Counter>
- <Duration worker="8" unit="sbintime">4294608123</Duration>
- <Counter worker="9">956789</Counter>
- <Duration worker="9" unit="sbintime">4294606175</Duration>
- <Counter worker="10">956816</Counter>
- <Duration worker="10" unit="sbintime">4294610757</Duration>
- <Counter worker="11">961812</Counter>
- <Duration worker="11" unit="sbintime">4294611787</Duration>
- <Counter worker="12">961815</Counter>
- <Duration worker="12" unit="sbintime">4294610069</Duration>
- <Counter worker="13">959509</Counter>
- <Duration worker="13" unit="sbintime">4294610183</Duration>
- <Counter worker="14">959511</Counter>
- <Duration worker="14" unit="sbintime">4294610070</Duration>
- <Counter worker="15">960164</Counter>
- <Duration worker="15" unit="sbintime">4294612474</Duration>
- <Counter worker="16">960191</Counter>
- <Duration worker="16" unit="sbintime">4294607893</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="17">
- <Counter worker="1">944571</Counter>
- <Duration worker="1" unit="sbintime">4290823168</Duration>
- <Counter worker="2">946274</Counter>
- <Duration worker="2" unit="sbintime">4290823855</Duration>
- <Counter worker="3">945546</Counter>
- <Duration worker="3" unit="sbintime">4290821565</Duration>
- <Counter worker="4">945535</Counter>
- <Duration worker="4" unit="sbintime">4290821564</Duration>
- <Counter worker="5">943940</Counter>
- <Duration worker="5" unit="sbintime">4290819274</Duration>
- <Counter worker="6">943961</Counter>
- <Duration worker="6" unit="sbintime">4290823741</Duration>
- <Counter worker="7">945996</Counter>
- <Duration worker="7" unit="sbintime">4290821565</Duration>
- <Counter worker="8">945999</Counter>
- <Duration worker="8" unit="sbintime">4290821564</Duration>
- <Counter worker="9">944038</Counter>
- <Duration worker="9" unit="sbintime">4290823969</Duration>
- <Counter worker="10">944031</Counter>
- <Duration worker="10" unit="sbintime">4290819503</Duration>
- <Counter worker="11">944055</Counter>
- <Duration worker="11" unit="sbintime">4290824543</Duration>
- <Counter worker="12">944036</Counter>
- <Duration worker="12" unit="sbintime">4290820076</Duration>
- <Counter worker="13">945985</Counter>
- <Duration worker="13" unit="sbintime">4290821221</Duration>
- <Counter worker="14">945985</Counter>
- <Duration worker="14" unit="sbintime">4290821221</Duration>
- <Counter worker="15">946541</Counter>
- <Duration worker="15" unit="sbintime">4290819503</Duration>
- <Counter worker="16">946539</Counter>
- <Duration worker="16" unit="sbintime">4290819388</Duration>
- <Counter worker="17">5319165</Counter>
- <Duration worker="17" unit="sbintime">4290821221</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="18">
- <Counter worker="1">957435</Counter>
- <Duration worker="1" unit="sbintime">4292140979</Duration>
- <Counter worker="2">959052</Counter>
- <Duration worker="2" unit="sbintime">4292138230</Duration>
- <Counter worker="3">959020</Counter>
- <Duration worker="3" unit="sbintime">4292138115</Duration>
- <Counter worker="4">959034</Counter>
- <Duration worker="4" unit="sbintime">4292138230</Duration>
- <Counter worker="5">959057</Counter>
- <Duration worker="5" unit="sbintime">4292137199</Duration>
- <Counter worker="6">959078</Counter>
- <Duration worker="6" unit="sbintime">4292136969</Duration>
- <Counter worker="7">959758</Counter>
- <Duration worker="7" unit="sbintime">4292139375</Duration>
- <Counter worker="8">959770</Counter>
- <Duration worker="8" unit="sbintime">4292139261</Duration>
- <Counter worker="9">959102</Counter>
- <Duration worker="9" unit="sbintime">4292136855</Duration>
- <Counter worker="10">959101</Counter>
- <Duration worker="10" unit="sbintime">4292141322</Duration>
- <Counter worker="11">957493</Counter>
- <Duration worker="11" unit="sbintime">4292141322</Duration>
- <Counter worker="12">957490</Counter>
- <Duration worker="12" unit="sbintime">4292136741</Duration>
- <Counter worker="13">960923</Counter>
- <Duration worker="13" unit="sbintime">4292141895</Duration>
- <Counter worker="14">960933</Counter>
- <Duration worker="14" unit="sbintime">4292139146</Duration>
- <Counter worker="15">958227</Counter>
- <Duration worker="15" unit="sbintime">4292139032</Duration>
- <Counter worker="16">958201</Counter>
- <Duration worker="16" unit="sbintime">4292134565</Duration>
- <Counter worker="17">3833107</Counter>
- <Duration worker="17" unit="sbintime">4292138229</Duration>
- <Counter worker="18">3833100</Counter>
- <Duration worker="18" unit="sbintime">4292137085</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="19">
- <Counter worker="1">959131</Counter>
- <Duration worker="1" unit="sbintime">4295003603</Duration>
- <Counter worker="2">960752</Counter>
- <Duration worker="2" unit="sbintime">4295005321</Duration>
- <Counter worker="3">958958</Counter>
- <Duration worker="3" unit="sbintime">4295009444</Duration>
- <Counter worker="4">958960</Counter>
- <Duration worker="4" unit="sbintime">4295001312</Duration>
- <Counter worker="5">960052</Counter>
- <Duration worker="5" unit="sbintime">4295001771</Duration>
- <Counter worker="6">960086</Counter>
- <Duration worker="6" unit="sbintime">4295001885</Duration>
- <Counter worker="7">960031</Counter>
- <Duration worker="7" unit="sbintime">4295003603</Duration>
- <Counter worker="8">960043</Counter>
- <Duration worker="8" unit="sbintime">4294999021</Duration>
- <Counter worker="9">961650</Counter>
- <Duration worker="9" unit="sbintime">4295005435</Duration>
- <Counter worker="10">961687</Counter>
- <Duration worker="10" unit="sbintime">4295001885</Duration>
- <Counter worker="11">960613</Counter>
- <Duration worker="11" unit="sbintime">4295011276</Duration>
- <Counter worker="12">960593</Counter>
- <Duration worker="12" unit="sbintime">4295000854</Duration>
- <Counter worker="13">959538</Counter>
- <Duration worker="13" unit="sbintime">4295001427</Duration>
- <Counter worker="14">959574</Counter>
- <Duration worker="14" unit="sbintime">4295001427</Duration>
- <Counter worker="15">956810</Counter>
- <Duration worker="15" unit="sbintime">4295003717</Duration>
- <Counter worker="16">956818</Counter>
- <Duration worker="16" unit="sbintime">4295003603</Duration>
- <Counter worker="17">2557866</Counter>
- <Duration worker="17" unit="sbintime">4295002687</Duration>
- <Counter worker="18">2557901</Counter>
- <Duration worker="18" unit="sbintime">4295000969</Duration>
- <Counter worker="19">2557791</Counter>
- <Duration worker="19" unit="sbintime">4295000968</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="20">
- <Counter worker="1">956818</Counter>
- <Duration worker="1" unit="sbintime">4290849167</Duration>
- <Counter worker="2">958477</Counter>
- <Duration worker="2" unit="sbintime">4290849052</Duration>
- <Counter worker="3">959502</Counter>
- <Duration worker="3" unit="sbintime">4290848594</Duration>
- <Counter worker="4">959493</Counter>
- <Duration worker="4" unit="sbintime">4290848594</Duration>
- <Counter worker="5">959067</Counter>
- <Duration worker="5" unit="sbintime">4290848021</Duration>
- <Counter worker="6">959118</Counter>
- <Duration worker="6" unit="sbintime">4290848021</Duration>
- <Counter worker="7">958349</Counter>
- <Duration worker="7" unit="sbintime">4290853175</Duration>
- <Counter worker="8">958323</Counter>
- <Duration worker="8" unit="sbintime">4290846303</Duration>
- <Counter worker="9">957048</Counter>
- <Duration worker="9" unit="sbintime">4290847563</Duration>
- <Counter worker="10">957074</Counter>
- <Duration worker="10" unit="sbintime">4290847678</Duration>
- <Counter worker="11">960084</Counter>
- <Duration worker="11" unit="sbintime">4290846418</Duration>
- <Counter worker="12">960074</Counter>
- <Duration worker="12" unit="sbintime">4290846418</Duration>
- <Counter worker="13">959020</Counter>
- <Duration worker="13" unit="sbintime">4290845846</Duration>
- <Counter worker="14">959039</Counter>
- <Duration worker="14" unit="sbintime">4290850426</Duration>
- <Counter worker="15">958126</Counter>
- <Duration worker="15" unit="sbintime">4290845960</Duration>
- <Counter worker="16">958095</Counter>
- <Duration worker="16" unit="sbintime">4290845845</Duration>
- <Counter worker="17">1916573</Counter>
- <Duration worker="17" unit="sbintime">4290848136</Duration>
- <Counter worker="18">1916534</Counter>
- <Duration worker="18" unit="sbintime">4290845845</Duration>
- <Counter worker="19">1916572</Counter>
- <Duration worker="19" unit="sbintime">4290848136</Duration>
- <Counter worker="20">1916533</Counter>
- <Duration worker="20" unit="sbintime">4290845845</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="21">
- <Counter worker="1">958421</Counter>
- <Duration worker="1" unit="sbintime">4294761939</Duration>
- <Counter worker="2">960077</Counter>
- <Duration worker="2" unit="sbintime">4294760221</Duration>
- <Counter worker="3">959148</Counter>
- <Duration worker="3" unit="sbintime">4294754953</Duration>
- <Counter worker="4">959141</Counter>
- <Duration worker="4" unit="sbintime">4294759649</Duration>
- <Counter worker="5">959688</Counter>
- <Duration worker="5" unit="sbintime">4294754494</Duration>
- <Counter worker="6">959736</Counter>
- <Duration worker="6" unit="sbintime">4294759076</Duration>
- <Counter worker="7">960425</Counter>
- <Duration worker="7" unit="sbintime">4294760221</Duration>
- <Counter worker="8">960396</Counter>
- <Duration worker="8" unit="sbintime">4294755755</Duration>
- <Counter worker="9">958447</Counter>
- <Duration worker="9" unit="sbintime">4294756213</Duration>
- <Counter worker="10">958469</Counter>
- <Duration worker="10" unit="sbintime">4294756327</Duration>
- <Counter worker="11">960168</Counter>
- <Duration worker="11" unit="sbintime">4294759076</Duration>
- <Counter worker="12">960140</Counter>
- <Duration worker="12" unit="sbintime">4294754495</Duration>
- <Counter worker="13">961301</Counter>
- <Duration worker="13" unit="sbintime">4294767323</Duration>
- <Counter worker="14">961331</Counter>
- <Duration worker="14" unit="sbintime">4294756785</Duration>
- <Counter worker="15">958210</Counter>
- <Duration worker="15" unit="sbintime">4294757358</Duration>
- <Counter worker="16">958203</Counter>
- <Duration worker="16" unit="sbintime">4294757358</Duration>
- <Counter worker="17">1439060</Counter>
- <Duration worker="17" unit="sbintime">4294757931</Duration>
- <Counter worker="18">1439023</Counter>
- <Duration worker="18" unit="sbintime">4294758159</Duration>
- <Counter worker="19">1439103</Counter>
- <Duration worker="19" unit="sbintime">4294758045</Duration>
- <Counter worker="20">1439064</Counter>
- <Duration worker="20" unit="sbintime">4294757930</Duration>
- <Counter worker="21">1918367</Counter>
- <Duration worker="21" unit="sbintime">4294758045</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="22">
- <Counter worker="1">958582</Counter>
- <Duration worker="1" unit="sbintime">4291633485</Duration>
- <Counter worker="2">960264</Counter>
- <Duration worker="2" unit="sbintime">4291633599</Duration>
- <Counter worker="3">958919</Counter>
- <Duration worker="3" unit="sbintime">4291636921</Duration>
- <Counter worker="4">958961</Counter>
- <Duration worker="4" unit="sbintime">4291632912</Duration>
- <Counter worker="5">958913</Counter>
- <Duration worker="5" unit="sbintime">4291634631</Duration>
- <Counter worker="6">958982</Counter>
- <Duration worker="6" unit="sbintime">4291634630</Duration>
- <Counter worker="7">957838</Counter>
- <Duration worker="7" unit="sbintime">4291633027</Duration>
- <Counter worker="8">957849</Counter>
- <Duration worker="8" unit="sbintime">4291632912</Duration>
- <Counter worker="9">958935</Counter>
- <Duration worker="9" unit="sbintime">4291632340</Duration>
- <Counter worker="10">958978</Counter>
- <Duration worker="10" unit="sbintime">4291632455</Duration>
- <Counter worker="11">958040</Counter>
- <Duration worker="11" unit="sbintime">4291631194</Duration>
- <Counter worker="12">958060</Counter>
- <Duration worker="12" unit="sbintime">4291635203</Duration>
- <Counter worker="13">958031</Counter>
- <Duration worker="13" unit="sbintime">4291634745</Duration>
- <Counter worker="14">958035</Counter>
- <Duration worker="14" unit="sbintime">4291630163</Duration>
- <Counter worker="15">959809</Counter>
- <Duration worker="15" unit="sbintime">4291635776</Duration>
- <Counter worker="16">959833</Counter>
- <Duration worker="16" unit="sbintime">4291631309</Duration>
- <Counter worker="17">1278240</Counter>
- <Duration worker="17" unit="sbintime">4291631194</Duration>
- <Counter worker="18">1278239</Counter>
- <Duration worker="18" unit="sbintime">4291634745</Duration>
- <Counter worker="19">1278855</Counter>
- <Duration worker="19" unit="sbintime">4291629591</Duration>
- <Counter worker="20">1278855</Counter>
- <Duration worker="20" unit="sbintime">4291632913</Duration>
- <Counter worker="21">1277332</Counter>
- <Duration worker="21" unit="sbintime">4291632912</Duration>
- <Counter worker="22">1277327</Counter>
- <Duration worker="22" unit="sbintime">4291635891</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="23">
- <Counter worker="1">958870</Counter>
- <Duration worker="1" unit="sbintime">4294362908</Duration>
- <Counter worker="2">960652</Counter>
- <Duration worker="2" unit="sbintime">4294358327</Duration>
- <Counter worker="3">957192</Counter>
- <Duration worker="3" unit="sbintime">4294358327</Duration>
- <Counter worker="4">957194</Counter>
- <Duration worker="4" unit="sbintime">4294362793</Duration>
- <Counter worker="5">960437</Counter>
- <Duration worker="5" unit="sbintime">4294358900</Duration>
- <Counter worker="6">960480</Counter>
- <Duration worker="6" unit="sbintime">4294359014</Duration>
- <Counter worker="7">958820</Counter>
- <Duration worker="7" unit="sbintime">4294362908</Duration>
- <Counter worker="8">958835</Counter>
- <Duration worker="8" unit="sbintime">4294360045</Duration>
- <Counter worker="9">956488</Counter>
- <Duration worker="9" unit="sbintime">4294360617</Duration>
- <Counter worker="10">956549</Counter>
- <Duration worker="10" unit="sbintime">4294356151</Duration>
- <Counter worker="11">961870</Counter>
- <Duration worker="11" unit="sbintime">4294356151</Duration>
- <Counter worker="12">961835</Counter>
- <Duration worker="12" unit="sbintime">4294360732</Duration>
- <Counter worker="13">961302</Counter>
- <Duration worker="13" unit="sbintime">4294361191</Duration>
- <Counter worker="14">961345</Counter>
- <Duration worker="14" unit="sbintime">4294356724</Duration>
- <Counter worker="15">956489</Counter>
- <Duration worker="15" unit="sbintime">4294360045</Duration>
- <Counter worker="16">956506</Counter>
- <Duration worker="16" unit="sbintime">4294360160</Duration>
- <Counter worker="17">1021387</Counter>
- <Duration worker="17" unit="sbintime">4294356952</Duration>
- <Counter worker="18">1021417</Counter>
- <Duration worker="18" unit="sbintime">4294360961</Duration>
- <Counter worker="19">1021929</Counter>
- <Duration worker="19" unit="sbintime">4294359243</Duration>
- <Counter worker="20">1021926</Counter>
- <Duration worker="20" unit="sbintime">4294359930</Duration>
- <Counter worker="21">1024098</Counter>
- <Duration worker="21" unit="sbintime">4294358327</Duration>
- <Counter worker="22">1024083</Counter>
- <Duration worker="22" unit="sbintime">4294358098</Duration>
- <Counter worker="23">1537525</Counter>
- <Duration worker="23" unit="sbintime">4294361076</Duration>
- </BinuptimeTest>
- <BinuptimeTest activeWorker="24">
- <Counter worker="1">958462</Counter>
- <Duration worker="1" unit="sbintime">4294344239</Duration>
- <Counter worker="2">960113</Counter>
- <Duration worker="2" unit="sbintime">4294339773</Duration>
- <Counter worker="3">959461</Counter>
- <Duration worker="3" unit="sbintime">4294341949</Duration>
- <Counter worker="4">959473</Counter>
- <Duration worker="4" unit="sbintime">4294344812</Duration>
- <Counter worker="5">958912</Counter>
- <Duration worker="5" unit="sbintime">4294341490</Duration>
- <Counter worker="6">958938</Counter>
- <Duration worker="6" unit="sbintime">4294341376</Duration>
- <Counter worker="7">958935</Counter>
- <Duration worker="7" unit="sbintime">4294340230</Duration>
- <Counter worker="8">958921</Counter>
- <Duration worker="8" unit="sbintime">4294340345</Duration>
- <Counter worker="9">959876</Counter>
- <Duration worker="9" unit="sbintime">4294341491</Duration>
- <Counter worker="10">959892</Counter>
- <Duration worker="10" unit="sbintime">4294337138</Duration>
- <Counter worker="11">959045</Counter>
- <Duration worker="11" unit="sbintime">4294338284</Duration>
- <Counter worker="12">959020</Counter>
- <Duration worker="12" unit="sbintime">4294342636</Duration>
- <Counter worker="13">961635</Counter>
- <Duration worker="13" unit="sbintime">4294341033</Duration>
- <Counter worker="14">961646</Counter>
- <Duration worker="14" unit="sbintime">4294343782</Duration>
- <Counter worker="15">956010</Counter>
- <Duration worker="15" unit="sbintime">4294338856</Duration>
- <Counter worker="16">956016</Counter>
- <Duration worker="16" unit="sbintime">4294343208</Duration>
- <Counter worker="17">960207</Counter>
- <Duration worker="17" unit="sbintime">4294339887</Duration>
- <Counter worker="18">960171</Counter>
- <Duration worker="18" unit="sbintime">4294339772</Duration>
- <Counter worker="19">960089</Counter>
- <Duration worker="19" unit="sbintime">4294340346</Duration>
- <Counter worker="20">960077</Counter>
- <Duration worker="20" unit="sbintime">4294340346</Duration>
- <Counter worker="21">957194</Counter>
- <Duration worker="21" unit="sbintime">4294339315</Duration>
- <Counter worker="22">957184</Counter>
- <Duration worker="22" unit="sbintime">4294339200</Duration>
- <Counter worker="23">959119</Counter>
- <Duration worker="23" unit="sbintime">4294344812</Duration>
- <Counter worker="24">959094</Counter>
- <Duration worker="24" unit="sbintime">4294341948</Duration>
- </BinuptimeTest>
- <BinuptimeNullTest activeWorker="1">
- <Counter worker="1">19386783</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="2">
- <Counter worker="1">18966996</Counter>
- <Counter worker="2">18976413</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="3">
- <Counter worker="1">18974430</Counter>
- <Counter worker="2">18983328</Counter>
- <Counter worker="3">19416623</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="4">
- <Counter worker="1">19008674</Counter>
- <Counter worker="2">19018198</Counter>
- <Counter worker="3">19008964</Counter>
- <Counter worker="4">19008692</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="5">
- <Counter worker="1">19020812</Counter>
- <Counter worker="2">19030365</Counter>
- <Counter worker="3">19005570</Counter>
- <Counter worker="4">19005064</Counter>
- <Counter worker="5">19403356</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="6">
- <Counter worker="1">19022252</Counter>
- <Counter worker="2">19032184</Counter>
- <Counter worker="3">18989113</Counter>
- <Counter worker="4">18988868</Counter>
- <Counter worker="5">19032006</Counter>
- <Counter worker="6">19033563</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="7">
- <Counter worker="1">19030040</Counter>
- <Counter worker="2">19040103</Counter>
- <Counter worker="3">19027768</Counter>
- <Counter worker="4">19027395</Counter>
- <Counter worker="5">19032442</Counter>
- <Counter worker="6">19034065</Counter>
- <Counter worker="7">19412449</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="8">
- <Counter worker="1">19025699</Counter>
- <Counter worker="2">19035838</Counter>
- <Counter worker="3">19004615</Counter>
- <Counter worker="4">19004706</Counter>
- <Counter worker="5">19030244</Counter>
- <Counter worker="6">19032199</Counter>
- <Counter worker="7">19024756</Counter>
- <Counter worker="8">19023713</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="9">
- <Counter worker="1">19013669</Counter>
- <Counter worker="2">19023620</Counter>
- <Counter worker="3">19002201</Counter>
- <Counter worker="4">19002347</Counter>
- <Counter worker="5">19045897</Counter>
- <Counter worker="6">19048005</Counter>
- <Counter worker="7">19008510</Counter>
- <Counter worker="8">19007710</Counter>
- <Counter worker="9">19395234</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="10">
- <Counter worker="1">19027122</Counter>
- <Counter worker="2">19037161</Counter>
- <Counter worker="3">19009823</Counter>
- <Counter worker="4">19010172</Counter>
- <Counter worker="5">19038718</Counter>
- <Counter worker="6">19040747</Counter>
- <Counter worker="7">19031970</Counter>
- <Counter worker="8">19031243</Counter>
- <Counter worker="9">19073032</Counter>
- <Counter worker="10">19074455</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="11">
- <Counter worker="1">19028856</Counter>
- <Counter worker="2">19038950</Counter>
- <Counter worker="3">19011087</Counter>
- <Counter worker="4">19010918</Counter>
- <Counter worker="5">19042804</Counter>
- <Counter worker="6">19044814</Counter>
- <Counter worker="7">19009000</Counter>
- <Counter worker="8">19008045</Counter>
- <Counter worker="9">19062056</Counter>
- <Counter worker="10">19063324</Counter>
- <Counter worker="11">19425237</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="12">
- <Counter worker="1">19000686</Counter>
- <Counter worker="2">19010524</Counter>
- <Counter worker="3">19011200</Counter>
- <Counter worker="4">19011161</Counter>
- <Counter worker="5">19040651</Counter>
- <Counter worker="6">19042336</Counter>
- <Counter worker="7">19008991</Counter>
- <Counter worker="8">19008322</Counter>
- <Counter worker="9">19057966</Counter>
- <Counter worker="10">19059942</Counter>
- <Counter worker="11">19025294</Counter>
- <Counter worker="12">19024237</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="13">
- <Counter worker="1">19035788</Counter>
- <Counter worker="2">19045670</Counter>
- <Counter worker="3">19019672</Counter>
- <Counter worker="4">19019535</Counter>
- <Counter worker="5">19057435</Counter>
- <Counter worker="6">19059507</Counter>
- <Counter worker="7">19015462</Counter>
- <Counter worker="8">19015005</Counter>
- <Counter worker="9">19075133</Counter>
- <Counter worker="10">19076837</Counter>
- <Counter worker="11">19015711</Counter>
- <Counter worker="12">19014041</Counter>
- <Counter worker="13">19397278</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="14">
- <Counter worker="1">19042430</Counter>
- <Counter worker="2">19052163</Counter>
- <Counter worker="3">18991353</Counter>
- <Counter worker="4">18991104</Counter>
- <Counter worker="5">19055723</Counter>
- <Counter worker="6">19057975</Counter>
- <Counter worker="7">19037925</Counter>
- <Counter worker="8">19037320</Counter>
- <Counter worker="9">19093382</Counter>
- <Counter worker="10">19095573</Counter>
- <Counter worker="11">19013959</Counter>
- <Counter worker="12">19012664</Counter>
- <Counter worker="13">19047902</Counter>
- <Counter worker="14">19049501</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="15">
- <Counter worker="1">19031341</Counter>
- <Counter worker="2">19041295</Counter>
- <Counter worker="3">19021603</Counter>
- <Counter worker="4">19021349</Counter>
- <Counter worker="5">19070154</Counter>
- <Counter worker="6">19072132</Counter>
- <Counter worker="7">19012455</Counter>
- <Counter worker="8">19011763</Counter>
- <Counter worker="9">19078313</Counter>
- <Counter worker="10">19081070</Counter>
- <Counter worker="11">19007359</Counter>
- <Counter worker="12">19006010</Counter>
- <Counter worker="13">19079061</Counter>
- <Counter worker="14">19080701</Counter>
- <Counter worker="15">19419748</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="16">
- <Counter worker="1">19026392</Counter>
- <Counter worker="2">19036011</Counter>
- <Counter worker="3">19020535</Counter>
- <Counter worker="4">19020505</Counter>
- <Counter worker="5">19027761</Counter>
- <Counter worker="6">19029769</Counter>
- <Counter worker="7">19007387</Counter>
- <Counter worker="8">19006701</Counter>
- <Counter worker="9">19079449</Counter>
- <Counter worker="10">19081866</Counter>
- <Counter worker="11">19016942</Counter>
- <Counter worker="12">19015669</Counter>
- <Counter worker="13">19053837</Counter>
- <Counter worker="14">19056122</Counter>
- <Counter worker="15">19017232</Counter>
- <Counter worker="16">19015864</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="17">
- <Counter worker="1">19024720</Counter>
- <Counter worker="2">19034397</Counter>
- <Counter worker="3">19010358</Counter>
- <Counter worker="4">19009952</Counter>
- <Counter worker="5">19045360</Counter>
- <Counter worker="6">19047250</Counter>
- <Counter worker="7">19015505</Counter>
- <Counter worker="8">19014894</Counter>
- <Counter worker="9">19067467</Counter>
- <Counter worker="10">19069766</Counter>
- <Counter worker="11">19001455</Counter>
- <Counter worker="12">19000148</Counter>
- <Counter worker="13">19062397</Counter>
- <Counter worker="14">19064161</Counter>
- <Counter worker="15">18988213</Counter>
- <Counter worker="16">18986839</Counter>
- <Counter worker="17">19392710</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="18">
- <Counter worker="1">19014459</Counter>
- <Counter worker="2">19024385</Counter>
- <Counter worker="3">19004536</Counter>
- <Counter worker="4">19004360</Counter>
- <Counter worker="5">19059651</Counter>
- <Counter worker="6">19061446</Counter>
- <Counter worker="7">18995175</Counter>
- <Counter worker="8">18994526</Counter>
- <Counter worker="9">19069645</Counter>
- <Counter worker="10">19072049</Counter>
- <Counter worker="11">19020094</Counter>
- <Counter worker="12">19018465</Counter>
- <Counter worker="13">19084049</Counter>
- <Counter worker="14">19085700</Counter>
- <Counter worker="15">19010799</Counter>
- <Counter worker="16">19009469</Counter>
- <Counter worker="17">19062621</Counter>
- <Counter worker="18">19062665</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="19">
- <Counter worker="1">19027369</Counter>
- <Counter worker="2">19037193</Counter>
- <Counter worker="3">19017667</Counter>
- <Counter worker="4">19017624</Counter>
- <Counter worker="5">19025425</Counter>
- <Counter worker="6">19027799</Counter>
- <Counter worker="7">19017922</Counter>
- <Counter worker="8">19017381</Counter>
- <Counter worker="9">19029266</Counter>
- <Counter worker="10">19031825</Counter>
- <Counter worker="11">19025025</Counter>
- <Counter worker="12">19023564</Counter>
- <Counter worker="13">19057381</Counter>
- <Counter worker="14">19059412</Counter>
- <Counter worker="15">19025461</Counter>
- <Counter worker="16">19023734</Counter>
- <Counter worker="17">19049991</Counter>
- <Counter worker="18">19051542</Counter>
- <Counter worker="19">19418712</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="20">
- <Counter worker="1">19042934</Counter>
- <Counter worker="2">19052696</Counter>
- <Counter worker="3">19038771</Counter>
- <Counter worker="4">19038516</Counter>
- <Counter worker="5">19033526</Counter>
- <Counter worker="6">19035338</Counter>
- <Counter worker="7">19043236</Counter>
- <Counter worker="8">19042713</Counter>
- <Counter worker="9">19086859</Counter>
- <Counter worker="10">19089153</Counter>
- <Counter worker="11">19022766</Counter>
- <Counter worker="12">19021740</Counter>
- <Counter worker="13">19061402</Counter>
- <Counter worker="14">19063648</Counter>
- <Counter worker="15">19019723</Counter>
- <Counter worker="16">19018344</Counter>
- <Counter worker="17">19049944</Counter>
- <Counter worker="18">19051860</Counter>
- <Counter worker="19">19024515</Counter>
- <Counter worker="20">19024160</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="21">
- <Counter worker="1">19024204</Counter>
- <Counter worker="2">19034080</Counter>
- <Counter worker="3">19000776</Counter>
- <Counter worker="4">19000755</Counter>
- <Counter worker="5">19051386</Counter>
- <Counter worker="6">19053223</Counter>
- <Counter worker="7">18986331</Counter>
- <Counter worker="8">18985787</Counter>
- <Counter worker="9">19090476</Counter>
- <Counter worker="10">19093070</Counter>
- <Counter worker="11">19014901</Counter>
- <Counter worker="12">19013812</Counter>
- <Counter worker="13">19076062</Counter>
- <Counter worker="14">19077825</Counter>
- <Counter worker="15">19009098</Counter>
- <Counter worker="16">19007749</Counter>
- <Counter worker="17">19068241</Counter>
- <Counter worker="18">19070586</Counter>
- <Counter worker="19">18985454</Counter>
- <Counter worker="20">18984893</Counter>
- <Counter worker="21">19400999</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="22">
- <Counter worker="1">19031656</Counter>
- <Counter worker="2">19041556</Counter>
- <Counter worker="3">19002695</Counter>
- <Counter worker="4">19002754</Counter>
- <Counter worker="5">19077008</Counter>
- <Counter worker="6">19078695</Counter>
- <Counter worker="7">18989542</Counter>
- <Counter worker="8">18988653</Counter>
- <Counter worker="9">19044533</Counter>
- <Counter worker="10">19046959</Counter>
- <Counter worker="11">19004288</Counter>
- <Counter worker="12">19003156</Counter>
- <Counter worker="13">19062162</Counter>
- <Counter worker="14">19064009</Counter>
- <Counter worker="15">19034105</Counter>
- <Counter worker="16">19032889</Counter>
- <Counter worker="17">19067368</Counter>
- <Counter worker="18">19070169</Counter>
- <Counter worker="19">19008530</Counter>
- <Counter worker="20">19008397</Counter>
- <Counter worker="21">19037841</Counter>
- <Counter worker="22">19040158</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="23">
- <Counter worker="1">19019317</Counter>
- <Counter worker="2">19029201</Counter>
- <Counter worker="3">19010298</Counter>
- <Counter worker="4">19010487</Counter>
- <Counter worker="5">19030794</Counter>
- <Counter worker="6">19032697</Counter>
- <Counter worker="7">19001815</Counter>
- <Counter worker="8">19001431</Counter>
- <Counter worker="9">19067361</Counter>
- <Counter worker="10">19069729</Counter>
- <Counter worker="11">19001399</Counter>
- <Counter worker="12">19000051</Counter>
- <Counter worker="13">19070247</Counter>
- <Counter worker="14">19072221</Counter>
- <Counter worker="15">19020770</Counter>
- <Counter worker="16">19019396</Counter>
- <Counter worker="17">19085756</Counter>
- <Counter worker="18">19088597</Counter>
- <Counter worker="19">19014748</Counter>
- <Counter worker="20">19014660</Counter>
- <Counter worker="21">19044229</Counter>
- <Counter worker="22">19046314</Counter>
- <Counter worker="23">19421247</Counter>
- </BinuptimeNullTest>
- <BinuptimeNullTest activeWorker="24">
- <Counter worker="1">19016838</Counter>
- <Counter worker="2">19026664</Counter>
- <Counter worker="3">18978854</Counter>
- <Counter worker="4">18978559</Counter>
- <Counter worker="5">19034822</Counter>
- <Counter worker="6">19036646</Counter>
- <Counter worker="7">19006174</Counter>
- <Counter worker="8">19005608</Counter>
- <Counter worker="9">19042579</Counter>
- <Counter worker="10">19044966</Counter>
- <Counter worker="11">19007697</Counter>
- <Counter worker="12">19006331</Counter>
- <Counter worker="13">19053232</Counter>
- <Counter worker="14">19054892</Counter>
- <Counter worker="15">18999211</Counter>
- <Counter worker="16">18997906</Counter>
- <Counter worker="17">19065292</Counter>
- <Counter worker="18">19067828</Counter>
- <Counter worker="19">19014259</Counter>
- <Counter worker="20">19013886</Counter>
- <Counter worker="21">19047296</Counter>
- <Counter worker="22">19048410</Counter>
- <Counter worker="23">19017171</Counter>
- <Counter worker="24">19016766</Counter>
- </BinuptimeNullTest>
-</SPTimecounter01>
+*** TEST VERSION: 6.0.0.105c3e541c26113503080c65006ad775d31fca3d
+*** TEST STATE: EXPECTED_PASS
+*** TEST BUILD: RTEMS_SMP
+*** TEST TOOLS: 13.2.0 20230727 (RTEMS 6, RSB d3d738c35a71ca05f675b188539225099401ac79, Newlib a021448)
+*** BEGIN OF JSON DATA ***
+[
+ {
+ "timecounter": "Clock Driver",
+ "counter": [
+ [523086],
+ [523088, 528231],
+ [523088, 528232, 528231],
+ [523088, 528215, 528215, 527992]
+ ]
+ }, {
+ "timecounter": "Null",
+ "counter": [
+ [528630],
+ [528662, 533818],
+ [528684, 533839, 533840],
+ [528664, 533821, 533821, 533582]
+ ]
+ }
+]
+*** END OF JSON DATA ***
+
*** END OF TEST SPTIMECOUNTER 2 ***
+
+cpu 0 in error mode (tt = 0x80)
+ 400337050 00009120: 91d02000 ta 0x0
diff --git a/testsuites/sptests/sptimecounter03/init.c b/testsuites/sptests/sptimecounter03/init.c
index dd4c100b64..d1a9d58886 100644
--- a/testsuites/sptests/sptimecounter03/init.c
+++ b/testsuites/sptests/sptimecounter03/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -28,7 +41,7 @@ const char rtems_test_name[] = "SPTIMECOUNTER 3";
#define CPU_COUNT 32
-static rtems_test_parallel_context ctx;;
+static rtems_test_parallel_context ctx;
static rtems_interval test_binuptime_init(
rtems_test_parallel_context *ctx,
diff --git a/testsuites/sptests/sptimecounter04/init.c b/testsuites/sptests/sptimecounter04/init.c
index a0645a0895..2a8910b980 100644
--- a/testsuites/sptests/sptimecounter04/init.c
+++ b/testsuites/sptests/sptimecounter04/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sptimer_err01/init.c b/testsuites/sptests/sptimer_err01/init.c
index 1faa2e27fa..e99d9adaf0 100644
--- a/testsuites/sptests/sptimer_err01/init.c
+++ b/testsuites/sptests/sptimer_err01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sptimer_err01/sptimer_err01.doc b/testsuites/sptests/sptimer_err01/sptimer_err01.doc
index dd7569eb1b..deae69e46b 100644
--- a/testsuites/sptests/sptimer_err01/sptimer_err01.doc
+++ b/testsuites/sptests/sptimer_err01/sptimer_err01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sptimer_err02/init.c b/testsuites/sptests/sptimer_err02/init.c
index 365a9698a1..5b11518075 100644
--- a/testsuites/sptests/sptimer_err02/init.c
+++ b/testsuites/sptests/sptimer_err02/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sptimer_err02/sptimer_err02.doc b/testsuites/sptests/sptimer_err02/sptimer_err02.doc
index e13b4ec014..b0ec818dd5 100644
--- a/testsuites/sptests/sptimer_err02/sptimer_err02.doc
+++ b/testsuites/sptests/sptimer_err02/sptimer_err02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2013.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sptimerserver01/init.c b/testsuites/sptests/sptimerserver01/init.c
index ec95d158b4..b921806424 100644
--- a/testsuites/sptests/sptimerserver01/init.c
+++ b/testsuites/sptests/sptimerserver01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2016 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/sptimespec01/init.c b/testsuites/sptests/sptimespec01/init.c
index 53aba88bf2..916bc02f03 100644
--- a/testsuites/sptests/sptimespec01/init.c
+++ b/testsuites/sptests/sptimespec01/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (c) 2012.
* Krzysztof Miesowicz <krzysztof.miesowicz@gmail.com>
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/sptimespec01/sptimespec01.doc b/testsuites/sptests/sptimespec01/sptimespec01.doc
index 23af0fabba..408d45d1ce 100644
--- a/testsuites/sptests/sptimespec01/sptimespec01.doc
+++ b/testsuites/sptests/sptimespec01/sptimespec01.doc
@@ -1,12 +1,31 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
# Copyright (c) 2012
# Krzysztof Miesowicz
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/sptls01/init.c b/testsuites/sptests/sptls01/init.c
index 504ac272f0..d6beeedf90 100644
--- a/testsuites/sptests/sptls01/init.c
+++ b/testsuites/sptests/sptls01/init.c
@@ -1,22 +1,40 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2022 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include <stdio.h>
+#include <rtems/bspIo.h>
+#include <rtems/stackchk.h>
+#include <rtems/sysinit.h>
+#include <rtems/score/cpuimpl.h>
+#include <rtems/score/threadimpl.h>
+#include <rtems/score/tls.h>
#include "tmacros.h"
@@ -32,7 +50,7 @@ static const volatile uint32_t read_only_small = 0x601dc0feUL;
static void check_tls_item(uint32_t expected)
{
- printf("TLS item = %i\n", tls_item);
+ printk("TLS item = %i\n", tls_item);
rtems_test_assert(tls_item == expected);
}
@@ -41,6 +59,7 @@ static void task(rtems_task_argument arg)
rtems_status_code sc;
check_tls_item(123);
+ tls_item = 42;
sc = rtems_event_transient_send(master_task);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
@@ -49,10 +68,47 @@ static void task(rtems_task_argument arg)
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
}
+static void check_tls_size(void)
+{
+ const volatile TLS_Configuration *config;
+ uintptr_t tls_size;
+
+ config = &_TLS_Configuration;
+ tls_size = (uintptr_t) config->size;
+
+ if (tls_size != 1) {
+ printk(
+ "WARNING: The thread-local storage size is %" PRIuPTR ". It should be\n"
+ "exactly one for this test. Check the BSP implementation. The BSP\n"
+ "should not pull in thread-local storage objects such as errno for\n"
+ "this test.\n",
+ tls_size
+ );
+ rtems_test_assert(tls_size == 1);
+ }
+}
+
+static Thread_Control *get_thread(rtems_id id)
+{
+ Thread_Control *the_thread;
+ ISR_lock_Context lock_context;
+
+ the_thread = _Thread_Get(id, &lock_context);
+ _ISR_lock_ISR_enable(&lock_context);
+ return the_thread;
+}
+
static void test(void)
{
rtems_id id;
rtems_status_code sc;
+ Thread_Control *self;
+ Thread_Control *other;
+ char *self_tp;
+ char *other_tp;
+ uintptr_t tls_item_offset;
+ char *self_tls_item;
+ char *other_tls_item;
master_task = rtems_task_self();
@@ -75,28 +131,69 @@ static void test(void)
sc = rtems_task_start(id, task, 0);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ self = get_thread(master_task);
+ other = get_thread(id);
+ self_tp = _CPU_Get_TLS_thread_pointer(&self->Registers);
+ other_tp = _CPU_Get_TLS_thread_pointer(&other->Registers);
+ tls_item_offset = (uintptr_t) (&tls_item - self_tp);
+ self_tls_item = self_tp + tls_item_offset;
+ other_tls_item = other_tp + tls_item_offset;
+ rtems_test_assert(*self_tls_item == 5);
+ rtems_test_assert(*other_tls_item == 123);
+
sc = rtems_event_transient_receive(RTEMS_WAIT, RTEMS_NO_TIMEOUT);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+ rtems_test_assert(*self_tls_item == 5);
+ rtems_test_assert(*other_tls_item == 42);
+
sc = rtems_task_delete(id);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
check_tls_item(5);
}
-static void Init(rtems_task_argument arg)
+static void test_idle_during_system_init(void)
{
+ rtems_print_printer_printk(&rtems_test_printer);
TEST_BEGIN();
+ check_tls_item(123);
+}
+
+static void Init(rtems_task_argument arg)
+{
test();
+ rtems_test_assert(!rtems_stack_checker_is_blown());
+ check_tls_size();
TEST_END();
rtems_test_exit(0);
}
+RTEMS_SYSINIT_ITEM(
+ test_idle_during_system_init,
+ RTEMS_SYSINIT_IDLE_THREADS,
+ RTEMS_SYSINIT_ORDER_LAST
+);
+
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+
+/*
+ * Avoid a dependency on errno which might be a thread-local object. This test
+ * assumes that no thread-local storage object other than tls_item is present.
+ */
+#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
+
+/*
+ * This test requires full control over the present thread-local objects. In
+ * certain Newlib configurations, the Newlib reentrancy support may add
+ * thread-local objects.
+ */
+#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
+
+#define CONFIGURE_STACK_CHECKER_ENABLED
#define CONFIGURE_MAXIMUM_TASKS 2
diff --git a/testsuites/sptests/sptls02/init.cc b/testsuites/sptests/sptls02/init.cc
index 712358f978..28ce872d76 100644
--- a/testsuites/sptests/sptls02/init.cc
+++ b/testsuites/sptests/sptls02/init.cc
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
- * Copyright (C) 2014, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2014, 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -36,6 +36,7 @@
#include <rtems.h>
#include <rtems/libcsupport.h>
+#include <rtems/stackchk.h>
#include <tmacros.h>
@@ -47,7 +48,7 @@ alignas(256) static thread_local long a256 = 256;
static thread_local long i0;
-alignas(512) static thread_local long a512;
+alignas(RTEMS_MINIMUM_STACK_SIZE) static thread_local long a;
int seven()
{
@@ -60,7 +61,7 @@ static void clobber()
i123 = 0xdead0001;
a256 = 0xdead0002;
i0 = 0xdead0003;
- a512 = 0xdead0004;
+ a = 0xdead0004;
}
static long f456(bool clobber)
@@ -168,10 +169,14 @@ static void checkTLSValues()
rtems_test_assert(extern_int == 7);
rtems_test_assert(i123 == 123);
rtems_test_assert(a256 == 256);
- rtems_test_assert((a256 & 255) == 0);
+ uintptr_t addr = reinterpret_cast<uintptr_t>(&a256);
+ RTEMS_OBFUSCATE_VARIABLE(addr);
+ rtems_test_assert((addr % 256) == 0);
rtems_test_assert(i0 == 0);
- rtems_test_assert(a512 == 0);
- rtems_test_assert((a512 & 511) == 0);
+ rtems_test_assert(a == 0);
+ addr = reinterpret_cast<uintptr_t>(&a);
+ RTEMS_OBFUSCATE_VARIABLE(addr);
+ rtems_test_assert((addr % 512) == 0);
rtems_test_assert(f456(false) == 456);
rtems_test_assert(f0(false) == 0);
rtems_test_assert(C::c789() == 789);
@@ -288,6 +293,7 @@ extern "C" void Init(rtems_task_argument arg)
testWorkerTask();
rtems_test_assert(rtems_resource_snapshot_check(&snapshot));
+ rtems_test_assert(!rtems_stack_checker_is_blown());
TEST_END();
@@ -297,6 +303,8 @@ extern "C" void Init(rtems_task_argument arg)
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+#define CONFIGURE_STACK_CHECKER_ENABLED
+
#define CONFIGURE_MAXIMUM_TASKS 2
#define CONFIGURE_MAXIMUM_SEMAPHORES 3
diff --git a/testsuites/sptests/sptls02/sptls02.h b/testsuites/sptests/sptls02/sptls02.h
index b89750915d..4d9dfd5489 100644
--- a/testsuites/sptests/sptls02/sptls02.h
+++ b/testsuites/sptests/sptls02/sptls02.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/sptests/sptls02/var.cc b/testsuites/sptests/sptls02/var.cc
index ca885deb62..5f927d043b 100644
--- a/testsuites/sptests/sptls02/var.cc
+++ b/testsuites/sptests/sptls02/var.cc
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/testsuites/sptests/sptls03/init.c b/testsuites/sptests/sptls03/init.c
index ac46f068eb..4d564c0f85 100644
--- a/testsuites/sptests/sptls03/init.c
+++ b/testsuites/sptests/sptls03/init.c
@@ -1,21 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#include <rtems/stackchk.h>
#include <rtems/score/thread.h>
#include "tmacros.h"
@@ -42,13 +56,28 @@ static void Init(rtems_task_argument arg)
test();
+ rtems_test_assert(!rtems_stack_checker_is_blown());
TEST_END();
rtems_test_exit(0);
}
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+
+/*
+ * Avoid a dependency on errno which might be a thread-local object. This test
+ * assumes that no thread-local storage object is present.
+ */
+#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
+
+/*
+ * This test requires full control over the present thread-local objects. In
+ * certain Newlib configurations, the Newlib reentrancy support may add
+ * thread-local objects.
+ */
+#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
+
+#define CONFIGURE_STACK_CHECKER_ENABLED
#define CONFIGURE_MAXIMUM_TASKS 1
diff --git a/testsuites/sptests/sptls03/sptls03.doc b/testsuites/sptests/sptls03/sptls03.doc
index 2b92bcd091..a51e9c9175 100644
--- a/testsuites/sptests/sptls03/sptls03.doc
+++ b/testsuites/sptests/sptls03/sptls03.doc
@@ -2,6 +2,8 @@ This file describes the directives and concepts tested by this test set.
test set name: sptls03
+The test expects that no thread-local object is present.
+
directives:
- _Thread_Initialize()
diff --git a/testsuites/sptests/sptls04/init.c b/testsuites/sptests/sptls04/init.c
index d73b0f4642..bbbe81b9d1 100644
--- a/testsuites/sptests/sptls04/init.c
+++ b/testsuites/sptests/sptls04/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -15,7 +9,7 @@
/*
* This test program runs also on GNU/Linux and FreeBSD. Use
*
- * cc init.c && ./a.out
+ * cc init.c tls.c && ./a.out
*
* to run it.
*/
@@ -24,6 +18,8 @@
#include "config.h"
#endif
+#include "sptls04.h"
+
#ifdef __rtems__
#include <tmacros.h>
@@ -36,9 +32,9 @@
#endif /* __rtems__ */
-static __thread int i;
+static _Thread_local int i;
-static __thread int j;
+static _Thread_local int j;
static __attribute__((__constructor__)) void con(void)
{
@@ -49,6 +45,7 @@ static void test(void)
{
rtems_test_assert(i == 1);
rtems_test_assert(j == 0);
+ rtems_test_assert(k == 2);
}
#ifdef __rtems__
diff --git a/testsuites/sptests/sptls04/sptls04.h b/testsuites/sptests/sptls04/sptls04.h
new file mode 100644
index 0000000000..70e7f2a923
--- /dev/null
+++ b/testsuites/sptests/sptls04/sptls04.h
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifndef _SPTLS01_H
+#define _SPTLS01_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern _Thread_local int k;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SPTLS01_H */
diff --git a/testsuites/sptests/sptls04/tls.c b/testsuites/sptests/sptls04/tls.c
new file mode 100644
index 0000000000..ee473bca25
--- /dev/null
+++ b/testsuites/sptests/sptls04/tls.c
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "sptls04.h"
+
+_Thread_local int k = 2;
diff --git a/testsuites/sptests/spunlimited01/init.c b/testsuites/sptests/spunlimited01/init.c
new file mode 100644
index 0000000000..dc0496d441
--- /dev/null
+++ b/testsuites/sptests/spunlimited01/init.c
@@ -0,0 +1,125 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/heapimpl.h>
+
+#include <string.h>
+
+#include <rtems/test.h>
+#include <rtems/test-info.h>
+
+const char rtems_test_name[] = "SPUNLIMITED 1";
+
+void __real__Workspace_Free( void * );
+void __wrap__Workspace_Free( void * );
+
+void __wrap__Workspace_Free( void *ptr )
+{
+ uintptr_t alloc_begin;
+ uintptr_t block_size;
+ uintptr_t block_end;
+ Heap_Block *block;
+
+ if ( ptr == NULL ) {
+ return;
+ }
+
+ alloc_begin = (uintptr_t) ptr;
+ block = _Heap_Block_of_alloc_area( alloc_begin, CPU_HEAP_ALIGNMENT );
+ block_size = _Heap_Block_size( block );
+ block_end = (uintptr_t) block + block_size;
+ memset( ptr, 0, block_end - alloc_begin );
+
+ __real__Workspace_Free( ptr );
+}
+
+static void delete_mutex( rtems_id id )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_delete( id );
+ T_rsc_success( sc );
+}
+
+T_TEST_CASE( UnlimitedShrink )
+{
+ rtems_id ids[ 6 ];
+ size_t i;
+ rtems_status_code sc;
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( ids ); ++i ) {
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'U', 'T', 'X' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE,
+ 0,
+ &ids[ i ]
+ );
+ T_assert_rsc_success( sc );
+ }
+
+ sc = rtems_semaphore_obtain( ids[ 2 ], RTEMS_WAIT, RTEMS_NO_TIMEOUT );
+ T_rsc_success( sc );
+
+ delete_mutex( ids[ 5 ] );
+ delete_mutex( ids[ 4 ] );
+ delete_mutex( ids[ 3 ] );
+
+ sc = rtems_semaphore_release( ids[ 2 ] );
+ T_rsc_success( sc );
+
+ delete_mutex( ids[ 2 ] );
+ delete_mutex( ids[ 1 ] );
+ delete_mutex( ids[ 0 ] );
+}
+
+static rtems_task Init( rtems_task_argument argument )
+{
+ rtems_test_run( argument, TEST_STATE );
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_MAXIMUM_SEMAPHORES rtems_resource_unlimited( 2 )
+
+#define CONFIGURE_UNIFIED_WORK_AREAS
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/sptests/spunlimited01/spunlimited01.doc b/testsuites/sptests/spunlimited01/spunlimited01.doc
new file mode 100644
index 0000000000..43d3ec1646
--- /dev/null
+++ b/testsuites/sptests/spunlimited01/spunlimited01.doc
@@ -0,0 +1,14 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: spunlimited01
+
+directives:
+
+ - _Objects_Activate_unlimited()
+ - _Objects_Free_unlimited()
+
+concepts:
+
+ - Create and delete objects with the unlimited objects support in a certain
+ order. Ensure that only blocks with free objects are reclaimed during a
+ shrink operation.
diff --git a/testsuites/sptests/spversion01/init.c b/testsuites/sptests/spversion01/init.c
index 9db3143d39..5ceadece86 100644
--- a/testsuites/sptests/spversion01/init.c
+++ b/testsuites/sptests/spversion01/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spversion01/spversion01.doc b/testsuites/sptests/spversion01/spversion01.doc
index c0783a4351..aac2b76813 100644
--- a/testsuites/sptests/spversion01/spversion01.doc
+++ b/testsuites/sptests/spversion01/spversion01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# Copyright (C) 2017
# Chris Johns <chrisj@rtems.org>
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spwatchdog/delay.c b/testsuites/sptests/spwatchdog/delay.c
index 58ad6dc1da..7863800687 100644
--- a/testsuites/sptests/spwatchdog/delay.c
+++ b/testsuites/sptests/spwatchdog/delay.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Delayed_resume
*
* This routine is scheduled to be fired as a timer service routine.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spwatchdog/init.c b/testsuites/sptests/spwatchdog/init.c
index 555d52d19f..babe440649 100644
--- a/testsuites/sptests/spwatchdog/init.c
+++ b/testsuites/sptests/spwatchdog/init.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Init
*
* This routine is the XXX.
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 2008.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spwatchdog/prtime.c b/testsuites/sptests/spwatchdog/prtime.c
index 865e0fe0d3..9f9d2c463b 100644
--- a/testsuites/sptests/spwatchdog/prtime.c
+++ b/testsuites/sptests/spwatchdog/prtime.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Print_time
*
* This routine prints the name of Task_1 and the current time of day.
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spwatchdog/spwatchdog.doc b/testsuites/sptests/spwatchdog/spwatchdog.doc
index b8080b2ea5..a0cbbc0b37 100644
--- a/testsuites/sptests/spwatchdog/spwatchdog.doc
+++ b/testsuites/sptests/spwatchdog/spwatchdog.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/spwatchdog/system.h b/testsuites/sptests/spwatchdog/system.h
index 40b7777faa..51b6b340de 100644
--- a/testsuites/sptests/spwatchdog/system.h
+++ b/testsuites/sptests/spwatchdog/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file contains information that is included in every
@@ -6,9 +8,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/sptests/spwatchdog/task1.c b/testsuites/sptests/spwatchdog/task1.c
index 568ad86197..c399055a39 100644
--- a/testsuites/sptests/spwatchdog/task1.c
+++ b/testsuites/sptests/spwatchdog/task1.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* Task_1
*
* This routine serves as a test task. XXX
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spwkspace/init.c b/testsuites/sptests/spwkspace/init.c
index d9f01b1e48..052c46f59c 100644
--- a/testsuites/sptests/spwkspace/init.c
+++ b/testsuites/sptests/spwkspace/init.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Exercise Classic API Workspace Wrappers
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/sptests/spwkspace/spwkspace.doc b/testsuites/sptests/spwkspace/spwkspace.doc
index 7a96334b3f..9944973628 100644
--- a/testsuites/sptests/spwkspace/spwkspace.doc
+++ b/testsuites/sptests/spwkspace/spwkspace.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This file describes the directives and concepts tested by this test set.
diff --git a/testsuites/sptests/x b/testsuites/sptests/x
new file mode 100644
index 0000000000..30cea793db
--- /dev/null
+++ b/testsuites/sptests/x
@@ -0,0 +1,4 @@
+sp27/sp27impl.h
+sp42/init.c
+sp43/init.c
+sp48/init.c
diff --git a/testsuites/support/include/buffer_test_io.h b/testsuites/support/include/buffer_test_io.h
index f0eae50fbd..840dd5102a 100644
--- a/testsuites/support/include/buffer_test_io.h
+++ b/testsuites/support/include/buffer_test_io.h
@@ -1,3 +1,39 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup support
+ *
+ * @brief This is the buffer_test_io header file.
+ */
+
+/*
+ * Copyright (C) 1989-2011 On-Line Applications Research Corporation (OAR).
+ * Copyright (C) 2011 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ *
+ * 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 OWNER 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.
+ */
+
/*
* Support for running the test output through a buffer
*/
diff --git a/testsuites/support/include/test_support.h b/testsuites/support/include/test_support.h
index 9c30b3967e..4ddfe38896 100644
--- a/testsuites/support/include/test_support.h
+++ b/testsuites/support/include/test_support.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef __TEST_SUPPORT_h
diff --git a/testsuites/support/include/tmacros.h b/testsuites/support/include/tmacros.h
index fe17bc01e7..aa20411623 100644
--- a/testsuites/support/include/tmacros.h
+++ b/testsuites/support/include/tmacros.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -9,9 +11,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifndef __TMACROS_h
@@ -27,6 +46,7 @@
#include <string.h>
#include <rtems/error.h>
#include <rtems/test-info.h>
+#include <rtems/test-printer.h>
#include <rtems/score/threaddispatch.h>
#include <buffer_test_io.h>
diff --git a/testsuites/support/include/tmtests_empty_function.h b/testsuites/support/include/tmtests_empty_function.h
index a47df619c6..6c89316676 100644
--- a/testsuites/support/include/tmtests_empty_function.h
+++ b/testsuites/support/include/tmtests_empty_function.h
@@ -2,7 +2,7 @@
* Prototypes for RTEMS tmtests_empty_function.c.
*
* COPYRIGHT (c) 2011, Ralf Corsépius, Ulm/Germany.
- *
+ *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
diff --git a/testsuites/support/src/locked_print.c b/testsuites/support/src/locked_print.c
index f80f74f9d8..c85f7ce328 100644
--- a/testsuites/support/src/locked_print.c
+++ b/testsuites/support/src/locked_print.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/support/src/spin.c b/testsuites/support/src/spin.c
index 57c4e323d5..58cc0f728f 100644
--- a/testsuites/support/src/spin.c
+++ b/testsuites/support/src/spin.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/support/src/test_support.c b/testsuites/support/src/test_support.c
index 95a46b6d90..1e5ee0eee4 100644
--- a/testsuites/support/src/test_support.c
+++ b/testsuites/support/src/test_support.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/support/src/tmtests_empty_function.c b/testsuites/support/src/tmtests_empty_function.c
index 2586c7ebe6..e1834d2468 100644
--- a/testsuites/support/src/tmtests_empty_function.c
+++ b/testsuites/support/src/tmtests_empty_function.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This file implements an empty function used by the RTEMS Timing Tests
* to set a baseline for loop overhead.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/support/src/tmtests_support.c b/testsuites/support/src/tmtests_support.c
index a6230ab13c..9fb0c89ce7 100644
--- a/testsuites/support/src/tmtests_support.c
+++ b/testsuites/support/src/tmtests_support.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/tmtests/include/timesys.h b/testsuites/tmtests/include/timesys.h
index 9e984fd0b0..0543329dd1 100644
--- a/testsuites/tmtests/include/timesys.h
+++ b/testsuites/tmtests/include/timesys.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
* @brief Timing Test Support
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#include <tmacros.h>
diff --git a/testsuites/tmtests/tm01/system.h b/testsuites/tmtests/tm01/system.h
index d5f4db8745..d5f60d3c83 100644
--- a/testsuites/tmtests/tm01/system.h
+++ b/testsuites/tmtests/tm01/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -31,7 +50,6 @@ rtems_id Task_id[ OPERATION_COUNT+1 ]; /* array of task ids */
#define CONFIGURE_MAXIMUM_TASKS 2
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm01/task1.c b/testsuites/tmtests/tm01/task1.c
index 052c1455a8..4e8d3c8019 100644
--- a/testsuites/tmtests/tm01/task1.c
+++ b/testsuites/tmtests/tm01/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm01/tm01.doc b/testsuites/tmtests/tm01/tm01.doc
index 9ca4465644..cc1da565ab 100644
--- a/testsuites/tmtests/tm01/tm01.doc
+++ b/testsuites/tmtests/tm01/tm01.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm02/system.h b/testsuites/tmtests/tm02/system.h
index 11f1916973..66d3912f5a 100644
--- a/testsuites/tmtests/tm02/system.h
+++ b/testsuites/tmtests/tm02/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -28,7 +47,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS (3 + OPERATION_COUNT)
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm02/task1.c b/testsuites/tmtests/tm02/task1.c
index c77039068e..9eb19d0f18 100644
--- a/testsuites/tmtests/tm02/task1.c
+++ b/testsuites/tmtests/tm02/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup tmtests
+ *
+ * @brief This is task1 for the tm02 test.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define TM02
#include "tm02impl.h"
diff --git a/testsuites/tmtests/tm02/tm02.doc b/testsuites/tmtests/tm02/tm02.doc
index ed9aac09ac..eb3c4d9c9a 100644
--- a/testsuites/tmtests/tm02/tm02.doc
+++ b/testsuites/tmtests/tm02/tm02.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm02/tm02impl.h b/testsuites/tmtests/tm02/tm02impl.h
index 5a08600f9b..0151c1f369 100644
--- a/testsuites/tmtests/tm02/tm02impl.h
+++ b/testsuites/tmtests/tm02/tm02impl.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm03/system.h b/testsuites/tmtests/tm03/system.h
index 11f1916973..66d3912f5a 100644
--- a/testsuites/tmtests/tm03/system.h
+++ b/testsuites/tmtests/tm03/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -28,7 +47,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS (3 + OPERATION_COUNT)
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm03/task1.c b/testsuites/tmtests/tm03/task1.c
index 88c13f3b64..69e76ac6a0 100644
--- a/testsuites/tmtests/tm03/task1.c
+++ b/testsuites/tmtests/tm03/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup tmtests
+ *
+ * @brief This is task1 for the tm03 test.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define TM03
#include "tm03impl.h"
diff --git a/testsuites/tmtests/tm03/tm03.doc b/testsuites/tmtests/tm03/tm03.doc
index 3d1ea9d4ef..79457a49dc 100644
--- a/testsuites/tmtests/tm03/tm03.doc
+++ b/testsuites/tmtests/tm03/tm03.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm03/tm03impl.h b/testsuites/tmtests/tm03/tm03impl.h
index 9140695a71..e1781969b6 100644
--- a/testsuites/tmtests/tm03/tm03impl.h
+++ b/testsuites/tmtests/tm03/tm03impl.h
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm04/system.h b/testsuites/tmtests/tm04/system.h
index bca9c4e081..a330fde825 100644
--- a/testsuites/tmtests/tm04/system.h
+++ b/testsuites/tmtests/tm04/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -28,7 +47,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS (4 + OPERATION_COUNT)
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm04/task1.c b/testsuites/tmtests/tm04/task1.c
index d99ade58bd..6fe93030a5 100644
--- a/testsuites/tmtests/tm04/task1.c
+++ b/testsuites/tmtests/tm04/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm04/tm04.doc b/testsuites/tmtests/tm04/tm04.doc
index d77b7bbe1e..c120f5061d 100644
--- a/testsuites/tmtests/tm04/tm04.doc
+++ b/testsuites/tmtests/tm04/tm04.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm05/system.h b/testsuites/tmtests/tm05/system.h
index d56e17903a..28263f3051 100644
--- a/testsuites/tmtests/tm05/system.h
+++ b/testsuites/tmtests/tm05/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -27,7 +46,6 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT)
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm05/task1.c b/testsuites/tmtests/tm05/task1.c
index f385088ee4..541919ca93 100644
--- a/testsuites/tmtests/tm05/task1.c
+++ b/testsuites/tmtests/tm05/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/tmtests/tm05/tm05.doc b/testsuites/tmtests/tm05/tm05.doc
index 5e0bf1b6f1..20842f3156 100644
--- a/testsuites/tmtests/tm05/tm05.doc
+++ b/testsuites/tmtests/tm05/tm05.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm06/system.h b/testsuites/tmtests/tm06/system.h
index d56e17903a..28263f3051 100644
--- a/testsuites/tmtests/tm06/system.h
+++ b/testsuites/tmtests/tm06/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -27,7 +46,6 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT)
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm06/task1.c b/testsuites/tmtests/tm06/task1.c
index 81588005a4..480223ea3f 100644
--- a/testsuites/tmtests/tm06/task1.c
+++ b/testsuites/tmtests/tm06/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm06/tm06.doc b/testsuites/tmtests/tm06/tm06.doc
index 7263a33695..81949d09a9 100644
--- a/testsuites/tmtests/tm06/tm06.doc
+++ b/testsuites/tmtests/tm06/tm06.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm07/system.h b/testsuites/tmtests/tm07/system.h
index d56e17903a..28263f3051 100644
--- a/testsuites/tmtests/tm07/system.h
+++ b/testsuites/tmtests/tm07/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -27,7 +46,6 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT)
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm07/task1.c b/testsuites/tmtests/tm07/task1.c
index 84acbb8e0d..60107608bc 100644
--- a/testsuites/tmtests/tm07/task1.c
+++ b/testsuites/tmtests/tm07/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm07/tm07.doc b/testsuites/tmtests/tm07/tm07.doc
index efbcfd2c21..5553f6b0ba 100644
--- a/testsuites/tmtests/tm07/tm07.doc
+++ b/testsuites/tmtests/tm07/tm07.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm08/system.h b/testsuites/tmtests/tm08/system.h
index 77eb08b602..7d642bd0a8 100644
--- a/testsuites/tmtests/tm08/system.h
+++ b/testsuites/tmtests/tm08/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -27,7 +46,6 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 3
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm08/task1.c b/testsuites/tmtests/tm08/task1.c
index f7cf987070..a7d5f1eff1 100644
--- a/testsuites/tmtests/tm08/task1.c
+++ b/testsuites/tmtests/tm08/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm08/tm08.doc b/testsuites/tmtests/tm08/tm08.doc
index e364a58dc3..5b4a119b64 100644
--- a/testsuites/tmtests/tm08/tm08.doc
+++ b/testsuites/tmtests/tm08/tm08.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm09/system.h b/testsuites/tmtests/tm09/system.h
index 76a97511ed..da2da0b2ec 100644
--- a/testsuites/tmtests/tm09/system.h
+++ b/testsuites/tmtests/tm09/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -32,7 +51,6 @@ rtems_id Task_id[ OPERATION_COUNT+1 ]; /* array of task ids */
#define CONFIGURE_MAXIMUM_TASKS 2
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(OPERATION_COUNT, MESSAGE_SIZE)
diff --git a/testsuites/tmtests/tm09/task1.c b/testsuites/tmtests/tm09/task1.c
index c95fdd6d72..16481fed88 100644
--- a/testsuites/tmtests/tm09/task1.c
+++ b/testsuites/tmtests/tm09/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm09/tm09.doc b/testsuites/tmtests/tm09/tm09.doc
index 3a44e10eff..4546c85d95 100644
--- a/testsuites/tmtests/tm09/tm09.doc
+++ b/testsuites/tmtests/tm09/tm09.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm10/system.h b/testsuites/tmtests/tm10/system.h
index c4c8161ffb..e4c296f625 100644
--- a/testsuites/tmtests/tm10/system.h
+++ b/testsuites/tmtests/tm10/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -28,7 +47,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT)
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(OPERATION_COUNT, 16)
diff --git a/testsuites/tmtests/tm10/task1.c b/testsuites/tmtests/tm10/task1.c
index 137507beb2..001bc00645 100644
--- a/testsuites/tmtests/tm10/task1.c
+++ b/testsuites/tmtests/tm10/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm10/tm10.doc b/testsuites/tmtests/tm10/tm10.doc
index 863032a955..e5eba8acb6 100644
--- a/testsuites/tmtests/tm10/tm10.doc
+++ b/testsuites/tmtests/tm10/tm10.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm11/system.h b/testsuites/tmtests/tm11/system.h
index a03bcda70e..9a2fc14aab 100644
--- a/testsuites/tmtests/tm11/system.h
+++ b/testsuites/tmtests/tm11/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -28,7 +47,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS (3 + OPERATION_COUNT)
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm11/task1.c b/testsuites/tmtests/tm11/task1.c
index c51c66a881..cb4a586410 100644
--- a/testsuites/tmtests/tm11/task1.c
+++ b/testsuites/tmtests/tm11/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm11/tm11.doc b/testsuites/tmtests/tm11/tm11.doc
index b8da594f01..6506b23518 100644
--- a/testsuites/tmtests/tm11/tm11.doc
+++ b/testsuites/tmtests/tm11/tm11.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm12/system.h b/testsuites/tmtests/tm12/system.h
index a03bcda70e..9a2fc14aab 100644
--- a/testsuites/tmtests/tm12/system.h
+++ b/testsuites/tmtests/tm12/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -28,7 +47,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS (3 + OPERATION_COUNT)
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm12/task1.c b/testsuites/tmtests/tm12/task1.c
index aa756f1ebf..38007e10d4 100644
--- a/testsuites/tmtests/tm12/task1.c
+++ b/testsuites/tmtests/tm12/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm12/tm12.doc b/testsuites/tmtests/tm12/tm12.doc
index b8da594f01..6506b23518 100644
--- a/testsuites/tmtests/tm12/tm12.doc
+++ b/testsuites/tmtests/tm12/tm12.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm13/system.h b/testsuites/tmtests/tm13/system.h
index a03bcda70e..9a2fc14aab 100644
--- a/testsuites/tmtests/tm13/system.h
+++ b/testsuites/tmtests/tm13/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -28,7 +47,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS (3 + OPERATION_COUNT)
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm13/task1.c b/testsuites/tmtests/tm13/task1.c
index 3dfa1e2a05..7df80564d3 100644
--- a/testsuites/tmtests/tm13/task1.c
+++ b/testsuites/tmtests/tm13/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm13/tm13.doc b/testsuites/tmtests/tm13/tm13.doc
index 7eaba730e1..6f8d196c21 100644
--- a/testsuites/tmtests/tm13/tm13.doc
+++ b/testsuites/tmtests/tm13/tm13.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm14/system.h b/testsuites/tmtests/tm14/system.h
index a03bcda70e..9a2fc14aab 100644
--- a/testsuites/tmtests/tm14/system.h
+++ b/testsuites/tmtests/tm14/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -28,7 +47,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS (3 + OPERATION_COUNT)
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm14/task1.c b/testsuites/tmtests/tm14/task1.c
index 289f1407b5..dc2db4ae8a 100644
--- a/testsuites/tmtests/tm14/task1.c
+++ b/testsuites/tmtests/tm14/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm14/tm14.doc b/testsuites/tmtests/tm14/tm14.doc
index 7eaba730e1..6f8d196c21 100644
--- a/testsuites/tmtests/tm14/tm14.doc
+++ b/testsuites/tmtests/tm14/tm14.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm15/system.h b/testsuites/tmtests/tm15/system.h
index 8d98f096ab..fffabdf844 100644
--- a/testsuites/tmtests/tm15/system.h
+++ b/testsuites/tmtests/tm15/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -29,7 +48,6 @@ rtems_id Task_id[ OPERATION_COUNT+1 ]; /* array of task ids */
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT)
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm15/task1.c b/testsuites/tmtests/tm15/task1.c
index 66a90e1ac8..b2c0a83ad3 100644
--- a/testsuites/tmtests/tm15/task1.c
+++ b/testsuites/tmtests/tm15/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm15/tm15.doc b/testsuites/tmtests/tm15/tm15.doc
index 57ad86f91f..f05756a5a9 100644
--- a/testsuites/tmtests/tm15/tm15.doc
+++ b/testsuites/tmtests/tm15/tm15.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm16/system.h b/testsuites/tmtests/tm16/system.h
index b7084d2ff6..9eb6d69e85 100644
--- a/testsuites/tmtests/tm16/system.h
+++ b/testsuites/tmtests/tm16/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -29,7 +48,6 @@ rtems_id Task_id[ OPERATION_COUNT+1 ]; /* array of task ids */
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS (3 + OPERATION_COUNT)
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm16/task1.c b/testsuites/tmtests/tm16/task1.c
index 2f44cbf6d9..f93bc9d820 100644
--- a/testsuites/tmtests/tm16/task1.c
+++ b/testsuites/tmtests/tm16/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm16/tm16.doc b/testsuites/tmtests/tm16/tm16.doc
index b3e355c6a3..b3e407a04f 100644
--- a/testsuites/tmtests/tm16/tm16.doc
+++ b/testsuites/tmtests/tm16/tm16.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm17/system.h b/testsuites/tmtests/tm17/system.h
index 8d98f096ab..fffabdf844 100644
--- a/testsuites/tmtests/tm17/system.h
+++ b/testsuites/tmtests/tm17/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -29,7 +48,6 @@ rtems_id Task_id[ OPERATION_COUNT+1 ]; /* array of task ids */
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT)
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm17/task1.c b/testsuites/tmtests/tm17/task1.c
index b073bce58e..44f661ac92 100644
--- a/testsuites/tmtests/tm17/task1.c
+++ b/testsuites/tmtests/tm17/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm17/tm17.doc b/testsuites/tmtests/tm17/tm17.doc
index c05b755588..b8f72c681b 100644
--- a/testsuites/tmtests/tm17/tm17.doc
+++ b/testsuites/tmtests/tm17/tm17.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm18/system.h b/testsuites/tmtests/tm18/system.h
index d56e17903a..28263f3051 100644
--- a/testsuites/tmtests/tm18/system.h
+++ b/testsuites/tmtests/tm18/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -27,7 +46,6 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT)
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm18/task1.c b/testsuites/tmtests/tm18/task1.c
index 0087180880..f9ed311c5f 100644
--- a/testsuites/tmtests/tm18/task1.c
+++ b/testsuites/tmtests/tm18/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm18/tm18.doc b/testsuites/tmtests/tm18/tm18.doc
index af214ad757..a418f3903e 100644
--- a/testsuites/tmtests/tm18/tm18.doc
+++ b/testsuites/tmtests/tm18/tm18.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm19/system.h b/testsuites/tmtests/tm19/system.h
index 082ca80160..bbae1e537f 100644
--- a/testsuites/tmtests/tm19/system.h
+++ b/testsuites/tmtests/tm19/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -29,7 +48,6 @@ rtems_id Task_id[ OPERATION_COUNT+1 ]; /* array of task ids */
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 4
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm19/task1.c b/testsuites/tmtests/tm19/task1.c
index 5345ad9e8c..af4148caf8 100644
--- a/testsuites/tmtests/tm19/task1.c
+++ b/testsuites/tmtests/tm19/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/tmtests/tm19/tm19.doc b/testsuites/tmtests/tm19/tm19.doc
index 93d6792d62..1b98f9228b 100644
--- a/testsuites/tmtests/tm19/tm19.doc
+++ b/testsuites/tmtests/tm19/tm19.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm20/system.h b/testsuites/tmtests/tm20/system.h
index 9a73f4b2c5..145477232d 100644
--- a/testsuites/tmtests/tm20/system.h
+++ b/testsuites/tmtests/tm20/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -32,7 +51,6 @@ rtems_id Task_id[ OPERATION_COUNT+1 ]; /* array of task ids */
#define CONFIGURE_MAXIMUM_TASKS 3
#define CONFIGURE_MAXIMUM_PARTITIONS 1
#define CONFIGURE_MAXIMUM_REGIONS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm20/task1.c b/testsuites/tmtests/tm20/task1.c
index 8ee6562f76..1733b5b48e 100644
--- a/testsuites/tmtests/tm20/task1.c
+++ b/testsuites/tmtests/tm20/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm20/tm20.doc b/testsuites/tmtests/tm20/tm20.doc
index 970ea5b99a..7bf1bc4351 100644
--- a/testsuites/tmtests/tm20/tm20.doc
+++ b/testsuites/tmtests/tm20/tm20.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm21/system.h b/testsuites/tmtests/tm21/system.h
index c31e4c1318..ef4e35fc7d 100644
--- a/testsuites/tmtests/tm21/system.h
+++ b/testsuites/tmtests/tm21/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -39,7 +58,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_PORTS OPERATION_COUNT
#define CONFIGURE_MAXIMUM_PERIODS OPERATION_COUNT
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm21/task1.c b/testsuites/tmtests/tm21/task1.c
index 7451115226..40db4968bd 100644
--- a/testsuites/tmtests/tm21/task1.c
+++ b/testsuites/tmtests/tm21/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm21/tm21.doc b/testsuites/tmtests/tm21/tm21.doc
index 7182478e7d..b0273a6510 100644
--- a/testsuites/tmtests/tm21/tm21.doc
+++ b/testsuites/tmtests/tm21/tm21.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm22/system.h b/testsuites/tmtests/tm22/system.h
index a54c2ec3f0..621043dc7c 100644
--- a/testsuites/tmtests/tm22/system.h
+++ b/testsuites/tmtests/tm22/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -30,7 +49,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS 4
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
diff --git a/testsuites/tmtests/tm22/task1.c b/testsuites/tmtests/tm22/task1.c
index 612c48034b..c0b8d93ba1 100644
--- a/testsuites/tmtests/tm22/task1.c
+++ b/testsuites/tmtests/tm22/task1.c
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm22/tm22.doc b/testsuites/tmtests/tm22/tm22.doc
index 48cb96a105..b979e982b5 100644
--- a/testsuites/tmtests/tm22/tm22.doc
+++ b/testsuites/tmtests/tm22/tm22.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm23/system.h b/testsuites/tmtests/tm23/system.h
index 2efc856276..41722a2c39 100644
--- a/testsuites/tmtests/tm23/system.h
+++ b/testsuites/tmtests/tm23/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -28,7 +47,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS (1 + OPERATION_COUNT)
#define CONFIGURE_MAXIMUM_TIMERS OPERATION_COUNT
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm23/task1.c b/testsuites/tmtests/tm23/task1.c
index 8c9ed9bed6..ddaff0ab40 100644
--- a/testsuites/tmtests/tm23/task1.c
+++ b/testsuites/tmtests/tm23/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm23/tm23.doc b/testsuites/tmtests/tm23/tm23.doc
index 7cf0d25a6d..67f695c558 100644
--- a/testsuites/tmtests/tm23/tm23.doc
+++ b/testsuites/tmtests/tm23/tm23.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm24/system.h b/testsuites/tmtests/tm24/system.h
index d56e17903a..28263f3051 100644
--- a/testsuites/tmtests/tm24/system.h
+++ b/testsuites/tmtests/tm24/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -27,7 +46,6 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT)
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm24/task1.c b/testsuites/tmtests/tm24/task1.c
index be63b9b764..5e8f53cb6d 100644
--- a/testsuites/tmtests/tm24/task1.c
+++ b/testsuites/tmtests/tm24/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm24/tm24.doc b/testsuites/tmtests/tm24/tm24.doc
index 89bfccef5c..3416ecfec9 100644
--- a/testsuites/tmtests/tm24/tm24.doc
+++ b/testsuites/tmtests/tm24/tm24.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm25/system.h b/testsuites/tmtests/tm25/system.h
index fc892ec9b7..423a30eba8 100644
--- a/testsuites/tmtests/tm25/system.h
+++ b/testsuites/tmtests/tm25/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -28,7 +47,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT)
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm25/task1.c b/testsuites/tmtests/tm25/task1.c
index 35f84804ef..2f3ed28dda 100644
--- a/testsuites/tmtests/tm25/task1.c
+++ b/testsuites/tmtests/tm25/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm25/tm25.doc b/testsuites/tmtests/tm25/tm25.doc
index f1d39700bd..0353949692 100644
--- a/testsuites/tmtests/tm25/tm25.doc
+++ b/testsuites/tmtests/tm25/tm25.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm26/fptest.h b/testsuites/tmtests/tm26/fptest.h
index 6aafb75eff..fc3a90fb1e 100644
--- a/testsuites/tmtests/tm26/fptest.h
+++ b/testsuites/tmtests/tm26/fptest.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* fptest.h
*
* This include file contains the CPU dependent implementation
@@ -17,9 +19,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
diff --git a/testsuites/tmtests/tm26/system.h b/testsuites/tmtests/tm26/system.h
index 961a992ca6..d66dfa81dd 100644
--- a/testsuites/tmtests/tm26/system.h
+++ b/testsuites/tmtests/tm26/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -28,7 +47,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS (6 + OPERATION_COUNT)
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c
index e8922ca0ce..5ab12e9876 100644
--- a/testsuites/tmtests/tm26/task1.c
+++ b/testsuites/tmtests/tm26/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm26/tm26.doc b/testsuites/tmtests/tm26/tm26.doc
index 8b97adec25..a9fbc961e0 100644
--- a/testsuites/tmtests/tm26/tm26.doc
+++ b/testsuites/tmtests/tm26/tm26.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm27/system.h b/testsuites/tmtests/tm27/system.h
index 7136afe9c1..4a2723bcd4 100644
--- a/testsuites/tmtests/tm27/system.h
+++ b/testsuites/tmtests/tm27/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -29,7 +48,6 @@ rtems_id Task_id[ OPERATION_COUNT+1 ]; /* array of task ids */
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 3
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm27/task1.c b/testsuites/tmtests/tm27/task1.c
index c0f8bd1088..7f2ce6663c 100644
--- a/testsuites/tmtests/tm27/task1.c
+++ b/testsuites/tmtests/tm27/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
/*
@@ -43,10 +62,6 @@ volatile uint32_t Interrupt_return_time, Interrupt_return_nested_time;
uint32_t Interrupt_nest;
uint32_t timer_overhead;
-rtems_isr Isr_handler(
- rtems_vector_number vector
-);
-
static void set_thread_executing( Thread_Control *thread )
{
_Per_CPU_Get_snapshot()->executing = thread;
@@ -107,6 +122,55 @@ rtems_task Init(
rtems_task_exit();
}
+/* The Isr_handler() and Isr_handler_inner() routines are structured
+ * so that there will be as little entry overhead as possible included
+ * in the interrupt entry time.
+ */
+
+static void Isr_handler_inner( void )
+{
+
+ /*enable_tracing();*/
+ Clear_tm27_intr();
+ switch ( Interrupt_nest ) {
+ case 0:
+ Interrupt_enter_time = end_time;
+ break;
+ case 1:
+ Interrupt_enter_time = end_time;
+ Interrupt_nest = 2;
+ Interrupt_occurred = 0;
+ Lower_tm27_intr();
+ benchmark_timer_initialize();
+ Cause_tm27_intr();
+ /* goes to a nested copy of Isr_handler */
+#if (MUST_WAIT_FOR_INTERRUPT == 1)
+ while ( Interrupt_occurred == 0 );
+#endif
+ Interrupt_return_nested_time = benchmark_timer_read();
+ break;
+ case 2:
+ Interrupt_enter_nested_time = end_time;
+ break;
+ }
+
+ benchmark_timer_initialize();
+}
+
+#ifdef TM27_USE_VECTOR_HANDLER
+static rtems_isr Isr_handler( rtems_vector_number arg )
+#else
+static void Isr_handler( void *arg )
+#endif
+{
+ (void) arg;
+
+ end_time = benchmark_timer_read();
+
+ Interrupt_occurred = 1;
+ Isr_handler_inner();
+}
+
rtems_task Task_1(
rtems_task_argument argument
)
@@ -283,50 +347,3 @@ rtems_task Task_2(
_Thread_Dispatch();
}
-
-/* The Isr_handler() and Isr_handler_inner() routines are structured
- * so that there will be as little entry overhead as possible included
- * in the interrupt entry time.
- */
-
-void Isr_handler_inner( void );
-
-rtems_isr Isr_handler(
- rtems_vector_number vector
-)
-{
- end_time = benchmark_timer_read();
-
- Interrupt_occurred = 1;
- Isr_handler_inner();
-}
-
-void Isr_handler_inner( void )
-{
-
- /*enable_tracing();*/
- Clear_tm27_intr();
- switch ( Interrupt_nest ) {
- case 0:
- Interrupt_enter_time = end_time;
- break;
- case 1:
- Interrupt_enter_time = end_time;
- Interrupt_nest = 2;
- Interrupt_occurred = 0;
- Lower_tm27_intr();
- benchmark_timer_initialize();
- Cause_tm27_intr();
- /* goes to a nested copy of Isr_handler */
-#if (MUST_WAIT_FOR_INTERRUPT == 1)
- while ( Interrupt_occurred == 0 );
-#endif
- Interrupt_return_nested_time = benchmark_timer_read();
- break;
- case 2:
- Interrupt_enter_nested_time = end_time;
- break;
- }
-
- benchmark_timer_initialize();
-}
diff --git a/testsuites/tmtests/tm27/tm27.doc b/testsuites/tmtests/tm27/tm27.doc
index 981286480f..f56c0e1f4e 100644
--- a/testsuites/tmtests/tm27/tm27.doc
+++ b/testsuites/tmtests/tm27/tm27.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/tmtests/tm28/system.h b/testsuites/tmtests/tm28/system.h
index 8ff9a6de12..bec8393510 100644
--- a/testsuites/tmtests/tm28/system.h
+++ b/testsuites/tmtests/tm28/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -30,7 +49,6 @@ rtems_id Task_id[ OPERATION_COUNT+1 ]; /* array of task ids */
#define CONFIGURE_MAXIMUM_TASKS 2
#define CONFIGURE_MAXIMUM_PORTS 1
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tm28/task1.c b/testsuites/tmtests/tm28/task1.c
index a7080920b3..a18978effd 100644
--- a/testsuites/tmtests/tm28/task1.c
+++ b/testsuites/tmtests/tm28/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm28/tm28.doc b/testsuites/tmtests/tm28/tm28.doc
index d5a683626c..c224e8a0e7 100644
--- a/testsuites/tmtests/tm28/tm28.doc
+++ b/testsuites/tmtests/tm28/tm28.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm29/system.h b/testsuites/tmtests/tm29/system.h
index 43925c1bcc..380878abb0 100644
--- a/testsuites/tmtests/tm29/system.h
+++ b/testsuites/tmtests/tm29/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -28,7 +47,6 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT)
#define CONFIGURE_MAXIMUM_PERIODS OPERATION_COUNT
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
diff --git a/testsuites/tmtests/tm29/task1.c b/testsuites/tmtests/tm29/task1.c
index 88ae4e6590..5dc30951e3 100644
--- a/testsuites/tmtests/tm29/task1.c
+++ b/testsuites/tmtests/tm29/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm29/tm29.doc b/testsuites/tmtests/tm29/tm29.doc
index 4861236517..8961ce23b5 100644
--- a/testsuites/tmtests/tm29/tm29.doc
+++ b/testsuites/tmtests/tm29/tm29.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm30/init.c b/testsuites/tmtests/tm30/init.c
index b2f1b335ab..6b8261d0a5 100644
--- a/testsuites/tmtests/tm30/init.c
+++ b/testsuites/tmtests/tm30/init.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tm30/tm30.doc b/testsuites/tmtests/tm30/tm30.doc
index 2a6baae8d6..f2b6ac485d 100644
--- a/testsuites/tmtests/tm30/tm30.doc
+++ b/testsuites/tmtests/tm30/tm30.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
# Cynthia Rempel <cynthia@rtems.org>
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm31/task1.c b/testsuites/tmtests/tm31/task1.c
index 158c2d3dd4..1e260851fb 100644
--- a/testsuites/tmtests/tm31/task1.c
+++ b/testsuites/tmtests/tm31/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup tmtests
+ *
+ * @brief This is task1 for the tm31 test.
+ */
+
+/*
+ * Copyright (C) 1989-2014 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define TM31
#include "../tm02/tm02impl.h"
diff --git a/testsuites/tmtests/tm31/tm31.doc b/testsuites/tmtests/tm31/tm31.doc
index 90de934e4c..53e4e4ed89 100644
--- a/testsuites/tmtests/tm31/tm31.doc
+++ b/testsuites/tmtests/tm31/tm31.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm32/task1.c b/testsuites/tmtests/tm32/task1.c
index a1787fdb3e..49800a2a7f 100644
--- a/testsuites/tmtests/tm32/task1.c
+++ b/testsuites/tmtests/tm32/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup tmtests
+ *
+ * @brief This is task1 for the tm32 test.
+ */
+
+/*
+ * Copyright (C) 1989-2014 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define TM32
#include "../tm03/tm03impl.h"
diff --git a/testsuites/tmtests/tm32/tm32.doc b/testsuites/tmtests/tm32/tm32.doc
index 2087d42a6b..dcb83c4162 100644
--- a/testsuites/tmtests/tm32/tm32.doc
+++ b/testsuites/tmtests/tm32/tm32.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm33/task1.c b/testsuites/tmtests/tm33/task1.c
index 17917e11ba..98793aea99 100644
--- a/testsuites/tmtests/tm33/task1.c
+++ b/testsuites/tmtests/tm33/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup tmtests
+ *
+ * @brief This is task1 for the tm33 test.
+ */
+
+/*
+ * Copyright (C) 1989-2014 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define TM33
#include "../tm02/tm02impl.h"
diff --git a/testsuites/tmtests/tm33/tm33.doc b/testsuites/tmtests/tm33/tm33.doc
index f78a4dc96d..b6a36f8a74 100644
--- a/testsuites/tmtests/tm33/tm33.doc
+++ b/testsuites/tmtests/tm33/tm33.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm34/task1.c b/testsuites/tmtests/tm34/task1.c
index 2f3a888d14..f3c50bb8cc 100644
--- a/testsuites/tmtests/tm34/task1.c
+++ b/testsuites/tmtests/tm34/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup tmtests
+ *
+ * @brief This is task1 for the tm34 test.
+ */
+
+/*
+ * Copyright (C) 1989-2014 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define TM34
#include "../tm03/tm03impl.h"
diff --git a/testsuites/tmtests/tm34/tm34.doc b/testsuites/tmtests/tm34/tm34.doc
index 5affd68cfa..7678359158 100644
--- a/testsuites/tmtests/tm34/tm34.doc
+++ b/testsuites/tmtests/tm34/tm34.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm35/task1.c b/testsuites/tmtests/tm35/task1.c
index 4f1ee856d4..1550c4b9d0 100644
--- a/testsuites/tmtests/tm35/task1.c
+++ b/testsuites/tmtests/tm35/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup tmtests
+ *
+ * @brief This is task1 for the tm35 test.
+ */
+
+/*
+ * Copyright (C) 1989-2014 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define TM35
#include "../tm02/tm02impl.h"
diff --git a/testsuites/tmtests/tm35/tm35.doc b/testsuites/tmtests/tm35/tm35.doc
index e82e284ef0..f4d0add1bd 100644
--- a/testsuites/tmtests/tm35/tm35.doc
+++ b/testsuites/tmtests/tm35/tm35.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tm36/task1.c b/testsuites/tmtests/tm36/task1.c
index 1dcdcefd64..91e91249e5 100644
--- a/testsuites/tmtests/tm36/task1.c
+++ b/testsuites/tmtests/tm36/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup tmtests
+ *
+ * @brief This is task1 for the tm36 test.
+ */
+
+/*
+ * Copyright (C) 1989-2014 On-Line Applications Research Corporation (OAR).
+ *
+ * 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 OWNER 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.
+ */
+
#define TM36
#include "../tm03/tm03impl.h"
diff --git a/testsuites/tmtests/tm36/tm36.doc b/testsuites/tmtests/tm36/tm36.doc
index 0f20a9c130..2573f154a7 100644
--- a/testsuites/tmtests/tm36/tm36.doc
+++ b/testsuites/tmtests/tm36/tm36.doc
@@ -1,8 +1,27 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-2014.
# On-Line Applications Research Corporation (OAR).
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
This test benchmarks the following operations:
diff --git a/testsuites/tmtests/tmck/system.h b/testsuites/tmtests/tmck/system.h
index 5366b50a3b..6fad74389e 100644
--- a/testsuites/tmtests/tmck/system.h
+++ b/testsuites/tmtests/tmck/system.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* system.h
*
* This include file is used by all tests in the Time Suite.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
@@ -29,7 +48,6 @@ rtems_name Task_name[ OPERATION_COUNT+1 ]; /* array of task names */
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 2
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/tmtests/tmck/task1.c b/testsuites/tmtests/tmck/task1.c
index 23f66e5e86..f26b027dc8 100644
--- a/testsuites/tmtests/tmck/task1.c
+++ b/testsuites/tmtests/tmck/task1.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#if !defined(OPERATION_COUNT)
diff --git a/testsuites/tmtests/tmck/tmck.doc b/testsuites/tmtests/tmck/tmck.doc
index fa28be3e2a..d6b733740b 100644
--- a/testsuites/tmtests/tmck/tmck.doc
+++ b/testsuites/tmtests/tmck/tmck.doc
@@ -1,9 +1,28 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
#
diff --git a/testsuites/tmtests/tmcontext01/init.c b/testsuites/tmtests/tmcontext01/init.c
index d1f88e045a..dc1da718c7 100644
--- a/testsuites/tmtests/tmcontext01/init.c
+++ b/testsuites/tmtests/tmcontext01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -36,8 +49,6 @@ const char rtems_test_name[] = "TMCONTEXT 1";
static rtems_counter_ticks t[SAMPLES];
-static volatile int prevent_optimization;
-
static size_t cache_line_size;
static size_t data_size;
@@ -59,43 +70,31 @@ static int dirty_data_cache(volatile int *data, size_t n, size_t clsz, int j)
return i + j;
}
-static int call_at_level(
+static __attribute__((__noipa__)) void call_at_level(
int start,
int fl,
- int s,
- bool dirty
+ int s
)
{
- int prevent_optimization;;
-
- prevent_optimization = start + fl;
-
+#if defined(__sparc__)
if (fl == start) {
- /*
- * Some architectures like the SPARC have register windows. A side-effect
- * of this context switch is that we start with a fresh window set. On
- * architectures like ARM or PowerPC this context switch has no effect.
- */
- _Context_Switch(&ctx, &ctx);
+ /* Flush register windows */
+ __asm__ volatile ("ta 3" : : : "memory");
}
+#endif
if (fl > 0) {
call_at_level(
start,
fl - 1,
- s,
- dirty
+ s
);
+ __asm__ volatile ("" : : : "memory");
} else {
char *volatile space;
rtems_counter_ticks a;
rtems_counter_ticks b;
- if (dirty) {
- dirty_data_cache(main_data, data_size, cache_line_size, fl);
- rtems_cache_invalidate_entire_instruction();
- }
-
a = rtems_counter_read();
/* Ensure that we use an untouched stack area */
@@ -107,8 +106,6 @@ static int call_at_level(
b = rtems_counter_read();
t[s] = rtems_counter_difference(b, a);
}
-
- return prevent_optimization;
}
static void load_task(rtems_task_argument arg)
@@ -136,7 +133,7 @@ static void sort_t(void)
qsort(&t[0], SAMPLES, sizeof(t[0]), cmp);
}
-static void test_by_function_level(int fl, bool dirty)
+static __attribute__((__noipa__)) void test_by_function_level(int fl, bool dirty)
{
RTEMS_INTERRUPT_LOCK_DECLARE(, lock)
rtems_interrupt_lock_context lock_context;
@@ -147,13 +144,16 @@ static void test_by_function_level(int fl, bool dirty)
uint64_t q3;
uint64_t max;
- fl += prevent_optimization;
-
rtems_interrupt_lock_initialize(&lock, "test");
rtems_interrupt_lock_acquire(&lock, &lock_context);
for (s = 0; s < SAMPLES; ++s) {
- call_at_level(fl, fl, s, dirty);
+ if (dirty) {
+ dirty_data_cache(main_data, data_size, cache_line_size, fl);
+ rtems_cache_invalidate_entire_instruction();
+ }
+
+ call_at_level(fl, fl, s);
}
rtems_interrupt_lock_release(&lock, &lock_context);
@@ -168,14 +168,8 @@ static void test_by_function_level(int fl, bool dirty)
max = t[SAMPLES - 1];
printf(
- " <Sample functionNestLevel=\"%i\">\n"
- " <Min unit=\"ns\">%" PRIu64 "</Min>"
- "<Q1 unit=\"ns\">%" PRIu64 "</Q1>"
- "<Q2 unit=\"ns\">%" PRIu64 "</Q2>"
- "<Q3 unit=\"ns\">%" PRIu64 "</Q3>"
- "<Max unit=\"ns\">%" PRIu64 "</Max>\n"
- " </Sample>\n",
- fl,
+ "%s\n [%" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 "]",
+ fl == 0 ? "" : ",",
rtems_counter_ticks_to_nanoseconds(min),
rtems_counter_ticks_to_nanoseconds(q1),
rtems_counter_ticks_to_nanoseconds(q2),
@@ -184,26 +178,38 @@ static void test_by_function_level(int fl, bool dirty)
);
}
-static void test(bool dirty, uint32_t load)
+static void test(bool first, bool dirty, uint32_t load)
{
int fl;
printf(
- " <ContextSwitchTest environment=\"%s\"",
- dirty ? "dirty" : "normal"
+ "\n %s{\n"
+ " \"environment\": \"",
+ first ? "" : "}, "
);
- if (load > 0) {
- printf(" load=\"%" PRIu32 "\"", load);
+ if (dirty) {
+ if (load > 0) {
+ printf("Load/%" PRIu32 "", load);
+ } else {
+ printf("DirtyCache");
+ }
+ } else {
+ printf("HotCache");
}
- printf(">\n");
+ printf(
+ "\",\n"
+ " \"stats-by-function-nest-level\": ["
+ );
for (fl = 0; fl < FUNCTION_LEVELS; ++fl) {
test_by_function_level(fl, dirty);
}
- printf(" </ContextSwitchTest>\n");
+ printf(
+ "\n ]"
+ );
}
static void Init(rtems_task_argument arg)
@@ -212,7 +218,7 @@ static void Init(rtems_task_argument arg)
TEST_BEGIN();
- printf("<Test>\n");
+ printf("*** BEGIN OF JSON DATA ***\n[");
cache_line_size = rtems_cache_get_data_line_size();
if (cache_line_size == 0) {
@@ -227,8 +233,8 @@ static void Init(rtems_task_argument arg)
main_data = malloc(data_size);
rtems_test_assert(main_data != NULL);
- test(false, load);
- test(true, load);
+ test(true, false, load);
+ test(false, true, load);
for (load = 1; load < rtems_scheduler_get_processor_maximum(); ++load) {
rtems_status_code sc;
@@ -253,10 +259,10 @@ static void Init(rtems_task_argument arg)
sc = rtems_task_start(id, load_task, (rtems_task_argument) load_data);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
- test(true, load);
+ test(false, true, load);
}
- printf("</Test>\n");
+ printf("\n }\n]\n*** END OF JSON DATA ***\n");
TEST_END();
rtems_test_exit(0);
diff --git a/testsuites/tmtests/tmcontext01/plot.py b/testsuites/tmtests/tmcontext01/plot.py
index 431725c8ba..944a5962c2 100644
--- a/testsuites/tmtests/tmcontext01/plot.py
+++ b/testsuites/tmtests/tmcontext01/plot.py
@@ -1,51 +1,59 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (C) 2014, 2024 embedded brains GmbH & Co. KG
#
-# Copyright (c) 2014 embedded brains GmbH. All rights reserved.
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
+
+import json
+import re
+import matplotlib.pyplot as plt # type: ignore
+from matplotlib import ticker # type: ignore
+
+
+def _plot(data: dict) -> None:
+ _, axes = plt.subplots()
+ axes.set_title("Context Switch Timing Test")
+ axes.set_xlabel("Function Nest Level")
+ axes.set_ylabel("Context Switch Time [μs]")
+ x = list(range(0, len(data[0]["stats-by-function-nest-level"])))
+ axes.xaxis.set_major_locator(ticker.FixedLocator(x))
+ for samples in data:
+ y = [
+ values[2] / 1000.0
+ for values in samples["stats-by-function-nest-level"]
+ ]
+ axes.plot(x, y, label=samples["environment"], marker='o')
+ axes.legend(loc='best')
+ plt.savefig("tmcontext01.png")
+ plt.savefig("tmcontext01.pdf")
+ plt.close()
+
+
+_JSON_DATA = re.compile(
+ r"\*\*\* BEGIN OF JSON DATA \*\*\*(.*)"
+ r"\*\*\* END OF JSON DATA \*\*\*", re.DOTALL)
+
+with open("tmcontext01.scn", "r", encoding="utf-8") as src:
+ match = _JSON_DATA.search(src.read())
+ data = json.loads(match.group(1))
-import libxml2
-from libxml2 import xmlNode
-import matplotlib.pyplot as plt
-doc = libxml2.parseFile("tmcontext01.scn")
-ctx = doc.xpathNewContext()
-
-colors = ['k', 'r', 'b', 'g', 'y', 'm']
-
-def plot(y, color, label, first):
- n=len(y)
- x=range(0, n)
- if first:
- plt.plot(x, y, color=color, label=label)
- else:
- plt.plot(x, y, color=color)
-
-plt.title("context switch timing test")
-plt.xlabel('function nest level')
-plt.ylabel('context switch time [ns]')
-
-c = 0
-for e in ["normal", "dirty"]:
- first = True
- for i in ["Min", "Q1", "Q2", "Q3", "Max"]:
- y=map(xmlNode.getContent, ctx.xpathEval("/Test/ContextSwitchTest[@environment='" + e + "' and not(@load)]/Sample/" + i))
- plot(y, colors[c], e, first)
- first = False
- c = c + 1
-load = 1
-while load > 0:
- first = True
- for i in ["Min", "Q1", "Q2", "Q3", "Max"]:
- y=map(xmlNode.getContent, ctx.xpathEval("/Test/ContextSwitchTest[@environment='dirty' and @load='" + str(load) + "']/Sample/" + i))
- if len(y) > 0:
- plot(y, colors[c], "load " + str(load), first)
- first = False
- else:
- load = 0
- if load > 0:
- load = load + 1
- c = c + 1
-plt.legend()
-plt.show()
+_plot(data)
diff --git a/testsuites/tmtests/tmcontext01/tmcontext01.scn b/testsuites/tmtests/tmcontext01/tmcontext01.scn
index 9044619319..8347d8b3fb 100644
--- a/testsuites/tmtests/tmcontext01/tmcontext01.scn
+++ b/testsuites/tmtests/tmcontext01/tmcontext01.scn
@@ -1,255 +1,124 @@
-<?xml version="1.0"?>
-<!-- *** TEST TMCONTEXT 1 *** -->
-<Test>
- <ContextSwitchTest environment="normal">
- <Sample functionNestLevel="0">
- <Min unit="ns">2440</Min><Q1 unit="ns">2440</Q1><Q2 unit="ns">2480</Q2><Q3 unit="ns">2480</Q3><Max unit="ns">2800</Max>
- </Sample>
- <Sample functionNestLevel="1">
- <Min unit="ns">3520</Min><Q1 unit="ns">3760</Q1><Q2 unit="ns">3800</Q2><Q3 unit="ns">3800</Q3><Max unit="ns">4120</Max>
- </Sample>
- <Sample functionNestLevel="2">
- <Min unit="ns">4280</Min><Q1 unit="ns">4720</Q1><Q2 unit="ns">4720</Q2><Q3 unit="ns">5040</Q3><Max unit="ns">5080</Max>
- </Sample>
- <Sample functionNestLevel="3">
- <Min unit="ns">5320</Min><Q1 unit="ns">5640</Q1><Q2 unit="ns">5680</Q2><Q3 unit="ns">5960</Q3><Max unit="ns">6000</Max>
- </Sample>
- <Sample functionNestLevel="4">
- <Min unit="ns">6360</Min><Q1 unit="ns">6600</Q1><Q2 unit="ns">6600</Q2><Q3 unit="ns">6920</Q3><Max unit="ns">6920</Max>
- </Sample>
- <Sample functionNestLevel="5">
- <Min unit="ns">7480</Min><Q1 unit="ns">7520</Q1><Q2 unit="ns">7840</Q2><Q3 unit="ns">7840</Q3><Max unit="ns">7880</Max>
- </Sample>
- <Sample functionNestLevel="6">
- <Min unit="ns">8480</Min><Q1 unit="ns">8480</Q1><Q2 unit="ns">8800</Q2><Q3 unit="ns">8800</Q3><Max unit="ns">8840</Max>
- </Sample>
- <Sample functionNestLevel="7">
- <Min unit="ns">8840</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9280</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9320</Max>
- </Sample>
- <Sample functionNestLevel="8">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9280</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9320</Max>
- </Sample>
- <Sample functionNestLevel="9">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">8960</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9280</Max>
- </Sample>
- <Sample functionNestLevel="10">
- <Min unit="ns">8800</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9240</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9280</Max>
- </Sample>
- <Sample functionNestLevel="11">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9280</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9280</Max>
- </Sample>
- <Sample functionNestLevel="12">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9240</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9320</Max>
- </Sample>
- <Sample functionNestLevel="13">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9240</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9280</Max>
- </Sample>
- <Sample functionNestLevel="14">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9240</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9280</Max>
- </Sample>
- <Sample functionNestLevel="15">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">8960</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9280</Max>
- </Sample>
- </ContextSwitchTest>
- <ContextSwitchTest environment="dirty">
- <Sample functionNestLevel="0">
- <Min unit="ns">9720</Min><Q1 unit="ns">10560</Q1><Q2 unit="ns">10600</Q2><Q3 unit="ns">10680</Q3><Max unit="ns">11160</Max>
- </Sample>
- <Sample functionNestLevel="1">
- <Min unit="ns">11840</Min><Q1 unit="ns">12280</Q1><Q2 unit="ns">12560</Q2><Q3 unit="ns">12600</Q3><Max unit="ns">12640</Max>
- </Sample>
- <Sample functionNestLevel="2">
- <Min unit="ns">12880</Min><Q1 unit="ns">13560</Q1><Q2 unit="ns">13600</Q2><Q3 unit="ns">13640</Q3><Max unit="ns">13680</Max>
- </Sample>
- <Sample functionNestLevel="3">
- <Min unit="ns">13960</Min><Q1 unit="ns">14640</Q1><Q2 unit="ns">14680</Q2><Q3 unit="ns">14720</Q3><Max unit="ns">14720</Max>
- </Sample>
- <Sample functionNestLevel="4">
- <Min unit="ns">15000</Min><Q1 unit="ns">15680</Q1><Q2 unit="ns">15760</Q2><Q3 unit="ns">15760</Q3><Max unit="ns">15800</Max>
- </Sample>
- <Sample functionNestLevel="5">
- <Min unit="ns">16320</Min><Q1 unit="ns">16720</Q1><Q2 unit="ns">16800</Q2><Q3 unit="ns">16800</Q3><Max unit="ns">17040</Max>
- </Sample>
- <Sample functionNestLevel="6">
- <Min unit="ns">17320</Min><Q1 unit="ns">17560</Q1><Q2 unit="ns">17800</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18160</Max>
- </Sample>
- <Sample functionNestLevel="7">
- <Min unit="ns">17440</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18160</Max>
- </Sample>
- <Sample functionNestLevel="8">
- <Min unit="ns">17360</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18200</Max>
- </Sample>
- <Sample functionNestLevel="9">
- <Min unit="ns">17400</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18120</Max>
- </Sample>
- <Sample functionNestLevel="10">
- <Min unit="ns">17320</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18200</Max>
- </Sample>
- <Sample functionNestLevel="11">
- <Min unit="ns">17360</Min><Q1 unit="ns">17840</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18160</Max>
- </Sample>
- <Sample functionNestLevel="12">
- <Min unit="ns">17360</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18160</Max>
- </Sample>
- <Sample functionNestLevel="13">
- <Min unit="ns">17360</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18200</Max>
- </Sample>
- <Sample functionNestLevel="14">
- <Min unit="ns">17760</Min><Q1 unit="ns">17840</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18200</Max>
- </Sample>
- <Sample functionNestLevel="15">
- <Min unit="ns">17360</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18200</Max>
- </Sample>
- </ContextSwitchTest>
- <ContextSwitchTest environment="dirty" load="1">
- <Sample functionNestLevel="0">
- <Min unit="ns">23800</Min><Q1 unit="ns">24440</Q1><Q2 unit="ns">24640</Q2><Q3 unit="ns">24720</Q3><Max unit="ns">25080</Max>
- </Sample>
- <Sample functionNestLevel="1">
- <Min unit="ns">28040</Min><Q1 unit="ns">28560</Q1><Q2 unit="ns">28640</Q2><Q3 unit="ns">28680</Q3><Max unit="ns">28720</Max>
- </Sample>
- <Sample functionNestLevel="2">
- <Min unit="ns">31600</Min><Q1 unit="ns">32160</Q1><Q2 unit="ns">32160</Q2><Q3 unit="ns">32200</Q3><Max unit="ns">32280</Max>
- </Sample>
- <Sample functionNestLevel="3">
- <Min unit="ns">35400</Min><Q1 unit="ns">35720</Q1><Q2 unit="ns">35760</Q2><Q3 unit="ns">35920</Q3><Max unit="ns">36080</Max>
- </Sample>
- <Sample functionNestLevel="4">
- <Min unit="ns">38960</Min><Q1 unit="ns">39280</Q1><Q2 unit="ns">39320</Q2><Q3 unit="ns">39560</Q3><Max unit="ns">39640</Max>
- </Sample>
- <Sample functionNestLevel="5">
- <Min unit="ns">42480</Min><Q1 unit="ns">42840</Q1><Q2 unit="ns">43080</Q2><Q3 unit="ns">43120</Q3><Max unit="ns">43200</Max>
- </Sample>
- <Sample functionNestLevel="6">
- <Min unit="ns">46120</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46880</Max>
- </Sample>
- <Sample functionNestLevel="7">
- <Min unit="ns">46080</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46760</Max>
- </Sample>
- <Sample functionNestLevel="8">
- <Min unit="ns">46320</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">47040</Max>
- </Sample>
- <Sample functionNestLevel="9">
- <Min unit="ns">46040</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46960</Max>
- </Sample>
- <Sample functionNestLevel="10">
- <Min unit="ns">45960</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46960</Max>
- </Sample>
- <Sample functionNestLevel="11">
- <Min unit="ns">46040</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46720</Max>
- </Sample>
- <Sample functionNestLevel="12">
- <Min unit="ns">46080</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46920</Max>
- </Sample>
- <Sample functionNestLevel="13">
- <Min unit="ns">46080</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46720</Max>
- </Sample>
- <Sample functionNestLevel="14">
- <Min unit="ns">46280</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46760</Max>
- </Sample>
- <Sample functionNestLevel="15">
- <Min unit="ns">46360</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">47040</Max>
- </Sample>
- </ContextSwitchTest>
- <ContextSwitchTest environment="dirty" load="2">
- <Sample functionNestLevel="0">
- <Min unit="ns">37560</Min><Q1 unit="ns">38200</Q1><Q2 unit="ns">38240</Q2><Q3 unit="ns">38480</Q3><Max unit="ns">38600</Max>
- </Sample>
- <Sample functionNestLevel="1">
- <Min unit="ns">44880</Min><Q1 unit="ns">45480</Q1><Q2 unit="ns">45560</Q2><Q3 unit="ns">45600</Q3><Max unit="ns">45640</Max>
- </Sample>
- <Sample functionNestLevel="2">
- <Min unit="ns">50920</Min><Q1 unit="ns">51560</Q1><Q2 unit="ns">51600</Q2><Q3 unit="ns">51800</Q3><Max unit="ns">51960</Max>
- </Sample>
- <Sample functionNestLevel="3">
- <Min unit="ns">57320</Min><Q1 unit="ns">57640</Q1><Q2 unit="ns">57880</Q2><Q3 unit="ns">57920</Q3><Max unit="ns">58240</Max>
- </Sample>
- <Sample functionNestLevel="4">
- <Min unit="ns">63320</Min><Q1 unit="ns">63920</Q1><Q2 unit="ns">63960</Q2><Q3 unit="ns">64000</Q3><Max unit="ns">64600</Max>
- </Sample>
- <Sample functionNestLevel="5">
- <Min unit="ns">69840</Min><Q1 unit="ns">69960</Q1><Q2 unit="ns">70040</Q2><Q3 unit="ns">70240</Q3><Max unit="ns">70400</Max>
- </Sample>
- <Sample functionNestLevel="6">
- <Min unit="ns">75600</Min><Q1 unit="ns">76200</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76880</Max>
- </Sample>
- <Sample functionNestLevel="7">
- <Min unit="ns">75440</Min><Q1 unit="ns">76240</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76840</Max>
- </Sample>
- <Sample functionNestLevel="8">
- <Min unit="ns">75640</Min><Q1 unit="ns">76200</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76960</Max>
- </Sample>
- <Sample functionNestLevel="9">
- <Min unit="ns">75640</Min><Q1 unit="ns">76240</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76440</Max>
- </Sample>
- <Sample functionNestLevel="10">
- <Min unit="ns">75920</Min><Q1 unit="ns">76240</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76400</Max>
- </Sample>
- <Sample functionNestLevel="11">
- <Min unit="ns">75600</Min><Q1 unit="ns">76200</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76920</Max>
- </Sample>
- <Sample functionNestLevel="12">
- <Min unit="ns">75360</Min><Q1 unit="ns">76200</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76440</Max>
- </Sample>
- <Sample functionNestLevel="13">
- <Min unit="ns">75360</Min><Q1 unit="ns">76200</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76960</Max>
- </Sample>
- <Sample functionNestLevel="14">
- <Min unit="ns">75640</Min><Q1 unit="ns">76160</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76960</Max>
- </Sample>
- <Sample functionNestLevel="15">
- <Min unit="ns">75960</Min><Q1 unit="ns">76240</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76400</Max>
- </Sample>
- </ContextSwitchTest>
- <ContextSwitchTest environment="dirty" load="3">
- <Sample functionNestLevel="0">
- <Min unit="ns">52400</Min><Q1 unit="ns">52480</Q1><Q2 unit="ns">52520</Q2><Q3 unit="ns">52800</Q3><Max unit="ns">53720</Max>
- </Sample>
- <Sample functionNestLevel="1">
- <Min unit="ns">61680</Min><Q1 unit="ns">62600</Q1><Q2 unit="ns">62640</Q2><Q3 unit="ns">62680</Q3><Max unit="ns">62800</Max>
- </Sample>
- <Sample functionNestLevel="2">
- <Min unit="ns">70160</Min><Q1 unit="ns">71160</Q1><Q2 unit="ns">71360</Q2><Q3 unit="ns">71480</Q3><Max unit="ns">72160</Max>
- </Sample>
- <Sample functionNestLevel="3">
- <Min unit="ns">79000</Min><Q1 unit="ns">79960</Q1><Q2 unit="ns">80000</Q2><Q3 unit="ns">80000</Q3><Max unit="ns">80920</Max>
- </Sample>
- <Sample functionNestLevel="4">
- <Min unit="ns">87600</Min><Q1 unit="ns">88480</Q1><Q2 unit="ns">88760</Q2><Q3 unit="ns">88800</Q3><Max unit="ns">88880</Max>
- </Sample>
- <Sample functionNestLevel="5">
- <Min unit="ns">96320</Min><Q1 unit="ns">97280</Q1><Q2 unit="ns">97320</Q2><Q3 unit="ns">97360</Q3><Max unit="ns">98600</Max>
- </Sample>
- <Sample functionNestLevel="6">
- <Min unit="ns">105160</Min><Q1 unit="ns">105840</Q1><Q2 unit="ns">106080</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">107120</Max>
- </Sample>
- <Sample functionNestLevel="7">
- <Min unit="ns">105200</Min><Q1 unit="ns">106040</Q1><Q2 unit="ns">106120</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">107080</Max>
- </Sample>
- <Sample functionNestLevel="8">
- <Min unit="ns">104880</Min><Q1 unit="ns">105920</Q1><Q2 unit="ns">106080</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106280</Max>
- </Sample>
- <Sample functionNestLevel="9">
- <Min unit="ns">105760</Min><Q1 unit="ns">106000</Q1><Q2 unit="ns">106120</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106280</Max>
- </Sample>
- <Sample functionNestLevel="10">
- <Min unit="ns">104880</Min><Q1 unit="ns">105880</Q1><Q2 unit="ns">106080</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">107080</Max>
- </Sample>
- <Sample functionNestLevel="11">
- <Min unit="ns">105720</Min><Q1 unit="ns">105960</Q1><Q2 unit="ns">106120</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106240</Max>
- </Sample>
- <Sample functionNestLevel="12">
- <Min unit="ns">104960</Min><Q1 unit="ns">105880</Q1><Q2 unit="ns">106080</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106280</Max>
- </Sample>
- <Sample functionNestLevel="13">
- <Min unit="ns">104880</Min><Q1 unit="ns">105880</Q1><Q2 unit="ns">106120</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106280</Max>
- </Sample>
- <Sample functionNestLevel="14">
- <Min unit="ns">105720</Min><Q1 unit="ns">105880</Q1><Q2 unit="ns">106080</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106240</Max>
- </Sample>
- <Sample functionNestLevel="15">
- <Min unit="ns">104920</Min><Q1 unit="ns">105840</Q1><Q2 unit="ns">106120</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106280</Max>
- </Sample>
- </ContextSwitchTest>
-</Test>
-<!-- *** END OF TEST TMCONTEXT 1 *** -->
+
+ SIS - SPARC/RISCV instruction simulator 2.30, copyright Jiri Gaisler 2020
+ Bug-reports to jiri@gaisler.se
+
+ GR740/LEON4 emulation enabled, 4 cpus online, delta 50 clocks
+
+ Loaded build/sparc/gr740/testsuites/tmtests/tmcontext01.exe, entry 0x00000000
+
+
+*** BEGIN OF TEST TMCONTEXT 1 ***
+*** TEST VERSION: 6.0.0.aa07dc10645c3dc855c3df2b53520aebc2751b06
+*** TEST STATE: EXPECTED_PASS
+*** TEST BUILD: RTEMS_SMP
+*** TEST TOOLS: 13.2.0 20230727 (RTEMS 6, RSB d3d738c35a71ca05f675b188539225099401ac79, Newlib a021448)
+*** BEGIN OF JSON DATA ***
+[
+ {
+ "environment": "HotCache",
+ "stats-by-function-nest-level": [
+ [2820, 2820, 2820, 2820, 2820],
+ [3640, 3640, 3640, 3640, 3640],
+ [4460, 4460, 4460, 4460, 4460],
+ [5280, 5280, 5280, 5280, 5280],
+ [6100, 6100, 6100, 6100, 6100],
+ [6920, 6920, 6920, 6920, 6920],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740]
+ ]
+ }, {
+ "environment": "DirtyCache",
+ "stats-by-function-nest-level": [
+ [2820, 2820, 2820, 2820, 2820],
+ [3640, 3640, 3640, 3640, 3640],
+ [4460, 4460, 4460, 4460, 4460],
+ [5280, 5280, 5280, 5280, 5280],
+ [6100, 6100, 6100, 6100, 6100],
+ [6920, 6920, 6920, 6920, 6920],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740]
+ ]
+ }, {
+ "environment": "Load/1",
+ "stats-by-function-nest-level": [
+ [2820, 2820, 2820, 2820, 2820],
+ [3640, 3640, 3640, 3640, 3640],
+ [4460, 4460, 4460, 4460, 4460],
+ [5280, 5280, 5280, 5280, 5280],
+ [6100, 6100, 6100, 6100, 6100],
+ [6920, 6920, 6920, 6920, 6920],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740]
+ ]
+ }, {
+ "environment": "Load/2",
+ "stats-by-function-nest-level": [
+ [2820, 2820, 2820, 2820, 2820],
+ [3640, 3640, 3640, 3640, 3640],
+ [4460, 4460, 4460, 4460, 4460],
+ [5280, 5280, 5280, 5280, 5280],
+ [6100, 6100, 6100, 6100, 6100],
+ [6920, 6920, 6920, 6920, 6920],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740]
+ ]
+ }, {
+ "environment": "Load/3",
+ "stats-by-function-nest-level": [
+ [2820, 2820, 2820, 2820, 2820],
+ [3640, 3640, 3640, 3640, 3640],
+ [4460, 4460, 4460, 4460, 4460],
+ [5280, 5280, 5280, 5280, 5280],
+ [6100, 6100, 6100, 6100, 6100],
+ [6920, 6920, 6920, 6920, 6920],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740]
+ ]
+ }
+]
+*** END OF JSON DATA ***
+
+*** END OF TEST TMCONTEXT 1 ***
+
+cpu 3 in error mode (tt = 0x80)
+ 2081487650 00009060: 91d02000 ta 0x0
diff --git a/testsuites/tmtests/tmfine01/init.c b/testsuites/tmtests/tmfine01/init.c
index e2daa174b9..c05894f6da 100644
--- a/testsuites/tmtests/tmfine01/init.c
+++ b/testsuites/tmtests/tmfine01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2015, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2015, 2024 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -42,6 +55,8 @@ typedef struct {
typedef struct {
rtems_test_parallel_context base;
+ const char *test_sep;
+ const char *counter_sep;
rtems_id master;
rtems_id sema;
rtems_id mq[CPU_COUNT];
@@ -76,24 +91,46 @@ static rtems_interval test_init(
}
static void test_fini(
- const char *name,
+ test_context *ctx,
+ const char *type,
+ const char *description,
uint32_t *counters,
size_t active_workers
)
{
+ const char *value_sep;
size_t i;
- printf(" <%s activeWorker=\"%zu\">\n", name, active_workers);
+ if (active_workers == 1) {
+ printf(
+ "%s{\n"
+ " \"type\": \"%s\",\n"
+ " \"description\": \"%s\",\n"
+ " \"counter\": [",
+ ctx->test_sep,
+ type,
+ description
+ );
+ ctx->test_sep = ", ";
+ ctx->counter_sep = "\n ";
+ }
+
+ printf("%s[", ctx->counter_sep);
+ ctx->counter_sep = "],\n ";
+ value_sep = "";
for (i = 0; i < active_workers; ++i) {
printf(
- " <Counter worker=\"%zu\">%" PRIu32 "</Counter>\n",
- i,
+ "%s%" PRIu32,
+ value_sep,
counters[i]
);
+ value_sep = ", ";
}
- printf(" </%s>\n", name);
+ if (active_workers == rtems_scheduler_get_processor_maximum()) {
+ printf("]\n ]\n }");
+ }
}
static void test_self_event_body(
@@ -137,7 +174,9 @@ static void test_self_event_fini(
test_context *ctx = (test_context *) base;
test_fini(
- "SelfEvent",
+ ctx,
+ "event",
+ "Send Event to Self",
&ctx->self_event_ops[active_workers - 1][0],
active_workers
);
@@ -188,7 +227,9 @@ static void test_all_to_one_event_fini(
test_context *ctx = (test_context *) base;
test_fini(
- "AllToOneEvent",
+ ctx,
+ "event",
+ "Send Event to One",
&ctx->all_to_one_event_ops[active_workers - 1][0],
active_workers
);
@@ -229,7 +270,9 @@ static void test_one_mutex_fini(
test_context *ctx = (test_context *) base;
test_fini(
- "OneMutex",
+ ctx,
+ "contested-mutex",
+ "Obtain/Release Contested Classic Inheritance Mutex",
&ctx->one_mutex_ops[active_workers - 1][0],
active_workers
);
@@ -283,7 +326,9 @@ static void test_many_mutex_fini(
test_context *ctx = (test_context *) base;
test_fini(
- "ManyMutex",
+ ctx,
+ "private-mutex",
+ "Obtain/Release Private Classic Inheritance Mutex",
&ctx->many_mutex_ops[active_workers - 1][0],
active_workers
);
@@ -334,7 +379,9 @@ static void test_self_msg_fini(
test_context *ctx = (test_context *) base;
test_fini(
- "SelfMsg",
+ ctx,
+ "message",
+ "Send Message to Self",
&ctx->self_msg_ops[active_workers - 1][0],
active_workers
);
@@ -388,7 +435,9 @@ static void test_many_to_one_msg_fini(
test_context *ctx = (test_context *) base;
test_fini(
- "ManyToOneMsg",
+ ctx,
+ "message",
+ "Send Message to One Receiver",
&ctx->many_to_one_msg_ops[active_workers - 1][0],
active_workers
);
@@ -426,7 +475,9 @@ static void test_many_sys_lock_mutex_fini(
test_context *ctx = (test_context *) base;
test_fini(
- "ManySysLockMutex",
+ ctx,
+ "private-mutex",
+ "Obtain/Release Private <sys/lock.h> Mutex",
&ctx->many_sys_lock_mutex_ops[active_workers - 1][0],
active_workers
);
@@ -480,7 +531,9 @@ static void test_many_classic_ceiling_fini(
test_context *ctx = (test_context *) base;
test_fini(
- "ManyClassicCeilingMutex",
+ ctx,
+ "private-mutex",
+ "Obtain/Release Private Classic Ceiling Mutex",
&ctx->many_classic_ceiling_ops[active_workers - 1][0],
active_workers
);
@@ -535,7 +588,9 @@ static void test_many_classic_mrsp_fini(
test_context *ctx = (test_context *) base;
test_fini(
- "ManyClassicMrsPMutex",
+ ctx,
+ "private-mutex",
+ "Obtain/Release Private Classic MrsP Mutex",
&ctx->many_classic_mrsp_ops[active_workers - 1][0],
active_workers
);
@@ -578,7 +633,9 @@ static void test_many_pthread_spinlock_fini(
test_context *ctx = (test_context *) base;
test_fini(
- "ManyPthreadSpinlock",
+ ctx,
+ "private-mutex",
+ "Obtain/Release Private Pthread Spinlock",
&ctx->many_pthread_spinlock_ops[active_workers - 1][0],
active_workers
);
@@ -632,7 +689,9 @@ static void test_many_pthread_mutex_inherit_fini(
test_context *ctx = (test_context *) base;
test_fini(
- "ManyPthreadMutexInherit",
+ ctx,
+ "private-mutex",
+ "Obtain/Release Private Pthread Inheritance Mutex",
&ctx->many_pthread_mutex_inherit_ops[active_workers - 1][0],
active_workers
);
@@ -692,7 +751,9 @@ static void test_many_pthread_mutex_protect_fini(
test_context *ctx = (test_context *) base;
test_fini(
- "ManyPthreadMutexProtect",
+ ctx,
+ "private-mutex",
+ "Obtain/Release Private Pthread Ceiling Mutex",
&ctx->many_pthread_mutex_protect_ops[active_workers - 1][0],
active_workers
);
@@ -716,11 +777,6 @@ static const rtems_test_parallel_job test_jobs[] = {
.cascade = true
}, {
.init = test_init,
- .body = test_many_mutex_body,
- .fini = test_many_mutex_fini,
- .cascade = true
- }, {
- .init = test_init,
.body = test_self_msg_body,
.fini = test_self_msg_fini,
.cascade = true
@@ -731,33 +787,38 @@ static const rtems_test_parallel_job test_jobs[] = {
.cascade = true
}, {
.init = test_init,
+ .body = test_many_pthread_spinlock_body,
+ .fini = test_many_pthread_spinlock_fini,
+ .cascade = true
+ }, {
+ .init = test_init,
.body = test_many_sys_lock_mutex_body,
.fini = test_many_sys_lock_mutex_fini,
.cascade = true
}, {
.init = test_init,
- .body = test_many_classic_ceiling_body,
- .fini = test_many_classic_ceiling_fini,
+ .body = test_many_pthread_mutex_inherit_body,
+ .fini = test_many_pthread_mutex_inherit_fini,
.cascade = true
}, {
.init = test_init,
- .body = test_many_classic_mrsp_body,
- .fini = test_many_classic_mrsp_fini,
+ .body = test_many_mutex_body,
+ .fini = test_many_mutex_fini,
.cascade = true
}, {
.init = test_init,
- .body = test_many_pthread_spinlock_body,
- .fini = test_many_pthread_spinlock_fini,
+ .body = test_many_pthread_mutex_protect_body,
+ .fini = test_many_pthread_mutex_protect_fini,
.cascade = true
}, {
.init = test_init,
- .body = test_many_pthread_mutex_inherit_body,
- .fini = test_many_pthread_mutex_inherit_fini,
+ .body = test_many_classic_ceiling_body,
+ .fini = test_many_classic_ceiling_fini,
.cascade = true
}, {
.init = test_init,
- .body = test_many_pthread_mutex_protect_body,
- .fini = test_many_pthread_mutex_protect_fini,
+ .body = test_many_classic_mrsp_body,
+ .fini = test_many_classic_mrsp_fini,
.cascade = true
}
};
@@ -765,7 +826,6 @@ static const rtems_test_parallel_job test_jobs[] = {
static void Init(rtems_task_argument arg)
{
test_context *ctx = &test_instance;
- const char *test = "TestTimeFine01";
rtems_status_code sc;
size_t i;
@@ -793,8 +853,9 @@ static void Init(rtems_task_argument arg)
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
}
- printf("<%s>\n", test);
+ printf("*** BEGIN OF JSON DATA ***\n[\n ");
+ ctx->test_sep = "";
rtems_test_parallel(
&ctx->base,
NULL,
@@ -802,7 +863,7 @@ static void Init(rtems_task_argument arg)
RTEMS_ARRAY_SIZE(test_jobs)
);
- printf("</%s>\n", test);
+ printf("\n]\n*** END OF JSON DATA ***\n");
TEST_END();
rtems_test_exit(0);
diff --git a/testsuites/tmtests/tmfine01/tmfine01.py b/testsuites/tmtests/tmfine01/tmfine01.py
index 3cbcbbd4d4..54363bee34 100644
--- a/testsuites/tmtests/tmfine01/tmfine01.py
+++ b/testsuites/tmtests/tmfine01/tmfine01.py
@@ -1,62 +1,62 @@
-#!/usr/bin/env python
+# SPDX-License-Identifier: BSD-2-Clause
+# Copyright (C) 2016, 2024 embedded brains GmbH & Co. KG
#
-# Copyright (c) 2016 embedded brains GmbH. All rights reserved.
+# 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.
#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
-#
-
+# 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 OWNER 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.
+
+import json
import re
-import libxml2
-from libxml2 import xmlNode
-import matplotlib.pyplot as plt
-data = open('tmfine01.scn').read()
-data = re.sub(r'\*\*\*.*\*\*\*', '', data)
-doc = libxml2.parseDoc(data)
-ctx = doc.xpathNewContext()
-
-plt.yscale('log')
-plt.title('Uncontested Mutex Performance')
-plt.xlabel('Active Workers')
-plt.ylabel('Operation Count')
-
-def m(n):
- return int(n.getContent())
-
-def getCounterSums(variant):
- w = 1
- y = []
- while True:
- c = map(m, ctx.xpathEval('/TestTimeFine01/' + variant + '[@activeWorker="' + str(w) + '"]/Counter'))
- if not c:
- break
- y.append(sum(c))
- w = w + 1
- return y
-
-y = getCounterSums('ManySysLockMutex')
-x = range(1, len(y) + 1)
-plt.plot(x, y, label = 'Sys Lock Mutex', marker = 'o')
-
-y = getCounterSums('ManyMutex')
-plt.plot(x, y, label = 'Classic Inheritance Mutex', marker = 'o')
-
-y = getCounterSums('ManyClassicCeilingMutex')
-plt.plot(x, y, label = 'Classic Ceiling Mutex', marker = 'o')
-
-y = getCounterSums('ManyClassicMrsPMutex')
-plt.plot(x, y, label = 'Classic MrsP Mutex', marker = 'o')
-
-y = getCounterSums('ManyPthreadSpinlock')
-plt.plot(x, y, label = 'Pthread Spinlock', marker = 'o')
-
-y = getCounterSums('ManyPthreadMutexInherit')
-plt.plot(x, y, label = 'Pthread Mutex Inherit', marker = 'o')
-
-y = getCounterSums('ManyPthreadMutexProtect')
-plt.plot(x, y, label = 'Pthread Mutex Protect', marker = 'o')
-
-plt.legend(loc = 'best')
-plt.show()
+import matplotlib.pyplot as plt # type: ignore
+from matplotlib import ticker # type: ignore
+
+
+def _plot(data: dict) -> None:
+ _, axes = plt.subplots()
+ axes.set_title("Uncontested Mutex Performance")
+ axes.set_xlabel("Active Workers")
+ axes.set_ylabel("Operation Count")
+ x = list(range(1, len(data[0]["counter"]) + 1))
+ axes.xaxis.set_major_locator(ticker.FixedLocator(x))
+ for samples in data:
+ if samples["type"] != "private-mutex":
+ continue
+ y = [sum(values) for values in samples["counter"]]
+ axes.plot(x,
+ y,
+ label=samples["description"].replace(
+ "Obtain/Release Private ", ""),
+ marker="o")
+ axes.legend(loc="best")
+ plt.savefig("tmfine01.png")
+ plt.savefig("tmfine01.pdf")
+ plt.close()
+
+
+_JSON_DATA = re.compile(
+ r"\*\*\* BEGIN OF JSON DATA \*\*\*(.*)"
+ r"\*\*\* END OF JSON DATA \*\*\*", re.DOTALL)
+
+with open("tmfine01.scn", "r", encoding="utf-8") as src:
+ match = _JSON_DATA.search(src.read())
+ data = json.loads(match.group(1))
+
+_plot(data)
diff --git a/testsuites/tmtests/tmfine01/tmfine01.scn b/testsuites/tmtests/tmfine01/tmfine01.scn
index e3dfd7757f..cf356f0806 100644
--- a/testsuites/tmtests/tmfine01/tmfine01.scn
+++ b/testsuites/tmtests/tmfine01/tmfine01.scn
@@ -1,4180 +1,132 @@
+
+ SIS - SPARC/RISCV instruction simulator 2.30, copyright Jiri Gaisler 2020
+ Bug-reports to jiri@gaisler.se
+
+ GR740/LEON4 emulation enabled, 4 cpus online, delta 50 clocks
+
+ Loaded build/sparc/gr740/testsuites/tmtests/tmfine01.exe, entry 0x00000000
+
+
*** BEGIN OF TEST TMFINE 1 ***
-<TestTimeFine01>
- <SelfEvent activeWorker="1">
- <Counter worker="0">4676131</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="2">
- <Counter worker="0">4641176</Counter>
- <Counter worker="1">4641467</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="3">
- <Counter worker="0">4588420</Counter>
- <Counter worker="1">4588713</Counter>
- <Counter worker="2">4588730</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="4">
- <Counter worker="0">4552423</Counter>
- <Counter worker="1">4552717</Counter>
- <Counter worker="2">4552773</Counter>
- <Counter worker="3">4552785</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="5">
- <Counter worker="0">4503050</Counter>
- <Counter worker="1">4503310</Counter>
- <Counter worker="2">4503408</Counter>
- <Counter worker="3">4503447</Counter>
- <Counter worker="4">4503380</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="6">
- <Counter worker="0">4506318</Counter>
- <Counter worker="1">4506592</Counter>
- <Counter worker="2">4506673</Counter>
- <Counter worker="3">4506688</Counter>
- <Counter worker="4">4506663</Counter>
- <Counter worker="5">4506666</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="7">
- <Counter worker="0">4479255</Counter>
- <Counter worker="1">4479516</Counter>
- <Counter worker="2">4479651</Counter>
- <Counter worker="3">4479614</Counter>
- <Counter worker="4">4479578</Counter>
- <Counter worker="5">4479616</Counter>
- <Counter worker="6">4479670</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="8">
- <Counter worker="0">4430941</Counter>
- <Counter worker="1">4431230</Counter>
- <Counter worker="2">4431182</Counter>
- <Counter worker="3">4431299</Counter>
- <Counter worker="4">4430884</Counter>
- <Counter worker="5">4430883</Counter>
- <Counter worker="6">4431032</Counter>
- <Counter worker="7">4431022</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="9">
- <Counter worker="0">4448824</Counter>
- <Counter worker="1">4449100</Counter>
- <Counter worker="2">4448994</Counter>
- <Counter worker="3">4449146</Counter>
- <Counter worker="4">4448725</Counter>
- <Counter worker="5">4448726</Counter>
- <Counter worker="6">4448812</Counter>
- <Counter worker="7">4448856</Counter>
- <Counter worker="8">4683748</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="10">
- <Counter worker="0">4434217</Counter>
- <Counter worker="1">4434522</Counter>
- <Counter worker="2">4434464</Counter>
- <Counter worker="3">4434566</Counter>
- <Counter worker="4">4434201</Counter>
- <Counter worker="5">4434183</Counter>
- <Counter worker="6">4434380</Counter>
- <Counter worker="7">4434377</Counter>
- <Counter worker="8">4645492</Counter>
- <Counter worker="9">4645490</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="11">
- <Counter worker="0">4462864</Counter>
- <Counter worker="1">4463155</Counter>
- <Counter worker="2">4463110</Counter>
- <Counter worker="3">4463229</Counter>
- <Counter worker="4">4462874</Counter>
- <Counter worker="5">4462844</Counter>
- <Counter worker="6">4462957</Counter>
- <Counter worker="7">4462977</Counter>
- <Counter worker="8">4590235</Counter>
- <Counter worker="9">4590243</Counter>
- <Counter worker="10">4590208</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="12">
- <Counter worker="0">4448372</Counter>
- <Counter worker="1">4448670</Counter>
- <Counter worker="2">4448618</Counter>
- <Counter worker="3">4448756</Counter>
- <Counter worker="4">4448391</Counter>
- <Counter worker="5">4448389</Counter>
- <Counter worker="6">4448491</Counter>
- <Counter worker="7">4448501</Counter>
- <Counter worker="8">4552401</Counter>
- <Counter worker="9">4552390</Counter>
- <Counter worker="10">4552353</Counter>
- <Counter worker="11">4552386</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="13">
- <Counter worker="0">4427993</Counter>
- <Counter worker="1">4428270</Counter>
- <Counter worker="2">4428290</Counter>
- <Counter worker="3">4428406</Counter>
- <Counter worker="4">4428081</Counter>
- <Counter worker="5">4428077</Counter>
- <Counter worker="6">4428183</Counter>
- <Counter worker="7">4428187</Counter>
- <Counter worker="8">4507321</Counter>
- <Counter worker="9">4507322</Counter>
- <Counter worker="10">4507311</Counter>
- <Counter worker="11">4507332</Counter>
- <Counter worker="12">4507311</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="14">
- <Counter worker="0">4456343</Counter>
- <Counter worker="1">4456632</Counter>
- <Counter worker="2">4456672</Counter>
- <Counter worker="3">4456758</Counter>
- <Counter worker="4">4456495</Counter>
- <Counter worker="5">4456482</Counter>
- <Counter worker="6">4456584</Counter>
- <Counter worker="7">4456575</Counter>
- <Counter worker="8">4507973</Counter>
- <Counter worker="9">4507951</Counter>
- <Counter worker="10">4507951</Counter>
- <Counter worker="11">4507937</Counter>
- <Counter worker="12">4507952</Counter>
- <Counter worker="13">4507971</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="15">
- <Counter worker="0">4441428</Counter>
- <Counter worker="1">4441718</Counter>
- <Counter worker="2">4441692</Counter>
- <Counter worker="3">4441802</Counter>
- <Counter worker="4">4441407</Counter>
- <Counter worker="5">4441408</Counter>
- <Counter worker="6">4441556</Counter>
- <Counter worker="7">4441569</Counter>
- <Counter worker="8">4478368</Counter>
- <Counter worker="9">4478360</Counter>
- <Counter worker="10">4478594</Counter>
- <Counter worker="11">4478573</Counter>
- <Counter worker="12">4478347</Counter>
- <Counter worker="13">4478367</Counter>
- <Counter worker="14">4478443</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="16">
- <Counter worker="0">4470668</Counter>
- <Counter worker="1">4470970</Counter>
- <Counter worker="2">4470950</Counter>
- <Counter worker="3">4471049</Counter>
- <Counter worker="4">4470638</Counter>
- <Counter worker="5">4470599</Counter>
- <Counter worker="6">4470866</Counter>
- <Counter worker="7">4470888</Counter>
- <Counter worker="8">4462941</Counter>
- <Counter worker="9">4462934</Counter>
- <Counter worker="10">4462925</Counter>
- <Counter worker="11">4463059</Counter>
- <Counter worker="12">4462612</Counter>
- <Counter worker="13">4462636</Counter>
- <Counter worker="14">4462669</Counter>
- <Counter worker="15">4462676</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="17">
- <Counter worker="0">4451094</Counter>
- <Counter worker="1">4451396</Counter>
- <Counter worker="2">4451343</Counter>
- <Counter worker="3">4451471</Counter>
- <Counter worker="4">4451083</Counter>
- <Counter worker="5">4451099</Counter>
- <Counter worker="6">4451193</Counter>
- <Counter worker="7">4451191</Counter>
- <Counter worker="8">4450420</Counter>
- <Counter worker="9">4450424</Counter>
- <Counter worker="10">4450398</Counter>
- <Counter worker="11">4450533</Counter>
- <Counter worker="12">4450111</Counter>
- <Counter worker="13">4450105</Counter>
- <Counter worker="14">4450218</Counter>
- <Counter worker="15">4450237</Counter>
- <Counter worker="16">4682169</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="18">
- <Counter worker="0">4435091</Counter>
- <Counter worker="1">4435372</Counter>
- <Counter worker="2">4435353</Counter>
- <Counter worker="3">4435493</Counter>
- <Counter worker="4">4435073</Counter>
- <Counter worker="5">4435101</Counter>
- <Counter worker="6">4435297</Counter>
- <Counter worker="7">4435279</Counter>
- <Counter worker="8">4435219</Counter>
- <Counter worker="9">4435244</Counter>
- <Counter worker="10">4435166</Counter>
- <Counter worker="11">4435291</Counter>
- <Counter worker="12">4434894</Counter>
- <Counter worker="13">4434866</Counter>
- <Counter worker="14">4435038</Counter>
- <Counter worker="15">4435019</Counter>
- <Counter worker="16">4644910</Counter>
- <Counter worker="17">4644922</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="19">
- <Counter worker="0">4467049</Counter>
- <Counter worker="1">4467345</Counter>
- <Counter worker="2">4467193</Counter>
- <Counter worker="3">4467343</Counter>
- <Counter worker="4">4466881</Counter>
- <Counter worker="5">4466868</Counter>
- <Counter worker="6">4466971</Counter>
- <Counter worker="7">4466993</Counter>
- <Counter worker="8">4457734</Counter>
- <Counter worker="9">4457707</Counter>
- <Counter worker="10">4457717</Counter>
- <Counter worker="11">4457828</Counter>
- <Counter worker="12">4457399</Counter>
- <Counter worker="13">4457360</Counter>
- <Counter worker="14">4457515</Counter>
- <Counter worker="15">4457488</Counter>
- <Counter worker="16">4585770</Counter>
- <Counter worker="17">4585760</Counter>
- <Counter worker="18">4585688</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="20">
- <Counter worker="0">4446007</Counter>
- <Counter worker="1">4446279</Counter>
- <Counter worker="2">4446256</Counter>
- <Counter worker="3">4446376</Counter>
- <Counter worker="4">4445955</Counter>
- <Counter worker="5">4445940</Counter>
- <Counter worker="6">4446119</Counter>
- <Counter worker="7">4446087</Counter>
- <Counter worker="8">4445074</Counter>
- <Counter worker="9">4445042</Counter>
- <Counter worker="10">4444971</Counter>
- <Counter worker="11">4445114</Counter>
- <Counter worker="12">4444692</Counter>
- <Counter worker="13">4444706</Counter>
- <Counter worker="14">4444765</Counter>
- <Counter worker="15">4444747</Counter>
- <Counter worker="16">4548340</Counter>
- <Counter worker="17">4548325</Counter>
- <Counter worker="18">4548353</Counter>
- <Counter worker="19">4548347</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="21">
- <Counter worker="0">4427980</Counter>
- <Counter worker="1">4428254</Counter>
- <Counter worker="2">4428184</Counter>
- <Counter worker="3">4428372</Counter>
- <Counter worker="4">4427834</Counter>
- <Counter worker="5">4427816</Counter>
- <Counter worker="6">4427990</Counter>
- <Counter worker="7">4428014</Counter>
- <Counter worker="8">4427634</Counter>
- <Counter worker="9">4427642</Counter>
- <Counter worker="10">4427639</Counter>
- <Counter worker="11">4427737</Counter>
- <Counter worker="12">4427339</Counter>
- <Counter worker="13">4427323</Counter>
- <Counter worker="14">4427446</Counter>
- <Counter worker="15">4427427</Counter>
- <Counter worker="16">4504730</Counter>
- <Counter worker="17">4504744</Counter>
- <Counter worker="18">4504739</Counter>
- <Counter worker="19">4504744</Counter>
- <Counter worker="20">4504678</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="22">
- <Counter worker="0">4452075</Counter>
- <Counter worker="1">4452381</Counter>
- <Counter worker="2">4452154</Counter>
- <Counter worker="3">4452302</Counter>
- <Counter worker="4">4451944</Counter>
- <Counter worker="5">4451919</Counter>
- <Counter worker="6">4451965</Counter>
- <Counter worker="7">4452004</Counter>
- <Counter worker="8">4451917</Counter>
- <Counter worker="9">4451934</Counter>
- <Counter worker="10">4451935</Counter>
- <Counter worker="11">4452019</Counter>
- <Counter worker="12">4451627</Counter>
- <Counter worker="13">4451630</Counter>
- <Counter worker="14">4451689</Counter>
- <Counter worker="15">4451672</Counter>
- <Counter worker="16">4506836</Counter>
- <Counter worker="17">4506837</Counter>
- <Counter worker="18">4506830</Counter>
- <Counter worker="19">4506828</Counter>
- <Counter worker="20">4506811</Counter>
- <Counter worker="21">4506822</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="23">
- <Counter worker="0">4435063</Counter>
- <Counter worker="1">4435355</Counter>
- <Counter worker="2">4435353</Counter>
- <Counter worker="3">4435496</Counter>
- <Counter worker="4">4435090</Counter>
- <Counter worker="5">4435092</Counter>
- <Counter worker="6">4435188</Counter>
- <Counter worker="7">4435200</Counter>
- <Counter worker="8">4432230</Counter>
- <Counter worker="9">4432253</Counter>
- <Counter worker="10">4432620</Counter>
- <Counter worker="11">4432748</Counter>
- <Counter worker="12">4431935</Counter>
- <Counter worker="13">4431916</Counter>
- <Counter worker="14">4432042</Counter>
- <Counter worker="15">4432055</Counter>
- <Counter worker="16">4476758</Counter>
- <Counter worker="17">4476739</Counter>
- <Counter worker="18">4476783</Counter>
- <Counter worker="19">4476776</Counter>
- <Counter worker="20">4476730</Counter>
- <Counter worker="21">4476742</Counter>
- <Counter worker="22">4476861</Counter>
- </SelfEvent>
- <SelfEvent activeWorker="24">
- <Counter worker="0">4462678</Counter>
- <Counter worker="1">4462968</Counter>
- <Counter worker="2">4462933</Counter>
- <Counter worker="3">4463030</Counter>
- <Counter worker="4">4462726</Counter>
- <Counter worker="5">4462724</Counter>
- <Counter worker="6">4462873</Counter>
- <Counter worker="7">4462866</Counter>
- <Counter worker="8">4464841</Counter>
- <Counter worker="9">4464847</Counter>
- <Counter worker="10">4464793</Counter>
- <Counter worker="11">4464948</Counter>
- <Counter worker="12">4464503</Counter>
- <Counter worker="13">4464493</Counter>
- <Counter worker="14">4464580</Counter>
- <Counter worker="15">4464597</Counter>
- <Counter worker="16">4475030</Counter>
- <Counter worker="17">4475042</Counter>
- <Counter worker="18">4474978</Counter>
- <Counter worker="19">4475018</Counter>
- <Counter worker="20">4474858</Counter>
- <Counter worker="21">4474851</Counter>
- <Counter worker="22">4475125</Counter>
- <Counter worker="23">4475172</Counter>
- </SelfEvent>
- <AllToOneEvent activeWorker="1">
- <Counter worker="0">4512749</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="2">
- <Counter worker="0">4478766</Counter>
- <Counter worker="1">8957974</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="3">
- <Counter worker="0">4507485</Counter>
- <Counter worker="1">9015419</Counter>
- <Counter worker="2">9015694</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="4">
- <Counter worker="0">4404320</Counter>
- <Counter worker="1">8809091</Counter>
- <Counter worker="2">8809371</Counter>
- <Counter worker="3">8809388</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="5">
- <Counter worker="0">4380598</Counter>
- <Counter worker="1">8788711</Counter>
- <Counter worker="2">8768400</Counter>
- <Counter worker="3">8768539</Counter>
- <Counter worker="4">8947075</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="6">
- <Counter worker="0">4384177</Counter>
- <Counter worker="1">8775468</Counter>
- <Counter worker="2">8770900</Counter>
- <Counter worker="3">8771021</Counter>
- <Counter worker="4">8778460</Counter>
- <Counter worker="5">8778497</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="7">
- <Counter worker="0">4375929</Counter>
- <Counter worker="1">8753666</Counter>
- <Counter worker="2">8752767</Counter>
- <Counter worker="3">8752874</Counter>
- <Counter worker="4">8753367</Counter>
- <Counter worker="5">8753374</Counter>
- <Counter worker="6">8840563</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="8">
- <Counter worker="0">4347550</Counter>
- <Counter worker="1">8697434</Counter>
- <Counter worker="2">8696453</Counter>
- <Counter worker="3">8696601</Counter>
- <Counter worker="4">8697025</Counter>
- <Counter worker="5">8696969</Counter>
- <Counter worker="6">8696444</Counter>
- <Counter worker="7">8696417</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="9">
- <Counter worker="0">4328236</Counter>
- <Counter worker="1">8682051</Counter>
- <Counter worker="2">8671656</Counter>
- <Counter worker="3">8671719</Counter>
- <Counter worker="4">8674666</Counter>
- <Counter worker="5">8674727</Counter>
- <Counter worker="6">8670649</Counter>
- <Counter worker="7">8667287</Counter>
- <Counter worker="8">9254597</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="10">
- <Counter worker="0">4311205</Counter>
- <Counter worker="1">8653563</Counter>
- <Counter worker="2">8640229</Counter>
- <Counter worker="3">8640342</Counter>
- <Counter worker="4">8643904</Counter>
- <Counter worker="5">8643865</Counter>
- <Counter worker="6">8639106</Counter>
- <Counter worker="7">8634769</Counter>
- <Counter worker="8">9212001</Counter>
- <Counter worker="9">9212064</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="11">
- <Counter worker="0">4338650</Counter>
- <Counter worker="1">8703013</Counter>
- <Counter worker="2">8692866</Counter>
- <Counter worker="3">8692981</Counter>
- <Counter worker="4">8695787</Counter>
- <Counter worker="5">8695808</Counter>
- <Counter worker="6">8691894</Counter>
- <Counter worker="7">8687943</Counter>
- <Counter worker="8">9103496</Counter>
- <Counter worker="9">9103489</Counter>
- <Counter worker="10">9103538</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="12">
- <Counter worker="0">4326588</Counter>
- <Counter worker="1">8680078</Counter>
- <Counter worker="2">8669077</Counter>
- <Counter worker="3">8669207</Counter>
- <Counter worker="4">8672685</Counter>
- <Counter worker="5">8672667</Counter>
- <Counter worker="6">8667903</Counter>
- <Counter worker="7">8664528</Counter>
- <Counter worker="8">8907170</Counter>
- <Counter worker="9">8907137</Counter>
- <Counter worker="10">8907177</Counter>
- <Counter worker="11">8907256</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="13">
- <Counter worker="0">4309927</Counter>
- <Counter worker="1">8643768</Counter>
- <Counter worker="2">8634342</Counter>
- <Counter worker="3">8634451</Counter>
- <Counter worker="4">8636838</Counter>
- <Counter worker="5">8636892</Counter>
- <Counter worker="6">8633550</Counter>
- <Counter worker="7">8629506</Counter>
- <Counter worker="8">8899997</Counter>
- <Counter worker="9">8900014</Counter>
- <Counter worker="10">8900104</Counter>
- <Counter worker="11">8900144</Counter>
- <Counter worker="12">8900125</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="14">
- <Counter worker="0">4335662</Counter>
- <Counter worker="1">8700274</Counter>
- <Counter worker="2">8688657</Counter>
- <Counter worker="3">8688789</Counter>
- <Counter worker="4">8692110</Counter>
- <Counter worker="5">8692102</Counter>
- <Counter worker="6">8687544</Counter>
- <Counter worker="7">8683259</Counter>
- <Counter worker="8">8808142</Counter>
- <Counter worker="9">8808143</Counter>
- <Counter worker="10">8808118</Counter>
- <Counter worker="11">8808151</Counter>
- <Counter worker="12">8808088</Counter>
- <Counter worker="13">8808120</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="15">
- <Counter worker="0">4314045</Counter>
- <Counter worker="1">8661973</Counter>
- <Counter worker="2">8648592</Counter>
- <Counter worker="3">8648764</Counter>
- <Counter worker="4">8652271</Counter>
- <Counter worker="5">8652318</Counter>
- <Counter worker="6">8647390</Counter>
- <Counter worker="7">8641916</Counter>
- <Counter worker="8">8797415</Counter>
- <Counter worker="9">8797422</Counter>
- <Counter worker="10">8797305</Counter>
- <Counter worker="11">8797328</Counter>
- <Counter worker="12">8797322</Counter>
- <Counter worker="13">8797357</Counter>
- <Counter worker="14">8802341</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="16">
- <Counter worker="0">4346816</Counter>
- <Counter worker="1">8715982</Counter>
- <Counter worker="2">8706981</Counter>
- <Counter worker="3">8707143</Counter>
- <Counter worker="4">8708920</Counter>
- <Counter worker="5">8708960</Counter>
- <Counter worker="6">8706447</Counter>
- <Counter worker="7">8703043</Counter>
- <Counter worker="8">8712344</Counter>
- <Counter worker="9">8712289</Counter>
- <Counter worker="10">8712131</Counter>
- <Counter worker="11">8712215</Counter>
- <Counter worker="12">8712289</Counter>
- <Counter worker="13">8712244</Counter>
- <Counter worker="14">8712147</Counter>
- <Counter worker="15">8712227</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="17">
- <Counter worker="0">4325645</Counter>
- <Counter worker="1">8685016</Counter>
- <Counter worker="2">8671607</Counter>
- <Counter worker="3">8671728</Counter>
- <Counter worker="4">8675196</Counter>
- <Counter worker="5">8675203</Counter>
- <Counter worker="6">8670269</Counter>
- <Counter worker="7">8665153</Counter>
- <Counter worker="8">8673438</Counter>
- <Counter worker="9">8673444</Counter>
- <Counter worker="10">8673183</Counter>
- <Counter worker="11">8673276</Counter>
- <Counter worker="12">8673321</Counter>
- <Counter worker="13">8673304</Counter>
- <Counter worker="14">8673230</Counter>
- <Counter worker="15">8673240</Counter>
- <Counter worker="16">9251521</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="18">
- <Counter worker="0">4309289</Counter>
- <Counter worker="1">8647898</Counter>
- <Counter worker="2">8636314</Counter>
- <Counter worker="3">8636411</Counter>
- <Counter worker="4">8639557</Counter>
- <Counter worker="5">8639645</Counter>
- <Counter worker="6">8635149</Counter>
- <Counter worker="7">8630636</Counter>
- <Counter worker="8">8641335</Counter>
- <Counter worker="9">8641320</Counter>
- <Counter worker="10">8641131</Counter>
- <Counter worker="11">8641178</Counter>
- <Counter worker="12">8641173</Counter>
- <Counter worker="13">8641229</Counter>
- <Counter worker="14">8641116</Counter>
- <Counter worker="15">8641130</Counter>
- <Counter worker="16">9208457</Counter>
- <Counter worker="17">9208447</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="19">
- <Counter worker="0">4339177</Counter>
- <Counter worker="1">8712486</Counter>
- <Counter worker="2">8698865</Counter>
- <Counter worker="3">8699011</Counter>
- <Counter worker="4">8702321</Counter>
- <Counter worker="5">8702299</Counter>
- <Counter worker="6">8697706</Counter>
- <Counter worker="7">8692411</Counter>
- <Counter worker="8">8691700</Counter>
- <Counter worker="9">8691718</Counter>
- <Counter worker="10">8691530</Counter>
- <Counter worker="11">8691574</Counter>
- <Counter worker="12">8691598</Counter>
- <Counter worker="13">8691595</Counter>
- <Counter worker="14">8691515</Counter>
- <Counter worker="15">8691555</Counter>
- <Counter worker="16">9098995</Counter>
- <Counter worker="17">9098975</Counter>
- <Counter worker="18">9098976</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="20">
- <Counter worker="0">4323231</Counter>
- <Counter worker="1">8670659</Counter>
- <Counter worker="2">8660830</Counter>
- <Counter worker="3">8660891</Counter>
- <Counter worker="4">8663710</Counter>
- <Counter worker="5">8663717</Counter>
- <Counter worker="6">8659875</Counter>
- <Counter worker="7">8656639</Counter>
- <Counter worker="8">8654156</Counter>
- <Counter worker="9">8654183</Counter>
- <Counter worker="10">8654050</Counter>
- <Counter worker="11">8654092</Counter>
- <Counter worker="12">8654106</Counter>
- <Counter worker="13">8654141</Counter>
- <Counter worker="14">8654084</Counter>
- <Counter worker="15">8654064</Counter>
- <Counter worker="16">8891464</Counter>
- <Counter worker="17">8891387</Counter>
- <Counter worker="18">8891423</Counter>
- <Counter worker="19">8891522</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="21">
- <Counter worker="0">4306028</Counter>
- <Counter worker="1">8633314</Counter>
- <Counter worker="2">8624564</Counter>
- <Counter worker="3">8624678</Counter>
- <Counter worker="4">8627581</Counter>
- <Counter worker="5">8627623</Counter>
- <Counter worker="6">8623580</Counter>
- <Counter worker="7">8621273</Counter>
- <Counter worker="8">8630481</Counter>
- <Counter worker="9">8630453</Counter>
- <Counter worker="10">8630282</Counter>
- <Counter worker="11">8630331</Counter>
- <Counter worker="12">8630383</Counter>
- <Counter worker="13">8630377</Counter>
- <Counter worker="14">8630254</Counter>
- <Counter worker="15">8630302</Counter>
- <Counter worker="16">8882786</Counter>
- <Counter worker="17">8882786</Counter>
- <Counter worker="18">8882842</Counter>
- <Counter worker="19">8882888</Counter>
- <Counter worker="20">8901459</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="22">
- <Counter worker="0">4332214</Counter>
- <Counter worker="1">8694309</Counter>
- <Counter worker="2">8682276</Counter>
- <Counter worker="3">8682411</Counter>
- <Counter worker="4">8685904</Counter>
- <Counter worker="5">8685918</Counter>
- <Counter worker="6">8681134</Counter>
- <Counter worker="7">8676778</Counter>
- <Counter worker="8">8690139</Counter>
- <Counter worker="9">8690092</Counter>
- <Counter worker="10">8689940</Counter>
- <Counter worker="11">8689995</Counter>
- <Counter worker="12">8690031</Counter>
- <Counter worker="13">8690036</Counter>
- <Counter worker="14">8689958</Counter>
- <Counter worker="15">8689930</Counter>
- <Counter worker="16">8792896</Counter>
- <Counter worker="17">8792916</Counter>
- <Counter worker="18">8792896</Counter>
- <Counter worker="19">8792966</Counter>
- <Counter worker="20">8792943</Counter>
- <Counter worker="21">8792939</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="23">
- <Counter worker="0">4316784</Counter>
- <Counter worker="1">8662468</Counter>
- <Counter worker="2">8650651</Counter>
- <Counter worker="3">8650782</Counter>
- <Counter worker="4">8654092</Counter>
- <Counter worker="5">8654022</Counter>
- <Counter worker="6">8649506</Counter>
- <Counter worker="7">8645904</Counter>
- <Counter worker="8">8639667</Counter>
- <Counter worker="9">8639654</Counter>
- <Counter worker="10">8639505</Counter>
- <Counter worker="11">8639593</Counter>
- <Counter worker="12">8639683</Counter>
- <Counter worker="13">8639686</Counter>
- <Counter worker="14">8639487</Counter>
- <Counter worker="15">8639547</Counter>
- <Counter worker="16">8786893</Counter>
- <Counter worker="17">8786917</Counter>
- <Counter worker="18">8786678</Counter>
- <Counter worker="19">8786756</Counter>
- <Counter worker="20">8786878</Counter>
- <Counter worker="21">8786879</Counter>
- <Counter worker="22">8794112</Counter>
- </AllToOneEvent>
- <AllToOneEvent activeWorker="24">
- <Counter worker="0">4340462</Counter>
- <Counter worker="1">8708543</Counter>
- <Counter worker="2">8696739</Counter>
- <Counter worker="3">8696800</Counter>
- <Counter worker="4">8699717</Counter>
- <Counter worker="5">8699709</Counter>
- <Counter worker="6">8695657</Counter>
- <Counter worker="7">8691968</Counter>
- <Counter worker="8">8714142</Counter>
- <Counter worker="9">8714066</Counter>
- <Counter worker="10">8714016</Counter>
- <Counter worker="11">8714062</Counter>
- <Counter worker="12">8714040</Counter>
- <Counter worker="13">8714116</Counter>
- <Counter worker="14">8714041</Counter>
- <Counter worker="15">8714021</Counter>
- <Counter worker="16">8722288</Counter>
- <Counter worker="17">8722251</Counter>
- <Counter worker="18">8722033</Counter>
- <Counter worker="19">8722156</Counter>
- <Counter worker="20">8722336</Counter>
- <Counter worker="21">8722308</Counter>
- <Counter worker="22">8722297</Counter>
- <Counter worker="23">8722331</Counter>
- </AllToOneEvent>
- <OneMutex activeWorker="1">
- <Counter worker="0">4931822</Counter>
- </OneMutex>
- <OneMutex activeWorker="2">
- <Counter worker="0">245503</Counter>
- <Counter worker="1">245503</Counter>
- </OneMutex>
- <OneMutex activeWorker="3">
- <Counter worker="0">68887</Counter>
- <Counter worker="1">68887</Counter>
- <Counter worker="2">68886</Counter>
- </OneMutex>
- <OneMutex activeWorker="4">
- <Counter worker="0">65075</Counter>
- <Counter worker="1">65075</Counter>
- <Counter worker="2">65075</Counter>
- <Counter worker="3">65075</Counter>
- </OneMutex>
- <OneMutex activeWorker="5">
- <Counter worker="0">39944</Counter>
- <Counter worker="1">39944</Counter>
- <Counter worker="2">39944</Counter>
- <Counter worker="3">39945</Counter>
- <Counter worker="4">39944</Counter>
- </OneMutex>
- <OneMutex activeWorker="6">
- <Counter worker="0">49925</Counter>
- <Counter worker="1">49925</Counter>
- <Counter worker="2">49924</Counter>
- <Counter worker="3">49925</Counter>
- <Counter worker="4">49924</Counter>
- <Counter worker="5">49925</Counter>
- </OneMutex>
- <OneMutex activeWorker="7">
- <Counter worker="0">27616</Counter>
- <Counter worker="1">27615</Counter>
- <Counter worker="2">27616</Counter>
- <Counter worker="3">27616</Counter>
- <Counter worker="4">27616</Counter>
- <Counter worker="5">27615</Counter>
- <Counter worker="6">27615</Counter>
- </OneMutex>
- <OneMutex activeWorker="8">
- <Counter worker="0">22376</Counter>
- <Counter worker="1">22377</Counter>
- <Counter worker="2">22377</Counter>
- <Counter worker="3">22376</Counter>
- <Counter worker="4">22377</Counter>
- <Counter worker="5">22376</Counter>
- <Counter worker="6">22377</Counter>
- <Counter worker="7">22377</Counter>
- </OneMutex>
- <OneMutex activeWorker="9">
- <Counter worker="0">19838</Counter>
- <Counter worker="1">19838</Counter>
- <Counter worker="2">19838</Counter>
- <Counter worker="3">19838</Counter>
- <Counter worker="4">19838</Counter>
- <Counter worker="5">19838</Counter>
- <Counter worker="6">19838</Counter>
- <Counter worker="7">19838</Counter>
- <Counter worker="8">19838</Counter>
- </OneMutex>
- <OneMutex activeWorker="10">
- <Counter worker="0">12036</Counter>
- <Counter worker="1">12036</Counter>
- <Counter worker="2">12036</Counter>
- <Counter worker="3">12036</Counter>
- <Counter worker="4">12037</Counter>
- <Counter worker="5">12037</Counter>
- <Counter worker="6">12036</Counter>
- <Counter worker="7">12037</Counter>
- <Counter worker="8">12036</Counter>
- <Counter worker="9">12036</Counter>
- </OneMutex>
- <OneMutex activeWorker="11">
- <Counter worker="0">14679</Counter>
- <Counter worker="1">14679</Counter>
- <Counter worker="2">14679</Counter>
- <Counter worker="3">14679</Counter>
- <Counter worker="4">14679</Counter>
- <Counter worker="5">14679</Counter>
- <Counter worker="6">14679</Counter>
- <Counter worker="7">14679</Counter>
- <Counter worker="8">14679</Counter>
- <Counter worker="9">14678</Counter>
- <Counter worker="10">14679</Counter>
- </OneMutex>
- <OneMutex activeWorker="12">
- <Counter worker="0">9715</Counter>
- <Counter worker="1">9715</Counter>
- <Counter worker="2">9715</Counter>
- <Counter worker="3">9714</Counter>
- <Counter worker="4">9714</Counter>
- <Counter worker="5">9714</Counter>
- <Counter worker="6">9714</Counter>
- <Counter worker="7">9715</Counter>
- <Counter worker="8">9714</Counter>
- <Counter worker="9">9714</Counter>
- <Counter worker="10">9715</Counter>
- <Counter worker="11">9714</Counter>
- </OneMutex>
- <OneMutex activeWorker="13">
- <Counter worker="0">8614</Counter>
- <Counter worker="1">8614</Counter>
- <Counter worker="2">8614</Counter>
- <Counter worker="3">8614</Counter>
- <Counter worker="4">8613</Counter>
- <Counter worker="5">8613</Counter>
- <Counter worker="6">8615</Counter>
- <Counter worker="7">8613</Counter>
- <Counter worker="8">8613</Counter>
- <Counter worker="9">8613</Counter>
- <Counter worker="10">8613</Counter>
- <Counter worker="11">8613</Counter>
- <Counter worker="12">8614</Counter>
- </OneMutex>
- <OneMutex activeWorker="14">
- <Counter worker="0">8930</Counter>
- <Counter worker="1">8929</Counter>
- <Counter worker="2">8929</Counter>
- <Counter worker="3">8930</Counter>
- <Counter worker="4">8930</Counter>
- <Counter worker="5">8930</Counter>
- <Counter worker="6">8929</Counter>
- <Counter worker="7">8929</Counter>
- <Counter worker="8">8929</Counter>
- <Counter worker="9">8930</Counter>
- <Counter worker="10">8929</Counter>
- <Counter worker="11">8929</Counter>
- <Counter worker="12">8930</Counter>
- <Counter worker="13">8929</Counter>
- </OneMutex>
- <OneMutex activeWorker="15">
- <Counter worker="0">6001</Counter>
- <Counter worker="1">6002</Counter>
- <Counter worker="2">6002</Counter>
- <Counter worker="3">6002</Counter>
- <Counter worker="4">6003</Counter>
- <Counter worker="5">6001</Counter>
- <Counter worker="6">6002</Counter>
- <Counter worker="7">6002</Counter>
- <Counter worker="8">6002</Counter>
- <Counter worker="9">6002</Counter>
- <Counter worker="10">6002</Counter>
- <Counter worker="11">6002</Counter>
- <Counter worker="12">6001</Counter>
- <Counter worker="13">6002</Counter>
- <Counter worker="14">6002</Counter>
- </OneMutex>
- <OneMutex activeWorker="16">
- <Counter worker="0">7934</Counter>
- <Counter worker="1">7934</Counter>
- <Counter worker="2">7936</Counter>
- <Counter worker="3">7935</Counter>
- <Counter worker="4">7935</Counter>
- <Counter worker="5">7934</Counter>
- <Counter worker="6">7935</Counter>
- <Counter worker="7">7935</Counter>
- <Counter worker="8">7934</Counter>
- <Counter worker="9">7934</Counter>
- <Counter worker="10">7934</Counter>
- <Counter worker="11">7934</Counter>
- <Counter worker="12">7935</Counter>
- <Counter worker="13">7935</Counter>
- <Counter worker="14">7935</Counter>
- <Counter worker="15">7934</Counter>
- </OneMutex>
- <OneMutex activeWorker="17">
- <Counter worker="0">4099</Counter>
- <Counter worker="1">4099</Counter>
- <Counter worker="2">4098</Counter>
- <Counter worker="3">4098</Counter>
- <Counter worker="4">4098</Counter>
- <Counter worker="5">4098</Counter>
- <Counter worker="6">4098</Counter>
- <Counter worker="7">4098</Counter>
- <Counter worker="8">4098</Counter>
- <Counter worker="9">4098</Counter>
- <Counter worker="10">4098</Counter>
- <Counter worker="11">4098</Counter>
- <Counter worker="12">4098</Counter>
- <Counter worker="13">4098</Counter>
- <Counter worker="14">4098</Counter>
- <Counter worker="15">4099</Counter>
- <Counter worker="16">4098</Counter>
- </OneMutex>
- <OneMutex activeWorker="18">
- <Counter worker="0">6990</Counter>
- <Counter worker="1">6989</Counter>
- <Counter worker="2">6989</Counter>
- <Counter worker="3">6989</Counter>
- <Counter worker="4">6989</Counter>
- <Counter worker="5">6990</Counter>
- <Counter worker="6">6989</Counter>
- <Counter worker="7">6989</Counter>
- <Counter worker="8">6989</Counter>
- <Counter worker="9">6990</Counter>
- <Counter worker="10">6989</Counter>
- <Counter worker="11">6989</Counter>
- <Counter worker="12">6989</Counter>
- <Counter worker="13">6990</Counter>
- <Counter worker="14">6990</Counter>
- <Counter worker="15">6990</Counter>
- <Counter worker="16">6990</Counter>
- <Counter worker="17">6989</Counter>
- </OneMutex>
- <OneMutex activeWorker="19">
- <Counter worker="0">3939</Counter>
- <Counter worker="1">3938</Counter>
- <Counter worker="2">3938</Counter>
- <Counter worker="3">3938</Counter>
- <Counter worker="4">3939</Counter>
- <Counter worker="5">3938</Counter>
- <Counter worker="6">3939</Counter>
- <Counter worker="7">3938</Counter>
- <Counter worker="8">3939</Counter>
- <Counter worker="9">3938</Counter>
- <Counter worker="10">3939</Counter>
- <Counter worker="11">3938</Counter>
- <Counter worker="12">3939</Counter>
- <Counter worker="13">3939</Counter>
- <Counter worker="14">3939</Counter>
- <Counter worker="15">3938</Counter>
- <Counter worker="16">3938</Counter>
- <Counter worker="17">3938</Counter>
- <Counter worker="18">3939</Counter>
- </OneMutex>
- <OneMutex activeWorker="20">
- <Counter worker="0">3096</Counter>
- <Counter worker="1">3096</Counter>
- <Counter worker="2">3097</Counter>
- <Counter worker="3">3097</Counter>
- <Counter worker="4">3097</Counter>
- <Counter worker="5">3096</Counter>
- <Counter worker="6">3096</Counter>
- <Counter worker="7">3097</Counter>
- <Counter worker="8">3097</Counter>
- <Counter worker="9">3097</Counter>
- <Counter worker="10">3097</Counter>
- <Counter worker="11">3097</Counter>
- <Counter worker="12">3097</Counter>
- <Counter worker="13">3098</Counter>
- <Counter worker="14">3097</Counter>
- <Counter worker="15">3097</Counter>
- <Counter worker="16">3097</Counter>
- <Counter worker="17">3097</Counter>
- <Counter worker="18">3097</Counter>
- <Counter worker="19">3097</Counter>
- </OneMutex>
- <OneMutex activeWorker="21">
- <Counter worker="0">2721</Counter>
- <Counter worker="1">2722</Counter>
- <Counter worker="2">2721</Counter>
- <Counter worker="3">2721</Counter>
- <Counter worker="4">2722</Counter>
- <Counter worker="5">2721</Counter>
- <Counter worker="6">2721</Counter>
- <Counter worker="7">2721</Counter>
- <Counter worker="8">2721</Counter>
- <Counter worker="9">2721</Counter>
- <Counter worker="10">2722</Counter>
- <Counter worker="11">2721</Counter>
- <Counter worker="12">2722</Counter>
- <Counter worker="13">2722</Counter>
- <Counter worker="14">2721</Counter>
- <Counter worker="15">2721</Counter>
- <Counter worker="16">2721</Counter>
- <Counter worker="17">2721</Counter>
- <Counter worker="18">2722</Counter>
- <Counter worker="19">2722</Counter>
- <Counter worker="20">2721</Counter>
- </OneMutex>
- <OneMutex activeWorker="22">
- <Counter worker="0">5060</Counter>
- <Counter worker="1">5060</Counter>
- <Counter worker="2">5060</Counter>
- <Counter worker="3">5060</Counter>
- <Counter worker="4">5060</Counter>
- <Counter worker="5">5060</Counter>
- <Counter worker="6">5060</Counter>
- <Counter worker="7">5060</Counter>
- <Counter worker="8">5060</Counter>
- <Counter worker="9">5060</Counter>
- <Counter worker="10">5060</Counter>
- <Counter worker="11">5060</Counter>
- <Counter worker="12">5060</Counter>
- <Counter worker="13">5060</Counter>
- <Counter worker="14">5060</Counter>
- <Counter worker="15">5060</Counter>
- <Counter worker="16">5060</Counter>
- <Counter worker="17">5060</Counter>
- <Counter worker="18">5060</Counter>
- <Counter worker="19">5060</Counter>
- <Counter worker="20">5060</Counter>
- <Counter worker="21">5060</Counter>
- </OneMutex>
- <OneMutex activeWorker="23">
- <Counter worker="0">4582</Counter>
- <Counter worker="1">4582</Counter>
- <Counter worker="2">4582</Counter>
- <Counter worker="3">4582</Counter>
- <Counter worker="4">4581</Counter>
- <Counter worker="5">4581</Counter>
- <Counter worker="6">4582</Counter>
- <Counter worker="7">4581</Counter>
- <Counter worker="8">4582</Counter>
- <Counter worker="9">4582</Counter>
- <Counter worker="10">4581</Counter>
- <Counter worker="11">4581</Counter>
- <Counter worker="12">4582</Counter>
- <Counter worker="13">4581</Counter>
- <Counter worker="14">4581</Counter>
- <Counter worker="15">4582</Counter>
- <Counter worker="16">4582</Counter>
- <Counter worker="17">4582</Counter>
- <Counter worker="18">4582</Counter>
- <Counter worker="19">4582</Counter>
- <Counter worker="20">4582</Counter>
- <Counter worker="21">4582</Counter>
- <Counter worker="22">4581</Counter>
- </OneMutex>
- <OneMutex activeWorker="24">
- <Counter worker="0">2433</Counter>
- <Counter worker="1">2433</Counter>
- <Counter worker="2">2432</Counter>
- <Counter worker="3">2433</Counter>
- <Counter worker="4">2432</Counter>
- <Counter worker="5">2432</Counter>
- <Counter worker="6">2433</Counter>
- <Counter worker="7">2433</Counter>
- <Counter worker="8">2433</Counter>
- <Counter worker="9">2432</Counter>
- <Counter worker="10">2433</Counter>
- <Counter worker="11">2433</Counter>
- <Counter worker="12">2433</Counter>
- <Counter worker="13">2433</Counter>
- <Counter worker="14">2433</Counter>
- <Counter worker="15">2432</Counter>
- <Counter worker="16">2433</Counter>
- <Counter worker="17">2432</Counter>
- <Counter worker="18">2433</Counter>
- <Counter worker="19">2432</Counter>
- <Counter worker="20">2433</Counter>
- <Counter worker="21">2433</Counter>
- <Counter worker="22">2434</Counter>
- <Counter worker="23">2432</Counter>
- </OneMutex>
- <ManyMutex activeWorker="1">
- <Counter worker="0">5001647</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="2">
- <Counter worker="0">4932033</Counter>
- <Counter worker="1">4932309</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="3">
- <Counter worker="0">4355923</Counter>
- <Counter worker="1">4925539</Counter>
- <Counter worker="2">4356158</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="4">
- <Counter worker="0">4276198</Counter>
- <Counter worker="1">4793125</Counter>
- <Counter worker="2">4792773</Counter>
- <Counter worker="3">4276295</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="5">
- <Counter worker="0">4735869</Counter>
- <Counter worker="1">4177346</Counter>
- <Counter worker="2">4736094</Counter>
- <Counter worker="3">4235871</Counter>
- <Counter worker="4">4731095</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="6">
- <Counter worker="0">4716270</Counter>
- <Counter worker="1">4258387</Counter>
- <Counter worker="2">4268838</Counter>
- <Counter worker="3">4698974</Counter>
- <Counter worker="4">4172075</Counter>
- <Counter worker="5">4719026</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="7">
- <Counter worker="0">4205327</Counter>
- <Counter worker="1">4202415</Counter>
- <Counter worker="2">4728528</Counter>
- <Counter worker="3">4741751</Counter>
- <Counter worker="4">4661144</Counter>
- <Counter worker="5">4728823</Counter>
- <Counter worker="6">4741645</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="8">
- <Counter worker="0">4700906</Counter>
- <Counter worker="1">4085992</Counter>
- <Counter worker="2">4700875</Counter>
- <Counter worker="3">4672269</Counter>
- <Counter worker="4">4641742</Counter>
- <Counter worker="5">4113941</Counter>
- <Counter worker="6">4634133</Counter>
- <Counter worker="7">4069049</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="9">
- <Counter worker="0">4706705</Counter>
- <Counter worker="1">2830546</Counter>
- <Counter worker="2">3640848</Counter>
- <Counter worker="3">4638947</Counter>
- <Counter worker="4">4106355</Counter>
- <Counter worker="5">4634726</Counter>
- <Counter worker="6">4199317</Counter>
- <Counter worker="7">4215455</Counter>
- <Counter worker="8">4706736</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="10">
- <Counter worker="0">4591261</Counter>
- <Counter worker="1">4967739</Counter>
- <Counter worker="2">4618369</Counter>
- <Counter worker="3">4063482</Counter>
- <Counter worker="4">4967727</Counter>
- <Counter worker="5">4162082</Counter>
- <Counter worker="6">4048161</Counter>
- <Counter worker="7">4649148</Counter>
- <Counter worker="8">4649140</Counter>
- <Counter worker="9">4631859</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="11">
- <Counter worker="0">4370677</Counter>
- <Counter worker="1">3026309</Counter>
- <Counter worker="2">2913790</Counter>
- <Counter worker="3">4677581</Counter>
- <Counter worker="4">4692968</Counter>
- <Counter worker="5">4780273</Counter>
- <Counter worker="6">4693509</Counter>
- <Counter worker="7">4495802</Counter>
- <Counter worker="8">4704240</Counter>
- <Counter worker="9">4703550</Counter>
- <Counter worker="10">4677478</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="12">
- <Counter worker="0">4107344</Counter>
- <Counter worker="1">4649662</Counter>
- <Counter worker="2">4676522</Counter>
- <Counter worker="3">3156738</Counter>
- <Counter worker="4">4671133</Counter>
- <Counter worker="5">4154985</Counter>
- <Counter worker="6">4785186</Counter>
- <Counter worker="7">4670956</Counter>
- <Counter worker="8">4126203</Counter>
- <Counter worker="9">4785157</Counter>
- <Counter worker="10">2842002</Counter>
- <Counter worker="11">4704576</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="13">
- <Counter worker="0">4658248</Counter>
- <Counter worker="1">3050246</Counter>
- <Counter worker="2">4822861</Counter>
- <Counter worker="3">2829258</Counter>
- <Counter worker="4">4804042</Counter>
- <Counter worker="5">4658270</Counter>
- <Counter worker="6">4651897</Counter>
- <Counter worker="7">4803978</Counter>
- <Counter worker="8">4618739</Counter>
- <Counter worker="9">4080735</Counter>
- <Counter worker="10">4641078</Counter>
- <Counter worker="11">4104333</Counter>
- <Counter worker="12">4085914</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="14">
- <Counter worker="0">2833004</Counter>
- <Counter worker="1">4774206</Counter>
- <Counter worker="2">4681710</Counter>
- <Counter worker="3">4191970</Counter>
- <Counter worker="4">2835639</Counter>
- <Counter worker="5">2832535</Counter>
- <Counter worker="6">4208974</Counter>
- <Counter worker="7">4500175</Counter>
- <Counter worker="8">4634735</Counter>
- <Counter worker="9">4534048</Counter>
- <Counter worker="10">4774225</Counter>
- <Counter worker="11">4367224</Counter>
- <Counter worker="12">2119256</Counter>
- <Counter worker="13">3685038</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="15">
- <Counter worker="0">4679948</Counter>
- <Counter worker="1">4679956</Counter>
- <Counter worker="2">4689624</Counter>
- <Counter worker="3">4095475</Counter>
- <Counter worker="4">4633249</Counter>
- <Counter worker="5">4694233</Counter>
- <Counter worker="6">4691234</Counter>
- <Counter worker="7">4633249</Counter>
- <Counter worker="8">4689597</Counter>
- <Counter worker="9">4689904</Counter>
- <Counter worker="10">4636792</Counter>
- <Counter worker="11">2890683</Counter>
- <Counter worker="12">4334695</Counter>
- <Counter worker="13">2890353</Counter>
- <Counter worker="14">4691398</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="16">
- <Counter worker="0">4721449</Counter>
- <Counter worker="1">4641755</Counter>
- <Counter worker="2">3147235</Counter>
- <Counter worker="3">4677026</Counter>
- <Counter worker="4">2858837</Counter>
- <Counter worker="5">4699482</Counter>
- <Counter worker="6">4721331</Counter>
- <Counter worker="7">3994802</Counter>
- <Counter worker="8">4699317</Counter>
- <Counter worker="9">4696404</Counter>
- <Counter worker="10">4589085</Counter>
- <Counter worker="11">4108168</Counter>
- <Counter worker="12">4720500</Counter>
- <Counter worker="13">4676953</Counter>
- <Counter worker="14">4643243</Counter>
- <Counter worker="15">4720497</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="17">
- <Counter worker="0">4645420</Counter>
- <Counter worker="1">4680196</Counter>
- <Counter worker="2">4686848</Counter>
- <Counter worker="3">4647270</Counter>
- <Counter worker="4">4681748</Counter>
- <Counter worker="5">4634369</Counter>
- <Counter worker="6">4682734</Counter>
- <Counter worker="7">2856905</Counter>
- <Counter worker="8">3516034</Counter>
- <Counter worker="9">4636223</Counter>
- <Counter worker="10">4684119</Counter>
- <Counter worker="11">4684619</Counter>
- <Counter worker="12">4633361</Counter>
- <Counter worker="13">4633572</Counter>
- <Counter worker="14">4644454</Counter>
- <Counter worker="15">4642238</Counter>
- <Counter worker="16">4680224</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="18">
- <Counter worker="0">3968745</Counter>
- <Counter worker="1">4692720</Counter>
- <Counter worker="2">4691924</Counter>
- <Counter worker="3">4927117</Counter>
- <Counter worker="4">4684103</Counter>
- <Counter worker="5">4686784</Counter>
- <Counter worker="6">4552054</Counter>
- <Counter worker="7">4687372</Counter>
- <Counter worker="8">2814828</Counter>
- <Counter worker="9">4678196</Counter>
- <Counter worker="10">3019413</Counter>
- <Counter worker="11">4702658</Counter>
- <Counter worker="12">2799802</Counter>
- <Counter worker="13">3006627</Counter>
- <Counter worker="14">4683463</Counter>
- <Counter worker="15">4677772</Counter>
- <Counter worker="16">4645772</Counter>
- <Counter worker="17">4927146</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="19">
- <Counter worker="0">4601592</Counter>
- <Counter worker="1">4714461</Counter>
- <Counter worker="2">4883685</Counter>
- <Counter worker="3">3028508</Counter>
- <Counter worker="4">4654222</Counter>
- <Counter worker="5">2933007</Counter>
- <Counter worker="6">4724241</Counter>
- <Counter worker="7">4718472</Counter>
- <Counter worker="8">4570831</Counter>
- <Counter worker="9">4718483</Counter>
- <Counter worker="10">4724097</Counter>
- <Counter worker="11">4713870</Counter>
- <Counter worker="12">4703195</Counter>
- <Counter worker="13">4165705</Counter>
- <Counter worker="14">4711178</Counter>
- <Counter worker="15">4883702</Counter>
- <Counter worker="16">4711294</Counter>
- <Counter worker="17">4703238</Counter>
- <Counter worker="18">4654312</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="20">
- <Counter worker="0">4651301</Counter>
- <Counter worker="1">3690905</Counter>
- <Counter worker="2">3105263</Counter>
- <Counter worker="3">4697287</Counter>
- <Counter worker="4">4638522</Counter>
- <Counter worker="5">4650722</Counter>
- <Counter worker="6">2962962</Counter>
- <Counter worker="7">4112623</Counter>
- <Counter worker="8">4638656</Counter>
- <Counter worker="9">2033536</Counter>
- <Counter worker="10">4675666</Counter>
- <Counter worker="11">4467698</Counter>
- <Counter worker="12">4389797</Counter>
- <Counter worker="13">4468602</Counter>
- <Counter worker="14">2818900</Counter>
- <Counter worker="15">4536994</Counter>
- <Counter worker="16">3093343</Counter>
- <Counter worker="17">2819049</Counter>
- <Counter worker="18">3060340</Counter>
- <Counter worker="19">2902497</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="21">
- <Counter worker="0">2812125</Counter>
- <Counter worker="1">2976769</Counter>
- <Counter worker="2">4554538</Counter>
- <Counter worker="3">4606816</Counter>
- <Counter worker="4">4479562</Counter>
- <Counter worker="5">2992810</Counter>
- <Counter worker="6">4661692</Counter>
- <Counter worker="7">4709972</Counter>
- <Counter worker="8">4597719</Counter>
- <Counter worker="9">4608597</Counter>
- <Counter worker="10">4609552</Counter>
- <Counter worker="11">4709758</Counter>
- <Counter worker="12">4661224</Counter>
- <Counter worker="13">4519832</Counter>
- <Counter worker="14">4746960</Counter>
- <Counter worker="15">4609189</Counter>
- <Counter worker="16">4752379</Counter>
- <Counter worker="17">4596670</Counter>
- <Counter worker="18">4810470</Counter>
- <Counter worker="19">2858016</Counter>
- <Counter worker="20">4752412</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="22">
- <Counter worker="0">4702947</Counter>
- <Counter worker="1">4443206</Counter>
- <Counter worker="2">4727685</Counter>
- <Counter worker="3">4540248</Counter>
- <Counter worker="4">4658159</Counter>
- <Counter worker="5">4126514</Counter>
- <Counter worker="6">4791039</Counter>
- <Counter worker="7">2894757</Counter>
- <Counter worker="8">1955087</Counter>
- <Counter worker="9">4702969</Counter>
- <Counter worker="10">2817541</Counter>
- <Counter worker="11">4420635</Counter>
- <Counter worker="12">2921923</Counter>
- <Counter worker="13">2650900</Counter>
- <Counter worker="14">2862766</Counter>
- <Counter worker="15">3687545</Counter>
- <Counter worker="16">2874883</Counter>
- <Counter worker="17">2940336</Counter>
- <Counter worker="18">2776021</Counter>
- <Counter worker="19">3127586</Counter>
- <Counter worker="20">4090728</Counter>
- <Counter worker="21">2337871</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="23">
- <Counter worker="0">4529255</Counter>
- <Counter worker="1">4718656</Counter>
- <Counter worker="2">1922439</Counter>
- <Counter worker="3">4693004</Counter>
- <Counter worker="4">4684958</Counter>
- <Counter worker="5">2886050</Counter>
- <Counter worker="6">3066101</Counter>
- <Counter worker="7">3610129</Counter>
- <Counter worker="8">2810938</Counter>
- <Counter worker="9">4633095</Counter>
- <Counter worker="10">2900751</Counter>
- <Counter worker="11">4632884</Counter>
- <Counter worker="12">4692840</Counter>
- <Counter worker="13">4420163</Counter>
- <Counter worker="14">1996345</Counter>
- <Counter worker="15">3643801</Counter>
- <Counter worker="16">2826674</Counter>
- <Counter worker="17">2883468</Counter>
- <Counter worker="18">4558270</Counter>
- <Counter worker="19">4416614</Counter>
- <Counter worker="20">2860484</Counter>
- <Counter worker="21">2892545</Counter>
- <Counter worker="22">4488266</Counter>
- </ManyMutex>
- <ManyMutex activeWorker="24">
- <Counter worker="0">4578849</Counter>
- <Counter worker="1">4636230</Counter>
- <Counter worker="2">3022974</Counter>
- <Counter worker="3">2822574</Counter>
- <Counter worker="4">4731087</Counter>
- <Counter worker="5">4731131</Counter>
- <Counter worker="6">4689840</Counter>
- <Counter worker="7">4070922</Counter>
- <Counter worker="8">4689653</Counter>
- <Counter worker="9">4477380</Counter>
- <Counter worker="10">4642053</Counter>
- <Counter worker="11">4731990</Counter>
- <Counter worker="12">2819820</Counter>
- <Counter worker="13">4097315</Counter>
- <Counter worker="14">2839488</Counter>
- <Counter worker="15">2107643</Counter>
- <Counter worker="16">4682013</Counter>
- <Counter worker="17">4682337</Counter>
- <Counter worker="18">4583332</Counter>
- <Counter worker="19">3013463</Counter>
- <Counter worker="20">4532706</Counter>
- <Counter worker="21">4653764</Counter>
- <Counter worker="22">3720162</Counter>
- <Counter worker="23">4120464</Counter>
- </ManyMutex>
- <SelfMsg activeWorker="1">
- <Counter worker="0">3484359</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="2">
- <Counter worker="0">3291417</Counter>
- <Counter worker="1">3291652</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="3">
- <Counter worker="0">3243274</Counter>
- <Counter worker="1">2918376</Counter>
- <Counter worker="2">2983608</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="4">
- <Counter worker="0">3203853</Counter>
- <Counter worker="1">2895866</Counter>
- <Counter worker="2">2917648</Counter>
- <Counter worker="3">3306218</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="5">
- <Counter worker="0">3172566</Counter>
- <Counter worker="1">2850649</Counter>
- <Counter worker="2">2876474</Counter>
- <Counter worker="3">2993084</Counter>
- <Counter worker="4">3037697</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="6">
- <Counter worker="0">3176969</Counter>
- <Counter worker="1">2852043</Counter>
- <Counter worker="2">2878751</Counter>
- <Counter worker="3">2996638</Counter>
- <Counter worker="4">2798362</Counter>
- <Counter worker="5">3098269</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="7">
- <Counter worker="0">3143837</Counter>
- <Counter worker="1">2820072</Counter>
- <Counter worker="2">2849545</Counter>
- <Counter worker="3">2965415</Counter>
- <Counter worker="4">2791805</Counter>
- <Counter worker="5">2995583</Counter>
- <Counter worker="6">3223833</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="8">
- <Counter worker="0">3106671</Counter>
- <Counter worker="1">2774975</Counter>
- <Counter worker="2">2810843</Counter>
- <Counter worker="3">2934576</Counter>
- <Counter worker="4">2743550</Counter>
- <Counter worker="5">2961241</Counter>
- <Counter worker="6">2801048</Counter>
- <Counter worker="7">2981597</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="9">
- <Counter worker="0">3126404</Counter>
- <Counter worker="1">2792565</Counter>
- <Counter worker="2">2828797</Counter>
- <Counter worker="3">2953257</Counter>
- <Counter worker="4">2761418</Counter>
- <Counter worker="5">2980177</Counter>
- <Counter worker="6">2818788</Counter>
- <Counter worker="7">3000161</Counter>
- <Counter worker="8">3522606</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="10">
- <Counter worker="0">3114675</Counter>
- <Counter worker="1">2782305</Counter>
- <Counter worker="2">2818067</Counter>
- <Counter worker="3">2942325</Counter>
- <Counter worker="4">2750895</Counter>
- <Counter worker="5">2969190</Counter>
- <Counter worker="6">2808330</Counter>
- <Counter worker="7">2988513</Counter>
- <Counter worker="8">3277977</Counter>
- <Counter worker="9">3277992</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="11">
- <Counter worker="0">3134167</Counter>
- <Counter worker="1">2799405</Counter>
- <Counter worker="2">2835531</Counter>
- <Counter worker="3">2960559</Counter>
- <Counter worker="4">2768383</Counter>
- <Counter worker="5">2987172</Counter>
- <Counter worker="6">2825869</Counter>
- <Counter worker="7">3008169</Counter>
- <Counter worker="8">3229937</Counter>
- <Counter worker="9">2865157</Counter>
- <Counter worker="10">2924109</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="12">
- <Counter worker="0">3122298</Counter>
- <Counter worker="1">2788834</Counter>
- <Counter worker="2">2824886</Counter>
- <Counter worker="3">2949367</Counter>
- <Counter worker="4">2757481</Counter>
- <Counter worker="5">2976034</Counter>
- <Counter worker="6">2814952</Counter>
- <Counter worker="7">2996594</Counter>
- <Counter worker="8">3196270</Counter>
- <Counter worker="9">2832912</Counter>
- <Counter worker="10">2868202</Counter>
- <Counter worker="11">3287941</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="13">
- <Counter worker="0">3110296</Counter>
- <Counter worker="1">2778328</Counter>
- <Counter worker="2">2814097</Counter>
- <Counter worker="3">2938082</Counter>
- <Counter worker="4">2747046</Counter>
- <Counter worker="5">2964597</Counter>
- <Counter worker="6">2804214</Counter>
- <Counter worker="7">2985167</Counter>
- <Counter worker="8">3162003</Counter>
- <Counter worker="9">2798958</Counter>
- <Counter worker="10">2828824</Counter>
- <Counter worker="11">2981162</Counter>
- <Counter worker="12">3033576</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="14">
- <Counter worker="0">3129719</Counter>
- <Counter worker="1">2795774</Counter>
- <Counter worker="2">2831742</Counter>
- <Counter worker="3">2956427</Counter>
- <Counter worker="4">2764251</Counter>
- <Counter worker="5">2983507</Counter>
- <Counter worker="6">2821804</Counter>
- <Counter worker="7">3003302</Counter>
- <Counter worker="8">3168182</Counter>
- <Counter worker="9">2795213</Counter>
- <Counter worker="10">2824824</Counter>
- <Counter worker="11">2985326</Counter>
- <Counter worker="12">2788203</Counter>
- <Counter worker="13">3060880</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="15">
- <Counter worker="0">3117749</Counter>
- <Counter worker="1">2785075</Counter>
- <Counter worker="2">2821028</Counter>
- <Counter worker="3">2945205</Counter>
- <Counter worker="4">2753587</Counter>
- <Counter worker="5">2971692</Counter>
- <Counter worker="6">2811184</Counter>
- <Counter worker="7">2991870</Counter>
- <Counter worker="8">3136894</Counter>
- <Counter worker="9">2769370</Counter>
- <Counter worker="10">2799325</Counter>
- <Counter worker="11">2955115</Counter>
- <Counter worker="12">2791275</Counter>
- <Counter worker="13">2965355</Counter>
- <Counter worker="14">3235028</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="16">
- <Counter worker="0">3105837</Counter>
- <Counter worker="1">2774385</Counter>
- <Counter worker="2">2809948</Counter>
- <Counter worker="3">2933935</Counter>
- <Counter worker="4">2743165</Counter>
- <Counter worker="5">2960594</Counter>
- <Counter worker="6">2800417</Counter>
- <Counter worker="7">2980234</Counter>
- <Counter worker="8">3107685</Counter>
- <Counter worker="9">2740597</Counter>
- <Counter worker="10">2772059</Counter>
- <Counter worker="11">2927128</Counter>
- <Counter worker="12">2757027</Counter>
- <Counter worker="13">2938382</Counter>
- <Counter worker="14">2823137</Counter>
- <Counter worker="15">2965765</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="17">
- <Counter worker="0">3125383</Counter>
- <Counter worker="1">2791802</Counter>
- <Counter worker="2">2827715</Counter>
- <Counter worker="3">2952217</Counter>
- <Counter worker="4">2760266</Counter>
- <Counter worker="5">2978746</Counter>
- <Counter worker="6">2817802</Counter>
- <Counter worker="7">2999395</Counter>
- <Counter worker="8">3127170</Counter>
- <Counter worker="9">2757456</Counter>
- <Counter worker="10">2789249</Counter>
- <Counter worker="11">2945471</Counter>
- <Counter worker="12">2774281</Counter>
- <Counter worker="13">2956715</Counter>
- <Counter worker="14">2840683</Counter>
- <Counter worker="15">2984166</Counter>
- <Counter worker="16">3488200</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="18">
- <Counter worker="0">3113425</Counter>
- <Counter worker="1">2781071</Counter>
- <Counter worker="2">2816875</Counter>
- <Counter worker="3">2940987</Counter>
- <Counter worker="4">2749614</Counter>
- <Counter worker="5">2967301</Counter>
- <Counter worker="6">2806975</Counter>
- <Counter worker="7">2987963</Counter>
- <Counter worker="8">3115249</Counter>
- <Counter worker="9">2746969</Counter>
- <Counter worker="10">2778738</Counter>
- <Counter worker="11">2934226</Counter>
- <Counter worker="12">2763956</Counter>
- <Counter worker="13">2945765</Counter>
- <Counter worker="14">2829840</Counter>
- <Counter worker="15">2973224</Counter>
- <Counter worker="16">3271018</Counter>
- <Counter worker="17">3271054</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="19">
- <Counter worker="0">3132890</Counter>
- <Counter worker="1">2798349</Counter>
- <Counter worker="2">2834203</Counter>
- <Counter worker="3">2959395</Counter>
- <Counter worker="4">2766985</Counter>
- <Counter worker="5">2986288</Counter>
- <Counter worker="6">2824544</Counter>
- <Counter worker="7">3006439</Counter>
- <Counter worker="8">3134700</Counter>
- <Counter worker="9">2764127</Counter>
- <Counter worker="10">2795782</Counter>
- <Counter worker="11">2952538</Counter>
- <Counter worker="12">2780908</Counter>
- <Counter worker="13">2963890</Counter>
- <Counter worker="14">2847586</Counter>
- <Counter worker="15">2991552</Counter>
- <Counter worker="16">3245981</Counter>
- <Counter worker="17">2954280</Counter>
- <Counter worker="18">2960399</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="20">
- <Counter worker="0">3120930</Counter>
- <Counter worker="1">2787696</Counter>
- <Counter worker="2">2823649</Counter>
- <Counter worker="3">2948070</Counter>
- <Counter worker="4">2756563</Counter>
- <Counter worker="5">2974809</Counter>
- <Counter worker="6">2813905</Counter>
- <Counter worker="7">2995333</Counter>
- <Counter worker="8">3122781</Counter>
- <Counter worker="9">2753746</Counter>
- <Counter worker="10">2785385</Counter>
- <Counter worker="11">2941360</Counter>
- <Counter worker="12">2770370</Counter>
- <Counter worker="13">2952557</Counter>
- <Counter worker="14">2836606</Counter>
- <Counter worker="15">2981020</Counter>
- <Counter worker="16">3210075</Counter>
- <Counter worker="17">2900766</Counter>
- <Counter worker="18">2922137</Counter>
- <Counter worker="19">3306794</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="21">
- <Counter worker="0">3108909</Counter>
- <Counter worker="1">2777145</Counter>
- <Counter worker="2">2812866</Counter>
- <Counter worker="3">2936889</Counter>
- <Counter worker="4">2745714</Counter>
- <Counter worker="5">2963451</Counter>
- <Counter worker="6">2803246</Counter>
- <Counter worker="7">2983352</Counter>
- <Counter worker="8">3110869</Counter>
- <Counter worker="9">2743126</Counter>
- <Counter worker="10">2774923</Counter>
- <Counter worker="11">2930071</Counter>
- <Counter worker="12">2759954</Counter>
- <Counter worker="13">2941606</Counter>
- <Counter worker="14">2825771</Counter>
- <Counter worker="15">2969489</Counter>
- <Counter worker="16">3177890</Counter>
- <Counter worker="17">2868416</Counter>
- <Counter worker="18">2886398</Counter>
- <Counter worker="19">3000295</Counter>
- <Counter worker="20">3041648</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="22">
- <Counter worker="0">3128424</Counter>
- <Counter worker="1">2794396</Counter>
- <Counter worker="2">2830500</Counter>
- <Counter worker="3">2955267</Counter>
- <Counter worker="4">2763218</Counter>
- <Counter worker="5">2982154</Counter>
- <Counter worker="6">2820802</Counter>
- <Counter worker="7">3001915</Counter>
- <Counter worker="8">3130343</Counter>
- <Counter worker="9">2760287</Counter>
- <Counter worker="10">2792228</Counter>
- <Counter worker="11">2948428</Counter>
- <Counter worker="12">2777381</Counter>
- <Counter worker="13">2960097</Counter>
- <Counter worker="14">2843445</Counter>
- <Counter worker="15">2987356</Counter>
- <Counter worker="16">3179030</Counter>
- <Counter worker="17">2869858</Counter>
- <Counter worker="18">2888921</Counter>
- <Counter worker="19">3003560</Counter>
- <Counter worker="20">2800382</Counter>
- <Counter worker="21">3080561</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="23">
- <Counter worker="0">3116426</Counter>
- <Counter worker="1">2783664</Counter>
- <Counter worker="2">2819691</Counter>
- <Counter worker="3">2943818</Counter>
- <Counter worker="4">2752563</Counter>
- <Counter worker="5">2970563</Counter>
- <Counter worker="6">2810085</Counter>
- <Counter worker="7">2990572</Counter>
- <Counter worker="8">3118382</Counter>
- <Counter worker="9">2749721</Counter>
- <Counter worker="10">2781546</Counter>
- <Counter worker="11">2937163</Counter>
- <Counter worker="12">2766431</Counter>
- <Counter worker="13">2948572</Counter>
- <Counter worker="14">2832634</Counter>
- <Counter worker="15">2975988</Counter>
- <Counter worker="16">3149076</Counter>
- <Counter worker="17">2832666</Counter>
- <Counter worker="18">2854858</Counter>
- <Counter worker="19">2972102</Counter>
- <Counter worker="20">2793073</Counter>
- <Counter worker="21">2986039</Counter>
- <Counter worker="22">3225121</Counter>
- </SelfMsg>
- <SelfMsg activeWorker="24">
- <Counter worker="0">3135941</Counter>
- <Counter worker="1">2801108</Counter>
- <Counter worker="2">2837415</Counter>
- <Counter worker="3">2962374</Counter>
- <Counter worker="4">2769627</Counter>
- <Counter worker="5">2989102</Counter>
- <Counter worker="6">2827394</Counter>
- <Counter worker="7">3009512</Counter>
- <Counter worker="8">3137796</Counter>
- <Counter worker="9">2766961</Counter>
- <Counter worker="10">2798946</Counter>
- <Counter worker="11">2955433</Counter>
- <Counter worker="12">2783657</Counter>
- <Counter worker="13">2966727</Counter>
- <Counter worker="14">2850374</Counter>
- <Counter worker="15">2995580</Counter>
- <Counter worker="16">3148697</Counter>
- <Counter worker="17">2826014</Counter>
- <Counter worker="18">2851067</Counter>
- <Counter worker="19">2971518</Counter>
- <Counter worker="20">2793285</Counter>
- <Counter worker="21">2985399</Counter>
- <Counter worker="22">2839863</Counter>
- <Counter worker="23">3046065</Counter>
- </SelfMsg>
- <ManyToOneMsg activeWorker="1">
- <Counter worker="0">3513959</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="2">
- <Counter worker="0">2148757</Counter>
- <Counter worker="1">4297993</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="3">
- <Counter worker="0">1452258</Counter>
- <Counter worker="1">2904799</Counter>
- <Counter worker="2">2905020</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="4">
- <Counter worker="0">1251019</Counter>
- <Counter worker="1">2502307</Counter>
- <Counter worker="2">2502360</Counter>
- <Counter worker="3">2502336</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="5">
- <Counter worker="0">969243</Counter>
- <Counter worker="1">1938692</Counter>
- <Counter worker="2">1938759</Counter>
- <Counter worker="3">1938750</Counter>
- <Counter worker="4">1938748</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="6">
- <Counter worker="0">888969</Counter>
- <Counter worker="1">1778150</Counter>
- <Counter worker="2">1778176</Counter>
- <Counter worker="3">1778186</Counter>
- <Counter worker="4">1778185</Counter>
- <Counter worker="5">1778201</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="7">
- <Counter worker="0">736930</Counter>
- <Counter worker="1">1474061</Counter>
- <Counter worker="2">1474091</Counter>
- <Counter worker="3">1474088</Counter>
- <Counter worker="4">1474098</Counter>
- <Counter worker="5">1474102</Counter>
- <Counter worker="6">1474091</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="8">
- <Counter worker="0">690772</Counter>
- <Counter worker="1">1381767</Counter>
- <Counter worker="2">1381778</Counter>
- <Counter worker="3">1381787</Counter>
- <Counter worker="4">1381767</Counter>
- <Counter worker="5">1381780</Counter>
- <Counter worker="6">1381774</Counter>
- <Counter worker="7">1381762</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="9">
- <Counter worker="0">220518</Counter>
- <Counter worker="1">441123</Counter>
- <Counter worker="2">441112</Counter>
- <Counter worker="3">441154</Counter>
- <Counter worker="4">441164</Counter>
- <Counter worker="5">441164</Counter>
- <Counter worker="6">441156</Counter>
- <Counter worker="7">441176</Counter>
- <Counter worker="8">441129</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="10">
- <Counter worker="0">195773</Counter>
- <Counter worker="1">391623</Counter>
- <Counter worker="2">391629</Counter>
- <Counter worker="3">391634</Counter>
- <Counter worker="4">391637</Counter>
- <Counter worker="5">391622</Counter>
- <Counter worker="6">391626</Counter>
- <Counter worker="7">391634</Counter>
- <Counter worker="8">391666</Counter>
- <Counter worker="9">391680</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="11">
- <Counter worker="0">176797</Counter>
- <Counter worker="1">353626</Counter>
- <Counter worker="2">353641</Counter>
- <Counter worker="3">353633</Counter>
- <Counter worker="4">353640</Counter>
- <Counter worker="5">353639</Counter>
- <Counter worker="6">353633</Counter>
- <Counter worker="7">353638</Counter>
- <Counter worker="8">353682</Counter>
- <Counter worker="9">353691</Counter>
- <Counter worker="10">353692</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="12">
- <Counter worker="0">162870</Counter>
- <Counter worker="1">325764</Counter>
- <Counter worker="2">325774</Counter>
- <Counter worker="3">325776</Counter>
- <Counter worker="4">325780</Counter>
- <Counter worker="5">325777</Counter>
- <Counter worker="6">325782</Counter>
- <Counter worker="7">325773</Counter>
- <Counter worker="8">325785</Counter>
- <Counter worker="9">325795</Counter>
- <Counter worker="10">325790</Counter>
- <Counter worker="11">325791</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="13">
- <Counter worker="0">148531</Counter>
- <Counter worker="1">297092</Counter>
- <Counter worker="2">297094</Counter>
- <Counter worker="3">297096</Counter>
- <Counter worker="4">297090</Counter>
- <Counter worker="5">297097</Counter>
- <Counter worker="6">297088</Counter>
- <Counter worker="7">297094</Counter>
- <Counter worker="8">297102</Counter>
- <Counter worker="9">297104</Counter>
- <Counter worker="10">297105</Counter>
- <Counter worker="11">297101</Counter>
- <Counter worker="12">297106</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="14">
- <Counter worker="0">139216</Counter>
- <Counter worker="1">278451</Counter>
- <Counter worker="2">278457</Counter>
- <Counter worker="3">278454</Counter>
- <Counter worker="4">278460</Counter>
- <Counter worker="5">278454</Counter>
- <Counter worker="6">278456</Counter>
- <Counter worker="7">278455</Counter>
- <Counter worker="8">278462</Counter>
- <Counter worker="9">278466</Counter>
- <Counter worker="10">278460</Counter>
- <Counter worker="11">278465</Counter>
- <Counter worker="12">278461</Counter>
- <Counter worker="13">278461</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="15">
- <Counter worker="0">128494</Counter>
- <Counter worker="1">257011</Counter>
- <Counter worker="2">257013</Counter>
- <Counter worker="3">257014</Counter>
- <Counter worker="4">257011</Counter>
- <Counter worker="5">257014</Counter>
- <Counter worker="6">257010</Counter>
- <Counter worker="7">257007</Counter>
- <Counter worker="8">257012</Counter>
- <Counter worker="9">257015</Counter>
- <Counter worker="10">257014</Counter>
- <Counter worker="11">257011</Counter>
- <Counter worker="12">257014</Counter>
- <Counter worker="13">257014</Counter>
- <Counter worker="14">257018</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="16">
- <Counter worker="0">118432</Counter>
- <Counter worker="1">236882</Counter>
- <Counter worker="2">236885</Counter>
- <Counter worker="3">236883</Counter>
- <Counter worker="4">236886</Counter>
- <Counter worker="5">236886</Counter>
- <Counter worker="6">236886</Counter>
- <Counter worker="7">236887</Counter>
- <Counter worker="8">236890</Counter>
- <Counter worker="9">236885</Counter>
- <Counter worker="10">236888</Counter>
- <Counter worker="11">236886</Counter>
- <Counter worker="12">236888</Counter>
- <Counter worker="13">236889</Counter>
- <Counter worker="14">236881</Counter>
- <Counter worker="15">236882</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="17">
- <Counter worker="0">112260</Counter>
- <Counter worker="1">224532</Counter>
- <Counter worker="2">224536</Counter>
- <Counter worker="3">224536</Counter>
- <Counter worker="4">224535</Counter>
- <Counter worker="5">224536</Counter>
- <Counter worker="6">224535</Counter>
- <Counter worker="7">224535</Counter>
- <Counter worker="8">224534</Counter>
- <Counter worker="9">224536</Counter>
- <Counter worker="10">224534</Counter>
- <Counter worker="11">224532</Counter>
- <Counter worker="12">224535</Counter>
- <Counter worker="13">224537</Counter>
- <Counter worker="14">224533</Counter>
- <Counter worker="15">224536</Counter>
- <Counter worker="16">224539</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="18">
- <Counter worker="0">104670</Counter>
- <Counter worker="1">209354</Counter>
- <Counter worker="2">209355</Counter>
- <Counter worker="3">209354</Counter>
- <Counter worker="4">209359</Counter>
- <Counter worker="5">209361</Counter>
- <Counter worker="6">209356</Counter>
- <Counter worker="7">209358</Counter>
- <Counter worker="8">209356</Counter>
- <Counter worker="9">209354</Counter>
- <Counter worker="10">209353</Counter>
- <Counter worker="11">209354</Counter>
- <Counter worker="12">209357</Counter>
- <Counter worker="13">209356</Counter>
- <Counter worker="14">209355</Counter>
- <Counter worker="15">209353</Counter>
- <Counter worker="16">209360</Counter>
- <Counter worker="17">209362</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="19">
- <Counter worker="0">98829</Counter>
- <Counter worker="1">197675</Counter>
- <Counter worker="2">197673</Counter>
- <Counter worker="3">197672</Counter>
- <Counter worker="4">197674</Counter>
- <Counter worker="5">197674</Counter>
- <Counter worker="6">197672</Counter>
- <Counter worker="7">197672</Counter>
- <Counter worker="8">197672</Counter>
- <Counter worker="9">197671</Counter>
- <Counter worker="10">197671</Counter>
- <Counter worker="11">197669</Counter>
- <Counter worker="12">197672</Counter>
- <Counter worker="13">197674</Counter>
- <Counter worker="14">197675</Counter>
- <Counter worker="15">197669</Counter>
- <Counter worker="16">197676</Counter>
- <Counter worker="17">197678</Counter>
- <Counter worker="18">197676</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="20">
- <Counter worker="0">92505</Counter>
- <Counter worker="1">185021</Counter>
- <Counter worker="2">185021</Counter>
- <Counter worker="3">185025</Counter>
- <Counter worker="4">185025</Counter>
- <Counter worker="5">185021</Counter>
- <Counter worker="6">185022</Counter>
- <Counter worker="7">185022</Counter>
- <Counter worker="8">185023</Counter>
- <Counter worker="9">185023</Counter>
- <Counter worker="10">185020</Counter>
- <Counter worker="11">185021</Counter>
- <Counter worker="12">185022</Counter>
- <Counter worker="13">185025</Counter>
- <Counter worker="14">185022</Counter>
- <Counter worker="15">185024</Counter>
- <Counter worker="16">185027</Counter>
- <Counter worker="17">185029</Counter>
- <Counter worker="18">185025</Counter>
- <Counter worker="19">185027</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="21">
- <Counter worker="0">88095</Counter>
- <Counter worker="1">176199</Counter>
- <Counter worker="2">176202</Counter>
- <Counter worker="3">176199</Counter>
- <Counter worker="4">176201</Counter>
- <Counter worker="5">176201</Counter>
- <Counter worker="6">176201</Counter>
- <Counter worker="7">176202</Counter>
- <Counter worker="8">176198</Counter>
- <Counter worker="9">176200</Counter>
- <Counter worker="10">176197</Counter>
- <Counter worker="11">176199</Counter>
- <Counter worker="12">176197</Counter>
- <Counter worker="13">176202</Counter>
- <Counter worker="14">176198</Counter>
- <Counter worker="15">176199</Counter>
- <Counter worker="16">176204</Counter>
- <Counter worker="17">176203</Counter>
- <Counter worker="18">176203</Counter>
- <Counter worker="19">176206</Counter>
- <Counter worker="20">176204</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="22">
- <Counter worker="0">84520</Counter>
- <Counter worker="1">169052</Counter>
- <Counter worker="2">169051</Counter>
- <Counter worker="3">169053</Counter>
- <Counter worker="4">169051</Counter>
- <Counter worker="5">169056</Counter>
- <Counter worker="6">169050</Counter>
- <Counter worker="7">169052</Counter>
- <Counter worker="8">169052</Counter>
- <Counter worker="9">169053</Counter>
- <Counter worker="10">169050</Counter>
- <Counter worker="11">169051</Counter>
- <Counter worker="12">169052</Counter>
- <Counter worker="13">169053</Counter>
- <Counter worker="14">169051</Counter>
- <Counter worker="15">169051</Counter>
- <Counter worker="16">169054</Counter>
- <Counter worker="17">169056</Counter>
- <Counter worker="18">169053</Counter>
- <Counter worker="19">169055</Counter>
- <Counter worker="20">169055</Counter>
- <Counter worker="21">169054</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="23">
- <Counter worker="0">79421</Counter>
- <Counter worker="1">158852</Counter>
- <Counter worker="2">158852</Counter>
- <Counter worker="3">158854</Counter>
- <Counter worker="4">158852</Counter>
- <Counter worker="5">158853</Counter>
- <Counter worker="6">158853</Counter>
- <Counter worker="7">158853</Counter>
- <Counter worker="8">158852</Counter>
- <Counter worker="9">158854</Counter>
- <Counter worker="10">158852</Counter>
- <Counter worker="11">158851</Counter>
- <Counter worker="12">158853</Counter>
- <Counter worker="13">158854</Counter>
- <Counter worker="14">158850</Counter>
- <Counter worker="15">158852</Counter>
- <Counter worker="16">158855</Counter>
- <Counter worker="17">158855</Counter>
- <Counter worker="18">158851</Counter>
- <Counter worker="19">158854</Counter>
- <Counter worker="20">158853</Counter>
- <Counter worker="21">158854</Counter>
- <Counter worker="22">158854</Counter>
- </ManyToOneMsg>
- <ManyToOneMsg activeWorker="24">
- <Counter worker="0">75524</Counter>
- <Counter worker="1">151058</Counter>
- <Counter worker="2">151058</Counter>
- <Counter worker="3">151057</Counter>
- <Counter worker="4">151060</Counter>
- <Counter worker="5">151057</Counter>
- <Counter worker="6">151056</Counter>
- <Counter worker="7">151056</Counter>
- <Counter worker="8">151057</Counter>
- <Counter worker="9">151057</Counter>
- <Counter worker="10">151058</Counter>
- <Counter worker="11">151058</Counter>
- <Counter worker="12">151056</Counter>
- <Counter worker="13">151057</Counter>
- <Counter worker="14">151055</Counter>
- <Counter worker="15">151056</Counter>
- <Counter worker="16">151057</Counter>
- <Counter worker="17">151056</Counter>
- <Counter worker="18">151055</Counter>
- <Counter worker="19">151057</Counter>
- <Counter worker="20">151057</Counter>
- <Counter worker="21">151057</Counter>
- <Counter worker="22">151056</Counter>
- <Counter worker="23">151056</Counter>
- </ManyToOneMsg>
- <ManySysLockMutex activeWorker="1">
- <Counter worker="0">7748082</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="2">
- <Counter worker="0">7647592</Counter>
- <Counter worker="1">7648024</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="3">
- <Counter worker="0">7462713</Counter>
- <Counter worker="1">7463150</Counter>
- <Counter worker="2">7463302</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="4">
- <Counter worker="0">7227558</Counter>
- <Counter worker="1">7228059</Counter>
- <Counter worker="2">7228161</Counter>
- <Counter worker="3">7228157</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="5">
- <Counter worker="0">7271144</Counter>
- <Counter worker="1">7271595</Counter>
- <Counter worker="2">7271690</Counter>
- <Counter worker="3">7271685</Counter>
- <Counter worker="4">7278972</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="6">
- <Counter worker="0">7115560</Counter>
- <Counter worker="1">7115973</Counter>
- <Counter worker="2">7116081</Counter>
- <Counter worker="3">7116116</Counter>
- <Counter worker="4">7116156</Counter>
- <Counter worker="5">7116139</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="7">
- <Counter worker="0">7032158</Counter>
- <Counter worker="1">7032584</Counter>
- <Counter worker="2">7032605</Counter>
- <Counter worker="3">7032700</Counter>
- <Counter worker="4">7032840</Counter>
- <Counter worker="5">7032751</Counter>
- <Counter worker="6">7033457</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="8">
- <Counter worker="0">6943403</Counter>
- <Counter worker="1">6943907</Counter>
- <Counter worker="2">6944388</Counter>
- <Counter worker="3">6944535</Counter>
- <Counter worker="4">6945558</Counter>
- <Counter worker="5">6945385</Counter>
- <Counter worker="6">6944965</Counter>
- <Counter worker="7">6945056</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="9">
- <Counter worker="0">6904189</Counter>
- <Counter worker="1">6904648</Counter>
- <Counter worker="2">6904665</Counter>
- <Counter worker="3">6904794</Counter>
- <Counter worker="4">6906704</Counter>
- <Counter worker="5">6906596</Counter>
- <Counter worker="6">6905038</Counter>
- <Counter worker="7">6905171</Counter>
- <Counter worker="8">7732157</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="10">
- <Counter worker="0">6890600</Counter>
- <Counter worker="1">6891096</Counter>
- <Counter worker="2">6889623</Counter>
- <Counter worker="3">6889754</Counter>
- <Counter worker="4">6895076</Counter>
- <Counter worker="5">6895009</Counter>
- <Counter worker="6">6891303</Counter>
- <Counter worker="7">6891441</Counter>
- <Counter worker="8">7561832</Counter>
- <Counter worker="9">7561812</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="11">
- <Counter worker="0">6936032</Counter>
- <Counter worker="1">6936473</Counter>
- <Counter worker="2">6936855</Counter>
- <Counter worker="3">6936996</Counter>
- <Counter worker="4">6937867</Counter>
- <Counter worker="5">6937801</Counter>
- <Counter worker="6">6937155</Counter>
- <Counter worker="7">6937284</Counter>
- <Counter worker="8">7426273</Counter>
- <Counter worker="9">7426282</Counter>
- <Counter worker="10">7426249</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="12">
- <Counter worker="0">6886873</Counter>
- <Counter worker="1">6888027</Counter>
- <Counter worker="2">6888211</Counter>
- <Counter worker="3">6888343</Counter>
- <Counter worker="4">6892413</Counter>
- <Counter worker="5">6892299</Counter>
- <Counter worker="6">6888993</Counter>
- <Counter worker="7">6889126</Counter>
- <Counter worker="8">7246586</Counter>
- <Counter worker="9">7246631</Counter>
- <Counter worker="10">7246645</Counter>
- <Counter worker="11">7246622</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="13">
- <Counter worker="0">6959061</Counter>
- <Counter worker="1">6959491</Counter>
- <Counter worker="2">6959651</Counter>
- <Counter worker="3">6959746</Counter>
- <Counter worker="4">6960533</Counter>
- <Counter worker="5">6960423</Counter>
- <Counter worker="6">6960346</Counter>
- <Counter worker="7">6960483</Counter>
- <Counter worker="8">7275133</Counter>
- <Counter worker="9">7275113</Counter>
- <Counter worker="10">7275196</Counter>
- <Counter worker="11">7275136</Counter>
- <Counter worker="12">7279912</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="14">
- <Counter worker="0">6923135</Counter>
- <Counter worker="1">6923561</Counter>
- <Counter worker="2">6923846</Counter>
- <Counter worker="3">6923929</Counter>
- <Counter worker="4">6926308</Counter>
- <Counter worker="5">6926220</Counter>
- <Counter worker="6">6924046</Counter>
- <Counter worker="7">6924171</Counter>
- <Counter worker="8">7098844</Counter>
- <Counter worker="9">7098788</Counter>
- <Counter worker="10">7098814</Counter>
- <Counter worker="11">7098753</Counter>
- <Counter worker="12">7098782</Counter>
- <Counter worker="13">7098724</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="15">
- <Counter worker="0">6897278</Counter>
- <Counter worker="1">6897722</Counter>
- <Counter worker="2">6897985</Counter>
- <Counter worker="3">6898091</Counter>
- <Counter worker="4">6900152</Counter>
- <Counter worker="5">6900044</Counter>
- <Counter worker="6">6899295</Counter>
- <Counter worker="7">6899389</Counter>
- <Counter worker="8">7029806</Counter>
- <Counter worker="9">7029783</Counter>
- <Counter worker="10">7029530</Counter>
- <Counter worker="11">7029484</Counter>
- <Counter worker="12">7029691</Counter>
- <Counter worker="13">7029614</Counter>
- <Counter worker="14">7036890</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="16">
- <Counter worker="0">6937172</Counter>
- <Counter worker="1">6937594</Counter>
- <Counter worker="2">6937636</Counter>
- <Counter worker="3">6937737</Counter>
- <Counter worker="4">6938639</Counter>
- <Counter worker="5">6938539</Counter>
- <Counter worker="6">6938146</Counter>
- <Counter worker="7">6938285</Counter>
- <Counter worker="8">6845765</Counter>
- <Counter worker="9">6845811</Counter>
- <Counter worker="10">6844591</Counter>
- <Counter worker="11">6844579</Counter>
- <Counter worker="12">6847898</Counter>
- <Counter worker="13">6847925</Counter>
- <Counter worker="14">6854383</Counter>
- <Counter worker="15">6854413</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="17">
- <Counter worker="0">6899164</Counter>
- <Counter worker="1">6899621</Counter>
- <Counter worker="2">6899868</Counter>
- <Counter worker="3">6899979</Counter>
- <Counter worker="4">6903162</Counter>
- <Counter worker="5">6903081</Counter>
- <Counter worker="6">6901182</Counter>
- <Counter worker="7">6901304</Counter>
- <Counter worker="8">6786503</Counter>
- <Counter worker="9">6786566</Counter>
- <Counter worker="10">6785567</Counter>
- <Counter worker="11">6785489</Counter>
- <Counter worker="12">6786492</Counter>
- <Counter worker="13">6786497</Counter>
- <Counter worker="14">6788266</Counter>
- <Counter worker="15">6788323</Counter>
- <Counter worker="16">7729409</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="18">
- <Counter worker="0">6879345</Counter>
- <Counter worker="1">6879777</Counter>
- <Counter worker="2">6879643</Counter>
- <Counter worker="3">6879775</Counter>
- <Counter worker="4">6882068</Counter>
- <Counter worker="5">6881973</Counter>
- <Counter worker="6">6880439</Counter>
- <Counter worker="7">6880578</Counter>
- <Counter worker="8">6777968</Counter>
- <Counter worker="9">6778044</Counter>
- <Counter worker="10">6777204</Counter>
- <Counter worker="11">6777188</Counter>
- <Counter worker="12">6777851</Counter>
- <Counter worker="13">6777905</Counter>
- <Counter worker="14">6779627</Counter>
- <Counter worker="15">6779691</Counter>
- <Counter worker="16">7557727</Counter>
- <Counter worker="17">7557705</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="19">
- <Counter worker="0">6937193</Counter>
- <Counter worker="1">6937631</Counter>
- <Counter worker="2">6937312</Counter>
- <Counter worker="3">6937409</Counter>
- <Counter worker="4">6940007</Counter>
- <Counter worker="5">6939931</Counter>
- <Counter worker="6">6938301</Counter>
- <Counter worker="7">6938409</Counter>
- <Counter worker="8">6827232</Counter>
- <Counter worker="9">6827251</Counter>
- <Counter worker="10">6826171</Counter>
- <Counter worker="11">6826057</Counter>
- <Counter worker="12">6827889</Counter>
- <Counter worker="13">6827896</Counter>
- <Counter worker="14">6830967</Counter>
- <Counter worker="15">6830958</Counter>
- <Counter worker="16">7441511</Counter>
- <Counter worker="17">7441523</Counter>
- <Counter worker="18">7441610</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="20">
- <Counter worker="0">6900511</Counter>
- <Counter worker="1">6900940</Counter>
- <Counter worker="2">6901585</Counter>
- <Counter worker="3">6901715</Counter>
- <Counter worker="4">6902897</Counter>
- <Counter worker="5">6902770</Counter>
- <Counter worker="6">6902123</Counter>
- <Counter worker="7">6902302</Counter>
- <Counter worker="8">6781385</Counter>
- <Counter worker="9">6781384</Counter>
- <Counter worker="10">6779534</Counter>
- <Counter worker="11">6779472</Counter>
- <Counter worker="12">6781940</Counter>
- <Counter worker="13">6781974</Counter>
- <Counter worker="14">6784544</Counter>
- <Counter worker="15">6784535</Counter>
- <Counter worker="16">7224882</Counter>
- <Counter worker="17">7224913</Counter>
- <Counter worker="18">7224905</Counter>
- <Counter worker="19">7224953</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="21">
- <Counter worker="0">6943617</Counter>
- <Counter worker="1">6944082</Counter>
- <Counter worker="2">6943750</Counter>
- <Counter worker="3">6943857</Counter>
- <Counter worker="4">6945186</Counter>
- <Counter worker="5">6945096</Counter>
- <Counter worker="6">6944668</Counter>
- <Counter worker="7">6944790</Counter>
- <Counter worker="8">6781824</Counter>
- <Counter worker="9">6781819</Counter>
- <Counter worker="10">6780449</Counter>
- <Counter worker="11">6780372</Counter>
- <Counter worker="12">6782024</Counter>
- <Counter worker="13">6782050</Counter>
- <Counter worker="14">6784510</Counter>
- <Counter worker="15">6784514</Counter>
- <Counter worker="16">7257452</Counter>
- <Counter worker="17">7257495</Counter>
- <Counter worker="18">7257487</Counter>
- <Counter worker="19">7257508</Counter>
- <Counter worker="20">7257524</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="22">
- <Counter worker="0">6917953</Counter>
- <Counter worker="1">6918400</Counter>
- <Counter worker="2">6919356</Counter>
- <Counter worker="3">6919471</Counter>
- <Counter worker="4">6920305</Counter>
- <Counter worker="5">6920183</Counter>
- <Counter worker="6">6919649</Counter>
- <Counter worker="7">6919751</Counter>
- <Counter worker="8">6791371</Counter>
- <Counter worker="9">6791413</Counter>
- <Counter worker="10">6788420</Counter>
- <Counter worker="11">6788340</Counter>
- <Counter worker="12">6792848</Counter>
- <Counter worker="13">6792844</Counter>
- <Counter worker="14">6797629</Counter>
- <Counter worker="15">6797728</Counter>
- <Counter worker="16">7113691</Counter>
- <Counter worker="17">7113715</Counter>
- <Counter worker="18">7112292</Counter>
- <Counter worker="19">7112305</Counter>
- <Counter worker="20">7113609</Counter>
- <Counter worker="21">7113680</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="23">
- <Counter worker="0">6891252</Counter>
- <Counter worker="1">6891663</Counter>
- <Counter worker="2">6891546</Counter>
- <Counter worker="3">6891706</Counter>
- <Counter worker="4">6893277</Counter>
- <Counter worker="5">6893152</Counter>
- <Counter worker="6">6892566</Counter>
- <Counter worker="7">6892657</Counter>
- <Counter worker="8">6759690</Counter>
- <Counter worker="9">6759744</Counter>
- <Counter worker="10">6757928</Counter>
- <Counter worker="11">6757837</Counter>
- <Counter worker="12">6760968</Counter>
- <Counter worker="13">6760984</Counter>
- <Counter worker="14">6764597</Counter>
- <Counter worker="15">6764671</Counter>
- <Counter worker="16">7031553</Counter>
- <Counter worker="17">7031562</Counter>
- <Counter worker="18">7031468</Counter>
- <Counter worker="19">7031438</Counter>
- <Counter worker="20">7031584</Counter>
- <Counter worker="21">7031649</Counter>
- <Counter worker="22">7034463</Counter>
- </ManySysLockMutex>
- <ManySysLockMutex activeWorker="24">
- <Counter worker="0">6936624</Counter>
- <Counter worker="1">6937095</Counter>
- <Counter worker="2">6937990</Counter>
- <Counter worker="3">6938116</Counter>
- <Counter worker="4">6938974</Counter>
- <Counter worker="5">6938848</Counter>
- <Counter worker="6">6938729</Counter>
- <Counter worker="7">6938855</Counter>
- <Counter worker="8">6802487</Counter>
- <Counter worker="9">6802507</Counter>
- <Counter worker="10">6802119</Counter>
- <Counter worker="11">6802052</Counter>
- <Counter worker="12">6804132</Counter>
- <Counter worker="13">6804142</Counter>
- <Counter worker="14">6807402</Counter>
- <Counter worker="15">6807440</Counter>
- <Counter worker="16">6895101</Counter>
- <Counter worker="17">6895091</Counter>
- <Counter worker="18">6896248</Counter>
- <Counter worker="19">6896161</Counter>
- <Counter worker="20">6894890</Counter>
- <Counter worker="21">6894820</Counter>
- <Counter worker="22">6893800</Counter>
- <Counter worker="23">6893757</Counter>
- </ManySysLockMutex>
- <ManyClassicCeilingMutex activeWorker="1">
- <Counter worker="0">783933</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="2">
- <Counter worker="0">715842</Counter>
- <Counter worker="1">715877</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="3">
- <Counter worker="0">673594</Counter>
- <Counter worker="1">673548</Counter>
- <Counter worker="2">673597</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="4">
- <Counter worker="0">507004</Counter>
- <Counter worker="1">506998</Counter>
- <Counter worker="2">506958</Counter>
- <Counter worker="3">507007</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="5">
- <Counter worker="0">399544</Counter>
- <Counter worker="1">399546</Counter>
- <Counter worker="2">399537</Counter>
- <Counter worker="3">399496</Counter>
- <Counter worker="4">399551</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="6">
- <Counter worker="0">326511</Counter>
- <Counter worker="1">326516</Counter>
- <Counter worker="2">326514</Counter>
- <Counter worker="3">326477</Counter>
- <Counter worker="4">326516</Counter>
- <Counter worker="5">326515</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="7">
- <Counter worker="0">262720</Counter>
- <Counter worker="1">262759</Counter>
- <Counter worker="2">262752</Counter>
- <Counter worker="3">262761</Counter>
- <Counter worker="4">262765</Counter>
- <Counter worker="5">262760</Counter>
- <Counter worker="6">262754</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="8">
- <Counter worker="0">234094</Counter>
- <Counter worker="1">234134</Counter>
- <Counter worker="2">234129</Counter>
- <Counter worker="3">234127</Counter>
- <Counter worker="4">234131</Counter>
- <Counter worker="5">234121</Counter>
- <Counter worker="6">234124</Counter>
- <Counter worker="7">234127</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="9">
- <Counter worker="0">108770</Counter>
- <Counter worker="1">108767</Counter>
- <Counter worker="2">108774</Counter>
- <Counter worker="3">108774</Counter>
- <Counter worker="4">108762</Counter>
- <Counter worker="5">108772</Counter>
- <Counter worker="6">108769</Counter>
- <Counter worker="7">108772</Counter>
- <Counter worker="8">108769</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="10">
- <Counter worker="0">88888</Counter>
- <Counter worker="1">88883</Counter>
- <Counter worker="2">88889</Counter>
- <Counter worker="3">88885</Counter>
- <Counter worker="4">88885</Counter>
- <Counter worker="5">88885</Counter>
- <Counter worker="6">88883</Counter>
- <Counter worker="7">88882</Counter>
- <Counter worker="8">88877</Counter>
- <Counter worker="9">88883</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="11">
- <Counter worker="0">77874</Counter>
- <Counter worker="1">77873</Counter>
- <Counter worker="2">77879</Counter>
- <Counter worker="3">77872</Counter>
- <Counter worker="4">77873</Counter>
- <Counter worker="5">77877</Counter>
- <Counter worker="6">77880</Counter>
- <Counter worker="7">77876</Counter>
- <Counter worker="8">77874</Counter>
- <Counter worker="9">77870</Counter>
- <Counter worker="10">77872</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="12">
- <Counter worker="0">70256</Counter>
- <Counter worker="1">70259</Counter>
- <Counter worker="2">70264</Counter>
- <Counter worker="3">70258</Counter>
- <Counter worker="4">70262</Counter>
- <Counter worker="5">70266</Counter>
- <Counter worker="6">70260</Counter>
- <Counter worker="7">70256</Counter>
- <Counter worker="8">70257</Counter>
- <Counter worker="9">70258</Counter>
- <Counter worker="10">70259</Counter>
- <Counter worker="11">70258</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="13">
- <Counter worker="0">62735</Counter>
- <Counter worker="1">62740</Counter>
- <Counter worker="2">62741</Counter>
- <Counter worker="3">62737</Counter>
- <Counter worker="4">62733</Counter>
- <Counter worker="5">62735</Counter>
- <Counter worker="6">62736</Counter>
- <Counter worker="7">62734</Counter>
- <Counter worker="8">62732</Counter>
- <Counter worker="9">62731</Counter>
- <Counter worker="10">62731</Counter>
- <Counter worker="11">62730</Counter>
- <Counter worker="12">62730</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="14">
- <Counter worker="0">59093</Counter>
- <Counter worker="1">59091</Counter>
- <Counter worker="2">59093</Counter>
- <Counter worker="3">59094</Counter>
- <Counter worker="4">59088</Counter>
- <Counter worker="5">59092</Counter>
- <Counter worker="6">59099</Counter>
- <Counter worker="7">59097</Counter>
- <Counter worker="8">59091</Counter>
- <Counter worker="9">59089</Counter>
- <Counter worker="10">59088</Counter>
- <Counter worker="11">59102</Counter>
- <Counter worker="12">59088</Counter>
- <Counter worker="13">59087</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="15">
- <Counter worker="0">51130</Counter>
- <Counter worker="1">51127</Counter>
- <Counter worker="2">51121</Counter>
- <Counter worker="3">51131</Counter>
- <Counter worker="4">51123</Counter>
- <Counter worker="5">51125</Counter>
- <Counter worker="6">51129</Counter>
- <Counter worker="7">51121</Counter>
- <Counter worker="8">51125</Counter>
- <Counter worker="9">51120</Counter>
- <Counter worker="10">51126</Counter>
- <Counter worker="11">51122</Counter>
- <Counter worker="12">51124</Counter>
- <Counter worker="13">51122</Counter>
- <Counter worker="14">51124</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="16">
- <Counter worker="0">48586</Counter>
- <Counter worker="1">48591</Counter>
- <Counter worker="2">48592</Counter>
- <Counter worker="3">48586</Counter>
- <Counter worker="4">48586</Counter>
- <Counter worker="5">48590</Counter>
- <Counter worker="6">48588</Counter>
- <Counter worker="7">48587</Counter>
- <Counter worker="8">48594</Counter>
- <Counter worker="9">48596</Counter>
- <Counter worker="10">48588</Counter>
- <Counter worker="11">48589</Counter>
- <Counter worker="12">48596</Counter>
- <Counter worker="13">48593</Counter>
- <Counter worker="14">48591</Counter>
- <Counter worker="15">48589</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="17">
- <Counter worker="0">43007</Counter>
- <Counter worker="1">42998</Counter>
- <Counter worker="2">43002</Counter>
- <Counter worker="3">43006</Counter>
- <Counter worker="4">43008</Counter>
- <Counter worker="5">43010</Counter>
- <Counter worker="6">43000</Counter>
- <Counter worker="7">43002</Counter>
- <Counter worker="8">42999</Counter>
- <Counter worker="9">43000</Counter>
- <Counter worker="10">43003</Counter>
- <Counter worker="11">42999</Counter>
- <Counter worker="12">42998</Counter>
- <Counter worker="13">43001</Counter>
- <Counter worker="14">43004</Counter>
- <Counter worker="15">43005</Counter>
- <Counter worker="16">43005</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="18">
- <Counter worker="0">38958</Counter>
- <Counter worker="1">38953</Counter>
- <Counter worker="2">38958</Counter>
- <Counter worker="3">38951</Counter>
- <Counter worker="4">38950</Counter>
- <Counter worker="5">38972</Counter>
- <Counter worker="6">38950</Counter>
- <Counter worker="7">38953</Counter>
- <Counter worker="8">38957</Counter>
- <Counter worker="9">38956</Counter>
- <Counter worker="10">38955</Counter>
- <Counter worker="11">38967</Counter>
- <Counter worker="12">38952</Counter>
- <Counter worker="13">38952</Counter>
- <Counter worker="14">38963</Counter>
- <Counter worker="15">38951</Counter>
- <Counter worker="16">38960</Counter>
- <Counter worker="17">38954</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="19">
- <Counter worker="0">37040</Counter>
- <Counter worker="1">37042</Counter>
- <Counter worker="2">37050</Counter>
- <Counter worker="3">37051</Counter>
- <Counter worker="4">37049</Counter>
- <Counter worker="5">37047</Counter>
- <Counter worker="6">37044</Counter>
- <Counter worker="7">37042</Counter>
- <Counter worker="8">37048</Counter>
- <Counter worker="9">37039</Counter>
- <Counter worker="10">37045</Counter>
- <Counter worker="11">37041</Counter>
- <Counter worker="12">37041</Counter>
- <Counter worker="13">37038</Counter>
- <Counter worker="14">37038</Counter>
- <Counter worker="15">37040</Counter>
- <Counter worker="16">37043</Counter>
- <Counter worker="17">37044</Counter>
- <Counter worker="18">37045</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="20">
- <Counter worker="0">33977</Counter>
- <Counter worker="1">33977</Counter>
- <Counter worker="2">33969</Counter>
- <Counter worker="3">33975</Counter>
- <Counter worker="4">33965</Counter>
- <Counter worker="5">33968</Counter>
- <Counter worker="6">33967</Counter>
- <Counter worker="7">33974</Counter>
- <Counter worker="8">33968</Counter>
- <Counter worker="9">33972</Counter>
- <Counter worker="10">33964</Counter>
- <Counter worker="11">33973</Counter>
- <Counter worker="12">33970</Counter>
- <Counter worker="13">33967</Counter>
- <Counter worker="14">33965</Counter>
- <Counter worker="15">33966</Counter>
- <Counter worker="16">33966</Counter>
- <Counter worker="17">33972</Counter>
- <Counter worker="18">33971</Counter>
- <Counter worker="19">33970</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="21">
- <Counter worker="0">34845</Counter>
- <Counter worker="1">34846</Counter>
- <Counter worker="2">34849</Counter>
- <Counter worker="3">34851</Counter>
- <Counter worker="4">34850</Counter>
- <Counter worker="5">34842</Counter>
- <Counter worker="6">34845</Counter>
- <Counter worker="7">34856</Counter>
- <Counter worker="8">34842</Counter>
- <Counter worker="9">34842</Counter>
- <Counter worker="10">34844</Counter>
- <Counter worker="11">34848</Counter>
- <Counter worker="12">34856</Counter>
- <Counter worker="13">34857</Counter>
- <Counter worker="14">34843</Counter>
- <Counter worker="15">34856</Counter>
- <Counter worker="16">34849</Counter>
- <Counter worker="17">34847</Counter>
- <Counter worker="18">34847</Counter>
- <Counter worker="19">34843</Counter>
- <Counter worker="20">34844</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="22">
- <Counter worker="0">29938</Counter>
- <Counter worker="1">29946</Counter>
- <Counter worker="2">29949</Counter>
- <Counter worker="3">29944</Counter>
- <Counter worker="4">29940</Counter>
- <Counter worker="5">29945</Counter>
- <Counter worker="6">29938</Counter>
- <Counter worker="7">29943</Counter>
- <Counter worker="8">29942</Counter>
- <Counter worker="9">29945</Counter>
- <Counter worker="10">29940</Counter>
- <Counter worker="11">29946</Counter>
- <Counter worker="12">29939</Counter>
- <Counter worker="13">29938</Counter>
- <Counter worker="14">29948</Counter>
- <Counter worker="15">29939</Counter>
- <Counter worker="16">29941</Counter>
- <Counter worker="17">29948</Counter>
- <Counter worker="18">29943</Counter>
- <Counter worker="19">29941</Counter>
- <Counter worker="20">29951</Counter>
- <Counter worker="21">29952</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="23">
- <Counter worker="0">29210</Counter>
- <Counter worker="1">29214</Counter>
- <Counter worker="2">29224</Counter>
- <Counter worker="3">29225</Counter>
- <Counter worker="4">29212</Counter>
- <Counter worker="5">29218</Counter>
- <Counter worker="6">29218</Counter>
- <Counter worker="7">29210</Counter>
- <Counter worker="8">29219</Counter>
- <Counter worker="9">29220</Counter>
- <Counter worker="10">29222</Counter>
- <Counter worker="11">29217</Counter>
- <Counter worker="12">29215</Counter>
- <Counter worker="13">29212</Counter>
- <Counter worker="14">29210</Counter>
- <Counter worker="15">29214</Counter>
- <Counter worker="16">29213</Counter>
- <Counter worker="17">29216</Counter>
- <Counter worker="18">29217</Counter>
- <Counter worker="19">29221</Counter>
- <Counter worker="20">29211</Counter>
- <Counter worker="21">29213</Counter>
- <Counter worker="22">29216</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicCeilingMutex activeWorker="24">
- <Counter worker="0">25904</Counter>
- <Counter worker="1">25912</Counter>
- <Counter worker="2">25906</Counter>
- <Counter worker="3">25914</Counter>
- <Counter worker="4">25909</Counter>
- <Counter worker="5">25909</Counter>
- <Counter worker="6">25911</Counter>
- <Counter worker="7">25907</Counter>
- <Counter worker="8">25906</Counter>
- <Counter worker="9">25903</Counter>
- <Counter worker="10">25905</Counter>
- <Counter worker="11">25905</Counter>
- <Counter worker="12">25913</Counter>
- <Counter worker="13">25910</Counter>
- <Counter worker="14">25913</Counter>
- <Counter worker="15">25915</Counter>
- <Counter worker="16">25911</Counter>
- <Counter worker="17">25903</Counter>
- <Counter worker="18">25908</Counter>
- <Counter worker="19">25916</Counter>
- <Counter worker="20">25918</Counter>
- <Counter worker="21">25919</Counter>
- <Counter worker="22">25904</Counter>
- <Counter worker="23">25907</Counter>
- </ManyClassicCeilingMutex>
- <ManyClassicMrsPMutex activeWorker="1">
- <Counter worker="0">784201</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="2">
- <Counter worker="0">712340</Counter>
- <Counter worker="1">712386</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="3">
- <Counter worker="0">674000</Counter>
- <Counter worker="1">674051</Counter>
- <Counter worker="2">674040</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="4">
- <Counter worker="0">508157</Counter>
- <Counter worker="1">508153</Counter>
- <Counter worker="2">508159</Counter>
- <Counter worker="3">508110</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="5">
- <Counter worker="0">404003</Counter>
- <Counter worker="1">403999</Counter>
- <Counter worker="2">404000</Counter>
- <Counter worker="3">403956</Counter>
- <Counter worker="4">404001</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="6">
- <Counter worker="0">327904</Counter>
- <Counter worker="1">327939</Counter>
- <Counter worker="2">327942</Counter>
- <Counter worker="3">327939</Counter>
- <Counter worker="4">327939</Counter>
- <Counter worker="5">327943</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="7">
- <Counter worker="0">272616</Counter>
- <Counter worker="1">272614</Counter>
- <Counter worker="2">272610</Counter>
- <Counter worker="3">272613</Counter>
- <Counter worker="4">272618</Counter>
- <Counter worker="5">272620</Counter>
- <Counter worker="6">272575</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="8">
- <Counter worker="0">234547</Counter>
- <Counter worker="1">234543</Counter>
- <Counter worker="2">234550</Counter>
- <Counter worker="3">234547</Counter>
- <Counter worker="4">234513</Counter>
- <Counter worker="5">234546</Counter>
- <Counter worker="6">234543</Counter>
- <Counter worker="7">234543</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="9">
- <Counter worker="0">107383</Counter>
- <Counter worker="1">107392</Counter>
- <Counter worker="2">107386</Counter>
- <Counter worker="3">107386</Counter>
- <Counter worker="4">107389</Counter>
- <Counter worker="5">107392</Counter>
- <Counter worker="6">107385</Counter>
- <Counter worker="7">107394</Counter>
- <Counter worker="8">107377</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="10">
- <Counter worker="0">89997</Counter>
- <Counter worker="1">89997</Counter>
- <Counter worker="2">89997</Counter>
- <Counter worker="3">90000</Counter>
- <Counter worker="4">90001</Counter>
- <Counter worker="5">89993</Counter>
- <Counter worker="6">89995</Counter>
- <Counter worker="7">89995</Counter>
- <Counter worker="8">90001</Counter>
- <Counter worker="9">90001</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="11">
- <Counter worker="0">76542</Counter>
- <Counter worker="1">76545</Counter>
- <Counter worker="2">76542</Counter>
- <Counter worker="3">76541</Counter>
- <Counter worker="4">76540</Counter>
- <Counter worker="5">76549</Counter>
- <Counter worker="6">76548</Counter>
- <Counter worker="7">76545</Counter>
- <Counter worker="8">76540</Counter>
- <Counter worker="9">76540</Counter>
- <Counter worker="10">76545</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="12">
- <Counter worker="0">65159</Counter>
- <Counter worker="1">65161</Counter>
- <Counter worker="2">65155</Counter>
- <Counter worker="3">65158</Counter>
- <Counter worker="4">65156</Counter>
- <Counter worker="5">65154</Counter>
- <Counter worker="6">65157</Counter>
- <Counter worker="7">65156</Counter>
- <Counter worker="8">65150</Counter>
- <Counter worker="9">65153</Counter>
- <Counter worker="10">65154</Counter>
- <Counter worker="11">65152</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="13">
- <Counter worker="0">61089</Counter>
- <Counter worker="1">61093</Counter>
- <Counter worker="2">61092</Counter>
- <Counter worker="3">61093</Counter>
- <Counter worker="4">61094</Counter>
- <Counter worker="5">61089</Counter>
- <Counter worker="6">61090</Counter>
- <Counter worker="7">61092</Counter>
- <Counter worker="8">61098</Counter>
- <Counter worker="9">61098</Counter>
- <Counter worker="10">61091</Counter>
- <Counter worker="11">61090</Counter>
- <Counter worker="12">61095</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="14">
- <Counter worker="0">58163</Counter>
- <Counter worker="1">58164</Counter>
- <Counter worker="2">58160</Counter>
- <Counter worker="3">58158</Counter>
- <Counter worker="4">58156</Counter>
- <Counter worker="5">58159</Counter>
- <Counter worker="6">58157</Counter>
- <Counter worker="7">58156</Counter>
- <Counter worker="8">58153</Counter>
- <Counter worker="9">58155</Counter>
- <Counter worker="10">58154</Counter>
- <Counter worker="11">58150</Counter>
- <Counter worker="12">58153</Counter>
- <Counter worker="13">58152</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="15">
- <Counter worker="0">49108</Counter>
- <Counter worker="1">49110</Counter>
- <Counter worker="2">49107</Counter>
- <Counter worker="3">49106</Counter>
- <Counter worker="4">49114</Counter>
- <Counter worker="5">49112</Counter>
- <Counter worker="6">49113</Counter>
- <Counter worker="7">49107</Counter>
- <Counter worker="8">49109</Counter>
- <Counter worker="9">49110</Counter>
- <Counter worker="10">49112</Counter>
- <Counter worker="11">49117</Counter>
- <Counter worker="12">49115</Counter>
- <Counter worker="13">49111</Counter>
- <Counter worker="14">49106</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="16">
- <Counter worker="0">45403</Counter>
- <Counter worker="1">45406</Counter>
- <Counter worker="2">45405</Counter>
- <Counter worker="3">45404</Counter>
- <Counter worker="4">45407</Counter>
- <Counter worker="5">45402</Counter>
- <Counter worker="6">45401</Counter>
- <Counter worker="7">45403</Counter>
- <Counter worker="8">45407</Counter>
- <Counter worker="9">45410</Counter>
- <Counter worker="10">45411</Counter>
- <Counter worker="11">45404</Counter>
- <Counter worker="12">45413</Counter>
- <Counter worker="13">45410</Counter>
- <Counter worker="14">45401</Counter>
- <Counter worker="15">45401</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="17">
- <Counter worker="0">40546</Counter>
- <Counter worker="1">40547</Counter>
- <Counter worker="2">40552</Counter>
- <Counter worker="3">40546</Counter>
- <Counter worker="4">40554</Counter>
- <Counter worker="5">40553</Counter>
- <Counter worker="6">40550</Counter>
- <Counter worker="7">40552</Counter>
- <Counter worker="8">40559</Counter>
- <Counter worker="9">40559</Counter>
- <Counter worker="10">40555</Counter>
- <Counter worker="11">40556</Counter>
- <Counter worker="12">40550</Counter>
- <Counter worker="13">40548</Counter>
- <Counter worker="14">40548</Counter>
- <Counter worker="15">40549</Counter>
- <Counter worker="16">40551</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="18">
- <Counter worker="0">39609</Counter>
- <Counter worker="1">39614</Counter>
- <Counter worker="2">39610</Counter>
- <Counter worker="3">39616</Counter>
- <Counter worker="4">39618</Counter>
- <Counter worker="5">39615</Counter>
- <Counter worker="6">39613</Counter>
- <Counter worker="7">39613</Counter>
- <Counter worker="8">39615</Counter>
- <Counter worker="9">39617</Counter>
- <Counter worker="10">39610</Counter>
- <Counter worker="11">39618</Counter>
- <Counter worker="12">39615</Counter>
- <Counter worker="13">39611</Counter>
- <Counter worker="14">39612</Counter>
- <Counter worker="15">39611</Counter>
- <Counter worker="16">39621</Counter>
- <Counter worker="17">39620</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="19">
- <Counter worker="0">35744</Counter>
- <Counter worker="1">35742</Counter>
- <Counter worker="2">35744</Counter>
- <Counter worker="3">35747</Counter>
- <Counter worker="4">35752</Counter>
- <Counter worker="5">35755</Counter>
- <Counter worker="6">35745</Counter>
- <Counter worker="7">35753</Counter>
- <Counter worker="8">35745</Counter>
- <Counter worker="9">35747</Counter>
- <Counter worker="10">35742</Counter>
- <Counter worker="11">35751</Counter>
- <Counter worker="12">35749</Counter>
- <Counter worker="13">35746</Counter>
- <Counter worker="14">35743</Counter>
- <Counter worker="15">35746</Counter>
- <Counter worker="16">35749</Counter>
- <Counter worker="17">35743</Counter>
- <Counter worker="18">35748</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="20">
- <Counter worker="0">33654</Counter>
- <Counter worker="1">33664</Counter>
- <Counter worker="2">33659</Counter>
- <Counter worker="3">33661</Counter>
- <Counter worker="4">33654</Counter>
- <Counter worker="5">33658</Counter>
- <Counter worker="6">33663</Counter>
- <Counter worker="7">33654</Counter>
- <Counter worker="8">33668</Counter>
- <Counter worker="9">33660</Counter>
- <Counter worker="10">33660</Counter>
- <Counter worker="11">33655</Counter>
- <Counter worker="12">33667</Counter>
- <Counter worker="13">33657</Counter>
- <Counter worker="14">33655</Counter>
- <Counter worker="15">33664</Counter>
- <Counter worker="16">33657</Counter>
- <Counter worker="17">33656</Counter>
- <Counter worker="18">33662</Counter>
- <Counter worker="19">33659</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="21">
- <Counter worker="0">32410</Counter>
- <Counter worker="1">32414</Counter>
- <Counter worker="2">32407</Counter>
- <Counter worker="3">32409</Counter>
- <Counter worker="4">32420</Counter>
- <Counter worker="5">32413</Counter>
- <Counter worker="6">32422</Counter>
- <Counter worker="7">32421</Counter>
- <Counter worker="8">32408</Counter>
- <Counter worker="9">32414</Counter>
- <Counter worker="10">32407</Counter>
- <Counter worker="11">32411</Counter>
- <Counter worker="12">32413</Counter>
- <Counter worker="13">32416</Counter>
- <Counter worker="14">32408</Counter>
- <Counter worker="15">32418</Counter>
- <Counter worker="16">32412</Counter>
- <Counter worker="17">32416</Counter>
- <Counter worker="18">32411</Counter>
- <Counter worker="19">32410</Counter>
- <Counter worker="20">32417</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="22">
- <Counter worker="0">29188</Counter>
- <Counter worker="1">29192</Counter>
- <Counter worker="2">29201</Counter>
- <Counter worker="3">29198</Counter>
- <Counter worker="4">29187</Counter>
- <Counter worker="5">29195</Counter>
- <Counter worker="6">29192</Counter>
- <Counter worker="7">29195</Counter>
- <Counter worker="8">29200</Counter>
- <Counter worker="9">29193</Counter>
- <Counter worker="10">29197</Counter>
- <Counter worker="11">29189</Counter>
- <Counter worker="12">29189</Counter>
- <Counter worker="13">29190</Counter>
- <Counter worker="14">29188</Counter>
- <Counter worker="15">29196</Counter>
- <Counter worker="16">29194</Counter>
- <Counter worker="17">29191</Counter>
- <Counter worker="18">29199</Counter>
- <Counter worker="19">29194</Counter>
- <Counter worker="20">29191</Counter>
- <Counter worker="21">29190</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="23">
- <Counter worker="0">27206</Counter>
- <Counter worker="1">27216</Counter>
- <Counter worker="2">27222</Counter>
- <Counter worker="3">27211</Counter>
- <Counter worker="4">27211</Counter>
- <Counter worker="5">27210</Counter>
- <Counter worker="6">27212</Counter>
- <Counter worker="7">27208</Counter>
- <Counter worker="8">27214</Counter>
- <Counter worker="9">27207</Counter>
- <Counter worker="10">27208</Counter>
- <Counter worker="11">27214</Counter>
- <Counter worker="12">27210</Counter>
- <Counter worker="13">27209</Counter>
- <Counter worker="14">27218</Counter>
- <Counter worker="15">27217</Counter>
- <Counter worker="16">27219</Counter>
- <Counter worker="17">27206</Counter>
- <Counter worker="18">27215</Counter>
- <Counter worker="19">27213</Counter>
- <Counter worker="20">27207</Counter>
- <Counter worker="21">27212</Counter>
- <Counter worker="22">27232</Counter>
- </ManyClassicMrsPMutex>
- <ManyClassicMrsPMutex activeWorker="24">
- <Counter worker="0">24666</Counter>
- <Counter worker="1">24670</Counter>
- <Counter worker="2">24664</Counter>
- <Counter worker="3">24672</Counter>
- <Counter worker="4">24671</Counter>
- <Counter worker="5">24668</Counter>
- <Counter worker="6">24668</Counter>
- <Counter worker="7">24667</Counter>
- <Counter worker="8">24671</Counter>
- <Counter worker="9">24664</Counter>
- <Counter worker="10">24667</Counter>
- <Counter worker="11">24666</Counter>
- <Counter worker="12">24675</Counter>
- <Counter worker="13">24670</Counter>
- <Counter worker="14">24664</Counter>
- <Counter worker="15">24673</Counter>
- <Counter worker="16">24673</Counter>
- <Counter worker="17">24669</Counter>
- <Counter worker="18">24665</Counter>
- <Counter worker="19">24675</Counter>
- <Counter worker="20">24681</Counter>
- <Counter worker="21">24674</Counter>
- <Counter worker="22">24677</Counter>
- <Counter worker="23">24681</Counter>
- </ManyClassicMrsPMutex>
- <ManyPthreadSpinlock activeWorker="1">
- <Counter worker="0">14718834</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="2">
- <Counter worker="0">14545804</Counter>
- <Counter worker="1">14546744</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="3">
- <Counter worker="0">14202896</Counter>
- <Counter worker="1">14203740</Counter>
- <Counter worker="2">14204031</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="4">
- <Counter worker="0">13936060</Counter>
- <Counter worker="1">13936903</Counter>
- <Counter worker="2">13937157</Counter>
- <Counter worker="3">13937175</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="5">
- <Counter worker="0">13882002</Counter>
- <Counter worker="1">13882875</Counter>
- <Counter worker="2">13883036</Counter>
- <Counter worker="3">13883032</Counter>
- <Counter worker="4">13883129</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="6">
- <Counter worker="0">13678756</Counter>
- <Counter worker="1">13679620</Counter>
- <Counter worker="2">13679743</Counter>
- <Counter worker="3">13679940</Counter>
- <Counter worker="4">13679849</Counter>
- <Counter worker="5">13679778</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="7">
- <Counter worker="0">13536294</Counter>
- <Counter worker="1">13537073</Counter>
- <Counter worker="2">13537313</Counter>
- <Counter worker="3">13537271</Counter>
- <Counter worker="4">13537347</Counter>
- <Counter worker="5">13537331</Counter>
- <Counter worker="6">13537366</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="8">
- <Counter worker="0">13416795</Counter>
- <Counter worker="1">13417680</Counter>
- <Counter worker="2">13417750</Counter>
- <Counter worker="3">13417879</Counter>
- <Counter worker="4">13417890</Counter>
- <Counter worker="5">13417884</Counter>
- <Counter worker="6">13417887</Counter>
- <Counter worker="7">13417860</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="9">
- <Counter worker="0">13344563</Counter>
- <Counter worker="1">13345425</Counter>
- <Counter worker="2">13345471</Counter>
- <Counter worker="3">13345553</Counter>
- <Counter worker="4">13345686</Counter>
- <Counter worker="5">13345685</Counter>
- <Counter worker="6">13345620</Counter>
- <Counter worker="7">13345553</Counter>
- <Counter worker="8">14664124</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="10">
- <Counter worker="0">13345484</Counter>
- <Counter worker="1">13346290</Counter>
- <Counter worker="2">13346571</Counter>
- <Counter worker="3">13346539</Counter>
- <Counter worker="4">13346562</Counter>
- <Counter worker="5">13346553</Counter>
- <Counter worker="6">13346462</Counter>
- <Counter worker="7">13346482</Counter>
- <Counter worker="8">14489005</Counter>
- <Counter worker="9">14489074</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="11">
- <Counter worker="0">13387106</Counter>
- <Counter worker="1">13387968</Counter>
- <Counter worker="2">13388136</Counter>
- <Counter worker="3">13388157</Counter>
- <Counter worker="4">13388188</Counter>
- <Counter worker="5">13388196</Counter>
- <Counter worker="6">13388173</Counter>
- <Counter worker="7">13388181</Counter>
- <Counter worker="8">14106966</Counter>
- <Counter worker="9">14106972</Counter>
- <Counter worker="10">14106794</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="12">
- <Counter worker="0">13339713</Counter>
- <Counter worker="1">13340579</Counter>
- <Counter worker="2">13340745</Counter>
- <Counter worker="3">13340783</Counter>
- <Counter worker="4">13340828</Counter>
- <Counter worker="5">13340858</Counter>
- <Counter worker="6">13340715</Counter>
- <Counter worker="7">13340770</Counter>
- <Counter worker="8">13878859</Counter>
- <Counter worker="9">13878923</Counter>
- <Counter worker="10">13878707</Counter>
- <Counter worker="11">13878654</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="13">
- <Counter worker="0">13423332</Counter>
- <Counter worker="1">13424154</Counter>
- <Counter worker="2">13424352</Counter>
- <Counter worker="3">13424415</Counter>
- <Counter worker="4">13424314</Counter>
- <Counter worker="5">13424308</Counter>
- <Counter worker="6">13424314</Counter>
- <Counter worker="7">13424303</Counter>
- <Counter worker="8">13894368</Counter>
- <Counter worker="9">13894493</Counter>
- <Counter worker="10">13894289</Counter>
- <Counter worker="11">13894305</Counter>
- <Counter worker="12">13894313</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="14">
- <Counter worker="0">13374209</Counter>
- <Counter worker="1">13375090</Counter>
- <Counter worker="2">13375258</Counter>
- <Counter worker="3">13375185</Counter>
- <Counter worker="4">13375228</Counter>
- <Counter worker="5">13375289</Counter>
- <Counter worker="6">13375221</Counter>
- <Counter worker="7">13375272</Counter>
- <Counter worker="8">13638146</Counter>
- <Counter worker="9">13638099</Counter>
- <Counter worker="10">13638011</Counter>
- <Counter worker="11">13637921</Counter>
- <Counter worker="12">13638082</Counter>
- <Counter worker="13">13638078</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="15">
- <Counter worker="0">13324122</Counter>
- <Counter worker="1">13324923</Counter>
- <Counter worker="2">13322227</Counter>
- <Counter worker="3">13322310</Counter>
- <Counter worker="4">13325255</Counter>
- <Counter worker="5">13325158</Counter>
- <Counter worker="6">13325121</Counter>
- <Counter worker="7">13325137</Counter>
- <Counter worker="8">13526376</Counter>
- <Counter worker="9">13526358</Counter>
- <Counter worker="10">13526223</Counter>
- <Counter worker="11">13526248</Counter>
- <Counter worker="12">13526360</Counter>
- <Counter worker="13">13526365</Counter>
- <Counter worker="14">13526370</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="16">
- <Counter worker="0">13409904</Counter>
- <Counter worker="1">13410740</Counter>
- <Counter worker="2">13410903</Counter>
- <Counter worker="3">13410988</Counter>
- <Counter worker="4">13411030</Counter>
- <Counter worker="5">13410987</Counter>
- <Counter worker="6">13410838</Counter>
- <Counter worker="7">13410949</Counter>
- <Counter worker="8">13425120</Counter>
- <Counter worker="9">13425212</Counter>
- <Counter worker="10">13425033</Counter>
- <Counter worker="11">13425047</Counter>
- <Counter worker="12">13425054</Counter>
- <Counter worker="13">13425101</Counter>
- <Counter worker="14">13425139</Counter>
- <Counter worker="15">13425072</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="17">
- <Counter worker="0">13358197</Counter>
- <Counter worker="1">13359084</Counter>
- <Counter worker="2">13359207</Counter>
- <Counter worker="3">13359276</Counter>
- <Counter worker="4">13359271</Counter>
- <Counter worker="5">13359332</Counter>
- <Counter worker="6">13359272</Counter>
- <Counter worker="7">13359197</Counter>
- <Counter worker="8">13377371</Counter>
- <Counter worker="9">13377387</Counter>
- <Counter worker="10">13377385</Counter>
- <Counter worker="11">13377388</Counter>
- <Counter worker="12">13377413</Counter>
- <Counter worker="13">13377416</Counter>
- <Counter worker="14">13377379</Counter>
- <Counter worker="15">13377457</Counter>
- <Counter worker="16">14648127</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="18">
- <Counter worker="0">13450072</Counter>
- <Counter worker="1">13450903</Counter>
- <Counter worker="2">13451130</Counter>
- <Counter worker="3">13451147</Counter>
- <Counter worker="4">13451124</Counter>
- <Counter worker="5">13451254</Counter>
- <Counter worker="6">13451111</Counter>
- <Counter worker="7">13451124</Counter>
- <Counter worker="8">13476959</Counter>
- <Counter worker="9">13476898</Counter>
- <Counter worker="10">13476818</Counter>
- <Counter worker="11">13476757</Counter>
- <Counter worker="12">13476779</Counter>
- <Counter worker="13">13476826</Counter>
- <Counter worker="14">13476887</Counter>
- <Counter worker="15">13476812</Counter>
- <Counter worker="16">14753607</Counter>
- <Counter worker="17">14753628</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="19">
- <Counter worker="0">13391588</Counter>
- <Counter worker="1">13392430</Counter>
- <Counter worker="2">13392562</Counter>
- <Counter worker="3">13392593</Counter>
- <Counter worker="4">13392668</Counter>
- <Counter worker="5">13392691</Counter>
- <Counter worker="6">13392561</Counter>
- <Counter worker="7">13392599</Counter>
- <Counter worker="8">13399126</Counter>
- <Counter worker="9">13399129</Counter>
- <Counter worker="10">13399029</Counter>
- <Counter worker="11">13398973</Counter>
- <Counter worker="12">13399022</Counter>
- <Counter worker="13">13399026</Counter>
- <Counter worker="14">13398920</Counter>
- <Counter worker="15">13398974</Counter>
- <Counter worker="16">14175315</Counter>
- <Counter worker="17">14175222</Counter>
- <Counter worker="18">14175311</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="20">
- <Counter worker="0">13355745</Counter>
- <Counter worker="1">13356643</Counter>
- <Counter worker="2">13356778</Counter>
- <Counter worker="3">13356845</Counter>
- <Counter worker="4">13356826</Counter>
- <Counter worker="5">13356881</Counter>
- <Counter worker="6">13356673</Counter>
- <Counter worker="7">13356756</Counter>
- <Counter worker="8">13361313</Counter>
- <Counter worker="9">13361244</Counter>
- <Counter worker="10">13357068</Counter>
- <Counter worker="11">13356983</Counter>
- <Counter worker="12">13356966</Counter>
- <Counter worker="13">13356990</Counter>
- <Counter worker="14">13361213</Counter>
- <Counter worker="15">13361185</Counter>
- <Counter worker="16">13989600</Counter>
- <Counter worker="17">13989623</Counter>
- <Counter worker="18">13989693</Counter>
- <Counter worker="19">13989659</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="21">
- <Counter worker="0">13407936</Counter>
- <Counter worker="1">13408763</Counter>
- <Counter worker="2">13408903</Counter>
- <Counter worker="3">13408988</Counter>
- <Counter worker="4">13409085</Counter>
- <Counter worker="5">13409045</Counter>
- <Counter worker="6">13408998</Counter>
- <Counter worker="7">13408901</Counter>
- <Counter worker="8">13434650</Counter>
- <Counter worker="9">13434644</Counter>
- <Counter worker="10">13434596</Counter>
- <Counter worker="11">13434581</Counter>
- <Counter worker="12">13434577</Counter>
- <Counter worker="13">13434621</Counter>
- <Counter worker="14">13434678</Counter>
- <Counter worker="15">13434611</Counter>
- <Counter worker="16">13925505</Counter>
- <Counter worker="17">13925519</Counter>
- <Counter worker="18">13925574</Counter>
- <Counter worker="19">13925534</Counter>
- <Counter worker="20">13925556</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="22">
- <Counter worker="0">13357133</Counter>
- <Counter worker="1">13357991</Counter>
- <Counter worker="2">13358199</Counter>
- <Counter worker="3">13358166</Counter>
- <Counter worker="4">13358386</Counter>
- <Counter worker="5">13358347</Counter>
- <Counter worker="6">13358183</Counter>
- <Counter worker="7">13358191</Counter>
- <Counter worker="8">13409498</Counter>
- <Counter worker="9">13409534</Counter>
- <Counter worker="10">13409355</Counter>
- <Counter worker="11">13409356</Counter>
- <Counter worker="12">13409477</Counter>
- <Counter worker="13">13409398</Counter>
- <Counter worker="14">13409398</Counter>
- <Counter worker="15">13409452</Counter>
- <Counter worker="16">13725035</Counter>
- <Counter worker="17">13725102</Counter>
- <Counter worker="18">13725140</Counter>
- <Counter worker="19">13724990</Counter>
- <Counter worker="20">13725108</Counter>
- <Counter worker="21">13725040</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="23">
- <Counter worker="0">13448281</Counter>
- <Counter worker="1">13449150</Counter>
- <Counter worker="2">13449235</Counter>
- <Counter worker="3">13449263</Counter>
- <Counter worker="4">13449358</Counter>
- <Counter worker="5">13449247</Counter>
- <Counter worker="6">13449327</Counter>
- <Counter worker="7">13449312</Counter>
- <Counter worker="8">13468811</Counter>
- <Counter worker="9">13468839</Counter>
- <Counter worker="10">13468751</Counter>
- <Counter worker="11">13468726</Counter>
- <Counter worker="12">13468738</Counter>
- <Counter worker="13">13468711</Counter>
- <Counter worker="14">13468861</Counter>
- <Counter worker="15">13468835</Counter>
- <Counter worker="16">13675503</Counter>
- <Counter worker="17">13675619</Counter>
- <Counter worker="18">13675523</Counter>
- <Counter worker="19">13675472</Counter>
- <Counter worker="20">13675556</Counter>
- <Counter worker="21">13675544</Counter>
- <Counter worker="22">13675532</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadSpinlock activeWorker="24">
- <Counter worker="0">13380340</Counter>
- <Counter worker="1">13381193</Counter>
- <Counter worker="2">13378127</Counter>
- <Counter worker="3">13378172</Counter>
- <Counter worker="4">13384719</Counter>
- <Counter worker="5">13384699</Counter>
- <Counter worker="6">13384584</Counter>
- <Counter worker="7">13384610</Counter>
- <Counter worker="8">13403447</Counter>
- <Counter worker="9">13403370</Counter>
- <Counter worker="10">13403295</Counter>
- <Counter worker="11">13403431</Counter>
- <Counter worker="12">13403242</Counter>
- <Counter worker="13">13403348</Counter>
- <Counter worker="14">13403394</Counter>
- <Counter worker="15">13403378</Counter>
- <Counter worker="16">13451683</Counter>
- <Counter worker="17">13451643</Counter>
- <Counter worker="18">13445578</Counter>
- <Counter worker="19">13445455</Counter>
- <Counter worker="20">13451633</Counter>
- <Counter worker="21">13451656</Counter>
- <Counter worker="22">13451565</Counter>
- <Counter worker="23">13451541</Counter>
- </ManyPthreadSpinlock>
- <ManyPthreadMutexInherit activeWorker="1">
- <Counter worker="0">5685517</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="2">
- <Counter worker="0">5696601</Counter>
- <Counter worker="1">5696949</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="3">
- <Counter worker="0">5543995</Counter>
- <Counter worker="1">5544357</Counter>
- <Counter worker="2">5544426</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="4">
- <Counter worker="0">5454438</Counter>
- <Counter worker="1">5454782</Counter>
- <Counter worker="2">5454882</Counter>
- <Counter worker="3">5454926</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="5">
- <Counter worker="0">5471381</Counter>
- <Counter worker="1">5471738</Counter>
- <Counter worker="2">5471815</Counter>
- <Counter worker="3">5471828</Counter>
- <Counter worker="4">5471846</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="6">
- <Counter worker="0">5409420</Counter>
- <Counter worker="1">5409778</Counter>
- <Counter worker="2">5409870</Counter>
- <Counter worker="3">5409863</Counter>
- <Counter worker="4">5409834</Counter>
- <Counter worker="5">5409840</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="7">
- <Counter worker="0">5382186</Counter>
- <Counter worker="1">5382516</Counter>
- <Counter worker="2">5382597</Counter>
- <Counter worker="3">5382630</Counter>
- <Counter worker="4">5382622</Counter>
- <Counter worker="5">5382605</Counter>
- <Counter worker="6">5385095</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="8">
- <Counter worker="0">5352212</Counter>
- <Counter worker="1">5352555</Counter>
- <Counter worker="2">5352630</Counter>
- <Counter worker="3">5352640</Counter>
- <Counter worker="4">5352660</Counter>
- <Counter worker="5">5352675</Counter>
- <Counter worker="6">5352627</Counter>
- <Counter worker="7">5352647</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="9">
- <Counter worker="0">5330964</Counter>
- <Counter worker="1">5331314</Counter>
- <Counter worker="2">5331408</Counter>
- <Counter worker="3">5331433</Counter>
- <Counter worker="4">5331429</Counter>
- <Counter worker="5">5331422</Counter>
- <Counter worker="6">5331360</Counter>
- <Counter worker="7">5331402</Counter>
- <Counter worker="8">5696119</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="10">
- <Counter worker="0">5312790</Counter>
- <Counter worker="1">5313108</Counter>
- <Counter worker="2">5313193</Counter>
- <Counter worker="3">5313221</Counter>
- <Counter worker="4">5313253</Counter>
- <Counter worker="5">5313255</Counter>
- <Counter worker="6">5313216</Counter>
- <Counter worker="7">5313229</Counter>
- <Counter worker="8">5623042</Counter>
- <Counter worker="9">5623031</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="11">
- <Counter worker="0">5347426</Counter>
- <Counter worker="1">5347771</Counter>
- <Counter worker="2">5347831</Counter>
- <Counter worker="3">5347866</Counter>
- <Counter worker="4">5347844</Counter>
- <Counter worker="5">5347886</Counter>
- <Counter worker="6">5347836</Counter>
- <Counter worker="7">5347878</Counter>
- <Counter worker="8">5544845</Counter>
- <Counter worker="9">5544823</Counter>
- <Counter worker="10">5544727</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="12">
- <Counter worker="0">5324241</Counter>
- <Counter worker="1">5324589</Counter>
- <Counter worker="2">5324636</Counter>
- <Counter worker="3">5324686</Counter>
- <Counter worker="4">5324681</Counter>
- <Counter worker="5">5324678</Counter>
- <Counter worker="6">5324639</Counter>
- <Counter worker="7">5324665</Counter>
- <Counter worker="8">5499255</Counter>
- <Counter worker="9">5499245</Counter>
- <Counter worker="10">5499200</Counter>
- <Counter worker="11">5499220</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="13">
- <Counter worker="0">5361809</Counter>
- <Counter worker="1">5362145</Counter>
- <Counter worker="2">5362206</Counter>
- <Counter worker="3">5362252</Counter>
- <Counter worker="4">5362262</Counter>
- <Counter worker="5">5362262</Counter>
- <Counter worker="6">5362256</Counter>
- <Counter worker="7">5362238</Counter>
- <Counter worker="8">5485847</Counter>
- <Counter worker="9">5485850</Counter>
- <Counter worker="10">5485787</Counter>
- <Counter worker="11">5485770</Counter>
- <Counter worker="12">5485785</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="14">
- <Counter worker="0">5343125</Counter>
- <Counter worker="1">5343437</Counter>
- <Counter worker="2">5343528</Counter>
- <Counter worker="3">5343550</Counter>
- <Counter worker="4">5343575</Counter>
- <Counter worker="5">5343550</Counter>
- <Counter worker="6">5343537</Counter>
- <Counter worker="7">5343558</Counter>
- <Counter worker="8">5427404</Counter>
- <Counter worker="9">5427398</Counter>
- <Counter worker="10">5427402</Counter>
- <Counter worker="11">5427400</Counter>
- <Counter worker="12">5427379</Counter>
- <Counter worker="13">5427366</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="15">
- <Counter worker="0">5316180</Counter>
- <Counter worker="1">5316531</Counter>
- <Counter worker="2">5316583</Counter>
- <Counter worker="3">5316629</Counter>
- <Counter worker="4">5316636</Counter>
- <Counter worker="5">5316625</Counter>
- <Counter worker="6">5316608</Counter>
- <Counter worker="7">5316618</Counter>
- <Counter worker="8">5383017</Counter>
- <Counter worker="9">5383040</Counter>
- <Counter worker="10">5382956</Counter>
- <Counter worker="11">5382983</Counter>
- <Counter worker="12">5382964</Counter>
- <Counter worker="13">5382933</Counter>
- <Counter worker="14">5382973</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="16">
- <Counter worker="0">5348312</Counter>
- <Counter worker="1">5348636</Counter>
- <Counter worker="2">5348734</Counter>
- <Counter worker="3">5348745</Counter>
- <Counter worker="4">5348767</Counter>
- <Counter worker="5">5348747</Counter>
- <Counter worker="6">5348742</Counter>
- <Counter worker="7">5348758</Counter>
- <Counter worker="8">5377756</Counter>
- <Counter worker="9">5377760</Counter>
- <Counter worker="10">5377743</Counter>
- <Counter worker="11">5377735</Counter>
- <Counter worker="12">5377720</Counter>
- <Counter worker="13">5377705</Counter>
- <Counter worker="14">5377766</Counter>
- <Counter worker="15">5377744</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="17">
- <Counter worker="0">5328451</Counter>
- <Counter worker="1">5328804</Counter>
- <Counter worker="2">5328899</Counter>
- <Counter worker="3">5328944</Counter>
- <Counter worker="4">5328928</Counter>
- <Counter worker="5">5328922</Counter>
- <Counter worker="6">5328895</Counter>
- <Counter worker="7">5328892</Counter>
- <Counter worker="8">5352090</Counter>
- <Counter worker="9">5352051</Counter>
- <Counter worker="10">5352079</Counter>
- <Counter worker="11">5352076</Counter>
- <Counter worker="12">5352072</Counter>
- <Counter worker="13">5352070</Counter>
- <Counter worker="14">5352084</Counter>
- <Counter worker="15">5352060</Counter>
- <Counter worker="16">5780692</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="18">
- <Counter worker="0">5362263</Counter>
- <Counter worker="1">5362611</Counter>
- <Counter worker="2">5362670</Counter>
- <Counter worker="3">5362711</Counter>
- <Counter worker="4">5362685</Counter>
- <Counter worker="5">5362679</Counter>
- <Counter worker="6">5362698</Counter>
- <Counter worker="7">5362722</Counter>
- <Counter worker="8">5384935</Counter>
- <Counter worker="9">5384948</Counter>
- <Counter worker="10">5384849</Counter>
- <Counter worker="11">5384902</Counter>
- <Counter worker="12">5384887</Counter>
- <Counter worker="13">5384869</Counter>
- <Counter worker="14">5384912</Counter>
- <Counter worker="15">5384902</Counter>
- <Counter worker="16">5717423</Counter>
- <Counter worker="17">5717419</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="19">
- <Counter worker="0">5339960</Counter>
- <Counter worker="1">5340280</Counter>
- <Counter worker="2">5340379</Counter>
- <Counter worker="3">5340412</Counter>
- <Counter worker="4">5340413</Counter>
- <Counter worker="5">5340406</Counter>
- <Counter worker="6">5340390</Counter>
- <Counter worker="7">5340429</Counter>
- <Counter worker="8">5366702</Counter>
- <Counter worker="9">5366709</Counter>
- <Counter worker="10">5366618</Counter>
- <Counter worker="11">5366618</Counter>
- <Counter worker="12">5366640</Counter>
- <Counter worker="13">5366633</Counter>
- <Counter worker="14">5366660</Counter>
- <Counter worker="15">5366640</Counter>
- <Counter worker="16">5562960</Counter>
- <Counter worker="17">5562974</Counter>
- <Counter worker="18">5562969</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="20">
- <Counter worker="0">5328365</Counter>
- <Counter worker="1">5328690</Counter>
- <Counter worker="2">5328769</Counter>
- <Counter worker="3">5328750</Counter>
- <Counter worker="4">5328811</Counter>
- <Counter worker="5">5328819</Counter>
- <Counter worker="6">5328761</Counter>
- <Counter worker="7">5328804</Counter>
- <Counter worker="8">5352530</Counter>
- <Counter worker="9">5352507</Counter>
- <Counter worker="10">5352517</Counter>
- <Counter worker="11">5352526</Counter>
- <Counter worker="12">5352478</Counter>
- <Counter worker="13">5352481</Counter>
- <Counter worker="14">5352540</Counter>
- <Counter worker="15">5352508</Counter>
- <Counter worker="16">5542382</Counter>
- <Counter worker="17">5542457</Counter>
- <Counter worker="18">5542429</Counter>
- <Counter worker="19">5542397</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="21">
- <Counter worker="0">5355821</Counter>
- <Counter worker="1">5356186</Counter>
- <Counter worker="2">5356298</Counter>
- <Counter worker="3">5356259</Counter>
- <Counter worker="4">5356261</Counter>
- <Counter worker="5">5356320</Counter>
- <Counter worker="6">5356247</Counter>
- <Counter worker="7">5356272</Counter>
- <Counter worker="8">5376396</Counter>
- <Counter worker="9">5376387</Counter>
- <Counter worker="10">5376323</Counter>
- <Counter worker="11">5376368</Counter>
- <Counter worker="12">5376339</Counter>
- <Counter worker="13">5376330</Counter>
- <Counter worker="14">5376387</Counter>
- <Counter worker="15">5376365</Counter>
- <Counter worker="16">5547253</Counter>
- <Counter worker="17">5547266</Counter>
- <Counter worker="18">5547315</Counter>
- <Counter worker="19">5547267</Counter>
- <Counter worker="20">5547295</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="22">
- <Counter worker="0">5340616</Counter>
- <Counter worker="1">5340986</Counter>
- <Counter worker="2">5341028</Counter>
- <Counter worker="3">5341065</Counter>
- <Counter worker="4">5341078</Counter>
- <Counter worker="5">5341079</Counter>
- <Counter worker="6">5341007</Counter>
- <Counter worker="7">5341038</Counter>
- <Counter worker="8">5359566</Counter>
- <Counter worker="9">5359570</Counter>
- <Counter worker="10">5359478</Counter>
- <Counter worker="11">5359502</Counter>
- <Counter worker="12">5359496</Counter>
- <Counter worker="13">5359527</Counter>
- <Counter worker="14">5359536</Counter>
- <Counter worker="15">5359526</Counter>
- <Counter worker="16">5498507</Counter>
- <Counter worker="17">5498494</Counter>
- <Counter worker="18">5498532</Counter>
- <Counter worker="19">5498493</Counter>
- <Counter worker="20">5498503</Counter>
- <Counter worker="21">5498516</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="23">
- <Counter worker="0">5305895</Counter>
- <Counter worker="1">5306236</Counter>
- <Counter worker="2">5306305</Counter>
- <Counter worker="3">5306345</Counter>
- <Counter worker="4">5306344</Counter>
- <Counter worker="5">5306361</Counter>
- <Counter worker="6">5306301</Counter>
- <Counter worker="7">5306340</Counter>
- <Counter worker="8">5339859</Counter>
- <Counter worker="9">5339855</Counter>
- <Counter worker="10">5339822</Counter>
- <Counter worker="11">5339853</Counter>
- <Counter worker="12">5339853</Counter>
- <Counter worker="13">5339851</Counter>
- <Counter worker="14">5339883</Counter>
- <Counter worker="15">5339826</Counter>
- <Counter worker="16">5444298</Counter>
- <Counter worker="17">5444322</Counter>
- <Counter worker="18">5444263</Counter>
- <Counter worker="19">5444218</Counter>
- <Counter worker="20">5444333</Counter>
- <Counter worker="21">5444339</Counter>
- <Counter worker="22">5444294</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexInherit activeWorker="24">
- <Counter worker="0">5344687</Counter>
- <Counter worker="1">5345037</Counter>
- <Counter worker="2">5345099</Counter>
- <Counter worker="3">5345114</Counter>
- <Counter worker="4">5345124</Counter>
- <Counter worker="5">5345129</Counter>
- <Counter worker="6">5345111</Counter>
- <Counter worker="7">5345126</Counter>
- <Counter worker="8">5366163</Counter>
- <Counter worker="9">5366157</Counter>
- <Counter worker="10">5366132</Counter>
- <Counter worker="11">5366143</Counter>
- <Counter worker="12">5366131</Counter>
- <Counter worker="13">5366096</Counter>
- <Counter worker="14">5366169</Counter>
- <Counter worker="15">5366118</Counter>
- <Counter worker="16">5420792</Counter>
- <Counter worker="17">5420837</Counter>
- <Counter worker="18">5420864</Counter>
- <Counter worker="19">5420785</Counter>
- <Counter worker="20">5420835</Counter>
- <Counter worker="21">5420827</Counter>
- <Counter worker="22">5420737</Counter>
- <Counter worker="23">5420793</Counter>
- </ManyPthreadMutexInherit>
- <ManyPthreadMutexProtect activeWorker="1">
- <Counter worker="0">804850</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="2">
- <Counter worker="0">736889</Counter>
- <Counter worker="1">736932</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="3">
- <Counter worker="0">677059</Counter>
- <Counter worker="1">677102</Counter>
- <Counter worker="2">677109</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="4">
- <Counter worker="0">511022</Counter>
- <Counter worker="1">511064</Counter>
- <Counter worker="2">511070</Counter>
- <Counter worker="3">511071</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="5">
- <Counter worker="0">403704</Counter>
- <Counter worker="1">403746</Counter>
- <Counter worker="2">403747</Counter>
- <Counter worker="3">403747</Counter>
- <Counter worker="4">403752</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="6">
- <Counter worker="0">329360</Counter>
- <Counter worker="1">329396</Counter>
- <Counter worker="2">329402</Counter>
- <Counter worker="3">329404</Counter>
- <Counter worker="4">329401</Counter>
- <Counter worker="5">329405</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="7">
- <Counter worker="0">271830</Counter>
- <Counter worker="1">271865</Counter>
- <Counter worker="2">271870</Counter>
- <Counter worker="3">271871</Counter>
- <Counter worker="4">271871</Counter>
- <Counter worker="5">271874</Counter>
- <Counter worker="6">271880</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="8">
- <Counter worker="0">234106</Counter>
- <Counter worker="1">234135</Counter>
- <Counter worker="2">234147</Counter>
- <Counter worker="3">234143</Counter>
- <Counter worker="4">234145</Counter>
- <Counter worker="5">234144</Counter>
- <Counter worker="6">234144</Counter>
- <Counter worker="7">234145</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="9">
- <Counter worker="0">108890</Counter>
- <Counter worker="1">108899</Counter>
- <Counter worker="2">108898</Counter>
- <Counter worker="3">108897</Counter>
- <Counter worker="4">108898</Counter>
- <Counter worker="5">108898</Counter>
- <Counter worker="6">108898</Counter>
- <Counter worker="7">108896</Counter>
- <Counter worker="8">108892</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="10">
- <Counter worker="0">93131</Counter>
- <Counter worker="1">93136</Counter>
- <Counter worker="2">93135</Counter>
- <Counter worker="3">93136</Counter>
- <Counter worker="4">93136</Counter>
- <Counter worker="5">93136</Counter>
- <Counter worker="6">93136</Counter>
- <Counter worker="7">93136</Counter>
- <Counter worker="8">93134</Counter>
- <Counter worker="9">93135</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="11">
- <Counter worker="0">79836</Counter>
- <Counter worker="1">79839</Counter>
- <Counter worker="2">79840</Counter>
- <Counter worker="3">79840</Counter>
- <Counter worker="4">79841</Counter>
- <Counter worker="5">79840</Counter>
- <Counter worker="6">79840</Counter>
- <Counter worker="7">79840</Counter>
- <Counter worker="8">79839</Counter>
- <Counter worker="9">79839</Counter>
- <Counter worker="10">79839</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="12">
- <Counter worker="0">70922</Counter>
- <Counter worker="1">70924</Counter>
- <Counter worker="2">70924</Counter>
- <Counter worker="3">70924</Counter>
- <Counter worker="4">70924</Counter>
- <Counter worker="5">70924</Counter>
- <Counter worker="6">70923</Counter>
- <Counter worker="7">70924</Counter>
- <Counter worker="8">70924</Counter>
- <Counter worker="9">70924</Counter>
- <Counter worker="10">70924</Counter>
- <Counter worker="11">70924</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="13">
- <Counter worker="0">59848</Counter>
- <Counter worker="1">59850</Counter>
- <Counter worker="2">59850</Counter>
- <Counter worker="3">59850</Counter>
- <Counter worker="4">59850</Counter>
- <Counter worker="5">59850</Counter>
- <Counter worker="6">59850</Counter>
- <Counter worker="7">59850</Counter>
- <Counter worker="8">59850</Counter>
- <Counter worker="9">59850</Counter>
- <Counter worker="10">59850</Counter>
- <Counter worker="11">59850</Counter>
- <Counter worker="12">59850</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="14">
- <Counter worker="0">56173</Counter>
- <Counter worker="1">56175</Counter>
- <Counter worker="2">56175</Counter>
- <Counter worker="3">56175</Counter>
- <Counter worker="4">56175</Counter>
- <Counter worker="5">56175</Counter>
- <Counter worker="6">56175</Counter>
- <Counter worker="7">56175</Counter>
- <Counter worker="8">56175</Counter>
- <Counter worker="9">56175</Counter>
- <Counter worker="10">56175</Counter>
- <Counter worker="11">56175</Counter>
- <Counter worker="12">56175</Counter>
- <Counter worker="13">56175</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="15">
- <Counter worker="0">51032</Counter>
- <Counter worker="1">51034</Counter>
- <Counter worker="2">51034</Counter>
- <Counter worker="3">51034</Counter>
- <Counter worker="4">51034</Counter>
- <Counter worker="5">51034</Counter>
- <Counter worker="6">51034</Counter>
- <Counter worker="7">51034</Counter>
- <Counter worker="8">51034</Counter>
- <Counter worker="9">51034</Counter>
- <Counter worker="10">51034</Counter>
- <Counter worker="11">51034</Counter>
- <Counter worker="12">51034</Counter>
- <Counter worker="13">51034</Counter>
- <Counter worker="14">51034</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="16">
- <Counter worker="0">48695</Counter>
- <Counter worker="1">48696</Counter>
- <Counter worker="2">48696</Counter>
- <Counter worker="3">48696</Counter>
- <Counter worker="4">48696</Counter>
- <Counter worker="5">48696</Counter>
- <Counter worker="6">48696</Counter>
- <Counter worker="7">48696</Counter>
- <Counter worker="8">48696</Counter>
- <Counter worker="9">48696</Counter>
- <Counter worker="10">48696</Counter>
- <Counter worker="11">48696</Counter>
- <Counter worker="12">48695</Counter>
- <Counter worker="13">48696</Counter>
- <Counter worker="14">48696</Counter>
- <Counter worker="15">48695</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="17">
- <Counter worker="0">43536</Counter>
- <Counter worker="1">43537</Counter>
- <Counter worker="2">43537</Counter>
- <Counter worker="3">43537</Counter>
- <Counter worker="4">43537</Counter>
- <Counter worker="5">43537</Counter>
- <Counter worker="6">43537</Counter>
- <Counter worker="7">43537</Counter>
- <Counter worker="8">43537</Counter>
- <Counter worker="9">43537</Counter>
- <Counter worker="10">43537</Counter>
- <Counter worker="11">43537</Counter>
- <Counter worker="12">43537</Counter>
- <Counter worker="13">43537</Counter>
- <Counter worker="14">43537</Counter>
- <Counter worker="15">43537</Counter>
- <Counter worker="16">43536</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="18">
- <Counter worker="0">38780</Counter>
- <Counter worker="1">38781</Counter>
- <Counter worker="2">38781</Counter>
- <Counter worker="3">38781</Counter>
- <Counter worker="4">38781</Counter>
- <Counter worker="5">38781</Counter>
- <Counter worker="6">38781</Counter>
- <Counter worker="7">38781</Counter>
- <Counter worker="8">38781</Counter>
- <Counter worker="9">38781</Counter>
- <Counter worker="10">38781</Counter>
- <Counter worker="11">38781</Counter>
- <Counter worker="12">38781</Counter>
- <Counter worker="13">38781</Counter>
- <Counter worker="14">38780</Counter>
- <Counter worker="15">38781</Counter>
- <Counter worker="16">38781</Counter>
- <Counter worker="17">38781</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="19">
- <Counter worker="0">35997</Counter>
- <Counter worker="1">35997</Counter>
- <Counter worker="2">35997</Counter>
- <Counter worker="3">35997</Counter>
- <Counter worker="4">35997</Counter>
- <Counter worker="5">35997</Counter>
- <Counter worker="6">35998</Counter>
- <Counter worker="7">35997</Counter>
- <Counter worker="8">35997</Counter>
- <Counter worker="9">35997</Counter>
- <Counter worker="10">35997</Counter>
- <Counter worker="11">35997</Counter>
- <Counter worker="12">35997</Counter>
- <Counter worker="13">35997</Counter>
- <Counter worker="14">35997</Counter>
- <Counter worker="15">35997</Counter>
- <Counter worker="16">35997</Counter>
- <Counter worker="17">35998</Counter>
- <Counter worker="18">35997</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="20">
- <Counter worker="0">36332</Counter>
- <Counter worker="1">36333</Counter>
- <Counter worker="2">36333</Counter>
- <Counter worker="3">36332</Counter>
- <Counter worker="4">36333</Counter>
- <Counter worker="5">36332</Counter>
- <Counter worker="6">36333</Counter>
- <Counter worker="7">36332</Counter>
- <Counter worker="8">36332</Counter>
- <Counter worker="9">36333</Counter>
- <Counter worker="10">36332</Counter>
- <Counter worker="11">36332</Counter>
- <Counter worker="12">36332</Counter>
- <Counter worker="13">36333</Counter>
- <Counter worker="14">36332</Counter>
- <Counter worker="15">36332</Counter>
- <Counter worker="16">36332</Counter>
- <Counter worker="17">36333</Counter>
- <Counter worker="18">36332</Counter>
- <Counter worker="19">36332</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="21">
- <Counter worker="0">33208</Counter>
- <Counter worker="1">33209</Counter>
- <Counter worker="2">33209</Counter>
- <Counter worker="3">33209</Counter>
- <Counter worker="4">33208</Counter>
- <Counter worker="5">33208</Counter>
- <Counter worker="6">33209</Counter>
- <Counter worker="7">33208</Counter>
- <Counter worker="8">33208</Counter>
- <Counter worker="9">33208</Counter>
- <Counter worker="10">33208</Counter>
- <Counter worker="11">33208</Counter>
- <Counter worker="12">33209</Counter>
- <Counter worker="13">33209</Counter>
- <Counter worker="14">33208</Counter>
- <Counter worker="15">33208</Counter>
- <Counter worker="16">33208</Counter>
- <Counter worker="17">33208</Counter>
- <Counter worker="18">33209</Counter>
- <Counter worker="19">33208</Counter>
- <Counter worker="20">33208</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="22">
- <Counter worker="0">31798</Counter>
- <Counter worker="1">31798</Counter>
- <Counter worker="2">31799</Counter>
- <Counter worker="3">31799</Counter>
- <Counter worker="4">31798</Counter>
- <Counter worker="5">31799</Counter>
- <Counter worker="6">31798</Counter>
- <Counter worker="7">31799</Counter>
- <Counter worker="8">31799</Counter>
- <Counter worker="9">31799</Counter>
- <Counter worker="10">31798</Counter>
- <Counter worker="11">31799</Counter>
- <Counter worker="12">31799</Counter>
- <Counter worker="13">31798</Counter>
- <Counter worker="14">31799</Counter>
- <Counter worker="15">31799</Counter>
- <Counter worker="16">31799</Counter>
- <Counter worker="17">31799</Counter>
- <Counter worker="18">31799</Counter>
- <Counter worker="19">31799</Counter>
- <Counter worker="20">31799</Counter>
- <Counter worker="21">31799</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="23">
- <Counter worker="0">29626</Counter>
- <Counter worker="1">29627</Counter>
- <Counter worker="2">29627</Counter>
- <Counter worker="3">29627</Counter>
- <Counter worker="4">29627</Counter>
- <Counter worker="5">29627</Counter>
- <Counter worker="6">29627</Counter>
- <Counter worker="7">29627</Counter>
- <Counter worker="8">29627</Counter>
- <Counter worker="9">29627</Counter>
- <Counter worker="10">29627</Counter>
- <Counter worker="11">29627</Counter>
- <Counter worker="12">29627</Counter>
- <Counter worker="13">29627</Counter>
- <Counter worker="14">29627</Counter>
- <Counter worker="15">29627</Counter>
- <Counter worker="16">29627</Counter>
- <Counter worker="17">29627</Counter>
- <Counter worker="18">29627</Counter>
- <Counter worker="19">29627</Counter>
- <Counter worker="20">29627</Counter>
- <Counter worker="21">29627</Counter>
- <Counter worker="22">29627</Counter>
- </ManyPthreadMutexProtect>
- <ManyPthreadMutexProtect activeWorker="24">
- <Counter worker="0">28079</Counter>
- <Counter worker="1">28079</Counter>
- <Counter worker="2">28079</Counter>
- <Counter worker="3">28079</Counter>
- <Counter worker="4">28079</Counter>
- <Counter worker="5">28079</Counter>
- <Counter worker="6">28079</Counter>
- <Counter worker="7">28079</Counter>
- <Counter worker="8">28079</Counter>
- <Counter worker="9">28079</Counter>
- <Counter worker="10">28079</Counter>
- <Counter worker="11">28079</Counter>
- <Counter worker="12">28079</Counter>
- <Counter worker="13">28079</Counter>
- <Counter worker="14">28079</Counter>
- <Counter worker="15">28079</Counter>
- <Counter worker="16">28079</Counter>
- <Counter worker="17">28079</Counter>
- <Counter worker="18">28079</Counter>
- <Counter worker="19">28080</Counter>
- <Counter worker="20">28080</Counter>
- <Counter worker="21">28080</Counter>
- <Counter worker="22">28079</Counter>
- <Counter worker="23">28079</Counter>
- </ManyPthreadMutexProtect>
-</TestTimeFine01>
+*** TEST VERSION: 6.0.0.4bca4100fc4f184b6638165675095808f109546a
+*** TEST STATE: EXPECTED_PASS
+*** TEST BUILD: RTEMS_SMP
+*** TEST TOOLS: 13.2.0 20230727 (RTEMS 6, RSB d3d738c35a71ca05f675b188539225099401ac79, Newlib a021448)
+*** BEGIN OF JSON DATA ***
+[
+ {
+ "type": "event",
+ "description": "Send Event to Self",
+ "counter": [
+ [172991],
+ [173266, 168815],
+ [173282, 168785, 168831],
+ [173276, 168779, 168779, 172240]
+ ]
+ }, {
+ "type": "event",
+ "description": "Send Event to One",
+ "counter": [
+ [172666],
+ [172666, 320222],
+ [172682, 304636, 304639],
+ [172676, 304626, 320241, 312574]
+ ]
+ }, {
+ "type": "contested-mutex",
+ "description": "Obtain/Release Contested Classic Inheritance Mutex",
+ "counter": [
+ [159961],
+ [12149, 12148],
+ [7529, 7529, 7528],
+ [5671, 5671, 5671, 5670]
+ ]
+ }, {
+ "type": "message",
+ "description": "Send Message to Self",
+ "counter": [
+ [94498],
+ [94506, 94612],
+ [94516, 94622, 94622],
+ [94513, 94620, 94619, 94615]
+ ]
+ }, {
+ "type": "message",
+ "description": "Send Message to One Receiver",
+ "counter": [
+ [94155],
+ [105077, 210425],
+ [91113, 182522, 182535],
+ [74015, 148307, 148308, 148292]
+ ]
+ }, {
+ "type": "private-mutex",
+ "description": "Obtain/Release Private Pthread Spinlock",
+ "counter": [
+ [648144],
+ [648120, 648744],
+ [648207, 648831, 648831],
+ [648183, 648808, 648808, 648779]
+ ]
+ }, {
+ "type": "private-mutex",
+ "description": "Obtain/Release Private <sys/lock.h> Mutex",
+ "counter": [
+ [317884],
+ [317869, 318174],
+ [317912, 318217, 318217],
+ [317901, 318206, 318206, 318193]
+ ]
+ }, {
+ "type": "private-mutex",
+ "description": "Obtain/Release Private Pthread Inheritance Mutex",
+ "counter": [
+ [219857],
+ [219843, 220056],
+ [219877, 220089, 220089],
+ [219868, 220080, 220081, 220066]
+ ]
+ }, {
+ "type": "private-mutex",
+ "description": "Obtain/Release Private Classic Inheritance Mutex",
+ "counter": [
+ [159957],
+ [159867, 160095],
+ [159923, 160107, 160107],
+ [159941, 160133, 160078, 160075]
+ ]
+ }, {
+ "type": "private-mutex",
+ "description": "Obtain/Release Private Pthread Ceiling Mutex",
+ "counter": [
+ [28740],
+ [27948, 27993],
+ [26941, 26973, 26973],
+ [21414, 21439, 21439, 21439]
+ ]
+ }, {
+ "type": "private-mutex",
+ "description": "Obtain/Release Private Classic Ceiling Mutex",
+ "counter": [
+ [27399],
+ [26819, 26841],
+ [26253, 26282, 26282],
+ [21187, 21215, 21214, 21214]
+ ]
+ }, {
+ "type": "private-mutex",
+ "description": "Obtain/Release Private Classic MrsP Mutex",
+ "counter": [
+ [26696],
+ [26074, 26074],
+ [24738, 24770, 24769],
+ [18947, 18970, 18970, 18968]
+ ]
+ }
+]
+*** END OF JSON DATA ***
+
*** END OF TEST TMFINE 1 ***
+
+cpu 1 in error mode (tt = 0x80)
+ 2400642150 0000d760: 91d02000 ta 0x0
diff --git a/testsuites/tmtests/tmonetoone/init.c b/testsuites/tmtests/tmonetoone/init.c
index 70f3f51eb2..b4f63a604f 100644
--- a/testsuites/tmtests/tmonetoone/init.c
+++ b/testsuites/tmtests/tmonetoone/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2018 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
diff --git a/testsuites/tmtests/tmtimer01/init.c b/testsuites/tmtests/tmtimer01/init.c
index c95ca80f3a..1a37b5192c 100644
--- a/testsuites/tmtests/tmtimer01/init.c
+++ b/testsuites/tmtests/tmtimer01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2016, 2024 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * 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 OWNER 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.
*/
#ifdef HAVE_CONFIG_H
@@ -95,13 +108,14 @@ static void test_fire_and_cancel(
rtems_test_assert(sc2 == RTEMS_SUCCESSFUL);
printf(
- "<%s unit=\"ns\">%" PRIu64 "</%s>",
+ ",\n \"%s\": %" PRIu64,
name,
- rtems_counter_ticks_to_nanoseconds(d),
- name
+ rtems_counter_ticks_to_nanoseconds(d)
);
}
+static const char *sep = "\n ";
+
static void test_case(test_context *ctx, size_t j, size_t k)
{
rtems_status_code sc;
@@ -117,13 +131,17 @@ static void test_case(test_context *ctx, size_t j, size_t k)
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
}
- printf(" <Sample>\n <ActiveTimers>%zu</ActiveTimers>", j);
-
- test_fire_and_cancel(ctx, j, 0, "First");
- test_fire_and_cancel(ctx, j, j / 2, "Middle");
- test_fire_and_cancel(ctx, j, j + 1, "Last");
+ printf(
+ "%s{\n"
+ " \"active-timers\": %zu",
+ sep,
+ j
+ );
+ sep = "\n }, ";
- printf("\n </Sample>\n");
+ test_fire_and_cancel(ctx, j, 0, "first");
+ test_fire_and_cancel(ctx, j, j / 2, "middle");
+ test_fire_and_cancel(ctx, j, j + 1, "last");
}
static void test(void)
@@ -168,7 +186,13 @@ static void test(void)
timer_count = n;
}
- printf("<TMTimer01 timerCount=\"%zu\">\n", timer_count);
+ printf(
+ "*** BEGIN OF JSON DATA ***\n"
+ "{\n"
+ " \"timer-count\": %zu,\n"
+ " \"samples\": [",
+ timer_count
+ );
k = 0;
j = 0;
@@ -181,7 +205,7 @@ static void test(void)
test_case(ctx, n - 2, k);
- printf("</TMTimer01>\n");
+ printf("\n }\n ]\n}\n*** END OF JSON DATA ***\n");
}
static void Init(rtems_task_argument arg)
diff --git a/testsuites/tmtests/tmtimer01/plot.py b/testsuites/tmtests/tmtimer01/plot.py
index 7f3cf9ece0..73654c5b9d 100644
--- a/testsuites/tmtests/tmtimer01/plot.py
+++ b/testsuites/tmtests/tmtimer01/plot.py
@@ -1,25 +1,56 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (C) 2016, 2024 embedded brains GmbH & Co. KG
#
-# Copyright (c) 2016 embedded brains GmbH. All rights reserved.
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# 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 OWNER 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.
+
+import json
+import re
+import matplotlib.pyplot as plt # type: ignore
+from matplotlib import ticker # type: ignore
+
+
+def _plot(data: dict) -> None:
+ _, axes = plt.subplots()
+ axes.set_title("Timer Fire and Cancel Timing Test")
+ axes.set_xlabel("Active Timers")
+ axes.set_xscale("log")
+ axes.set_ylabel("Timer Fire and Cancel Duration [μs]")
+ x = [sample["active-timers"] for sample in data["samples"]]
+ for key in ["first", "middle", "last"]:
+ y = [sample[key] / 1000.0 for sample in data["samples"]]
+ axes.plot(x, y, label=f"operate on {key} timer", marker='o')
+ axes.legend(loc='best')
+ plt.savefig("tmtimer01.png")
+ plt.savefig("tmtimer01.pdf")
+ plt.close()
+
+
+_JSON_DATA = re.compile(
+ r"\*\*\* BEGIN OF JSON DATA \*\*\*(.*)"
+ r"\*\*\* END OF JSON DATA \*\*\*", re.DOTALL)
+
+with open("tmtimer01.scn", "r", encoding="utf-8") as src:
+ match = _JSON_DATA.search(src.read())
+ data = json.loads(match.group(1))
-import libxml2
-from libxml2 import xmlNode
-import matplotlib.pyplot as plt
-doc = libxml2.parseFile('tmtimer01.scn')
-ctx = doc.xpathNewContext()
-
-plt.title('timer test')
-plt.xscale('log')
-plt.xlabel('active timers')
-plt.ylabel('timer fire and cancel [ns]')
-
-x = map(xmlNode.getContent, ctx.xpathEval('/TMTimer01/Sample/ActiveTimers'))
-for i in ['First', 'Middle', 'Last']:
- y = map(xmlNode.getContent, ctx.xpathEval('/TMTimer01/Sample/' + i))
- plt.plot(x, y, label = i)
-plt.legend(loc = 'best')
-plt.show()
+_plot(data)
diff --git a/testsuites/tmtests/tmtimer01/tmtimer01.scn b/testsuites/tmtests/tmtimer01/tmtimer01.scn
index db3ca01d27..b278c75177 100644
--- a/testsuites/tmtests/tmtimer01/tmtimer01.scn
+++ b/testsuites/tmtests/tmtimer01/tmtimer01.scn
@@ -1,137 +1,252 @@
-<TMTimer01 timerCount="65504">
- <Sample>
- <ActiveTimers>0</ActiveTimers><First unit="ns">8812</First><Middle unit="ns">1412</Middle><Last unit="ns">917</Last>
- </Sample>
- <Sample>
- <ActiveTimers>2</ActiveTimers><First unit="ns">1602</First><Middle unit="ns">1010</Middle><Last unit="ns">1367</Last>
- </Sample>
- <Sample>
- <ActiveTimers>4</ActiveTimers><First unit="ns">1524</First><Middle unit="ns">1089</Middle><Last unit="ns">1086</Last>
- </Sample>
- <Sample>
- <ActiveTimers>7</ActiveTimers><First unit="ns">1791</First><Middle unit="ns">1121</Middle><Last unit="ns">1838</Last>
- </Sample>
- <Sample>
- <ActiveTimers>10</ActiveTimers><First unit="ns">1488</First><Middle unit="ns">1016</Middle><Last unit="ns">2134</Last>
- </Sample>
- <Sample>
- <ActiveTimers>14</ActiveTimers><First unit="ns">1527</First><Middle unit="ns">1698</Middle><Last unit="ns">3186</Last>
- </Sample>
- <Sample>
- <ActiveTimers>19</ActiveTimers><First unit="ns">2078</First><Middle unit="ns">1665</Middle><Last unit="ns">3397</Last>
- </Sample>
- <Sample>
- <ActiveTimers>25</ActiveTimers><First unit="ns">1519</First><Middle unit="ns">2368</Middle><Last unit="ns">4464</Last>
- </Sample>
- <Sample>
- <ActiveTimers>32</ActiveTimers><First unit="ns">1243</First><Middle unit="ns">2623</Middle><Last unit="ns">3549</Last>
- </Sample>
- <Sample>
- <ActiveTimers>41</ActiveTimers><First unit="ns">2368</First><Middle unit="ns">2578</Middle><Last unit="ns">4105</Last>
- </Sample>
- <Sample>
- <ActiveTimers>52</ActiveTimers><First unit="ns">2322</First><Middle unit="ns">2563</Middle><Last unit="ns">4126</Last>
- </Sample>
- <Sample>
- <ActiveTimers>66</ActiveTimers><First unit="ns">2499</First><Middle unit="ns">1855</Middle><Last unit="ns">4919</Last>
- </Sample>
- <Sample>
- <ActiveTimers>83</ActiveTimers><First unit="ns">1689</First><Middle unit="ns">3128</Middle><Last unit="ns">5894</Last>
- </Sample>
- <Sample>
- <ActiveTimers>104</ActiveTimers><First unit="ns">2301</First><Middle unit="ns">2647</Middle><Last unit="ns">4595</Last>
- </Sample>
- <Sample>
- <ActiveTimers>130</ActiveTimers><First unit="ns">2880</First><Middle unit="ns">3183</Middle><Last unit="ns">6222</Last>
- </Sample>
- <Sample>
- <ActiveTimers>162</ActiveTimers><First unit="ns">2597</First><Middle unit="ns">2376</Middle><Last unit="ns">7118</Last>
- </Sample>
- <Sample>
- <ActiveTimers>201</ActiveTimers><First unit="ns">3519</First><Middle unit="ns">3466</Middle><Last unit="ns">6673</Last>
- </Sample>
- <Sample>
- <ActiveTimers>249</ActiveTimers><First unit="ns">2829</First><Middle unit="ns">3177</Middle><Last unit="ns">7784</Last>
- </Sample>
- <Sample>
- <ActiveTimers>308</ActiveTimers><First unit="ns">2614</First><Middle unit="ns">3396</Middle><Last unit="ns">7338</Last>
- </Sample>
- <Sample>
- <ActiveTimers>381</ActiveTimers><First unit="ns">3454</First><Middle unit="ns">4888</Middle><Last unit="ns">9114</Last>
- </Sample>
- <Sample>
- <ActiveTimers>470</ActiveTimers><First unit="ns">3397</First><Middle unit="ns">2443</Middle><Last unit="ns">7689</Last>
- </Sample>
- <Sample>
- <ActiveTimers>580</ActiveTimers><First unit="ns">2233</First><Middle unit="ns">4410</Middle><Last unit="ns">9355</Last>
- </Sample>
- <Sample>
- <ActiveTimers>715</ActiveTimers><First unit="ns">3787</First><Middle unit="ns">5891</Middle><Last unit="ns">6833</Last>
- </Sample>
- <Sample>
- <ActiveTimers>881</ActiveTimers><First unit="ns">3839</First><Middle unit="ns">5089</Middle><Last unit="ns">9232</Last>
- </Sample>
- <Sample>
- <ActiveTimers>1085</ActiveTimers><First unit="ns">2838</First><Middle unit="ns">2739</Middle><Last unit="ns">11575</Last>
- </Sample>
- <Sample>
- <ActiveTimers>1336</ActiveTimers><First unit="ns">3256</First><Middle unit="ns">5011</Middle><Last unit="ns">9684</Last>
- </Sample>
- <Sample>
- <ActiveTimers>1645</ActiveTimers><First unit="ns">2293</First><Middle unit="ns">5262</Middle><Last unit="ns">10183</Last>
- </Sample>
- <Sample>
- <ActiveTimers>2025</ActiveTimers><First unit="ns">4436</First><Middle unit="ns">5934</Middle><Last unit="ns">8804</Last>
- </Sample>
- <Sample>
- <ActiveTimers>2492</ActiveTimers><First unit="ns">4506</First><Middle unit="ns">7284</Middle><Last unit="ns">10389</Last>
- </Sample>
- <Sample>
- <ActiveTimers>3067</ActiveTimers><First unit="ns">3832</First><Middle unit="ns">4990</Middle><Last unit="ns">9536</Last>
- </Sample>
- <Sample>
- <ActiveTimers>3774</ActiveTimers><First unit="ns">5088</First><Middle unit="ns">4888</Middle><Last unit="ns">9633</Last>
- </Sample>
- <Sample>
- <ActiveTimers>4644</ActiveTimers><First unit="ns">5590</First><Middle unit="ns">5749</Middle><Last unit="ns">8975</Last>
- </Sample>
- <Sample>
- <ActiveTimers>5714</ActiveTimers><First unit="ns">4854</First><Middle unit="ns">6813</Middle><Last unit="ns">11603</Last>
- </Sample>
- <Sample>
- <ActiveTimers>7030</ActiveTimers><First unit="ns">6139</First><Middle unit="ns">6132</Middle><Last unit="ns">12630</Last>
- </Sample>
- <Sample>
- <ActiveTimers>8649</ActiveTimers><First unit="ns">6877</First><Middle unit="ns">3852</Middle><Last unit="ns">10973</Last>
- </Sample>
- <Sample>
- <ActiveTimers>10640</ActiveTimers><First unit="ns">6532</First><Middle unit="ns">6097</Middle><Last unit="ns">11725</Last>
- </Sample>
- <Sample>
- <ActiveTimers>13089</ActiveTimers><First unit="ns">5284</First><Middle unit="ns">5392</Middle><Last unit="ns">13246</Last>
- </Sample>
- <Sample>
- <ActiveTimers>16101</ActiveTimers><First unit="ns">7077</First><Middle unit="ns">7572</Middle><Last unit="ns">14820</Last>
- </Sample>
- <Sample>
- <ActiveTimers>19806</ActiveTimers><First unit="ns">7132</First><Middle unit="ns">8335</Middle><Last unit="ns">11668</Last>
- </Sample>
- <Sample>
- <ActiveTimers>24363</ActiveTimers><First unit="ns">8676</First><Middle unit="ns">7919</Middle><Last unit="ns">13937</Last>
- </Sample>
- <Sample>
- <ActiveTimers>29968</ActiveTimers><First unit="ns">5970</First><Middle unit="ns">10978</Middle><Last unit="ns">16035</Last>
- </Sample>
- <Sample>
- <ActiveTimers>36862</ActiveTimers><First unit="ns">8804</First><Middle unit="ns">8767</Middle><Last unit="ns">13089</Last>
- </Sample>
- <Sample>
- <ActiveTimers>45342</ActiveTimers><First unit="ns">8608</First><Middle unit="ns">10305</Middle><Last unit="ns">15709</Last>
- </Sample>
- <Sample>
- <ActiveTimers>55772</ActiveTimers><First unit="ns">8949</First><Middle unit="ns">10031</Middle><Last unit="ns">16262</Last>
- </Sample>
- <Sample>
- <ActiveTimers>65503</ActiveTimers><First unit="ns">9199</First><Middle unit="ns">10309</Middle><Last unit="ns">19090</Last>
- </Sample>
-</TMTimer01>
+
+ SIS - SPARC/RISCV instruction simulator 2.30, copyright Jiri Gaisler 2020
+ Bug-reports to jiri@gaisler.se
+
+ GR740/LEON4 emulation enabled, 4 cpus online, delta 50 clocks
+
+ Loaded build/sparc/gr740/testsuites/tmtests/tmtimer01.exe, entry 0x00000000
+
+
+*** BEGIN OF TEST TMTIMER 1 ***
+*** TEST VERSION: 6.0.0.76c91ee7793fc70b92e2f87e601c3fdc2d2b7f3f
+*** TEST STATE: EXPECTED_PASS
+*** TEST BUILD: RTEMS_SMP
+*** TEST TOOLS: 13.2.0 20230727 (RTEMS 6, RSB d3d738c35a71ca05f675b188539225099401ac79, Newlib a021448)
+*** BEGIN OF JSON DATA ***
+{
+ "timer-count": 61024,
+ "samples": [
+ {
+ "active-timers": 0,
+ "first": 8560,
+ "middle": 8600,
+ "last": 8520
+ }, {
+ "active-timers": 2,
+ "first": 9020,
+ "middle": 11680,
+ "last": 8860
+ }, {
+ "active-timers": 4,
+ "first": 9480,
+ "middle": 9440,
+ "last": 11060
+ }, {
+ "active-timers": 7,
+ "first": 9360,
+ "middle": 9820,
+ "last": 12300
+ }, {
+ "active-timers": 10,
+ "first": 9860,
+ "middle": 9580,
+ "last": 11980
+ }, {
+ "active-timers": 14,
+ "first": 9860,
+ "middle": 10040,
+ "last": 12280
+ }, {
+ "active-timers": 19,
+ "first": 10360,
+ "middle": 10080,
+ "last": 13260
+ }, {
+ "active-timers": 25,
+ "first": 10360,
+ "middle": 10500,
+ "last": 14460
+ }, {
+ "active-timers": 32,
+ "first": 10240,
+ "middle": 10620,
+ "last": 13040
+ }, {
+ "active-timers": 41,
+ "first": 10820,
+ "middle": 10540,
+ "last": 15000
+ }, {
+ "active-timers": 52,
+ "first": 10740,
+ "middle": 10880,
+ "last": 13660
+ }, {
+ "active-timers": 66,
+ "first": 10820,
+ "middle": 10880,
+ "last": 13960
+ }, {
+ "active-timers": 83,
+ "first": 11160,
+ "middle": 11040,
+ "last": 14940
+ }, {
+ "active-timers": 104,
+ "first": 11160,
+ "middle": 11420,
+ "last": 14340
+ }, {
+ "active-timers": 130,
+ "first": 11160,
+ "middle": 11300,
+ "last": 14720
+ }, {
+ "active-timers": 162,
+ "first": 11460,
+ "middle": 11380,
+ "last": 14880
+ }, {
+ "active-timers": 201,
+ "first": 11500,
+ "middle": 11880,
+ "last": 17060
+ }, {
+ "active-timers": 249,
+ "first": 11580,
+ "middle": 11800,
+ "last": 16900
+ }, {
+ "active-timers": 308,
+ "first": 11380,
+ "middle": 12060,
+ "last": 15640
+ }, {
+ "active-timers": 381,
+ "first": 11760,
+ "middle": 11840,
+ "last": 19800
+ }, {
+ "active-timers": 470,
+ "first": 11880,
+ "middle": 12180,
+ "last": 16100
+ }, {
+ "active-timers": 580,
+ "first": 11760,
+ "middle": 12600,
+ "last": 16560
+ }, {
+ "active-timers": 715,
+ "first": 12140,
+ "middle": 12220,
+ "last": 17380
+ }, {
+ "active-timers": 881,
+ "first": 12260,
+ "middle": 12640,
+ "last": 18740
+ }, {
+ "active-timers": 1085,
+ "first": 12140,
+ "middle": 12560,
+ "last": 22320
+ }, {
+ "active-timers": 1336,
+ "first": 12720,
+ "middle": 12600,
+ "last": 17240
+ }, {
+ "active-timers": 1645,
+ "first": 12560,
+ "middle": 13020,
+ "last": 21140
+ }, {
+ "active-timers": 2025,
+ "first": 12720,
+ "middle": 12980,
+ "last": 19500
+ }, {
+ "active-timers": 2492,
+ "first": 12720,
+ "middle": 13400,
+ "last": 18160
+ }, {
+ "active-timers": 3067,
+ "first": 13060,
+ "middle": 13060,
+ "last": 19220
+ }, {
+ "active-timers": 3774,
+ "first": 12980,
+ "middle": 13560,
+ "last": 18620
+ }, {
+ "active-timers": 4644,
+ "first": 13260,
+ "middle": 13860,
+ "last": 18920
+ }, {
+ "active-timers": 5714,
+ "first": 13440,
+ "middle": 13520,
+ "last": 18920
+ }, {
+ "active-timers": 7030,
+ "first": 13440,
+ "middle": 13900,
+ "last": 19380
+ }, {
+ "active-timers": 8649,
+ "first": 13440,
+ "middle": 13820,
+ "last": 21640
+ }, {
+ "active-timers": 10640,
+ "first": 14020,
+ "middle": 13940,
+ "last": 19760
+ }, {
+ "active-timers": 13089,
+ "first": 13940,
+ "middle": 14160,
+ "last": 22100
+ }, {
+ "active-timers": 16101,
+ "first": 13900,
+ "middle": 14320,
+ "last": 22680
+ }, {
+ "active-timers": 19806,
+ "first": 13900,
+ "middle": 14700,
+ "last": 20840
+ }, {
+ "active-timers": 24363,
+ "first": 14360,
+ "middle": 14320,
+ "last": 21660
+ }, {
+ "active-timers": 29968,
+ "first": 14360,
+ "middle": 14540,
+ "last": 21300
+ }, {
+ "active-timers": 36862,
+ "first": 14360,
+ "middle": 15320,
+ "last": 21440
+ }, {
+ "active-timers": 45342,
+ "first": 14580,
+ "middle": 14700,
+ "last": 21600
+ }, {
+ "active-timers": 55772,
+ "first": 14700,
+ "middle": 15040,
+ "last": 22060
+ }, {
+ "active-timers": 61023,
+ "first": 14780,
+ "middle": 15080,
+ "last": 22960
+ }
+ ]
+}
+*** END OF JSON DATA ***
+
+*** END OF TEST TMTIMER 1 ***
+
+cpu 0 in error mode (tt = 0x80)
+ 522750200 00009b40: 91d02000 ta 0x0
diff --git a/testsuites/unit/tc-base64-decode.c b/testsuites/unit/tc-base64-decode.c
new file mode 100644
index 0000000000..4b0672d310
--- /dev/null
+++ b/testsuites/unit/tc-base64-decode.c
@@ -0,0 +1,186 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesUnitNoClock0
+ */
+
+/*
+ * Copyright (C) 2023 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#include <rtems/base64.h>
+
+#include <rtems/test.h>
+
+typedef struct {
+ Base64_Decode_control base;
+ uint8_t buf[64];
+} test_control;
+
+static int test_run(test_control* self, const char* payload) {
+ size_t len = strlen(payload);
+
+ for (size_t i = 0; i < len; ++i) {
+ int rv = _Base64_Decode(&self->base, payload[i]);
+
+ if (rv != 0) {
+ return rv;
+ }
+ }
+
+ return 0;
+}
+
+static int test_payload(test_control* self, const char* payload) {
+ memset(self->buf, 0xff, sizeof(self->buf));
+ _Base64_Decode_initialize(&self->base, &self->buf[0], sizeof(self->buf));
+ return test_run(self, payload);
+}
+
+T_TEST_CASE(IOBase64Decode) {
+ int rv;
+ test_control instance;
+ test_control* self = &instance;
+
+ rv = test_payload(self, "POOL");
+ T_eq_int(rv, BASE64_DECODE_SUCCESS);
+ T_eq_int(self->base.state, BASE64_DECODE_STATE_0);
+ T_eq_ptr(self->base.target, &self->buf[3]);
+ const uint8_t expected1[] = {0x3c, 0xe3, 0x8b, 0xff};
+ T_eq_mem(&self->buf[0], expected1, sizeof(expected1));
+
+ rv = test_payload(self, "ABCDEFGH");
+ T_eq_int(rv, BASE64_DECODE_SUCCESS);
+ T_eq_int(self->base.state, BASE64_DECODE_STATE_0);
+ T_eq_ptr(self->base.target, &self->buf[6]);
+ const uint8_t expected2[] = {0x00, 0x10, 0x83, 0x10, 0x51, 0x87, 0xff};
+ T_eq_mem(&self->buf[0], expected2, sizeof(expected2));
+
+ /* Non-base64 character results in an error */
+ rv = test_payload(self, "PO*OL");
+ T_eq_int(rv, BASE64_DECODE_INVALID_INPUT);
+ T_eq_int(self->base.state, BASE64_DECODE_STATE_2);
+ T_eq_ptr(self->base.target, &self->buf[1]);
+ const uint8_t expected3[] = {0x3c};
+ T_eq_mem(&self->buf[0], expected3, sizeof(expected3));
+
+ /* Other non-base64 character results in an error */
+ rv = test_payload(self, "PO\x80OL");
+ T_eq_int(rv, BASE64_DECODE_INVALID_INPUT);
+ T_eq_int(self->base.state, BASE64_DECODE_STATE_2);
+ T_eq_ptr(self->base.target, &self->buf[1]);
+ T_eq_mem(&self->buf[0], expected3, sizeof(expected3));
+
+ /* Space characters should be ignored */
+ rv = test_payload(self, "P OOL");
+ T_eq_int(rv, BASE64_DECODE_SUCCESS);
+ T_eq_int(self->base.state, BASE64_DECODE_STATE_0);
+ T_eq_ptr(self->base.target, &self->buf[3]);
+ const uint8_t expected4[] = {0x3c, 0xe3, 0x8b, 0xff};
+ T_eq_mem(&self->buf[0], expected4, sizeof(expected4));
+
+ /* Handle pad characters */
+ rv = test_payload(self, "POOL==");
+ T_eq_int(rv, BASE64_DECODE_SUCCESS);
+ T_eq_int(self->base.state, BASE64_DECODE_STATE_0);
+ T_eq_ptr(self->base.target, &self->buf[3]);
+ T_eq_ptr(self->base.target, self->base.target_end);
+ const uint8_t expected5[] = {0x3c, 0xe3, 0x8b, 0xff};
+ T_eq_mem(&self->buf[0], expected5, sizeof(expected5));
+
+ /* If characters come after pad characters, an error results */
+ rv = test_payload(self, "POOL==xy");
+ T_eq_int(rv, BASE64_DECODE_OVERFLOW);
+ T_eq_int(self->base.state, BASE64_DECODE_SUCCESS);
+ T_eq_ptr(self->base.target, &self->buf[3]);
+ T_eq_ptr(self->base.target, self->base.target_end);
+ const uint8_t expected6[] = {0x3c, 0xe3, 0x8b, 0xff};
+ T_eq_mem(&self->buf[0], expected6, sizeof(expected6));
+
+ rv = test_payload(self, "POOLPOOL");
+ T_eq_int(rv, BASE64_DECODE_SUCCESS);
+ T_eq_int(self->base.state, BASE64_DECODE_STATE_0);
+ T_eq_ptr(self->base.target, &self->buf[6]);
+ const uint8_t expected7[] = {0x3c, 0xe3, 0x8b, 0x3c, 0xe3, 0x8b, 0xff};
+ T_eq_mem(&self->buf[0], expected7, sizeof(expected7));
+
+ /*
+ * Test valid payload with series of target sizes. All target sizes
+ * less than three are invalid for the given payload and will result
+ * in an error.
+ */
+ const uint8_t expected9[] = {0x3c, 0xe3, 0x8b, 0xff};
+
+ for (size_t i = 0; i < 4; ++i) {
+ memset(&self->buf[0], 0xff, sizeof(self->buf));
+ _Base64_Decode_initialize(&self->base, &self->buf[0], i);
+ rv = test_run(self, "POOL");
+
+ if (i < 3) {
+ T_eq_int(rv, BASE64_DECODE_OVERFLOW);
+ T_eq_int(self->base.state, i);
+ T_ne_ptr(self->base.target, &self->buf[3]);
+ T_ne_mem(&self->buf[0], expected9, sizeof(expected9));
+ } else {
+ T_eq_int(rv, BASE64_DECODE_SUCCESS);
+ T_eq_int(self->base.state, BASE64_DECODE_STATE_0);
+ T_eq_ptr(self->base.target, &self->buf[3]);
+ T_eq_mem(&self->buf[0], expected9, sizeof(expected9));
+ }
+ }
+
+ /* No overflow in state 1 */
+ memset(&self->buf[0], 0xff, sizeof(self->buf));
+ _Base64_Decode_initialize(&self->base, &self->buf[0], 1);
+ rv = test_run(self, "AA");
+ T_eq_int(rv, BASE64_DECODE_SUCCESS);
+ T_eq_int(self->base.state, BASE64_DECODE_STATE_2);
+ T_eq_ptr(self->base.target, &self->buf[1]);
+ const uint8_t expected10[] = {0x00, 0xff};
+ T_eq_mem(&self->buf[0], expected10, sizeof(expected10));
+
+ /* No overflow in state 2 */
+ memset(&self->buf[0], 0xff, sizeof(self->buf));
+ _Base64_Decode_initialize(&self->base, &self->buf[0], 2);
+ rv = test_run(self, "AAA");
+ T_eq_int(rv, BASE64_DECODE_SUCCESS);
+ T_eq_int(self->base.state, BASE64_DECODE_STATE_3);
+ T_eq_ptr(self->base.target, &self->buf[2]);
+ const uint8_t expected11[] = {0x00, 0x00, 0xff};
+ T_eq_mem(&self->buf[0], expected11, sizeof(expected11));
+}
+
+T_TEST_CASE(IOBase64DecodeInitialize) {
+ Base64_Decode_control instance;
+ Base64_Decode_control* self = &instance;
+ uint8_t buf[1];
+
+ memset(self, 0xff, sizeof(*self));
+ _Base64_Decode_initialize(self, buf, sizeof(buf));
+ T_eq_int(self->state, BASE64_DECODE_STATE_0);
+ T_eq_ptr(self->target, &buf[0]);
+ T_eq_ptr(self->target_end, &buf[1]);
+}
diff --git a/testsuites/unit/tc-compiler-builtins.c b/testsuites/unit/tc-compiler-builtins.c
new file mode 100644
index 0000000000..7a470b6632
--- /dev/null
+++ b/testsuites/unit/tc-compiler-builtins.c
@@ -0,0 +1,1141 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup CompilerUnitBuiltins
+ */
+
+/*
+ * Copyright (C) 2023 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <setjmp.h>
+#include <stdint.h>
+
+#include "../validation/tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup CompilerUnitBuiltins spec:/compiler/unit/builtins
+ *
+ * @ingroup TestsuitesUnitNoClock0
+ *
+ * @brief These unit tests check compiler builtins.
+ *
+ * Explicitly test the 64-bit integer division and modulo operations. They are
+ * essential for the timekeeping services. On most 32-bit targets, they need a
+ * software implementation.
+ *
+ * This test case performs the following actions:
+ *
+ * - Check the return value of __builtin_clz() for a sample set of inputs.
+ *
+ * - Check the return value of __builtin_clzll() for a sample set of inputs.
+ *
+ * - Check the return value of __builtin_ctz() for a sample set of inputs.
+ *
+ * - Check the return value of __builtin_ctzll() for a sample set of inputs.
+ *
+ * - Check the return value of __builtin_ffs() for a sample set of inputs.
+ *
+ * - Check the return value of __builtin_ffsll() for a sample set of inputs.
+ *
+ * - Check the return value of __builtin_parity() for a sample set of inputs.
+ *
+ * - Check the return value of __builtin_parityll() for a sample set of inputs.
+ *
+ * - Check the return value of __builtin_popcount() for a sample set of inputs.
+ *
+ * - Check the return value of __builtin_popcountll() for a sample set of
+ * inputs.
+ *
+ * - Check the return value of __builtin_bswap32() for a sample set of inputs.
+ *
+ * - Check the return value of __builtin_bswap64() for a sample set of inputs.
+ *
+ * - Check signed 64-bit comparisons for a sample set of values.
+ *
+ * - Check unsigned 64-bit comparisons for a sample set of values.
+ *
+ * - Check signed 64-bit arithmetic left shift for a sample set of values.
+ *
+ * - Check signed 64-bit arithmetic right shift for a sample set of values.
+ *
+ * - Check unsigned 64-bit logical right shift for a sample set of values.
+ *
+ * - Check signed 64-bit multiplication for a sample set of values.
+ *
+ * - Check signed 64-bit negation for a sample set of values.
+ *
+ * - Check signed 64-bit divisions for a sample set of values.
+ *
+ * - Check unsigned 64-bit divisions for a sample set of values.
+ *
+ * - Check signed 64-bit modulo operations for a sample set of values.
+ *
+ * - Check unsigned 64-bit modulo operations for a sample set of values.
+ *
+ * @{
+ */
+
+#if __LONG_MAX__ == 0x7fffffffL && !defined(__aarch64__)
+#define TEST_UDIVMODDI4
+#endif
+
+#if defined(TEST_UDIVMODDI4)
+uint64_t __udivmoddi4( uint64_t n, uint64_t d, uint64_t *r );
+#endif
+
+#if defined(TEST_UDIVMODDI4) && defined(__arm__)
+/*
+ * Here __aeabi_uldivmod() may be used to carry out integer division
+ * operations even though the reminder is unused. This function is
+ * implemented by __udivmoddi4() which may never get called without a
+ * reminder for compiler generated code.
+ */
+#define TEST_UDIVMODDI4_WITHOUT_REMINDER
+#endif
+
+static bool do_longjmp;
+
+static jmp_buf exception_return_context;
+
+static void Fatal(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ (void) code;
+
+ if ( source == RTEMS_FATAL_SOURCE_EXCEPTION && do_longjmp ) {
+ do_longjmp = false;
+ _ISR_Set_level( 0 );
+ longjmp( arg, 1 );
+ }
+}
+
+static void CompilerUnitBuiltins_Setup( void *ctx )
+{
+ SetFatalHandler( Fatal, exception_return_context );
+}
+
+static void CompilerUnitBuiltins_Teardown( void *ctx )
+{
+ SetFatalHandler( NULL, NULL );
+}
+
+static T_fixture CompilerUnitBuiltins_Fixture = {
+ .setup = CompilerUnitBuiltins_Setup,
+ .stop = NULL,
+ .teardown = CompilerUnitBuiltins_Teardown,
+ .scope = NULL,
+ .initial_context = NULL
+};
+
+/**
+ * @brief Check the return value of __builtin_clz() for a sample set of inputs.
+ */
+static void CompilerUnitBuiltins_Action_0( void )
+{
+ volatile unsigned int n;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+
+ n = 1U;
+ T_eq_int( __builtin_clz( n ), 31 );
+
+ n = 1U << 31;
+ T_eq_int( __builtin_clz( n ), 0 );
+
+ n = ~0U;
+ T_eq_int( __builtin_clz( n ), 0 );
+}
+
+/**
+ * @brief Check the return value of __builtin_clzll() for a sample set of
+ * inputs.
+ */
+static void CompilerUnitBuiltins_Action_1( void )
+{
+ volatile unsigned long long n;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+
+ n = 1ULL;
+ T_eq_int( __builtin_clzll( n ), 63 );
+
+ n = 1ULL << 31;
+ T_eq_int( __builtin_clzll( n ), 32 );
+
+ n = 1ULL << 32;
+ T_eq_int( __builtin_clzll( n ), 31 );
+
+ n = 1ULL << 63;
+ T_eq_int( __builtin_clzll( n ), 0 );
+
+ n = ~0ULL;
+ T_eq_int( __builtin_clzll( n ), 0 );
+}
+
+/**
+ * @brief Check the return value of __builtin_ctz() for a sample set of inputs.
+ */
+static void CompilerUnitBuiltins_Action_2( void )
+{
+ volatile unsigned int n;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+
+ n = 1U;
+ T_eq_int( __builtin_ctz( n ), 0 );
+
+ n = 1U << 31;
+ T_eq_int( __builtin_ctz( n ), 31 );
+
+ n = ~0U;
+ T_eq_int( __builtin_ctz( n ), 0 );
+}
+
+/**
+ * @brief Check the return value of __builtin_ctzll() for a sample set of
+ * inputs.
+ */
+static void CompilerUnitBuiltins_Action_3( void )
+{
+ volatile unsigned long long n;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+
+ n = 1ULL;
+ T_eq_int( __builtin_ctzll( n ), 0 );
+
+ n = 1ULL << 31;
+ T_eq_int( __builtin_ctzll( n ), 31 );
+
+ n = 1ULL << 32;
+ T_eq_int( __builtin_ctzll( n ), 32 );
+
+ n = 1ULL << 63;
+ T_eq_int( __builtin_ctzll( n ), 63 );
+
+ n = ~0ULL;
+ T_eq_int( __builtin_ctzll( n ), 0 );
+}
+
+/**
+ * @brief Check the return value of __builtin_ffs() for a sample set of inputs.
+ */
+static void CompilerUnitBuiltins_Action_4( void )
+{
+ volatile unsigned int n;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+
+ n = 1U;
+ T_eq_int( __builtin_ffs( n ), 1 );
+
+ n = 1U << 31;
+ T_eq_int( __builtin_ffs( n ), 32 );
+
+ n = 0U;
+ T_eq_int( __builtin_ffs( n ), 0 );
+}
+
+/**
+ * @brief Check the return value of __builtin_ffsll() for a sample set of
+ * inputs.
+ */
+static void CompilerUnitBuiltins_Action_5( void )
+{
+ volatile unsigned long long n;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+
+ n = 1ULL;
+ T_eq_int( __builtin_ffsll( n ), 1 );
+
+ n = 1ULL << 31;
+ T_eq_int( __builtin_ffsll( n ), 32 );
+
+ n = 1ULL << 32;
+ T_eq_int( __builtin_ffsll( n ), 33 );
+
+ n = 1ULL << 63;
+ T_eq_int( __builtin_ffsll( n ), 64 );
+
+ n = 0ULL;
+ T_eq_int( __builtin_ffsll( n ), 0 );
+}
+
+/**
+ * @brief Check the return value of __builtin_parity() for a sample set of
+ * inputs.
+ */
+static void CompilerUnitBuiltins_Action_6( void )
+{
+ volatile unsigned int n;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+
+ n = 1U;
+ T_eq_int( __builtin_parity( n ), 1 );
+
+ n = ~0U;
+ T_eq_int( __builtin_parity( n ), 0 );
+}
+
+/**
+ * @brief Check the return value of __builtin_parityll() for a sample set of
+ * inputs.
+ */
+static void CompilerUnitBuiltins_Action_7( void )
+{
+ volatile unsigned long long n;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+
+ n = 1ULL;
+ T_eq_int( __builtin_parityll( n ), 1 );
+
+ n = ~0ULL;
+ T_eq_int( __builtin_parityll( n ), 0 );
+}
+
+/**
+ * @brief Check the return value of __builtin_popcount() for a sample set of
+ * inputs.
+ */
+static void CompilerUnitBuiltins_Action_8( void )
+{
+ volatile unsigned int n;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+
+ n = 0U;
+ T_eq_int( __builtin_popcount( n ), 0 );
+
+ n = 1U;
+ T_eq_int( __builtin_popcount( n ), 1 );
+
+ n = ~0U;
+ T_eq_int( __builtin_popcount( n ), 32 );
+}
+
+/**
+ * @brief Check the return value of __builtin_popcountll() for a sample set of
+ * inputs.
+ */
+static void CompilerUnitBuiltins_Action_9( void )
+{
+ volatile unsigned long long n;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+
+ n = 0ULL;
+ T_eq_int( __builtin_popcountll( n ), 0 );
+
+ n = 1ULL;
+ T_eq_int( __builtin_popcountll( n ), 1 );
+
+ n = ~0ULL;
+ T_eq_int( __builtin_popcountll( n ), 64 );
+}
+
+/**
+ * @brief Check the return value of __builtin_bswap32() for a sample set of
+ * inputs.
+ */
+static void CompilerUnitBuiltins_Action_10( void )
+{
+ volatile uint32_t n;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+
+ n = UINT32_C( 0 );
+ T_eq_u32( __builtin_bswap32( n ), n );
+
+ n = UINT32_C( 1 );
+ T_eq_u32( __builtin_bswap32( n ), n << 24 );
+
+ n = UINT32_C( 0x12345678 );
+ T_eq_u32( __builtin_bswap32( n ), UINT32_C( 0x78563412 ) );
+
+ n = ~UINT32_C( 0 );
+ T_eq_u32( __builtin_bswap32( n ), n );
+}
+
+/**
+ * @brief Check the return value of __builtin_bswap64() for a sample set of
+ * inputs.
+ */
+static void CompilerUnitBuiltins_Action_11( void )
+{
+ volatile uint64_t n;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+
+ n = UINT64_C( 0 );
+ T_eq_u64( __builtin_bswap64( n ), n );
+
+ n = UINT64_C( 1 );
+ T_eq_u64( __builtin_bswap64( n ), n << 56 );
+
+ n = UINT64_C( 0x123456789abcdef0 );
+ T_eq_u64( __builtin_bswap64( n ), UINT64_C( 0xf0debc9a78563412 ) );
+
+ n = ~UINT64_C( 0 );
+ T_eq_u64( __builtin_bswap64( n ), n );
+}
+
+/**
+ * @brief Check signed 64-bit comparisons for a sample set of values.
+ */
+static void CompilerUnitBuiltins_Action_12( void )
+{
+ volatile int64_t a;
+ volatile int64_t b;
+
+ a = 0;
+ RTEMS_OBFUSCATE_VARIABLE( a );
+ b = 0;
+ RTEMS_OBFUSCATE_VARIABLE( b );
+
+ a = INT64_C( 0 );
+ b = INT64_C( 0 );
+ T_false( a < b );
+
+ a = INT64_C( 0 );
+ b = INT64_C( 1 );
+ T_true( a < b );
+
+ a = INT64_C( 0x123456789abcdef0 );
+ b = INT64_C( 0xf0debc9a78563412 );
+ T_false( a < b );
+
+ a = INT64_C( 0xf0debc9a78563412 );
+ b = INT64_C( 0x123456789abcdef0 );
+ T_true( a < b );
+}
+
+/**
+ * @brief Check unsigned 64-bit comparisons for a sample set of values.
+ */
+static void CompilerUnitBuiltins_Action_13( void )
+{
+ volatile uint64_t a;
+ volatile uint64_t b;
+
+ a = 0;
+ RTEMS_OBFUSCATE_VARIABLE( a );
+ b = 0;
+ RTEMS_OBFUSCATE_VARIABLE( b );
+
+ a = UINT64_C( 0 );
+ b = UINT64_C( 0 );
+ T_false( a < b );
+
+ a = UINT64_C( 0 );
+ b = UINT64_C( 1 );
+ T_true( a < b );
+
+ a = UINT64_C( 0x123456789abcdef0 );
+ b = UINT64_C( 0xf0debc9a78563412 );
+ T_true( a < b );
+
+ a = UINT64_C( 0xf0debc9a78563412 );
+ b = UINT64_C( 0x123456789abcdef0 );
+ T_false( a < b );
+}
+
+/**
+ * @brief Check signed 64-bit arithmetic left shift for a sample set of values.
+ */
+static void CompilerUnitBuiltins_Action_14( void )
+{
+ volatile int64_t i;
+ volatile int s;
+
+ i = 0;
+ RTEMS_OBFUSCATE_VARIABLE( i );
+ s = 0;
+ RTEMS_OBFUSCATE_VARIABLE( s );
+
+ i = INT64_C( 1 );
+ s = 0;
+ T_eq_i64( i << s, INT64_C( 1 ) );
+
+ i = -INT64_C( 1 );
+ s = 0;
+ T_eq_i64( i << s, -INT64_C( 1 ) );
+
+ i = INT64_C( 1 );
+ s = 1;
+ T_eq_i64( i << s, INT64_C( 2 ) );
+
+ i = -INT64_C( 1 );
+ s = 1;
+ T_eq_i64( i << s, -INT64_C( 2 ) );
+}
+
+/**
+ * @brief Check signed 64-bit arithmetic right shift for a sample set of
+ * values.
+ */
+static void CompilerUnitBuiltins_Action_15( void )
+{
+ volatile int64_t i;
+ volatile int s;
+
+ i = 0;
+ RTEMS_OBFUSCATE_VARIABLE( i );
+ s = 0;
+ RTEMS_OBFUSCATE_VARIABLE( s );
+
+ i = INT64_C( 1 );
+ s = 0;
+ T_eq_i64( i >> s, INT64_C( 1 ) );
+
+ i = -INT64_C( 1 );
+ s = 0;
+ T_eq_i64( i >> s, -INT64_C( 1 ) );
+
+ i = INT64_C( 2 );
+ s = 1;
+ T_eq_i64( i >> s, INT64_C( 1 ) );
+
+ i = -INT64_C( 2 );
+ s = 1;
+ T_eq_i64( i >> s, -INT64_C( 1 ) );
+}
+
+/**
+ * @brief Check unsigned 64-bit logical right shift for a sample set of values.
+ */
+static void CompilerUnitBuiltins_Action_16( void )
+{
+ volatile uint64_t i;
+ volatile int s;
+
+ i = 0;
+ RTEMS_OBFUSCATE_VARIABLE( i );
+ s = 0;
+ RTEMS_OBFUSCATE_VARIABLE( s );
+
+ i = UINT64_C( 1 );
+ s = 0;
+ T_eq_u64( i >> s, UINT64_C( 1 ) );
+
+ i = -UINT64_C( 1 );
+ s = 0;
+ T_eq_u64( i >> s, UINT64_C( 0xffffffffffffffff ) );
+
+ i = UINT64_C( 2 );
+ s = 1;
+ T_eq_u64( i >> s, UINT64_C( 1 ) );
+
+ i = -UINT64_C( 2 );
+ s = 1;
+ T_eq_u64( i >> s, UINT64_C( 0x7fffffffffffffff ) );
+}
+
+/**
+ * @brief Check signed 64-bit multiplication for a sample set of values.
+ */
+static void CompilerUnitBuiltins_Action_17( void )
+{
+ volatile int64_t a;
+ volatile int64_t b;
+
+ a = 0;
+ RTEMS_OBFUSCATE_VARIABLE( a );
+ b = 0;
+ RTEMS_OBFUSCATE_VARIABLE( b );
+
+ a = INT64_C( 1 );
+ b = INT64_C( 1 );
+ T_eq_i64( a * b, INT64_C( 1 ) );
+
+ a = INT64_C( 1 );
+ b = INT64_C( 0 );
+ T_eq_i64( a * b, INT64_C( 0 ) );
+
+ a = INT64_C( 0 );
+ b = INT64_C( 1 );
+ T_eq_i64( a * b, INT64_C( 0 ) );
+}
+
+/**
+ * @brief Check signed 64-bit negation for a sample set of values.
+ */
+static void CompilerUnitBuiltins_Action_18( void )
+{
+ volatile int64_t i;
+
+ i = 0;
+ RTEMS_OBFUSCATE_VARIABLE( i );
+
+ i = INT64_C( 1 );
+ T_eq_i64( -i, -INT64_C( 1 ) );
+
+ i = -INT64_C( 1 );
+ T_eq_i64( -i, INT64_C( 1 ) );
+}
+
+/**
+ * @brief Check signed 64-bit divisions for a sample set of values.
+ */
+static void CompilerUnitBuiltins_Action_19( void )
+{
+ volatile int64_t n;
+ volatile int64_t d;
+ volatile int64_t x;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+ d = 0;
+ RTEMS_OBFUSCATE_VARIABLE( d );
+ x = 0;
+ RTEMS_OBFUSCATE_VARIABLE( x );
+
+ n = INT64_C( 0 );
+ d = INT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n / d;
+ }
+
+ n = INT64_C( 1 );
+ d = INT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n / d;
+ }
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n / d;
+ }
+
+ n = INT64_C( 0x7fffffff00000000 );
+ d = INT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n / d;
+ }
+
+ n = INT64_C( 0 );
+ d = INT64_C( 1 );
+ T_eq_i64( n / d, INT64_C( 0 ) );
+
+ n = INT64_C( 1 );
+ d = INT64_C( 1 );
+ T_eq_i64( n / d, INT64_C( 1 ) );
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 1 );
+ T_eq_i64( n / d, INT64_C( 9223372036854775807 ) );
+
+ n = INT64_C( 2 );
+ d = INT64_C( 1 );
+ T_eq_i64( n / d, INT64_C( 2 ) );
+
+ n = INT64_C( 2 );
+ d = INT64_C( 1 );
+ T_eq_i64( n / d, INT64_C( 2 ) );
+
+ n = INT64_C( 1 );
+ d = INT64_C( 0x7fffffffffffffff );
+ T_eq_i64( n / d, INT64_C( 0 ) );
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 0x7fffffffffffffff );
+ T_eq_i64( n / d, INT64_C( 1 ) );
+
+ n = INT64_C( 1 );
+ d = INT64_C( 0x7fffffff00000000 );
+ T_eq_i64( n / d, INT64_C( 0 ) );
+
+ n = INT64_C( 0x7fffffff00000000 );
+ d = INT64_C( 0x7fffffff00000000 );
+ T_eq_i64( n / d, INT64_C( 1 ) );
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 0x7fffffff00000000 );
+ T_eq_i64( n / d, INT64_C( 1 ) );
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 0x8000000000000000 );
+ T_eq_i64( n / d, INT64_C( 0 ) );
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 0x0000000080000000 );
+ T_eq_i64( n / d, INT64_C( 0xffffffff ) );
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 0x00000000f0000000 );
+ T_eq_i64( n / d, INT64_C( 2290649224 ) );
+
+ n = INT64_C( 0x00000001ffffffff );
+ d = INT64_C( 0x00000000f0000000 );
+ T_eq_i64( n / d, INT64_C( 2 ) );
+
+ n = INT64_C( 0x0000000fffffffff );
+ d = INT64_C( 0x000000000000000f );
+ T_eq_i64( n / d, INT64_C( 4581298449 ) );
+
+ n = INT64_C( 0x0000000100000001 );
+ d = INT64_C( 0x0000000f00000000 );
+ T_eq_i64( n / d, INT64_C( 0 ) );
+
+ n = INT64_C( 0x0000000f0000000f );
+ d = INT64_C( 0x000000ff0000000f );
+ T_eq_i64( n / d, INT64_C( 0 ) );
+}
+
+/**
+ * @brief Check unsigned 64-bit divisions for a sample set of values.
+ */
+static void CompilerUnitBuiltins_Action_20( void )
+{
+ volatile uint64_t n;
+ volatile uint64_t d;
+ volatile uint64_t x;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+ d = 0;
+ RTEMS_OBFUSCATE_VARIABLE( d );
+ x = 0;
+ RTEMS_OBFUSCATE_VARIABLE( x );
+
+ n = UINT64_C( 0 );
+ d = UINT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n / d;
+ }
+
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ __udivmoddi4( n, d, NULL );
+ }
+ #endif
+
+ n = UINT64_C( 1 );
+ d = UINT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n / d;
+ }
+
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ __udivmoddi4( n, d, NULL );
+ }
+ #endif
+
+ n = UINT64_C( 0x7fffffffffffffff );
+ d = UINT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n / d;
+ }
+
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ __udivmoddi4( n, d, NULL );
+ }
+ #endif
+
+ n = UINT64_C( 0x7fffffff00000000 );
+ d = UINT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n / d;
+ }
+
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ __udivmoddi4( n, d, NULL );
+ }
+ #endif
+
+ n = UINT64_C( 0x7fffffff00000000 );
+ d = UINT64_C( 0x7fffffff00000000 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n / d;
+ }
+
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ __udivmoddi4( n, d, NULL );
+ }
+ #endif
+
+ n = UINT64_C( 0 );
+ d = UINT64_C( 1 );
+ T_eq_u64( n / d, UINT64_C( 0 ) );
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ T_eq_u64( __udivmoddi4( n, d, NULL ), UINT64_C( 0 ) );
+ #endif
+
+ n = UINT64_C( 1 );
+ d = UINT64_C( 1 );
+ T_eq_u64( n / d, UINT64_C( 1 ) );
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ T_eq_u64( __udivmoddi4( n, d, NULL ), UINT64_C( 1 ) );
+ #endif
+
+ n = UINT64_C( 0xffffffffffffffff );
+ d = UINT64_C( 1 );
+ T_eq_u64( n / d, UINT64_C( 0xffffffffffffffff ) );
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ T_eq_u64( __udivmoddi4( n, d, NULL ), UINT64_C( 0xffffffffffffffff ) );
+ #endif
+
+ n = UINT64_C( 2 );
+ d = UINT64_C( 1 );
+ T_eq_u64( n / d, UINT64_C( 2 ) );
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ T_eq_u64( __udivmoddi4( n, d, NULL ), UINT64_C( 2 ) );
+ #endif
+
+ n = UINT64_C( 1 );
+ d = UINT64_C( 0xffffffffffffffff );
+ T_eq_u64( n / d, UINT64_C( 0 ) );
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ T_eq_u64( __udivmoddi4( n, d, NULL ), UINT64_C( 0 ) );
+ #endif
+
+ n = UINT64_C( 0xffffffffffffffff );
+ d = UINT64_C( 0xffffffffffffffff );
+ T_eq_u64( n / d, UINT64_C( 1 ) );
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ T_eq_u64( __udivmoddi4( n, d, NULL ), UINT64_C( 1 ) );
+ #endif
+
+ n = UINT64_C( 0xffffffffffffffff );
+ d = UINT64_C( 0x8000000000000000 );
+ T_eq_u64( n / d, UINT64_C( 1 ) );
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ T_eq_u64( __udivmoddi4( n, d, NULL ), UINT64_C( 1 ) );
+ #endif
+
+ n = UINT64_C( 0x0000000100000001 );
+ d = UINT64_C( 0x0000000f00000000 );
+ T_eq_u64( n / d, UINT64_C( 0 ) );
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ T_eq_u64( __udivmoddi4( n, d, NULL ), UINT64_C( 0 ) );
+ #endif
+
+ n = UINT64_C( 0x0000000100000000 );
+ d = UINT64_C( 0x0000000f00000001 );
+ T_eq_u64( n / d, UINT64_C( 0 ) );
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ T_eq_u64( __udivmoddi4( n, d, NULL ), UINT64_C( 0 ) );
+ #endif
+
+ n = UINT64_C( 0xffffffff0000000f );
+ d = UINT64_C( 0x000000010000000f );
+ T_eq_u64( n / d, UINT64_C( 4294967280 ) );
+ #if defined(TEST_UDIVMODDI4_WITHOUT_REMINDER)
+ T_eq_u64( __udivmoddi4( n, d, NULL ), UINT64_C( 4294967280 ) );
+ #endif
+}
+
+/**
+ * @brief Check signed 64-bit modulo operations for a sample set of values.
+ */
+static void CompilerUnitBuiltins_Action_21( void )
+{
+ volatile int64_t n;
+ volatile int64_t d;
+ volatile int64_t x;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+ d = 0;
+ RTEMS_OBFUSCATE_VARIABLE( d );
+ x = 0;
+ RTEMS_OBFUSCATE_VARIABLE( x );
+
+ n = INT64_C( 0 );
+ d = INT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n % d;
+ }
+
+ n = INT64_C( 1 );
+ d = INT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n % d;
+ }
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n % d;
+ }
+
+ n = INT64_C( 0x7fffffff00000000 );
+ d = INT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n % d;
+ }
+
+ n = INT64_C( 0 );
+ d = INT64_C( 1 );
+ T_eq_i64( n % d, INT64_C( 0 ) );
+
+ n = INT64_C( 1 );
+ d = INT64_C( 1 );
+ T_eq_i64( n % d, INT64_C( 0 ) );
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 1 );
+ T_eq_i64( n % d, INT64_C( 0 ) );
+
+ n = INT64_C( 2 );
+ d = INT64_C( 1 );
+ T_eq_i64( n % d, INT64_C( 0 ) );
+
+ n = INT64_C( 2 );
+ d = INT64_C( 1 );
+ T_eq_i64( n % d, INT64_C( 0 ) );
+
+ n = INT64_C( 1 );
+ d = INT64_C( 0x7fffffffffffffff );
+ T_eq_i64( n % d, INT64_C( 1 ) );
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 0x7fffffffffffffff );
+ T_eq_i64( n % d, INT64_C( 0 ) );
+
+ n = INT64_C( 1 );
+ d = INT64_C( 0x7fffffff00000000 );
+ T_eq_i64( n % d, INT64_C( 1 ) );
+
+ n = INT64_C( 0x7fffffff00000000 );
+ d = INT64_C( 0x7fffffff00000000 );
+ T_eq_i64( n % d, INT64_C( 0 ) );
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 0x7fffffff00000000 );
+ T_eq_i64( n % d, INT64_C( 0xffffffff ) );
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 0x8000000000000000 );
+ T_eq_i64( n % d, INT64_C( 0x7fffffffffffffff ) );
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 0x0000000080000000 );
+ T_eq_i64( n % d, INT64_C( 2147483647 ) );
+
+ n = INT64_C( 0x7fffffffffffffff );
+ d = INT64_C( 0x00000000f0000000 );
+ T_eq_i64( n % d, INT64_C( 2147483647 ) );
+
+ n = INT64_C( 0x00000001ffffffff );
+ d = INT64_C( 0x00000000f0000000 );
+ T_eq_i64( n % d, INT64_C( 536870911 ) );
+
+ n = INT64_C( 0x0000000fffffffff );
+ d = INT64_C( 0x000000000000000f );
+ T_eq_i64( n % d, INT64_C( 0 ) );
+
+ n = INT64_C( 0x0000000100000001 );
+ d = INT64_C( 0x0000000f00000000 );
+ T_eq_i64( n % d, INT64_C( 4294967297 ) );
+
+ n = INT64_C( 0x0000000f0000000f );
+ d = INT64_C( 0x000000ff0000000f );
+ T_eq_i64( n % d, INT64_C( 64424509455 ) );
+
+ #if defined(TEST_UDIVMODDI4)
+ /*
+ * The above test cases may use __udivmoddi4(). However, the below
+ * parameter values for __udivmoddi4() cannot be obtained through the
+ * signed modulo or division operations. On some targets, calls to
+ * __udivmoddi4() may result from complex optimizations.
+ */
+ n = INT64_C( 0xffffffff0000000f );
+ d = INT64_C( 0x000000010000000f );
+ T_eq_u64( __udivmoddi4( n, d, NULL ), INT64_C( 4294967280 ) );
+ #endif
+}
+
+/**
+ * @brief Check unsigned 64-bit modulo operations for a sample set of values.
+ */
+static void CompilerUnitBuiltins_Action_22( void )
+{
+ volatile uint64_t n;
+ volatile uint64_t d;
+ volatile uint64_t x;
+
+ n = 0;
+ RTEMS_OBFUSCATE_VARIABLE( n );
+ d = 0;
+ RTEMS_OBFUSCATE_VARIABLE( d );
+ x = 0;
+ RTEMS_OBFUSCATE_VARIABLE( x );
+
+ n = UINT64_C( 0 );
+ d = UINT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n % d;
+ }
+
+ n = UINT64_C( 1 );
+ d = UINT64_C( 0 );
+ do_longjmp = true;
+
+ if ( setjmp( exception_return_context ) == 0 ) {
+ x = n % d;
+ }
+
+ n = UINT64_C( 0 );
+ d = UINT64_C( 1 );
+ T_eq_u64( n % d, UINT64_C( 0 ) );
+
+ n = UINT64_C( 1 );
+ d = UINT64_C( 1 );
+ T_eq_u64( n % d, UINT64_C( 0 ) );
+
+ n = UINT64_C( 0xffffffffffffffff );
+ d = UINT64_C( 1 );
+ T_eq_u64( n % d, UINT64_C( 0 ) );
+
+ n = UINT64_C( 2 );
+ d = UINT64_C( 1 );
+ T_eq_u64( n % d, UINT64_C( 0 ) );
+
+ n = UINT64_C( 1 );
+ d = UINT64_C( 0xffffffffffffffff );
+ T_eq_u64( n % d, UINT64_C( 1 ) );
+
+ n = UINT64_C( 0xffffffffffffffff );
+ d = UINT64_C( 0xffffffffffffffff );
+ T_eq_u64( n % d, UINT64_C( 0 ) );
+}
+
+/**
+ * @fn void T_case_body_CompilerUnitBuiltins( void )
+ */
+T_TEST_CASE_FIXTURE( CompilerUnitBuiltins, &CompilerUnitBuiltins_Fixture )
+{
+ CompilerUnitBuiltins_Action_0();
+ CompilerUnitBuiltins_Action_1();
+ CompilerUnitBuiltins_Action_2();
+ CompilerUnitBuiltins_Action_3();
+ CompilerUnitBuiltins_Action_4();
+ CompilerUnitBuiltins_Action_5();
+ CompilerUnitBuiltins_Action_6();
+ CompilerUnitBuiltins_Action_7();
+ CompilerUnitBuiltins_Action_8();
+ CompilerUnitBuiltins_Action_9();
+ CompilerUnitBuiltins_Action_10();
+ CompilerUnitBuiltins_Action_11();
+ CompilerUnitBuiltins_Action_12();
+ CompilerUnitBuiltins_Action_13();
+ CompilerUnitBuiltins_Action_14();
+ CompilerUnitBuiltins_Action_15();
+ CompilerUnitBuiltins_Action_16();
+ CompilerUnitBuiltins_Action_17();
+ CompilerUnitBuiltins_Action_18();
+ CompilerUnitBuiltins_Action_19();
+ CompilerUnitBuiltins_Action_20();
+ CompilerUnitBuiltins_Action_21();
+ CompilerUnitBuiltins_Action_22();
+}
+
+/** @} */
diff --git a/testsuites/unit/tc-config.c b/testsuites/unit/tc-config.c
new file mode 100644
index 0000000000..415142e1b4
--- /dev/null
+++ b/testsuites/unit/tc-config.c
@@ -0,0 +1,171 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsConfigUnitConfig
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/rtems/semdata.h>
+#include <rtems/score/object.h>
+#include <rtems/score/objectdata.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsConfigUnitConfig spec:/rtems/config/unit/config
+ *
+ * @ingroup TestsuitesUnitNoClock0
+ *
+ * @brief Unit tests for the configuration manager.
+ *
+ * Parts of the file ``cpukit/sapi/src/getconfigmax.c`` are only executed when
+ * unlimited objects are configured. The space qualified code subset does not
+ * support this feature. This test exercises the code parts otherwise not
+ * reached in order to achieve full code coverage.
+ *
+ * This test case performs the following actions:
+ *
+ * - Call get_config_max() indirectly through
+ * rtems_configuration_get_maximum_semaphores() with a specially manipulated
+ * argument to enter an if-branch only accessed when unlimited objects are
+ * configured.
+ *
+ * - The value returned by the function call must be the one artificially
+ * injected by this test.
+ *
+ * @{
+ */
+
+#define SEMAPHORES_PER_BLOCK 32
+
+/**
+ * @brief Test context for spec:/rtems/config/unit/config test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the original value of
+ * ``_Semaphore_Information->objects_per_block``.
+ */
+ Objects_Maximum objects_per_block_ori;
+} RtemsConfigUnitConfig_Context;
+
+static RtemsConfigUnitConfig_Context
+ RtemsConfigUnitConfig_Instance;
+
+static void RtemsConfigUnitConfig_Setup( RtemsConfigUnitConfig_Context *ctx )
+{
+ ctx->objects_per_block_ori = _Semaphore_Information.objects_per_block;
+ _Semaphore_Information.objects_per_block = SEMAPHORES_PER_BLOCK;
+}
+
+static void RtemsConfigUnitConfig_Setup_Wrap( void *arg )
+{
+ RtemsConfigUnitConfig_Context *ctx;
+
+ ctx = arg;
+ RtemsConfigUnitConfig_Setup( ctx );
+}
+
+static void RtemsConfigUnitConfig_Teardown(
+ RtemsConfigUnitConfig_Context *ctx
+)
+{
+ _Semaphore_Information.objects_per_block = ctx->objects_per_block_ori;
+}
+
+static void RtemsConfigUnitConfig_Teardown_Wrap( void *arg )
+{
+ RtemsConfigUnitConfig_Context *ctx;
+
+ ctx = arg;
+ RtemsConfigUnitConfig_Teardown( ctx );
+}
+
+static T_fixture RtemsConfigUnitConfig_Fixture = {
+ .setup = RtemsConfigUnitConfig_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsConfigUnitConfig_Teardown_Wrap,
+ .scope = NULL,
+ .initial_context = &RtemsConfigUnitConfig_Instance
+};
+
+/**
+ * @brief Call get_config_max() indirectly through
+ * rtems_configuration_get_maximum_semaphores() with a specially manipulated
+ * argument to enter an if-branch only accessed when unlimited objects are
+ * configured.
+ */
+static void RtemsConfigUnitConfig_Action_0(
+ RtemsConfigUnitConfig_Context *ctx
+)
+{
+ uint32_t max = rtems_configuration_get_maximum_semaphores();
+
+ /*
+ * The value returned by the function call must be the one artificially
+ * injected by this test.
+ */
+ T_eq_u32( max, SEMAPHORES_PER_BLOCK | RTEMS_UNLIMITED_OBJECTS );
+}
+
+/**
+ * @fn void T_case_body_RtemsConfigUnitConfig( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsConfigUnitConfig, &RtemsConfigUnitConfig_Fixture )
+{
+ RtemsConfigUnitConfig_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ RtemsConfigUnitConfig_Action_0( ctx );
+}
+
+/** @} */
diff --git a/testsuites/unit/tc-crc.c b/testsuites/unit/tc-crc.c
new file mode 100644
index 0000000000..d33a837860
--- /dev/null
+++ b/testsuites/unit/tc-crc.c
@@ -0,0 +1,48 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesUnitNoClock0
+ */
+
+/*
+ * Copyright (C) 2023 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#include <rtems/crc.h>
+
+#include <rtems/test.h>
+
+T_TEST_CASE(CRC24Q) {
+ uint32_t state = _CRC24Q_Update(CRC24Q_SEED, 0);
+ T_eq_u32(state, 0);
+ state = _CRC24Q_Update(CRC24Q_SEED, '1');
+ state = _CRC24Q_Update(state, '2');
+ state = _CRC24Q_Update(state, '3');
+ T_eq_u32(state & CRC24Q_MASK, 0x2c3045);
+ uint8_t bytes[] = {'1', '2', '3'};
+ state = _CRC24Q_Sequence_update(CRC24Q_SEED, &bytes[0], sizeof(bytes));
+ T_eq_u32(state & CRC24Q_MASK, 0x2c3045);
+}
diff --git a/testsuites/unit/tc-misaligned-builtin-memcpy.c b/testsuites/unit/tc-misaligned-builtin-memcpy.c
new file mode 100644
index 0000000000..6ce19e0521
--- /dev/null
+++ b/testsuites/unit/tc-misaligned-builtin-memcpy.c
@@ -0,0 +1,57 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesUnitNoClock0
+ */
+
+/*
+ * Copyright (C) 2019 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#include <string.h>
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+T_TEST_CASE(MisalignedBuiltinMemcpy)
+{
+ double a;
+ double b;
+ char buf[2 * sizeof(double)];
+ void *p;
+
+ p = &buf[0];
+ p = (void *)((uintptr_t)p | 1);
+ RTEMS_OBFUSCATE_VARIABLE(p);
+ a = 123e4;
+ RTEMS_OBFUSCATE_VARIABLE(a);
+ a *= a;
+ memcpy(p, &a, sizeof(a));
+ RTEMS_OBFUSCATE_VARIABLE(p);
+ memcpy(&b, p, sizeof(b));
+ T_eq(a, b, "%f == %f", a, b);
+}
diff --git a/testsuites/unit/tc-score-msgq.c b/testsuites/unit/tc-score-msgq.c
new file mode 100644
index 0000000000..c4cb690c2f
--- /dev/null
+++ b/testsuites/unit/tc-score-msgq.c
@@ -0,0 +1,452 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreMsgqUnitMsgq
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/rtems/messageimpl.h>
+#include <rtems/rtems/statusimpl.h>
+#include <rtems/score/coremsgimpl.h>
+
+#include "../validation/tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreMsgqUnitMsgq spec:/score/msgq/unit/msgq
+ *
+ * @ingroup TestsuitesUnitNoClock0
+ *
+ * @brief Unit tests for the Message Queue Handler.
+ *
+ * Parts of the files ``cpukit/score/src/coremsginsert.c``,
+ * ``cpukit/score/src/coremsgseize.c``, and
+ * ``cpukit/score/src/coremsgsubmit.c`` are only executed by the POSIX API.
+ * Currently, the pre-qualified subset of RTEMS does not contain the POSIX API.
+ * This test exercises the code parts otherwise only reached by the POSIX API
+ * to achieve full code coverage.
+ *
+ * This test case performs the following actions:
+ *
+ * - Use _CORE_message_queue_Insert_message() to insert two messages into a
+ * message queue and use the POSIX message priority to define their order in
+ * the queue.
+ *
+ * - Check that _CORE_message_queue_Submit() was executed successfully.
+ *
+ * - Check that the messages are in the right order in the message queue.
+ *
+ * - Submit three messages into a message queue which can only store two and
+ * have the third submit() blocked till a seize() occurs.
+ *
+ * - Check that the third _CORE_message_queue_Submit() did actually block
+ * till there was room for the message in the message queue.
+ *
+ * - Submit messages in the queue from within an ISR.
+ *
+ * - Check that the first two messages were successfully send.
+ *
+ * - Check that trying to send the third message from ISR when the message
+ * queue was full was rejected.
+ *
+ * @{
+ */
+
+#define MAXIMUM_PENDING_MESSAGES 2
+#define MAXIMUM_MESSAGE_SIZE 3
+
+static void WorkerTask( rtems_task_argument argument );
+
+/**
+ * @brief Test context for spec:/score/msgq/unit/msgq test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a valid ID of a message queue.
+ */
+ rtems_id message_queue_id;
+
+ /**
+ * @brief This member is used as storage area for the message queue.
+ */
+ RTEMS_MESSAGE_QUEUE_BUFFER( MAXIMUM_MESSAGE_SIZE )
+ storage_area[ MAXIMUM_PENDING_MESSAGES];
+
+ /**
+ * @brief This member contains the task identifier of the worker task.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member indicated whether the worker task is currently sending
+ * a message (``true``) or whether it is waiting to receive an event
+ * (``false``).
+ */
+ bool is_worker_working;
+
+ /**
+ * @brief This member contains the returned status code of the SendMessage()
+ * function.
+ */
+ rtems_status_code send_status;
+} ScoreMsgqUnitMsgq_Context;
+
+static ScoreMsgqUnitMsgq_Context
+ ScoreMsgqUnitMsgq_Instance;
+
+#define EVENT_SEND RTEMS_EVENT_17
+#define MESSAGE_CONTENT_LOW { 1, 2, 3 }
+#define MESSAGE_CONTENT_HIGH { 4, 5 }
+#define MESSAGE_PRIORITY_LOW 5
+#define MESSAGE_PRIORITY_HIGH 7
+#define DO_WAIT true
+
+typedef ScoreMsgqUnitMsgq_Context Context;
+
+/*
+ * This is a code fragment from rtems_message_queue_send() with the
+ * specialty that it uses a POSIX priority and the sender
+ * task will wait in case the queue is full.
+ */
+static rtems_status_code SubmitMessage(
+ rtems_id id,
+ uint8_t *message,
+ size_t message_size,
+ unsigned int posix_piority
+)
+{
+ rtems_status_code status;
+ Thread_queue_Context queue_context;
+ Message_queue_Control *the_message_queue;
+
+ T_assert_lt_uint( posix_piority, MQ_PRIO_MAX );
+
+ the_message_queue = _Message_queue_Get(
+ id,
+ &queue_context
+ );
+ T_assert_not_null( the_message_queue );
+
+ /* The next two calls are from _POSIX_Message_queue_Send_support() */
+ _Thread_queue_Context_set_enqueue_callout(
+ &queue_context,
+ _Thread_queue_Enqueue_do_nothing_extra
+ );
+ _Thread_queue_Context_set_timeout_argument( &queue_context, NULL, true );
+
+ _CORE_message_queue_Acquire_critical(
+ &the_message_queue->message_queue,
+ &queue_context
+ );
+
+ status = _CORE_message_queue_Submit(
+ &the_message_queue->message_queue,
+ _Thread_Executing,
+ message,
+ message_size,
+ (CORE_message_queue_Submit_types) ( posix_piority * -1 ),
+ DO_WAIT,
+ &queue_context
+ );
+
+ return _Status_Get( status );
+}
+
+static rtems_status_code ReceiveMessage(
+ rtems_id id,
+ void *buffer,
+ size_t *size
+)
+{
+ return rtems_message_queue_receive(
+ id,
+ buffer,
+ size,
+ RTEMS_LOCAL | RTEMS_NO_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+}
+
+static rtems_status_code ReceiveOneMessages( Context *ctx )
+{
+ uint8_t message_buffer[ MAXIMUM_MESSAGE_SIZE ];
+ size_t message_size;
+
+ return ReceiveMessage(
+ ctx->message_queue_id,
+ &message_buffer,
+ &message_size
+ );
+}
+
+static void SendMessage( Context *ctx )
+{
+ uint8_t message[] = { 100, 101, 102 };
+ ctx->send_status = SubmitMessage(
+ ctx->message_queue_id,
+ message,
+ sizeof( message ),
+ MESSAGE_PRIORITY_LOW
+ );
+}
+
+static void WorkerTask( rtems_task_argument argument )
+{
+ Context *ctx = (Context *) argument;
+
+ while ( true ) {
+ ctx->is_worker_working = false;
+ ReceiveAnyEvents();
+ ctx->is_worker_working = true;
+ SendMessage( ctx );
+ T_assert_rsc_success( ctx->send_status );
+ }
+}
+
+static void WorkerSendMessage( Context *ctx )
+{
+ SendEvents( ctx->worker_id, EVENT_SEND );
+}
+
+static void ScoreMsgqUnitMsgq_Setup( ScoreMsgqUnitMsgq_Context *ctx )
+{
+ rtems_status_code status;
+ rtems_message_queue_config config = {
+ .name = rtems_build_name( 'M', 'S', 'G', 'Q' ),
+ .maximum_pending_messages = MAXIMUM_PENDING_MESSAGES,
+ .maximum_message_size = MAXIMUM_MESSAGE_SIZE,
+ .storage_area = ctx->storage_area,
+ .storage_size = sizeof( ctx->storage_area ),
+ .storage_free = NULL,
+ .attributes = RTEMS_DEFAULT_ATTRIBUTES
+ };
+
+ status = rtems_message_queue_construct(
+ &config,
+ &ctx->message_queue_id
+ );
+ T_rsc_success( status );
+
+ SetSelfPriority( PRIO_NORMAL );
+
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, WorkerTask, ctx );
+}
+
+static void ScoreMsgqUnitMsgq_Setup_Wrap( void *arg )
+{
+ ScoreMsgqUnitMsgq_Context *ctx;
+
+ ctx = arg;
+ ScoreMsgqUnitMsgq_Setup( ctx );
+}
+
+static void ScoreMsgqUnitMsgq_Teardown( ScoreMsgqUnitMsgq_Context *ctx )
+{
+ DeleteTask( ctx->worker_id );
+ RestoreRunnerPriority();
+ T_rsc_success( rtems_message_queue_delete( ctx->message_queue_id ) );
+}
+
+static void ScoreMsgqUnitMsgq_Teardown_Wrap( void *arg )
+{
+ ScoreMsgqUnitMsgq_Context *ctx;
+
+ ctx = arg;
+ ScoreMsgqUnitMsgq_Teardown( ctx );
+}
+
+static T_fixture ScoreMsgqUnitMsgq_Fixture = {
+ .setup = ScoreMsgqUnitMsgq_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreMsgqUnitMsgq_Teardown_Wrap,
+ .scope = NULL,
+ .initial_context = &ScoreMsgqUnitMsgq_Instance
+};
+
+/**
+ * @brief Use _CORE_message_queue_Insert_message() to insert two messages into
+ * a message queue and use the POSIX message priority to define their order
+ * in the queue.
+ */
+static void ScoreMsgqUnitMsgq_Action_0( ScoreMsgqUnitMsgq_Context *ctx )
+{
+ rtems_status_code status_submit_low;
+ rtems_status_code status_submit_high;
+ rtems_status_code status_receive_low;
+ rtems_status_code status_receive_high;
+ uint8_t message_low[] = MESSAGE_CONTENT_LOW;
+ uint8_t message_high[] = MESSAGE_CONTENT_HIGH;
+ uint8_t message_buffer_low[ MAXIMUM_MESSAGE_SIZE ];
+ uint8_t message_buffer_high[ MAXIMUM_MESSAGE_SIZE ];
+ size_t message_size_low;
+ size_t message_size_high;
+
+ status_submit_low = SubmitMessage(
+ ctx->message_queue_id,
+ message_low,
+ sizeof( message_low ),
+ MESSAGE_PRIORITY_LOW
+ );
+
+ status_submit_high = SubmitMessage(
+ ctx->message_queue_id,
+ message_high,
+ sizeof( message_high ),
+ MESSAGE_PRIORITY_HIGH
+ );
+
+ status_receive_high = ReceiveMessage(
+ ctx->message_queue_id,
+ &message_buffer_high,
+ &message_size_high
+ );
+
+ status_receive_low = ReceiveMessage(
+ ctx->message_queue_id,
+ &message_buffer_low,
+ &message_size_low
+ );
+
+ /*
+ * Check that _CORE_message_queue_Submit() was executed successfully.
+ */
+ T_rsc_success( status_submit_low );
+ T_rsc_success( status_submit_high );
+
+ /*
+ * Check that the messages are in the right order in the message queue.
+ */
+ T_rsc_success( status_receive_high );
+ T_eq_sz( message_size_high, sizeof( message_high ) );
+ T_eq_mem( message_buffer_high, message_high, message_size_high );
+
+ T_rsc_success( status_receive_low );
+ T_eq_sz( message_size_low, sizeof( message_low ) );
+ T_eq_mem( message_buffer_low, message_low, message_size_low );
+}
+
+/**
+ * @brief Submit three messages into a message queue which can only store two
+ * and have the third submit() blocked till a seize() occurs.
+ */
+static void ScoreMsgqUnitMsgq_Action_1( ScoreMsgqUnitMsgq_Context *ctx )
+{
+ bool is_worker_blocked_after_third_send;
+ bool is_worker_blocked_after_first_receive;
+
+ WorkerSendMessage( ctx );
+ WorkerSendMessage( ctx );
+ WorkerSendMessage( ctx );
+ is_worker_blocked_after_third_send = ctx->is_worker_working;
+
+ T_rsc_success( ReceiveOneMessages( ctx ) );
+ is_worker_blocked_after_first_receive = ctx->is_worker_working;
+
+ T_rsc_success( ReceiveOneMessages( ctx ) );
+ T_rsc_success( ReceiveOneMessages( ctx ) );
+
+ /*
+ * Check that the third _CORE_message_queue_Submit() did actually block till
+ * there was room for the message in the message queue.
+ */
+ T_true( is_worker_blocked_after_third_send );
+ T_true( !is_worker_blocked_after_first_receive );
+}
+
+/**
+ * @brief Submit messages in the queue from within an ISR.
+ */
+static void ScoreMsgqUnitMsgq_Action_2( ScoreMsgqUnitMsgq_Context *ctx )
+{
+ rtems_status_code status_send_first_message;
+ rtems_status_code status_send_second_message;
+ rtems_status_code status_send_third_message;
+
+ CallWithinISR( ( void (*)(void*) ) SendMessage, ctx );
+ status_send_first_message = ctx->send_status;
+ CallWithinISR( ( void (*)(void*) ) SendMessage, ctx );
+ status_send_second_message = ctx->send_status;
+ CallWithinISR( ( void (*)(void*) ) SendMessage, ctx );
+ status_send_third_message = ctx->send_status;
+
+ T_rsc_success( ReceiveOneMessages( ctx ) );
+ T_rsc_success( ReceiveOneMessages( ctx ) );
+
+ /*
+ * Check that the first two messages were successfully send.
+ */
+ T_assert_rsc_success( status_send_first_message );
+ T_assert_rsc_success( status_send_second_message );
+
+ /*
+ * Check that trying to send the third message from ISR when the message
+ * queue was full was rejected.
+ */
+ T_rsc( status_send_third_message, STATUS_CLASSIC_INTERNAL_ERROR );
+}
+
+/**
+ * @fn void T_case_body_ScoreMsgqUnitMsgq( void )
+ */
+T_TEST_CASE_FIXTURE( ScoreMsgqUnitMsgq, &ScoreMsgqUnitMsgq_Fixture )
+{
+ ScoreMsgqUnitMsgq_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ScoreMsgqUnitMsgq_Action_0( ctx );
+ ScoreMsgqUnitMsgq_Action_1( ctx );
+ ScoreMsgqUnitMsgq_Action_2( ctx );
+}
+
+/** @} */
diff --git a/testsuites/unit/tc-score-rbtree.c b/testsuites/unit/tc-score-rbtree.c
new file mode 100644
index 0000000000..ec286838d0
--- /dev/null
+++ b/testsuites/unit/tc-score-rbtree.c
@@ -0,0 +1,1195 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreRbtreeUnitRbtree
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ * Copyright (C) 2010 Gedare Bloom
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <rtems/score/rbtreeimpl.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreRbtreeUnitRbtree spec:/score/rbtree/unit/rbtree
+ *
+ * @ingroup TestsuitesUnitNoClock0
+ *
+ * @brief Unit tests for the red-black tree implementation.
+ *
+ * The red-black trees are used by various handlers for priority queues and the
+ * timers.
+ *
+ * This test case performs the following actions:
+ *
+ * - Call _RBTree_Initialize_one() and check the tree properties.
+ *
+ * - Check that the tree is not emtpy.
+ *
+ * - Check that the tree root is is the only node.
+ *
+ * - Check that the node is not off the tree.
+ *
+ * - Check that the node has no left child.
+ *
+ * - Check that the node has no right child.
+ *
+ * - Check that the node has no parent.
+ *
+ * - Check that the node has no successor.
+ *
+ * - Check that the node has no predecessor.
+ *
+ * - Check that the minimum node is the node.
+ *
+ * - Check that the maximum node is the node.
+ *
+ * - Check that the tree is emtpy after extraction of the node.
+ *
+ * - Call _RBTree_Insert_inline() and check the return status for a sample set
+ * of nodes.
+ *
+ * - Insert the first node. Check that it is the new minimum node.
+ *
+ * - Insert the second node. Check that it is not the new minimum node.
+ *
+ * - Insert the third node. Check that it is the new minimum node.
+ *
+ * - Call _RBTree_Insert_inline() and _RBTree_Extract() for a sample set of
+ * trees.
+ *
+ * @{
+ */
+
+typedef struct {
+ int id;
+ int key;
+ RBTree_Node Node;
+} TestNode;
+
+static TestNode node_array[ 100 ];
+
+static int Color( const RBTree_Node *n )
+{
+ return RB_COLOR( n, Node );
+}
+
+static bool Less( const void *left, const RBTree_Node *right )
+{
+ const int *the_left;
+ const TestNode *the_right;
+
+ the_left = left;
+ the_right = RTEMS_CONTAINER_OF( right, TestNode, Node );
+
+ return *the_left < the_right->key;
+}
+
+/*
+ * recursively checks tree. if the tree is built properly it should only
+ * be a depth of 7 function calls for 100 entries in the tree.
+ */
+static int VerifyTree( RBTree_Node *root )
+{
+ RBTree_Node *ln;
+ RBTree_Node *rn;
+ TestNode *tn;
+ TestNode *ltn;
+ TestNode *rtn;
+ int lh;
+ int rh;
+
+ if ( root == NULL ) {
+ return 1;
+ }
+
+ ln = _RBTree_Left( root );
+ rn = _RBTree_Right( root );
+ tn = RTEMS_CONTAINER_OF( root, TestNode, Node );
+ ltn = RTEMS_CONTAINER_OF( ln, TestNode, Node );
+ rtn = RTEMS_CONTAINER_OF( rn, TestNode, Node );
+
+ /* Consecutive red links */
+ if (
+ Color( root ) == RB_RED &&
+ ( ( ln != NULL && Color( ln ) == RB_RED ) ||
+ ( rn != NULL && Color( rn ) == RB_RED ) )
+ ) {
+ return -1;
+ }
+
+ lh = VerifyTree ( ln );
+ rh = VerifyTree ( rn );
+
+ if ( lh == -1 || rh == -1 ) {
+ return -1;
+ }
+
+ /* Black height mismatch */
+ if ( lh != rh ) {
+ return -1;
+ }
+
+ /* Invalid binary search tree */
+ if (
+ ( ln != NULL && tn->key != ltn->key && !Less( &ltn->key, root ) ) ||
+ ( rn != NULL && tn->key != rtn->key && !Less( &tn->key, rn ) )
+ ) {
+ return -1;
+ }
+
+ /* Only count black links */
+ return Color( root ) == RB_BLACK ? lh + 1 : lh;
+}
+
+#define TN( i ) &node_array[ i ].Node
+
+typedef struct {
+ int key;
+ const RBTree_Node *parent;
+ const RBTree_Node *left;
+ const RBTree_Node *right;
+ int color;
+} TestNodeDescription;
+
+typedef struct {
+ int current;
+ int count;
+ const TestNodeDescription *tree;
+} VisitorContext;
+
+static bool VisitNodes(
+ const RBTree_Node *node,
+ void *visitor_arg
+)
+{
+ VisitorContext *ctx;
+ const TestNodeDescription *td;
+ const TestNode *tn;
+
+ ctx = visitor_arg;
+ td = &ctx->tree[ ctx->current ];
+ tn = RTEMS_CONTAINER_OF( node, TestNode, Node );
+
+ T_lt_int( ctx->current, ctx->count );
+
+ T_eq_int( td->key, tn->key );
+
+ if ( td->parent == NULL ) {
+ T_true( _RBTree_Is_root( &tn->Node ) );
+ } else {
+ T_eq_ptr( td->parent, _RBTree_Parent( &tn->Node ) );
+ }
+
+ T_eq_ptr( td->left, _RBTree_Left( &tn->Node ) );
+ T_eq_ptr( td->right, _RBTree_Right( &tn->Node ) );
+ T_eq_int( td->color, Color( &tn->Node ) );
+
+ ++ctx->current;
+
+ return false;
+}
+
+static const TestNodeDescription random_ops_tree_unique_1[] = {
+ { 0, NULL, NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_1[] = {
+ { 0, NULL, NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_2[] = {
+};
+
+static const TestNodeDescription random_ops_tree_multiple_2[] = {
+};
+
+static const TestNodeDescription random_ops_tree_unique_3[] = {
+ { 2, NULL, NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_3[] = {
+ { 1, NULL, NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_4[] = {
+ { 0, TN( 3 ), NULL, NULL, RB_RED },
+ { 3, NULL, TN( 0 ), NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_4[] = {
+ { 0, NULL, NULL, TN( 3 ), RB_BLACK },
+ { 1, TN( 0 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_unique_5[] = {
+ { 0, TN( 1 ), NULL, NULL, RB_RED },
+ { 1, NULL, TN( 0 ), TN( 4 ), RB_BLACK },
+ { 4, TN( 1 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_5[] = {
+ { 0, TN( 1 ), NULL, NULL, RB_RED },
+ { 0, NULL, TN( 0 ), TN( 4 ), RB_BLACK },
+ { 2, TN( 1 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_unique_6[] = {
+ { 0, TN( 2 ), NULL, NULL, RB_RED },
+ { 2, NULL, TN( 0 ), NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_6[] = {
+ { 0, TN( 2 ), NULL, NULL, RB_RED },
+ { 1, NULL, TN( 0 ), NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_7[] = {
+ { 0, TN( 2 ), NULL, TN( 1 ), RB_BLACK },
+ { 1, TN( 0 ), NULL, NULL, RB_RED },
+ { 2, NULL, TN( 0 ), TN( 5 ), RB_BLACK },
+ { 4, TN( 5 ), NULL, NULL, RB_RED },
+ { 5, TN( 2 ), TN( 4 ), NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_7[] = {
+ { 0, TN( 2 ), NULL, TN( 1 ), RB_BLACK },
+ { 0, TN( 0 ), NULL, NULL, RB_RED },
+ { 1, NULL, TN( 0 ), TN( 4 ), RB_BLACK },
+ { 2, TN( 4 ), NULL, NULL, RB_RED },
+ { 2, TN( 2 ), TN( 5 ), NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_8[] = {
+ { 0, TN( 1 ), NULL, NULL, RB_BLACK },
+ { 1, NULL, TN( 0 ), TN( 6 ), RB_BLACK },
+ { 5, TN( 6 ), NULL, NULL, RB_RED },
+ { 6, TN( 1 ), TN( 5 ), NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_8[] = {
+ { 0, TN( 5 ), NULL, TN( 0 ), RB_BLACK },
+ { 0, TN( 1 ), NULL, NULL, RB_RED },
+ { 2, NULL, TN( 1 ), TN( 6 ), RB_BLACK },
+ { 3, TN( 5 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_9[] = {
+ { 1, TN( 2 ), NULL, NULL, RB_BLACK },
+ { 2, TN( 6 ), TN( 1 ), TN( 4 ), RB_RED },
+ { 4, TN( 2 ), NULL, TN( 5 ), RB_BLACK },
+ { 5, TN( 4 ), NULL, NULL, RB_RED },
+ { 6, NULL, TN( 2 ), TN( 7 ), RB_BLACK },
+ { 7, TN( 6 ), NULL, TN( 8 ), RB_BLACK },
+ { 8, TN( 7 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_9[] = {
+ { 0, TN( 2 ), NULL, NULL, RB_BLACK },
+ { 1, TN( 6 ), TN( 1 ), TN( 4 ), RB_RED },
+ { 2, TN( 2 ), NULL, TN( 5 ), RB_BLACK },
+ { 2, TN( 4 ), NULL, NULL, RB_RED },
+ { 3, NULL, TN( 2 ), TN( 7 ), RB_BLACK },
+ { 3, TN( 6 ), NULL, TN( 8 ), RB_BLACK },
+ { 4, TN( 7 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_unique_10[] = {
+ { 0, TN( 2 ), NULL, NULL, RB_BLACK },
+ { 2, TN( 6 ), TN( 0 ), TN( 4 ), RB_RED },
+ { 3, TN( 4 ), NULL, NULL, RB_RED },
+ { 4, TN( 2 ), TN( 3 ), NULL, RB_BLACK },
+ { 6, NULL, TN( 2 ), TN( 8 ), RB_BLACK },
+ { 8, TN( 6 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_10[] = {
+ { 0, TN( 2 ), NULL, NULL, RB_BLACK },
+ { 1, TN( 6 ), TN( 0 ), TN( 4 ), RB_RED },
+ { 1, TN( 4 ), NULL, NULL, RB_RED },
+ { 2, TN( 2 ), TN( 3 ), NULL, RB_BLACK },
+ { 3, NULL, TN( 2 ), TN( 8 ), RB_BLACK },
+ { 4, TN( 6 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_11[] = {
+ { 2, TN( 6 ), NULL, NULL, RB_BLACK },
+ { 6, NULL, TN( 2 ), TN( 8 ), RB_BLACK },
+ { 7, TN( 8 ), NULL, NULL, RB_RED },
+ { 8, TN( 6 ), TN( 7 ), TN( 9 ), RB_BLACK },
+ { 9, TN( 8 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_11[] = {
+ { 1, TN( 6 ), NULL, NULL, RB_BLACK },
+ { 3, NULL, TN( 2 ), TN( 8 ), RB_BLACK },
+ { 3, TN( 8 ), NULL, NULL, RB_RED },
+ { 4, TN( 6 ), TN( 7 ), TN( 9 ), RB_BLACK },
+ { 4, TN( 8 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_unique_12[] = {
+ { 0, TN( 1 ), NULL, NULL, RB_RED },
+ { 1, TN( 3 ), TN( 0 ), TN( 2 ), RB_BLACK },
+ { 2, TN( 1 ), NULL, NULL, RB_RED },
+ { 3, TN( 5 ), TN( 1 ), TN( 4 ), RB_RED },
+ { 4, TN( 3 ), NULL, NULL, RB_BLACK },
+ { 5, NULL, TN( 3 ), TN( 9 ), RB_BLACK },
+ { 9, TN( 5 ), NULL, TN( 11 ), RB_BLACK },
+ { 11, TN( 9 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_12[] = {
+ { 0, TN( 1 ), NULL, NULL, RB_BLACK },
+ { 0, TN( 5 ), TN( 0 ), TN( 3 ), RB_RED },
+ { 1, TN( 1 ), NULL, TN( 2 ), RB_BLACK },
+ { 1, TN( 3 ), NULL, NULL, RB_RED },
+ { 2, NULL, TN( 1 ), TN( 9 ), RB_BLACK },
+ { 2, TN( 9 ), NULL, NULL, RB_BLACK },
+ { 4, TN( 5 ), TN( 4 ), TN( 11 ), RB_RED },
+ { 5, TN( 9 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_13[] = {
+ { 0, TN( 1 ), NULL, NULL, RB_RED },
+ { 1, TN( 3 ), TN( 0 ), NULL, RB_BLACK },
+ { 3, TN( 8 ), TN( 1 ), TN( 5 ), RB_RED },
+ { 4, TN( 5 ), NULL, NULL, RB_RED },
+ { 5, TN( 3 ), TN( 4 ), TN( 6 ), RB_BLACK },
+ { 6, TN( 5 ), NULL, NULL, RB_RED },
+ { 8, NULL, TN( 3 ), TN( 11 ), RB_BLACK },
+ { 10, TN( 11 ), NULL, NULL, RB_RED },
+ { 11, TN( 8 ), TN( 10 ), NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_13[] = {
+ { 0, TN( 0 ), NULL, NULL, RB_RED },
+ { 0, TN( 3 ), TN( 1 ), NULL, RB_BLACK },
+ { 1, TN( 6 ), TN( 0 ), TN( 4 ), RB_RED },
+ { 2, TN( 3 ), NULL, TN( 5 ), RB_BLACK },
+ { 2, TN( 4 ), NULL, NULL, RB_RED },
+ { 3, NULL, TN( 3 ), TN( 11 ), RB_BLACK },
+ { 4, TN( 11 ), NULL, NULL, RB_RED },
+ { 5, TN( 6 ), TN( 8 ), TN( 10 ), RB_BLACK },
+ { 5, TN( 11 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_unique_14[] = {
+ { 3, TN( 5 ), NULL, NULL, RB_RED },
+ { 5, TN( 6 ), TN( 3 ), NULL, RB_BLACK },
+ { 6, NULL, TN( 5 ), TN( 12 ), RB_BLACK },
+ { 8, TN( 12 ), NULL, NULL, RB_BLACK },
+ { 12, TN( 6 ), TN( 8 ), TN( 13 ), RB_RED },
+ { 13, TN( 12 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_14[] = {
+ { 1, TN( 5 ), NULL, NULL, RB_RED },
+ { 2, TN( 6 ), TN( 3 ), NULL, RB_BLACK },
+ { 3, NULL, TN( 5 ), TN( 13 ), RB_BLACK },
+ { 4, TN( 13 ), NULL, NULL, RB_BLACK },
+ { 6, TN( 6 ), TN( 8 ), TN( 12 ), RB_RED },
+ { 6, TN( 13 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_15[] = {
+ { 0, TN( 2 ), NULL, NULL, RB_RED },
+ { 2, TN( 8 ), TN( 0 ), TN( 7 ), RB_BLACK },
+ { 7, TN( 2 ), NULL, NULL, RB_RED },
+ { 8, NULL, TN( 2 ), TN( 12 ), RB_BLACK },
+ { 9, TN( 12 ), NULL, TN( 10 ), RB_BLACK },
+ { 10, TN( 9 ), NULL, NULL, RB_RED },
+ { 12, TN( 8 ), TN( 9 ), TN( 13 ), RB_RED },
+ { 13, TN( 12 ), NULL, TN( 14 ), RB_BLACK },
+ { 14, TN( 13 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_15[] = {
+ { 0, TN( 2 ), NULL, NULL, RB_RED },
+ { 1, TN( 9 ), TN( 0 ), TN( 7 ), RB_BLACK },
+ { 3, TN( 2 ), NULL, NULL, RB_RED },
+ { 4, NULL, TN( 2 ), TN( 10 ), RB_BLACK },
+ { 4, TN( 10 ), NULL, NULL, RB_BLACK },
+ { 5, TN( 9 ), TN( 8 ), TN( 12 ), RB_RED },
+ { 6, TN( 12 ), NULL, NULL, RB_RED },
+ { 6, TN( 10 ), TN( 13 ), TN( 14 ), RB_BLACK },
+ { 7, TN( 12 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_unique_16[] = {
+ { 0, TN( 5 ), NULL, TN( 3 ), RB_BLACK },
+ { 3, TN( 0 ), NULL, NULL, RB_RED },
+ { 5, TN( 10 ), TN( 0 ), TN( 7 ), RB_RED },
+ { 7, TN( 5 ), NULL, NULL, RB_BLACK },
+ { 10, NULL, TN( 5 ), TN( 12 ), RB_BLACK },
+ { 12, TN( 10 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_16[] = {
+ { 0, TN( 5 ), NULL, TN( 3 ), RB_BLACK },
+ { 1, TN( 0 ), NULL, NULL, RB_RED },
+ { 2, TN( 10 ), TN( 0 ), TN( 7 ), RB_RED },
+ { 3, TN( 5 ), NULL, NULL, RB_BLACK },
+ { 5, NULL, TN( 5 ), TN( 12 ), RB_BLACK },
+ { 6, TN( 10 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_17[] = {
+ { 0, TN( 1 ), NULL, NULL, RB_RED },
+ { 1, TN( 3 ), TN( 0 ), NULL, RB_BLACK },
+ { 3, TN( 7 ), TN( 1 ), TN( 5 ), RB_RED },
+ { 4, TN( 5 ), NULL, NULL, RB_RED },
+ { 5, TN( 3 ), TN( 4 ), NULL, RB_BLACK },
+ { 7, NULL, TN( 3 ), TN( 9 ), RB_BLACK },
+ { 8, TN( 9 ), NULL, NULL, RB_BLACK },
+ { 9, TN( 7 ), TN( 8 ), TN( 16 ), RB_RED },
+ { 16, TN( 9 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_17[] = {
+ { 0, TN( 0 ), NULL, NULL, RB_RED },
+ { 0, TN( 3 ), TN( 1 ), NULL, RB_BLACK },
+ { 1, TN( 7 ), TN( 0 ), TN( 5 ), RB_RED },
+ { 2, TN( 3 ), NULL, TN( 4 ), RB_BLACK },
+ { 2, TN( 5 ), NULL, NULL, RB_RED },
+ { 3, NULL, TN( 3 ), TN( 8 ), RB_BLACK },
+ { 4, TN( 8 ), NULL, NULL, RB_BLACK },
+ { 4, TN( 7 ), TN( 9 ), TN( 16 ), RB_RED },
+ { 8, TN( 8 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_18[] = {
+ { 0, TN( 2 ), NULL, TN( 1 ), RB_BLACK },
+ { 1, TN( 0 ), NULL, NULL, RB_RED },
+ { 2, TN( 4 ), TN( 0 ), TN( 3 ), RB_BLACK },
+ { 3, TN( 2 ), NULL, NULL, RB_BLACK },
+ { 4, NULL, TN( 2 ), TN( 12 ), RB_BLACK },
+ { 5, TN( 6 ), NULL, NULL, RB_RED },
+ { 6, TN( 8 ), TN( 5 ), TN( 7 ), RB_BLACK },
+ { 7, TN( 6 ), NULL, NULL, RB_RED },
+ { 8, TN( 12 ), TN( 6 ), TN( 10 ), RB_RED },
+ { 9, TN( 10 ), NULL, NULL, RB_RED },
+ { 10, TN( 8 ), TN( 9 ), NULL, RB_BLACK },
+ { 12, TN( 4 ), TN( 8 ), TN( 17 ), RB_BLACK },
+ { 14, TN( 17 ), NULL, NULL, RB_RED },
+ { 17, TN( 12 ), TN( 14 ), NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_18[] = {
+ { 0, TN( 3 ), NULL, TN( 1 ), RB_BLACK },
+ { 0, TN( 0 ), NULL, NULL, RB_RED },
+ { 1, TN( 4 ), TN( 0 ), TN( 2 ), RB_BLACK },
+ { 1, TN( 3 ), NULL, NULL, RB_BLACK },
+ { 2, NULL, TN( 3 ), TN( 12 ), RB_BLACK },
+ { 2, TN( 6 ), NULL, NULL, RB_RED },
+ { 3, TN( 8 ), TN( 5 ), TN( 7 ), RB_BLACK },
+ { 3, TN( 6 ), NULL, NULL, RB_RED },
+ { 4, TN( 12 ), TN( 6 ), TN( 10 ), RB_RED },
+ { 4, TN( 10 ), NULL, NULL, RB_RED },
+ { 5, TN( 8 ), TN( 9 ), NULL, RB_BLACK },
+ { 6, TN( 4 ), TN( 8 ), TN( 14 ), RB_BLACK },
+ { 7, TN( 12 ), NULL, TN( 17 ), RB_BLACK },
+ { 8, TN( 14 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_unique_19[] = {
+ { 1, TN( 2 ), NULL, NULL, RB_RED },
+ { 2, TN( 6 ), TN( 1 ), NULL, RB_BLACK },
+ { 6, TN( 11 ), TN( 2 ), TN( 8 ), RB_BLACK },
+ { 8, TN( 6 ), NULL, TN( 9 ), RB_BLACK },
+ { 9, TN( 8 ), NULL, NULL, RB_RED },
+ { 11, NULL, TN( 6 ), TN( 14 ), RB_BLACK },
+ { 12, TN( 14 ), NULL, NULL, RB_BLACK },
+ { 14, TN( 11 ), TN( 12 ), TN( 16 ), RB_BLACK },
+ { 16, TN( 14 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_19[] = {
+ { 0, TN( 2 ), NULL, NULL, RB_RED },
+ { 1, TN( 6 ), TN( 1 ), NULL, RB_BLACK },
+ { 3, TN( 11 ), TN( 2 ), TN( 9 ), RB_BLACK },
+ { 4, TN( 6 ), NULL, TN( 8 ), RB_BLACK },
+ { 4, TN( 9 ), NULL, NULL, RB_RED },
+ { 5, NULL, TN( 6 ), TN( 14 ), RB_BLACK },
+ { 6, TN( 14 ), NULL, NULL, RB_BLACK },
+ { 7, TN( 11 ), TN( 12 ), TN( 16 ), RB_BLACK },
+ { 8, TN( 14 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_20[] = {
+ { 0, TN( 3 ), NULL, TN( 1 ), RB_BLACK },
+ { 1, TN( 0 ), NULL, NULL, RB_RED },
+ { 3, TN( 9 ), TN( 0 ), TN( 7 ), RB_BLACK },
+ { 4, TN( 7 ), NULL, NULL, RB_RED },
+ { 7, TN( 3 ), TN( 4 ), NULL, RB_BLACK },
+ { 9, NULL, TN( 3 ), TN( 12 ), RB_BLACK },
+ { 10, TN( 12 ), NULL, NULL, RB_BLACK },
+ { 12, TN( 9 ), TN( 10 ), TN( 17 ), RB_BLACK },
+ { 14, TN( 17 ), NULL, NULL, RB_BLACK },
+ { 17, TN( 12 ), TN( 14 ), TN( 18 ), RB_RED },
+ { 18, TN( 17 ), NULL, TN( 19 ), RB_BLACK },
+ { 19, TN( 18 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_20[] = {
+ { 0, TN( 3 ), NULL, TN( 1 ), RB_BLACK },
+ { 0, TN( 0 ), NULL, NULL, RB_RED },
+ { 1, TN( 9 ), TN( 0 ), TN( 7 ), RB_BLACK },
+ { 2, TN( 7 ), NULL, NULL, RB_RED },
+ { 3, TN( 3 ), TN( 4 ), NULL, RB_BLACK },
+ { 4, NULL, TN( 3 ), TN( 14 ), RB_BLACK },
+ { 5, TN( 14 ), NULL, TN( 12 ), RB_BLACK },
+ { 6, TN( 10 ), NULL, NULL, RB_RED },
+ { 7, TN( 9 ), TN( 10 ), TN( 18 ), RB_BLACK },
+ { 8, TN( 18 ), NULL, NULL, RB_RED },
+ { 9, TN( 14 ), TN( 17 ), TN( 19 ), RB_BLACK },
+ { 9, TN( 18 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_unique_21[] = {
+ { 0, TN( 3 ), NULL, TN( 1 ), RB_BLACK },
+ { 1, TN( 0 ), NULL, NULL, RB_RED },
+ { 3, TN( 11 ), TN( 0 ), TN( 5 ), RB_BLACK },
+ { 4, TN( 5 ), NULL, NULL, RB_BLACK },
+ { 5, TN( 3 ), TN( 4 ), TN( 8 ), RB_RED },
+ { 8, TN( 5 ), NULL, NULL, RB_BLACK },
+ { 11, NULL, TN( 3 ), TN( 15 ), RB_BLACK },
+ { 13, TN( 15 ), NULL, NULL, RB_BLACK },
+ { 15, TN( 11 ), TN( 13 ), TN( 17 ), RB_BLACK },
+ { 16, TN( 17 ), NULL, NULL, RB_RED },
+ { 17, TN( 15 ), TN( 16 ), NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_21[] = {
+ { 0, TN( 3 ), NULL, TN( 1 ), RB_BLACK },
+ { 0, TN( 0 ), NULL, NULL, RB_RED },
+ { 1, TN( 8 ), TN( 0 ), TN( 4 ), RB_BLACK },
+ { 2, TN( 3 ), NULL, TN( 5 ), RB_BLACK },
+ { 2, TN( 4 ), NULL, NULL, RB_RED },
+ { 4, NULL, TN( 3 ), TN( 13 ), RB_BLACK },
+ { 5, TN( 13 ), NULL, NULL, RB_BLACK },
+ { 6, TN( 8 ), TN( 11 ), TN( 17 ), RB_BLACK },
+ { 7, TN( 17 ), NULL, NULL, RB_BLACK },
+ { 8, TN( 13 ), TN( 15 ), TN( 16 ), RB_RED },
+ { 8, TN( 17 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_22[] = {
+ { 1, TN( 3 ), NULL, TN( 2 ), RB_BLACK },
+ { 2, TN( 1 ), NULL, NULL, RB_RED },
+ { 3, TN( 8 ), TN( 1 ), TN( 7 ), RB_BLACK },
+ { 4, TN( 7 ), NULL, NULL, RB_RED },
+ { 7, TN( 3 ), TN( 4 ), NULL, RB_BLACK },
+ { 8, NULL, TN( 3 ), TN( 14 ), RB_BLACK },
+ { 10, TN( 11 ), NULL, NULL, RB_RED },
+ { 11, TN( 14 ), TN( 10 ), NULL, RB_BLACK },
+ { 14, TN( 8 ), TN( 11 ), TN( 18 ), RB_BLACK },
+ { 15, TN( 18 ), NULL, NULL, RB_BLACK },
+ { 18, TN( 14 ), TN( 15 ), TN( 21 ), RB_RED },
+ { 21, TN( 18 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_22[] = {
+ { 0, TN( 3 ), NULL, NULL, RB_BLACK },
+ { 1, TN( 8 ), TN( 1 ), TN( 4 ), RB_BLACK },
+ { 1, TN( 4 ), NULL, NULL, RB_BLACK },
+ { 2, TN( 3 ), TN( 2 ), TN( 7 ), RB_RED },
+ { 3, TN( 4 ), NULL, NULL, RB_BLACK },
+ { 4, NULL, TN( 3 ), TN( 14 ), RB_BLACK },
+ { 5, TN( 14 ), NULL, TN( 10 ), RB_BLACK },
+ { 5, TN( 11 ), NULL, NULL, RB_RED },
+ { 7, TN( 8 ), TN( 11 ), TN( 18 ), RB_BLACK },
+ { 7, TN( 18 ), NULL, NULL, RB_BLACK },
+ { 9, TN( 14 ), TN( 15 ), TN( 21 ), RB_RED },
+ { 10, TN( 18 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_23[] = {
+ { 0, TN( 2 ), NULL, NULL, RB_RED },
+ { 2, TN( 8 ), TN( 0 ), TN( 7 ), RB_BLACK },
+ { 7, TN( 2 ), NULL, NULL, RB_RED },
+ { 8, TN( 12 ), TN( 2 ), TN( 11 ), RB_BLACK },
+ { 11, TN( 8 ), NULL, NULL, RB_BLACK },
+ { 12, NULL, TN( 8 ), TN( 17 ), RB_BLACK },
+ { 13, TN( 15 ), NULL, TN( 14 ), RB_BLACK },
+ { 14, TN( 13 ), NULL, NULL, RB_RED },
+ { 15, TN( 17 ), TN( 13 ), TN( 16 ), RB_RED },
+ { 16, TN( 15 ), NULL, NULL, RB_BLACK },
+ { 17, TN( 12 ), TN( 15 ), TN( 20 ), RB_BLACK },
+ { 20, TN( 17 ), NULL, TN( 21 ), RB_BLACK },
+ { 21, TN( 20 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_23[] = {
+ { 0, TN( 2 ), NULL, NULL, RB_RED },
+ { 1, TN( 8 ), TN( 0 ), TN( 7 ), RB_BLACK },
+ { 3, TN( 2 ), NULL, NULL, RB_RED },
+ { 4, TN( 12 ), TN( 2 ), TN( 11 ), RB_BLACK },
+ { 5, TN( 8 ), NULL, NULL, RB_BLACK },
+ { 6, NULL, TN( 8 ), TN( 17 ), RB_BLACK },
+ { 6, TN( 15 ), NULL, NULL, RB_BLACK },
+ { 7, TN( 17 ), TN( 13 ), TN( 16 ), RB_RED },
+ { 7, TN( 16 ), NULL, NULL, RB_RED },
+ { 8, TN( 15 ), TN( 14 ), NULL, RB_BLACK },
+ { 8, TN( 12 ), TN( 15 ), TN( 20 ), RB_BLACK },
+ { 10, TN( 17 ), NULL, TN( 21 ), RB_BLACK },
+ { 10, TN( 20 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_unique_24[] = {
+ { 4, TN( 6 ), NULL, TN( 5 ), RB_BLACK },
+ { 5, TN( 4 ), NULL, NULL, RB_RED },
+ { 6, TN( 14 ), TN( 4 ), TN( 10 ), RB_BLACK },
+ { 8, TN( 10 ), NULL, NULL, RB_RED },
+ { 10, TN( 6 ), TN( 8 ), NULL, RB_BLACK },
+ { 14, NULL, TN( 6 ), TN( 20 ), RB_BLACK },
+ { 15, TN( 16 ), NULL, NULL, RB_RED },
+ { 16, TN( 20 ), TN( 15 ), NULL, RB_BLACK },
+ { 20, TN( 14 ), TN( 16 ), TN( 22 ), RB_BLACK },
+ { 22, TN( 20 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_24[] = {
+ { 2, TN( 6 ), NULL, TN( 5 ), RB_BLACK },
+ { 2, TN( 4 ), NULL, NULL, RB_RED },
+ { 3, TN( 14 ), TN( 4 ), TN( 10 ), RB_BLACK },
+ { 4, TN( 10 ), NULL, NULL, RB_RED },
+ { 5, TN( 6 ), TN( 8 ), NULL, RB_BLACK },
+ { 7, NULL, TN( 6 ), TN( 20 ), RB_BLACK },
+ { 7, TN( 16 ), NULL, NULL, RB_RED },
+ { 8, TN( 20 ), TN( 15 ), NULL, RB_BLACK },
+ { 10, TN( 14 ), TN( 16 ), TN( 22 ), RB_BLACK },
+ { 11, TN( 20 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_25[] = {
+ { 0, TN( 1 ), NULL, NULL, RB_RED },
+ { 1, TN( 3 ), TN( 0 ), NULL, RB_BLACK },
+ { 3, TN( 13 ), TN( 1 ), TN( 5 ), RB_BLACK },
+ { 4, TN( 5 ), NULL, NULL, RB_BLACK },
+ { 5, TN( 3 ), TN( 4 ), TN( 6 ), RB_RED },
+ { 6, TN( 5 ), NULL, TN( 9 ), RB_BLACK },
+ { 9, TN( 6 ), NULL, NULL, RB_RED },
+ { 13, NULL, TN( 3 ), TN( 19 ), RB_BLACK },
+ { 14, TN( 15 ), NULL, NULL, RB_RED },
+ { 15, TN( 16 ), TN( 14 ), NULL, RB_BLACK },
+ { 16, TN( 19 ), TN( 15 ), TN( 17 ), RB_RED },
+ { 17, TN( 16 ), NULL, NULL, RB_BLACK },
+ { 19, TN( 13 ), TN( 16 ), TN( 23 ), RB_BLACK },
+ { 23, TN( 19 ), NULL, TN( 24 ), RB_BLACK },
+ { 24, TN( 23 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_25[] = {
+ { 0, TN( 3 ), NULL, TN( 1 ), RB_BLACK },
+ { 0, TN( 0 ), NULL, NULL, RB_RED },
+ { 1, TN( 13 ), TN( 0 ), TN( 4 ), RB_BLACK },
+ { 2, TN( 4 ), NULL, NULL, RB_BLACK },
+ { 2, TN( 3 ), TN( 5 ), TN( 6 ), RB_RED },
+ { 3, TN( 4 ), NULL, TN( 9 ), RB_BLACK },
+ { 4, TN( 6 ), NULL, NULL, RB_RED },
+ { 6, NULL, TN( 3 ), TN( 19 ), RB_BLACK },
+ { 7, TN( 17 ), NULL, TN( 14 ), RB_BLACK },
+ { 7, TN( 15 ), NULL, NULL, RB_RED },
+ { 8, TN( 19 ), TN( 15 ), TN( 16 ), RB_RED },
+ { 8, TN( 17 ), NULL, NULL, RB_BLACK },
+ { 9, TN( 13 ), TN( 17 ), TN( 23 ), RB_BLACK },
+ { 11, TN( 19 ), NULL, TN( 24 ), RB_BLACK },
+ { 12, TN( 23 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_unique_26[] = {
+ { 0, TN( 1 ), NULL, NULL, RB_RED },
+ { 1, TN( 3 ), TN( 0 ), NULL, RB_BLACK },
+ { 3, TN( 11 ), TN( 1 ), TN( 9 ), RB_BLACK },
+ { 6, TN( 9 ), NULL, NULL, RB_RED },
+ { 9, TN( 3 ), TN( 6 ), TN( 10 ), RB_BLACK },
+ { 10, TN( 9 ), NULL, NULL, RB_RED },
+ { 11, NULL, TN( 3 ), TN( 14 ), RB_BLACK },
+ { 12, TN( 14 ), NULL, TN( 13 ), RB_BLACK },
+ { 13, TN( 12 ), NULL, NULL, RB_RED },
+ { 14, TN( 11 ), TN( 12 ), TN( 20 ), RB_BLACK },
+ { 18, TN( 20 ), NULL, NULL, RB_BLACK },
+ { 20, TN( 14 ), TN( 18 ), TN( 23 ), RB_RED },
+ { 21, TN( 23 ), NULL, NULL, RB_RED },
+ { 23, TN( 20 ), TN( 21 ), NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_26[] = {
+ { 0, TN( 3 ), NULL, TN( 0 ), RB_BLACK },
+ { 0, TN( 1 ), NULL, NULL, RB_RED },
+ { 1, TN( 9 ), TN( 1 ), TN( 6 ), RB_BLACK },
+ { 3, TN( 3 ), NULL, NULL, RB_BLACK },
+ { 4, NULL, TN( 3 ), TN( 14 ), RB_BLACK },
+ { 5, TN( 12 ), NULL, TN( 10 ), RB_BLACK },
+ { 5, TN( 11 ), NULL, NULL, RB_RED },
+ { 6, TN( 14 ), TN( 11 ), TN( 13 ), RB_RED },
+ { 6, TN( 12 ), NULL, NULL, RB_BLACK },
+ { 7, TN( 9 ), TN( 12 ), TN( 20 ), RB_BLACK },
+ { 9, TN( 20 ), NULL, NULL, RB_BLACK },
+ { 10, TN( 14 ), TN( 18 ), TN( 23 ), RB_RED },
+ { 10, TN( 23 ), NULL, NULL, RB_RED },
+ { 11, TN( 20 ), TN( 21 ), NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_27[] = {
+ { 3, TN( 8 ), NULL, NULL, RB_BLACK },
+ { 8, TN( 19 ), TN( 3 ), TN( 17 ), RB_BLACK },
+ { 12, TN( 17 ), NULL, NULL, RB_RED },
+ { 17, TN( 8 ), TN( 12 ), NULL, RB_BLACK },
+ { 19, NULL, TN( 8 ), TN( 24 ), RB_BLACK },
+ { 20, TN( 21 ), NULL, NULL, RB_RED },
+ { 21, TN( 24 ), TN( 20 ), TN( 23 ), RB_BLACK },
+ { 23, TN( 21 ), NULL, NULL, RB_RED },
+ { 24, TN( 19 ), TN( 21 ), TN( 25 ), RB_BLACK },
+ { 25, TN( 24 ), NULL, TN( 26 ), RB_BLACK },
+ { 26, TN( 25 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_27[] = {
+ { 1, TN( 8 ), NULL, NULL, RB_BLACK },
+ { 4, TN( 19 ), TN( 3 ), TN( 17 ), RB_BLACK },
+ { 6, TN( 17 ), NULL, NULL, RB_RED },
+ { 8, TN( 8 ), TN( 12 ), NULL, RB_BLACK },
+ { 9, NULL, TN( 8 ), TN( 25 ), RB_BLACK },
+ { 10, TN( 21 ), NULL, NULL, RB_RED },
+ { 10, TN( 25 ), TN( 20 ), TN( 23 ), RB_BLACK },
+ { 11, TN( 21 ), NULL, NULL, RB_RED },
+ { 12, TN( 19 ), TN( 21 ), TN( 24 ), RB_BLACK },
+ { 12, TN( 25 ), NULL, TN( 26 ), RB_BLACK },
+ { 13, TN( 24 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_unique_28[] = {
+ { 0, TN( 5 ), NULL, NULL, RB_BLACK },
+ { 5, TN( 13 ), TN( 0 ), TN( 7 ), RB_RED },
+ { 7, TN( 5 ), NULL, NULL, RB_BLACK },
+ { 13, NULL, TN( 5 ), TN( 17 ), RB_BLACK },
+ { 15, TN( 17 ), NULL, NULL, RB_BLACK },
+ { 17, TN( 13 ), TN( 15 ), TN( 26 ), RB_RED },
+ { 21, TN( 26 ), NULL, NULL, RB_RED },
+ { 26, TN( 17 ), TN( 21 ), NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_28[] = {
+ { 0, TN( 5 ), NULL, NULL, RB_BLACK },
+ { 2, TN( 13 ), TN( 0 ), TN( 7 ), RB_RED },
+ { 3, TN( 5 ), NULL, NULL, RB_BLACK },
+ { 6, NULL, TN( 5 ), TN( 17 ), RB_BLACK },
+ { 7, TN( 17 ), NULL, NULL, RB_BLACK },
+ { 8, TN( 13 ), TN( 15 ), TN( 26 ), RB_RED },
+ { 10, TN( 26 ), NULL, NULL, RB_RED },
+ { 13, TN( 17 ), TN( 21 ), NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_unique_29[] = {
+ { 0, TN( 3 ), NULL, TN( 1 ), RB_BLACK },
+ { 1, TN( 0 ), NULL, NULL, RB_RED },
+ { 3, TN( 12 ), TN( 0 ), TN( 6 ), RB_BLACK },
+ { 4, TN( 6 ), NULL, NULL, RB_BLACK },
+ { 6, TN( 3 ), TN( 4 ), TN( 8 ), RB_RED },
+ { 7, TN( 8 ), NULL, NULL, RB_RED },
+ { 8, TN( 6 ), TN( 7 ), TN( 11 ), RB_BLACK },
+ { 11, TN( 8 ), NULL, NULL, RB_RED },
+ { 12, NULL, TN( 3 ), TN( 17 ), RB_BLACK },
+ { 13, TN( 17 ), NULL, TN( 14 ), RB_BLACK },
+ { 14, TN( 13 ), NULL, NULL, RB_RED },
+ { 17, TN( 12 ), TN( 13 ), TN( 25 ), RB_BLACK },
+ { 22, TN( 25 ), NULL, NULL, RB_RED },
+ { 25, TN( 17 ), TN( 22 ), TN( 27 ), RB_BLACK },
+ { 27, TN( 25 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_29[] = {
+ { 0, TN( 3 ), NULL, TN( 1 ), RB_BLACK },
+ { 0, TN( 0 ), NULL, NULL, RB_RED },
+ { 1, TN( 11 ), TN( 0 ), TN( 6 ), RB_BLACK },
+ { 2, TN( 6 ), NULL, NULL, RB_BLACK },
+ { 3, TN( 3 ), TN( 4 ), TN( 7 ), RB_RED },
+ { 3, TN( 6 ), NULL, TN( 8 ), RB_BLACK },
+ { 4, TN( 7 ), NULL, NULL, RB_RED },
+ { 5, NULL, TN( 3 ), TN( 22 ), RB_BLACK },
+ { 6, TN( 12 ), NULL, NULL, RB_BLACK },
+ { 6, TN( 22 ), TN( 13 ), TN( 17 ), RB_RED },
+ { 7, TN( 17 ), NULL, NULL, RB_RED },
+ { 8, TN( 12 ), TN( 14 ), NULL, RB_BLACK },
+ { 11, TN( 11 ), TN( 12 ), TN( 25 ), RB_BLACK },
+ { 12, TN( 22 ), NULL, TN( 27 ), RB_BLACK },
+ { 13, TN( 25 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_unique_30[] = {
+ { 0, TN( 4 ), NULL, NULL, RB_RED },
+ { 4, TN( 6 ), TN( 0 ), NULL, RB_BLACK },
+ { 6, TN( 13 ), TN( 4 ), TN( 9 ), RB_RED },
+ { 8, TN( 9 ), NULL, NULL, RB_RED },
+ { 9, TN( 6 ), TN( 8 ), TN( 12 ), RB_BLACK },
+ { 12, TN( 9 ), NULL, NULL, RB_RED },
+ { 13, NULL, TN( 6 ), TN( 18 ), RB_BLACK },
+ { 14, TN( 16 ), NULL, NULL, RB_RED },
+ { 16, TN( 18 ), TN( 14 ), TN( 17 ), RB_BLACK },
+ { 17, TN( 16 ), NULL, NULL, RB_RED },
+ { 18, TN( 13 ), TN( 16 ), TN( 27 ), RB_RED },
+ { 20, TN( 27 ), NULL, NULL, RB_RED },
+ { 27, TN( 18 ), TN( 20 ), TN( 28 ), RB_BLACK },
+ { 28, TN( 27 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_30[] = {
+ { 0, TN( 4 ), NULL, NULL, RB_BLACK },
+ { 2, TN( 13 ), TN( 0 ), TN( 9 ), RB_RED },
+ { 3, TN( 9 ), NULL, NULL, RB_RED },
+ { 4, TN( 4 ), TN( 6 ), TN( 8 ), RB_BLACK },
+ { 4, TN( 9 ), NULL, NULL, RB_RED },
+ { 6, TN( 14 ), TN( 4 ), TN( 12 ), RB_BLACK },
+ { 6, TN( 13 ), NULL, NULL, RB_BLACK },
+ { 7, NULL, TN( 13 ), TN( 18 ), RB_BLACK },
+ { 8, TN( 18 ), NULL, TN( 16 ), RB_BLACK },
+ { 8, TN( 17 ), NULL, NULL, RB_RED },
+ { 9, TN( 14 ), TN( 17 ), TN( 27 ), RB_BLACK },
+ { 10, TN( 27 ), NULL, NULL, RB_RED },
+ { 13, TN( 18 ), TN( 20 ), TN( 28 ), RB_BLACK },
+ { 14, TN( 27 ), NULL, NULL, RB_RED }
+};
+
+static const TestNodeDescription random_ops_tree_unique_31[] = {
+ { 0, TN( 2 ), NULL, NULL, RB_RED },
+ { 2, TN( 5 ), TN( 0 ), NULL, RB_BLACK },
+ { 5, TN( 11 ), TN( 2 ), TN( 9 ), RB_BLACK },
+ { 7, TN( 9 ), NULL, NULL, RB_RED },
+ { 9, TN( 5 ), TN( 7 ), NULL, RB_BLACK },
+ { 11, NULL, TN( 5 ), TN( 21 ), RB_BLACK },
+ { 14, TN( 16 ), NULL, NULL, RB_RED },
+ { 16, TN( 21 ), TN( 14 ), TN( 18 ), RB_BLACK },
+ { 18, TN( 16 ), NULL, NULL, RB_RED },
+ { 21, TN( 11 ), TN( 16 ), TN( 30 ), RB_BLACK },
+ { 30, TN( 21 ), NULL, NULL, RB_BLACK }
+};
+
+static const TestNodeDescription random_ops_tree_multiple_31[] = {
+ { 0, TN( 2 ), NULL, NULL, RB_RED },
+ { 1, TN( 5 ), TN( 0 ), NULL, RB_BLACK },
+ { 2, TN( 11 ), TN( 2 ), TN( 9 ), RB_BLACK },
+ { 3, TN( 9 ), NULL, NULL, RB_RED },
+ { 4, TN( 5 ), TN( 7 ), NULL, RB_BLACK },
+ { 5, NULL, TN( 5 ), TN( 21 ), RB_BLACK },
+ { 7, TN( 16 ), NULL, NULL, RB_RED },
+ { 8, TN( 21 ), TN( 14 ), TN( 18 ), RB_BLACK },
+ { 9, TN( 16 ), NULL, NULL, RB_RED },
+ { 10, TN( 11 ), TN( 16 ), TN( 30 ), RB_BLACK },
+ { 15, TN( 21 ), NULL, NULL, RB_BLACK }
+};
+
+#define RANDOM_OPS_TREE( i ) \
+ { &random_ops_tree_multiple_##i[ 0 ], &random_ops_tree_unique_##i[ 0 ] }
+
+static const TestNodeDescription *const random_ops_trees[][2] = {
+ RANDOM_OPS_TREE( 1 ),
+ RANDOM_OPS_TREE( 2 ),
+ RANDOM_OPS_TREE( 3 ),
+ RANDOM_OPS_TREE( 4 ),
+ RANDOM_OPS_TREE( 5 ),
+ RANDOM_OPS_TREE( 6 ),
+ RANDOM_OPS_TREE( 7 ),
+ RANDOM_OPS_TREE( 8 ),
+ RANDOM_OPS_TREE( 9 ),
+ RANDOM_OPS_TREE( 10 ),
+ RANDOM_OPS_TREE( 11 ),
+ RANDOM_OPS_TREE( 12 ),
+ RANDOM_OPS_TREE( 13 ),
+ RANDOM_OPS_TREE( 14 ),
+ RANDOM_OPS_TREE( 15 ),
+ RANDOM_OPS_TREE( 16 ),
+ RANDOM_OPS_TREE( 17 ),
+ RANDOM_OPS_TREE( 18 ),
+ RANDOM_OPS_TREE( 19 ),
+ RANDOM_OPS_TREE( 20 ),
+ RANDOM_OPS_TREE( 21 ),
+ RANDOM_OPS_TREE( 22 ),
+ RANDOM_OPS_TREE( 23 ),
+ RANDOM_OPS_TREE( 24 ),
+ RANDOM_OPS_TREE( 25 ),
+ RANDOM_OPS_TREE( 26 ),
+ RANDOM_OPS_TREE( 27 ),
+ RANDOM_OPS_TREE( 28 ),
+ RANDOM_OPS_TREE( 29 ),
+ RANDOM_OPS_TREE( 30 ),
+ RANDOM_OPS_TREE( 31 )
+};
+
+#define RANDOM_OPS_TREE_COUNT( i ) \
+ { \
+ RTEMS_ARRAY_SIZE( random_ops_tree_multiple_##i ), \
+ RTEMS_ARRAY_SIZE( random_ops_tree_unique_##i ) \
+ }
+
+static const size_t random_ops_tree_counts[][2] = {
+ RANDOM_OPS_TREE_COUNT( 1 ),
+ RANDOM_OPS_TREE_COUNT( 2 ),
+ RANDOM_OPS_TREE_COUNT( 3 ),
+ RANDOM_OPS_TREE_COUNT( 4 ),
+ RANDOM_OPS_TREE_COUNT( 5 ),
+ RANDOM_OPS_TREE_COUNT( 6 ),
+ RANDOM_OPS_TREE_COUNT( 7 ),
+ RANDOM_OPS_TREE_COUNT( 8 ),
+ RANDOM_OPS_TREE_COUNT( 9 ),
+ RANDOM_OPS_TREE_COUNT( 10 ),
+ RANDOM_OPS_TREE_COUNT( 11 ),
+ RANDOM_OPS_TREE_COUNT( 12 ),
+ RANDOM_OPS_TREE_COUNT( 13 ),
+ RANDOM_OPS_TREE_COUNT( 14 ),
+ RANDOM_OPS_TREE_COUNT( 15 ),
+ RANDOM_OPS_TREE_COUNT( 16 ),
+ RANDOM_OPS_TREE_COUNT( 17 ),
+ RANDOM_OPS_TREE_COUNT( 18 ),
+ RANDOM_OPS_TREE_COUNT( 19 ),
+ RANDOM_OPS_TREE_COUNT( 20 ),
+ RANDOM_OPS_TREE_COUNT( 21 ),
+ RANDOM_OPS_TREE_COUNT( 22 ),
+ RANDOM_OPS_TREE_COUNT( 23 ),
+ RANDOM_OPS_TREE_COUNT( 24 ),
+ RANDOM_OPS_TREE_COUNT( 25 ),
+ RANDOM_OPS_TREE_COUNT( 26 ),
+ RANDOM_OPS_TREE_COUNT( 27 ),
+ RANDOM_OPS_TREE_COUNT( 28 ),
+ RANDOM_OPS_TREE_COUNT( 29 ),
+ RANDOM_OPS_TREE_COUNT( 30 ),
+ RANDOM_OPS_TREE_COUNT( 31 )
+};
+
+static uint32_t SimpleRandom( uint32_t v )
+{
+ v *= 1664525;
+ v += 1013904223;
+
+ return v;
+}
+
+static void RandomOps( size_t n, bool unique )
+{
+ VisitorContext ctx = {
+ .current = 0,
+ .count = random_ops_tree_counts[ n - 1 ][ unique ],
+ .tree = random_ops_trees[ n - 1 ][ unique ]
+ };
+ RBTree_Control tree;
+ TestNode *nodes;
+ size_t m;
+ size_t s;
+ uint32_t v;
+ size_t i;
+
+ nodes = &node_array[ 0 ];
+ m = n * n * n;
+ s = unique ? 1 : 2;
+ v = 0xdeadbeef;
+ _RBTree_Initialize_empty( &tree );
+
+ memset( nodes, 0, n * sizeof( *nodes ) );
+
+ for ( i = 0; i < n; ++i ) {
+ nodes[ i ].key = (int) ( i / s );
+ }
+
+ for ( i = 0; i < m; ++i ) {
+ size_t j = ( v >> 13 ) % n;
+ TestNode *tn = &nodes[ j ];
+
+ if ( tn->id == 0 ) {
+ tn->id = 1;
+ _RBTree_Initialize_node( &tn->Node );
+ _RBTree_Insert_inline( &tree, &tn->Node, &tn->key, Less );
+ } else {
+ tn->id = 0;
+ _RBTree_Extract( &tree, &tn->Node );
+ }
+
+ T_ne_int( VerifyTree( _RBTree_Root( &tree ) ), -1 );
+
+ v = SimpleRandom( v );
+ }
+
+ _RBTree_Iterate( &tree, VisitNodes, &ctx );
+ T_true( ctx.current == ctx.count );
+}
+
+/**
+ * @brief Call _RBTree_Initialize_one() and check the tree properties.
+ */
+static void ScoreRbtreeUnitRbtree_Action_0( void )
+{
+ RBTree_Control tree;
+ RBTree_Node node;
+
+ _RBTree_Initialize_node( &node );
+ _RBTree_Initialize_one( &tree, &node );
+
+ /*
+ * Check that the tree is not emtpy.
+ */
+ T_false( _RBTree_Is_empty( &tree ) );
+
+ /*
+ * Check that the tree root is is the only node.
+ */
+ T_true( _RBTree_Is_root( &node ) );
+
+ /*
+ * Check that the node is not off the tree.
+ */
+ T_false( _RBTree_Is_node_off_tree( &node ) );
+
+ /*
+ * Check that the node has no left child.
+ */
+ T_null( _RBTree_Left( &node ) );
+
+ /*
+ * Check that the node has no right child.
+ */
+ T_null( _RBTree_Right( &node ) );
+
+ /*
+ * Check that the node has no parent.
+ */
+ T_null( _RBTree_Parent( &node ) );
+
+ /*
+ * Check that the node has no successor.
+ */
+ T_null( _RBTree_Successor( &node ) );
+
+ /*
+ * Check that the node has no predecessor.
+ */
+ T_null( _RBTree_Predecessor( &node ) );
+
+ /*
+ * Check that the minimum node is the node.
+ */
+ T_eq_ptr( _RBTree_Minimum( &tree ), &node );
+
+ /*
+ * Check that the maximum node is the node.
+ */
+ T_eq_ptr( _RBTree_Maximum( &tree ), &node );
+
+ /*
+ * Check that the tree is emtpy after extraction of the node.
+ */
+ _RBTree_Extract( &tree, &node );
+ T_true( _RBTree_Is_empty( &tree ) );
+}
+
+/**
+ * @brief Call _RBTree_Insert_inline() and check the return status for a sample
+ * set of nodes.
+ */
+static void ScoreRbtreeUnitRbtree_Action_1( void )
+{
+ RBTree_Control tree;
+ TestNode a;
+ TestNode b;
+ TestNode c;
+ bool is_new_minimum;
+
+ _RBTree_Initialize_empty( &tree );
+
+ /*
+ * Insert the first node. Check that it is the new minimum node.
+ */
+ _RBTree_Initialize_node( &b.Node );
+ b.key = 2;
+ is_new_minimum = _RBTree_Insert_inline( &tree, &b.Node, &b.key, Less );
+ T_true( is_new_minimum );
+
+ /*
+ * Insert the second node. Check that it is not the new minimum node.
+ */
+ _RBTree_Initialize_node( &c.Node );
+ c.key = 3;
+ is_new_minimum = _RBTree_Insert_inline( &tree, &c.Node, &c.key, Less );
+ T_false( is_new_minimum );
+
+ /*
+ * Insert the third node. Check that it is the new minimum node.
+ */
+ _RBTree_Initialize_node( &a.Node );
+ a.key = 1;
+ is_new_minimum = _RBTree_Insert_inline( &tree, &a.Node, &a.key, Less );
+ T_true( is_new_minimum );
+}
+
+/**
+ * @brief Call _RBTree_Insert_inline() and _RBTree_Extract() for a sample set
+ * of trees.
+ */
+static void ScoreRbtreeUnitRbtree_Action_2( void )
+{
+ size_t n;
+
+ for ( n = 0; n < RTEMS_ARRAY_SIZE( random_ops_trees ); ++n ) {
+ RandomOps( n + 1, true );
+ RandomOps( n + 1, false );
+ }
+}
+
+/**
+ * @fn void T_case_body_ScoreRbtreeUnitRbtree( void )
+ */
+T_TEST_CASE( ScoreRbtreeUnitRbtree )
+{
+ ScoreRbtreeUnitRbtree_Action_0();
+ ScoreRbtreeUnitRbtree_Action_1();
+ ScoreRbtreeUnitRbtree_Action_2();
+}
+
+/** @} */
diff --git a/testsuites/unit/ts-unit-no-clock-0.c b/testsuites/unit/ts-unit-no-clock-0.c
new file mode 100644
index 0000000000..88e67f91bd
--- /dev/null
+++ b/testsuites/unit/ts-unit-no-clock-0.c
@@ -0,0 +1,80 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesUnitNoClock0
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesUnitNoClock0 spec:/testsuites/unit-no-clock-0
+ *
+ * @ingroup RTEMSTestSuitesUnit
+ *
+ * @brief This general purpose unit test suite provides enough resources to run
+ * basic tests without a Clock Driver for all specified managers and
+ * functions.
+ *
+ * In SMP configurations, up to three scheduler instances using the SMP EDF
+ * scheduler are provided using up to four processors.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesUnitNoClock0";
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 4
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#include "../validation/ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/bsps/tc-fatal-sparc-leon3-shutdown-halt.c b/testsuites/validation/bsps/tc-fatal-sparc-leon3-shutdown-halt.c
new file mode 100644
index 0000000000..0b0b5cf5b7
--- /dev/null
+++ b/testsuites/validation/bsps/tc-fatal-sparc-leon3-shutdown-halt.c
@@ -0,0 +1,142 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup BspSparcLeon3ValFatalShutdownHalt
+ */
+
+/*
+ * Copyright (C) 2021, 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/sysinit.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup BspSparcLeon3ValFatalShutdownHalt \
+ * spec:/bsp/sparc/leon3/val/fatal-shutdown-halt
+ *
+ * @ingroup TestsuitesBspsFatalSparcLeon3Shutdown
+ *
+ * @brief Tests the leon3 BSP family shutdown procedure.
+ *
+ * This test case performs the following actions:
+ *
+ * - Check the effects of the leon3 BSP family shutdown procedure.
+ *
+ * - Check that no dynamic fatal error extension was invoked. This shows
+ * that the leon3 BSP family shutdown procedure called the wrapped
+ * _CPU_Fatal_halt() function of the test suite.
+ *
+ * @{
+ */
+
+static Atomic_Uint dynamic_fatal_extension_counter;
+
+static rtems_status_code status;
+
+static unsigned int Add( Atomic_Uint *a, unsigned int b )
+{
+ return _Atomic_Fetch_add_uint( a, b, ATOMIC_ORDER_RELAXED );
+}
+
+static void DynamicFatalHandler(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+)
+{
+ (void) source;
+ (void) code;
+ (void) always_set_to_false;
+ (void) Add( &dynamic_fatal_extension_counter, 1 );
+}
+
+static void InitBspSparcLeon3ValFatalShutdownHalt( void )
+{
+ rtems_extensions_table table = { .fatal = DynamicFatalHandler };
+ rtems_id id;
+
+ status = rtems_extension_create( OBJECT_NAME, &table, &id );
+}
+
+RTEMS_SYSINIT_ITEM(
+ InitBspSparcLeon3ValFatalShutdownHalt,
+ RTEMS_SYSINIT_DEVICE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
+/**
+ * @brief Check the effects of the leon3 BSP family shutdown procedure.
+ */
+static void BspSparcLeon3ValFatalShutdownHalt_Action_0( void )
+{
+ uint32_t counter;
+
+ /*
+ * Check that no dynamic fatal error extension was invoked. This shows that
+ * the leon3 BSP family shutdown procedure called the wrapped
+ * _CPU_Fatal_halt() function of the test suite.
+ */
+ T_step_rsc_success( 0, status );
+ counter = Add( &dynamic_fatal_extension_counter, 0 );
+ T_step_eq_u32( 1, counter, 0 );
+}
+
+/**
+ * @fn void T_case_body_BspSparcLeon3ValFatalShutdownHalt( void )
+ */
+T_TEST_CASE( BspSparcLeon3ValFatalShutdownHalt )
+{
+ T_plan( 2 );
+
+ BspSparcLeon3ValFatalShutdownHalt_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/bsps/tc-fatal-sparc-leon3-shutdown-request.c b/testsuites/validation/bsps/tc-fatal-sparc-leon3-shutdown-request.c
new file mode 100644
index 0000000000..46bc44e7cb
--- /dev/null
+++ b/testsuites/validation/bsps/tc-fatal-sparc-leon3-shutdown-request.c
@@ -0,0 +1,179 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup BspSparcLeon3ValFatalShutdownRequest
+ */
+
+/*
+ * Copyright (C) 2021, 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp/leon3.h>
+#include <rtems/sysinit.h>
+#include <rtems/score/smpimpl.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup BspSparcLeon3ValFatalShutdownRequest \
+ * spec:/bsp/sparc/leon3/val/fatal-shutdown-request
+ *
+ * @ingroup TestsuitesBspsFatalSparcLeon3Shutdown
+ *
+ * @brief Tests the leon3 BSP family SMP-specific shutdown procedure.
+ *
+ * This test case performs the following actions:
+ *
+ * - Check the effects of the leon3 BSP family shutdown procedure.
+ *
+ * - Check that the second processor was not powered down during system
+ * initialization.
+ *
+ * - Wait until the second processor is powered down.
+ *
+ * - Check that the RTEMS_FATAL_SOURCE_SMP with SMP_FATAL_SHUTDOWN_RESPONSE
+ * fatal error occurred exactly once.
+ *
+ * - Check that the RTEMS_FATAL_SOURCE_SMP with SMP_FATAL_SHUTDOWN_RESPONSE
+ * fatal error occurred on the second processor.
+ *
+ * @{
+ */
+
+static uint32_t mpstat_during_sysinit;
+
+static Atomic_Uint shutdown_response_counter;
+
+static uint32_t shutdown_response_cpu_index = UINT32_MAX;
+
+static unsigned int Add( Atomic_Uint *a, unsigned int b )
+{
+ return _Atomic_Fetch_add_uint( a, b, ATOMIC_ORDER_RELAXED );
+}
+
+static void ShutdownFatalHandler(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ T_null( arg );
+
+ if (
+ source == RTEMS_FATAL_SOURCE_SMP &&
+ code == SMP_FATAL_SHUTDOWN_RESPONSE
+ ) {
+ (void) Add( &shutdown_response_counter, 1 );
+ shutdown_response_cpu_index = rtems_scheduler_get_processor();
+ }
+}
+
+static void InitBspSparcLeon3ValFatalShutdownRequest( void )
+{
+ irqamp *regs;
+
+ regs = LEON3_IrqCtrl_Regs;
+ mpstat_during_sysinit = grlib_load_32( &regs->mpstat );
+ SetFatalHandler( ShutdownFatalHandler, NULL );
+}
+
+RTEMS_SYSINIT_ITEM(
+ InitBspSparcLeon3ValFatalShutdownRequest,
+ RTEMS_SYSINIT_DEVICE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
+/**
+ * @brief Check the effects of the leon3 BSP family shutdown procedure.
+ */
+static void BspSparcLeon3ValFatalShutdownRequest_Action_0( void )
+{
+ irqamp *regs;
+ uint32_t counter;
+
+ regs = LEON3_IrqCtrl_Regs;
+
+ /*
+ * Check that the second processor was not powered down during system
+ * initialization.
+ */
+ T_step_eq_u32( 0, mpstat_during_sysinit & 0x2, 0 );
+
+ /*
+ * Wait until the second processor is powered down.
+ */
+ while ( ( grlib_load_32( &regs->mpstat ) & 0x2 ) != 0x2U ) {
+ /* Wait */
+ }
+
+ /*
+ * Check that the RTEMS_FATAL_SOURCE_SMP with SMP_FATAL_SHUTDOWN_RESPONSE
+ * fatal error occurred exactly once.
+ */
+ counter = Add( &shutdown_response_counter, 0 );
+ T_step_eq_uint( 1, counter, 1 );
+
+ /*
+ * Check that the RTEMS_FATAL_SOURCE_SMP with SMP_FATAL_SHUTDOWN_RESPONSE
+ * fatal error occurred on the second processor.
+ */
+ T_step_eq_u32( 2, shutdown_response_cpu_index, 1 );
+}
+
+/**
+ * @fn void T_case_body_BspSparcLeon3ValFatalShutdownRequest( void )
+ */
+T_TEST_CASE( BspSparcLeon3ValFatalShutdownRequest )
+{
+ T_plan( 3 );
+
+ BspSparcLeon3ValFatalShutdownRequest_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/bsps/tc-sparc-gr712rc.c b/testsuites/validation/bsps/tc-sparc-gr712rc.c
new file mode 100644
index 0000000000..a16de3d6ed
--- /dev/null
+++ b/testsuites/validation/bsps/tc-sparc-gr712rc.c
@@ -0,0 +1,124 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup BspSparcLeon3ValGr712rc
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup BspSparcLeon3ValGr712rc spec:/bsp/sparc/leon3/val/gr712rc
+ *
+ * @ingroup TestsuitesBspsValidationBsp0
+ *
+ * @brief This test case collection provides validation test cases for the
+ * ``sparc/gr712rc`` BSP.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate the use of the ``-mfix-gr712rc`` compiler option.
+ *
+ * - Check that the compiler built-in define ``__FIX_LEON3FT_B2BST`` is
+ * defined.
+ *
+ * - Check that the compiler built-in define ``__FIX_LEON3FT_TN0018`` is
+ * defined.
+ *
+ * - Check that the ``SPARC_LEON3FT_B2BST_NOP`` define expands to a ``nop``
+ * instruction.
+ *
+ * @{
+ */
+
+/**
+ * @brief Validate the use of the ``-mfix-gr712rc`` compiler option.
+ */
+static void BspSparcLeon3ValGr712rc_Action_0( void )
+{
+ const char *s;
+
+ /*
+ * Check that the compiler built-in define ``__FIX_LEON3FT_B2BST`` is
+ * defined.
+ */
+ #if !defined(__FIX_LEON3FT_B2BST)
+ #error "__FIX_LEON3FT_B2BST is not defined"
+ #endif
+
+ /*
+ * Check that the compiler built-in define ``__FIX_LEON3FT_TN0018`` is
+ * defined.
+ */
+ #if !defined(__FIX_LEON3FT_TN0018)
+ #error "__FIX_LEON3FT_TN0018 is not defined"
+ #endif
+
+ /*
+ * Check that the ``SPARC_LEON3FT_B2BST_NOP`` define expands to a ``nop``
+ * instruction.
+ */
+ s = RTEMS_XSTRING( SPARC_LEON3FT_B2BST_NOP );
+ T_true( IsEqualIgnoreWhiteSpace( s, "nop" ) );
+}
+
+/**
+ * @fn void T_case_body_BspSparcLeon3ValGr712rc( void )
+ */
+T_TEST_CASE( BspSparcLeon3ValGr712rc )
+{
+ BspSparcLeon3ValGr712rc_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/bsps/tr-fatal-clock-xil-ttc-irq-install.c b/testsuites/validation/bsps/tr-fatal-clock-xil-ttc-irq-install.c
new file mode 100644
index 0000000000..731b454ee4
--- /dev/null
+++ b/testsuites/validation/bsps/tr-fatal-clock-xil-ttc-irq-install.c
@@ -0,0 +1,187 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup DevClockXilTtcValFatalIrqInstall
+ */
+
+/*
+ * Copyright (C) 2024 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp.h>
+#include <rtems.h>
+#include <bsp/fatal.h>
+#include <rtems/sysinit.h>
+
+#include "tr-fatal-clock-xil-ttc-irq-install.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup DevClockXilTtcValFatalIrqInstall \
+ * spec:/dev/clock/xil-ttc/val/fatal-irq-install
+ *
+ * @ingroup TestsuitesBspsFatalClockXilTtcIrqInstall
+ *
+ * @brief Tests a fatal error.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by the OccupyClockInterrupt() system
+ * initialization handler.
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/dev/clock/xil-ttc/val/fatal-irq-install test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * DevClockXilTtcValFatalIrqInstall_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * DevClockXilTtcValFatalIrqInstall_Run() parameter.
+ */
+ rtems_fatal_code code;
+} DevClockXilTtcValFatalIrqInstall_Context;
+
+static DevClockXilTtcValFatalIrqInstall_Context
+ DevClockXilTtcValFatalIrqInstall_Instance;
+
+static void ClockInterrupt( void *arg )
+{
+ (void) arg;
+}
+
+static rtems_interrupt_entry interrupt_entry = RTEMS_INTERRUPT_ENTRY_INITIALIZER(
+ ClockInterrupt,
+ NULL,
+ "Clock"
+);
+
+static void OccupyClockInterrupt( void )
+{
+ (void) rtems_interrupt_entry_install(
+ XIL_CLOCK_TTC_IRQ,
+ RTEMS_INTERRUPT_UNIQUE,
+ &interrupt_entry
+ );
+}
+
+RTEMS_SYSINIT_ITEM(
+ OccupyClockInterrupt,
+ RTEMS_SYSINIT_DEVICE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_FIRST
+);
+
+static T_fixture DevClockXilTtcValFatalIrqInstall_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &DevClockXilTtcValFatalIrqInstall_Instance
+};
+
+/**
+ * @brief The test action is carried out by the OccupyClockInterrupt() system
+ * initialization handler.
+ */
+static void DevClockXilTtcValFatalIrqInstall_Action_0(
+ DevClockXilTtcValFatalIrqInstall_Context *ctx
+)
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_BSP );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong(
+ 1,
+ ctx->code,
+ XIL_FATAL_TTC_IRQ_INSTALL
+ );
+}
+
+void DevClockXilTtcValFatalIrqInstall_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+)
+{
+ DevClockXilTtcValFatalIrqInstall_Context *ctx;
+
+ ctx = &DevClockXilTtcValFatalIrqInstall_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin(
+ "DevClockXilTtcValFatalIrqInstall",
+ &DevClockXilTtcValFatalIrqInstall_Fixture
+ );
+
+ T_plan( 2 );
+
+ DevClockXilTtcValFatalIrqInstall_Action_0( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/bsps/tr-fatal-clock-xil-ttc-irq-install.h b/testsuites/validation/bsps/tr-fatal-clock-xil-ttc-irq-install.h
new file mode 100644
index 0000000000..74021233a0
--- /dev/null
+++ b/testsuites/validation/bsps/tr-fatal-clock-xil-ttc-irq-install.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup DevClockXilTtcValFatalIrqInstall
+ */
+
+/*
+ * Copyright (C) 2024 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_CLOCK_XIL_TTC_IRQ_INSTALL_H
+#define _TR_FATAL_CLOCK_XIL_TTC_IRQ_INSTALL_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup DevClockXilTtcValFatalIrqInstall
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is fatal source.
+ *
+ * @param code is fatal code.
+ */
+void DevClockXilTtcValFatalIrqInstall_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_CLOCK_XIL_TTC_IRQ_INSTALL_H */
diff --git a/testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-boot.c b/testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-boot.c
new file mode 100644
index 0000000000..748fd88e70
--- /dev/null
+++ b/testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-boot.c
@@ -0,0 +1,175 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup BspSparcLeon3ValFatalCacheSnoopingDisabledBoot
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp/fatal.h>
+#include <bsp/leon3.h>
+#include <rtems/sysinit.h>
+
+#include "tr-fatal-sparc-leon3-cache-snooping-disabled-boot.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup BspSparcLeon3ValFatalCacheSnoopingDisabledBoot \
+ * spec:/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-boot
+ *
+ * @ingroup TestsuitesBspsFatalSparcLeon3CacheSnoopingDisabledBoot
+ *
+ * @brief Tests a fatal error.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by the DisableCacheSnooping() system
+ * initialization handler.
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for
+ * spec:/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-boot test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Run() parameter.
+ */
+ rtems_fatal_code code;
+} BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Context;
+
+static BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Context
+ BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Instance;
+
+static void DisableCacheSnooping( void )
+{
+ uint32_t control;
+
+ control = leon3_get_cache_control_register();
+ control &= ~LEON3_REG_CACHE_CTRL_DS;
+ leon3_set_cache_control_register( control );
+}
+
+RTEMS_SYSINIT_ITEM(
+ DisableCacheSnooping,
+ RTEMS_SYSINIT_BSP_EARLY,
+ RTEMS_SYSINIT_ORDER_FIRST
+);
+
+static T_fixture BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Instance
+};
+
+/**
+ * @brief The test action is carried out by the DisableCacheSnooping() system
+ * initialization handler.
+ */
+static void BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Action_0(
+ BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Context *ctx
+)
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_BSP );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong(
+ 1,
+ ctx->code,
+ LEON3_FATAL_INVALID_CACHE_CONFIG_BOOT_PROCESSOR
+ );
+}
+
+void BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+)
+{
+ BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Context *ctx;
+
+ ctx = &BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin(
+ "BspSparcLeon3ValFatalCacheSnoopingDisabledBoot",
+ &BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Fixture
+ );
+
+ T_plan( 2 );
+
+ BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Action_0( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-boot.h b/testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-boot.h
new file mode 100644
index 0000000000..e375e6baac
--- /dev/null
+++ b/testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-boot.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup BspSparcLeon3ValFatalCacheSnoopingDisabledBoot
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_SPARC_LEON3_CACHE_SNOOPING_DISABLED_BOOT_H
+#define _TR_FATAL_SPARC_LEON3_CACHE_SNOOPING_DISABLED_BOOT_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup BspSparcLeon3ValFatalCacheSnoopingDisabledBoot
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is fatal source.
+ *
+ * @param code is fatal code.
+ */
+void BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_SPARC_LEON3_CACHE_SNOOPING_DISABLED_BOOT_H */
diff --git a/testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-secondary.c b/testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-secondary.c
new file mode 100644
index 0000000000..4d90abf42d
--- /dev/null
+++ b/testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-secondary.c
@@ -0,0 +1,176 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp/bootcard.h>
+#include <bsp/fatal.h>
+#include <bsp/leon3.h>
+
+#include "tr-fatal-sparc-leon3-cache-snooping-disabled-secondary.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary \
+ * spec:/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-secondary
+ *
+ * @ingroup TestsuitesBspsFatalSparcLeon3CacheSnoopingDisabledSecondary
+ *
+ * @brief Tests a fatal error.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by the wrapped
+ * bsp_start_on_secondary_processor() function.
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for
+ * spec:/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-secondary test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Run() parameter.
+ */
+ rtems_fatal_code code;
+} BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Context;
+
+static BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Context
+ BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Instance;
+
+void __real_bsp_start_on_secondary_processor( struct Per_CPU_Control *cpu_self );
+
+void __wrap_bsp_start_on_secondary_processor( struct Per_CPU_Control *cpu_self );
+
+void __wrap_bsp_start_on_secondary_processor( struct Per_CPU_Control *cpu_self )
+{
+ uint32_t control;
+
+ control = leon3_get_cache_control_register();
+ control &= ~LEON3_REG_CACHE_CTRL_DS;
+ leon3_set_cache_control_register( control );
+
+ __real_bsp_start_on_secondary_processor( cpu_self );
+}
+
+static T_fixture BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Instance
+};
+
+/**
+ * @brief The test action is carried out by the wrapped
+ * bsp_start_on_secondary_processor() function.
+ */
+static void BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Action_0(
+ BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Context *ctx
+)
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_BSP );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong(
+ 1,
+ ctx->code,
+ LEON3_FATAL_INVALID_CACHE_CONFIG_SECONDARY_PROCESSOR
+ );
+}
+
+void BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+)
+{
+ BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Context *ctx;
+
+ ctx = &BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin(
+ "BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary",
+ &BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Fixture
+ );
+
+ T_plan( 2 );
+
+ BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Action_0( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-secondary.h b/testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-secondary.h
new file mode 100644
index 0000000000..0782942222
--- /dev/null
+++ b/testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-secondary.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_SPARC_LEON3_CACHE_SNOOPING_DISABLED_SECONDARY_H
+#define _TR_FATAL_SPARC_LEON3_CACHE_SNOOPING_DISABLED_SECONDARY_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is fatal source.
+ *
+ * @param code is fatal code.
+ */
+void BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_SPARC_LEON3_CACHE_SNOOPING_DISABLED_SECONDARY_H */
diff --git a/testsuites/validation/bsps/tr-fatal-sparc-leon3-clock-initialization.c b/testsuites/validation/bsps/tr-fatal-sparc-leon3-clock-initialization.c
new file mode 100644
index 0000000000..5cd81b736c
--- /dev/null
+++ b/testsuites/validation/bsps/tr-fatal-sparc-leon3-clock-initialization.c
@@ -0,0 +1,190 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup BspSparcLeon3ValFatalClockInitialization
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp/fatal.h>
+#include <bsp/leon3.h>
+#include <rtems/irq-extension.h>
+#include <rtems/sysinit.h>
+
+#include "tr-fatal-sparc-leon3-clock-initialization.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup BspSparcLeon3ValFatalClockInitialization \
+ * spec:/bsp/sparc/leon3/val/fatal-clock-initialization
+ *
+ * @ingroup TestsuitesBspsFatalSparcLeon3ClockInitialization
+ *
+ * @brief Tests a fatal error.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by the OccupyClockInterrupt() system
+ * initialization handler.
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/bsp/sparc/leon3/val/fatal-clock-initialization
+ * test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * BspSparcLeon3ValFatalClockInitialization_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * BspSparcLeon3ValFatalClockInitialization_Run() parameter.
+ */
+ rtems_fatal_code code;
+} BspSparcLeon3ValFatalClockInitialization_Context;
+
+static BspSparcLeon3ValFatalClockInitialization_Context
+ BspSparcLeon3ValFatalClockInitialization_Instance;
+
+static void ClockInterrupt( void *arg )
+{
+ (void) arg;
+}
+
+static rtems_interrupt_entry interrupt_entry = RTEMS_INTERRUPT_ENTRY_INITIALIZER(
+ ClockInterrupt,
+ NULL,
+ "Clock"
+);
+
+static void OccupyClockInterrupt( void )
+{
+ rtems_vector_number vector;
+
+ vector = GPTIMER_CONFIG_IRQ_GET( grlib_load_32( &LEON3_Timer_Regs->config ) );
+ (void) rtems_interrupt_entry_install(
+ vector,
+ RTEMS_INTERRUPT_UNIQUE,
+ &interrupt_entry
+ );
+}
+
+RTEMS_SYSINIT_ITEM(
+ OccupyClockInterrupt,
+ RTEMS_SYSINIT_DEVICE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_FIRST
+);
+
+static T_fixture BspSparcLeon3ValFatalClockInitialization_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &BspSparcLeon3ValFatalClockInitialization_Instance
+};
+
+/**
+ * @brief The test action is carried out by the OccupyClockInterrupt() system
+ * initialization handler.
+ */
+static void BspSparcLeon3ValFatalClockInitialization_Action_0(
+ BspSparcLeon3ValFatalClockInitialization_Context *ctx
+)
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_BSP );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong(
+ 1,
+ ctx->code,
+ LEON3_FATAL_CLOCK_INITIALIZATION
+ );
+}
+
+void BspSparcLeon3ValFatalClockInitialization_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+)
+{
+ BspSparcLeon3ValFatalClockInitialization_Context *ctx;
+
+ ctx = &BspSparcLeon3ValFatalClockInitialization_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin(
+ "BspSparcLeon3ValFatalClockInitialization",
+ &BspSparcLeon3ValFatalClockInitialization_Fixture
+ );
+
+ T_plan( 2 );
+
+ BspSparcLeon3ValFatalClockInitialization_Action_0( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/bsps/tr-fatal-sparc-leon3-clock-initialization.h b/testsuites/validation/bsps/tr-fatal-sparc-leon3-clock-initialization.h
new file mode 100644
index 0000000000..6997b3f22c
--- /dev/null
+++ b/testsuites/validation/bsps/tr-fatal-sparc-leon3-clock-initialization.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup BspSparcLeon3ValFatalClockInitialization
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_SPARC_LEON3_CLOCK_INITIALIZATION_H
+#define _TR_FATAL_SPARC_LEON3_CLOCK_INITIALIZATION_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup BspSparcLeon3ValFatalClockInitialization
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is fatal source.
+ *
+ * @param code is fatal code.
+ */
+void BspSparcLeon3ValFatalClockInitialization_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_SPARC_LEON3_CLOCK_INITIALIZATION_H */
diff --git a/testsuites/validation/bsps/ts-fatal-clock-xil-ttc-irq-install.c b/testsuites/validation/bsps/ts-fatal-clock-xil-ttc-irq-install.c
new file mode 100644
index 0000000000..e5c1062348
--- /dev/null
+++ b/testsuites/validation/bsps/ts-fatal-clock-xil-ttc-irq-install.c
@@ -0,0 +1,79 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesBspsFatalClockXilTtcIrqInstall
+ */
+
+/*
+ * Copyright (C) 2024 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-clock-xil-ttc-irq-install.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesBspsFatalClockXilTtcIrqInstall \
+ * spec:/testsuites/bsps/fatal-clock-xil-ttc-irq-install
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case which triggers a
+ * fatal error during system initialization.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesBspsFatalClockXilTtcIrqInstall";
+
+#define FATAL_SYSINIT_RUN DevClockXilTtcValFatalIrqInstall_Run
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/bsps/ts-fatal-sparc-leon3-cache-snooping-disabled-boot.c b/testsuites/validation/bsps/ts-fatal-sparc-leon3-cache-snooping-disabled-boot.c
new file mode 100644
index 0000000000..53e18b5b0b
--- /dev/null
+++ b/testsuites/validation/bsps/ts-fatal-sparc-leon3-cache-snooping-disabled-boot.c
@@ -0,0 +1,79 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesBspsFatalSparcLeon3CacheSnoopingDisabledBoot
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-sparc-leon3-cache-snooping-disabled-boot.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesBspsFatalSparcLeon3CacheSnoopingDisabledBoot \
+ * spec:/testsuites/bsps/fatal-sparc-leon3-cache-snooping-disabled-boot
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case which triggers a
+ * fatal error during system initialization.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesBspsFatalSparcLeon3CacheSnoopingDisabledBoot";
+
+#define FATAL_SYSINIT_RUN BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Run
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/bsps/ts-fatal-sparc-leon3-cache-snooping-disabled-secondary.c b/testsuites/validation/bsps/ts-fatal-sparc-leon3-cache-snooping-disabled-secondary.c
new file mode 100644
index 0000000000..3b8829dcf9
--- /dev/null
+++ b/testsuites/validation/bsps/ts-fatal-sparc-leon3-cache-snooping-disabled-secondary.c
@@ -0,0 +1,82 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesBspsFatalSparcLeon3CacheSnoopingDisabledSecondary
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-sparc-leon3-cache-snooping-disabled-secondary.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesBspsFatalSparcLeon3CacheSnoopingDisabledSecondary \
+ * spec:/testsuites/bsps/fatal-sparc-leon3-cache-snooping-disabled-secondary
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case which triggers a
+ * fatal error during system initialization.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesBspsFatalSparcLeon3CacheSnoopingDisabledSecondary";
+
+#define FATAL_SYSINIT_RUN \
+ BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Run
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/bsps/ts-fatal-sparc-leon3-clock-initialization.c b/testsuites/validation/bsps/ts-fatal-sparc-leon3-clock-initialization.c
new file mode 100644
index 0000000000..b75223537f
--- /dev/null
+++ b/testsuites/validation/bsps/ts-fatal-sparc-leon3-clock-initialization.c
@@ -0,0 +1,79 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesBspsFatalSparcLeon3ClockInitialization
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-sparc-leon3-clock-initialization.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesBspsFatalSparcLeon3ClockInitialization \
+ * spec:/testsuites/bsps/fatal-sparc-leon3-clock-initialization
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case which triggers a
+ * fatal error during system initialization.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesBspsFatalSparcLeon3ClockInitialization";
+
+#define FATAL_SYSINIT_RUN BspSparcLeon3ValFatalClockInitialization_Run
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/bsps/ts-fatal-sparc-leon3-shutdown-response.c b/testsuites/validation/bsps/ts-fatal-sparc-leon3-shutdown-response.c
new file mode 100644
index 0000000000..d730b6d027
--- /dev/null
+++ b/testsuites/validation/bsps/ts-fatal-sparc-leon3-shutdown-response.c
@@ -0,0 +1,94 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3ShutdownResponse
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/smpimpl.h>
+
+#include "tr-fatal-sparc-leon3-shutdown-response.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RTEMSTestSuiteTestsuitesFatalBspSparcLeon3ShutdownResponse \
+ * spec:/testsuites/fatal-sparc-leon3-shutdown-response
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case which performs a
+ * system shutdown.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "FatalBspSparcLeon3ShutdownResponse";
+
+#define FATAL_SYSINIT_RUN BspSparcLeon3ValFatalShutdownResponse_Run
+
+static void FatalSysinitExit( rtems_fatal_code exit_code )
+{
+ if ( exit_code == 0 ) {
+ rtems_fatal( RTEMS_FATAL_SOURCE_SMP, SMP_FATAL_SHUTDOWN );
+ } else {
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, exit_code );
+ }
+}
+
+#define FATAL_SYSINIT_EXIT( exit_code ) FatalSysinitExit( exit_code )
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/bsps/ts-fatal-sparc-leon3-shutdown.c b/testsuites/validation/bsps/ts-fatal-sparc-leon3-shutdown.c
new file mode 100644
index 0000000000..bc229e7824
--- /dev/null
+++ b/testsuites/validation/bsps/ts-fatal-sparc-leon3-shutdown.c
@@ -0,0 +1,177 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesBspsFatalSparcLeon3Shutdown
+ */
+
+/*
+ * Copyright (C) 2021, 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/bspIo.h>
+#include <rtems/test-info.h>
+#include <rtems/test.h>
+#include <rtems/testopts.h>
+#include <rtems/score/smpimpl.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesBspsFatalSparcLeon3Shutdown \
+ * spec:/testsuites/bsps/fatal-sparc-leon3-shutdown
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite provides an application configuration to
+ * perform a shutdown.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesBspsFatalSparcLeon3Shutdown";
+
+static char buffer[ 512 ];
+
+static const T_action actions[] = {
+ T_report_hash_sha256
+};
+
+static const T_config test_config = {
+ .name = rtems_test_name,
+ .buf = buffer,
+ .buf_size = sizeof( buffer ),
+ .putchar = rtems_put_char,
+ .verbosity = RTEMS_TEST_VERBOSITY,
+ .now = T_now_tick,
+ .allocate = T_memory_allocate,
+ .deallocate = T_memory_deallocate,
+ .action_count = T_ARRAY_SIZE( actions ),
+ .actions = actions
+};
+
+void __real__CPU_Fatal_halt( uint32_t source, CPU_Uint32ptr code );
+
+void __wrap__CPU_Fatal_halt( uint32_t source, CPU_Uint32ptr code );
+
+void __wrap__CPU_Fatal_halt( uint32_t source, CPU_Uint32ptr code )
+{
+ int exit_code;
+
+ T_register();
+ exit_code = T_main( &test_config );
+
+ if ( exit_code == 0 ) {
+ rtems_test_end( rtems_test_name );
+ }
+
+#if defined(RTEMS_GCOV_COVERAGE)
+ rtems_test_gcov_dump_info();
+#endif
+ __real__CPU_Fatal_halt( source, code );
+}
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#if defined(RTEMS_SMP)
+#define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+#include <rtems/score/scheduleredfsmp.h>
+
+#define CONFIGURE_SCHEDULER_EDF_SMP
+
+#include <rtems/scheduler.h>
+
+RTEMS_SCHEDULER_EDF_SMP( a );
+
+#define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
+ RTEMS_SCHEDULER_TABLE_EDF_SMP( a, TEST_SCHEDULER_A_NAME )
+
+#define CONFIGURE_SCHEDULER_ASSIGNMENTS \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY )
+#endif /* RTEMS_SMP */
+
+#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0
+
+#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 1
+
+#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
+
+#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
+
+#define CONFIGURE_IDLE_TASK_STORAGE_SIZE RTEMS_MINIMUM_STACK_SIZE
+
+#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
+
+static void *ShutdownIdleBody( uintptr_t arg )
+{
+#if defined(RTEMS_SMP)
+ if ( rtems_scheduler_get_processor() == 0 ) {
+ rtems_test_begin( rtems_test_name, TEST_STATE );
+ rtems_fatal( RTEMS_FATAL_SOURCE_SMP, SMP_FATAL_SHUTDOWN );
+ }
+
+ return _CPU_Thread_Idle_body( arg );
+#else
+ rtems_test_begin( rtems_test_name, TEST_STATE );
+ rtems_fatal( RTEMS_FATAL_SOURCE_APPLICATION, 123 );
+#endif
+}
+
+#define CONFIGURE_IDLE_TASK_BODY ShutdownIdleBody
+
+#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = FatalInitialExtension }
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+
+/** @} */
diff --git a/testsuites/validation/bsps/ts-validation-bsp-0.c b/testsuites/validation/bsps/ts-validation-bsp-0.c
new file mode 100644
index 0000000000..c072c8fdf1
--- /dev/null
+++ b/testsuites/validation/bsps/ts-validation-bsp-0.c
@@ -0,0 +1,73 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesBspsValidationBsp0
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesBspsValidationBsp0 \
+ * spec:/testsuites/bsps/validation-bsp-0
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This general purpose validation test suite provides enough resources
+ * to run target-specific tests.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesBspsValidationBsp0";
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/tc-acfg-appl-does-not-need-clock-driver.c b/testsuites/validation/tc-acfg-appl-does-not-need-clock-driver.c
new file mode 100644
index 0000000000..632ce8f164
--- /dev/null
+++ b/testsuites/validation/tc-acfg-appl-does-not-need-clock-driver.c
@@ -0,0 +1,130 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup AcfgValApplDoesNotNeedClockDriver
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup AcfgValApplDoesNotNeedClockDriver \
+ * spec:/acfg/val/appl-does-not-need-clock-driver
+ *
+ * @ingroup TestsuitesValidationAcfg0
+ *
+ * @brief Tests the effect of the
+ * CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER application configuration
+ * option.
+ *
+ * This test case performs the following actions:
+ *
+ * - Get the current clock ticks since boot value. Busy wait for at least one
+ * clock tick interval.
+ *
+ * - Check that the clock ticks since boot count did not change while busy
+ * waiting for more than one clock tick interval.
+ *
+ * @{
+ */
+
+/**
+ * @brief Get the current clock ticks since boot value. Busy wait for at least
+ * one clock tick interval.
+ */
+static void AcfgValApplDoesNotNeedClockDriver_Action_0( void )
+{
+ T_time time_per_clock_tick;
+ T_ticks duration;
+ T_ticks elapsed;
+ T_ticks t0;
+ T_ticks t1;
+ rtems_interval ticks_since_boot;
+
+ ticks_since_boot = rtems_clock_get_ticks_since_boot();
+
+ time_per_clock_tick = T_seconds_and_nanoseconds_to_time(
+ 0,
+ rtems_configuration_get_nanoseconds_per_tick()
+ );
+ duration = 2 * T_time_to_ticks( time_per_clock_tick );
+ elapsed = 0;
+ t0 = T_tick();
+
+ while ( elapsed < duration ) {
+ t1 = T_tick();
+ elapsed += t1 - t0;
+ t0 = t1;
+ }
+
+ /*
+ * Check that the clock ticks since boot count did not change while busy
+ * waiting for more than one clock tick interval.
+ */
+ T_step_eq_u32(
+ 0,
+ rtems_clock_get_ticks_since_boot(),
+ ticks_since_boot
+ );
+}
+
+/**
+ * @fn void T_case_body_AcfgValApplDoesNotNeedClockDriver( void )
+ */
+T_TEST_CASE( AcfgValApplDoesNotNeedClockDriver )
+{
+ T_plan( 1 );
+
+ AcfgValApplDoesNotNeedClockDriver_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-acfg-appl-needs-clock-driver.c b/testsuites/validation/tc-acfg-appl-needs-clock-driver.c
new file mode 100644
index 0000000000..fe62dd7de6
--- /dev/null
+++ b/testsuites/validation/tc-acfg-appl-needs-clock-driver.c
@@ -0,0 +1,128 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup AcfgValApplNeedsClockDriver
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup AcfgValApplNeedsClockDriver spec:/acfg/val/appl-needs-clock-driver
+ *
+ * @ingroup TestsuitesValidation0
+ *
+ * @brief Tests the effect of the CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+ * application configuration option.
+ *
+ * This test case performs the following actions:
+ *
+ * - Get the current clock ticks since boot value. Busy wait for at least one
+ * clock tick interval.
+ *
+ * - Check that the clock ticks since boot count changed while busy waiting
+ * for more than one clock tick interval.
+ *
+ * @{
+ */
+
+/**
+ * @brief Get the current clock ticks since boot value. Busy wait for at least
+ * one clock tick interval.
+ */
+static void AcfgValApplNeedsClockDriver_Action_0( void )
+{
+ T_time time_per_clock_tick;
+ T_ticks duration;
+ T_ticks elapsed;
+ T_ticks t0;
+ T_ticks t1;
+ rtems_interval ticks_since_boot;
+
+ ticks_since_boot = rtems_clock_get_ticks_since_boot();
+
+ time_per_clock_tick = T_seconds_and_nanoseconds_to_time(
+ 0,
+ rtems_configuration_get_nanoseconds_per_tick()
+ );
+ duration = 2 * T_time_to_ticks( time_per_clock_tick );
+ elapsed = 0;
+ t0 = T_tick();
+
+ while ( elapsed < duration ) {
+ t1 = T_tick();
+ elapsed += t1 - t0;
+ t0 = t1;
+ }
+
+ /*
+ * Check that the clock ticks since boot count changed while busy waiting for
+ * more than one clock tick interval.
+ */
+ T_step_gt_u32(
+ 0,
+ rtems_clock_get_ticks_since_boot() - ticks_since_boot,
+ 0
+ );
+}
+
+/**
+ * @fn void T_case_body_AcfgValApplNeedsClockDriver( void )
+ */
+T_TEST_CASE( AcfgValApplNeedsClockDriver )
+{
+ T_plan( 1 );
+
+ AcfgValApplNeedsClockDriver_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-acfg-default.c b/testsuites/validation/tc-acfg-default.c
new file mode 100644
index 0000000000..bc23363c49
--- /dev/null
+++ b/testsuites/validation/tc-acfg-default.c
@@ -0,0 +1,398 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup AcfgValDefault
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp.h>
+#include <string.h>
+#include <rtems/score/userextdata.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup AcfgValDefault spec:/acfg/val/default
+ *
+ * @ingroup TestsuitesValidationAcfg0
+ *
+ * @brief Tests the default values of application configuration options.
+ *
+ * This test case performs the following actions:
+ *
+ * - Check the effect of application configuration options with optional
+ * BSP-provided settings.
+ *
+ * - Check the configured CONFIGURE_IDLE_TASK_BODY.
+ *
+ * - Check the default value of CONFIGURE_IDLE_TASK_STACK_SIZE where the
+ * optional BSP-provided default value is enabled.
+ *
+ * - Check the default value of CONFIGURE_INTERRUPT_STACK_SIZE where the
+ * optional BSP-provided default value is enabled.
+ *
+ * - Check the BSP-provided initial extension is registered.
+ *
+ * - Try to create a barrier.
+ *
+ * - Check that the returned status code is RTEMS_TOO_MANY.
+ *
+ * - Try to construct a message queue.
+ *
+ * - Check that the returned status code is RTEMS_TOO_MANY.
+ *
+ * - Try to create a partition.
+ *
+ * - Check that the returned status code is RTEMS_TOO_MANY.
+ *
+ * - Try to create a period.
+ *
+ * - Check that the returned status code is RTEMS_TOO_MANY.
+ *
+ * - Check that the processor maximum is one.
+ *
+ * - Try to create a semaphore.
+ *
+ * - Check that the returned status code is RTEMS_TOO_MANY.
+ *
+ * - Try to construct a task.
+ *
+ * - Check that the returned status code is RTEMS_TOO_MANY.
+ *
+ * - Check the default CONFIGURE_MAXIMUM_TASKS value. A maximum Classic API
+ * task value of zero is only configurable if
+ * CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION is defined or
+ * CONFIGURE_MAXIMUM_POSIX_THREADS is set to a positive value. The default
+ * value of zero for CONFIGURE_MAXIMUM_POSIX_THREADS is used by the test
+ * suite containing the test case. The test suite defines
+ * CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION.
+ *
+ * - Try to create a timer.
+ *
+ * - Check that the returned status code is RTEMS_TOO_MANY.
+ *
+ * - Try to create a user extension set.
+ *
+ * - Check that the returned status code is RTEMS_TOO_MANY.
+ *
+ * @{
+ */
+
+#define NAME rtems_build_name( 'N', 'A', 'M', 'E' )
+
+RTEMS_ALIGNED(RTEMS_TASK_STORAGE_ALIGNMENT) static char task_storage[
+ RTEMS_TASK_STORAGE_SIZE(
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_ATTRIBUTES
+ )
+];
+
+static const rtems_task_config task_config = {
+ .name = NAME,
+ .initial_priority = 1,
+ .storage_area = task_storage,
+ .storage_size = sizeof( task_storage ),
+ .maximum_thread_local_storage_size = 0,
+ .initial_modes = RTEMS_DEFAULT_MODES,
+ .attributes = RTEMS_DEFAULT_ATTRIBUTES
+};
+
+/**
+ * @brief Check the effect of application configuration options with optional
+ * BSP-provided settings.
+ */
+static void AcfgValDefault_Action_0( void )
+{
+ rtems_extensions_table bsp = BSP_INITIAL_EXTENSION;
+
+ /*
+ * Check the configured CONFIGURE_IDLE_TASK_BODY.
+ */
+ T_step_eq_ptr( 0, rtems_configuration_get_idle_task(), IdleBody );
+
+ /*
+ * Check the default value of CONFIGURE_IDLE_TASK_STACK_SIZE where the
+ * optional BSP-provided default value is enabled.
+ */
+ T_step_eq_sz(
+ 1,
+ rtems_configuration_get_idle_task_stack_size(),
+ #if defined(BSP_IDLE_TASK_STACK_SIZE)
+ BSP_IDLE_TASK_STACK_SIZE
+ #else
+ CPU_STACK_MINIMUM_SIZE
+ #endif
+ );
+
+ /*
+ * Check the default value of CONFIGURE_INTERRUPT_STACK_SIZE where the
+ * optional BSP-provided default value is enabled.
+ */
+ T_step_eq_sz(
+ 2,
+ rtems_configuration_get_interrupt_stack_size(),
+ #if defined(BSP_INTERRUPT_STACK_SIZE)
+ BSP_INTERRUPT_STACK_SIZE
+ #else
+ CPU_STACK_MINIMUM_SIZE
+ #endif
+ );
+
+ /*
+ * Check the BSP-provided initial extension is registered.
+ */
+ T_step_eq_sz( 3, _User_extensions_Initial_count, 1 );
+ T_step_eq_ptr(
+ 4,
+ _User_extensions_Initial_extensions[ 0 ].fatal,
+ bsp.fatal
+ );
+}
+
+/**
+ * @brief Try to create a barrier.
+ */
+static void AcfgValDefault_Action_1( void )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ sc = rtems_barrier_create(
+ NAME,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ 1,
+ &id
+ );
+
+ /*
+ * Check that the returned status code is RTEMS_TOO_MANY.
+ */
+ T_step_rsc( 5, sc, RTEMS_TOO_MANY );
+}
+
+/**
+ * @brief Try to construct a message queue.
+ */
+static void AcfgValDefault_Action_2( void )
+{
+ rtems_message_queue_config config;
+ RTEMS_MESSAGE_QUEUE_BUFFER( 1 ) buffers[ 1 ];
+ rtems_status_code sc;
+ rtems_id id;
+
+ memset( &config, 0, sizeof( config ) );
+ config.name = NAME;
+ config.maximum_pending_messages = 1;
+ config.maximum_message_size = 1;
+ config.storage_size = sizeof( buffers );
+ config.storage_area = buffers;
+ config.attributes = RTEMS_DEFAULT_ATTRIBUTES;
+
+ sc = rtems_message_queue_construct( &config, &id );
+
+ /*
+ * Check that the returned status code is RTEMS_TOO_MANY.
+ */
+ T_step_rsc( 6, sc, RTEMS_TOO_MANY );
+}
+
+/**
+ * @brief Try to create a partition.
+ */
+static void AcfgValDefault_Action_3( void )
+{
+ RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t buffers[ 1 ][ 32 ];
+ rtems_status_code sc;
+ rtems_id id;
+
+ sc = rtems_partition_create(
+ NAME,
+ buffers,
+ sizeof( buffers ),
+ sizeof( buffers[ 0 ] ),
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &id
+ );
+
+ /*
+ * Check that the returned status code is RTEMS_TOO_MANY.
+ */
+ T_step_rsc( 7, sc, RTEMS_TOO_MANY );
+}
+
+/**
+ * @brief Try to create a period.
+ */
+static void AcfgValDefault_Action_4( void )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ sc = rtems_rate_monotonic_create( NAME, &id );
+
+ /*
+ * Check that the returned status code is RTEMS_TOO_MANY.
+ */
+ T_step_rsc( 8, sc, RTEMS_TOO_MANY );
+}
+
+/**
+ * @brief Check that the processor maximum is one.
+ */
+static void AcfgValDefault_Action_5( void )
+{
+ T_step_eq_u32( 9, rtems_scheduler_get_processor_maximum(), 1 );
+}
+
+/**
+ * @brief Try to create a semaphore.
+ */
+static void AcfgValDefault_Action_6( void )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ sc = rtems_semaphore_create(
+ NAME,
+ 0,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ 0,
+ &id
+ );
+
+ /*
+ * Check that the returned status code is RTEMS_TOO_MANY.
+ */
+ T_step_rsc( 10, sc, RTEMS_TOO_MANY );
+}
+
+/**
+ * @brief Try to construct a task.
+ */
+static void AcfgValDefault_Action_7( void )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ sc = rtems_task_construct( &task_config, &id );
+
+ /*
+ * Check that the returned status code is RTEMS_TOO_MANY.
+ */
+ T_step_rsc( 11, sc, RTEMS_TOO_MANY );
+
+ /*
+ * Check the default CONFIGURE_MAXIMUM_TASKS value. A maximum Classic API
+ * task value of zero is only configurable if
+ * CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION is defined or
+ * CONFIGURE_MAXIMUM_POSIX_THREADS is set to a positive value. The default
+ * value of zero for CONFIGURE_MAXIMUM_POSIX_THREADS is used by the test
+ * suite containing the test case. The test suite defines
+ * CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION.
+ */
+ T_step_eq_u32( 12, rtems_configuration_get_maximum_tasks(), 0 );
+}
+
+/**
+ * @brief Try to create a timer.
+ */
+static void AcfgValDefault_Action_8( void )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ sc = rtems_timer_create( NAME, &id );
+
+ /*
+ * Check that the returned status code is RTEMS_TOO_MANY.
+ */
+ T_step_rsc( 13, sc, RTEMS_TOO_MANY );
+}
+
+/**
+ * @brief Try to create a user extension set.
+ */
+static void AcfgValDefault_Action_9( void )
+{
+ rtems_extensions_table table;
+ rtems_status_code sc;
+ rtems_id id;
+
+ memset( &table, 0, sizeof( table ) );
+ sc = rtems_extension_create( NAME, &table, &id );
+
+ /*
+ * Check that the returned status code is RTEMS_TOO_MANY.
+ */
+ T_step_rsc( 14, sc, RTEMS_TOO_MANY );
+}
+
+/**
+ * @fn void T_case_body_AcfgValDefault( void )
+ */
+T_TEST_CASE( AcfgValDefault )
+{
+ T_plan( 15 );
+
+ AcfgValDefault_Action_0();
+ AcfgValDefault_Action_1();
+ AcfgValDefault_Action_2();
+ AcfgValDefault_Action_3();
+ AcfgValDefault_Action_4();
+ AcfgValDefault_Action_5();
+ AcfgValDefault_Action_6();
+ AcfgValDefault_Action_7();
+ AcfgValDefault_Action_8();
+ AcfgValDefault_Action_9();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-acfg-disabled-bsp-settings.c b/testsuites/validation/tc-acfg-disabled-bsp-settings.c
new file mode 100644
index 0000000000..acd5d454e3
--- /dev/null
+++ b/testsuites/validation/tc-acfg-disabled-bsp-settings.c
@@ -0,0 +1,140 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup AcfgValDisabledBspSettings
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp.h>
+#include <rtems/score/userextdata.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup AcfgValDisabledBspSettings spec:/acfg/val/disabled-bsp-settings
+ *
+ * @ingroup TestsuitesValidationAcfg1
+ *
+ * @brief Tests the default values of application configuration options where
+ * all optional BSP provided settings are disabled.
+ *
+ * This test case performs the following actions:
+ *
+ * - Check the effect of application configuration options with optional
+ * BSP-provided settings.
+ *
+ * - Check the default value CONFIGURE_IDLE_TASK_BODY where the optional
+ * BSP-provided default value is disabled.
+ *
+ * - Check the default value CONFIGURE_IDLE_TASK_STACK_SIZE where the
+ * optional BSP-provided default value is disabled.
+ *
+ * - Check the default value CONFIGURE_INTERRUPT_STACK_SIZE where the
+ * optional BSP-provided default value is disabled.
+ *
+ * - Check the BSP-provided initial extension is not registered.
+ *
+ * @{
+ */
+
+/**
+ * @brief Check the effect of application configuration options with optional
+ * BSP-provided settings.
+ */
+static void AcfgValDisabledBspSettings_Action_0( void )
+{
+ rtems_extensions_table bsp = BSP_INITIAL_EXTENSION;
+
+ /*
+ * Check the default value CONFIGURE_IDLE_TASK_BODY where the optional
+ * BSP-provided default value is disabled.
+ */
+ T_eq_ptr(
+ rtems_configuration_get_idle_task(),
+ _CPU_Thread_Idle_body
+ );
+
+ /*
+ * Check the default value CONFIGURE_IDLE_TASK_STACK_SIZE where the optional
+ * BSP-provided default value is disabled.
+ */
+ T_eq_sz(
+ rtems_configuration_get_idle_task_stack_size(),
+ CPU_STACK_MINIMUM_SIZE
+ );
+
+ /*
+ * Check the default value CONFIGURE_INTERRUPT_STACK_SIZE where the optional
+ * BSP-provided default value is disabled.
+ */
+ T_eq_sz(
+ rtems_configuration_get_interrupt_stack_size(),
+ CPU_STACK_MINIMUM_SIZE
+ );
+
+ /*
+ * Check the BSP-provided initial extension is not registered.
+ */
+ T_eq_sz( _User_extensions_Initial_count, 1 );
+ T_ne_ptr(
+ _User_extensions_Initial_extensions[ 0 ].fatal,
+ bsp.fatal
+ );
+}
+
+/**
+ * @fn void T_case_body_AcfgValDisabledBspSettings( void )
+ */
+T_TEST_CASE( AcfgValDisabledBspSettings )
+{
+ AcfgValDisabledBspSettings_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-acfg-one-cpu.c b/testsuites/validation/tc-acfg-one-cpu.c
new file mode 100644
index 0000000000..8806e11b4e
--- /dev/null
+++ b/testsuites/validation/tc-acfg-one-cpu.c
@@ -0,0 +1,156 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup AcfgValOneCpu
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/schedulerpriority.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup AcfgValOneCpu spec:/acfg/val/one-cpu
+ *
+ * @ingroup TestsuitesValidationOneCpu0
+ *
+ * @brief Tests the effect of application configuration options.
+ *
+ * This test case performs the following actions:
+ *
+ * - Check the effect of application configuration options.
+ *
+ * - Check that the CONFIGURE_MAXIMUM_PRIORITY application configuration
+ * option resulted in the expected system setting using
+ * spec:/rtems/task/if/maximum-priority.
+ *
+ * - Check that the Deterministic Priority Scheduler which was configured by
+ * the CONFIGURE_SCHEDULER_PRIORITY application configuration in the test
+ * suite.
+ *
+ * - Check that we are able to identify the scheduler by the name configured
+ * by the CONFIGURE_SCHEDULER_PRIORITY application configuration option in
+ * the test suite.
+ *
+ * @{
+ */
+
+static uint32_t yield_count;
+
+void __real__Scheduler_priority_Yield(
+ const Scheduler_Control *scheduler,
+ Thread_Control *thread,
+ Scheduler_Node *node
+);
+
+void __wrap__Scheduler_priority_Yield(
+ const Scheduler_Control *scheduler,
+ Thread_Control *thread,
+ Scheduler_Node *node
+);
+
+void __wrap__Scheduler_priority_Yield(
+ const Scheduler_Control *scheduler,
+ Thread_Control *thread,
+ Scheduler_Node *node
+)
+{
+ ++yield_count;
+ __real__Scheduler_priority_Yield( scheduler, thread, node );
+}
+
+/**
+ * @brief Check the effect of application configuration options.
+ */
+static void AcfgValOneCpu_Action_0( void )
+{
+ rtems_status_code sc;
+ rtems_id id;
+ uint32_t yield_count_before;
+
+ /*
+ * Check that the CONFIGURE_MAXIMUM_PRIORITY application configuration option
+ * resulted in the expected system setting using
+ * spec:/rtems/task/if/maximum-priority.
+ */
+ T_eq_u32( RTEMS_MAXIMUM_PRIORITY, 127 );
+
+ /*
+ * Check that the Deterministic Priority Scheduler which was configured by
+ * the CONFIGURE_SCHEDULER_PRIORITY application configuration in the test
+ * suite.
+ */
+ yield_count_before = yield_count;
+ sc = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+ T_rsc_success( sc );
+ T_eq_u32( yield_count, yield_count_before + 1 );
+
+ /*
+ * Check that we are able to identify the scheduler by the name configured by
+ * the CONFIGURE_SCHEDULER_PRIORITY application configuration option in the
+ * test suite.
+ */
+ sc = rtems_scheduler_ident( TEST_SCHEDULER_A_NAME, &id );
+ T_rsc_success( sc );
+}
+
+/**
+ * @fn void T_case_body_AcfgValOneCpu( void )
+ */
+T_TEST_CASE( AcfgValOneCpu )
+{
+ AcfgValOneCpu_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-acfg-scheduler-edf-smp.c b/testsuites/validation/tc-acfg-scheduler-edf-smp.c
new file mode 100644
index 0000000000..bbd974a588
--- /dev/null
+++ b/testsuites/validation/tc-acfg-scheduler-edf-smp.c
@@ -0,0 +1,132 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup AcfgValSchedulerEdfSmp
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/scheduleredfsmp.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup AcfgValSchedulerEdfSmp spec:/acfg/val/scheduler-edf-smp
+ *
+ * @ingroup TestsuitesValidationSmpOnly0
+ *
+ * @brief Tests the effect of application configuration options.
+ *
+ * This test case performs the following actions:
+ *
+ * - Check the effect of application configuration options.
+ *
+ * - Check that the Earliest Deadline First SMP Scheduler which was
+ * configured by the CONFIGURE_SCHEDULER_EDF_SMP application configuration
+ * in the test suite.
+ *
+ * @{
+ */
+
+static uint32_t yield_count;
+
+void __real__Scheduler_EDF_SMP_Yield(
+ const Scheduler_Control *scheduler,
+ Thread_Control *thread,
+ Scheduler_Node *node
+);
+
+void __wrap__Scheduler_EDF_SMP_Yield(
+ const Scheduler_Control *scheduler,
+ Thread_Control *thread,
+ Scheduler_Node *node
+);
+
+void __wrap__Scheduler_EDF_SMP_Yield(
+ const Scheduler_Control *scheduler,
+ Thread_Control *thread,
+ Scheduler_Node *node
+)
+{
+ ++yield_count;
+ __real__Scheduler_EDF_SMP_Yield( scheduler, thread, node );
+}
+
+/**
+ * @brief Check the effect of application configuration options.
+ */
+static void AcfgValSchedulerEdfSmp_Action_0( void )
+{
+ rtems_status_code sc;
+ uint32_t yield_count_before;
+
+ /*
+ * Check that the Earliest Deadline First SMP Scheduler which was configured
+ * by the CONFIGURE_SCHEDULER_EDF_SMP application configuration in the test
+ * suite.
+ */
+ yield_count_before = yield_count;
+ sc = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+ T_rsc_success( sc );
+ T_eq_u32( yield_count, yield_count_before + 1 );
+}
+
+/**
+ * @fn void T_case_body_AcfgValSchedulerEdfSmp( void )
+ */
+T_TEST_CASE( AcfgValSchedulerEdfSmp )
+{
+ AcfgValSchedulerEdfSmp_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-acfg-scheduler-table-entries-one-cpu.c b/testsuites/validation/tc-acfg-scheduler-table-entries-one-cpu.c
new file mode 100644
index 0000000000..48db6c4244
--- /dev/null
+++ b/testsuites/validation/tc-acfg-scheduler-table-entries-one-cpu.c
@@ -0,0 +1,102 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup AcfgValSchedulerTableEntriesOneCpu
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup AcfgValSchedulerTableEntriesOneCpu \
+ * spec:/acfg/val/scheduler-table-entries-one-cpu
+ *
+ * @ingroup TestsuitesValidationOneCpu1
+ *
+ * @brief Tests the effect of CONFIGURE_SCHEDULER_TABLE_ENTRIES the application
+ * configuration options in a configuration with only one processor.
+ *
+ * This test case performs the following actions:
+ *
+ * - Check the effect of the application configuration option.
+ *
+ * - Check that the CONFIGURE_SCHEDULER_TABLE_ENTRIES application
+ * configuration option resulted in the expected system setting using
+ * RTEMS_MAXIMUM_PRIORITY.
+ *
+ * @{
+ */
+
+/**
+ * @brief Check the effect of the application configuration option.
+ */
+static void AcfgValSchedulerTableEntriesOneCpu_Action_0( void )
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the CONFIGURE_SCHEDULER_TABLE_ENTRIES application configuration
+ * option resulted in the expected system setting using
+ * RTEMS_MAXIMUM_PRIORITY.
+ */
+ T_eq_u32( RTEMS_MAXIMUM_PRIORITY, 63 );
+}
+
+/**
+ * @fn void T_case_body_AcfgValSchedulerTableEntriesOneCpu( void )
+ */
+T_TEST_CASE( AcfgValSchedulerTableEntriesOneCpu )
+{
+ AcfgValSchedulerTableEntriesOneCpu_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-acfg.c b/testsuites/validation/tc-acfg.c
new file mode 100644
index 0000000000..60f32ad929
--- /dev/null
+++ b/testsuites/validation/tc-acfg.c
@@ -0,0 +1,415 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup AcfgValAcfg
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp.h>
+#include <rtems/confdefs.h>
+#include <rtems/score/heap.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup AcfgValAcfg spec:/acfg/val/acfg
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests the effect of application configuration options.
+ *
+ * This test case performs the following actions:
+ *
+ * - Check the effect of application configuration options. In addition, this
+ * test case validates the effect of CONFIGURE_INIT. The test case includes
+ * rtems/confdefs.h without defining CONFIGURE_INIT before the include. If
+ * this header would define configuration data structures, then linking the
+ * test suite executable would result in multiple definition errors. This
+ * header is included in the test suite runner translation unit while
+ * CONFIGURE_INIT is defined before the include. If this would not result in
+ * the definition of application defined configuration data structures, then
+ * the checks below for non-default settings would fail.
+ *
+ * - Check the default value CONFIGURE_IDLE_TASK_BODY where the optional
+ * BSP-provided default value is enabled.
+ *
+ * - Check the configured CONFIGURE_INIT_TASK_ARGUMENTS. This validates also
+ * the effect of CONFIGURE_INIT_TASK_ENTRY_POINT and
+ * CONFIGURE_RTEMS_INIT_TASKS_TABLE.
+ *
+ * - Check the configured CONFIGURE_INIT_TASK_INITIAL_MODES.
+ *
+ * - Check the configured CONFIGURE_INIT_TASK_NAME.
+ *
+ * - Check the configured CONFIGURE_INIT_TASK_PRIORITY. A priority of zero
+ * can only be set for system tasks. This validates also
+ * CONFIGURE_INIT_TASK_ATTRIBUTES.
+ *
+ * - Check that the configured
+ * CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE value reduced the
+ * stack space size.
+ *
+ * - Check the configured CONFIGURE_MAXIMUM_BARRIERS value.
+ *
+ * - Check the configured CONFIGURE_MAXIMUM_USER_EXTENSIONS value.
+ *
+ * - Check the configured CONFIGURE_MAXIMUM_MESSAGE_QUEUES value.
+ *
+ * - Check the configured CONFIGURE_MAXIMUM_PARTITIONS value.
+ *
+ * - Check the configured CONFIGURE_MAXIMUM_PERIODS value.
+ *
+ * - Check the default CONFIGURE_MAXIMUM_PORTS value.
+ *
+ * - Check the configured CONFIGURE_MAXIMUM_PROCESSORS value.
+ *
+ * - Check the default CONFIGURE_MAXIMUM_REGIONS value.
+ *
+ * - Check the configured CONFIGURE_MAXIMUM_SEMAPHORES value.
+ *
+ * - Check the configured CONFIGURE_MAXIMUM_TASKS value.
+ *
+ * - Check the configured CONFIGURE_MAXIMUM_TIMERS value.
+ *
+ * - Check the configured CONFIGURE_MICROSECONDS_PER_TICK value in
+ * microseconds.
+ *
+ * - Check the configured CONFIGURE_MICROSECONDS_PER_TICK value in
+ * milliseconds.
+ *
+ * - Check the configured CONFIGURE_MICROSECONDS_PER_TICK value in
+ * nanoseconds.
+ *
+ * - Check the configured CONFIGURE_TASK_STACK_ALLOCATOR hook. Using the
+ * test stack allocator validates also
+ * spec:/acfg/if/init-task-construct-storage-size, since the
+ * test_task_stack_allocate() allocate handler only supports
+ * CONFIGURE_MAXIMUM_TASKS minus one stacks and the validation test for
+ * spec:/rtems/task/req/create-errors creates for some pre-condition
+ * variants all tasks until RTEMS_TOO_MANY is returned. In addition,
+ * test_task_stack_allocate() checks that the allocation size is greater
+ * than or equal to TEST_MINIMUM_STACK_SIZE which validates
+ * CONFIGURE_MINIMUM_TASK_STACK_SIZE.
+ *
+ * - Check the configured CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE
+ * value.
+ *
+ * - Check the configured CONFIGURE_TASK_STACK_DEALLOCATOR hook.
+ *
+ * - Check the configured CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE hook.
+ *
+ * - Check the configured CONFIGURE_IDLE_TASK_STACK_SIZE value.
+ *
+ * - Check the configured CONFIGURE_INTERRUPT_STACK_SIZE value.
+ *
+ * - Check the configured CONFIGURE_TICKS_PER_TIMESLICE value.
+ *
+ * @{
+ */
+
+/**
+ * @brief Check the effect of application configuration options. In addition,
+ * this test case validates the effect of CONFIGURE_INIT. The test case
+ * includes rtems/confdefs.h without defining CONFIGURE_INIT before the
+ * include. If this header would define configuration data structures, then
+ * linking the test suite executable would result in multiple definition
+ * errors. This header is included in the test suite runner translation unit
+ * while CONFIGURE_INIT is defined before the include. If this would not
+ * result in the definition of application defined configuration data
+ * structures, then the checks below for non-default settings would fail.
+ */
+static void AcfgValAcfg_Action_0( void )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ /*
+ * Check the default value CONFIGURE_IDLE_TASK_BODY where the optional
+ * BSP-provided default value is enabled.
+ */
+ T_eq_ptr(
+ rtems_configuration_get_idle_task(),
+ #if defined(BSP_IDLE_TASK_BODY)
+ BSP_IDLE_TASK_BODY
+ #else
+ _CPU_Thread_Idle_body
+ #endif
+ );
+
+ /*
+ * Check the configured CONFIGURE_INIT_TASK_ARGUMENTS. This validates also
+ * the effect of CONFIGURE_INIT_TASK_ENTRY_POINT and
+ * CONFIGURE_RTEMS_INIT_TASKS_TABLE.
+ */
+ T_eq_ulong( test_runner_argument, TEST_RUNNER_ARGUMENT );
+
+ /*
+ * Check the configured CONFIGURE_INIT_TASK_INITIAL_MODES.
+ */
+ T_eq_u32( test_runner_initial_modes, TEST_RUNNER_INITIAL_MODES );
+
+ /*
+ * Check the configured CONFIGURE_INIT_TASK_NAME.
+ */
+ sc = rtems_task_ident( TEST_RUNNER_NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc_success( sc );
+ T_eq_u32( id, rtems_task_self() );
+
+ /*
+ * Check the configured CONFIGURE_INIT_TASK_PRIORITY. A priority of zero can
+ * only be set for system tasks. This validates also
+ * CONFIGURE_INIT_TASK_ATTRIBUTES.
+ */
+ T_eq_u32( test_runner_initial_priority, 0 );
+
+ /*
+ * Check that the configured
+ * CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE value reduced the stack
+ * space size.
+ */
+ T_eq_uptr(
+ _Stack_Space_size,
+ RTEMS_ALIGN_UP( HEAP_BLOCK_HEADER_SIZE, CPU_HEAP_ALIGNMENT )
+ );
+
+ /*
+ * Check the configured CONFIGURE_MAXIMUM_BARRIERS value.
+ */
+ T_eq_u32(
+ rtems_configuration_get_maximum_barriers(),
+ TEST_MAXIMUM_BARRIERS
+ );
+
+ /*
+ * Check the configured CONFIGURE_MAXIMUM_USER_EXTENSIONS value.
+ */
+ T_eq_u32(
+ rtems_configuration_get_maximum_extensions(),
+ TEST_MAXIMUM_USER_EXTENSIONS
+ );
+
+ /*
+ * Check the configured CONFIGURE_MAXIMUM_MESSAGE_QUEUES value.
+ */
+ T_eq_u32(
+ rtems_configuration_get_maximum_message_queues(),
+ TEST_MAXIMUM_MESSAGE_QUEUES
+ );
+
+ /*
+ * Check the configured CONFIGURE_MAXIMUM_PARTITIONS value.
+ */
+ T_eq_u32(
+ rtems_configuration_get_maximum_partitions(),
+ TEST_MAXIMUM_PARTITIONS
+ );
+
+ /*
+ * Check the configured CONFIGURE_MAXIMUM_PERIODS value.
+ */
+ T_eq_u32(
+ rtems_configuration_get_maximum_periods(),
+ TEST_MAXIMUM_PERIODS
+ );
+
+ /*
+ * Check the default CONFIGURE_MAXIMUM_PORTS value.
+ */
+ T_eq_u32(
+ rtems_configuration_get_maximum_ports(),
+ 0
+ );
+
+ /*
+ * Check the configured CONFIGURE_MAXIMUM_PROCESSORS value.
+ */
+ T_eq_u32(
+ rtems_configuration_get_maximum_processors(),
+ #if defined(RTEMS_SMP)
+ 5
+ #else
+ 1
+ #endif
+ );
+
+ /*
+ * Check the default CONFIGURE_MAXIMUM_REGIONS value.
+ */
+ T_eq_u32(
+ rtems_configuration_get_maximum_regions(),
+ 0
+ );
+
+ /*
+ * Check the configured CONFIGURE_MAXIMUM_SEMAPHORES value.
+ */
+ T_eq_u32(
+ rtems_configuration_get_maximum_semaphores(),
+ TEST_MAXIMUM_SEMAPHORES
+ );
+
+ /*
+ * Check the configured CONFIGURE_MAXIMUM_TASKS value.
+ */
+ T_eq_u32(
+ rtems_configuration_get_maximum_tasks(),
+ TEST_MAXIMUM_TASKS
+ );
+
+ /*
+ * Check the configured CONFIGURE_MAXIMUM_TIMERS value.
+ */
+ T_eq_u32(
+ rtems_configuration_get_maximum_timers(),
+ TEST_MAXIMUM_TIMERS
+ );
+
+ /*
+ * Check the configured CONFIGURE_MICROSECONDS_PER_TICK value in
+ * microseconds.
+ */
+ T_eq_u32(
+ rtems_configuration_get_microseconds_per_tick(),
+ TEST_MICROSECONDS_PER_TICK
+ );
+
+ /*
+ * Check the configured CONFIGURE_MICROSECONDS_PER_TICK value in
+ * milliseconds.
+ */
+ T_eq_u32(
+ rtems_configuration_get_milliseconds_per_tick(),
+ TEST_MICROSECONDS_PER_TICK / 1000
+ );
+
+ /*
+ * Check the configured CONFIGURE_MICROSECONDS_PER_TICK value in nanoseconds.
+ */
+ T_eq_u32(
+ rtems_configuration_get_nanoseconds_per_tick(),
+ TEST_MICROSECONDS_PER_TICK * 1000
+ );
+
+ /*
+ * Check the configured CONFIGURE_TASK_STACK_ALLOCATOR hook. Using the test
+ * stack allocator validates also
+ * spec:/acfg/if/init-task-construct-storage-size, since the
+ * test_task_stack_allocate() allocate handler only supports
+ * CONFIGURE_MAXIMUM_TASKS minus one stacks and the validation test for
+ * spec:/rtems/task/req/create-errors creates for some pre-condition variants
+ * all tasks until RTEMS_TOO_MANY is returned. In addition,
+ * test_task_stack_allocate() checks that the allocation size is greater than
+ * or equal to TEST_MINIMUM_STACK_SIZE which validates
+ * CONFIGURE_MINIMUM_TASK_STACK_SIZE.
+ */
+ T_eq_ptr(
+ rtems_configuration_get_stack_allocate_hook(),
+ test_task_stack_allocate
+ );
+
+ /*
+ * Check the configured CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE
+ * value.
+ */
+ T_true( rtems_configuration_get_stack_allocator_avoids_work_space() );
+
+ /*
+ * Check the configured CONFIGURE_TASK_STACK_DEALLOCATOR hook.
+ */
+ T_eq_ptr(
+ rtems_configuration_get_stack_free_hook(),
+ test_task_stack_deallocate
+ );
+
+ /*
+ * Check the configured CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE hook.
+ */
+ T_eq_ptr(
+ rtems_configuration_get_stack_allocate_for_idle_hook(),
+ test_idle_task_stack_allocate
+ );
+
+ /*
+ * Check the configured CONFIGURE_IDLE_TASK_STACK_SIZE value.
+ */
+ T_eq_sz(
+ rtems_configuration_get_idle_task_stack_size(),
+ TEST_IDLE_STACK_SIZE
+ );
+
+ /*
+ * Check the configured CONFIGURE_INTERRUPT_STACK_SIZE value.
+ */
+ T_eq_sz(
+ rtems_configuration_get_interrupt_stack_size(),
+ TEST_INTERRUPT_STACK_SIZE
+ );
+
+ /*
+ * Check the configured CONFIGURE_TICKS_PER_TIMESLICE value.
+ */
+ T_eq_u32(
+ rtems_configuration_get_ticks_per_timeslice(),
+ TEST_TICKS_PER_TIMESLICE
+ );
+}
+
+/**
+ * @fn void T_case_body_AcfgValAcfg( void )
+ */
+T_TEST_CASE( AcfgValAcfg )
+{
+ AcfgValAcfg_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-attr.c b/testsuites/validation/tc-attr.c
new file mode 100644
index 0000000000..05128372bf
--- /dev/null
+++ b/testsuites/validation/tc-attr.c
@@ -0,0 +1,350 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsAttrValAttr
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsAttrValAttr spec:/rtems/attr/val/attr
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests the attribute constants of the Classic API.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate the non-default attribute constants.
+ *
+ * - Check that RTEMS_BARRIER_AUTOMATIC_RELEASE is a power of two.
+ *
+ * - Check that RTEMS_BINARY_SEMAPHORE is a power of two.
+ *
+ * - Check that RTEMS_FLOATING_POINT is a power of two.
+ *
+ * - Check that RTEMS_GLOBAL is a power of two.
+ *
+ * - Check that RTEMS_INHERIT_PRIORITY is a power of two.
+ *
+ * - Check that RTEMS_MULTIPROCESSOR_RESOURCE_SHARING is a power of two.
+ *
+ * - Check that RTEMS_PRIORITY is a power of two.
+ *
+ * - Check that RTEMS_PRIORITY_CEILING is a power of two.
+ *
+ * - Check that RTEMS_SIMPLE_BINARY_SEMAPHORE is a power of two.
+ *
+ * - Check that RTEMS_SYSTEM_TASK is a power of two.
+ *
+ * - Validate the default attribute constants.
+ *
+ * - Check that RTEMS_APPLICATION_TASK is equal to zero.
+ *
+ * - Check that RTEMS_BARRIER_MANUAL_RELEASE is equal to zero.
+ *
+ * - Check that RTEMS_COUNTING_SEMAPHORE is equal to zero.
+ *
+ * - Check that RTEMS_DEFAULT_ATTRIBUTES is equal to zero.
+ *
+ * - Check that RTEMS_FIFO is equal to zero.
+ *
+ * - Check that RTEMS_LOCAL is equal to zero.
+ *
+ * - Check that RTEMS_NO_FLOATING_POINT is equal to zero.
+ *
+ * - Check that RTEMS_NO_INHERIT_PRIORITY is equal to zero.
+ *
+ * - Check that RTEMS_NO_MULTIPROCESSOR_RESOURCE_SHARING is equal to zero.
+ *
+ * - Check that RTEMS_NO_PRIORITY_CEILING is equal to zero.
+ *
+ * - Calculate the bitwise or of all non-default attribute constants.
+ *
+ * - Check that the count of set bits in the calculated value is equal to the
+ * count of non-default attribute constants. Since each non-default
+ * attribute constant is a power of two, this proves that each constant has
+ * a unique value.
+ *
+ * - Calculate the bitwise or of the RTEMS_BINARY_SEMAPHORE,
+ * RTEMS_COUNTING_SEMAPHORE, and RTEMS_SIMPLE_BINARY_SEMAPHORE attribute
+ * constants.
+ *
+ * - Check that the calculated value is equal to RTEMS_SEMAPHORE_CLASS.
+ *
+ * - Check the value of RTEMS_DEFAULT_ATTRIBUTES.
+ *
+ * - Check RTEMS_DEFAULT_ATTRIBUTES equals RTEMS_FIFO | RTEMS_LOCAL.
+ *
+ * @{
+ */
+
+static bool IsPowerOfTwo( rtems_attribute attribute )
+{
+ return attribute != 0 && ( attribute & ( attribute - 1 ) ) == 0;
+}
+
+static int PopCount( rtems_attribute attributes )
+{
+ int count;
+
+ count = 0;
+
+ while ( attributes != 0 ) {
+ ++count;
+ attributes &= attributes - 1;
+ }
+
+ return count;
+}
+
+/**
+ * @brief Validate the non-default attribute constants.
+ */
+static void RtemsAttrValAttr_Action_0( void )
+{
+ /* No action */
+
+ /*
+ * Check that RTEMS_BARRIER_AUTOMATIC_RELEASE is a power of two.
+ */
+ T_step_true( 0, IsPowerOfTwo( RTEMS_BARRIER_AUTOMATIC_RELEASE ) );
+
+ /*
+ * Check that RTEMS_BINARY_SEMAPHORE is a power of two.
+ */
+ T_step_true( 1, IsPowerOfTwo( RTEMS_BINARY_SEMAPHORE ) );
+
+ /*
+ * Check that RTEMS_FLOATING_POINT is a power of two.
+ */
+ T_step_true( 2, IsPowerOfTwo( RTEMS_FLOATING_POINT ) );
+
+ /*
+ * Check that RTEMS_GLOBAL is a power of two.
+ */
+ T_step_true( 3, IsPowerOfTwo( RTEMS_GLOBAL ) );
+
+ /*
+ * Check that RTEMS_INHERIT_PRIORITY is a power of two.
+ */
+ T_step_true( 4, IsPowerOfTwo( RTEMS_INHERIT_PRIORITY ) );
+
+ /*
+ * Check that RTEMS_MULTIPROCESSOR_RESOURCE_SHARING is a power of two.
+ */
+ T_step_true(
+ 5,
+ IsPowerOfTwo( RTEMS_MULTIPROCESSOR_RESOURCE_SHARING )
+ );
+
+ /*
+ * Check that RTEMS_PRIORITY is a power of two.
+ */
+ T_step_true( 6, IsPowerOfTwo( RTEMS_PRIORITY ) );
+
+ /*
+ * Check that RTEMS_PRIORITY_CEILING is a power of two.
+ */
+ T_step_true( 7, IsPowerOfTwo( RTEMS_PRIORITY_CEILING ) );
+
+ /*
+ * Check that RTEMS_SIMPLE_BINARY_SEMAPHORE is a power of two.
+ */
+ T_step_true( 8, IsPowerOfTwo( RTEMS_SIMPLE_BINARY_SEMAPHORE ) );
+
+ /*
+ * Check that RTEMS_SYSTEM_TASK is a power of two.
+ */
+ T_step_true( 9, IsPowerOfTwo( RTEMS_SYSTEM_TASK ) );
+}
+
+/**
+ * @brief Validate the default attribute constants.
+ */
+static void RtemsAttrValAttr_Action_1( void )
+{
+ /* No action */
+
+ /*
+ * Check that RTEMS_APPLICATION_TASK is equal to zero.
+ */
+ T_step_eq_u32( 10, RTEMS_APPLICATION_TASK, 0 );
+
+ /*
+ * Check that RTEMS_BARRIER_MANUAL_RELEASE is equal to zero.
+ */
+ T_step_eq_u32( 11, RTEMS_BARRIER_MANUAL_RELEASE, 0 );
+
+ /*
+ * Check that RTEMS_COUNTING_SEMAPHORE is equal to zero.
+ */
+ T_step_eq_u32( 12, RTEMS_COUNTING_SEMAPHORE, 0 );
+
+ /*
+ * Check that RTEMS_DEFAULT_ATTRIBUTES is equal to zero.
+ */
+ T_step_eq_u32( 13, RTEMS_DEFAULT_ATTRIBUTES, 0 );
+
+ /*
+ * Check that RTEMS_FIFO is equal to zero.
+ */
+ T_step_eq_u32( 14, RTEMS_FIFO, 0 );
+
+ /*
+ * Check that RTEMS_LOCAL is equal to zero.
+ */
+ T_step_eq_u32( 15, RTEMS_LOCAL, 0 );
+
+ /*
+ * Check that RTEMS_NO_FLOATING_POINT is equal to zero.
+ */
+ T_step_eq_u32( 16, RTEMS_NO_FLOATING_POINT, 0 );
+
+ /*
+ * Check that RTEMS_NO_INHERIT_PRIORITY is equal to zero.
+ */
+ T_step_eq_u32( 17, RTEMS_NO_INHERIT_PRIORITY, 0 );
+
+ /*
+ * Check that RTEMS_NO_MULTIPROCESSOR_RESOURCE_SHARING is equal to zero.
+ */
+ T_step_eq_u32( 18, RTEMS_NO_MULTIPROCESSOR_RESOURCE_SHARING, 0 );
+
+ /*
+ * Check that RTEMS_NO_PRIORITY_CEILING is equal to zero.
+ */
+ T_step_eq_u32( 19, RTEMS_NO_PRIORITY_CEILING, 0 );
+}
+
+/**
+ * @brief Calculate the bitwise or of all non-default attribute constants.
+ */
+static void RtemsAttrValAttr_Action_2( void )
+{
+ rtems_attribute attributes;
+
+ attributes = 0;
+ attributes |= RTEMS_BARRIER_AUTOMATIC_RELEASE;
+ attributes |= RTEMS_BINARY_SEMAPHORE;
+ attributes |= RTEMS_FLOATING_POINT;
+ attributes |= RTEMS_GLOBAL;
+ attributes |= RTEMS_INHERIT_PRIORITY;
+ attributes |= RTEMS_MULTIPROCESSOR_RESOURCE_SHARING;
+ attributes |= RTEMS_PRIORITY;
+ attributes |= RTEMS_PRIORITY_CEILING;
+ attributes |= RTEMS_SEMAPHORE_CLASS;
+ attributes |= RTEMS_SIMPLE_BINARY_SEMAPHORE;
+ attributes |= RTEMS_SYSTEM_TASK;
+
+ /*
+ * Check that the count of set bits in the calculated value is equal to the
+ * count of non-default attribute constants. Since each non-default
+ * attribute constant is a power of two, this proves that each constant has a
+ * unique value.
+ */
+ T_step_eq_int( 20, PopCount( attributes ), 10 );
+}
+
+/**
+ * @brief Calculate the bitwise or of the RTEMS_BINARY_SEMAPHORE,
+ * RTEMS_COUNTING_SEMAPHORE, and RTEMS_SIMPLE_BINARY_SEMAPHORE attribute
+ * constants.
+ */
+static void RtemsAttrValAttr_Action_3( void )
+{
+ rtems_attribute attributes;
+
+ attributes = 0;
+ attributes |= RTEMS_BINARY_SEMAPHORE;
+ attributes |= RTEMS_COUNTING_SEMAPHORE;
+ attributes |= RTEMS_SIMPLE_BINARY_SEMAPHORE;
+
+ /*
+ * Check that the calculated value is equal to RTEMS_SEMAPHORE_CLASS.
+ */
+ T_step_eq_u32( 21, RTEMS_SEMAPHORE_CLASS, attributes );
+}
+
+/**
+ * @brief Check the value of RTEMS_DEFAULT_ATTRIBUTES.
+ */
+static void RtemsAttrValAttr_Action_4( void )
+{
+ /* No action */
+
+ /*
+ * Check RTEMS_DEFAULT_ATTRIBUTES equals RTEMS_FIFO | RTEMS_LOCAL.
+ */
+ T_step_eq_int(
+ 22,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ RTEMS_FIFO | RTEMS_LOCAL
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsAttrValAttr( void )
+ */
+T_TEST_CASE( RtemsAttrValAttr )
+{
+ T_plan( 23 );
+
+ RtemsAttrValAttr_Action_0();
+ RtemsAttrValAttr_Action_1();
+ RtemsAttrValAttr_Action_2();
+ RtemsAttrValAttr_Action_3();
+ RtemsAttrValAttr_Action_4();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-barrier-create.c b/testsuites/validation/tc-barrier-create.c
index 628d1a4a09..ba35d0ad97 100644
--- a/testsuites/validation/tc-barrier-create.c
+++ b/testsuites/validation/tc-barrier-create.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsBarrierReqCreate
+ * @ingroup RtemsBarrierReqCreate
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -60,9 +60,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsBarrierReqCreate spec:/rtems/barrier/req/create
+ * @defgroup RtemsBarrierReqCreate spec:/rtems/barrier/req/create
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationNoClock0
*
* @{
*/
diff --git a/testsuites/validation/tc-barrier-delete.c b/testsuites/validation/tc-barrier-delete.c
index df974fd374..456459c343 100644
--- a/testsuites/validation/tc-barrier-delete.c
+++ b/testsuites/validation/tc-barrier-delete.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsBarrierReqDelete
+ * @ingroup RtemsBarrierReqDelete
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -60,9 +60,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsBarrierReqDelete spec:/rtems/barrier/req/delete
+ * @defgroup RtemsBarrierReqDelete spec:/rtems/barrier/req/delete
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationNoClock0
*
* @{
*/
diff --git a/testsuites/validation/tc-barrier-ident.c b/testsuites/validation/tc-barrier-ident.c
new file mode 100644
index 0000000000..0378301fb8
--- /dev/null
+++ b/testsuites/validation/tc-barrier-ident.c
@@ -0,0 +1,119 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsBarrierValIdent
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident-local.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsBarrierValIdent spec:/rtems/barrier/val/ident
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Test the rtems_barrier_ident() directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API partition
+ * class objects defined by spec:/rtems/req/ident-local.
+ *
+ * @{
+ */
+
+#define NAME_LOCAL_OBJECT rtems_build_name( 'B', 'A', 'R', 'R' )
+
+static rtems_status_code ClassicBarrierIdentAction(
+ rtems_name name,
+ rtems_id *id
+)
+{
+ return rtems_barrier_ident( name, id );
+}
+
+/**
+ * @brief Run the generic object identification tests for Classic API partition
+ * class objects defined by spec:/rtems/req/ident-local.
+ */
+static void RtemsBarrierValIdent_Action_0( void )
+{
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_barrier_create(
+ NAME_LOCAL_OBJECT,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ 1,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdentLocal_Run(
+ id_local_object,
+ NAME_LOCAL_OBJECT,
+ ClassicBarrierIdentAction
+ );
+
+ sc = rtems_barrier_delete( id_local_object );
+ T_rsc_success( sc );
+}
+
+/**
+ * @fn void T_case_body_RtemsBarrierValIdent( void )
+ */
+T_TEST_CASE( RtemsBarrierValIdent )
+{
+ RtemsBarrierValIdent_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-barrier-performance.c b/testsuites/validation/tc-barrier-performance.c
new file mode 100644
index 0000000000..52ca8685b6
--- /dev/null
+++ b/testsuites/validation/tc-barrier-performance.c
@@ -0,0 +1,638 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsBarrierValPerf
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsBarrierValPerf spec:/rtems/barrier/val/perf
+ *
+ * @ingroup TestsuitesPerformanceNoClock0
+ *
+ * @brief This test case provides a context to run @ref RTEMSAPIClassicBarrier
+ * performance tests.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/rtems/barrier/val/perf test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides a barrier identifier.
+ */
+ rtems_id barrier_id;
+
+ /**
+ * @brief This member provides a worker identifier.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member provides a status code.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member references the measure runtime context.
+ */
+ T_measure_runtime_context *context;
+
+ /**
+ * @brief This member provides the measure runtime request.
+ */
+ T_measure_runtime_request request;
+
+ /**
+ * @brief This member provides an optional measurement begin time point.
+ */
+ T_ticks begin;
+
+ /**
+ * @brief This member provides an optional measurement end time point.
+ */
+ T_ticks end;
+} RtemsBarrierValPerf_Context;
+
+static RtemsBarrierValPerf_Context
+ RtemsBarrierValPerf_Instance;
+
+typedef RtemsBarrierValPerf_Context Context;
+
+static void BarrierWaitWorker( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ rtems_status_code sc;
+
+ sc = rtems_barrier_wait( ctx->barrier_id, RTEMS_NO_TIMEOUT );
+ ctx->end = T_tick();
+ T_quiet_rsc_success( sc );
+ }
+}
+
+static void RtemsBarrierValPerf_Setup_Context(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ T_measure_runtime_config config;
+
+ memset( &config, 0, sizeof( config ) );
+ config.sample_count = 100;
+ ctx->request.arg = ctx;
+ ctx->request.flags = T_MEASURE_RUNTIME_REPORT_SAMPLES;
+ ctx->context = T_measure_runtime_create( &config );
+ T_assert_not_null( ctx->context );
+}
+
+static void RtemsBarrierValPerf_Setup_Wrap( void *arg )
+{
+ RtemsBarrierValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsBarrierValPerf_Setup_Context( ctx );
+}
+
+static T_fixture RtemsBarrierValPerf_Fixture = {
+ .setup = RtemsBarrierValPerf_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &RtemsBarrierValPerf_Instance
+};
+
+/**
+ * @defgroup RtemsBarrierReqPerfReleaseAuto \
+ * spec:/rtems/barrier/req/perf-release-auto
+ *
+ * @{
+ */
+
+/**
+ * @brief Create an automatic release barrier.
+ */
+static void RtemsBarrierReqPerfReleaseAuto_Prepare(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_barrier_create(
+ OBJECT_NAME,
+ RTEMS_BARRIER_AUTOMATIC_RELEASE,
+ 1,
+ &ctx->barrier_id
+ );
+ T_rsc_success( sc );
+}
+
+/**
+ * @brief Automatically release the barrier.
+ */
+static void RtemsBarrierReqPerfReleaseAuto_Body(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ ctx->status = rtems_barrier_wait( ctx->barrier_id, RTEMS_NO_TIMEOUT );
+}
+
+static void RtemsBarrierReqPerfReleaseAuto_Body_Wrap( void *arg )
+{
+ RtemsBarrierValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsBarrierReqPerfReleaseAuto_Body( ctx );
+}
+
+/**
+ * @brief Discard samples interrupted by a clock tick.
+ */
+static bool RtemsBarrierReqPerfReleaseAuto_Teardown(
+ RtemsBarrierValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ return tic == toc;
+}
+
+static bool RtemsBarrierReqPerfReleaseAuto_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsBarrierValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsBarrierReqPerfReleaseAuto_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/**
+ * @brief Delete the barrier and the worker.
+ */
+static void RtemsBarrierReqPerfReleaseAuto_Cleanup(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_barrier_delete( ctx->barrier_id );
+ T_rsc_success( sc );
+}
+
+/** @} */
+
+#if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsBarrierReqPerfReleaseAutoOtherCpu \
+ * spec:/rtems/barrier/req/perf-release-auto-other-cpu
+ *
+ * @{
+ */
+
+/**
+ * @brief Create an automatic release barrier. Create and start a worker task.
+ */
+static void RtemsBarrierReqPerfReleaseAutoOtherCpu_Prepare(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_barrier_create(
+ OBJECT_NAME,
+ RTEMS_BARRIER_AUTOMATIC_RELEASE,
+ 2,
+ &ctx->barrier_id
+ );
+ T_rsc_success( sc );
+
+ ctx->worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ SetScheduler( ctx->worker_id, SCHEDULER_B_ID, PRIO_NORMAL );
+ StartTask( ctx->worker_id, BarrierWaitWorker, ctx );
+ WaitForNextTask( 1, ctx->worker_id );
+}
+
+/**
+ * @brief Automatically release the barrier.
+ */
+static void RtemsBarrierReqPerfReleaseAutoOtherCpu_Body(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ ctx->begin = T_tick();
+ ctx->status = rtems_barrier_wait( ctx->barrier_id, RTEMS_NO_TIMEOUT );
+}
+
+static void RtemsBarrierReqPerfReleaseAutoOtherCpu_Body_Wrap( void *arg )
+{
+ RtemsBarrierValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsBarrierReqPerfReleaseAutoOtherCpu_Body( ctx );
+}
+
+/**
+ * @brief Make sure the worker waits for the next event. Set the measured
+ * runtime. Discard samples interrupted by a clock tick.
+ */
+static bool RtemsBarrierReqPerfReleaseAutoOtherCpu_Teardown(
+ RtemsBarrierValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ WaitForNextTask( 1, ctx->worker_id );
+ *delta = ctx->end - ctx->begin;
+
+ return tic == toc;
+}
+
+static bool RtemsBarrierReqPerfReleaseAutoOtherCpu_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsBarrierValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsBarrierReqPerfReleaseAutoOtherCpu_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/**
+ * @brief Delete the barrier and the worker.
+ */
+static void RtemsBarrierReqPerfReleaseAutoOtherCpu_Cleanup(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ DeleteTask( ctx->worker_id );
+
+ sc = rtems_barrier_delete( ctx->barrier_id );
+ T_rsc_success( sc );
+}
+
+/** @} */
+#endif
+
+/**
+ * @defgroup RtemsBarrierReqPerfReleaseManual \
+ * spec:/rtems/barrier/req/perf-release-manual
+ *
+ * @{
+ */
+
+/**
+ * @brief Create a manual release barrier. Create and start a worker task.
+ */
+static void RtemsBarrierReqPerfReleaseManual_Prepare(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_barrier_create(
+ OBJECT_NAME,
+ RTEMS_BARRIER_MANUAL_RELEASE,
+ 0,
+ &ctx->barrier_id
+ );
+ T_rsc_success( sc );
+
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ StartTask( ctx->worker_id, BarrierWaitWorker, ctx );
+}
+
+/**
+ * @brief Make sure the worker task is fully blocked on the barrier.
+ */
+static void RtemsBarrierReqPerfReleaseManual_Setup(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ Yield();
+}
+
+static void RtemsBarrierReqPerfReleaseManual_Setup_Wrap( void *arg )
+{
+ RtemsBarrierValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsBarrierReqPerfReleaseManual_Setup( ctx );
+}
+
+/**
+ * @brief Release the barrier.
+ */
+static void RtemsBarrierReqPerfReleaseManual_Body(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ uint32_t count;
+
+ ctx->status = rtems_barrier_release( ctx->barrier_id, &count );
+}
+
+static void RtemsBarrierReqPerfReleaseManual_Body_Wrap( void *arg )
+{
+ RtemsBarrierValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsBarrierReqPerfReleaseManual_Body( ctx );
+}
+
+/**
+ * @brief Discard samples interrupted by a clock tick.
+ */
+static bool RtemsBarrierReqPerfReleaseManual_Teardown(
+ RtemsBarrierValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ return tic == toc;
+}
+
+static bool RtemsBarrierReqPerfReleaseManual_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsBarrierValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsBarrierReqPerfReleaseManual_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/**
+ * @brief Delete the barrier and the worker.
+ */
+static void RtemsBarrierReqPerfReleaseManual_Cleanup(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ DeleteTask( ctx->worker_id );
+
+ sc = rtems_barrier_delete( ctx->barrier_id );
+ T_rsc_success( sc );
+
+ RestoreRunnerPriority();
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsBarrierReqPerfReleaseManualPreempt \
+ * spec:/rtems/barrier/req/perf-release-manual-preempt
+ *
+ * @{
+ */
+
+/**
+ * @brief Create a manual release barrier. Create and start a worker task.
+ */
+static void RtemsBarrierReqPerfReleaseManualPreempt_Prepare(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_barrier_create(
+ OBJECT_NAME,
+ RTEMS_BARRIER_MANUAL_RELEASE,
+ 0,
+ &ctx->barrier_id
+ );
+ T_rsc_success( sc );
+
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, BarrierWaitWorker, ctx );
+}
+
+/**
+ * @brief Release the barrier.
+ */
+static void RtemsBarrierReqPerfReleaseManualPreempt_Body(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ uint32_t count;
+
+ ctx->begin = T_tick();
+ ctx->status = rtems_barrier_release( ctx->barrier_id, &count );
+}
+
+static void RtemsBarrierReqPerfReleaseManualPreempt_Body_Wrap( void *arg )
+{
+ RtemsBarrierValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsBarrierReqPerfReleaseManualPreempt_Body( ctx );
+}
+
+/**
+ * @brief Set the measured runtime. Discard samples interrupted by a clock
+ * tick.
+ */
+static bool RtemsBarrierReqPerfReleaseManualPreempt_Teardown(
+ RtemsBarrierValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ *delta = ctx->end - ctx->begin;
+
+ return tic == toc;
+}
+
+static bool RtemsBarrierReqPerfReleaseManualPreempt_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsBarrierValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsBarrierReqPerfReleaseManualPreempt_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/**
+ * @brief Delete the barrier and the worker.
+ */
+static void RtemsBarrierReqPerfReleaseManualPreempt_Cleanup(
+ RtemsBarrierValPerf_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ DeleteTask( ctx->worker_id );
+
+ sc = rtems_barrier_delete( ctx->barrier_id );
+ T_rsc_success( sc );
+
+ RestoreRunnerPriority();
+}
+
+/** @} */
+
+/**
+ * @fn void T_case_body_RtemsBarrierValPerf( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsBarrierValPerf, &RtemsBarrierValPerf_Fixture )
+{
+ RtemsBarrierValPerf_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ RtemsBarrierReqPerfReleaseAuto_Prepare( ctx );
+ ctx->request.name = "RtemsBarrierReqPerfReleaseAuto";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsBarrierReqPerfReleaseAuto_Body_Wrap;
+ ctx->request.teardown = RtemsBarrierReqPerfReleaseAuto_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsBarrierReqPerfReleaseAuto_Cleanup( ctx );
+
+ #if defined(RTEMS_SMP)
+ RtemsBarrierReqPerfReleaseAutoOtherCpu_Prepare( ctx );
+ ctx->request.name = "RtemsBarrierReqPerfReleaseAutoOtherCpu";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsBarrierReqPerfReleaseAutoOtherCpu_Body_Wrap;
+ ctx->request.teardown = RtemsBarrierReqPerfReleaseAutoOtherCpu_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsBarrierReqPerfReleaseAutoOtherCpu_Cleanup( ctx );
+ #endif
+
+ RtemsBarrierReqPerfReleaseManual_Prepare( ctx );
+ ctx->request.name = "RtemsBarrierReqPerfReleaseManual";
+ ctx->request.setup = RtemsBarrierReqPerfReleaseManual_Setup_Wrap;
+ ctx->request.body = RtemsBarrierReqPerfReleaseManual_Body_Wrap;
+ ctx->request.teardown = RtemsBarrierReqPerfReleaseManual_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsBarrierReqPerfReleaseManual_Cleanup( ctx );
+
+ RtemsBarrierReqPerfReleaseManualPreempt_Prepare( ctx );
+ ctx->request.name = "RtemsBarrierReqPerfReleaseManualPreempt";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsBarrierReqPerfReleaseManualPreempt_Body_Wrap;
+ ctx->request.teardown = RtemsBarrierReqPerfReleaseManualPreempt_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsBarrierReqPerfReleaseManualPreempt_Cleanup( ctx );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-barrier-release.c b/testsuites/validation/tc-barrier-release.c
index de77e22027..b584943531 100644
--- a/testsuites/validation/tc-barrier-release.c
+++ b/testsuites/validation/tc-barrier-release.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsBarrierReqRelease
+ * @ingroup RtemsBarrierReqRelease
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -60,10 +60,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsBarrierReqRelease \
- * spec:/rtems/barrier/req/release
+ * @defgroup RtemsBarrierReqRelease spec:/rtems/barrier/req/release
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationNoClock0
*
* @{
*/
@@ -131,6 +130,12 @@ typedef struct {
struct {
/**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 3 ];
+
+ /**
* @brief This member defines the pre-condition states for the next action.
*/
size_t pcs[ 3 ];
@@ -500,16 +505,27 @@ static inline RtemsBarrierReqRelease_Entry RtemsBarrierReqRelease_PopEntry(
];
}
+static void RtemsBarrierReqRelease_SetPreConditionStates(
+ RtemsBarrierReqRelease_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+
+ if ( ctx->Map.entry.Pre_Waiting_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsBarrierReqRelease_Pre_Waiting_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+}
+
static void RtemsBarrierReqRelease_TestVariant(
RtemsBarrierReqRelease_Context *ctx
)
{
RtemsBarrierReqRelease_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
RtemsBarrierReqRelease_Pre_Released_Prepare( ctx, ctx->Map.pcs[ 1 ] );
- RtemsBarrierReqRelease_Pre_Waiting_Prepare(
- ctx,
- ctx->Map.entry.Pre_Waiting_NA ? RtemsBarrierReqRelease_Pre_Waiting_NA : ctx->Map.pcs[ 2 ]
- );
+ RtemsBarrierReqRelease_Pre_Waiting_Prepare( ctx, ctx->Map.pcs[ 2 ] );
RtemsBarrierReqRelease_Action( ctx );
RtemsBarrierReqRelease_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
RtemsBarrierReqRelease_Post_ReleasedVar_Check(
@@ -530,21 +546,22 @@ T_TEST_CASE_FIXTURE( RtemsBarrierReqRelease, &RtemsBarrierReqRelease_Fixture )
ctx->Map.index = 0;
for (
- ctx->Map.pcs[ 0 ] = RtemsBarrierReqRelease_Pre_Id_NoObj;
- ctx->Map.pcs[ 0 ] < RtemsBarrierReqRelease_Pre_Id_NA;
- ++ctx->Map.pcs[ 0 ]
+ ctx->Map.pci[ 0 ] = RtemsBarrierReqRelease_Pre_Id_NoObj;
+ ctx->Map.pci[ 0 ] < RtemsBarrierReqRelease_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
) {
for (
- ctx->Map.pcs[ 1 ] = RtemsBarrierReqRelease_Pre_Released_Valid;
- ctx->Map.pcs[ 1 ] < RtemsBarrierReqRelease_Pre_Released_NA;
- ++ctx->Map.pcs[ 1 ]
+ ctx->Map.pci[ 1 ] = RtemsBarrierReqRelease_Pre_Released_Valid;
+ ctx->Map.pci[ 1 ] < RtemsBarrierReqRelease_Pre_Released_NA;
+ ++ctx->Map.pci[ 1 ]
) {
for (
- ctx->Map.pcs[ 2 ] = RtemsBarrierReqRelease_Pre_Waiting_Zero;
- ctx->Map.pcs[ 2 ] < RtemsBarrierReqRelease_Pre_Waiting_NA;
- ++ctx->Map.pcs[ 2 ]
+ ctx->Map.pci[ 2 ] = RtemsBarrierReqRelease_Pre_Waiting_Zero;
+ ctx->Map.pci[ 2 ] < RtemsBarrierReqRelease_Pre_Waiting_NA;
+ ++ctx->Map.pci[ 2 ]
) {
ctx->Map.entry = RtemsBarrierReqRelease_PopEntry( ctx );
+ RtemsBarrierReqRelease_SetPreConditionStates( ctx );
RtemsBarrierReqRelease_TestVariant( ctx );
}
}
diff --git a/testsuites/validation/tc-barrier-wait.c b/testsuites/validation/tc-barrier-wait.c
index 54632cf7ca..49d29a45c8 100644
--- a/testsuites/validation/tc-barrier-wait.c
+++ b/testsuites/validation/tc-barrier-wait.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsBarrierReqWait
+ * @ingroup RtemsBarrierReqWait
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -60,9 +60,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsBarrierReqWait spec:/rtems/barrier/req/wait
+ * @defgroup RtemsBarrierReqWait spec:/rtems/barrier/req/wait
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationNoClock0
*
* @{
*/
@@ -127,6 +127,12 @@ typedef struct {
struct {
/**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 3 ];
+
+ /**
* @brief This member defines the pre-condition states for the next action.
*/
size_t pcs[ 3 ];
@@ -187,7 +193,7 @@ static const char * const * const RtemsBarrierReqWait_PreDesc[] = {
#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
-#define EVENT_CHECK_TIMER RTEMS_EVENT_0
+#define EVENT_TIMER_INACTIVE RTEMS_EVENT_0
#define EVENT_WAIT RTEMS_EVENT_1
@@ -195,6 +201,8 @@ static const char * const * const RtemsBarrierReqWait_PreDesc[] = {
#define EVENT_DELETE RTEMS_EVENT_3
+#define EVENT_TIMER_EXPIRE RTEMS_EVENT_4
+
typedef RtemsBarrierReqWait_Context Context;
static void Worker( rtems_task_argument arg )
@@ -209,7 +217,7 @@ static void Worker( rtems_task_argument arg )
events = ReceiveAnyEvents();
- if ( ( events & EVENT_CHECK_TIMER ) != 0 ) {
+ if ( ( events & EVENT_TIMER_INACTIVE ) != 0 ) {
T_eq_int(
T_get_thread_timer_state( ctx->main_id ),
T_THREAD_TIMER_INACTIVE
@@ -256,6 +264,14 @@ static void Worker( rtems_task_argument arg )
prio = SetSelfPriority( prio );
T_eq_u32( prio, PRIO_HIGH );
}
+
+ if ( ( events & EVENT_TIMER_EXPIRE ) != 0 ) {
+ T_eq_int(
+ T_get_thread_timer_state( ctx->main_id ),
+ T_THREAD_TIMER_SCHEDULED
+ );
+ FinalClockTick();
+ }
}
}
@@ -306,7 +322,7 @@ static void RtemsBarrierReqWait_Pre_Timeout_Prepare(
/*
* While the ``released`` parameter is a clock tick interval.
*/
- ctx->timeout = 2;
+ ctx->timeout = UINT32_MAX;
break;
}
@@ -335,7 +351,9 @@ static void RtemsBarrierReqWait_Pre_Satisfy_Prepare(
* released or deleted.
*/
if ( ctx->timeout == RTEMS_NO_TIMEOUT ) {
- SendEvents( ctx->low_worker_id, EVENT_CHECK_TIMER | EVENT_RELEASE );
+ SendEvents( ctx->low_worker_id, EVENT_TIMER_INACTIVE | EVENT_RELEASE );
+ } else {
+ SendEvents( ctx->low_worker_id, EVENT_TIMER_EXPIRE );
}
break;
}
@@ -544,17 +562,30 @@ static inline RtemsBarrierReqWait_Entry RtemsBarrierReqWait_PopEntry(
];
}
+static void RtemsBarrierReqWait_SetPreConditionStates(
+ RtemsBarrierReqWait_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_Timeout_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsBarrierReqWait_Pre_Timeout_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Satisfy_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsBarrierReqWait_Pre_Satisfy_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+}
+
static void RtemsBarrierReqWait_TestVariant( RtemsBarrierReqWait_Context *ctx )
{
RtemsBarrierReqWait_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
- RtemsBarrierReqWait_Pre_Timeout_Prepare(
- ctx,
- ctx->Map.entry.Pre_Timeout_NA ? RtemsBarrierReqWait_Pre_Timeout_NA : ctx->Map.pcs[ 1 ]
- );
- RtemsBarrierReqWait_Pre_Satisfy_Prepare(
- ctx,
- ctx->Map.entry.Pre_Satisfy_NA ? RtemsBarrierReqWait_Pre_Satisfy_NA : ctx->Map.pcs[ 2 ]
- );
+ RtemsBarrierReqWait_Pre_Timeout_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsBarrierReqWait_Pre_Satisfy_Prepare( ctx, ctx->Map.pcs[ 2 ] );
RtemsBarrierReqWait_Action( ctx );
RtemsBarrierReqWait_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
}
@@ -571,19 +602,19 @@ T_TEST_CASE_FIXTURE( RtemsBarrierReqWait, &RtemsBarrierReqWait_Fixture )
ctx->Map.index = 0;
for (
- ctx->Map.pcs[ 0 ] = RtemsBarrierReqWait_Pre_Id_NoObj;
- ctx->Map.pcs[ 0 ] < RtemsBarrierReqWait_Pre_Id_NA;
- ++ctx->Map.pcs[ 0 ]
+ ctx->Map.pci[ 0 ] = RtemsBarrierReqWait_Pre_Id_NoObj;
+ ctx->Map.pci[ 0 ] < RtemsBarrierReqWait_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
) {
for (
- ctx->Map.pcs[ 1 ] = RtemsBarrierReqWait_Pre_Timeout_Ticks;
- ctx->Map.pcs[ 1 ] < RtemsBarrierReqWait_Pre_Timeout_NA;
- ++ctx->Map.pcs[ 1 ]
+ ctx->Map.pci[ 1 ] = RtemsBarrierReqWait_Pre_Timeout_Ticks;
+ ctx->Map.pci[ 1 ] < RtemsBarrierReqWait_Pre_Timeout_NA;
+ ++ctx->Map.pci[ 1 ]
) {
for (
- ctx->Map.pcs[ 2 ] = RtemsBarrierReqWait_Pre_Satisfy_Never;
- ctx->Map.pcs[ 2 ] < RtemsBarrierReqWait_Pre_Satisfy_NA;
- ++ctx->Map.pcs[ 2 ]
+ ctx->Map.pci[ 2 ] = RtemsBarrierReqWait_Pre_Satisfy_Never;
+ ctx->Map.pci[ 2 ] < RtemsBarrierReqWait_Pre_Satisfy_NA;
+ ++ctx->Map.pci[ 2 ]
) {
ctx->Map.entry = RtemsBarrierReqWait_PopEntry( ctx );
@@ -591,6 +622,7 @@ T_TEST_CASE_FIXTURE( RtemsBarrierReqWait, &RtemsBarrierReqWait_Fixture )
continue;
}
+ RtemsBarrierReqWait_SetPreConditionStates( ctx );
RtemsBarrierReqWait_TestVariant( ctx );
}
}
diff --git a/testsuites/validation/tc-basedefs-no-debug.c b/testsuites/validation/tc-basedefs-no-debug.c
new file mode 100644
index 0000000000..b3cfa5dd40
--- /dev/null
+++ b/testsuites/validation/tc-basedefs-no-debug.c
@@ -0,0 +1,135 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsBasedefsValBasedefsNoDebug
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsBasedefsValBasedefsNoDebug \
+ * spec:/rtems/basedefs/val/basedefs-no-debug
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests the basedefs macros where RTEMS_DEBUG is disabled.
+ *
+ * This test case performs the following actions:
+ *
+ * - Expand and stringify RTEMS_UNREACHABLE().
+ *
+ * - Check that the string is equal to the expected statement.
+ *
+ * - Expand RTEMS_FUNCTION_NAME.
+ *
+ * - Check that the string is equal to the expected function name.
+ *
+ * @{
+ */
+
+/**
+ * @brief Expand and stringify RTEMS_UNREACHABLE().
+ */
+static void RtemsBasedefsValBasedefsNoDebug_Action_0( void )
+{
+ const char *s;
+
+ s = RTEMS_XSTRING( RTEMS_UNREACHABLE() );
+
+ /*
+ * Check that the string is equal to the expected statement.
+ */
+ T_step_true(
+ 0,
+ IsEqualIgnoreWhiteSpace(
+ s,
+ "__builtin_unreachable()"
+ )
+ );
+}
+
+/**
+ * @brief Expand RTEMS_FUNCTION_NAME.
+ */
+static void RtemsBasedefsValBasedefsNoDebug_Action_1( void )
+{
+ const char *s;
+
+ s = RTEMS_FUNCTION_NAME;
+
+ /*
+ * Check that the string is equal to the expected function name.
+ */
+ T_step_true(
+ 1,
+ IsEqualIgnoreWhiteSpace(
+ s,
+ "RtemsBasedefsValBasedefsNoDebug_Action_1"
+ )
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsBasedefsValBasedefsNoDebug( void )
+ */
+T_TEST_CASE( RtemsBasedefsValBasedefsNoDebug )
+{
+ T_plan( 2 );
+
+ RtemsBasedefsValBasedefsNoDebug_Action_0();
+ RtemsBasedefsValBasedefsNoDebug_Action_1();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-basedefs-pendant.c b/testsuites/validation/tc-basedefs-pendant.c
new file mode 100644
index 0000000000..620e2d0efa
--- /dev/null
+++ b/testsuites/validation/tc-basedefs-pendant.c
@@ -0,0 +1,122 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsBasedefsValBasedefs
+ *
+ * @brief Helper file to verify the requirements towards the basedefs.
+ *
+ * The specification items in
+ * (rtems-central/)spec/rtems/basedefs/req/[*] represent
+ * requirements towards the basedefs in
+ * (rtems/)cpukit/include/rtems/score/basedefs.h.
+ * There are automated verification tests generated from
+ * (rtems-central/)spec/rtems/basedefs/val/[*] and placed
+ * in (rtems/)testsuites/validation/tc-basedefs-0.c.
+ *
+ * Yet, not every test can be placed in the same compilation unit
+ * (tc-basedefs-0.c). Hence, the code which must be placed
+ * in an extra compilation unit is put here and this file
+ * is linked to tc-basedefs-0.c to be accessible from the tests.
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tc-basedefs-pendant.h"
+
+/* For the RTEMS_SYMBOL_NAME tests */
+#undef __USER_LABEL_PREFIX__
+#define __USER_LABEL_PREFIX__ SyMbOl_
+#define SyMbOl_symbol_id prefix_symbol_id
+#define SYMBOL_NAME symbol_name
+
+uintptr_t basedefs_get_global_symbol( void )
+{
+ return (uintptr_t) global_symbol;
+}
+
+int basedefs_use_prefixed_symbol_name( void )
+{
+ const int SyMbOl_symbol_name = 124;
+ return RTEMS_SYMBOL_NAME( symbol_name );
+}
+
+int basedefs_use_prefixed_upper_symbol_name( void )
+{
+ const int SyMbOl_symbol_name = 125;
+ return RTEMS_SYMBOL_NAME( SYMBOL_NAME );
+}
+
+int basedefs_use_prefixed_symbol_id( void )
+{
+ const int prefix_symbol_id = 126;
+ return RTEMS_SYMBOL_NAME( symbol_id );
+}
+
+int basedefs_weak_alias_1_func( int i )
+{
+ return 10 * i;
+}
+
+const volatile int basedefs_weak_1_var = 62;
+
+int basedefs_weak_1_func( void )
+{
+ return 65;
+}
+
+static RTEMS_ALIGNED( 64 ) int allocated_memory_dummy;
+
+void *basedefs_malloclike_func( size_t size )
+{
+ return &allocated_memory_dummy;
+}
+
+void *basedefs_alloc_align_func( size_t size, void **p, size_t alignment )
+{
+ *p = &allocated_memory_dummy;
+ return &allocated_memory_dummy;
+}
+
+void *basedefs_alloc_size_func( size_t size )
+{
+ return &allocated_memory_dummy;
+}
+
+void *basedefs_alloc_size_2_func( size_t size0, size_t size1 )
+{
+ return &allocated_memory_dummy;
+}
+
+void basedefs_free( void *ptr )
+{
+ (void) ptr;
+}
diff --git a/testsuites/validation/tc-basedefs-pendant.h b/testsuites/validation/tc-basedefs-pendant.h
new file mode 100644
index 0000000000..7c1fbd8ae3
--- /dev/null
+++ b/testsuites/validation/tc-basedefs-pendant.h
@@ -0,0 +1,93 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsBasedefsValBasedefs
+ *
+ * @brief Helper file to verify the requirements towards the basedefs.
+ *
+ * This file contains solely *private* declarations shared by
+ * (rtems/)testsuites/validation/tc-basedefs-0.c and
+ * (rtems/)testsuites/validation/tc-basedefs-pendant.c.
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifndef _TC_BASEDEFS_PENDANT_H
+#define _TC_BASEDEFS_PENDANT_H
+
+/* The define is for the RTEMS_SYMBOL_NAME tests */
+#ifndef __USER_LABEL_PREFIX__
+#define __USER_LABEL_PREFIX__
+#endif
+
+#include <rtems.h>
+
+/* Remove for C++ code */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GLOBAL_SYMBOL global_symbol
+RTEMS_DECLARE_GLOBAL_SYMBOL( GLOBAL_SYMBOL );
+
+uintptr_t basedefs_get_global_symbol( void );
+int basedefs_use_prefixed_symbol_name( void );
+int basedefs_use_prefixed_upper_symbol_name( void );
+int basedefs_use_prefixed_symbol_id( void );
+int basedefs_weak_alias_0_func( int i );
+int basedefs_weak_alias_1_func( int i );
+int basedefs_weak_0_func( void );
+int basedefs_weak_1_func( void );
+
+extern const volatile int basedefs_weak_0_var;
+
+extern const volatile int basedefs_weak_1_var;
+
+RTEMS_MALLOCLIKE void *
+basedefs_malloclike_func( size_t size );
+
+RTEMS_ALLOC_SIZE_2( 1, 2 ) void *
+basedefs_alloc_size_2_func( size_t size0, size_t size1 );
+
+RTEMS_ALLOC_ALIGN( 3 ) void *
+basedefs_alloc_align_func( size_t size, void **p, size_t alignment );
+
+RTEMS_ALLOC_SIZE( 1 ) void *
+basedefs_alloc_size_func( size_t size );
+
+RTEMS_ALLOC_SIZE_2( 1, 2 ) void *
+basedefs_alloc_size_2_func( size_t size0, size_t size1 );
+
+void basedefs_free( void *ptr );
+
+/* Remove for C++ code */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TC_BASEDEFS_PENDANT_H */
diff --git a/testsuites/validation/tc-basedefs.c b/testsuites/validation/tc-basedefs.c
new file mode 100644
index 0000000000..835f76ec64
--- /dev/null
+++ b/testsuites/validation/tc-basedefs.c
@@ -0,0 +1,2033 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsBasedefsValBasedefs
+ */
+
+/*
+ * Copyright (C) 2020, 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tc-basedefs-pendant.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsBasedefsValBasedefs spec:/rtems/basedefs/val/basedefs
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests the basedefs macros of the Classic API.
+ *
+ * This test case performs the following actions:
+ *
+ * - Use the RTEMS_ALIAS() macro.
+ *
+ * - Check that ori_func() and alias_func() are the same function.
+ *
+ * - Use the RTEMS_ALIGN_DOWN() macro in various examples.
+ *
+ * - Check that RTEMS_ALIGN_DOWN() calculates the expected result and is
+ * side-effect free.
+ *
+ * - Use the RTEMS_ALIGN_UP() macro in various examples.
+ *
+ * - Check that RTEMS_ALIGN_UP() calculates the expected result and is
+ * side-effect free.
+ *
+ * - Use the RTEMS_ALIGNED() macro.
+ *
+ * - Check that RTEMS_ALIGNED() correctly aligns a variable on the stack and
+ * a structure member.
+ *
+ * - Use the RTEMS_ALIGNOF() macro.
+ *
+ * - Check that the RTEMS_ALIGNOF() macro results in the alignment of the
+ * type.
+ *
+ * - If the RTEMS_ALIGNOF() macro would evaluate its argument, it could not
+ * figure out how much menory to reserve for it.
+ *
+ * - If the RTEMS_ALIGNOF() macro would evaluate the size expression, the
+ * division by zero would cause an error.
+ *
+ * - Ensure the constant value of the RTEMS_ALIGNOF() macro is of type
+ * size_t.
+ *
+ * - Use a function declared with the RTEMS_ALLOC_ALIGN() macro.
+ *
+ * - It cannot be checked that the RTEMS_ALLOC_ALIGN() macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and that it can
+ * be used on such a memory function and that the argument counting starts
+ * at 1.
+ *
+ * - Use a function declared with the RTEMS_ALLOC_SIZE() macro.
+ *
+ * - It cannot be checked that the RTEMS_ALLOC_SIZE() macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and that it can
+ * be used on such a memory function and that the argument counting starts
+ * at 1.
+ *
+ * - Use a function declared with the RTEMS_ALLOC_SIZE_2() macro.
+ *
+ * - It cannot be checked that the RTEMS_ALLOC_SIZE_2() macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and that it can
+ * be used on such a memory function and that the argument counting starts
+ * at 1.
+ *
+ * - Use the RTEMS_ARRAY_SIZE() macro.
+ *
+ * - Check that the calculated size of the arrays fit their definition.
+ *
+ * - Use the RTEMS_COMPILER_DEPRECATED_ATTRIBUTE macro.
+ *
+ * - It cannot automatically be checked that the
+ * RTEMS_COMPILER_DEPRECATED_ATTRIBUTE macro has the desired effect. The
+ * gcc compiler should issue a warning about the use of a deprecated
+ * variable on the above line where the ``compiler_deprecated_attribute``
+ * is used.
+ *
+ * - Use the RTEMS_COMPILER_MEMORY_BARRIER() macro.
+ *
+ * - It cannot be checked that the RTEMS_COMPILER_MEMORY_BARRIER() macro has
+ * the desired effect. It is only checked that such a macro exists.
+ *
+ * - Use of the RTEMS_COMPILER_NO_RETURN_ATTRIBUTE macro at the beginning of
+ * this file.
+ *
+ * - It cannot be checked that the RTEMS_COMPILER_NO_RETURN_ATTRIBUTE macro
+ * has the desired effect. It is only checked that such a macro exists.
+ *
+ * - Use the RTEMS_COMPILER_PACKED_ATTRIBUTE macro.
+ *
+ * - Check that RTEMS_COMPILER_PACKED_ATTRIBUTE correctly aligns a structure
+ * member.
+ *
+ * - Use the RTEMS_COMPILER_PURE_ATTRIBUTE macro at the beginning of this file.
+ *
+ * - It cannot be checked that the RTEMS_COMPILER_PURE_ATTRIBUTE macro has
+ * the desired effect. It is checked that such a macro exists.
+ *
+ * - Use the RTEMS_COMPILER_UNUSED_ATTRIBUTE macro.
+ *
+ * - It cannot automatically be checked that the
+ * RTEMS_COMPILER_UNUSED_ATTRIBUTE macro has the desired effect. It is
+ * checked that such a macro exists and one can manually check that no
+ * compiler warnings are produced for the compiler_unused_attribute_var.
+ *
+ * - Invoke the RTEMS_CONCAT() macro on examples.
+ *
+ * - Check that the two arguments of RTEMS_CONCAT() are concatenated to a new
+ * token.
+ *
+ * - Check that the result of the RTEMS_CONCAT() expansion is subject to a
+ * further pre-processor substitution.
+ *
+ * - Use the RTEMS_CONST macro at the beginning of this file.
+ *
+ * - It cannot be checked that the RTEMS_CONST macro has the desired effect.
+ * It is checked that such a macro exists.
+ *
+ * - Use the RTEMS_CONTAINER_OF() macro.
+ *
+ * - Check that the RTEMS_CONTAINER_OF() macro evaluates to a pointer to
+ * container_of_struct_var.
+ *
+ * - Use the RTEMS_DECLARE_GLOBAL_SYMBOL() macro in the file
+ * tc-basedefs-pendant.h.
+ *
+ * - Check that the RTEMS_DECLARE_GLOBAL_SYMBOL() macro declares a global
+ * symbol which can be accessed by function basedefs_get_global_symbol()
+ * which is defined in a file different from the file in which the gobal
+ * symbol is defined.
+ *
+ * - Use the RTEMS_DECONST() macro.
+ *
+ * - Check that the RTEMS_DECONST() macro returns a pointer which allows to
+ * write into an otherwise const value.
+ *
+ * - Use the RTEMS_DEFINE_GLOBAL_SYMBOL() macro at the beginning of this file.
+ *
+ * - Check that the RTEMS_DEFINE_GLOBAL_SYMBOL() macro defines a global
+ * symbol with the correct value.
+ *
+ * - Use a function declared with the RTEMS_DEPRECATED macro.
+ *
+ * - It cannot automatically be checked that the RTEMS_DEPRECATED macro has
+ * the desired effect. The gcc compiler should issue a warning about the
+ * use of a deprecated function on the above line where the
+ * ``deprecated_func`` is used.
+ *
+ * - Use the RTEMS_DEQUALIFY_DEPTHX() macro.
+ *
+ * - Check that the RTEMS_DEQUALIFY_DEPTHX() macro returns a pointer which
+ * allows to write into an otherwise const (volatile) value.
+ *
+ * - Use the RTEMS_DEQUALIFY() macro.
+ *
+ * - Check that the RTEMS_DEQUALIFY() macro returns a pointer which allows to
+ * write into an otherwise const volatile value.
+ *
+ * - Use the RTEMS_DEVOLATILE() macro.
+ *
+ * - Check that the RTEMS_DEVOLATILE() macro returns a pointer which allows
+ * to write into an otherwise volatile value.
+ *
+ * - Invoke the RTEMS_EXPAND() macro on an example.
+ *
+ * - Check that the argument of RTEMS_EXPAND() is expanded and returned.
+ *
+ * - Invoke the FALSE macro on an example.
+ *
+ * - Check that of FALSE is substituted by 0.
+ *
+ * - Invoke the RTEMS_HAVE_MEMBER_SAME_TYPE() macro on examples.
+ *
+ * - Check that of RTEMS_HAVE_MEMBER_SAME_TYPE() returns 0 and 1 depending on
+ * whether these types are compatible.
+ *
+ * - Use the RTEMS_INLINE_ROUTINE in the definition of function
+ * inline_routine_func() at the beginning of this file. Obtain the text the
+ * macro RTEMS_INLINE_ROUTINE produces.
+ *
+ * - Check that the RTEMS_INLINE_ROUTINE exists and that it produces the
+ * desired text.
+ *
+ * - Use a function declared with the RTEMS_MALLOCLIKE macro.
+ *
+ * - It cannot be checked that the RTEMS_MALLOCLIKE macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and that it can
+ * be used on such a memory function and that it produces the correct code.
+ *
+ * - Use a function declared with the RTEMS_NO_INLINE macro.
+ *
+ * - It cannot be checked that the RTEMS_NO_INLINE macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and that it can
+ * be used on such a function and that it produces the correct code.
+ *
+ * - Use of the RTEMS_NO_RETURN macro at the beginning of this file.
+ *
+ * - It cannot be checked that the RTEMS_NO_RETURN macro has the desired
+ * effect. It is only checked that such a macro exists.
+ *
+ * - Use the RTEMS_NOINIT macro on ``noinit_variable`` at the beginning of this
+ * file.
+ *
+ * - It cannot be checked that the RTEMS_NOINIT macro has the desired effect.
+ * Yet, the check confirms that such a macro exists and can be used.
+ *
+ * - Use the RTEMS_OBFUSCATE_VARIABLE() macro.
+ *
+ * - It cannot be checked that the RTEMS_OBFUSCATE_VARIABLE() macro has the
+ * desired effect. Yet, the check confirms that such a macro exists and can
+ * be used.
+ *
+ * - Use the RTEMS_PACKED macro.
+ *
+ * - Check that RTEMS_PACKED correctly aligns a structure member.
+ *
+ * - Check that RTEMS_PACKED correctly aligns all structure members.
+ *
+ * - Check that RTEMS_PACKED correctly enforces a minimal enum type.
+ *
+ * - Use the RTEMS_PREDICT_FALSE() macro.
+ *
+ * - It cannot be checked that the RTEMS_PREDICT_FALSE() macro has the
+ * desired effect. Yet, the check confirms that such a macro exists and can
+ * be used.
+ *
+ * - Use the RTEMS_PREDICT_TRUE() macro.
+ *
+ * - It cannot be checked that the RTEMS_PREDICT_TRUE() macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and can be
+ * used.
+ *
+ * - Use a function declared with the RTEMS_PRINTFLIKE() macro.
+ *
+ * - It cannot automatically be checked that the RTEMS_PRINTFLIKE() macro has
+ * the desired effect. Yet, the check confirms that such a macro exists and
+ * that it can be used on such a printf-like function and that the argument
+ * numbers are correct.
+ *
+ * - Use the RTEMS_PURE macro at the beginning of this file.
+ *
+ * - It cannot be checked that the RTEMS_PURE macro has the desired effect.
+ * It is checked that such a macro exists.
+ *
+ * - Get the code the RTEMS_RETURN_ADDRESS() macro produces as string.
+ *
+ * - The check confirms that a RTEMS_RETURN_ADDRESS() macro exists and that
+ * it produces the correct code.
+ *
+ * - Use the RTEMS_SECTION() macro on ``section_variable`` and ``section_func``
+ * at the beginning of this file.
+ *
+ * - It cannot be checked that the RTEMS_SECTION() macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and can be
+ * used.
+ *
+ * - Evaluate if RTEMS_STATIC_ANALYSIS is defined.
+ *
+ * - Check that RTEMS_STATIC_ANALYSIS was not defined.
+ *
+ * - Use the RTEMS_STATIC_ASSERT() macro.
+ *
+ * - It cannot be automatically check that the RTEMS_STATIC_ASSERT() macro
+ * has the desired effect. Yet, it can be checked that the macro exists and
+ * accepts the specified arguments.
+ *
+ * - Use the RTEMS_STRING() macro.
+ *
+ * - Check that the RTEMS_STRING() macro converts its arguments into a single
+ * string without applying pre-processor substitutions on its arguments.
+ *
+ * - Use the RTEMS_SYMBOL_NAME() macro with an example object.
+ *
+ * - Check that the RTEMS_SYMBOL_NAME() macro expands to the expected symbol
+ * name.
+ *
+ * - Invoke the TRUE macro on an example.
+ *
+ * - Check that of TRUE is substituted by 0.
+ *
+ * - Use of the RTEMS_TYPEOF_REFX() macro on several examples. This use is
+ * already the test as the statements will not compile without error if the
+ * macro did not evaluate to the correct type.
+ *
+ * - The checks here are proforma. The macro is tested by the fact that the
+ * action will not compile if the macro returns a wrong result.
+ *
+ * - Use the RTEMS_UNUSED macro. See also unused_func() at the beginning of
+ * this file.
+ *
+ * - It cannot automatically be checked that the RTEMS_UNUSED macro has the
+ * desired effect. It is checked that such a macro exists and one can
+ * manually check that no compiler warnings are produced for the
+ * unused_func().
+ *
+ * - It cannot automatically be checked that the RTEMS_UNUSED macro has the
+ * desired effect. It is checked that such a macro exists and one can
+ * manually check that no compiler warnings are produced for the
+ * unused_lable.
+ *
+ * - It cannot automatically be checked that the RTEMS_UNUSED macro has the
+ * desired effect. It is checked that such a macro exists and one can
+ * manually check that no compiler warnings are produced for the
+ * unused_struct.
+ *
+ * - It cannot automatically be checked that the RTEMS_UNUSED macro has the
+ * desired effect. It is checked that such a macro exists and one can
+ * manually check that no compiler warnings are produced for the unused
+ * items unused_var and the unused argument and variable in unused_func().
+ *
+ * - Use of the RTEMS_UNREACHABLE() macro in function definition of
+ * unreachable_func() at the beginning of this file.
+ *
+ * - It cannot be checked that the RTEMS_UNREACHABLE() macro has the desired
+ * effect. It is checked that such a macro exists and the compiler warning
+ * about the missing return statement is suppressed.
+ *
+ * - Use of the RTEMS_USED macro in function definition of used_func() at the
+ * beginning of this file and with used_var above.
+ *
+ * - It cannot be checked that the RTEMS_USED macro has the desired effect.
+ * It is checked that such a macro exists.
+ *
+ * - Use of the RTEMS_WARN_UNUSED_RESULT macro in function definition of
+ * warn_unused_func() at the beginning of this file.
+ *
+ * - It cannot be checked that the RTEMS_WARN_UNUSED_RESULT macro has the
+ * desired effect. The GNU C compiler should issue a warning about the
+ * disregarded result returned by the call to the ``warn_unused_func()``
+ * function.
+ *
+ * - Use of ``basedefs_weak_alias_0/1_func()`` which are defined with the
+ * RTEMS_WEAK_ALIAS() macro at the beginning of this file.
+ *
+ * - There exists no strong alias for basedefs_weak_alias_0_func(). Check
+ * that ori_func() and basedefs_weak_alias_0_func() are the same function.
+ *
+ * - File ``tc_basedefs_pndant.c`` defines a strong function for
+ * basedefs_weak_alias_1_func(). Check that ori_func() and
+ * basedefs_weak_alias_1_func() are not the same function.
+ *
+ * - Use of ``basedefs_weak_0/1_var`` and ``basedefs_weak_0/1_func()`` which
+ * are defined with the RTEMS_WEAK macro at the beginning of this file.
+ *
+ * - For ``basedefs_weak_0_var`` and ``basedefs_weak_0_func()`` there exists
+ * no other symbols with the same name. Hence, the checks test that the
+ * weak symbols are used.
+ *
+ * - ``basedefs_weak_1_var`` and ``basedefs_weak_1_func()`` are overwritten
+ * by strong symbols defined in file ``tc_basedefs_pendant.c``. Hence, the
+ * checks test that the strong variants are used.
+ *
+ * - Invoke the RTEMS_XCONCAT() macro on examples.
+ *
+ * - Check that the two arguments of RTEMS_XCONCAT() are concatenated without
+ * inserting new characters.
+ *
+ * - Check that the two arguments of RTEMS_XCONCAT() are substituted before
+ * they are concatenated.
+ *
+ * - Check that the two arguments of RTEMS_XCONCAT() are can be the macro
+ * itself.
+ *
+ * - Check that the result of the RTEMS_XCONCAT() expansion is subject to a
+ * further pre-processor substitution.
+ *
+ * - Use the RTEMS_XSTRING() macro.
+ *
+ * - Check that the RTEMS_XSTRING() macro applies pre-processor substitutions
+ * on its arguments and converts its arguments into a single string.
+ *
+ * - Use of the RTEMS_ZERO_LENGTH_ARRAY macro in a declaration of a structure.
+ *
+ * - Checked that the RTEMS_ZERO_LENGTH_ARRAY macro produces a structure
+ * similar to a structure with one element.
+ *
+ * - Use the RTEMS_DEFINE_GLOBAL_SYMBOL() macro at the beginning of this file
+ * and assign the address of the symbol to an object.
+ *
+ * - Check that the RTEMS_DEFINE_GLOBAL_SYMBOL() macro defines a global
+ * symbol with the correct value.
+ *
+ * @{
+ */
+
+#define WHITE_SPACE_STRING_MAX_LENGTH 80
+#define abccat concat
+#define abc ABC
+#define CON con
+#define CAT cat
+#define defcat concat
+#define GLOBAL_SYMBOL_VALULE( _hex ) 0x ## _hex
+#define EXPAND expand
+#define PREDICT_FALSE 1 -
+#define SECTION_NAME ".rtemsroset.test"
+#define STATIC_ASSERT_COND 0 +
+#define STRING_PREFIX str
+#define SYMBOL_NAME global_object
+#define _TO_STR2( _text ) #_text
+#define _TO_STR( _text ) _TO_STR2( _text )
+
+int global_object;
+
+extern int address_of_global_object;
+
+__asm__(
+ "\n\t.set " RTEMS_XSTRING( RTEMS_SYMBOL_NAME( address_of_global_object ) )
+ ", " RTEMS_XSTRING( RTEMS_SYMBOL_NAME( SYMBOL_NAME ) ) "\n"
+);
+
+/*
+ * For some reasons - which I fail to fully understand - _TO_STR()
+ * seems to remove spaces around `()` at times and at other times
+ * not. For example, I get
+ *
+ * * "__attribute__(( __malloc__ ))" or
+ * * "__attribute__((__malloc__))".
+ *
+ * To avoid trouble, the function below returns a version of a
+ * string without any spaces. Albeit, the implementation is rather
+ * brute and raw. It returns a pointer to a static buffer of fixed
+ * size. That will do for tests but not serve as generic function.
+ */
+static const char *remove_white_space( const char *str )
+{
+ char c;
+ int i = 0;
+ static char buffer[WHITE_SPACE_STRING_MAX_LENGTH] = {};
+
+ /* Sanity check */
+ if( strlen( str ) >= sizeof( buffer ) ) {
+ T_assert_true( false,
+ "Buffer too small; increase WHITE_SPACE_STRING_MAX_LENGTH" );
+ }
+
+ /* Copy string but skip white spaces */
+ do {
+ c = *( str++ );
+ if ( ' ' != c && '\t' !=c ) {
+ buffer[i++] = c;
+ }
+ } while ( '\0' != c );
+
+ return buffer;
+}
+
+static int alias_func( int i ) RTEMS_ALIAS( ori_func );
+
+typedef struct {
+ uint8_t c;
+ uint8_t aligned_member RTEMS_ALIGNED( 8 );
+} aligned_member_struct;
+
+static int concat( void )
+{
+ return 91;
+}
+
+RTEMS_CONST static int const_func( int arg )
+{
+ return 4 * arg;
+}
+
+RTEMS_COMPILER_NO_RETURN_ATTRIBUTE
+ static void compiler_no_return_attribute_func( int i );
+static void compiler_no_return_attribute_func( int i )
+{
+ while ( true ) {
+ /* Loop forever */
+ }
+}
+
+RTEMS_COMPILER_PURE_ATTRIBUTE static int compiler_pure_attribute_func( void )
+{
+ return 21;
+}
+
+static int global_symbol_base;
+
+RTEMS_DEFINE_GLOBAL_SYMBOL(
+ GLOBAL_SYMBOL,
+ RTEMS_SYMBOL_NAME( global_symbol_base ) + GLOBAL_SYMBOL_VALULE( abc )
+);
+
+RTEMS_DECLARE_GLOBAL_SYMBOL( global_symbol_2 );
+
+RTEMS_DEFINE_GLOBAL_SYMBOL( global_symbol_2, 0x123 );
+
+static const char * const volatile global_symbol_2_object = global_symbol_2;
+
+static int deprecated_func( int i ) RTEMS_DEPRECATED;
+static int deprecated_func( int i )
+{
+ return 3 * i;
+}
+
+static int expand( void )
+{
+ return 82;
+}
+
+RTEMS_INLINE_ROUTINE int inline_routine_func( int arg )
+{
+ return 1 << arg;
+}
+
+RTEMS_NO_INLINE static int no_inline_func( void )
+{
+ asm ("");
+ return 75;
+}
+
+RTEMS_NO_RETURN static void no_return_func( int i )
+{
+ while ( true ) {
+ /* Loop forever */
+ }
+}
+
+RTEMS_NOINIT static uint32_t noinit_variable;
+
+static int ori_func( int x )
+{
+ return 2 * x;
+}
+
+RTEMS_PRINTFLIKE(2, 3) static int printflike_func(
+ const char *prefix,
+ const char *fmt,
+ ...
+)
+{
+ int result;
+ va_list va_list;
+
+ T_printf( "%s: ", prefix );
+ va_start( va_list, fmt );
+ result = T_vprintf( fmt, va_list );
+ va_end( va_list );
+
+ return result;
+}
+
+RTEMS_PURE static int pure_func( void )
+{
+ return 21;
+}
+
+RTEMS_SECTION( ".rtemsrwset.test" ) static int section_var = 28;
+RTEMS_SECTION( SECTION_NAME ) static int section_func( int arg )
+{
+ return arg % 100;
+}
+
+static int unreachable_func( int arg )
+{
+ if ( 1 == arg % 100 ) {
+ return arg;
+ } else {
+ T_assert_true( false,
+ "Oops! Function caled with bad argument." );
+ RTEMS_UNREACHABLE();
+ }
+}
+
+RTEMS_USED static int used_var = 4711;
+RTEMS_USED static int used_func( void )
+{
+ return 35;
+}
+
+static int warn_unused_func( int arg ) RTEMS_WARN_UNUSED_RESULT;
+static int warn_unused_func( int arg )
+{
+ return arg / 3;
+}
+
+int basedefs_weak_alias_0_func( int i ) RTEMS_WEAK_ALIAS( ori_func );
+int basedefs_weak_alias_1_func( int i ) RTEMS_WEAK_ALIAS( ori_func );
+
+RTEMS_WEAK const volatile int basedefs_weak_0_var = 60;
+RTEMS_WEAK const volatile int basedefs_weak_1_var = 61;
+RTEMS_WEAK int basedefs_weak_0_func( void )
+{
+ return 63;
+}
+
+RTEMS_WEAK int basedefs_weak_1_func( void )
+{
+ return 64;
+}
+
+/**
+ * @brief Use the RTEMS_ALIAS() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_0( void )
+{
+ int alias_result;
+
+ alias_result = ori_func( 3 ) + alias_func( 5 );
+
+ /*
+ * Check that ori_func() and alias_func() are the same function.
+ */
+ T_step_eq_int( 0, alias_result, 16 );
+}
+
+/**
+ * @brief Use the RTEMS_ALIGN_DOWN() macro in various examples.
+ */
+static void RtemsBasedefsValBasedefs_Action_1( void )
+{
+ int align_down0_result;
+ int align_down1_result;
+ int align_down2_result;
+ int align_down3_result;
+ int align_down4_result;
+ int align_down5_result;
+ int align_down6_result;
+ int align_down7_result;
+ int align_down8_result;
+ int align_down9_result;
+
+ align_down0_result = RTEMS_ALIGN_DOWN( 0, 1 );
+ align_down1_result = RTEMS_ALIGN_DOWN( 0, 4 );
+ align_down2_result = RTEMS_ALIGN_DOWN( 1, 2 );
+ align_down3_result = RTEMS_ALIGN_DOWN( 2, 2 );
+ align_down4_result = RTEMS_ALIGN_DOWN( 3, 2 );
+ align_down5_result = RTEMS_ALIGN_DOWN( 4, 2 );
+ align_down6_result = RTEMS_ALIGN_DOWN( 5, 2 );
+ align_down7_result = RTEMS_ALIGN_DOWN( 255, 16 );
+ align_down8_result = RTEMS_ALIGN_DOWN( 256, 16 );
+ align_down9_result = RTEMS_ALIGN_DOWN( 257, 16 );
+
+ /*
+ * Check that RTEMS_ALIGN_DOWN() calculates the expected result and is
+ * side-effect free.
+ */
+ T_step_eq_int( 1, align_down0_result, 0 );
+ T_step_eq_int( 2, align_down1_result, 0 );
+ T_step_eq_int( 3, align_down2_result, 0 );
+ T_step_eq_int( 4, align_down3_result, 2 );
+ T_step_eq_int( 5, align_down4_result, 2 );
+ T_step_eq_int( 6, align_down5_result, 4 );
+ T_step_eq_int( 7, align_down6_result, 4 );
+ T_step_eq_int( 8, align_down7_result, 240 );
+ T_step_eq_int( 9, align_down8_result, 256 );
+ T_step_eq_int( 10, align_down9_result, 256 );
+}
+
+/**
+ * @brief Use the RTEMS_ALIGN_UP() macro in various examples.
+ */
+static void RtemsBasedefsValBasedefs_Action_2( void )
+{
+ int align_up0_result;
+ int align_up1_result;
+ int align_up2_result;
+ int align_up3_result;
+ int align_up4_result;
+ int align_up5_result;
+ int align_up6_result;
+ int align_up7_result;
+ int align_up8_result;
+ int align_up9_result;
+
+ align_up0_result = RTEMS_ALIGN_UP( 0, 1 );
+ align_up1_result = RTEMS_ALIGN_UP( 0, 4 );
+ align_up2_result = RTEMS_ALIGN_UP( 1, 2 );
+ align_up3_result = RTEMS_ALIGN_UP( 2, 2 );
+ align_up4_result = RTEMS_ALIGN_UP( 3, 2 );
+ align_up5_result = RTEMS_ALIGN_UP( 4, 2 );
+ align_up6_result = RTEMS_ALIGN_UP( 5, 2 );
+ align_up7_result = RTEMS_ALIGN_UP( 255, 16 );
+ align_up8_result = RTEMS_ALIGN_UP( 256, 16 );
+ align_up9_result = RTEMS_ALIGN_UP( 257, 16 );
+
+ /*
+ * Check that RTEMS_ALIGN_UP() calculates the expected result and is
+ * side-effect free.
+ */
+ T_step_eq_int( 11, align_up0_result, 0 );
+ T_step_eq_int( 12, align_up1_result, 0 );
+ T_step_eq_int( 13, align_up2_result, 2 );
+ T_step_eq_int( 14, align_up3_result, 2 );
+ T_step_eq_int( 15, align_up4_result, 4 );
+ T_step_eq_int( 16, align_up5_result, 4 );
+ T_step_eq_int( 17, align_up6_result, 6 );
+ T_step_eq_int( 18, align_up7_result, 256 );
+ T_step_eq_int( 19, align_up8_result, 256 );
+ T_step_eq_int( 20, align_up9_result, 272 );
+}
+
+/**
+ * @brief Use the RTEMS_ALIGNED() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_3( void )
+{
+ char unaligned_var = 'c';
+ char aligned_var RTEMS_ALIGNED( 8 ) = 'd';
+
+ (void) unaligned_var;
+
+ /*
+ * Check that RTEMS_ALIGNED() correctly aligns a variable on the stack and a
+ * structure member.
+ */
+ T_step_eq_int( 21, ( ( uintptr_t ) &aligned_var ) % 8, 0 );
+ T_step_eq_int( 22,
+ offsetof( aligned_member_struct, aligned_member ) % 8, 0 );
+}
+
+/**
+ * @brief Use the RTEMS_ALIGNOF() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_4( void )
+{
+ size_t alignof_char = RTEMS_ALIGNOF( char );
+ size_t alignof_long = RTEMS_ALIGNOF( long );
+ size_t alignof_long_array = RTEMS_ALIGNOF( long[3] );
+ size_t alignof_not_eval_array = RTEMS_ALIGNOF( long[7 / 0] );
+
+ /*
+ * Check that the RTEMS_ALIGNOF() macro results in the alignment of the type.
+ */
+ T_step_eq_sz( 23, alignof_char, 1 );
+ T_step_eq_sz( 24, alignof_long, alignof_long_array );
+
+ /*
+ * If the RTEMS_ALIGNOF() macro would evaluate its argument, it could not
+ * figure out how much menory to reserve for it.
+ */
+ T_step_eq_sz( 25, alignof_long, alignof_not_eval_array );
+
+ /*
+ * If the RTEMS_ALIGNOF() macro would evaluate the size expression, the
+ * division by zero would cause an error.
+ */
+ T_step_eq_sz( 26, alignof_long, alignof_not_eval_array );
+
+ /*
+ * Ensure the constant value of the RTEMS_ALIGNOF() macro is of type size_t.
+ */
+ T_step_true( 27,
+ __builtin_types_compatible_p( __typeof__( RTEMS_ALIGNOF( char ) ),
+ size_t ) );
+}
+
+/**
+ * @brief Use a function declared with the RTEMS_ALLOC_ALIGN() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_5( void )
+{
+ void *free_ptr;
+ void *alloc_align_ptr;
+ alloc_align_ptr = basedefs_alloc_align_func( 1024, &free_ptr, 64 );
+ basedefs_free( free_ptr );
+
+ /*
+ * It cannot be checked that the RTEMS_ALLOC_ALIGN() macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and that it can
+ * be used on such a memory function and that the argument counting starts at
+ * 1.
+ */
+ T_step_not_null( 28, alloc_align_ptr );
+ T_step_eq_int( 29, ( ( uintptr_t ) alloc_align_ptr ) % 64, 0 );
+ T_step_ge_uptr( 30, ( ( uintptr_t ) alloc_align_ptr ),
+ ( ( uintptr_t ) free_ptr ) );
+ T_step_lt_uptr( 31, ( ( uintptr_t ) alloc_align_ptr ),
+ ( ( uintptr_t ) free_ptr ) + 64 );
+}
+
+/**
+ * @brief Use a function declared with the RTEMS_ALLOC_SIZE() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_6( void )
+{
+ void *alloc_size_ptr;
+ alloc_size_ptr = basedefs_alloc_size_func( 1024 );
+ basedefs_free( alloc_size_ptr );
+
+ /*
+ * It cannot be checked that the RTEMS_ALLOC_SIZE() macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and that it can
+ * be used on such a memory function and that the argument counting starts at
+ * 1.
+ */
+ T_step_not_null( 32, alloc_size_ptr );
+}
+
+/**
+ * @brief Use a function declared with the RTEMS_ALLOC_SIZE_2() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_7( void )
+{
+ void *alloc_size_2_ptr;
+ alloc_size_2_ptr = basedefs_alloc_size_2_func( 8, 128 );
+ basedefs_free( alloc_size_2_ptr );
+
+ /*
+ * It cannot be checked that the RTEMS_ALLOC_SIZE_2() macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and that it can
+ * be used on such a memory function and that the argument counting starts at
+ * 1.
+ */
+ T_step_not_null( 33, alloc_size_2_ptr );
+}
+
+/**
+ * @brief Use the RTEMS_ARRAY_SIZE() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_8( void )
+{
+ int array[] = { 10, 20, 30, 40, 50 };
+ unsigned char array2[12];
+ int array_size = RTEMS_ARRAY_SIZE(array);
+ int array2_size = RTEMS_ARRAY_SIZE(array2);
+
+ /*
+ * Check that the calculated size of the arrays fit their definition.
+ */
+ T_step_eq_sz( 34, array_size, 5 );
+ T_step_eq_sz( 35, array2_size, 12 );
+}
+
+/**
+ * @brief Use the RTEMS_COMPILER_DEPRECATED_ATTRIBUTE macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_9( void )
+{
+ int compiler_deprecated_attribute RTEMS_COMPILER_DEPRECATED_ATTRIBUTE = 42;
+
+ /*
+ * It cannot automatically be checked that the
+ * RTEMS_COMPILER_DEPRECATED_ATTRIBUTE macro has the desired effect. The gcc
+ * compiler should issue a warning about the use of a deprecated variable on
+ * the above line where the ``compiler_deprecated_attribute`` is used.
+ */
+ /*
+ * Derivation from Coding Style:
+ * The following code suppresses a compiler warning (instead of fixing
+ * it).
+ * Rational: The variable compiler_deprecated_attribute is not really
+ * deprecated but its purpose is to test the RTEMS_DEPRECATED macro.
+ * The RTEMS_DEPRECATED macro must result in a compiler warning here.
+ */
+ _Pragma( "GCC diagnostic push" )
+ _Pragma( "GCC diagnostic ignored \"-Wdeprecated-declarations\"" )
+ T_step_eq_int( 36, compiler_deprecated_attribute, 42 );
+ _Pragma( "GCC diagnostic pop" )
+}
+
+/**
+ * @brief Use the RTEMS_COMPILER_MEMORY_BARRIER() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_10( void )
+{
+ RTEMS_COMPILER_MEMORY_BARRIER();
+
+ /*
+ * It cannot be checked that the RTEMS_COMPILER_MEMORY_BARRIER() macro has
+ * the desired effect. It is only checked that such a macro exists.
+ */
+
+}
+
+/**
+ * @brief Use of the RTEMS_COMPILER_NO_RETURN_ATTRIBUTE macro at the beginning
+ * of this file.
+ */
+static void RtemsBasedefsValBasedefs_Action_11( void )
+{
+ (void) compiler_no_return_attribute_func;
+
+ /*
+ * It cannot be checked that the RTEMS_COMPILER_NO_RETURN_ATTRIBUTE macro has
+ * the desired effect. It is only checked that such a macro exists.
+ */
+
+}
+
+/**
+ * @brief Use the RTEMS_COMPILER_PACKED_ATTRIBUTE macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_12( void )
+{
+ typedef struct {
+ uint8_t c;
+ RTEMS_COMPILER_PACKED_ATTRIBUTE uint32_t i;
+ } compiler_packed_attribute_struct;
+ int compiler_packed_attribute_offset =
+ offsetof( compiler_packed_attribute_struct, i );
+
+ /*
+ * Check that RTEMS_COMPILER_PACKED_ATTRIBUTE correctly aligns a structure
+ * member.
+ */
+ T_step_eq_int( 37, compiler_packed_attribute_offset, 1 );
+}
+
+/**
+ * @brief Use the RTEMS_COMPILER_PURE_ATTRIBUTE macro at the beginning of this
+ * file.
+ */
+static void RtemsBasedefsValBasedefs_Action_13( void )
+{
+ int compiler_pure_attribute_result;
+ int compiler_pure_attribute_result_2;
+ compiler_pure_attribute_result = compiler_pure_attribute_func();
+ compiler_pure_attribute_result_2 =
+ compiler_pure_attribute_func();
+
+ /*
+ * It cannot be checked that the RTEMS_COMPILER_PURE_ATTRIBUTE macro has the
+ * desired effect. It is checked that such a macro exists.
+ */
+ T_step_eq_int( 38, compiler_pure_attribute_result, 21 );
+ T_step_eq_int( 39, compiler_pure_attribute_result_2, 21 );
+}
+
+/**
+ * @brief Use the RTEMS_COMPILER_UNUSED_ATTRIBUTE macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_14( void )
+{
+ int compiler_unused_attribute_var RTEMS_COMPILER_UNUSED_ATTRIBUTE;
+
+ /*
+ * It cannot automatically be checked that the
+ * RTEMS_COMPILER_UNUSED_ATTRIBUTE macro has the desired effect. It is
+ * checked that such a macro exists and one can manually check that no
+ * compiler warnings are produced for the compiler_unused_attribute_var.
+ */
+
+}
+
+/**
+ * @brief Invoke the RTEMS_CONCAT() macro on examples.
+ */
+static void RtemsBasedefsValBasedefs_Action_15( void )
+{
+ int concat0_result;
+ int concat1_result;
+ concat0_result = RTEMS_CONCAT( con, cat )();
+ concat1_result = RTEMS_CONCAT( abc, cat )();
+
+ /*
+ * Check that the two arguments of RTEMS_CONCAT() are concatenated to a new
+ * token.
+ */
+ T_step_eq_int( 40, concat0_result, 91 );
+
+ /*
+ * Check that the result of the RTEMS_CONCAT() expansion is subject to a
+ * further pre-processor substitution.
+ */
+ T_step_eq_int( 41, concat1_result, 91 );
+}
+
+/**
+ * @brief Use the RTEMS_CONST macro at the beginning of this file.
+ */
+static void RtemsBasedefsValBasedefs_Action_16( void )
+{
+ int const_result;
+ int const_result_2;
+ const_result = const_func( 7 );
+ const_result_2 = const_func( 7 );
+
+ /*
+ * It cannot be checked that the RTEMS_CONST macro has the desired effect. It
+ * is checked that such a macro exists.
+ */
+ T_step_eq_int( 42, const_result, 28 );
+ T_step_eq_int( 43, const_result_2, 28 );
+}
+
+/**
+ * @brief Use the RTEMS_CONTAINER_OF() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_17( void )
+{
+ typedef struct {
+ int a;
+ int b;
+ } container_of_struct;
+
+ container_of_struct container_of_struct_var;
+ int *container_of_struct_b_adr = &container_of_struct_var.b;
+ container_of_struct *container_of_struct_adr;
+ container_of_struct_adr =
+ RTEMS_CONTAINER_OF( container_of_struct_b_adr, container_of_struct, b );
+
+ /*
+ * Check that the RTEMS_CONTAINER_OF() macro evaluates to a pointer to
+ * container_of_struct_var.
+ */
+ T_step_eq_ptr( 44,
+ container_of_struct_adr, &container_of_struct_var );
+}
+
+/**
+ * @brief Use the RTEMS_DECLARE_GLOBAL_SYMBOL() macro in the file
+ * tc-basedefs-pendant.h.
+ */
+static void RtemsBasedefsValBasedefs_Action_18( void )
+{
+ /* No action */
+
+ /*
+ * Check that the RTEMS_DECLARE_GLOBAL_SYMBOL() macro declares a global
+ * symbol which can be accessed by function basedefs_get_global_symbol()
+ * which is defined in a file different from the file in which the gobal
+ * symbol is defined.
+ */
+ T_step_eq_uptr(
+ 45,
+ basedefs_get_global_symbol() - (uintptr_t) &global_symbol_base,
+ 0xabc
+ );
+}
+
+/**
+ * @brief Use the RTEMS_DECONST() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_19( void )
+{
+ const int deconst_array[] = { 52, 55 };
+ int *deconst_pointer;
+ deconst_pointer = RTEMS_DECONST( int *, deconst_array );
+
+ /*
+ * Check that the RTEMS_DECONST() macro returns a pointer which allows to
+ * write into an otherwise const value.
+ */
+ T_step_eq_int( 46, deconst_pointer[0], 52 );
+ T_step_eq_int( 47, deconst_pointer[1], 55 );
+ deconst_pointer[1] = 13;
+ T_step_eq_int( 48, deconst_pointer[1], 13 );
+}
+
+/**
+ * @brief Use the RTEMS_DEFINE_GLOBAL_SYMBOL() macro at the beginning of this
+ * file.
+ */
+static void RtemsBasedefsValBasedefs_Action_20( void )
+{
+ /* No action */
+
+ /*
+ * Check that the RTEMS_DEFINE_GLOBAL_SYMBOL() macro defines a global symbol
+ * with the correct value.
+ */
+ T_step_eq_uptr(
+ 49,
+ (uintptr_t) global_symbol - (uintptr_t) &global_symbol_base,
+ 0xabc
+ );
+}
+
+/**
+ * @brief Use a function declared with the RTEMS_DEPRECATED macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_21( void )
+{
+ int deprecated_result;
+ /*
+ * Derivation from Coding Style:
+ * The following code suppresses a compiler warning (instead of fixing it).
+ * Rational: The function deprecated_func() is not really deprecated
+ * but its purpose is to test the RTEMS_DEPRECATED macro.
+ * The RTEMS_DEPRECATED macro must result in a compiler warning here.
+ */
+ _Pragma( "GCC diagnostic push" )
+ _Pragma( "GCC diagnostic ignored \"-Wdeprecated-declarations\"" )
+ deprecated_result = deprecated_func( 5 );
+ _Pragma( "GCC diagnostic pop" )
+
+ /*
+ * It cannot automatically be checked that the RTEMS_DEPRECATED macro has the
+ * desired effect. The gcc compiler should issue a warning about the use of a
+ * deprecated function on the above line where the ``deprecated_func`` is
+ * used.
+ */
+ T_step_eq_int( 50, deprecated_result, 15 );
+}
+
+/**
+ * @brief Use the RTEMS_DEQUALIFY_DEPTHX() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_22( void )
+{
+ const volatile int dequalify_depthx_array[] = { 52, 55 };
+ const char dequalify_depthx_var = 'a';
+ const char *dequalify_depthx_one_pointer = &dequalify_depthx_var;
+ const char **dequalify_depthx_two_pointer =
+ &dequalify_depthx_one_pointer;
+ int *dequalify_depthx_pointer;
+ volatile char **dequalify_depthx_twice_pointer;
+ dequalify_depthx_pointer =
+ RTEMS_DEQUALIFY_DEPTHX( *, int *, dequalify_depthx_array );
+ dequalify_depthx_twice_pointer = RTEMS_DEQUALIFY_DEPTHX(
+ **, volatile char **, dequalify_depthx_two_pointer );
+
+ /*
+ * Check that the RTEMS_DEQUALIFY_DEPTHX() macro returns a pointer which
+ * allows to write into an otherwise const (volatile) value.
+ */
+ T_step_eq_int( 51, dequalify_depthx_pointer[0], 52 );
+ T_step_eq_int( 52, dequalify_depthx_pointer[1], 55 );
+ dequalify_depthx_pointer[0] = 13;
+ T_step_eq_int( 53, dequalify_depthx_pointer[0], 13 );
+ T_step_eq_char( 54, **dequalify_depthx_twice_pointer, 'a' );
+ **dequalify_depthx_twice_pointer = 'Z';
+ T_step_eq_char( 55, **dequalify_depthx_twice_pointer, 'Z' );
+}
+
+/**
+ * @brief Use the RTEMS_DEQUALIFY() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_23( void )
+{
+ const volatile int dequalify_array[] = { 52, 55 };
+ int *dequalify_pointer;
+ dequalify_pointer = RTEMS_DECONST( int *, dequalify_array );
+
+ /*
+ * Check that the RTEMS_DEQUALIFY() macro returns a pointer which allows to
+ * write into an otherwise const volatile value.
+ */
+ T_step_eq_int( 56, dequalify_pointer[0], 52 );
+ T_step_eq_int( 57, dequalify_pointer[1], 55 );
+ dequalify_pointer[0] = 13;
+ T_step_eq_int( 58, dequalify_pointer[0], 13 );
+}
+
+/**
+ * @brief Use the RTEMS_DEVOLATILE() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_24( void )
+{
+ volatile int devolatile_array[] = { 52, 55 };
+ int *devolatile_pointer;
+ devolatile_pointer = RTEMS_DEVOLATILE( int *, devolatile_array );
+
+ /*
+ * Check that the RTEMS_DEVOLATILE() macro returns a pointer which allows to
+ * write into an otherwise volatile value.
+ */
+ T_step_eq_int( 59, devolatile_pointer[0], 52 );
+ T_step_eq_int( 60, devolatile_pointer[1], 55 );
+ devolatile_pointer[1] = 13;
+ T_step_eq_int( 61, devolatile_pointer[1], 13 );
+}
+
+/**
+ * @brief Invoke the RTEMS_EXPAND() macro on an example.
+ */
+static void RtemsBasedefsValBasedefs_Action_25( void )
+{
+ int expand_result;
+ expand_result = RTEMS_EXPAND( EXPAND )();
+
+ /*
+ * Check that the argument of RTEMS_EXPAND() is expanded and returned.
+ */
+ T_step_eq_int( 62, expand_result, 82 );
+}
+
+/**
+ * @brief Invoke the FALSE macro on an example.
+ */
+static void RtemsBasedefsValBasedefs_Action_26( void )
+{
+ char *false_result;
+ false_result = _TO_STR( FALSE );
+
+ /*
+ * Check that of FALSE is substituted by 0.
+ */
+ T_step_eq_str( 63, false_result, "0" );
+}
+
+/**
+ * @brief Invoke the RTEMS_HAVE_MEMBER_SAME_TYPE() macro on examples.
+ */
+static void RtemsBasedefsValBasedefs_Action_27( void )
+{
+ typedef union {
+ short s;
+ int **i;
+ char *c;
+ int a[5];
+ } same_type_union;
+ typedef struct {
+ const short u;
+ short v;
+ int *w;
+ char *x;
+ volatile int y[5];
+ int z;
+ } same_type_struct;
+ int same_type_result_0 = RTEMS_HAVE_MEMBER_SAME_TYPE(
+ same_type_union, s, same_type_struct, v );
+ int same_type_result_1 = RTEMS_HAVE_MEMBER_SAME_TYPE(
+ same_type_union, s, same_type_struct, z );
+ int same_type_result_2 = RTEMS_HAVE_MEMBER_SAME_TYPE(
+ same_type_union, i, same_type_struct, w );
+ int same_type_result_3 = RTEMS_HAVE_MEMBER_SAME_TYPE(
+ same_type_union, c, same_type_struct, x );
+ int same_type_result_4 = RTEMS_HAVE_MEMBER_SAME_TYPE(
+ same_type_union, a, same_type_struct, y );
+ int same_type_result_5 = RTEMS_HAVE_MEMBER_SAME_TYPE(
+ same_type_union, s, same_type_union, s );
+ int same_type_result_6 = RTEMS_HAVE_MEMBER_SAME_TYPE(
+ same_type_union, i, same_type_union, i );
+ int same_type_result_7 = RTEMS_HAVE_MEMBER_SAME_TYPE(
+ same_type_union, s, same_type_struct, y );
+ int same_type_result_8 = RTEMS_HAVE_MEMBER_SAME_TYPE(
+ same_type_union, a, same_type_struct, w );
+ int same_type_result_9 = RTEMS_HAVE_MEMBER_SAME_TYPE(
+ same_type_union, s, same_type_struct, u );
+
+ /*
+ * Check that of RTEMS_HAVE_MEMBER_SAME_TYPE() returns 0 and 1 depending on
+ * whether these types are compatible.
+ */
+ T_step_eq_int( 64, same_type_result_0, 1 );
+ T_step_eq_int( 65, same_type_result_1, 0 );
+ T_step_eq_int( 66, same_type_result_2, 0 );
+ T_step_eq_int( 67, same_type_result_3, 1 );
+ T_step_eq_int( 68, same_type_result_4, 1 );
+ T_step_eq_int( 69, same_type_result_5, 1 );
+ T_step_eq_int( 70, same_type_result_6, 1 );
+ T_step_eq_int( 71, same_type_result_7, 0 );
+ T_step_eq_int( 72, same_type_result_8, 0 );
+ T_step_eq_int( 73, same_type_result_9, 1 );
+}
+
+/**
+ * @brief Use the RTEMS_INLINE_ROUTINE in the definition of function
+ * inline_routine_func() at the beginning of this file. Obtain the text the
+ * macro RTEMS_INLINE_ROUTINE produces.
+ */
+static void RtemsBasedefsValBasedefs_Action_28( void )
+{
+ const int inline_routine_step = 74;
+ int inline_routine_result;
+ char *inline_routine_text;
+ inline_routine_result = inline_routine_func( 3 );
+ inline_routine_text = _TO_STR( RTEMS_INLINE_ROUTINE );
+
+ /*
+ * Check that the RTEMS_INLINE_ROUTINE exists and that it produces the
+ * desired text.
+ */
+ if( 0 == strcmp( "static inline", inline_routine_text ) ) {
+ T_step_eq_str( inline_routine_step,
+ inline_routine_text, "static inline" );
+ } else {
+ T_step_eq_str( inline_routine_step,
+ inline_routine_text, "static __inline__" );
+ }
+ T_step_eq_int( 75, inline_routine_result, 8 );
+}
+
+/**
+ * @brief Use a function declared with the RTEMS_MALLOCLIKE macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_29( void )
+{
+ void *malloclike_ptr;
+ /*
+ * If this code is not compiled using GNU C, I still have to run a check
+ * to avoid trouble with the {step} counter of the checks.
+ */
+ const char *malloclike_text = "__attribute__((__malloc__))";
+ malloclike_ptr = basedefs_malloclike_func( 102 );
+ basedefs_free( malloclike_ptr );
+ #if defined( __GNUC__ )
+ malloclike_text = remove_white_space( _TO_STR( RTEMS_MALLOCLIKE ) );
+ #endif
+
+ /*
+ * It cannot be checked that the RTEMS_MALLOCLIKE macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and that it can
+ * be used on such a memory function and that it produces the correct code.
+ */
+ T_step_not_null( 76, malloclike_ptr );
+ T_step_eq_str( 77, malloclike_text, "__attribute__((__malloc__))" );
+}
+
+/**
+ * @brief Use a function declared with the RTEMS_NO_INLINE macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_30( void )
+{
+ int no_inline_result;
+ /*
+ * If this code is not compiled using GNU C, I still have to run a check
+ * to avoid trouble with the {step} counter of the checks.
+ */
+ const char *no_inline_text = "__attribute__((__noinline__))";
+ no_inline_result = no_inline_func();
+ #if defined( __GNUC__ )
+ no_inline_text = remove_white_space( _TO_STR( RTEMS_NO_INLINE ) );
+ #endif
+
+ /*
+ * It cannot be checked that the RTEMS_NO_INLINE macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and that it can
+ * be used on such a function and that it produces the correct code.
+ */
+ T_step_eq_int( 78, no_inline_result, 75 );
+ T_step_eq_str( 79, no_inline_text, "__attribute__((__noinline__))" );
+}
+
+/**
+ * @brief Use of the RTEMS_NO_RETURN macro at the beginning of this file.
+ */
+static void RtemsBasedefsValBasedefs_Action_31( void )
+{
+ (void) no_return_func;
+
+ /*
+ * It cannot be checked that the RTEMS_NO_RETURN macro has the desired
+ * effect. It is only checked that such a macro exists.
+ */
+
+}
+
+/**
+ * @brief Use the RTEMS_NOINIT macro on ``noinit_variable`` at the beginning of
+ * this file.
+ */
+static void RtemsBasedefsValBasedefs_Action_32( void )
+{
+ /* No action */
+
+ /*
+ * It cannot be checked that the RTEMS_NOINIT macro has the desired effect.
+ * Yet, the check confirms that such a macro exists and can be used.
+ */
+ T_step_not_null( 80, &noinit_variable );
+}
+
+/**
+ * @brief Use the RTEMS_OBFUSCATE_VARIABLE() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_33( void )
+{
+ short obfuscate_variable = 66;
+ RTEMS_OBFUSCATE_VARIABLE( obfuscate_variable );
+
+ /*
+ * It cannot be checked that the RTEMS_OBFUSCATE_VARIABLE() macro has the
+ * desired effect. Yet, the check confirms that such a macro exists and can
+ * be used.
+ */
+ T_step_eq_int( 81, obfuscate_variable, 66 );
+}
+
+/**
+ * @brief Use the RTEMS_PACKED macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_34( void )
+{
+ int packed_offset;
+ int packed_full_i_offset;
+ int packed_full_j_offset;
+ int packed_enum_size;
+ typedef struct {
+ uint8_t c;
+ RTEMS_PACKED uint32_t i;
+ } packed_struct;
+ typedef struct RTEMS_PACKED {
+ uint8_t c;
+ uint32_t i;
+ uint32_t j;
+ } packed_full_struct;
+ typedef enum RTEMS_PACKED {
+ red = 1,
+ green,
+ yellow,
+ blue = 255
+ } packed_enum;
+ packed_offset = offsetof( packed_struct, i );
+ packed_full_i_offset = offsetof( packed_full_struct, i );
+ packed_full_j_offset = offsetof( packed_full_struct, j );
+ packed_enum_size = sizeof( packed_enum );
+
+ /*
+ * Check that RTEMS_PACKED correctly aligns a structure member.
+ */
+ T_step_eq_int( 82, packed_offset, 1 );
+
+ /*
+ * Check that RTEMS_PACKED correctly aligns all structure members.
+ */
+ T_step_eq_int( 83, packed_full_i_offset, 1 );
+ T_step_eq_int( 84, packed_full_j_offset, 5 );
+
+ /*
+ * Check that RTEMS_PACKED correctly enforces a minimal enum type.
+ */
+ T_step_eq_int( 85, packed_enum_size, 1 );
+}
+
+/**
+ * @brief Use the RTEMS_PREDICT_FALSE() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_35( void )
+{
+ /* No action */
+
+ /*
+ * It cannot be checked that the RTEMS_PREDICT_FALSE() macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and can be used.
+ */
+ T_step_eq_int( 86, RTEMS_PREDICT_FALSE( PREDICT_FALSE 1 ), 0 );
+}
+
+/**
+ * @brief Use the RTEMS_PREDICT_TRUE() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_36( void )
+{
+ /* No action */
+
+ /*
+ * It cannot be checked that the RTEMS_PREDICT_TRUE() macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and can be used.
+ */
+ T_step_eq_int( 87, RTEMS_PREDICT_TRUE( 6 - 5 ), 1 );
+}
+
+/**
+ * @brief Use a function declared with the RTEMS_PRINTFLIKE() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_37( void )
+{
+ int printflike_result;
+ printflike_result = printflike_func(
+ "RTEMS_PRINTFLIKE",
+ "%d %lx %s\n",
+ 123,
+ 0xABCDEFL,
+ "test output"
+ );
+
+ /*
+ * It cannot automatically be checked that the RTEMS_PRINTFLIKE() macro has
+ * the desired effect. Yet, the check confirms that such a macro exists and
+ * that it can be used on such a printf-like function and that the argument
+ * numbers are correct.
+ */
+ T_step_eq_int( 88, printflike_result, 23 );
+}
+
+/**
+ * @brief Use the RTEMS_PURE macro at the beginning of this file.
+ */
+static void RtemsBasedefsValBasedefs_Action_38( void )
+{
+ int pure_result;
+ int pure_result_2;
+ pure_result = pure_func();
+ pure_result_2 = pure_func();
+
+ /*
+ * It cannot be checked that the RTEMS_PURE macro has the desired effect. It
+ * is checked that such a macro exists.
+ */
+ T_step_eq_int( 89, pure_result, 21 );
+ T_step_eq_int( 90, pure_result_2, 21 );
+}
+
+/**
+ * @brief Get the code the RTEMS_RETURN_ADDRESS() macro produces as string.
+ */
+static void RtemsBasedefsValBasedefs_Action_39( void )
+{
+ /*
+ * If this code is not compiled using GNU C, I still have to run a check
+ * to avoid trouble with the {step} counter of the checks.
+ */
+ const char *return_address_text = "__builtin_return_address(0)";
+ #if defined( __GNUC__ )
+ return_address_text =
+ remove_white_space( _TO_STR( RTEMS_RETURN_ADDRESS() ) );
+ #endif
+
+ /*
+ * The check confirms that a RTEMS_RETURN_ADDRESS() macro exists and that it
+ * produces the correct code.
+ */
+ T_step_eq_str( 91,
+ return_address_text, "__builtin_return_address(0)" );
+}
+
+/**
+ * @brief Use the RTEMS_SECTION() macro on ``section_variable`` and
+ * ``section_func`` at the beginning of this file.
+ */
+static void RtemsBasedefsValBasedefs_Action_40( void )
+{
+ short section_result;
+ section_result = section_func( 1234567 );
+
+ /*
+ * It cannot be checked that the RTEMS_SECTION() macro has the desired
+ * effect. Yet, the check confirms that such a macro exists and can be used.
+ */
+ T_step_eq_int( 92, section_var, 28 );
+ T_step_eq_int( 93, section_result, 67 );
+}
+
+/**
+ * @brief Evaluate if RTEMS_STATIC_ANALYSIS is defined.
+ */
+static void RtemsBasedefsValBasedefs_Action_41( void )
+{
+ #if defined(RTEMS_STATIC_ANALYSIS)
+ bool defined = true;
+ #else
+ bool defined = false;
+ #endif
+
+ /*
+ * Check that RTEMS_STATIC_ANALYSIS was not defined.
+ */
+ T_step_false( 94, defined );
+}
+
+/**
+ * @brief Use the RTEMS_STATIC_ASSERT() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_42( void )
+{
+ RTEMS_STATIC_ASSERT( STATIC_ASSERT_COND 1, RTEMS_STATIC_ASSERT_test );
+
+ /*
+ * It cannot be automatically check that the RTEMS_STATIC_ASSERT() macro has
+ * the desired effect. Yet, it can be checked that the macro exists and
+ * accepts the specified arguments.
+ */
+
+}
+
+/**
+ * @brief Use the RTEMS_STRING() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_43( void )
+{
+ const char *string_var;
+ const char *string_empty_var;
+ const char *string_multi_args_var;
+ /* strange spacing and tabs belong to the test */
+ string_var = RTEMS_STRING( \\ STRING_PREFIX cat""\n );
+ string_empty_var = RTEMS_STRING();
+ string_multi_args_var = RTEMS_STRING( STRING_PREFIX, "abc", DEF );
+
+ /*
+ * Check that the RTEMS_STRING() macro converts its arguments into a single
+ * string without applying pre-processor substitutions on its arguments.
+ */
+ T_step_eq_str( 95, string_var, "\\ STRING_PREFIX cat\"\"\n" );
+ T_step_eq_str( 96, string_empty_var, "" );
+ T_step_eq_str( 97, string_multi_args_var,
+ "STRING_PREFIX, \"abc\", DEF" );
+}
+
+/**
+ * @brief Use the RTEMS_SYMBOL_NAME() macro with an example object.
+ */
+static void RtemsBasedefsValBasedefs_Action_44( void )
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the RTEMS_SYMBOL_NAME() macro expands to the expected symbol
+ * name.
+ */
+ T_step_eq_ptr( 98, &global_object, &address_of_global_object );
+}
+
+/**
+ * @brief Invoke the TRUE macro on an example.
+ */
+static void RtemsBasedefsValBasedefs_Action_45( void )
+{
+ char *true_result;
+ true_result = _TO_STR( TRUE );
+
+ /*
+ * Check that of TRUE is substituted by 0.
+ */
+ T_step_eq_str( 99, true_result, "1" );
+}
+
+/**
+ * @brief Use of the RTEMS_TYPEOF_REFX() macro on several examples. This use
+ * is already the test as the statements will not compile without error if
+ * the macro did not evaluate to the correct type.
+ */
+static void RtemsBasedefsValBasedefs_Action_46( void )
+{
+ int type_refx_val = 7;
+ char type_refx_chr = 'c';
+ char *type_refx_chr_p = &type_refx_chr;
+ char **type_refx_chr_pp = &type_refx_chr_p;
+ const short type_refx_const_val = 333;
+ RTEMS_TYPEOF_REFX( *, int *) type_refx_x_int = 8;
+ RTEMS_TYPEOF_REFX( **, int **) type_refx_xx_int = 9;
+ RTEMS_TYPEOF_REFX( ***, int ***) type_refx_xxx_int = 10;
+ RTEMS_TYPEOF_REFX( **, int ***) type_refx_xxx_int_p = &type_refx_val;
+ RTEMS_TYPEOF_REFX( **, &type_refx_chr_p) type_refx_ax_char = 'd';
+ RTEMS_TYPEOF_REFX( *, type_refx_chr_p) type_refx_x_char = 'e';
+ RTEMS_TYPEOF_REFX( , *type_refx_chr_p) type_refx_char = 'f';
+ RTEMS_TYPEOF_REFX( *, type_refx_chr_pp[0]) type_refx_xx_char = 'g';
+ RTEMS_TYPEOF_REFX( *, const short **)
+ type_refx_xx_const_short_p = &type_refx_const_val;
+
+ /*
+ * The checks here are proforma. The macro is tested by the fact that the
+ * action will not compile if the macro returns a wrong result.
+ */
+ T_step_eq_int( 100, type_refx_val, 7 );
+ T_step_eq_int( 101, type_refx_x_int, 8 );
+ T_step_eq_int( 102, type_refx_xx_int, 9 );
+ T_step_eq_int( 103, type_refx_xxx_int, 10 );
+ T_step_eq_int( 104, *type_refx_xxx_int_p, 7 );
+ T_step_eq_char( 105, type_refx_chr, 'c' );
+ T_step_eq_char( 106, type_refx_ax_char, 'd' );
+ T_step_eq_char( 107, type_refx_x_char, 'e' );
+ T_step_eq_char( 108, type_refx_char, 'f' );
+ T_step_eq_char( 109, type_refx_xx_char, 'g' );
+ T_step_eq_short( 110, *type_refx_xx_const_short_p, 333 );
+}
+
+/**
+ * @brief Use the RTEMS_UNUSED macro. See also unused_func() at the beginning
+ * of this file.
+ */
+static void RtemsBasedefsValBasedefs_Action_47( void )
+{
+ int unused_var RTEMS_UNUSED;
+ typedef struct RTEMS_UNUSED {
+ char c;
+ int i;
+ } unused_struct_t;
+ unused_struct_t unused_struct = { '@', 13 };
+
+ /*
+ * It cannot automatically be checked that the RTEMS_UNUSED macro has the
+ * desired effect. It is checked that such a macro exists and one can
+ * manually check that no compiler warnings are produced for the
+ * unused_func().
+ */
+
+
+ /*
+ * It cannot automatically be checked that the RTEMS_UNUSED macro has the
+ * desired effect. It is checked that such a macro exists and one can
+ * manually check that no compiler warnings are produced for the
+ * unused_lable.
+ */
+ unused_lable:
+ RTEMS_UNUSED;
+
+ /*
+ * It cannot automatically be checked that the RTEMS_UNUSED macro has the
+ * desired effect. It is checked that such a macro exists and one can
+ * manually check that no compiler warnings are produced for the
+ * unused_struct.
+ */
+
+
+ /*
+ * It cannot automatically be checked that the RTEMS_UNUSED macro has the
+ * desired effect. It is checked that such a macro exists and one can
+ * manually check that no compiler warnings are produced for the unused items
+ * unused_var and the unused argument and variable in unused_func().
+ */
+
+}
+
+/**
+ * @brief Use of the RTEMS_UNREACHABLE() macro in function definition of
+ * unreachable_func() at the beginning of this file.
+ */
+static void RtemsBasedefsValBasedefs_Action_48( void )
+{
+ int unreachable_result;
+ unreachable_result = unreachable_func(2101);
+
+ /*
+ * It cannot be checked that the RTEMS_UNREACHABLE() macro has the desired
+ * effect. It is checked that such a macro exists and the compiler warning
+ * about the missing return statement is suppressed.
+ */
+ T_step_eq_int( 111, unreachable_result, 2101 );
+}
+
+/**
+ * @brief Use of the RTEMS_USED macro in function definition of used_func() at
+ * the beginning of this file and with used_var above.
+ */
+static void RtemsBasedefsValBasedefs_Action_49( void )
+{
+ /* No action */
+
+ /*
+ * It cannot be checked that the RTEMS_USED macro has the desired effect. It
+ * is checked that such a macro exists.
+ */
+
+}
+
+/**
+ * @brief Use of the RTEMS_WARN_UNUSED_RESULT macro in function definition of
+ * warn_unused_func() at the beginning of this file.
+ */
+static void RtemsBasedefsValBasedefs_Action_50( void )
+{
+ int warn_unused_result;
+ warn_unused_result = warn_unused_func( 33 );
+ /*
+ * Derivation from Coding Style:
+ * The following code suppresses a compiler warning (instead of fixing
+ * it).
+ * Rational: Ignoring the function warn_unused_func() result is not really
+ * a bug but its purpose is to test the RTEMS_WARN_UNUSED_RESULT macro.
+ * The RTEMS_WARN_UNUSED_RESULT macro must result in a compiler warning
+ * here.
+ */
+ _Pragma( "GCC diagnostic push" )
+ _Pragma( "GCC diagnostic ignored \"-Wunused-result\"" )
+ warn_unused_func( 66 );
+ _Pragma( "GCC diagnostic pop" )
+
+ /*
+ * It cannot be checked that the RTEMS_WARN_UNUSED_RESULT macro has the
+ * desired effect. The GNU C compiler should issue a warning about the
+ * disregarded result returned by the call to the ``warn_unused_func()``
+ * function.
+ */
+ T_step_eq_int( 112, warn_unused_result, 11 );
+}
+
+/**
+ * @brief Use of ``basedefs_weak_alias_0/1_func()`` which are defined with the
+ * RTEMS_WEAK_ALIAS() macro at the beginning of this file.
+ */
+static void RtemsBasedefsValBasedefs_Action_51( void )
+{
+ int weak_alias_0_result;
+ int weak_alias_1_result;
+ weak_alias_0_result = ori_func( 3 ) + basedefs_weak_alias_0_func( 5 );
+ weak_alias_1_result = ori_func( 3 ) + basedefs_weak_alias_1_func( 5 );
+
+ /*
+ * There exists no strong alias for basedefs_weak_alias_0_func(). Check that
+ * ori_func() and basedefs_weak_alias_0_func() are the same function.
+ */
+ T_step_eq_int( 113, weak_alias_0_result, 16 );
+
+ /*
+ * File ``tc_basedefs_pndant.c`` defines a strong function for
+ * basedefs_weak_alias_1_func(). Check that ori_func() and
+ * basedefs_weak_alias_1_func() are not the same function.
+ */
+ T_step_eq_int( 114, weak_alias_1_result, 56 );
+}
+
+/**
+ * @brief Use of ``basedefs_weak_0/1_var`` and ``basedefs_weak_0/1_func()``
+ * which are defined with the RTEMS_WEAK macro at the beginning of this file.
+ */
+static void RtemsBasedefsValBasedefs_Action_52( void )
+{
+ int weak_0_result;
+ int weak_1_result;
+ weak_0_result = basedefs_weak_0_func();
+ weak_1_result = basedefs_weak_1_func();
+
+ /*
+ * For ``basedefs_weak_0_var`` and ``basedefs_weak_0_func()`` there exists no
+ * other symbols with the same name. Hence, the checks test that the weak
+ * symbols are used.
+ */
+ T_step_eq_int( 115, basedefs_weak_0_var, 60 );
+ T_step_eq_int( 116, weak_0_result, 63 );
+
+ /*
+ * ``basedefs_weak_1_var`` and ``basedefs_weak_1_func()`` are overwritten by
+ * strong symbols defined in file ``tc_basedefs_pendant.c``. Hence, the
+ * checks test that the strong variants are used.
+ */
+ T_step_eq_int( 117, basedefs_weak_1_var, 62 );
+ T_step_eq_int( 118, weak_1_result, 65 );
+}
+
+/**
+ * @brief Invoke the RTEMS_XCONCAT() macro on examples.
+ */
+static void RtemsBasedefsValBasedefs_Action_53( void )
+{
+ int xconcat0_result;
+ int xconcat1_result;
+ int xconcat2_result;
+ int xconcat3_result;
+ xconcat0_result = RTEMS_XCONCAT( con, cat )();
+ xconcat1_result = RTEMS_XCONCAT( CON, CAT )();
+ xconcat2_result =
+ RTEMS_XCONCAT( RTEMS_XCONCAT( CO, N ), RTEMS_XCONCAT( ca, t ) )();
+ xconcat3_result = RTEMS_CONCAT( def, cat )();
+
+ /*
+ * Check that the two arguments of RTEMS_XCONCAT() are concatenated without
+ * inserting new characters.
+ */
+ T_step_eq_int( 119, xconcat0_result, 91 );
+
+ /*
+ * Check that the two arguments of RTEMS_XCONCAT() are substituted before
+ * they are concatenated.
+ */
+ T_step_eq_int( 120, xconcat1_result, 91 );
+
+ /*
+ * Check that the two arguments of RTEMS_XCONCAT() are can be the macro
+ * itself.
+ */
+ T_step_eq_int( 121, xconcat2_result, 91 );
+
+ /*
+ * Check that the result of the RTEMS_XCONCAT() expansion is subject to a
+ * further pre-processor substitution.
+ */
+ T_step_eq_int( 122, xconcat3_result, 91 );
+}
+
+/**
+ * @brief Use the RTEMS_XSTRING() macro.
+ */
+static void RtemsBasedefsValBasedefs_Action_54( void )
+{
+ const char *xstring_var;
+ const char *xstring_empty_var;
+ const char *string_multi_args_var;
+ /* strange spacing and tabs belong to the test */
+ xstring_var = RTEMS_XSTRING( \\ STRING_PREFIX cat""\n );
+ xstring_empty_var = RTEMS_XSTRING();
+ string_multi_args_var = RTEMS_XSTRING( STRING_PREFIX, abc, "abc", DEF );
+
+ /*
+ * Check that the RTEMS_XSTRING() macro applies pre-processor substitutions
+ * on its arguments and converts its arguments into a single string.
+ */
+ T_step_eq_str( 123, xstring_var, "\\ str cat\"\"\n" );
+ T_step_eq_str( 124, xstring_empty_var, "" );
+ T_step_eq_str( 125, string_multi_args_var,
+ "str, ABC, \"abc\", DEF" );
+}
+
+/**
+ * @brief Use of the RTEMS_ZERO_LENGTH_ARRAY macro in a declaration of a
+ * structure.
+ */
+static void RtemsBasedefsValBasedefs_Action_55( void )
+{
+ typedef struct {
+ char chr;
+ int array[RTEMS_ZERO_LENGTH_ARRAY];
+ } zero_length_struct_0;
+ typedef struct {
+ char chr;
+ int array[1];
+ } zero_length_struct_1;
+
+ /*
+ * Checked that the RTEMS_ZERO_LENGTH_ARRAY macro produces a structure
+ * similar to a structure with one element.
+ */
+ T_step_eq_sz( 126, sizeof( zero_length_struct_0 ),
+ sizeof( zero_length_struct_1 ) - sizeof( int ) );
+ T_step_eq_sz( 127, offsetof( zero_length_struct_0, chr ),
+ offsetof( zero_length_struct_1, chr ) );
+ T_step_eq_sz( 128, offsetof( zero_length_struct_0, array ),
+ offsetof( zero_length_struct_1, array ) );
+}
+
+/**
+ * @brief Use the RTEMS_DEFINE_GLOBAL_SYMBOL() macro at the beginning of this
+ * file and assign the address of the symbol to an object.
+ */
+static void RtemsBasedefsValBasedefs_Action_56( void )
+{
+ /* No action */
+
+ /*
+ * Check that the RTEMS_DEFINE_GLOBAL_SYMBOL() macro defines a global symbol
+ * with the correct value.
+ */
+ T_step_eq_uptr( 129, (uintptr_t) global_symbol_2_object, 0x123 );
+}
+
+/**
+ * @fn void T_case_body_RtemsBasedefsValBasedefs( void )
+ */
+T_TEST_CASE( RtemsBasedefsValBasedefs )
+{
+ T_plan( 130 );
+
+ RtemsBasedefsValBasedefs_Action_0();
+ RtemsBasedefsValBasedefs_Action_1();
+ RtemsBasedefsValBasedefs_Action_2();
+ RtemsBasedefsValBasedefs_Action_3();
+ RtemsBasedefsValBasedefs_Action_4();
+ RtemsBasedefsValBasedefs_Action_5();
+ RtemsBasedefsValBasedefs_Action_6();
+ RtemsBasedefsValBasedefs_Action_7();
+ RtemsBasedefsValBasedefs_Action_8();
+ RtemsBasedefsValBasedefs_Action_9();
+ RtemsBasedefsValBasedefs_Action_10();
+ RtemsBasedefsValBasedefs_Action_11();
+ RtemsBasedefsValBasedefs_Action_12();
+ RtemsBasedefsValBasedefs_Action_13();
+ RtemsBasedefsValBasedefs_Action_14();
+ RtemsBasedefsValBasedefs_Action_15();
+ RtemsBasedefsValBasedefs_Action_16();
+ RtemsBasedefsValBasedefs_Action_17();
+ RtemsBasedefsValBasedefs_Action_18();
+ RtemsBasedefsValBasedefs_Action_19();
+ RtemsBasedefsValBasedefs_Action_20();
+ RtemsBasedefsValBasedefs_Action_21();
+ RtemsBasedefsValBasedefs_Action_22();
+ RtemsBasedefsValBasedefs_Action_23();
+ RtemsBasedefsValBasedefs_Action_24();
+ RtemsBasedefsValBasedefs_Action_25();
+ RtemsBasedefsValBasedefs_Action_26();
+ RtemsBasedefsValBasedefs_Action_27();
+ RtemsBasedefsValBasedefs_Action_28();
+ RtemsBasedefsValBasedefs_Action_29();
+ RtemsBasedefsValBasedefs_Action_30();
+ RtemsBasedefsValBasedefs_Action_31();
+ RtemsBasedefsValBasedefs_Action_32();
+ RtemsBasedefsValBasedefs_Action_33();
+ RtemsBasedefsValBasedefs_Action_34();
+ RtemsBasedefsValBasedefs_Action_35();
+ RtemsBasedefsValBasedefs_Action_36();
+ RtemsBasedefsValBasedefs_Action_37();
+ RtemsBasedefsValBasedefs_Action_38();
+ RtemsBasedefsValBasedefs_Action_39();
+ RtemsBasedefsValBasedefs_Action_40();
+ RtemsBasedefsValBasedefs_Action_41();
+ RtemsBasedefsValBasedefs_Action_42();
+ RtemsBasedefsValBasedefs_Action_43();
+ RtemsBasedefsValBasedefs_Action_44();
+ RtemsBasedefsValBasedefs_Action_45();
+ RtemsBasedefsValBasedefs_Action_46();
+ RtemsBasedefsValBasedefs_Action_47();
+ RtemsBasedefsValBasedefs_Action_48();
+ RtemsBasedefsValBasedefs_Action_49();
+ RtemsBasedefsValBasedefs_Action_50();
+ RtemsBasedefsValBasedefs_Action_51();
+ RtemsBasedefsValBasedefs_Action_52();
+ RtemsBasedefsValBasedefs_Action_53();
+ RtemsBasedefsValBasedefs_Action_54();
+ RtemsBasedefsValBasedefs_Action_55();
+ RtemsBasedefsValBasedefs_Action_56();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-bsp-interrupt-handler-dispatch-unchecked.c b/testsuites/validation/tc-bsp-interrupt-handler-dispatch-unchecked.c
new file mode 100644
index 0000000000..cef52bd991
--- /dev/null
+++ b/testsuites/validation/tc-bsp-interrupt-handler-dispatch-unchecked.c
@@ -0,0 +1,649 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup BspReqInterruptHandlerDispatchUnchecked
+ */
+
+/*
+ * Copyright (C) 2021, 2023 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <setjmp.h>
+#include <bsp/irq-generic.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup BspReqInterruptHandlerDispatchUnchecked \
+ * spec:/bsp/req/interrupt-handler-dispatch-unchecked
+ *
+ * @ingroup TestsuitesValidationIntr
+ *
+ * @{
+ */
+
+typedef enum {
+ BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirst_Null,
+ BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirst_Entry,
+ BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirst_NA
+} BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirst;
+
+typedef enum {
+ BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirstAgain_Null,
+ BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirstAgain_Entry,
+ BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirstAgain_NA
+} BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirstAgain;
+
+typedef enum {
+ BspReqInterruptHandlerDispatchUnchecked_Post_Result_FatalError,
+ BspReqInterruptHandlerDispatchUnchecked_Post_Result_Dispatch,
+ BspReqInterruptHandlerDispatchUnchecked_Post_Result_NA
+} BspReqInterruptHandlerDispatchUnchecked_Post_Result;
+
+typedef enum {
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalSource_SpuriousInterrupt,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalSource_NA
+} BspReqInterruptHandlerDispatchUnchecked_Post_FatalSource;
+
+typedef enum {
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalCode_Vector,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalCode_NA
+} BspReqInterruptHandlerDispatchUnchecked_Post_FatalCode;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_LoadFirst_NA : 1;
+ uint8_t Pre_LoadFirstAgain_NA : 1;
+ uint8_t Post_Result : 2;
+ uint8_t Post_FatalSource : 1;
+ uint8_t Post_FatalCode : 1;
+} BspReqInterruptHandlerDispatchUnchecked_Entry;
+
+/**
+ * @brief Test context for spec:/bsp/req/interrupt-handler-dispatch-unchecked
+ * test case.
+ */
+typedef struct {
+ /**
+ * @brief This member references the interrupt entry to restore during test
+ * case teardown.
+ */
+ rtems_interrupt_entry *entry_to_restore;
+
+ /**
+ * @brief This member provides a jump buffer to return from the fatal error.
+ */
+ jmp_buf before_call;
+
+ /**
+ * @brief This member provides an interrupt entry to be dispatched.
+ */
+ rtems_interrupt_entry entry;
+
+ /**
+ * @brief This member is true, then an interrupt occurred.
+ */
+ volatile bool interrupt_occurred;
+
+ /**
+ * @brief This member provides an entry dispatch counter.
+ */
+ uint32_t entry_counter;
+
+ /**
+ * @brief This member provides a fatal error counter.
+ */
+ uint32_t fatal_counter;
+
+ /**
+ * @brief This member contains the fatal source.
+ */
+ rtems_fatal_source fatal_source;
+
+ /**
+ * @brief This member contains a fatal code.
+ */
+ rtems_fatal_code fatal_code;
+
+ /**
+ * @brief This member contains the vector number of a testable interrupt.
+ */
+ rtems_vector_number test_vector;
+
+ /**
+ * @brief This member references the pointer to the first entry of the
+ * interrupt vector.
+ */
+ rtems_interrupt_entry **first;
+
+ /**
+ * @brief This member references an interrupt entry for the first entry of
+ * the interrupt vector or is NULL.
+ */
+ rtems_interrupt_entry *first_again;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 2 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ BspReqInterruptHandlerDispatchUnchecked_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} BspReqInterruptHandlerDispatchUnchecked_Context;
+
+static BspReqInterruptHandlerDispatchUnchecked_Context
+ BspReqInterruptHandlerDispatchUnchecked_Instance;
+
+static const char * const BspReqInterruptHandlerDispatchUnchecked_PreDesc_LoadFirst[] = {
+ "Null",
+ "Entry",
+ "NA"
+};
+
+static const char * const BspReqInterruptHandlerDispatchUnchecked_PreDesc_LoadFirstAgain[] = {
+ "Null",
+ "Entry",
+ "NA"
+};
+
+static const char * const * const BspReqInterruptHandlerDispatchUnchecked_PreDesc[] = {
+ BspReqInterruptHandlerDispatchUnchecked_PreDesc_LoadFirst,
+ BspReqInterruptHandlerDispatchUnchecked_PreDesc_LoadFirstAgain,
+ NULL
+};
+
+typedef BspReqInterruptHandlerDispatchUnchecked_Context Context;
+
+static bool test_case_active;
+
+static void Disable( const Context *ctx )
+{
+ (void) rtems_interrupt_vector_disable( ctx->test_vector );
+}
+
+static void ProcessInterrupt( Context *ctx )
+{
+ ctx->interrupt_occurred = true;
+ CallWithinISRClear();
+ Disable( ctx );
+}
+
+static void EntryRoutine( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ ++ctx->entry_counter;
+ ProcessInterrupt( ctx );
+}
+
+static void Fatal(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+ ctx->fatal_source = source;
+ ctx->fatal_code = code;
+ ++ctx->fatal_counter;
+ longjmp( ctx->before_call, 1 );
+}
+
+void __real_bsp_interrupt_handler_default( rtems_vector_number vector );
+
+void __wrap_bsp_interrupt_handler_default( rtems_vector_number vector );
+
+void __wrap_bsp_interrupt_handler_default( rtems_vector_number vector )
+{
+ if ( test_case_active ) {
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ ProcessInterrupt( ctx );
+
+ if ( setjmp( ctx->before_call ) == 0 ) {
+ __real_bsp_interrupt_handler_default( vector );
+ }
+ } else {
+ __real_bsp_interrupt_handler_default( vector );
+ }
+}
+
+#if defined(RTEMS_SMP)
+void __real_bsp_interrupt_spurious( rtems_vector_number vector );
+
+void __wrap_bsp_interrupt_spurious( rtems_vector_number vector );
+
+void __wrap_bsp_interrupt_spurious( rtems_vector_number vector )
+{
+ if ( test_case_active ) {
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ *ctx->first = ctx->first_again;
+ }
+
+ __real_bsp_interrupt_spurious( vector );
+}
+#endif
+
+static void BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirst_Prepare(
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx,
+ BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirst state
+)
+{
+ switch ( state ) {
+ case BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirst_Null: {
+ /*
+ * While the first loaded value of the pointer to the first interrupt
+ * entry of the interrupt vector specified by the ``vector`` parameter is
+ * equal to NULL.
+ */
+ *ctx->first = NULL;
+ break;
+ }
+
+ case BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirst_Entry: {
+ /*
+ * While the first loaded value of the pointer to the first interrupt
+ * entry of the interrupt vector specified by the ``vector`` parameter
+ * references an object of type rtems_interrupt_entry.
+ */
+ *ctx->first = &ctx->entry;
+ break;
+ }
+
+ case BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirst_NA:
+ break;
+ }
+}
+
+static void BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirstAgain_Prepare(
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx,
+ BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirstAgain state
+)
+{
+ switch ( state ) {
+ case BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirstAgain_Null: {
+ /*
+ * While the second loaded value of the pointer to the first interrupt
+ * entry of the interrupt vector specified by the ``vector`` parameter is
+ * equal to NULL.
+ */
+ ctx->first_again = NULL;
+ break;
+ }
+
+ case BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirstAgain_Entry: {
+ /*
+ * While the second loaded value of the pointer to the first interrupt
+ * entry of the interrupt vector specified by the ``vector`` parameter
+ * references an object of type rtems_interrupt_entry.
+ */
+ ctx->first_again = &ctx->entry;
+ break;
+ }
+
+ case BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirstAgain_NA:
+ break;
+ }
+}
+
+static void BspReqInterruptHandlerDispatchUnchecked_Post_Result_Check(
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx,
+ BspReqInterruptHandlerDispatchUnchecked_Post_Result state
+)
+{
+ switch ( state ) {
+ case BspReqInterruptHandlerDispatchUnchecked_Post_Result_FatalError: {
+ /*
+ * A fatal error shall occur.
+ */
+ T_eq_u32( ctx->entry_counter, 0 );
+ T_eq_u32( ctx->fatal_counter, 1 );
+ break;
+ }
+
+ case BspReqInterruptHandlerDispatchUnchecked_Post_Result_Dispatch: {
+ /*
+ * The interrupt entries installed at the interrupt vector specified by
+ * the ``vector`` parameter shall be dispatched.
+ */
+ T_eq_u32( ctx->entry_counter, 1 );
+ T_eq_u32( ctx->fatal_counter, 0 );
+ break;
+ }
+
+ case BspReqInterruptHandlerDispatchUnchecked_Post_Result_NA:
+ break;
+ }
+}
+
+static void BspReqInterruptHandlerDispatchUnchecked_Post_FatalSource_Check(
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalSource state
+)
+{
+ switch ( state ) {
+ case BspReqInterruptHandlerDispatchUnchecked_Post_FatalSource_SpuriousInterrupt: {
+ /*
+ * The fatal source shall be equal to
+ * RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT.
+ */
+ T_eq_int( ctx->fatal_source, RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT );
+ break;
+ }
+
+ case BspReqInterruptHandlerDispatchUnchecked_Post_FatalSource_NA:
+ break;
+ }
+}
+
+static void BspReqInterruptHandlerDispatchUnchecked_Post_FatalCode_Check(
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalCode state
+)
+{
+ switch ( state ) {
+ case BspReqInterruptHandlerDispatchUnchecked_Post_FatalCode_Vector: {
+ /*
+ * The fatal code shall be equal to the ``vector`` parameter.
+ */
+ T_eq_ulong( ctx->fatal_code, ctx->test_vector );
+ break;
+ }
+
+ case BspReqInterruptHandlerDispatchUnchecked_Post_FatalCode_NA:
+ break;
+ }
+}
+
+static void BspReqInterruptHandlerDispatchUnchecked_Setup(
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx
+)
+{
+ ctx->first = NULL;
+ ctx->test_vector = CallWithinISRGetVector();
+ T_assert_lt_u32( ctx->test_vector, BSP_INTERRUPT_VECTOR_COUNT );
+ ctx->first = &bsp_interrupt_dispatch_table[
+ bsp_interrupt_dispatch_index( ctx->test_vector )
+ ];
+ ctx->entry_to_restore = *ctx->first;
+
+ rtems_interrupt_entry_initialize( &ctx->entry, EntryRoutine, ctx, "Info" );
+ test_case_active = true;
+ SetFatalHandler( Fatal, ctx );
+}
+
+static void BspReqInterruptHandlerDispatchUnchecked_Setup_Wrap( void *arg )
+{
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ BspReqInterruptHandlerDispatchUnchecked_Setup( ctx );
+}
+
+static void BspReqInterruptHandlerDispatchUnchecked_Teardown(
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx
+)
+{
+ SetFatalHandler( NULL, NULL );
+ test_case_active = false;
+
+ if ( ctx->first != NULL ) {
+ *ctx->first = ctx->entry_to_restore;
+ }
+}
+
+static void BspReqInterruptHandlerDispatchUnchecked_Teardown_Wrap( void *arg )
+{
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ BspReqInterruptHandlerDispatchUnchecked_Teardown( ctx );
+}
+
+static void BspReqInterruptHandlerDispatchUnchecked_Action(
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx
+)
+{
+ ctx->interrupt_occurred = false;
+ ctx->entry_counter = 0;
+ ctx->fatal_counter = 0;
+ ctx->fatal_source = RTEMS_FATAL_SOURCE_LAST;
+ ctx->fatal_code = UINT32_MAX;
+
+ (void) rtems_interrupt_vector_enable( ctx->test_vector );
+
+ CallWithinISRRaise();
+
+ while ( !ctx->interrupt_occurred ) {
+ /* Wait */
+ }
+
+ Disable( ctx );
+}
+
+static const BspReqInterruptHandlerDispatchUnchecked_Entry
+BspReqInterruptHandlerDispatchUnchecked_Entries[] = {
+ { 0, 0, 1, BspReqInterruptHandlerDispatchUnchecked_Post_Result_Dispatch,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalSource_NA,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalCode_NA },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, BspReqInterruptHandlerDispatchUnchecked_Post_Result_FatalError,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalSource_SpuriousInterrupt,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalCode_Vector },
+#else
+ { 0, 0, 1, BspReqInterruptHandlerDispatchUnchecked_Post_Result_FatalError,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalSource_SpuriousInterrupt,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalCode_Vector },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, BspReqInterruptHandlerDispatchUnchecked_Post_Result_Dispatch,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalSource_NA,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalCode_NA }
+#else
+ { 0, 0, 1, BspReqInterruptHandlerDispatchUnchecked_Post_Result_FatalError,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalSource_SpuriousInterrupt,
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalCode_Vector }
+#endif
+};
+
+static const uint8_t
+BspReqInterruptHandlerDispatchUnchecked_Map[] = {
+ 1, 2, 0, 0
+};
+
+static size_t BspReqInterruptHandlerDispatchUnchecked_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ BspReqInterruptHandlerDispatchUnchecked_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture BspReqInterruptHandlerDispatchUnchecked_Fixture = {
+ .setup = BspReqInterruptHandlerDispatchUnchecked_Setup_Wrap,
+ .stop = NULL,
+ .teardown = BspReqInterruptHandlerDispatchUnchecked_Teardown_Wrap,
+ .scope = BspReqInterruptHandlerDispatchUnchecked_Scope,
+ .initial_context = &BspReqInterruptHandlerDispatchUnchecked_Instance
+};
+
+static inline BspReqInterruptHandlerDispatchUnchecked_Entry
+BspReqInterruptHandlerDispatchUnchecked_PopEntry(
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return BspReqInterruptHandlerDispatchUnchecked_Entries[
+ BspReqInterruptHandlerDispatchUnchecked_Map[ index ]
+ ];
+}
+
+static void BspReqInterruptHandlerDispatchUnchecked_SetPreConditionStates(
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_LoadFirstAgain_NA ) {
+ ctx->Map.pcs[ 1 ] = BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirstAgain_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+}
+
+static void BspReqInterruptHandlerDispatchUnchecked_TestVariant(
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx
+)
+{
+ BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirst_Prepare(
+ ctx,
+ ctx->Map.pcs[ 0 ]
+ );
+ BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirstAgain_Prepare(
+ ctx,
+ ctx->Map.pcs[ 1 ]
+ );
+ BspReqInterruptHandlerDispatchUnchecked_Action( ctx );
+ BspReqInterruptHandlerDispatchUnchecked_Post_Result_Check(
+ ctx,
+ ctx->Map.entry.Post_Result
+ );
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalSource_Check(
+ ctx,
+ ctx->Map.entry.Post_FatalSource
+ );
+ BspReqInterruptHandlerDispatchUnchecked_Post_FatalCode_Check(
+ ctx,
+ ctx->Map.entry.Post_FatalCode
+ );
+}
+
+/**
+ * @fn void T_case_body_BspReqInterruptHandlerDispatchUnchecked( void )
+ */
+T_TEST_CASE_FIXTURE(
+ BspReqInterruptHandlerDispatchUnchecked,
+ &BspReqInterruptHandlerDispatchUnchecked_Fixture
+)
+{
+ BspReqInterruptHandlerDispatchUnchecked_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirst_Null;
+ ctx->Map.pci[ 0 ] < BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirst_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirstAgain_Null;
+ ctx->Map.pci[ 1 ] < BspReqInterruptHandlerDispatchUnchecked_Pre_LoadFirstAgain_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ ctx->Map.entry = BspReqInterruptHandlerDispatchUnchecked_PopEntry( ctx );
+ BspReqInterruptHandlerDispatchUnchecked_SetPreConditionStates( ctx );
+ BspReqInterruptHandlerDispatchUnchecked_TestVariant( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-c.c b/testsuites/validation/tc-c.c
new file mode 100644
index 0000000000..646a838609
--- /dev/null
+++ b/testsuites/validation/tc-c.c
@@ -0,0 +1,189 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup CValC
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup CValC spec:/c/val/c
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests C library functions.
+ *
+ * This test case performs the following actions:
+ *
+ * - Call memcpy() for a sample set of buffers.
+ *
+ * - Call memset() for a sample set of buffers.
+ *
+ * @{
+ */
+
+static void Clear( volatile uint8_t *b, const volatile uint8_t *e )
+{
+ while ( b != e ) {
+ *b = 0;
+ ++b;
+ }
+}
+
+static bool Compare(
+ volatile uint8_t *b,
+ const volatile uint8_t *e,
+ uint8_t expected
+)
+{
+ bool result;
+
+ result = true;
+
+ while ( b != e ) {
+ result = result && *b == expected;
+ ++b;
+ }
+
+ return result;
+}
+
+/**
+ * @brief Call memcpy() for a sample set of buffers.
+ */
+static void CValC_Action_0( void )
+{
+ uint8_t src[sizeof( long ) * 10];
+ uint8_t dst[sizeof( long ) * 10];
+ uint8_t *begin;
+ uint8_t *end;
+ uint8_t *aligned_src;
+ uint8_t *aligned_dst;
+ size_t offset_src;
+
+ memset( src, 0x85, sizeof( src ) );
+ begin = dst;
+ end = begin + sizeof( dst );
+ aligned_src = (uint8_t *) RTEMS_ALIGN_UP( (uintptr_t) src, sizeof( long ) );
+ aligned_dst = (uint8_t *) RTEMS_ALIGN_UP( (uintptr_t) dst, sizeof( long ) );
+
+ for ( offset_src = 0; offset_src < sizeof( long ); ++offset_src ) {
+ size_t offset_dst;
+
+ for ( offset_dst = 0; offset_dst < sizeof( long ); ++offset_dst ) {
+ size_t size;
+
+ for ( size = 0; size < sizeof( long ) * 8; ++size ) {
+ uint8_t *s;
+ uint8_t *p;
+ uint8_t *q;
+
+ s = aligned_src + offset_src;
+ p = aligned_dst + offset_dst;
+ q = p + size;
+
+ Clear( begin, end );
+ memcpy( p, s, size );
+ T_true( Compare( begin, p, 0 ) );
+ T_true( Compare( p, q, 0x85 ) );
+ T_true( Compare( q, end, 0 ) );
+ }
+ }
+ }
+}
+
+/**
+ * @brief Call memset() for a sample set of buffers.
+ */
+static void CValC_Action_1( void )
+{
+ uint8_t dst[sizeof( long ) * 10];
+ uint8_t *begin;
+ uint8_t *end;
+ uint8_t *aligned;
+ size_t offset;
+
+ begin = dst;
+ end = begin + sizeof( dst );
+ aligned = (uint8_t *) RTEMS_ALIGN_UP( (uintptr_t) dst, sizeof( long ) );
+
+ for ( offset = 0; offset < sizeof( long ); ++offset ) {
+ size_t size;
+
+ for ( size = 0; size < sizeof( long ) * 8; ++size ) {
+ uint8_t *p;
+ uint8_t *q;
+
+ p = aligned + offset;
+ q = p + size;
+
+ Clear( begin, end );
+ memset( p, 0x85, size );
+ T_true( Compare( begin, p, 0 ) );
+ T_true( Compare( p, q, 0x85 ) );
+ T_true( Compare( q, end, 0 ) );
+ }
+ }
+}
+
+/**
+ * @fn void T_case_body_CValC( void )
+ */
+T_TEST_CASE( CValC )
+{
+ CValC_Action_0();
+ CValC_Action_1();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-cache.c b/testsuites/validation/tc-cache.c
new file mode 100644
index 0000000000..e85b9033e7
--- /dev/null
+++ b/testsuites/validation/tc-cache.c
@@ -0,0 +1,675 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsCacheValCache
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsCacheValCache spec:/rtems/cache/val/cache
+ *
+ * @ingroup TestsuitesValidationCache
+ *
+ * @brief Tests some @ref RTEMSAPIClassicCache directives.
+ *
+ * This test case performs the following actions:
+ *
+ * - Call the rtems_cache_disable_data() and rtems_cache_enable_data()
+ * directives.
+ *
+ * - Call the rtems_cache_disable_data() and rtems_cache_enable_data()
+ * directives with maskable interrupts disabled.
+ *
+ * - Call the rtems_cache_disable_instruction() and
+ * rtems_cache_enable_instruction() directives.
+ *
+ * - Call the rtems_cache_disable_instruction() and
+ * rtems_cache_enable_instruction() directives with maskable interrupts
+ * disabled.
+ *
+ * - Call the rtems_cache_freeze_data() and rtems_cache_unfreeze_data()
+ * directives.
+ *
+ * - Call the rtems_cache_freeze_data() and rtems_cache_unfreeze_data()
+ * directives with maskable interrupts disabled.
+ *
+ * - Call the rtems_cache_freeze_instruction() and
+ * rtems_cache_unfreeze_instruction() directives.
+ *
+ * - Call the rtems_cache_freeze_instruction() and
+ * rtems_cache_unfreeze_instruction() directives with maskable interrupts
+ * disabled.
+ *
+ * - Call the rtems_cache_invalidate_entire_data() directive with maskable
+ * interrupts disabled.
+ *
+ * - Call the rtems_cache_invalidate_entire_instruction() directive.
+ *
+ * - Call the rtems_cache_invalidate_entire_instruction() directive with
+ * maskable interrupts disabled.
+ *
+ * - Call the rtems_cache_flush_entire_data() directive.
+ *
+ * - Call the rtems_cache_flush_entire_data() directive with maskable
+ * interrupts disabled.
+ *
+ * - Call the rtems_cache_flush_multiple_data_lines() directive with a sample
+ * set of memory areas.
+ *
+ * - Call the rtems_cache_flush_multiple_data_lines() directive with a sample
+ * set of memory areas with maskable interrupts disabled.
+ *
+ * - Call the rtems_cache_invalidate_multiple_data_lines() directive with a
+ * sample set of memory areas.
+ *
+ * - Call the rtems_cache_invalidate_multiple_data_lines() directive with a
+ * sample set of memory areas with maskable interrupts disabled.
+ *
+ * - Call the rtems_cache_invalidate_multiple_instruction_lines() directive
+ * with a sample set of memory areas.
+ *
+ * - Call the rtems_cache_invalidate_multiple_instruction_lines() directive
+ * with a sample set of memory areas with maskable interrupts disabled.
+ *
+ * - Call the rtems_cache_instruction_sync_after_code_change() directive with a
+ * sample set of memory areas.
+ *
+ * - Call the rtems_cache_instruction_sync_after_code_change() directive with a
+ * sample set of memory areas with maskable interrupts disabled.
+ *
+ * - Call the rtems_cache_get_data_line_size(),
+ * rtems_cache_get_instruction_line_size(), and the
+ * rtems_cache_get_maximal_line_size() directives.
+ *
+ * - Check that the maximal cache line size is greater than or equal to the
+ * data cache line size.
+ *
+ * - Check that the maximal cache line size is greater than or equal to the
+ * instruction cache line size.
+ *
+ * - Call the rtems_cache_get_data_line_size(),
+ * rtems_cache_get_instruction_line_size(), and the
+ * rtems_cache_get_maximal_line_size() directives with maskable interrupts
+ * disabled.
+ *
+ * - Check that the maximal cache line size is greater than or equal to the
+ * data cache line size.
+ *
+ * - Check that the maximal cache line size is greater than or equal to the
+ * instruction cache line size.
+ *
+ * - Call the rtems_cache_get_data_cache_size() directive with increasing level
+ * starting with zero until it returns zero.
+ *
+ * - Call the rtems_cache_get_data_cache_size() directive with increasing level
+ * starting with zero until it returns zero with maskable interrupts
+ * disabled.
+ *
+ * - Call the rtems_cache_get_instruction_cache_size() directive with
+ * increasing level starting with zero until it returns zero.
+ *
+ * - Call the rtems_cache_get_instruction_cache_size() directive with
+ * increasing level starting with zero until it returns zero with maskable
+ * interrupts disabled.
+ *
+ * @{
+ */
+
+static void CallFlushMultipleDataLines( void )
+{
+ uint8_t buf[256];
+ uintptr_t data;
+ uintptr_t n;
+ uintptr_t i;
+
+ rtems_cache_flush_multiple_data_lines( NULL, 0 );
+ data = RTEMS_ALIGN_UP( (uintptr_t) &buf[ 1 ], 128 );
+
+ for ( n = 16; n <= 128 ; n *= 2 ) {
+ for ( i = 0; i < 3; ++i ) {
+ uintptr_t j;
+
+ for ( j = 0; j < 3; ++j ) {
+ rtems_cache_flush_multiple_data_lines(
+ (const void *) ( data + 1 - i ),
+ n + 1 - j
+ );
+ }
+ }
+ }
+}
+
+static void CallInvalidateMultipleDataLines( void )
+{
+ uint8_t buf[256];
+ uintptr_t data;
+ uintptr_t n;
+ uintptr_t i;
+
+ rtems_cache_invalidate_multiple_data_lines( NULL, 0 );
+ data = RTEMS_ALIGN_UP( (uintptr_t) &buf[ 1 ], 128 );
+
+ for ( n = 16; n <= 128 ; n *= 2 ) {
+ for ( i = 0; i < 3; ++i ) {
+ uintptr_t j;
+
+ for ( j = 0; j < 3; ++j ) {
+ rtems_cache_invalidate_multiple_data_lines(
+ (const void *) ( data + 1 - i ),
+ n + 1 - j
+ );
+ }
+ }
+ }
+}
+
+static void CallInvalidateMultipleInstructionLines( void )
+{
+ uintptr_t data;
+ uintptr_t n;
+ uintptr_t i;
+
+ rtems_cache_invalidate_multiple_instruction_lines( NULL, 0 );
+ data = (uintptr_t) rtems_cache_invalidate_multiple_instruction_lines;
+
+ for ( n = 16; n <= 128 ; n *= 2 ) {
+ for ( i = 0; i < 3; ++i ) {
+ uintptr_t j;
+
+ for ( j = 0; j < 3; ++j ) {
+ rtems_cache_invalidate_multiple_instruction_lines(
+ (const void *) ( data + 1 - i ),
+ n + 1 - j
+ );
+ }
+ }
+ }
+}
+
+static void CallInstructionSyncAfterCodeChange( void )
+{
+ uintptr_t data;
+ uintptr_t n;
+ uintptr_t i;
+
+ rtems_cache_instruction_sync_after_code_change( NULL, 0 );
+ data = (uintptr_t) rtems_cache_instruction_sync_after_code_change;
+
+ for ( n = 16; n <= 128 ; n *= 2 ) {
+ for ( i = 0; i < 3; ++i ) {
+ uintptr_t j;
+
+ for ( j = 0; j < 3; ++j ) {
+ rtems_cache_instruction_sync_after_code_change(
+ (const void *) ( data + 1 - i ),
+ n + 1 - j
+ );
+ }
+ }
+ }
+}
+
+static void CallGetDataSize( void )
+{
+ uint32_t level;
+ size_t n;
+
+ level = 0;
+
+ do {
+ n = rtems_cache_get_data_cache_size( level );
+ ++level;
+ } while (n != 0 );
+}
+
+static void CallGetInstructionSize( void )
+{
+ uint32_t level;
+ size_t n;
+
+ level = 0;
+
+ do {
+ n = rtems_cache_get_instruction_cache_size( level );
+ ++level;
+ } while (n != 0 );
+}
+
+/**
+ * @brief Call the rtems_cache_disable_data() and rtems_cache_enable_data()
+ * directives.
+ */
+static void RtemsCacheValCache_Action_0( void )
+{
+ rtems_cache_disable_data();
+ rtems_cache_enable_data();
+}
+
+/**
+ * @brief Call the rtems_cache_disable_data() and rtems_cache_enable_data()
+ * directives with maskable interrupts disabled.
+ */
+static void RtemsCacheValCache_Action_1( void )
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ rtems_cache_disable_data();
+ rtems_cache_enable_data();
+ rtems_interrupt_local_enable(level);
+}
+
+/**
+ * @brief Call the rtems_cache_disable_instruction() and
+ * rtems_cache_enable_instruction() directives.
+ */
+static void RtemsCacheValCache_Action_2( void )
+{
+ rtems_cache_disable_instruction();
+ rtems_cache_enable_instruction();
+}
+
+/**
+ * @brief Call the rtems_cache_disable_instruction() and
+ * rtems_cache_enable_instruction() directives with maskable interrupts
+ * disabled.
+ */
+static void RtemsCacheValCache_Action_3( void )
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ rtems_cache_disable_instruction();
+ rtems_cache_enable_instruction();
+ rtems_interrupt_local_enable(level);
+}
+
+/**
+ * @brief Call the rtems_cache_freeze_data() and rtems_cache_unfreeze_data()
+ * directives.
+ */
+static void RtemsCacheValCache_Action_4( void )
+{
+ rtems_cache_freeze_data();
+ rtems_cache_unfreeze_data();
+}
+
+/**
+ * @brief Call the rtems_cache_freeze_data() and rtems_cache_unfreeze_data()
+ * directives with maskable interrupts disabled.
+ */
+static void RtemsCacheValCache_Action_5( void )
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ rtems_cache_freeze_data();
+ rtems_cache_unfreeze_data();
+ rtems_interrupt_local_enable(level);
+}
+
+/**
+ * @brief Call the rtems_cache_freeze_instruction() and
+ * rtems_cache_unfreeze_instruction() directives.
+ */
+static void RtemsCacheValCache_Action_6( void )
+{
+ rtems_cache_freeze_instruction();
+ rtems_cache_unfreeze_instruction();
+}
+
+/**
+ * @brief Call the rtems_cache_freeze_instruction() and
+ * rtems_cache_unfreeze_instruction() directives with maskable interrupts
+ * disabled.
+ */
+static void RtemsCacheValCache_Action_7( void )
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ rtems_cache_freeze_instruction();
+ rtems_cache_unfreeze_instruction();
+ rtems_interrupt_local_enable(level);
+}
+
+/**
+ * @brief Call the rtems_cache_invalidate_entire_data() directive with maskable
+ * interrupts disabled.
+ */
+static void RtemsCacheValCache_Action_8( void )
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ rtems_cache_disable_data();
+ rtems_cache_invalidate_entire_data();
+ rtems_cache_enable_data();
+ rtems_interrupt_local_enable(level);
+}
+
+/**
+ * @brief Call the rtems_cache_invalidate_entire_instruction() directive.
+ */
+static void RtemsCacheValCache_Action_9( void )
+{
+ rtems_cache_invalidate_entire_instruction();
+}
+
+/**
+ * @brief Call the rtems_cache_invalidate_entire_instruction() directive with
+ * maskable interrupts disabled.
+ */
+static void RtemsCacheValCache_Action_10( void )
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ rtems_cache_invalidate_entire_instruction();
+ rtems_interrupt_local_enable(level);
+}
+
+/**
+ * @brief Call the rtems_cache_flush_entire_data() directive.
+ */
+static void RtemsCacheValCache_Action_11( void )
+{
+ rtems_cache_flush_entire_data();
+}
+
+/**
+ * @brief Call the rtems_cache_flush_entire_data() directive with maskable
+ * interrupts disabled.
+ */
+static void RtemsCacheValCache_Action_12( void )
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ rtems_cache_flush_entire_data();
+ rtems_interrupt_local_enable(level);
+}
+
+/**
+ * @brief Call the rtems_cache_flush_multiple_data_lines() directive with a
+ * sample set of memory areas.
+ */
+static void RtemsCacheValCache_Action_13( void )
+{
+ CallFlushMultipleDataLines();
+}
+
+/**
+ * @brief Call the rtems_cache_flush_multiple_data_lines() directive with a
+ * sample set of memory areas with maskable interrupts disabled.
+ */
+static void RtemsCacheValCache_Action_14( void )
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ CallFlushMultipleDataLines();
+ rtems_interrupt_local_enable(level);
+}
+
+/**
+ * @brief Call the rtems_cache_invalidate_multiple_data_lines() directive with
+ * a sample set of memory areas.
+ */
+static void RtemsCacheValCache_Action_15( void )
+{
+ CallInvalidateMultipleDataLines();
+}
+
+/**
+ * @brief Call the rtems_cache_invalidate_multiple_data_lines() directive with
+ * a sample set of memory areas with maskable interrupts disabled.
+ */
+static void RtemsCacheValCache_Action_16( void )
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ CallInvalidateMultipleDataLines();
+ rtems_interrupt_local_enable(level);
+}
+
+/**
+ * @brief Call the rtems_cache_invalidate_multiple_instruction_lines()
+ * directive with a sample set of memory areas.
+ */
+static void RtemsCacheValCache_Action_17( void )
+{
+ CallInvalidateMultipleInstructionLines();
+}
+
+/**
+ * @brief Call the rtems_cache_invalidate_multiple_instruction_lines()
+ * directive with a sample set of memory areas with maskable interrupts
+ * disabled.
+ */
+static void RtemsCacheValCache_Action_18( void )
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ CallInvalidateMultipleInstructionLines();
+ rtems_interrupt_local_enable(level);
+}
+
+/**
+ * @brief Call the rtems_cache_instruction_sync_after_code_change() directive
+ * with a sample set of memory areas.
+ */
+static void RtemsCacheValCache_Action_19( void )
+{
+ CallInstructionSyncAfterCodeChange();
+}
+
+/**
+ * @brief Call the rtems_cache_instruction_sync_after_code_change() directive
+ * with a sample set of memory areas with maskable interrupts disabled.
+ */
+static void RtemsCacheValCache_Action_20( void )
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ CallInstructionSyncAfterCodeChange();
+ rtems_interrupt_local_enable(level);
+}
+
+/**
+ * @brief Call the rtems_cache_get_data_line_size(),
+ * rtems_cache_get_instruction_line_size(), and the
+ * rtems_cache_get_maximal_line_size() directives.
+ */
+static void RtemsCacheValCache_Action_21( void )
+{
+ size_t data_line_size;
+ size_t instruction_line_size;
+ size_t maximal_line_size;
+
+ data_line_size = rtems_cache_get_data_line_size();
+ instruction_line_size = rtems_cache_get_instruction_line_size();
+ maximal_line_size = rtems_cache_get_maximal_line_size();
+
+ /*
+ * Check that the maximal cache line size is greater than or equal to the
+ * data cache line size.
+ */
+ T_step_ge_sz( 0, maximal_line_size, data_line_size );
+
+ /*
+ * Check that the maximal cache line size is greater than or equal to the
+ * instruction cache line size.
+ */
+ T_step_ge_sz( 1, maximal_line_size, instruction_line_size );
+}
+
+/**
+ * @brief Call the rtems_cache_get_data_line_size(),
+ * rtems_cache_get_instruction_line_size(), and the
+ * rtems_cache_get_maximal_line_size() directives with maskable interrupts
+ * disabled.
+ */
+static void RtemsCacheValCache_Action_22( void )
+{
+ size_t data_line_size;
+ size_t instruction_line_size;
+ size_t maximal_line_size;
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ data_line_size = rtems_cache_get_data_line_size();
+ instruction_line_size = rtems_cache_get_instruction_line_size();
+ maximal_line_size = rtems_cache_get_maximal_line_size();
+ rtems_interrupt_local_enable(level);
+
+ /*
+ * Check that the maximal cache line size is greater than or equal to the
+ * data cache line size.
+ */
+ T_step_ge_sz( 2, maximal_line_size, data_line_size );
+
+ /*
+ * Check that the maximal cache line size is greater than or equal to the
+ * instruction cache line size.
+ */
+ T_step_ge_sz( 3, maximal_line_size, instruction_line_size );
+}
+
+/**
+ * @brief Call the rtems_cache_get_data_cache_size() directive with increasing
+ * level starting with zero until it returns zero.
+ */
+static void RtemsCacheValCache_Action_23( void )
+{
+ CallGetDataSize();
+}
+
+/**
+ * @brief Call the rtems_cache_get_data_cache_size() directive with increasing
+ * level starting with zero until it returns zero with maskable interrupts
+ * disabled.
+ */
+static void RtemsCacheValCache_Action_24( void )
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ CallGetDataSize();
+ rtems_interrupt_local_enable(level);
+}
+
+/**
+ * @brief Call the rtems_cache_get_instruction_cache_size() directive with
+ * increasing level starting with zero until it returns zero.
+ */
+static void RtemsCacheValCache_Action_25( void )
+{
+ CallGetInstructionSize();
+}
+
+/**
+ * @brief Call the rtems_cache_get_instruction_cache_size() directive with
+ * increasing level starting with zero until it returns zero with maskable
+ * interrupts disabled.
+ */
+static void RtemsCacheValCache_Action_26( void )
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable(level);
+ CallGetInstructionSize();
+ rtems_interrupt_local_enable(level);
+}
+
+/**
+ * @fn void T_case_body_RtemsCacheValCache( void )
+ */
+T_TEST_CASE( RtemsCacheValCache )
+{
+ T_plan( 4 );
+
+ RtemsCacheValCache_Action_0();
+ RtemsCacheValCache_Action_1();
+ RtemsCacheValCache_Action_2();
+ RtemsCacheValCache_Action_3();
+ RtemsCacheValCache_Action_4();
+ RtemsCacheValCache_Action_5();
+ RtemsCacheValCache_Action_6();
+ RtemsCacheValCache_Action_7();
+ RtemsCacheValCache_Action_8();
+ RtemsCacheValCache_Action_9();
+ RtemsCacheValCache_Action_10();
+ RtemsCacheValCache_Action_11();
+ RtemsCacheValCache_Action_12();
+ RtemsCacheValCache_Action_13();
+ RtemsCacheValCache_Action_14();
+ RtemsCacheValCache_Action_15();
+ RtemsCacheValCache_Action_16();
+ RtemsCacheValCache_Action_17();
+ RtemsCacheValCache_Action_18();
+ RtemsCacheValCache_Action_19();
+ RtemsCacheValCache_Action_20();
+ RtemsCacheValCache_Action_21();
+ RtemsCacheValCache_Action_22();
+ RtemsCacheValCache_Action_23();
+ RtemsCacheValCache_Action_24();
+ RtemsCacheValCache_Action_25();
+ RtemsCacheValCache_Action_26();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-clock-get-tod.c b/testsuites/validation/tc-clock-get-tod.c
new file mode 100644
index 0000000000..8bf5717171
--- /dev/null
+++ b/testsuites/validation/tc-clock-get-tod.c
@@ -0,0 +1,470 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsClockReqGetTod
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsClockReqGetTod spec:/rtems/clock/req/get-tod
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsClockReqGetTod_Pre_ToD_Arbitrary,
+ RtemsClockReqGetTod_Pre_ToD_Leap4,
+ RtemsClockReqGetTod_Pre_ToD_Leap400,
+ RtemsClockReqGetTod_Pre_ToD_Youngest,
+ RtemsClockReqGetTod_Pre_ToD_Oldest,
+ RtemsClockReqGetTod_Pre_ToD_NotSet,
+ RtemsClockReqGetTod_Pre_ToD_NA
+} RtemsClockReqGetTod_Pre_ToD;
+
+typedef enum {
+ RtemsClockReqGetTod_Pre_Param_Valid,
+ RtemsClockReqGetTod_Pre_Param_Null,
+ RtemsClockReqGetTod_Pre_Param_NA
+} RtemsClockReqGetTod_Pre_Param;
+
+typedef enum {
+ RtemsClockReqGetTod_Post_Status_Ok,
+ RtemsClockReqGetTod_Post_Status_InvAddr,
+ RtemsClockReqGetTod_Post_Status_NotDef,
+ RtemsClockReqGetTod_Post_Status_NA
+} RtemsClockReqGetTod_Post_Status;
+
+typedef enum {
+ RtemsClockReqGetTod_Post_Value_TimeOfDay,
+ RtemsClockReqGetTod_Post_Value_Unchanged,
+ RtemsClockReqGetTod_Post_Value_NA
+} RtemsClockReqGetTod_Post_Value;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_ToD_NA : 1;
+ uint8_t Pre_Param_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_Value : 2;
+} RtemsClockReqGetTod_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/clock/req/get-tod test case.
+ */
+typedef struct {
+ rtems_status_code set_tod_status;
+
+ rtems_time_of_day set_tod_value;
+
+ rtems_time_of_day *get_tod_ref;
+
+ rtems_time_of_day get_tod_value;
+
+ rtems_status_code get_tod_status;
+
+ bool isDef;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsClockReqGetTod_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsClockReqGetTod_Context;
+
+static RtemsClockReqGetTod_Context
+ RtemsClockReqGetTod_Instance;
+
+static const char * const RtemsClockReqGetTod_PreDesc_ToD[] = {
+ "Arbitrary",
+ "Leap4",
+ "Leap400",
+ "Youngest",
+ "Oldest",
+ "NotSet",
+ "NA"
+};
+
+static const char * const RtemsClockReqGetTod_PreDesc_Param[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsClockReqGetTod_PreDesc[] = {
+ RtemsClockReqGetTod_PreDesc_ToD,
+ RtemsClockReqGetTod_PreDesc_Param,
+ NULL
+};
+
+static void RtemsClockReqGetTod_Pre_ToD_Prepare(
+ RtemsClockReqGetTod_Context *ctx,
+ RtemsClockReqGetTod_Pre_ToD state
+)
+{
+ switch ( state ) {
+ case RtemsClockReqGetTod_Pre_ToD_Arbitrary: {
+ /*
+ * While the CLOCK_REALTIME indicates an arbitrary valid date and time
+ * between 1988-01-01T00:00:00.000000000Z and
+ * 2514-05-30T01:53:03.999999999Z.
+ */
+ ctx->set_tod_value =
+ (rtems_time_of_day) { 2023, 12, 27, 6, 7, 8,
+ rtems_clock_get_ticks_per_second() / 4 };
+ break;
+ }
+
+ case RtemsClockReqGetTod_Pre_ToD_Leap4: {
+ /*
+ * While the CLOCK_REALTIME indicates a date for a leap year with the
+ * value of 29th of February.
+ */
+ ctx->set_tod_value =
+ (rtems_time_of_day) { 2096, 2, 29, 0, 0, 0, 0 };
+ break;
+ }
+
+ case RtemsClockReqGetTod_Pre_ToD_Leap400: {
+ /*
+ * While the CLOCK_REALTIME indicates a date for a leap year with the
+ * value of 29th of February.
+ */
+ ctx->set_tod_value =
+ (rtems_time_of_day) { 2000, 2, 29, 0, 0, 0, 0 };
+ break;
+ }
+
+ case RtemsClockReqGetTod_Pre_ToD_Youngest: {
+ /*
+ * While the CLOCK_REALTIME indicates the youngest date and time accepted
+ * (1988-01-01T00:00:00.000000000Z).
+ */
+ ctx->set_tod_value =
+ (rtems_time_of_day) { 1988, 1, 1, 0, 0, 0, 0 };
+ break;
+ }
+
+ case RtemsClockReqGetTod_Pre_ToD_Oldest: {
+ /*
+ * While the CLOCK_REALTIME indicates the oldest date and time accepted
+ * (2099-12-31T23:59:59.999999999Z).
+ */
+ ctx->set_tod_value =
+ (rtems_time_of_day) { 2099, 12, 31, 23, 59, 59,
+ rtems_clock_get_ticks_per_second() - 1 };
+ break;
+ }
+
+ case RtemsClockReqGetTod_Pre_ToD_NotSet: {
+ /*
+ * While the CLOCK_REALTIME has not been set before.
+ */
+ ctx->isDef = false;
+ break;
+ }
+
+ case RtemsClockReqGetTod_Pre_ToD_NA:
+ break;
+ }
+}
+
+static void RtemsClockReqGetTod_Pre_Param_Prepare(
+ RtemsClockReqGetTod_Context *ctx,
+ RtemsClockReqGetTod_Pre_Param state
+)
+{
+ switch ( state ) {
+ case RtemsClockReqGetTod_Pre_Param_Valid: {
+ /*
+ * While the ``time_of_day`` parameter references an object of type
+ * rtems_time_of_day.
+ */
+ ctx->get_tod_ref = &ctx->get_tod_value;
+ break;
+ }
+
+ case RtemsClockReqGetTod_Pre_Param_Null: {
+ /*
+ * While the ``time_of_day`` parameter is NULL.
+ */
+ ctx->get_tod_ref = NULL;
+ break;
+ }
+
+ case RtemsClockReqGetTod_Pre_Param_NA:
+ break;
+ }
+}
+
+static void RtemsClockReqGetTod_Post_Status_Check(
+ RtemsClockReqGetTod_Context *ctx,
+ RtemsClockReqGetTod_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsClockReqGetTod_Post_Status_Ok: {
+ /*
+ * The return status of rtems_clock_get_tod() shall be RTEMS_SUCCESSFUL
+ */
+ T_rsc_success( ctx->set_tod_status );
+ T_rsc_success( ctx->get_tod_status );
+ break;
+ }
+
+ case RtemsClockReqGetTod_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_clock_get_tod() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->get_tod_status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsClockReqGetTod_Post_Status_NotDef: {
+ /*
+ * The return status of rtems_clock_get_tod() shall be RTEMS_NOT_DEFINED.
+ */
+ T_rsc( ctx->get_tod_status, RTEMS_NOT_DEFINED );
+ break;
+ }
+
+ case RtemsClockReqGetTod_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsClockReqGetTod_Post_Value_Check(
+ RtemsClockReqGetTod_Context *ctx,
+ RtemsClockReqGetTod_Post_Value state
+)
+{
+ switch ( state ) {
+ case RtemsClockReqGetTod_Post_Value_TimeOfDay: {
+ /*
+ * The value of the object referenced by the ``time_of_day`` parameter
+ * shall be set to the value of the CLOCK_REALTIME at a point in time
+ * during the call to rtems_clock_get_tod().
+ */
+ T_eq_ptr( ctx->get_tod_ref, &ctx->get_tod_value );
+ T_eq_u32( ctx->get_tod_value.year, ctx->set_tod_value.year );
+ T_eq_u32( ctx->get_tod_value.month, ctx->set_tod_value.month );
+ T_eq_u32( ctx->get_tod_value.day, ctx->set_tod_value.day );
+ T_eq_u32( ctx->get_tod_value.hour, ctx->set_tod_value.hour );
+ T_eq_u32( ctx->get_tod_value.minute, ctx->set_tod_value.minute );
+ T_eq_u32( ctx->get_tod_value.second, ctx->set_tod_value.second );
+ /* rtems_clock_set() or rtems_clock_get_tod() cause an error of 1 tick */
+ T_ge_u32( ctx->get_tod_value.ticks + 1, ctx->set_tod_value.ticks );
+ T_le_u32( ctx->get_tod_value.ticks, ctx->set_tod_value.ticks );
+ break;
+ }
+
+ case RtemsClockReqGetTod_Post_Value_Unchanged: {
+ /*
+ * Object referenced by the ``time_of_day`` parameter in past call to
+ * rtems_clock_get_tod() shall not be modified by the
+ * rtems_clock_get_tod() call.
+ */
+ T_eq_u32( ctx->get_tod_value.year, 1 );
+ T_eq_u32( ctx->get_tod_value.month, 1 );
+ T_eq_u32( ctx->get_tod_value.day, 1 );
+ T_eq_u32( ctx->get_tod_value.hour, 1 );
+ T_eq_u32( ctx->get_tod_value.minute, 1 );
+ T_eq_u32( ctx->get_tod_value.second, 1 );
+ T_eq_u32( ctx->get_tod_value.ticks, 1 );
+ break;
+ }
+
+ case RtemsClockReqGetTod_Post_Value_NA:
+ break;
+ }
+}
+
+static void RtemsClockReqGetTod_Prepare( RtemsClockReqGetTod_Context *ctx )
+{
+ ctx->get_tod_value = (rtems_time_of_day) { 1, 1, 1, 1, 1, 1, 1 };
+ ctx->get_tod_ref = &ctx->get_tod_value;
+ ctx->set_tod_value = (rtems_time_of_day) { 2023, 4, 5, 6, 7, 8, 0 };
+ ctx->isDef = true;
+}
+
+static void RtemsClockReqGetTod_Action( RtemsClockReqGetTod_Context *ctx )
+{
+ if ( ctx->isDef ) {
+ ctx->set_tod_status = rtems_clock_set( &ctx->set_tod_value );
+ ctx->get_tod_status = rtems_clock_get_tod( ctx->get_tod_ref );
+ } else {
+ UnsetClock();
+ ctx->get_tod_status = rtems_clock_get_tod( ctx->get_tod_ref );
+ }
+}
+
+static void RtemsClockReqGetTod_Cleanup( RtemsClockReqGetTod_Context *ctx )
+{
+ UnsetClock();
+}
+
+static const RtemsClockReqGetTod_Entry
+RtemsClockReqGetTod_Entries[] = {
+ { 0, 0, 0, RtemsClockReqGetTod_Post_Status_InvAddr,
+ RtemsClockReqGetTod_Post_Value_Unchanged },
+ { 0, 0, 0, RtemsClockReqGetTod_Post_Status_Ok,
+ RtemsClockReqGetTod_Post_Value_TimeOfDay },
+ { 0, 0, 0, RtemsClockReqGetTod_Post_Status_NotDef,
+ RtemsClockReqGetTod_Post_Value_Unchanged }
+};
+
+static const uint8_t
+RtemsClockReqGetTod_Map[] = {
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0
+};
+
+static size_t RtemsClockReqGetTod_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsClockReqGetTod_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsClockReqGetTod_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsClockReqGetTod_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsClockReqGetTod_Scope,
+ .initial_context = &RtemsClockReqGetTod_Instance
+};
+
+static inline RtemsClockReqGetTod_Entry RtemsClockReqGetTod_PopEntry(
+ RtemsClockReqGetTod_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsClockReqGetTod_Entries[
+ RtemsClockReqGetTod_Map[ index ]
+ ];
+}
+
+static void RtemsClockReqGetTod_TestVariant( RtemsClockReqGetTod_Context *ctx )
+{
+ RtemsClockReqGetTod_Pre_ToD_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsClockReqGetTod_Pre_Param_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsClockReqGetTod_Action( ctx );
+ RtemsClockReqGetTod_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsClockReqGetTod_Post_Value_Check( ctx, ctx->Map.entry.Post_Value );
+}
+
+/**
+ * @fn void T_case_body_RtemsClockReqGetTod( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsClockReqGetTod, &RtemsClockReqGetTod_Fixture )
+{
+ RtemsClockReqGetTod_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsClockReqGetTod_Pre_ToD_Arbitrary;
+ ctx->Map.pcs[ 0 ] < RtemsClockReqGetTod_Pre_ToD_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsClockReqGetTod_Pre_Param_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsClockReqGetTod_Pre_Param_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsClockReqGetTod_PopEntry( ctx );
+ RtemsClockReqGetTod_Prepare( ctx );
+ RtemsClockReqGetTod_TestVariant( ctx );
+ RtemsClockReqGetTod_Cleanup( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-clock-get-uptime.c b/testsuites/validation/tc-clock-get-uptime.c
new file mode 100644
index 0000000000..19608c33e6
--- /dev/null
+++ b/testsuites/validation/tc-clock-get-uptime.c
@@ -0,0 +1,338 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsClockReqGetUptime
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsClockReqGetUptime spec:/rtems/clock/req/get-uptime
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsClockReqGetUptime_Pre_Uptime_Valid,
+ RtemsClockReqGetUptime_Pre_Uptime_Null,
+ RtemsClockReqGetUptime_Pre_Uptime_NA
+} RtemsClockReqGetUptime_Pre_Uptime;
+
+typedef enum {
+ RtemsClockReqGetUptime_Post_Status_Ok,
+ RtemsClockReqGetUptime_Post_Status_InvAddr,
+ RtemsClockReqGetUptime_Post_Status_NA
+} RtemsClockReqGetUptime_Post_Status;
+
+typedef enum {
+ RtemsClockReqGetUptime_Post_Uptime_Set,
+ RtemsClockReqGetUptime_Post_Uptime_Unchanged,
+ RtemsClockReqGetUptime_Post_Uptime_NA
+} RtemsClockReqGetUptime_Post_Uptime;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Uptime_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_Uptime : 2;
+} RtemsClockReqGetUptime_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/clock/req/get-uptime test case.
+ */
+typedef struct {
+ rtems_status_code status;
+
+ struct timespec *uptime;
+
+ struct timespec uptime_value;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsClockReqGetUptime_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsClockReqGetUptime_Context;
+
+static RtemsClockReqGetUptime_Context
+ RtemsClockReqGetUptime_Instance;
+
+static const char * const RtemsClockReqGetUptime_PreDesc_Uptime[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsClockReqGetUptime_PreDesc[] = {
+ RtemsClockReqGetUptime_PreDesc_Uptime,
+ NULL
+};
+
+static void RtemsClockReqGetUptime_Pre_Uptime_Prepare(
+ RtemsClockReqGetUptime_Context *ctx,
+ RtemsClockReqGetUptime_Pre_Uptime state
+)
+{
+ switch ( state ) {
+ case RtemsClockReqGetUptime_Pre_Uptime_Valid: {
+ /*
+ * While the ``uptime`` parameter references an object of type struct
+ * timespec.
+ */
+ ctx->uptime = &ctx->uptime_value;
+ break;
+ }
+
+ case RtemsClockReqGetUptime_Pre_Uptime_Null: {
+ /*
+ * While the ``uptime`` parameter is NULL.
+ */
+ ctx->uptime = NULL;
+ break;
+ }
+
+ case RtemsClockReqGetUptime_Pre_Uptime_NA:
+ break;
+ }
+}
+
+static void RtemsClockReqGetUptime_Post_Status_Check(
+ RtemsClockReqGetUptime_Context *ctx,
+ RtemsClockReqGetUptime_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsClockReqGetUptime_Post_Status_Ok: {
+ /*
+ * The return status of rtems_clock_get_uptime() shall be
+ * RTEMS_SUCCESSFUL
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsClockReqGetUptime_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_clock_get_uptime() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsClockReqGetUptime_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsClockReqGetUptime_Post_Uptime_Check(
+ RtemsClockReqGetUptime_Context *ctx,
+ RtemsClockReqGetUptime_Post_Uptime state
+)
+{
+ switch ( state ) {
+ case RtemsClockReqGetUptime_Post_Uptime_Set: {
+ /*
+ * The value of the object referenced by the ``uptime`` parameter shall
+ * be set to seconds and nanoseconds elapsed since a point in time during
+ * the system initialization and a point in time during the call of
+ * rtems_clock_get_uptime() using CLOCK_MONOTONIC as result of the
+ * rtems_clock_get_uptime() call.
+ */
+ T_eq_ptr( ctx->uptime, &ctx->uptime_value );
+ T_ge_i64( ctx->uptime_value.tv_sec, 0LL );
+ T_ge_long( ctx->uptime_value.tv_nsec, 0L );
+ T_lt_long( ctx->uptime_value.tv_nsec, 1000000000L );
+ break;
+ }
+
+ case RtemsClockReqGetUptime_Post_Uptime_Unchanged: {
+ /*
+ * Objects referenced by the ``uptime`` parameter in calls to
+ * rtems_clock_get_uptime() shall not be modified by the
+ * rtems_clock_get_uptime() call.
+ */
+ T_null( ctx->uptime );
+ break;
+ }
+
+ case RtemsClockReqGetUptime_Post_Uptime_NA:
+ break;
+ }
+}
+
+static void RtemsClockReqGetUptime_Setup( RtemsClockReqGetUptime_Context *ctx )
+{
+ ctx->uptime_value.tv_sec = -1;
+ ctx->uptime_value.tv_nsec = -1;
+}
+
+static void RtemsClockReqGetUptime_Setup_Wrap( void *arg )
+{
+ RtemsClockReqGetUptime_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsClockReqGetUptime_Setup( ctx );
+}
+
+static void RtemsClockReqGetUptime_Action(
+ RtemsClockReqGetUptime_Context *ctx
+)
+{
+ ctx->status = rtems_clock_get_uptime( ctx->uptime );
+}
+
+static const RtemsClockReqGetUptime_Entry
+RtemsClockReqGetUptime_Entries[] = {
+ { 0, 0, RtemsClockReqGetUptime_Post_Status_Ok,
+ RtemsClockReqGetUptime_Post_Uptime_Set },
+ { 0, 0, RtemsClockReqGetUptime_Post_Status_InvAddr,
+ RtemsClockReqGetUptime_Post_Uptime_Unchanged }
+};
+
+static const uint8_t
+RtemsClockReqGetUptime_Map[] = {
+ 0, 1
+};
+
+static size_t RtemsClockReqGetUptime_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsClockReqGetUptime_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsClockReqGetUptime_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsClockReqGetUptime_Fixture = {
+ .setup = RtemsClockReqGetUptime_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsClockReqGetUptime_Scope,
+ .initial_context = &RtemsClockReqGetUptime_Instance
+};
+
+static inline RtemsClockReqGetUptime_Entry RtemsClockReqGetUptime_PopEntry(
+ RtemsClockReqGetUptime_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsClockReqGetUptime_Entries[
+ RtemsClockReqGetUptime_Map[ index ]
+ ];
+}
+
+static void RtemsClockReqGetUptime_TestVariant(
+ RtemsClockReqGetUptime_Context *ctx
+)
+{
+ RtemsClockReqGetUptime_Pre_Uptime_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsClockReqGetUptime_Action( ctx );
+ RtemsClockReqGetUptime_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsClockReqGetUptime_Post_Uptime_Check( ctx, ctx->Map.entry.Post_Uptime );
+}
+
+/**
+ * @fn void T_case_body_RtemsClockReqGetUptime( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsClockReqGetUptime, &RtemsClockReqGetUptime_Fixture )
+{
+ RtemsClockReqGetUptime_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsClockReqGetUptime_Pre_Uptime_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsClockReqGetUptime_Pre_Uptime_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = RtemsClockReqGetUptime_PopEntry( ctx );
+ RtemsClockReqGetUptime_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-clock-nanosleep.c b/testsuites/validation/tc-clock-nanosleep.c
new file mode 100644
index 0000000000..514f5376ba
--- /dev/null
+++ b/testsuites/validation/tc-clock-nanosleep.c
@@ -0,0 +1,1027 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup CReqClockNanosleep
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <errno.h>
+#include <limits.h>
+#include <rtems.h>
+#include <time.h>
+#include <rtems/test-scheduler.h>
+#include <rtems/score/timecounter.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup CReqClockNanosleep spec:/c/req/clock-nanosleep
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ CReqClockNanosleep_Pre_ClockId_Monotonic,
+ CReqClockNanosleep_Pre_ClockId_Realtime,
+ CReqClockNanosleep_Pre_ClockId_Invalid,
+ CReqClockNanosleep_Pre_ClockId_NA
+} CReqClockNanosleep_Pre_ClockId;
+
+typedef enum {
+ CReqClockNanosleep_Pre_Abstime_Yes,
+ CReqClockNanosleep_Pre_Abstime_No,
+ CReqClockNanosleep_Pre_Abstime_NA
+} CReqClockNanosleep_Pre_Abstime;
+
+typedef enum {
+ CReqClockNanosleep_Pre_RQTp_Valid,
+ CReqClockNanosleep_Pre_RQTp_Null,
+ CReqClockNanosleep_Pre_RQTp_NA
+} CReqClockNanosleep_Pre_RQTp;
+
+typedef enum {
+ CReqClockNanosleep_Pre_RQTpNSec_Valid,
+ CReqClockNanosleep_Pre_RQTpNSec_Invalid,
+ CReqClockNanosleep_Pre_RQTpNSec_NA
+} CReqClockNanosleep_Pre_RQTpNSec;
+
+typedef enum {
+ CReqClockNanosleep_Pre_RQTpSec_Negative,
+ CReqClockNanosleep_Pre_RQTpSec_FarFuture,
+ CReqClockNanosleep_Pre_RQTpSec_Future,
+ CReqClockNanosleep_Pre_RQTpSec_PastOrNow,
+ CReqClockNanosleep_Pre_RQTpSec_NA
+} CReqClockNanosleep_Pre_RQTpSec;
+
+typedef enum {
+ CReqClockNanosleep_Pre_RMTp_Valid,
+ CReqClockNanosleep_Pre_RMTp_Null,
+ CReqClockNanosleep_Pre_RMTp_NA
+} CReqClockNanosleep_Pre_RMTp;
+
+typedef enum {
+ CReqClockNanosleep_Post_Status_Zero,
+ CReqClockNanosleep_Post_Status_ENOTSUP,
+ CReqClockNanosleep_Post_Status_EINVAL,
+ CReqClockNanosleep_Post_Status_NA
+} CReqClockNanosleep_Post_Status;
+
+typedef enum {
+ CReqClockNanosleep_Post_Timer_Inactive,
+ CReqClockNanosleep_Post_Timer_Monotonic,
+ CReqClockNanosleep_Post_Timer_Realtime,
+ CReqClockNanosleep_Post_Timer_NA
+} CReqClockNanosleep_Post_Timer;
+
+typedef enum {
+ CReqClockNanosleep_Post_Expire_Last,
+ CReqClockNanosleep_Post_Expire_Absolute,
+ CReqClockNanosleep_Post_Expire_Relative,
+ CReqClockNanosleep_Post_Expire_NA
+} CReqClockNanosleep_Post_Expire;
+
+typedef enum {
+ CReqClockNanosleep_Post_Scheduler_Block,
+ CReqClockNanosleep_Post_Scheduler_BlockUnblock,
+ CReqClockNanosleep_Post_Scheduler_Nop,
+ CReqClockNanosleep_Post_Scheduler_NA
+} CReqClockNanosleep_Post_Scheduler;
+
+typedef enum {
+ CReqClockNanosleep_Post_RMTp_Zero,
+ CReqClockNanosleep_Post_RMTp_Nop,
+ CReqClockNanosleep_Post_RMTp_NA
+} CReqClockNanosleep_Post_RMTp;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_ClockId_NA : 1;
+ uint32_t Pre_Abstime_NA : 1;
+ uint32_t Pre_RQTp_NA : 1;
+ uint32_t Pre_RQTpNSec_NA : 1;
+ uint32_t Pre_RQTpSec_NA : 1;
+ uint32_t Pre_RMTp_NA : 1;
+ uint32_t Post_Status : 2;
+ uint32_t Post_Timer : 2;
+ uint32_t Post_Expire : 2;
+ uint32_t Post_Scheduler : 2;
+ uint32_t Post_RMTp : 2;
+} CReqClockNanosleep_Entry;
+
+/**
+ * @brief Test context for spec:/c/req/clock-nanosleep test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides the scheduler operation records.
+ */
+ T_scheduler_log_4 scheduler_log;
+
+ /**
+ * @brief This member contains the CLOCK_REALTIME value before the
+ * clock_nanosleep() call.
+ */
+ struct timespec now_realtime;
+
+ /**
+ * @brief This member contains the CLOCK_MONOTONIC value before the
+ * clock_nanosleep() call.
+ */
+ struct timespec now_monotonic;
+
+ /**
+ * @brief This member contains the worker task identifier.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member contains the timer information of the worker task.
+ */
+ TaskTimerInfo timer_info;
+
+ /**
+ * @brief This member provides the object referenced by the ``rqtp``
+ * parameter.
+ */
+ struct timespec rqtp_obj;
+
+ /**
+ * @brief This member provides the object referenced by the ``rmtp``
+ * parameter.
+ */
+ struct timespec rmtp_obj;
+
+ /**
+ * @brief This member contains the return value of the clock_nanosleep()
+ * call.
+ */
+ int status;
+
+ /**
+ * @brief This member specifies the ``clock_id`` parameter value.
+ */
+ clockid_t clock_id;
+
+ /**
+ * @brief This member specifies the ``flags`` parameter value.
+ */
+ int flags;
+
+ /**
+ * @brief This member specifies the ``rqtp`` parameter value.
+ */
+ const struct timespec *rqtp;
+
+ /**
+ * @brief This member specifies the ``rmtp`` parameter value.
+ */
+ struct timespec *rmtp;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 6 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 6 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ CReqClockNanosleep_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} CReqClockNanosleep_Context;
+
+static CReqClockNanosleep_Context
+ CReqClockNanosleep_Instance;
+
+static const char * const CReqClockNanosleep_PreDesc_ClockId[] = {
+ "Monotonic",
+ "Realtime",
+ "Invalid",
+ "NA"
+};
+
+static const char * const CReqClockNanosleep_PreDesc_Abstime[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const CReqClockNanosleep_PreDesc_RQTp[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const CReqClockNanosleep_PreDesc_RQTpNSec[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const CReqClockNanosleep_PreDesc_RQTpSec[] = {
+ "Negative",
+ "FarFuture",
+ "Future",
+ "PastOrNow",
+ "NA"
+};
+
+static const char * const CReqClockNanosleep_PreDesc_RMTp[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const CReqClockNanosleep_PreDesc[] = {
+ CReqClockNanosleep_PreDesc_ClockId,
+ CReqClockNanosleep_PreDesc_Abstime,
+ CReqClockNanosleep_PreDesc_RQTp,
+ CReqClockNanosleep_PreDesc_RQTpNSec,
+ CReqClockNanosleep_PreDesc_RQTpSec,
+ CReqClockNanosleep_PreDesc_RMTp,
+ NULL
+};
+
+typedef CReqClockNanosleep_Context Context;
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ T_scheduler_log *log;
+ uint32_t counter;
+
+ SuspendSelf();
+
+ log = T_scheduler_record_4( &ctx->scheduler_log );
+ T_null( log );
+
+ counter = GetTimecountCounter();
+ _Timecounter_Nanotime( &ctx->now_realtime );
+ SetTimecountCounter( counter );
+
+ counter = GetTimecountCounter();
+ _Timecounter_Nanouptime( &ctx->now_monotonic );
+ SetTimecountCounter( counter );
+
+ ctx->status = clock_nanosleep(
+ ctx->clock_id,
+ ctx->flags,
+ ctx->rqtp,
+ ctx->rmtp
+ );
+
+ (void) T_scheduler_record( NULL );
+ }
+}
+
+static void CReqClockNanosleep_Pre_ClockId_Prepare(
+ CReqClockNanosleep_Context *ctx,
+ CReqClockNanosleep_Pre_ClockId state
+)
+{
+ switch ( state ) {
+ case CReqClockNanosleep_Pre_ClockId_Monotonic: {
+ /*
+ * While the ``clock_id`` parameter is equal to CLOCK_MONOTONIC.
+ */
+ ctx->clock_id = CLOCK_MONOTONIC;
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_ClockId_Realtime: {
+ /*
+ * While the ``clock_id`` parameter is equal to CLOCK_REALTIME.
+ */
+ ctx->clock_id = CLOCK_REALTIME;
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_ClockId_Invalid: {
+ /*
+ * While the ``clock_id`` parameter is an invalid clock identifier.
+ */
+ ctx->clock_id = INT_MAX;
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_ClockId_NA:
+ break;
+ }
+}
+
+static void CReqClockNanosleep_Pre_Abstime_Prepare(
+ CReqClockNanosleep_Context *ctx,
+ CReqClockNanosleep_Pre_Abstime state
+)
+{
+ switch ( state ) {
+ case CReqClockNanosleep_Pre_Abstime_Yes: {
+ /*
+ * While the ``flags`` parameter indicates an absolute time.
+ */
+ ctx->flags |= TIMER_ABSTIME;
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_Abstime_No: {
+ /*
+ * While the ``flags`` parameter does not indicate an absolute time.
+ */
+ /* This is the default */
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_Abstime_NA:
+ break;
+ }
+}
+
+static void CReqClockNanosleep_Pre_RQTp_Prepare(
+ CReqClockNanosleep_Context *ctx,
+ CReqClockNanosleep_Pre_RQTp state
+)
+{
+ switch ( state ) {
+ case CReqClockNanosleep_Pre_RQTp_Valid: {
+ /*
+ * While the ``rqtp`` parameter references an object of type struct
+ * timespec.
+ */
+ ctx->rqtp = &ctx->rqtp_obj;
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_RQTp_Null: {
+ /*
+ * While the ``rqtp`` parameter is equal to NULL.
+ */
+ ctx->rqtp = NULL;
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_RQTp_NA:
+ break;
+ }
+}
+
+static void CReqClockNanosleep_Pre_RQTpNSec_Prepare(
+ CReqClockNanosleep_Context *ctx,
+ CReqClockNanosleep_Pre_RQTpNSec state
+)
+{
+ switch ( state ) {
+ case CReqClockNanosleep_Pre_RQTpNSec_Valid: {
+ /*
+ * While the ``tv_nsec`` member of the object referenced by the ``rqtp``
+ * parameter is a valid nanoseconds value.
+ */
+ ctx->rqtp_obj.tv_nsec = 999999999;
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_RQTpNSec_Invalid: {
+ /*
+ * While the ``tv_nsec`` member of the object referenced by the ``rqtp``
+ * parameter is an invalid nanoseconds value.
+ */
+ ctx->rqtp_obj.tv_nsec = -1;
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_RQTpNSec_NA:
+ break;
+ }
+}
+
+static void CReqClockNanosleep_Pre_RQTpSec_Prepare(
+ CReqClockNanosleep_Context *ctx,
+ CReqClockNanosleep_Pre_RQTpSec state
+)
+{
+ switch ( state ) {
+ case CReqClockNanosleep_Pre_RQTpSec_Negative: {
+ /*
+ * While the ``tv_sec`` member of the object referenced by the ``rqtp``
+ * parameter is negative.
+ */
+ ctx->rqtp_obj.tv_sec = -238479;
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_RQTpSec_FarFuture: {
+ /*
+ * While the ``tv_sec`` member of the object referenced by the ``rqtp``
+ * parameter specifies a time point which is past the implementation
+ * limit.
+ */
+ ctx->rqtp_obj.tv_sec = INT64_MAX;
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_RQTpSec_Future: {
+ /*
+ * While the ``tv_sec`` member of the object referenced by the ``rqtp``
+ * parameter specifies a time point which is after the current time of
+ * the clock specified by the ``clock_id`` parameter and is within the
+ * implementation limits.
+ */
+ ctx->rqtp_obj.tv_sec = 1621322302;
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_RQTpSec_PastOrNow: {
+ /*
+ * While the ``tv_sec`` member of the object referenced by the ``rqtp``
+ * parameter is non-negative and specifies a time point which is before
+ * or at the current time of the clock specified by the ``clock_id``
+ * parameter.
+ */
+ ctx->rqtp_obj.tv_sec = 0;
+
+ if ( ctx->rqtp_obj.tv_nsec == 999999999 ) {
+ ctx->rqtp_obj.tv_nsec = 0;
+ }
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_RQTpSec_NA:
+ break;
+ }
+}
+
+static void CReqClockNanosleep_Pre_RMTp_Prepare(
+ CReqClockNanosleep_Context *ctx,
+ CReqClockNanosleep_Pre_RMTp state
+)
+{
+ switch ( state ) {
+ case CReqClockNanosleep_Pre_RMTp_Valid: {
+ /*
+ * While the ``rmtp`` parameter references an object of type struct
+ * timespec.
+ */
+ ctx->rmtp = &ctx->rmtp_obj;
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_RMTp_Null: {
+ /*
+ * While the ``rmtp`` parameter is equal to NULL.
+ */
+ ctx->rmtp = NULL;
+ break;
+ }
+
+ case CReqClockNanosleep_Pre_RMTp_NA:
+ break;
+ }
+}
+
+static void CReqClockNanosleep_Post_Status_Check(
+ CReqClockNanosleep_Context *ctx,
+ CReqClockNanosleep_Post_Status state
+)
+{
+ switch ( state ) {
+ case CReqClockNanosleep_Post_Status_Zero: {
+ /*
+ * The return value of clock_nanosleep() shall be equal to zero.
+ */
+ T_eq_int( ctx->status, 0 );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_Status_ENOTSUP: {
+ /*
+ * The return value of clock_nanosleep() shall be equal to ENOTSUP.
+ */
+ T_eq_int( ctx->status, ENOTSUP );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_Status_EINVAL: {
+ /*
+ * The return value of clock_nanosleep() shall be equal to EINVAL.
+ */
+ T_eq_int( ctx->status, EINVAL );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_Status_NA:
+ break;
+ }
+}
+
+static void CReqClockNanosleep_Post_Timer_Check(
+ CReqClockNanosleep_Context *ctx,
+ CReqClockNanosleep_Post_Timer state
+)
+{
+ switch ( state ) {
+ case CReqClockNanosleep_Post_Timer_Inactive: {
+ /*
+ * The timer of the calling task shall be inactive.
+ */
+ T_eq_int( ctx->timer_info.state, TASK_TIMER_INACTIVE );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_Timer_Monotonic: {
+ /*
+ * The timer of the calling task shall be active using the
+ * CLOCK_MONOTONIC.
+ */
+ T_eq_int( ctx->timer_info.state, TASK_TIMER_MONOTONIC );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_Timer_Realtime: {
+ /*
+ * The timer of the calling task shall be active using the
+ * CLOCK_REALTIME.
+ */
+ T_eq_int( ctx->timer_info.state, TASK_TIMER_REALTIME );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_Timer_NA:
+ break;
+ }
+}
+
+static void CReqClockNanosleep_Post_Expire_Check(
+ CReqClockNanosleep_Context *ctx,
+ CReqClockNanosleep_Post_Expire state
+)
+{
+ struct timespec expire;
+
+ switch ( state ) {
+ case CReqClockNanosleep_Post_Expire_Last: {
+ /*
+ * The timer of the calling task shall expire at the last valid time
+ * point of the clock specified by the ``clock_id`` parameter.
+ */
+ T_eq_u64( ctx->timer_info.expire_ticks, 0xffffffffffffffff );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_Expire_Absolute: {
+ /*
+ * The timer of the calling task shall expire at the time point specified
+ * by the ``rqtp`` parameter.
+ */
+ T_eq_i64( ctx->timer_info.expire_timespec.tv_sec, ctx->rqtp_obj.tv_sec );
+ T_eq_long(
+ ctx->timer_info.expire_timespec.tv_nsec,
+ ctx->rqtp_obj.tv_nsec
+ );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_Expire_Relative: {
+ /*
+ * The timer of the calling task shall expire at the time point specified
+ * by the sum of the current time of the clock specified by
+ * CLOCK_MONOTONIC and the interval specified by the ``rqtp`` parameter.
+ */
+ expire = ctx->now_monotonic;
+ expire.tv_sec += ctx->rqtp_obj.tv_sec;
+ expire.tv_nsec += ctx->rqtp_obj.tv_nsec;
+
+ if ( expire.tv_nsec >= 1000000000 ) {
+ ++expire.tv_sec;
+ expire.tv_nsec -= 1000000000;
+ }
+
+ T_eq_i64( ctx->timer_info.expire_timespec.tv_sec, expire.tv_sec );
+ T_eq_long( ctx->timer_info.expire_timespec.tv_nsec, expire.tv_nsec );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_Expire_NA:
+ break;
+ }
+}
+
+static void CReqClockNanosleep_Post_Scheduler_Check(
+ CReqClockNanosleep_Context *ctx,
+ CReqClockNanosleep_Post_Scheduler state
+)
+{
+ switch ( state ) {
+ case CReqClockNanosleep_Post_Scheduler_Block: {
+ /*
+ * The calling task shall be blocked by the scheduler exactly once by the
+ * clock_nanosleep() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 1 );
+ T_eq_int(
+ ctx->scheduler_log.events[ 0 ].operation,
+ T_SCHEDULER_BLOCK
+ );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_Scheduler_BlockUnblock: {
+ /*
+ * The calling task shall be blocked exactly once by the scheduler and
+ * then unblocked in the same thread dispatch critical section by the
+ * clock_nanosleep() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 2 );
+ T_eq_int(
+ ctx->scheduler_log.events[ 0 ].operation,
+ T_SCHEDULER_BLOCK
+ );
+ T_eq_int(
+ ctx->scheduler_log.events[ 1 ].operation,
+ T_SCHEDULER_UNBLOCK
+ );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_Scheduler_Nop: {
+ /*
+ * The calling task shall not be altered by the scheduler by the
+ * clock_nanosleep() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 0 );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_Scheduler_NA:
+ break;
+ }
+}
+
+static void CReqClockNanosleep_Post_RMTp_Check(
+ CReqClockNanosleep_Context *ctx,
+ CReqClockNanosleep_Post_RMTp state
+)
+{
+ switch ( state ) {
+ case CReqClockNanosleep_Post_RMTp_Zero: {
+ /*
+ * The object referenced by the ``rmtp`` parameter shall be cleared to
+ * zero after the return of the clock_nanosleep() call.
+ */
+ T_eq_i64( ctx->rmtp_obj.tv_sec, 0 );
+ T_eq_long( ctx->rmtp_obj.tv_nsec, 0 );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_RMTp_Nop: {
+ /*
+ * Objects referenced by the ``rmtp`` parameter in past calls to
+ * clock_nanosleep() shall not be accessed by the clock_nanosleep() call.
+ */
+ T_eq_i64( ctx->rmtp_obj.tv_sec, -1 );
+ T_eq_long( ctx->rmtp_obj.tv_nsec, -1 );
+ break;
+ }
+
+ case CReqClockNanosleep_Post_RMTp_NA:
+ break;
+ }
+}
+
+static void CReqClockNanosleep_Setup( CReqClockNanosleep_Context *ctx )
+{
+ rtems_time_of_day now = { 1988, 1, 1, 0, 0, 0, 0 };
+ T_rsc_success( rtems_clock_set( &now ) );
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+static void CReqClockNanosleep_Setup_Wrap( void *arg )
+{
+ CReqClockNanosleep_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ CReqClockNanosleep_Setup( ctx );
+}
+
+static void CReqClockNanosleep_Teardown( CReqClockNanosleep_Context *ctx )
+{
+ DeleteTask( ctx->worker_id );
+ RestoreRunnerPriority();
+}
+
+static void CReqClockNanosleep_Teardown_Wrap( void *arg )
+{
+ CReqClockNanosleep_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ CReqClockNanosleep_Teardown( ctx );
+}
+
+static void CReqClockNanosleep_Prepare( CReqClockNanosleep_Context *ctx )
+{
+ ctx->status = -1;
+ ctx->flags = 0;
+ ctx->rmtp_obj.tv_sec = -1;
+ ctx->rmtp_obj.tv_nsec = -1;
+}
+
+static void CReqClockNanosleep_Action( CReqClockNanosleep_Context *ctx )
+{
+ ResumeTask( ctx->worker_id );
+ (void) T_scheduler_record( NULL );
+ GetTaskTimerInfo( ctx->worker_id, &ctx->timer_info );
+ ClockTick();
+ FinalClockTick();
+}
+
+static const CReqClockNanosleep_Entry
+CReqClockNanosleep_Entries[] = {
+ { 0, 0, 0, 0, 1, 1, 0, CReqClockNanosleep_Post_Status_EINVAL,
+ CReqClockNanosleep_Post_Timer_Inactive, CReqClockNanosleep_Post_Expire_NA,
+ CReqClockNanosleep_Post_Scheduler_BlockUnblock,
+ CReqClockNanosleep_Post_RMTp_Nop },
+ { 0, 0, 0, 0, 1, 1, 0, CReqClockNanosleep_Post_Status_ENOTSUP,
+ CReqClockNanosleep_Post_Timer_Inactive, CReqClockNanosleep_Post_Expire_NA,
+ CReqClockNanosleep_Post_Scheduler_Nop, CReqClockNanosleep_Post_RMTp_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, CReqClockNanosleep_Post_Status_EINVAL,
+ CReqClockNanosleep_Post_Timer_Inactive, CReqClockNanosleep_Post_Expire_NA,
+ CReqClockNanosleep_Post_Scheduler_BlockUnblock,
+ CReqClockNanosleep_Post_RMTp_Nop },
+ { 0, 0, 0, 0, 1, 1, 0, CReqClockNanosleep_Post_Status_EINVAL,
+ CReqClockNanosleep_Post_Timer_Inactive, CReqClockNanosleep_Post_Expire_NA,
+ CReqClockNanosleep_Post_Scheduler_BlockUnblock,
+ CReqClockNanosleep_Post_RMTp_Zero },
+ { 0, 0, 0, 0, 0, 0, 0, CReqClockNanosleep_Post_Status_ENOTSUP,
+ CReqClockNanosleep_Post_Timer_Inactive, CReqClockNanosleep_Post_Expire_NA,
+ CReqClockNanosleep_Post_Scheduler_Nop, CReqClockNanosleep_Post_RMTp_Nop },
+ { 1, 0, 0, 0, 0, 0, 0, CReqClockNanosleep_Post_Status_NA,
+ CReqClockNanosleep_Post_Timer_NA, CReqClockNanosleep_Post_Expire_NA,
+ CReqClockNanosleep_Post_Scheduler_NA, CReqClockNanosleep_Post_RMTp_NA },
+ { 0, 0, 0, 0, 0, 0, 0, CReqClockNanosleep_Post_Status_Zero,
+ CReqClockNanosleep_Post_Timer_Inactive, CReqClockNanosleep_Post_Expire_NA,
+ CReqClockNanosleep_Post_Scheduler_BlockUnblock,
+ CReqClockNanosleep_Post_RMTp_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, CReqClockNanosleep_Post_Status_EINVAL,
+ CReqClockNanosleep_Post_Timer_Inactive, CReqClockNanosleep_Post_Expire_NA,
+ CReqClockNanosleep_Post_Scheduler_BlockUnblock,
+ CReqClockNanosleep_Post_RMTp_Zero },
+ { 0, 0, 0, 0, 0, 0, 0, CReqClockNanosleep_Post_Status_Zero,
+ CReqClockNanosleep_Post_Timer_Monotonic,
+ CReqClockNanosleep_Post_Expire_Last,
+ CReqClockNanosleep_Post_Scheduler_Block, CReqClockNanosleep_Post_RMTp_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, CReqClockNanosleep_Post_Status_Zero,
+ CReqClockNanosleep_Post_Timer_Monotonic,
+ CReqClockNanosleep_Post_Expire_Absolute,
+ CReqClockNanosleep_Post_Scheduler_Block, CReqClockNanosleep_Post_RMTp_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, CReqClockNanosleep_Post_Status_Zero,
+ CReqClockNanosleep_Post_Timer_Monotonic,
+ CReqClockNanosleep_Post_Expire_Last,
+ CReqClockNanosleep_Post_Scheduler_Block, CReqClockNanosleep_Post_RMTp_Zero },
+ { 0, 0, 0, 0, 0, 0, 0, CReqClockNanosleep_Post_Status_Zero,
+ CReqClockNanosleep_Post_Timer_Monotonic,
+ CReqClockNanosleep_Post_Expire_Relative,
+ CReqClockNanosleep_Post_Scheduler_Block, CReqClockNanosleep_Post_RMTp_Zero },
+ { 0, 0, 0, 0, 0, 0, 0, CReqClockNanosleep_Post_Status_Zero,
+ CReqClockNanosleep_Post_Timer_Monotonic,
+ CReqClockNanosleep_Post_Expire_Relative,
+ CReqClockNanosleep_Post_Scheduler_Block, CReqClockNanosleep_Post_RMTp_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, CReqClockNanosleep_Post_Status_Zero,
+ CReqClockNanosleep_Post_Timer_Inactive, CReqClockNanosleep_Post_Expire_NA,
+ CReqClockNanosleep_Post_Scheduler_BlockUnblock,
+ CReqClockNanosleep_Post_RMTp_Zero },
+ { 0, 0, 0, 0, 0, 0, 0, CReqClockNanosleep_Post_Status_Zero,
+ CReqClockNanosleep_Post_Timer_Realtime,
+ CReqClockNanosleep_Post_Expire_Last,
+ CReqClockNanosleep_Post_Scheduler_Block, CReqClockNanosleep_Post_RMTp_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, CReqClockNanosleep_Post_Status_Zero,
+ CReqClockNanosleep_Post_Timer_Realtime,
+ CReqClockNanosleep_Post_Expire_Absolute,
+ CReqClockNanosleep_Post_Scheduler_Block, CReqClockNanosleep_Post_RMTp_Nop }
+};
+
+static const uint8_t
+CReqClockNanosleep_Map[] = {
+ 6, 6, 8, 8, 9, 9, 6, 6, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 7, 2, 10, 8, 11, 12, 13, 6, 7, 2, 7, 2, 7, 2, 7, 2, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 6, 6, 14, 14, 15, 15, 6, 6, 2, 2,
+ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 2, 10,
+ 8, 11, 12, 13, 6, 7, 2, 7, 2, 7, 2, 7, 2, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
+ 3, 0, 3, 0, 4, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 4, 5, 5, 5, 5, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 4, 5, 5, 5, 5,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+};
+
+static size_t CReqClockNanosleep_Scope( void *arg, char *buf, size_t n )
+{
+ CReqClockNanosleep_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( CReqClockNanosleep_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture CReqClockNanosleep_Fixture = {
+ .setup = CReqClockNanosleep_Setup_Wrap,
+ .stop = NULL,
+ .teardown = CReqClockNanosleep_Teardown_Wrap,
+ .scope = CReqClockNanosleep_Scope,
+ .initial_context = &CReqClockNanosleep_Instance
+};
+
+static inline CReqClockNanosleep_Entry CReqClockNanosleep_PopEntry(
+ CReqClockNanosleep_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return CReqClockNanosleep_Entries[
+ CReqClockNanosleep_Map[ index ]
+ ];
+}
+
+static void CReqClockNanosleep_SetPreConditionStates(
+ CReqClockNanosleep_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+
+ if ( ctx->Map.entry.Pre_RQTpNSec_NA ) {
+ ctx->Map.pcs[ 3 ] = CReqClockNanosleep_Pre_RQTpNSec_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+
+ if ( ctx->Map.entry.Pre_RQTpSec_NA ) {
+ ctx->Map.pcs[ 4 ] = CReqClockNanosleep_Pre_RQTpSec_NA;
+ } else {
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+ }
+
+ ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
+}
+
+static void CReqClockNanosleep_TestVariant( CReqClockNanosleep_Context *ctx )
+{
+ CReqClockNanosleep_Pre_ClockId_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ CReqClockNanosleep_Pre_Abstime_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ CReqClockNanosleep_Pre_RQTp_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ CReqClockNanosleep_Pre_RQTpNSec_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ CReqClockNanosleep_Pre_RQTpSec_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ CReqClockNanosleep_Pre_RMTp_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ CReqClockNanosleep_Action( ctx );
+ CReqClockNanosleep_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ CReqClockNanosleep_Post_Timer_Check( ctx, ctx->Map.entry.Post_Timer );
+ CReqClockNanosleep_Post_Expire_Check( ctx, ctx->Map.entry.Post_Expire );
+ CReqClockNanosleep_Post_Scheduler_Check(
+ ctx,
+ ctx->Map.entry.Post_Scheduler
+ );
+ CReqClockNanosleep_Post_RMTp_Check( ctx, ctx->Map.entry.Post_RMTp );
+}
+
+/**
+ * @fn void T_case_body_CReqClockNanosleep( void )
+ */
+T_TEST_CASE_FIXTURE( CReqClockNanosleep, &CReqClockNanosleep_Fixture )
+{
+ CReqClockNanosleep_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = CReqClockNanosleep_Pre_ClockId_Monotonic;
+ ctx->Map.pci[ 0 ] < CReqClockNanosleep_Pre_ClockId_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = CReqClockNanosleep_Pre_Abstime_Yes;
+ ctx->Map.pci[ 1 ] < CReqClockNanosleep_Pre_Abstime_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = CReqClockNanosleep_Pre_RQTp_Valid;
+ ctx->Map.pci[ 2 ] < CReqClockNanosleep_Pre_RQTp_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = CReqClockNanosleep_Pre_RQTpNSec_Valid;
+ ctx->Map.pci[ 3 ] < CReqClockNanosleep_Pre_RQTpNSec_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = CReqClockNanosleep_Pre_RQTpSec_Negative;
+ ctx->Map.pci[ 4 ] < CReqClockNanosleep_Pre_RQTpSec_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ for (
+ ctx->Map.pci[ 5 ] = CReqClockNanosleep_Pre_RMTp_Valid;
+ ctx->Map.pci[ 5 ] < CReqClockNanosleep_Pre_RMTp_NA;
+ ++ctx->Map.pci[ 5 ]
+ ) {
+ ctx->Map.entry = CReqClockNanosleep_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ CReqClockNanosleep_SetPreConditionStates( ctx );
+ CReqClockNanosleep_Prepare( ctx );
+ CReqClockNanosleep_TestVariant( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-clock-set.c b/testsuites/validation/tc-clock-set.c
new file mode 100644
index 0000000000..0ed631004b
--- /dev/null
+++ b/testsuites/validation/tc-clock-set.c
@@ -0,0 +1,839 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsClockReqSet
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/todimpl.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsClockReqSet spec:/rtems/clock/req/set
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsClockReqSet_Pre_ToD_Valid,
+ RtemsClockReqSet_Pre_ToD_ValidLeap4,
+ RtemsClockReqSet_Pre_ToD_ValidLeap400,
+ RtemsClockReqSet_Pre_ToD_Youngest,
+ RtemsClockReqSet_Pre_ToD_Oldest,
+ RtemsClockReqSet_Pre_ToD_TooJung,
+ RtemsClockReqSet_Pre_ToD_TooOld,
+ RtemsClockReqSet_Pre_ToD_InvMonth0,
+ RtemsClockReqSet_Pre_ToD_InvMonth,
+ RtemsClockReqSet_Pre_ToD_InvDay0,
+ RtemsClockReqSet_Pre_ToD_InvDay,
+ RtemsClockReqSet_Pre_ToD_InvHour,
+ RtemsClockReqSet_Pre_ToD_InvMinute,
+ RtemsClockReqSet_Pre_ToD_InvSecond,
+ RtemsClockReqSet_Pre_ToD_InvTicks,
+ RtemsClockReqSet_Pre_ToD_InvLeap4,
+ RtemsClockReqSet_Pre_ToD_InvLeap100,
+ RtemsClockReqSet_Pre_ToD_InvLeap400,
+ RtemsClockReqSet_Pre_ToD_AtTimer,
+ RtemsClockReqSet_Pre_ToD_BeforeTimer,
+ RtemsClockReqSet_Pre_ToD_AfterTimer,
+ RtemsClockReqSet_Pre_ToD_Null,
+ RtemsClockReqSet_Pre_ToD_NA
+} RtemsClockReqSet_Pre_ToD;
+
+typedef enum {
+ RtemsClockReqSet_Pre_Hook_None,
+ RtemsClockReqSet_Pre_Hook_Ok,
+ RtemsClockReqSet_Pre_Hook_NotOk,
+ RtemsClockReqSet_Pre_Hook_NA
+} RtemsClockReqSet_Pre_Hook;
+
+typedef enum {
+ RtemsClockReqSet_Post_Status_Ok,
+ RtemsClockReqSet_Post_Status_InvAddr,
+ RtemsClockReqSet_Post_Status_InvClk,
+ RtemsClockReqSet_Post_Status_Hook,
+ RtemsClockReqSet_Post_Status_NA
+} RtemsClockReqSet_Post_Status;
+
+typedef enum {
+ RtemsClockReqSet_Post_Clock_Set,
+ RtemsClockReqSet_Post_Clock_Nop,
+ RtemsClockReqSet_Post_Clock_NA
+} RtemsClockReqSet_Post_Clock;
+
+typedef enum {
+ RtemsClockReqSet_Post_Timer_Triggered,
+ RtemsClockReqSet_Post_Timer_Nop,
+ RtemsClockReqSet_Post_Timer_NA
+} RtemsClockReqSet_Post_Timer;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_ToD_NA : 1;
+ uint16_t Pre_Hook_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_Clock : 2;
+ uint16_t Post_Timer : 2;
+} RtemsClockReqSet_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/clock/req/set test case.
+ */
+typedef struct {
+ rtems_status_code status;
+
+ bool register_hook;
+
+ Status_Control hook_status;
+
+ rtems_time_of_day *target_tod;
+
+ rtems_time_of_day target_tod_value;
+
+ rtems_time_of_day tod_before;
+
+ rtems_status_code get_tod_before_status;
+
+ rtems_time_of_day tod_after;
+
+ rtems_status_code get_tod_after_status;
+
+ rtems_id timer_id;
+
+ int timer_routine_counter;
+
+ rtems_time_of_day timer_routine_tod;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsClockReqSet_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsClockReqSet_Context;
+
+static RtemsClockReqSet_Context
+ RtemsClockReqSet_Instance;
+
+static const char * const RtemsClockReqSet_PreDesc_ToD[] = {
+ "Valid",
+ "ValidLeap4",
+ "ValidLeap400",
+ "Youngest",
+ "Oldest",
+ "TooJung",
+ "TooOld",
+ "InvMonth0",
+ "InvMonth",
+ "InvDay0",
+ "InvDay",
+ "InvHour",
+ "InvMinute",
+ "InvSecond",
+ "InvTicks",
+ "InvLeap4",
+ "InvLeap100",
+ "InvLeap400",
+ "AtTimer",
+ "BeforeTimer",
+ "AfterTimer",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsClockReqSet_PreDesc_Hook[] = {
+ "None",
+ "Ok",
+ "NotOk",
+ "NA"
+};
+
+static const char * const * const RtemsClockReqSet_PreDesc[] = {
+ RtemsClockReqSet_PreDesc_ToD,
+ RtemsClockReqSet_PreDesc_Hook,
+ NULL
+};
+
+typedef RtemsClockReqSet_Context Context;
+
+static rtems_timer_service_routine _TOD_timer_routine(
+ rtems_id timer_id,
+ void *user_data
+)
+{
+ Context *ctx = user_data;
+ rtems_status_code status;
+ ++ctx->timer_routine_counter;
+ status = rtems_clock_get_tod( &ctx->timer_routine_tod );
+ T_rsc_success( status );
+}
+
+static void _TOD_prepare_timer( Context *ctx )
+{
+ rtems_status_code status;
+ rtems_time_of_day tod = { 1988, 1, 1, 0, 0, 0, 0 };
+
+ status = rtems_clock_set( &tod );
+ T_rsc_success( status );
+
+ tod.year = 1989;
+ status = rtems_timer_fire_when(
+ ctx->timer_id,
+ &tod,
+ _TOD_timer_routine,
+ ctx
+ );
+ T_rsc_success( status );
+}
+
+static Status_Control TODHook(
+ TOD_Action action,
+ const struct timespec *tod
+)
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ T_eq_int( action, TOD_ACTION_SET_CLOCK );
+ T_not_null( tod );
+
+ return ctx->hook_status;
+}
+
+static void RtemsClockReqSet_Pre_ToD_Prepare(
+ RtemsClockReqSet_Context *ctx,
+ RtemsClockReqSet_Pre_ToD state
+)
+{
+ switch ( state ) {
+ case RtemsClockReqSet_Pre_ToD_Valid: {
+ /*
+ * While the ``time_of_day`` parameter references an arbitrary valid date
+ * and time between 1988-01-01T00:00:00.000000000Z and
+ * 2105-12-31T23:59:59.999999999Z.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2021, 3, 11, 11, 10, 59,
+ rtems_clock_get_ticks_per_second() / 2 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_ValidLeap4: {
+ /*
+ * While the ``time_of_day`` parameter references a date for a leap year
+ * with the value of 29th of February.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2096, 2, 29, 0, 0, 0, 0 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_ValidLeap400: {
+ /*
+ * While the ``time_of_day`` parameter references a date for a leap year
+ * with the value of 29th of February.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2000, 2, 29, 0, 0, 0, 0 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_Youngest: {
+ /*
+ * While the ``time_of_day`` parameter references the youngest date and
+ * time accepted (1988-01-01T00:00:00.000000000Z).
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 1988, 1, 1, 0, 0, 0, 0 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_Oldest: {
+ /*
+ * While the ``time_of_day`` parameter references the oldest date and
+ * time accepted (2099-12-31T23:59:59.999999999Z).
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2099, 12, 31, 23, 59, 59,
+ rtems_clock_get_ticks_per_second() - 1 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_TooJung: {
+ /*
+ * While the ``time_of_day`` parameter references a valid date and time
+ * younger than 1988-01-01T00:00:00.000000000Z.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 1987, 12, 31, 23, 59, 59,
+ rtems_clock_get_ticks_per_second() - 1 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_TooOld: {
+ /*
+ * While the ``time_of_day`` parameter references a valid date and time
+ * older than 2105-12-31T23:59:59.999999999Z.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2106, 1, 1, 0, 0, 0, 0 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_InvMonth0: {
+ /*
+ * While the ``time_of_day`` parameter is invalid because the value of
+ * the month is 0.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2021, 0, 11, 11, 10, 59, 1 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_InvMonth: {
+ /*
+ * While the ``time_of_day`` parameter is invalid because the value of
+ * the month is larger than 12.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2021, 13, 11, 11, 10, 59, 1 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_InvDay0: {
+ /*
+ * While the ``time_of_day`` parameter is invalid because the value of
+ * the day is 0.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2021, 3, 0, 11, 10, 59, 1 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_InvDay: {
+ /*
+ * While the ``time_of_day`` parameter is invalid because the value of
+ * the day is larger than the days of the month.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2021, 2, 29, 11, 10, 59, 1 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_InvHour: {
+ /*
+ * While the ``time_of_day`` parameter is invalid because the value of
+ * the hour is larger than 23.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2021, 3, 11, 24, 10, 59, 1 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_InvMinute: {
+ /*
+ * While the ``time_of_day`` parameter is invalid because the value of
+ * the minute is larger than 59.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2021, 3, 11, 11, 60, 59, 1 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_InvSecond: {
+ /*
+ * While the ``time_of_day`` parameter is invalid because the value of
+ * the second is larger than 59.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2021, 3, 11, 11, 10, 60, 1 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_InvTicks: {
+ /*
+ * While the ``time_of_day`` parameter is invalid because the value of
+ * the ticks are larger or equal to the ticks per second.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2021, 3, 11, 11, 10, 60,
+ rtems_clock_get_ticks_per_second() };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_InvLeap4: {
+ /*
+ * While the ``time_of_day`` parameter is invalid because the value 30th
+ * of February does not exist in a leap year.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2104, 2, 30, 0, 0, 0, 0 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_InvLeap100: {
+ /*
+ * While the ``time_of_day`` parameter is invalid because the value 29th
+ * of February does not exist in a non-leap year.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2100, 2, 29, 0, 0, 0, 0 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_InvLeap400: {
+ /*
+ * While the ``time_of_day`` parameter is invalid because the value 30th
+ * of February does not exist in a leap year.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 2000, 2, 30, 0, 0, 0, 0 };
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_AtTimer: {
+ /*
+ * While the ``time_of_day`` parameter references the same point in time
+ * when a timer should fire.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 1989, 1, 1, 0, 0, 0, 0 };
+ _TOD_prepare_timer( ctx );
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_BeforeTimer: {
+ /*
+ * While the ``time_of_day`` parameter references a point in time before
+ * a timer should fire.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 1988, 12, 31, 23, 59, 59, 0 };
+ _TOD_prepare_timer( ctx );
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_AfterTimer: {
+ /*
+ * While the ``time_of_day`` parameter references a point in time after a
+ * timer should fire.
+ */
+ ctx->target_tod_value =
+ (rtems_time_of_day) { 1989, 1, 1, 1, 0, 0, 0 };
+ _TOD_prepare_timer( ctx );
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_Null: {
+ /*
+ * WHile the ``time_of_day`` parameter is NULL.
+ */
+ ctx->target_tod = NULL;
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_ToD_NA:
+ break;
+ }
+}
+
+static void RtemsClockReqSet_Pre_Hook_Prepare(
+ RtemsClockReqSet_Context *ctx,
+ RtemsClockReqSet_Pre_Hook state
+)
+{
+ switch ( state ) {
+ case RtemsClockReqSet_Pre_Hook_None: {
+ /*
+ * While no TOD hook is registered.
+ */
+ ctx->register_hook = false;
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_Hook_Ok: {
+ /*
+ * While all TOD hooks invoked by the rtems_clock_set() call return a
+ * status code equal to STATUS_SUCCESSFUL.
+ */
+ ctx->register_hook = true;
+ ctx->hook_status = STATUS_SUCCESSFUL;
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_Hook_NotOk: {
+ /*
+ * While at least one TOD hook invoked by the rtems_clock_set() call
+ * returns a status code not equal to STATUS_SUCCESSFUL.
+ */
+ ctx->register_hook = true;
+ ctx->hook_status = STATUS_UNAVAILABLE;
+ break;
+ }
+
+ case RtemsClockReqSet_Pre_Hook_NA:
+ break;
+ }
+}
+
+static void RtemsClockReqSet_Post_Status_Check(
+ RtemsClockReqSet_Context *ctx,
+ RtemsClockReqSet_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsClockReqSet_Post_Status_Ok: {
+ /*
+ * The return status of rtems_clock_set() shall be RTEMS_SUCCESSFUL
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsClockReqSet_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_clock_set() shall be RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsClockReqSet_Post_Status_InvClk: {
+ /*
+ * The return status of rtems_clock_set() shall be RTEMS_INVALID_CLOCK.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_CLOCK );
+ break;
+ }
+
+ case RtemsClockReqSet_Post_Status_Hook: {
+ /*
+ * The return status of rtems_clock_set() shall be derived from the
+ * status returned by the TOD hook.
+ */
+ T_rsc( ctx->status, RTEMS_UNSATISFIED );
+ break;
+ }
+
+ case RtemsClockReqSet_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsClockReqSet_Post_Clock_Check(
+ RtemsClockReqSet_Context *ctx,
+ RtemsClockReqSet_Post_Clock state
+)
+{
+ switch ( state ) {
+ case RtemsClockReqSet_Post_Clock_Set: {
+ /*
+ * The CLOCK_REALTIME shall be set to the values of the object referenced
+ * by the ``time_of_day`` parameter during the rtems_clock_set() call.
+ */
+ T_eq_ptr( ctx->target_tod, &ctx->target_tod_value );
+ T_rsc_success( ctx->get_tod_after_status );
+ T_eq_u32( ctx->tod_after.year, ctx->target_tod_value.year );
+ T_eq_u32( ctx->tod_after.month, ctx->target_tod_value.month );
+ T_eq_u32( ctx->tod_after.day, ctx->target_tod_value.day );
+ T_eq_u32( ctx->tod_after.hour, ctx->target_tod_value.hour );
+ T_eq_u32( ctx->tod_after.minute, ctx->target_tod_value.minute );
+ T_eq_u32( ctx->tod_after.second, ctx->target_tod_value.second );
+ /* rtems_clock_set() or rtems_clock_get_tod() cause an error of 1 tick */
+ T_ge_u32( ctx->tod_after.ticks + 1, ctx->target_tod_value.ticks );
+ T_le_u32( ctx->tod_after.ticks, ctx->target_tod_value.ticks );
+ break;
+ }
+
+ case RtemsClockReqSet_Post_Clock_Nop: {
+ /*
+ * The state of the CLOCK_REALTIME shall not be changed by the
+ * rtems_clock_set() call.
+ */
+ T_rsc_success( ctx->get_tod_before_status );
+ T_eq_u32( ctx->tod_after.year, ctx->tod_before.year );
+ T_eq_u32( ctx->tod_after.month, ctx->tod_before.month );
+ T_eq_u32( ctx->tod_after.day, ctx->tod_before.day );
+ T_eq_u32( ctx->tod_after.hour, ctx->tod_before.hour );
+ T_eq_u32( ctx->tod_after.minute, ctx->tod_before.minute );
+ T_eq_u32( ctx->tod_after.second, ctx->tod_before.second );
+ T_eq_u32( ctx->tod_after.ticks, ctx->tod_before.ticks );
+ break;
+ }
+
+ case RtemsClockReqSet_Post_Clock_NA:
+ break;
+ }
+}
+
+static void RtemsClockReqSet_Post_Timer_Check(
+ RtemsClockReqSet_Context *ctx,
+ RtemsClockReqSet_Post_Timer state
+)
+{
+ switch ( state ) {
+ case RtemsClockReqSet_Post_Timer_Triggered: {
+ /*
+ * The timer routine shall be executed once after the CLOCK_REALTIME has
+ * been set and before the execution of the rtems_clock_set() call
+ * terminates.
+ */
+ T_eq_int( ctx->timer_routine_counter, 1 );
+ T_eq_u32( ctx->timer_routine_tod.year, 1989 );
+ T_eq_u32( ctx->timer_routine_tod.month, 1 );
+ T_eq_u32( ctx->timer_routine_tod.day, 1 );
+ T_eq_u32( ctx->timer_routine_tod.minute, 0 );
+ T_eq_u32( ctx->timer_routine_tod.second, 0 );
+ T_eq_u32( ctx->timer_routine_tod.ticks, 0 );
+ break;
+ }
+
+ case RtemsClockReqSet_Post_Timer_Nop: {
+ /*
+ * The the timer routine shall not be invoked during the
+ * rtems_clock_set() call.
+ */
+ T_eq_int( ctx->timer_routine_counter, 0 );
+ break;
+ }
+
+ case RtemsClockReqSet_Post_Timer_NA:
+ break;
+ }
+}
+
+static void RtemsClockReqSet_Setup( RtemsClockReqSet_Context *ctx )
+{
+ rtems_status_code status;
+ rtems_name timer_name = rtems_build_name( 'T', 'M', 'R', '0' );
+ ctx->timer_id = RTEMS_ID_NONE;
+
+ ctx->target_tod = &ctx->target_tod_value;
+
+ status = rtems_timer_create( timer_name, &ctx->timer_id );
+ T_rsc_success( status );
+}
+
+static void RtemsClockReqSet_Setup_Wrap( void *arg )
+{
+ RtemsClockReqSet_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsClockReqSet_Setup( ctx );
+}
+
+static void RtemsClockReqSet_Teardown( RtemsClockReqSet_Context *ctx )
+{
+ rtems_status_code status;
+
+ if ( RTEMS_ID_NONE != ctx->timer_id ) {
+ status = rtems_timer_delete( ctx->timer_id );
+ T_rsc_success( status );
+ }
+}
+
+static void RtemsClockReqSet_Teardown_Wrap( void *arg )
+{
+ RtemsClockReqSet_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsClockReqSet_Teardown( ctx );
+}
+
+static void RtemsClockReqSet_Prepare( RtemsClockReqSet_Context *ctx )
+{
+ rtems_status_code status;
+
+ status = rtems_timer_cancel( ctx->timer_id );
+ T_rsc_success( status );
+ ctx->timer_routine_counter = 0;
+ ctx->timer_routine_tod = (rtems_time_of_day) { 0, 0, 0, 0, 0, 0, 0 };
+}
+
+static void RtemsClockReqSet_Action( RtemsClockReqSet_Context *ctx )
+{
+ TOD_Hook hook = {
+ .handler = TODHook
+ };
+
+ if ( ctx->register_hook ) {
+ _TOD_Hook_Register( &hook );
+ }
+
+ ctx->get_tod_before_status = rtems_clock_get_tod( &ctx->tod_before );
+ ctx->status = rtems_clock_set( ctx->target_tod );
+ ctx->get_tod_after_status = rtems_clock_get_tod( &ctx->tod_after );
+
+ if ( ctx->register_hook ) {
+ _TOD_Hook_Unregister( &hook );
+ }
+}
+
+static const RtemsClockReqSet_Entry
+RtemsClockReqSet_Entries[] = {
+ { 0, 0, 0, RtemsClockReqSet_Post_Status_InvClk,
+ RtemsClockReqSet_Post_Clock_Nop, RtemsClockReqSet_Post_Timer_Nop },
+ { 0, 0, 0, RtemsClockReqSet_Post_Status_Ok, RtemsClockReqSet_Post_Clock_Set,
+ RtemsClockReqSet_Post_Timer_Nop },
+ { 0, 0, 0, RtemsClockReqSet_Post_Status_Hook,
+ RtemsClockReqSet_Post_Clock_Nop, RtemsClockReqSet_Post_Timer_Nop },
+ { 0, 0, 0, RtemsClockReqSet_Post_Status_Ok, RtemsClockReqSet_Post_Clock_Set,
+ RtemsClockReqSet_Post_Timer_Triggered },
+ { 0, 0, 0, RtemsClockReqSet_Post_Status_InvAddr,
+ RtemsClockReqSet_Post_Clock_Nop, RtemsClockReqSet_Post_Timer_Nop }
+};
+
+static const uint8_t
+RtemsClockReqSet_Map[] = {
+ 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 3, 2, 1, 1, 2, 3, 3, 2, 4, 4, 4
+};
+
+static size_t RtemsClockReqSet_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsClockReqSet_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsClockReqSet_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsClockReqSet_Fixture = {
+ .setup = RtemsClockReqSet_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsClockReqSet_Teardown_Wrap,
+ .scope = RtemsClockReqSet_Scope,
+ .initial_context = &RtemsClockReqSet_Instance
+};
+
+static inline RtemsClockReqSet_Entry RtemsClockReqSet_PopEntry(
+ RtemsClockReqSet_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsClockReqSet_Entries[
+ RtemsClockReqSet_Map[ index ]
+ ];
+}
+
+static void RtemsClockReqSet_TestVariant( RtemsClockReqSet_Context *ctx )
+{
+ RtemsClockReqSet_Pre_ToD_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsClockReqSet_Pre_Hook_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsClockReqSet_Action( ctx );
+ RtemsClockReqSet_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsClockReqSet_Post_Clock_Check( ctx, ctx->Map.entry.Post_Clock );
+ RtemsClockReqSet_Post_Timer_Check( ctx, ctx->Map.entry.Post_Timer );
+}
+
+/**
+ * @fn void T_case_body_RtemsClockReqSet( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsClockReqSet, &RtemsClockReqSet_Fixture )
+{
+ RtemsClockReqSet_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsClockReqSet_Pre_ToD_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsClockReqSet_Pre_ToD_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsClockReqSet_Pre_Hook_None;
+ ctx->Map.pcs[ 1 ] < RtemsClockReqSet_Pre_Hook_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsClockReqSet_PopEntry( ctx );
+ RtemsClockReqSet_Prepare( ctx );
+ RtemsClockReqSet_TestVariant( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-clock.c b/testsuites/validation/tc-clock.c
new file mode 100644
index 0000000000..7e21e6d77c
--- /dev/null
+++ b/testsuites/validation/tc-clock.c
@@ -0,0 +1,181 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsClockValClock
+ */
+
+/*
+ * Copyright (C) 2021, 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsClockValClock spec:/rtems/clock/val/clock
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests some @ref RTEMSAPIClassicClock directives.
+ *
+ * This test case performs the following actions:
+ *
+ * - Use the rtems_clock_get_ticks_since_boot() directive before and after
+ * exactly one clock tick.
+ *
+ * - Check that clock tick gets incremented.
+ *
+ * - Use the rtems_clock_get_ticks_since_boot() directive before and after
+ * exactly one clock tick.
+ *
+ * - Check that clock tick gets incremented.
+ *
+ * - Use the rtems_clock_get_ticks_per_second() directive.
+ *
+ * - Check that rtems_clock_get_ticks_per_second() actually returns 1us /
+ * CONFIGURE_MICROSECONDS_PER_TICK.
+ *
+ * - Use the rtems_clock_get_ticks_per_second() directive.
+ *
+ * - Check that rtems_clock_get_ticks_per_second() actually returns 1us /
+ * CONFIGURE_MICROSECONDS_PER_TICK.
+ *
+ * @{
+ */
+
+/**
+ * @brief Use the rtems_clock_get_ticks_since_boot() directive before and after
+ * exactly one clock tick.
+ */
+static void RtemsClockValClock_Action_0( void )
+{
+ rtems_interval result_0;
+ rtems_interval result_1;
+
+ result_0 = rtems_clock_get_ticks_since_boot();
+ ClockTick();
+ result_1 = rtems_clock_get_ticks_since_boot();
+
+ /*
+ * Check that clock tick gets incremented.
+ */
+ T_step_eq_u32( 0, result_1 - result_0, 1 );
+}
+
+/**
+ * @brief Use the rtems_clock_get_ticks_since_boot() directive before and after
+ * exactly one clock tick.
+ */
+static void RtemsClockValClock_Action_1( void )
+{
+ rtems_interval result_0;
+ rtems_interval result_1;
+
+ #undef rtems_clock_get_ticks_since_boot
+
+ result_0 = rtems_clock_get_ticks_since_boot();
+ ClockTick();
+ result_1 = rtems_clock_get_ticks_since_boot();
+
+ /*
+ * Check that clock tick gets incremented.
+ */
+ T_step_eq_u32( 1, result_1 - result_0, 1 );
+}
+
+/**
+ * @brief Use the rtems_clock_get_ticks_per_second() directive.
+ */
+static void RtemsClockValClock_Action_2( void )
+{
+ rtems_interval result;
+
+ result = rtems_clock_get_ticks_per_second();
+
+ /*
+ * Check that rtems_clock_get_ticks_per_second() actually returns 1us /
+ * CONFIGURE_MICROSECONDS_PER_TICK.
+ */
+ T_step_eq_u32( 2, result, 1000000UL / TEST_MICROSECONDS_PER_TICK );
+}
+
+/**
+ * @brief Use the rtems_clock_get_ticks_per_second() directive.
+ */
+static void RtemsClockValClock_Action_3( void )
+{
+ rtems_interval result;
+
+ #undef rtems_clock_get_ticks_per_second
+
+ result = rtems_clock_get_ticks_per_second();
+
+ /*
+ * Check that rtems_clock_get_ticks_per_second() actually returns 1us /
+ * CONFIGURE_MICROSECONDS_PER_TICK.
+ */
+ T_step_eq_u32( 3, result, 1000000UL / TEST_MICROSECONDS_PER_TICK );
+}
+
+/**
+ * @fn void T_case_body_RtemsClockValClock( void )
+ */
+T_TEST_CASE( RtemsClockValClock )
+{
+ T_plan( 4 );
+
+ RtemsClockValClock_Action_0();
+ RtemsClockValClock_Action_1();
+ RtemsClockValClock_Action_2();
+ RtemsClockValClock_Action_3();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-cpu-performance.c b/testsuites/validation/tc-cpu-performance.c
new file mode 100644
index 0000000000..4f090e704f
--- /dev/null
+++ b/testsuites/validation/tc-cpu-performance.c
@@ -0,0 +1,270 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreCpuValPerf
+ */
+
+/*
+ * Copyright (C) 2023 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/cpuimpl.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreCpuValPerf spec:/score/cpu/val/perf
+ *
+ * @ingroup TestsuitesPerformanceNoClock0
+ *
+ * @brief This test case provides a context to run CPU port performance tests.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/score/cpu/val/perf test case.
+ */
+typedef struct {
+ /**
+ * @brief This member references the measure runtime context.
+ */
+ T_measure_runtime_context *context;
+
+ /**
+ * @brief This member provides the measure runtime request.
+ */
+ T_measure_runtime_request request;
+
+ /**
+ * @brief This member provides an optional measurement begin time point.
+ */
+ T_ticks begin;
+
+ /**
+ * @brief This member provides an optional measurement end time point.
+ */
+ T_ticks end;
+} ScoreCpuValPerf_Context;
+
+static ScoreCpuValPerf_Context
+ ScoreCpuValPerf_Instance;
+
+static void ScoreCpuValPerf_Setup_Context( ScoreCpuValPerf_Context *ctx )
+{
+ T_measure_runtime_config config;
+
+ memset( &config, 0, sizeof( config ) );
+ config.sample_count = 100;
+ ctx->request.arg = ctx;
+ ctx->request.flags = T_MEASURE_RUNTIME_REPORT_SAMPLES;
+ ctx->context = T_measure_runtime_create( &config );
+ T_assert_not_null( ctx->context );
+}
+
+static void ScoreCpuValPerf_Setup_Wrap( void *arg )
+{
+ ScoreCpuValPerf_Context *ctx;
+
+ ctx = arg;
+ ScoreCpuValPerf_Setup_Context( ctx );
+}
+
+static T_fixture ScoreCpuValPerf_Fixture = {
+ .setup = ScoreCpuValPerf_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &ScoreCpuValPerf_Instance
+};
+
+/**
+ * @defgroup ScoreCpuReqPerfEmpty spec:/score/cpu/req/perf-empty
+ *
+ * @{
+ */
+
+/**
+ * @brief Do nothing and just return.
+ */
+static void ScoreCpuReqPerfEmpty_Body( ScoreCpuValPerf_Context *ctx )
+{
+ /* No code */
+}
+
+static void ScoreCpuReqPerfEmpty_Body_Wrap( void *arg )
+{
+ ScoreCpuValPerf_Context *ctx;
+
+ ctx = arg;
+ ScoreCpuReqPerfEmpty_Body( ctx );
+}
+
+/**
+ * @brief Discard samples interrupted by a clock tick.
+ */
+static bool ScoreCpuReqPerfEmpty_Teardown(
+ ScoreCpuValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ return tic == toc;
+}
+
+static bool ScoreCpuReqPerfEmpty_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ ScoreCpuValPerf_Context *ctx;
+
+ ctx = arg;
+ return ScoreCpuReqPerfEmpty_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+/**
+ * @defgroup ScoreCpuReqPerfNops spec:/score/cpu/req/perf-nops
+ *
+ * @{
+ */
+
+/**
+ * @brief Execute exactly 1000 no-operation instructions.
+ */
+static void ScoreCpuReqPerfNops_Body( ScoreCpuValPerf_Context *ctx )
+{
+ #define NOPS_10 \
+ _CPU_Instruction_no_operation(); _CPU_Instruction_no_operation(); \
+ _CPU_Instruction_no_operation(); _CPU_Instruction_no_operation(); \
+ _CPU_Instruction_no_operation(); _CPU_Instruction_no_operation(); \
+ _CPU_Instruction_no_operation(); _CPU_Instruction_no_operation(); \
+ _CPU_Instruction_no_operation(); _CPU_Instruction_no_operation();
+ #define NOPS_100 NOPS_10 NOPS_10 NOPS_10 NOPS_10 NOPS_10 NOPS_10 NOPS_10 \
+ NOPS_10 NOPS_10 NOPS_10
+ NOPS_100
+ NOPS_100
+ NOPS_100
+ NOPS_100
+ NOPS_100
+ NOPS_100
+ NOPS_100
+ NOPS_100
+ NOPS_100
+ NOPS_100
+}
+
+static void ScoreCpuReqPerfNops_Body_Wrap( void *arg )
+{
+ ScoreCpuValPerf_Context *ctx;
+
+ ctx = arg;
+ ScoreCpuReqPerfNops_Body( ctx );
+}
+
+/**
+ * @brief Discard samples interrupted by a clock tick.
+ */
+static bool ScoreCpuReqPerfNops_Teardown(
+ ScoreCpuValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ return tic == toc;
+}
+
+static bool ScoreCpuReqPerfNops_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ ScoreCpuValPerf_Context *ctx;
+
+ ctx = arg;
+ return ScoreCpuReqPerfNops_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+/**
+ * @fn void T_case_body_ScoreCpuValPerf( void )
+ */
+T_TEST_CASE_FIXTURE( ScoreCpuValPerf, &ScoreCpuValPerf_Fixture )
+{
+ ScoreCpuValPerf_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ctx->request.name = "ScoreCpuReqPerfEmpty";
+ ctx->request.setup = NULL;
+ ctx->request.body = ScoreCpuReqPerfEmpty_Body_Wrap;
+ ctx->request.teardown = ScoreCpuReqPerfEmpty_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ ctx->request.name = "ScoreCpuReqPerfNops";
+ ctx->request.setup = NULL;
+ ctx->request.body = ScoreCpuReqPerfNops_Body_Wrap;
+ ctx->request.teardown = ScoreCpuReqPerfNops_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-cpuuse.c b/testsuites/validation/tc-cpuuse.c
new file mode 100644
index 0000000000..f554a0b4e1
--- /dev/null
+++ b/testsuites/validation/tc-cpuuse.c
@@ -0,0 +1,166 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsCpuuseValCpuuse
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/cpuuse.h>
+#include <rtems/score/threadimpl.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsCpuuseValCpuuse spec:/rtems/cpuuse/val/cpuuse
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests the CPU usage reporting and reset.
+ *
+ * This test case performs the following actions:
+ *
+ * - Create a worker thread. Generate some CPU usage.
+ *
+ * - Check that we have a non-zero CPU usage. Reset the CPU usage. Check
+ * that it was cleared to zero.
+ *
+ * - Clean up all used resources.
+ *
+ * @{
+ */
+
+static void Worker( rtems_task_argument arg )
+{
+ (void) arg;
+
+ while ( true ) {
+ Yield();
+ }
+}
+
+/**
+ * @brief Create a worker thread. Generate some CPU usage.
+ */
+static void RtemsCpuuseValCpuuse_Action_0( void )
+{
+ rtems_id id;
+ Thread_Control *self;
+ Thread_Control *other;
+ Timestamp_Control cpu_usage_self;
+ Timestamp_Control cpu_usage_other;
+ uint32_t idle_tasks;
+ uint32_t cpu_index;
+
+ idle_tasks = 0;
+
+ for ( cpu_index = 0; cpu_index < rtems_scheduler_get_processor_maximum(); ++cpu_index ) {
+ rtems_status_code sc;
+ rtems_id unused;
+
+ sc = rtems_scheduler_ident_by_processor( cpu_index, &unused );
+
+ if ( sc == RTEMS_SUCCESSFUL ) {
+ ++idle_tasks;
+ }
+ }
+
+ id = CreateTask( "WORK", GetSelfPriority() );
+ StartTask( id, Worker, NULL );
+
+ self = GetThread( RTEMS_SELF );
+ other = GetThread( id );
+
+ Yield();
+ Yield();
+
+ /*
+ * Check that we have a non-zero CPU usage. Reset the CPU usage. Check that
+ * it was cleared to zero.
+ */
+ TimecounterTick();
+
+ cpu_usage_self = _Thread_Get_CPU_time_used( self );
+ cpu_usage_other = _Thread_Get_CPU_time_used( other );
+
+ T_gt_i64( _Thread_Get_CPU_time_used_after_last_reset( self ), 0 );
+ T_gt_i64( _Thread_Get_CPU_time_used_after_last_reset( other ), 0 );
+
+ rtems_cpu_usage_reset();
+
+ /*
+ * Our CPU usage after the last reset is now exactly one tick of the
+ * software timecounter.
+ */
+ T_eq_i64( _Thread_Get_CPU_time_used_after_last_reset( self ), 4295 );
+ T_eq_i64(
+ _Thread_Get_CPU_time_used( self ),
+ cpu_usage_self + 12885 + 4295 * idle_tasks
+ );
+
+ T_eq_i64( _Thread_Get_CPU_time_used_after_last_reset( other ), 0 );
+ T_eq_i64( _Thread_Get_CPU_time_used( other ), cpu_usage_other );
+
+ /*
+ * Clean up all used resources.
+ */
+ DeleteTask( id );
+}
+
+/**
+ * @fn void T_case_body_RtemsCpuuseValCpuuse( void )
+ */
+T_TEST_CASE( RtemsCpuuseValCpuuse )
+{
+ RtemsCpuuseValCpuuse_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-dev-clock-xil-ttc.c b/testsuites/validation/tc-dev-clock-xil-ttc.c
new file mode 100644
index 0000000000..70f49a4cc6
--- /dev/null
+++ b/testsuites/validation/tc-dev-clock-xil-ttc.c
@@ -0,0 +1,136 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup DevClockXilTtcValTickCatchUp
+ */
+
+/*
+ * Copyright (C) 2024 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <sys/time.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup DevClockXilTtcValTickCatchUp \
+ * spec:/dev/clock/xil-ttc/val/tick-catch-up
+ *
+ * @ingroup TestsuitesBspsValidationBsp0
+ *
+ * @brief Tests some Xilinx TTC clock driver functions.
+ *
+ * This test case performs the following actions:
+ *
+ * - Synchronize with the clock tick. Disable interrupts. Busy wait three
+ * clock tick intervals. Enable interrupts.
+ *
+ * - Check that exactly three clock ticks happened once interrupts are
+ * enabled again.
+ *
+ * @{
+ */
+
+/**
+ * @brief Synchronize with the clock tick. Disable interrupts. Busy wait
+ * three clock tick intervals. Enable interrupts.
+ */
+static void DevClockXilTtcValTickCatchUp_Action_0( void )
+{
+ uint32_t ns_per_tick;
+ uint64_t three_ticks_interval;
+ rtems_interrupt_level level;
+ rtems_interval t_0;
+ rtems_interval t_1;
+ rtems_interval t_2;
+ uint64_t m_0;
+ uint64_t m_1;
+
+ ns_per_tick = rtems_configuration_get_nanoseconds_per_tick();
+ three_ticks_interval = ( 7 * (uint64_t) nstosbt( ns_per_tick ) ) / 2;
+ t_0 = rtems_clock_get_ticks_since_boot();
+
+ /* Synchronize with clock tick */
+ do {
+ t_1 = rtems_clock_get_ticks_since_boot();
+ m_0 = (uint64_t) rtems_clock_get_monotonic_sbintime();
+ } while ( t_0 == t_1 );
+
+ rtems_interrupt_local_disable( level );
+
+ do {
+ m_1 = (uint64_t) rtems_clock_get_monotonic_sbintime();
+ } while ( m_1 - m_0 <= three_ticks_interval );
+
+ rtems_interrupt_local_enable( level );
+
+ /*
+ * Make sure the clock interrupt was serviced after the interrupt enable.
+ */
+ do {
+ t_2 = rtems_clock_get_ticks_since_boot();
+ } while ( t_1 == t_2 );
+
+ /*
+ * Check that exactly three clock ticks happened once interrupts are enabled
+ * again.
+ */
+ T_step_eq_u32( 0, t_2 - t_1, 3 );
+}
+
+/**
+ * @fn void T_case_body_DevClockXilTtcValTickCatchUp( void )
+ */
+T_TEST_CASE( DevClockXilTtcValTickCatchUp )
+{
+ T_plan( 1 );
+
+ DevClockXilTtcValTickCatchUp_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-dev-grlib-apbuart-inbyte-nonblocking.c b/testsuites/validation/tc-dev-grlib-apbuart-inbyte-nonblocking.c
new file mode 100644
index 0000000000..b33b6f1a25
--- /dev/null
+++ b/testsuites/validation/tc-dev-grlib-apbuart-inbyte-nonblocking.c
@@ -0,0 +1,348 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup DevGrlibReqApbuartInbyteNonblocking
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <grlib/apbuart.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup DevGrlibReqApbuartInbyteNonblocking \
+ * spec:/dev/grlib/req/apbuart-inbyte-nonblocking
+ *
+ * @ingroup TestsuitesBspsValidationBsp0
+ *
+ * @{
+ */
+
+typedef enum {
+ DevGrlibReqApbuartInbyteNonblocking_Pre_DataReady_Yes,
+ DevGrlibReqApbuartInbyteNonblocking_Pre_DataReady_No,
+ DevGrlibReqApbuartInbyteNonblocking_Pre_DataReady_NA
+} DevGrlibReqApbuartInbyteNonblocking_Pre_DataReady;
+
+typedef enum {
+ DevGrlibReqApbuartInbyteNonblocking_Post_Result_Data,
+ DevGrlibReqApbuartInbyteNonblocking_Post_Result_MinusOne,
+ DevGrlibReqApbuartInbyteNonblocking_Post_Result_NA
+} DevGrlibReqApbuartInbyteNonblocking_Post_Result;
+
+typedef enum {
+ DevGrlibReqApbuartInbyteNonblocking_Post_ErrorFlags_Cleared,
+ DevGrlibReqApbuartInbyteNonblocking_Post_ErrorFlags_NA
+} DevGrlibReqApbuartInbyteNonblocking_Post_ErrorFlags;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_DataReady_NA : 1;
+ uint8_t Post_Result : 2;
+ uint8_t Post_ErrorFlags : 1;
+} DevGrlibReqApbuartInbyteNonblocking_Entry;
+
+/**
+ * @brief Test context for spec:/dev/grlib/req/apbuart-inbyte-nonblocking test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides the APBUART register block.
+ */
+ apbuart regs;
+
+ /**
+ * @brief This member contains the return value of the
+ * apbuart_inbyte_nonblocking() call.
+ */
+ int result;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ DevGrlibReqApbuartInbyteNonblocking_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} DevGrlibReqApbuartInbyteNonblocking_Context;
+
+static DevGrlibReqApbuartInbyteNonblocking_Context
+ DevGrlibReqApbuartInbyteNonblocking_Instance;
+
+static const char * const DevGrlibReqApbuartInbyteNonblocking_PreDesc_DataReady[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const DevGrlibReqApbuartInbyteNonblocking_PreDesc[] = {
+ DevGrlibReqApbuartInbyteNonblocking_PreDesc_DataReady,
+ NULL
+};
+
+static void DevGrlibReqApbuartInbyteNonblocking_Pre_DataReady_Prepare(
+ DevGrlibReqApbuartInbyteNonblocking_Context *ctx,
+ DevGrlibReqApbuartInbyteNonblocking_Pre_DataReady state
+)
+{
+ switch ( state ) {
+ case DevGrlibReqApbuartInbyteNonblocking_Pre_DataReady_Yes: {
+ /*
+ * While the data ready flag is set in the status register of the
+ * register block specified by ``regs`` parameter.
+ */
+ ctx->regs.status |= APBUART_STATUS_DR;
+ break;
+ }
+
+ case DevGrlibReqApbuartInbyteNonblocking_Pre_DataReady_No: {
+ /*
+ * While the data ready flag is cleared in the status register of the
+ * register block specified by ``regs`` parameter.
+ */
+ ctx->regs.status &= ~APBUART_STATUS_DR;
+ break;
+ }
+
+ case DevGrlibReqApbuartInbyteNonblocking_Pre_DataReady_NA:
+ break;
+ }
+}
+
+static void DevGrlibReqApbuartInbyteNonblocking_Post_Result_Check(
+ DevGrlibReqApbuartInbyteNonblocking_Context *ctx,
+ DevGrlibReqApbuartInbyteNonblocking_Post_Result state
+)
+{
+ switch ( state ) {
+ case DevGrlibReqApbuartInbyteNonblocking_Post_Result_Data: {
+ /*
+ * The return value of apbuart_inbyte_nonblocking() shall be the data
+ * read from the data register of the register block specified by
+ * ``regs``.
+ */
+ T_eq_int( ctx->result, 0xff );
+ break;
+ }
+
+ case DevGrlibReqApbuartInbyteNonblocking_Post_Result_MinusOne: {
+ /*
+ * The return value of apbuart_inbyte_nonblocking() shall be minus one.
+ */
+ T_eq_int( ctx->result, -1 );
+ break;
+ }
+
+ case DevGrlibReqApbuartInbyteNonblocking_Post_Result_NA:
+ break;
+ }
+}
+
+static void DevGrlibReqApbuartInbyteNonblocking_Post_ErrorFlags_Check(
+ DevGrlibReqApbuartInbyteNonblocking_Context *ctx,
+ DevGrlibReqApbuartInbyteNonblocking_Post_ErrorFlags state
+)
+{
+ switch ( state ) {
+ case DevGrlibReqApbuartInbyteNonblocking_Post_ErrorFlags_Cleared: {
+ /*
+ * The framing error, parity error, overrun, and break received flags in
+ * the status register of the register block specified by ``regs`` shall
+ * be cleared.
+ */
+ T_eq_u32( ctx->regs.status & 0x78, 0 );
+ break;
+ }
+
+ case DevGrlibReqApbuartInbyteNonblocking_Post_ErrorFlags_NA:
+ break;
+ }
+}
+
+static void DevGrlibReqApbuartInbyteNonblocking_Prepare(
+ DevGrlibReqApbuartInbyteNonblocking_Context *ctx
+)
+{
+ memset( &ctx->regs, 0, sizeof( ctx->regs ) );
+ ctx->regs.status = 0x78;
+ ctx->regs.data = 0xff;
+}
+
+static void DevGrlibReqApbuartInbyteNonblocking_Action(
+ DevGrlibReqApbuartInbyteNonblocking_Context *ctx
+)
+{
+ ctx->result = apbuart_inbyte_nonblocking( &ctx->regs );
+}
+
+static const DevGrlibReqApbuartInbyteNonblocking_Entry
+DevGrlibReqApbuartInbyteNonblocking_Entries[] = {
+ { 0, 0, DevGrlibReqApbuartInbyteNonblocking_Post_Result_Data,
+ DevGrlibReqApbuartInbyteNonblocking_Post_ErrorFlags_Cleared },
+ { 0, 0, DevGrlibReqApbuartInbyteNonblocking_Post_Result_MinusOne,
+ DevGrlibReqApbuartInbyteNonblocking_Post_ErrorFlags_Cleared }
+};
+
+static const uint8_t
+DevGrlibReqApbuartInbyteNonblocking_Map[] = {
+ 0, 1
+};
+
+static size_t DevGrlibReqApbuartInbyteNonblocking_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ DevGrlibReqApbuartInbyteNonblocking_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ DevGrlibReqApbuartInbyteNonblocking_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture DevGrlibReqApbuartInbyteNonblocking_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = DevGrlibReqApbuartInbyteNonblocking_Scope,
+ .initial_context = &DevGrlibReqApbuartInbyteNonblocking_Instance
+};
+
+static inline DevGrlibReqApbuartInbyteNonblocking_Entry
+DevGrlibReqApbuartInbyteNonblocking_PopEntry(
+ DevGrlibReqApbuartInbyteNonblocking_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return DevGrlibReqApbuartInbyteNonblocking_Entries[
+ DevGrlibReqApbuartInbyteNonblocking_Map[ index ]
+ ];
+}
+
+static void DevGrlibReqApbuartInbyteNonblocking_TestVariant(
+ DevGrlibReqApbuartInbyteNonblocking_Context *ctx
+)
+{
+ DevGrlibReqApbuartInbyteNonblocking_Pre_DataReady_Prepare(
+ ctx,
+ ctx->Map.pcs[ 0 ]
+ );
+ DevGrlibReqApbuartInbyteNonblocking_Action( ctx );
+ DevGrlibReqApbuartInbyteNonblocking_Post_Result_Check(
+ ctx,
+ ctx->Map.entry.Post_Result
+ );
+ DevGrlibReqApbuartInbyteNonblocking_Post_ErrorFlags_Check(
+ ctx,
+ ctx->Map.entry.Post_ErrorFlags
+ );
+}
+
+/**
+ * @fn void T_case_body_DevGrlibReqApbuartInbyteNonblocking( void )
+ */
+T_TEST_CASE_FIXTURE(
+ DevGrlibReqApbuartInbyteNonblocking,
+ &DevGrlibReqApbuartInbyteNonblocking_Fixture
+)
+{
+ DevGrlibReqApbuartInbyteNonblocking_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = DevGrlibReqApbuartInbyteNonblocking_Pre_DataReady_Yes;
+ ctx->Map.pcs[ 0 ] < DevGrlibReqApbuartInbyteNonblocking_Pre_DataReady_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = DevGrlibReqApbuartInbyteNonblocking_PopEntry( ctx );
+ DevGrlibReqApbuartInbyteNonblocking_Prepare( ctx );
+ DevGrlibReqApbuartInbyteNonblocking_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-dev-grlib-io.c b/testsuites/validation/tc-dev-grlib-io.c
new file mode 100644
index 0000000000..5bfc3fcfab
--- /dev/null
+++ b/testsuites/validation/tc-dev-grlib-io.c
@@ -0,0 +1,295 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup DevGrlibValIo
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <grlib/apbuart.h>
+#include <grlib/io.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup DevGrlibValIo spec:/dev/grlib/val/io
+ *
+ * @ingroup TestsuitesBspsValidationBsp0
+ *
+ * @brief Tests some @ref RTEMSDeviceGRLIB directives.
+ *
+ * This test case performs the following actions:
+ *
+ * - Call grlib_load_8() to load a prepared value.
+ *
+ * - Check that the returned value is equal to the prepared value.
+ *
+ * - Call grlib_load_16() to load a prepared value.
+ *
+ * - Check that the returned value is equal to the prepared value.
+ *
+ * - Call grlib_load_32() to load a prepared value.
+ *
+ * - Check that the returned value is equal to the prepared value.
+ *
+ * - Call grlib_load_64() to load a prepared value.
+ *
+ * - Check that the returned value is equal to the prepared value.
+ *
+ * - Call grlib_store_8() to store a value to an object.
+ *
+ * - Check that the value of the object is equal to the stored value.
+ *
+ * - Call grlib_store_16() to store a value to an object.
+ *
+ * - Check that the value of the object is equal to the stored value.
+ *
+ * - Call grlib_store_32() to store a value to an object.
+ *
+ * - Check that the value of the object is equal to the stored value.
+ *
+ * - Call grlib_store_64() to store a value to an object.
+ *
+ * - Check that the value of the object is equal to the stored value.
+ *
+ * - Call apbuart_outbyte_polled() to store a character to the data register.
+ * The transmitter FIFO shall be initially non-empty. The status is checked
+ * by apbuart_outbyte_wait().
+ *
+ * - Check that the transmitter FIFO empty flag was set by ApbuartIORelax().
+ *
+ * - Check that the data register was written by apbuart_outbyte_polled().
+ *
+ * @{
+ */
+
+static void ApbuartIORelax( void *arg )
+{
+ apbuart *regs;
+
+ regs = arg;
+ regs->status = 0x4;
+ T_quiet_eq_u32( regs->data, 0 );
+}
+
+/**
+ * @brief Call grlib_load_8() to load a prepared value.
+ */
+static void DevGrlibValIo_Action_0( void )
+{
+ uint8_t reg_8;
+ uint8_t val_8;
+
+ reg_8 = 0x81;
+ val_8 = grlib_load_8( &reg_8 );
+
+ /*
+ * Check that the returned value is equal to the prepared value.
+ */
+ T_step_eq_u8( 0, val_8, 0x81 );
+}
+
+/**
+ * @brief Call grlib_load_16() to load a prepared value.
+ */
+static void DevGrlibValIo_Action_1( void )
+{
+ uint16_t reg_16;
+ uint16_t val_16;
+
+ reg_16 = 0x8001;
+ val_16 = grlib_load_16( &reg_16 );
+
+ /*
+ * Check that the returned value is equal to the prepared value.
+ */
+ T_step_eq_u16( 1, val_16, 0x8001 );
+}
+
+/**
+ * @brief Call grlib_load_32() to load a prepared value.
+ */
+static void DevGrlibValIo_Action_2( void )
+{
+ uint32_t reg_32;
+ uint32_t val_32;
+
+ reg_32 = 0x80000001;
+ val_32 = grlib_load_32( &reg_32 );
+
+ /*
+ * Check that the returned value is equal to the prepared value.
+ */
+ T_step_eq_u32( 2, val_32, 0x80000001 );
+}
+
+/**
+ * @brief Call grlib_load_64() to load a prepared value.
+ */
+static void DevGrlibValIo_Action_3( void )
+{
+ uint64_t reg_64;
+ uint64_t val_64;
+
+ reg_64 = 0x8000000000000001;
+ val_64 = grlib_load_64( &reg_64 );
+
+ /*
+ * Check that the returned value is equal to the prepared value.
+ */
+ T_step_eq_u64( 3, val_64, 0x8000000000000001 );
+}
+
+/**
+ * @brief Call grlib_store_8() to store a value to an object.
+ */
+static void DevGrlibValIo_Action_4( void )
+{
+ uint8_t reg_8;
+
+ grlib_store_8( &reg_8, 0x81 );
+
+ /*
+ * Check that the value of the object is equal to the stored value.
+ */
+ T_step_eq_u8( 4, reg_8, 0x81 );
+}
+
+/**
+ * @brief Call grlib_store_16() to store a value to an object.
+ */
+static void DevGrlibValIo_Action_5( void )
+{
+ uint16_t reg_16;
+
+ grlib_store_16( &reg_16, 0x8001 );
+
+ /*
+ * Check that the value of the object is equal to the stored value.
+ */
+ T_step_eq_u16( 5, reg_16, 0x8001 );
+}
+
+/**
+ * @brief Call grlib_store_32() to store a value to an object.
+ */
+static void DevGrlibValIo_Action_6( void )
+{
+ uint32_t reg_32;
+
+ grlib_store_32( &reg_32, 0x80000001 );
+
+ /*
+ * Check that the value of the object is equal to the stored value.
+ */
+ T_step_eq_u32( 6, reg_32, 0x80000001 );
+}
+
+/**
+ * @brief Call grlib_store_64() to store a value to an object.
+ */
+static void DevGrlibValIo_Action_7( void )
+{
+ uint64_t reg_64;
+
+ grlib_store_64( &reg_64, 0x8000000000000001 );
+
+ /*
+ * Check that the value of the object is equal to the stored value.
+ */
+ T_step_eq_u64( 7, reg_64, 0x8000000000000001 );
+}
+
+/**
+ * @brief Call apbuart_outbyte_polled() to store a character to the data
+ * register. The transmitter FIFO shall be initially non-empty. The status
+ * is checked by apbuart_outbyte_wait().
+ */
+static void DevGrlibValIo_Action_8( void )
+{
+ apbuart regs;
+
+ memset( &regs, 0, sizeof( regs ) );
+ SetIORelaxHandler( ApbuartIORelax, &regs );
+ apbuart_outbyte_polled( &regs, (char) 0xff );
+ SetIORelaxHandler( NULL, NULL );
+
+ /*
+ * Check that the transmitter FIFO empty flag was set by ApbuartIORelax().
+ */
+ T_step_eq_u32( 8, regs.status, APBUART_STATUS_TE );
+
+ /*
+ * Check that the data register was written by apbuart_outbyte_polled().
+ */
+ T_step_eq_u32( 9, regs.data, 0xff );
+}
+
+/**
+ * @fn void T_case_body_DevGrlibValIo( void )
+ */
+T_TEST_CASE( DevGrlibValIo )
+{
+ T_plan( 10 );
+
+ DevGrlibValIo_Action_0();
+ DevGrlibValIo_Action_1();
+ DevGrlibValIo_Action_2();
+ DevGrlibValIo_Action_3();
+ DevGrlibValIo_Action_4();
+ DevGrlibValIo_Action_5();
+ DevGrlibValIo_Action_6();
+ DevGrlibValIo_Action_7();
+ DevGrlibValIo_Action_8();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-dev-grlib-irqamp-get-timestamp.c b/testsuites/validation/tc-dev-grlib-irqamp-get-timestamp.c
new file mode 100644
index 0000000000..a064c479b9
--- /dev/null
+++ b/testsuites/validation/tc-dev-grlib-irqamp-get-timestamp.c
@@ -0,0 +1,304 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup DevGrlibReqIrqampGetTimestamp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <grlib/irqamp.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup DevGrlibReqIrqampGetTimestamp \
+ * spec:/dev/grlib/req/irqamp-get-timestamp
+ *
+ * @ingroup TestsuitesBspsValidationBsp0
+ *
+ * @{
+ */
+
+typedef enum {
+ DevGrlibReqIrqampGetTimestamp_Pre_NumberOfTimestampRegisterSets_Zero,
+ DevGrlibReqIrqampGetTimestamp_Pre_NumberOfTimestampRegisterSets_Positive,
+ DevGrlibReqIrqampGetTimestamp_Pre_NumberOfTimestampRegisterSets_NA
+} DevGrlibReqIrqampGetTimestamp_Pre_NumberOfTimestampRegisterSets;
+
+typedef enum {
+ DevGrlibReqIrqampGetTimestamp_Post_Result_Registers,
+ DevGrlibReqIrqampGetTimestamp_Post_Result_Null,
+ DevGrlibReqIrqampGetTimestamp_Post_Result_NA
+} DevGrlibReqIrqampGetTimestamp_Post_Result;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_NumberOfTimestampRegisterSets_NA : 1;
+ uint8_t Post_Result : 2;
+} DevGrlibReqIrqampGetTimestamp_Entry;
+
+/**
+ * @brief Test context for spec:/dev/grlib/req/irqamp-get-timestamp test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the return value of the
+ * irqamp_get_timestamp_registers() call.
+ */
+ irqamp_timestamp *result;
+
+ /**
+ * @brief This member contains the IRQ(A)MP register block.
+ */
+ irqamp irqamp_regs;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ DevGrlibReqIrqampGetTimestamp_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} DevGrlibReqIrqampGetTimestamp_Context;
+
+static DevGrlibReqIrqampGetTimestamp_Context
+ DevGrlibReqIrqampGetTimestamp_Instance;
+
+static const char * const DevGrlibReqIrqampGetTimestamp_PreDesc_NumberOfTimestampRegisterSets[] = {
+ "Zero",
+ "Positive",
+ "NA"
+};
+
+static const char * const * const DevGrlibReqIrqampGetTimestamp_PreDesc[] = {
+ DevGrlibReqIrqampGetTimestamp_PreDesc_NumberOfTimestampRegisterSets,
+ NULL
+};
+
+static void
+DevGrlibReqIrqampGetTimestamp_Pre_NumberOfTimestampRegisterSets_Prepare(
+ DevGrlibReqIrqampGetTimestamp_Context *ctx,
+ DevGrlibReqIrqampGetTimestamp_Pre_NumberOfTimestampRegisterSets state
+)
+{
+ switch ( state ) {
+ case DevGrlibReqIrqampGetTimestamp_Pre_NumberOfTimestampRegisterSets_Zero: {
+ /*
+ * While the number of timestamp register sets indicated by the IRQ(A)MP
+ * register block specified by the ``irqamp_regs`` parameter is zero.
+ */
+ ctx->irqamp_regs.itstmp[ 0 ].itstmpc = 0;
+ break;
+ }
+
+ case DevGrlibReqIrqampGetTimestamp_Pre_NumberOfTimestampRegisterSets_Positive: {
+ /*
+ * While the number of timestamp register sets indicated by the IRQ(A)MP
+ * register block specified by the ``irqamp_regs`` parameter is positive.
+ */
+ ctx->irqamp_regs.itstmp[ 0 ].itstmpc = IRQAMP_ITSTMPC_TSTAMP( 1 );
+ break;
+ }
+
+ case DevGrlibReqIrqampGetTimestamp_Pre_NumberOfTimestampRegisterSets_NA:
+ break;
+ }
+}
+
+static void DevGrlibReqIrqampGetTimestamp_Post_Result_Check(
+ DevGrlibReqIrqampGetTimestamp_Context *ctx,
+ DevGrlibReqIrqampGetTimestamp_Post_Result state
+)
+{
+ switch ( state ) {
+ case DevGrlibReqIrqampGetTimestamp_Post_Result_Registers: {
+ /*
+ * The return value of irqamp_get_timestamp_registers() shall be address
+ * of the timestamping register block contained in the IRQ(A)MP register
+ * block specified by the ``irqamp_regs`` parameter.
+ */
+ T_not_null( ctx->result );
+ break;
+ }
+
+ case DevGrlibReqIrqampGetTimestamp_Post_Result_Null: {
+ /*
+ * The return value of irqamp_get_timestamp_registers() shall be false.
+ */
+ T_null( ctx->result );
+ break;
+ }
+
+ case DevGrlibReqIrqampGetTimestamp_Post_Result_NA:
+ break;
+ }
+}
+
+static void DevGrlibReqIrqampGetTimestamp_Action(
+ DevGrlibReqIrqampGetTimestamp_Context *ctx
+)
+{
+ ctx->result = irqamp_get_timestamp_registers( &ctx->irqamp_regs );
+}
+
+static const DevGrlibReqIrqampGetTimestamp_Entry
+DevGrlibReqIrqampGetTimestamp_Entries[] = {
+ { 0, 0, DevGrlibReqIrqampGetTimestamp_Post_Result_Null },
+ { 0, 0, DevGrlibReqIrqampGetTimestamp_Post_Result_Registers }
+};
+
+static const uint8_t
+DevGrlibReqIrqampGetTimestamp_Map[] = {
+ 0, 1
+};
+
+static size_t DevGrlibReqIrqampGetTimestamp_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ DevGrlibReqIrqampGetTimestamp_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ DevGrlibReqIrqampGetTimestamp_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture DevGrlibReqIrqampGetTimestamp_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = DevGrlibReqIrqampGetTimestamp_Scope,
+ .initial_context = &DevGrlibReqIrqampGetTimestamp_Instance
+};
+
+static inline DevGrlibReqIrqampGetTimestamp_Entry
+DevGrlibReqIrqampGetTimestamp_PopEntry(
+ DevGrlibReqIrqampGetTimestamp_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return DevGrlibReqIrqampGetTimestamp_Entries[
+ DevGrlibReqIrqampGetTimestamp_Map[ index ]
+ ];
+}
+
+static void DevGrlibReqIrqampGetTimestamp_TestVariant(
+ DevGrlibReqIrqampGetTimestamp_Context *ctx
+)
+{
+ DevGrlibReqIrqampGetTimestamp_Pre_NumberOfTimestampRegisterSets_Prepare(
+ ctx,
+ ctx->Map.pcs[ 0 ]
+ );
+ DevGrlibReqIrqampGetTimestamp_Action( ctx );
+ DevGrlibReqIrqampGetTimestamp_Post_Result_Check(
+ ctx,
+ ctx->Map.entry.Post_Result
+ );
+}
+
+/**
+ * @fn void T_case_body_DevGrlibReqIrqampGetTimestamp( void )
+ */
+T_TEST_CASE_FIXTURE(
+ DevGrlibReqIrqampGetTimestamp,
+ &DevGrlibReqIrqampGetTimestamp_Fixture
+)
+{
+ DevGrlibReqIrqampGetTimestamp_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = DevGrlibReqIrqampGetTimestamp_Pre_NumberOfTimestampRegisterSets_Zero;
+ ctx->Map.pcs[ 0 ] < DevGrlibReqIrqampGetTimestamp_Pre_NumberOfTimestampRegisterSets_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = DevGrlibReqIrqampGetTimestamp_PopEntry( ctx );
+ DevGrlibReqIrqampGetTimestamp_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-event-performance.c b/testsuites/validation/tc-event-performance.c
new file mode 100644
index 0000000000..9cf71e92f5
--- /dev/null
+++ b/testsuites/validation/tc-event-performance.c
@@ -0,0 +1,591 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsEventValPerf
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsEventValPerf spec:/rtems/event/val/perf
+ *
+ * @ingroup TestsuitesPerformanceNoClock0
+ *
+ * @brief This test case provides a context to run @ref RTEMSAPIClassicEvent
+ * performance tests.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/rtems/event/val/perf test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides a worker identifier.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member provides a status code.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member references the measure runtime context.
+ */
+ T_measure_runtime_context *context;
+
+ /**
+ * @brief This member provides the measure runtime request.
+ */
+ T_measure_runtime_request request;
+
+ /**
+ * @brief This member provides an optional measurement begin time point.
+ */
+ T_ticks begin;
+
+ /**
+ * @brief This member provides an optional measurement end time point.
+ */
+ T_ticks end;
+} RtemsEventValPerf_Context;
+
+static RtemsEventValPerf_Context
+ RtemsEventValPerf_Instance;
+
+#define EVENT_END RTEMS_EVENT_0
+
+#define EVENT_OTHER RTEMS_EVENT_1
+
+typedef RtemsEventValPerf_Context Context;
+
+static void Send( const Context *ctx, rtems_event_set events )
+{
+ SendEvents( ctx->worker_id, events );
+}
+
+static void Satisfy( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ ctx->begin = T_tick();
+ ctx->status = rtems_event_send( ctx->worker_id, EVENT_END | EVENT_OTHER );
+}
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ rtems_event_set events;
+ rtems_status_code sc;
+ T_ticks ticks;
+
+ sc = rtems_event_receive(
+ EVENT_END | EVENT_OTHER,
+ RTEMS_EVENT_ALL | RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT,
+ &events
+ );
+ ticks = T_tick();
+ T_quiet_rsc_success( sc );
+
+ if ( ( events & EVENT_END ) != 0 ) {
+ ctx->end = ticks;
+ }
+ }
+}
+
+static void RtemsEventValPerf_Setup_Context( RtemsEventValPerf_Context *ctx )
+{
+ T_measure_runtime_config config;
+
+ memset( &config, 0, sizeof( config ) );
+ config.sample_count = 100;
+ ctx->request.arg = ctx;
+ ctx->request.flags = T_MEASURE_RUNTIME_REPORT_SAMPLES;
+ ctx->context = T_measure_runtime_create( &config );
+ T_assert_not_null( ctx->context );
+}
+
+/**
+ * @brief Create a mutex and a worker task.
+ */
+static void RtemsEventValPerf_Setup( RtemsEventValPerf_Context *ctx )
+{
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+static void RtemsEventValPerf_Setup_Wrap( void *arg )
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsEventValPerf_Setup_Context( ctx );
+ RtemsEventValPerf_Setup( ctx );
+}
+
+/**
+ * @brief Delete the worker task and the mutex.
+ */
+static void RtemsEventValPerf_Teardown( RtemsEventValPerf_Context *ctx )
+{
+ DeleteTask( ctx->worker_id );
+ RestoreRunnerPriority();
+}
+
+static void RtemsEventValPerf_Teardown_Wrap( void *arg )
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsEventValPerf_Teardown( ctx );
+}
+
+static T_fixture RtemsEventValPerf_Fixture = {
+ .setup = RtemsEventValPerf_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsEventValPerf_Teardown_Wrap,
+ .scope = NULL,
+ .initial_context = &RtemsEventValPerf_Instance
+};
+
+/**
+ * @defgroup RtemsEventReqPerfIsrPreempt spec:/rtems/event/req/perf-isr-preempt
+ *
+ * @{
+ */
+
+/**
+ * @brief Send two events from with interrupt context. Satisfy the event
+ * condition.
+ */
+static void RtemsEventReqPerfIsrPreempt_Body( RtemsEventValPerf_Context *ctx )
+{
+ CallWithinISR( Satisfy, ctx );
+}
+
+static void RtemsEventReqPerfIsrPreempt_Body_Wrap( void *arg )
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsEventReqPerfIsrPreempt_Body( ctx );
+}
+
+/**
+ * @brief Set the measured runtime. Discard samples interrupted by a clock
+ * tick.
+ */
+static bool RtemsEventReqPerfIsrPreempt_Teardown(
+ RtemsEventValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ *delta = ctx->end - ctx->begin;
+
+ return tic == toc;
+}
+
+static bool RtemsEventReqPerfIsrPreempt_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsEventReqPerfIsrPreempt_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsEventReqPerfOther spec:/rtems/event/req/perf-other
+ *
+ * @{
+ */
+
+/**
+ * @brief Lower the worker priority.
+ */
+static void RtemsEventReqPerfOther_Setup( RtemsEventValPerf_Context *ctx )
+{
+ SetPriority( ctx->worker_id, PRIO_LOW );
+}
+
+static void RtemsEventReqPerfOther_Setup_Wrap( void *arg )
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsEventReqPerfOther_Setup( ctx );
+}
+
+/**
+ * @brief Send two events. Satisfy the event condition.
+ */
+static void RtemsEventReqPerfOther_Body( RtemsEventValPerf_Context *ctx )
+{
+ ctx->status = rtems_event_send( ctx->worker_id, EVENT_END | EVENT_OTHER );
+}
+
+static void RtemsEventReqPerfOther_Body_Wrap( void *arg )
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsEventReqPerfOther_Body( ctx );
+}
+
+/**
+ * @brief Restore the worker priority. Discard samples interrupted by a clock
+ * tick.
+ */
+static bool RtemsEventReqPerfOther_Teardown(
+ RtemsEventValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ SetPriority( ctx->worker_id, PRIO_HIGH );
+
+ return tic == toc;
+}
+
+static bool RtemsEventReqPerfOther_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsEventReqPerfOther_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+#if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsEventReqPerfOtherCpu spec:/rtems/event/req/perf-other-cpu
+ *
+ * @{
+ */
+
+/**
+ * @brief Move worker to scheduler B.
+ */
+static void RtemsEventReqPerfOtherCpu_Prepare( RtemsEventValPerf_Context *ctx )
+{
+ SetScheduler( ctx->worker_id, SCHEDULER_B_ID, PRIO_NORMAL );
+}
+
+/**
+ * @brief Send two events. Satisfy the event condition.
+ */
+static void RtemsEventReqPerfOtherCpu_Body( RtemsEventValPerf_Context *ctx )
+{
+ ctx->begin = T_tick();
+ ctx->status = rtems_event_send( ctx->worker_id, EVENT_END | EVENT_OTHER );
+}
+
+static void RtemsEventReqPerfOtherCpu_Body_Wrap( void *arg )
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsEventReqPerfOtherCpu_Body( ctx );
+}
+
+/**
+ * @brief Make sure the worker waits for the next event. Set the measured
+ * runtime. Discard samples interrupted by a clock tick.
+ */
+static bool RtemsEventReqPerfOtherCpu_Teardown(
+ RtemsEventValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ WaitForNextTask( 1, ctx->worker_id );
+ *delta = ctx->end - ctx->begin;
+
+ return tic == toc;
+}
+
+static bool RtemsEventReqPerfOtherCpu_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsEventReqPerfOtherCpu_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/**
+ * @brief Move worker to scheduler A.
+ */
+static void RtemsEventReqPerfOtherCpu_Cleanup( RtemsEventValPerf_Context *ctx )
+{
+ SetScheduler( ctx->worker_id, SCHEDULER_A_ID, PRIO_HIGH );
+}
+
+/** @} */
+#endif
+
+/**
+ * @defgroup RtemsEventReqPerfOtherNotSatisfied \
+ * spec:/rtems/event/req/perf-other-not-satisfied
+ *
+ * @{
+ */
+
+/**
+ * @brief Send an event. Do not satisfy the event condition.
+ */
+static void RtemsEventReqPerfOtherNotSatisfied_Body(
+ RtemsEventValPerf_Context *ctx
+)
+{
+ ctx->status = rtems_event_send( ctx->worker_id, EVENT_OTHER );
+}
+
+static void RtemsEventReqPerfOtherNotSatisfied_Body_Wrap( void *arg )
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsEventReqPerfOtherNotSatisfied_Body( ctx );
+}
+
+/**
+ * @brief Let the worker wait for the next set of events. Discard samples
+ * interrupted by a clock tick.
+ */
+static bool RtemsEventReqPerfOtherNotSatisfied_Teardown(
+ RtemsEventValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ Send( ctx, EVENT_END );
+
+ return tic == toc;
+}
+
+static bool RtemsEventReqPerfOtherNotSatisfied_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsEventReqPerfOtherNotSatisfied_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsEventReqPerfOtherPreempt \
+ * spec:/rtems/event/req/perf-other-preempt
+ *
+ * @{
+ */
+
+/**
+ * @brief Send two events. Satisfy the event condition.
+ */
+static void RtemsEventReqPerfOtherPreempt_Body(
+ RtemsEventValPerf_Context *ctx
+)
+{
+ ctx->begin = T_tick();
+ ctx->status = rtems_event_send( ctx->worker_id, EVENT_END | EVENT_OTHER );
+}
+
+static void RtemsEventReqPerfOtherPreempt_Body_Wrap( void *arg )
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsEventReqPerfOtherPreempt_Body( ctx );
+}
+
+/**
+ * @brief Set the measured runtime. Discard samples interrupted by a clock
+ * tick.
+ */
+static bool RtemsEventReqPerfOtherPreempt_Teardown(
+ RtemsEventValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ *delta = ctx->end - ctx->begin;
+
+ return tic == toc;
+}
+
+static bool RtemsEventReqPerfOtherPreempt_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsEventReqPerfOtherPreempt_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+/**
+ * @fn void T_case_body_RtemsEventValPerf( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsEventValPerf, &RtemsEventValPerf_Fixture )
+{
+ RtemsEventValPerf_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ctx->request.name = "RtemsEventReqPerfIsrPreempt";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsEventReqPerfIsrPreempt_Body_Wrap;
+ ctx->request.teardown = RtemsEventReqPerfIsrPreempt_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ ctx->request.name = "RtemsEventReqPerfOther";
+ ctx->request.setup = RtemsEventReqPerfOther_Setup_Wrap;
+ ctx->request.body = RtemsEventReqPerfOther_Body_Wrap;
+ ctx->request.teardown = RtemsEventReqPerfOther_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ #if defined(RTEMS_SMP)
+ RtemsEventReqPerfOtherCpu_Prepare( ctx );
+ ctx->request.name = "RtemsEventReqPerfOtherCpu";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsEventReqPerfOtherCpu_Body_Wrap;
+ ctx->request.teardown = RtemsEventReqPerfOtherCpu_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsEventReqPerfOtherCpu_Cleanup( ctx );
+ #endif
+
+ ctx->request.name = "RtemsEventReqPerfOtherNotSatisfied";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsEventReqPerfOtherNotSatisfied_Body_Wrap;
+ ctx->request.teardown = RtemsEventReqPerfOtherNotSatisfied_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ ctx->request.name = "RtemsEventReqPerfOtherPreempt";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsEventReqPerfOtherPreempt_Body_Wrap;
+ ctx->request.teardown = RtemsEventReqPerfOtherPreempt_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-event-send-receive.c b/testsuites/validation/tc-event-send-receive.c
new file mode 100644
index 0000000000..54a527cbaa
--- /dev/null
+++ b/testsuites/validation/tc-event-send-receive.c
@@ -0,0 +1,202 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsEventValSendReceive
+ * @ingroup RtemsEventValSystemSendReceive
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/rtems/eventimpl.h>
+#include <rtems/rtems/tasksdata.h>
+#include <rtems/score/statesimpl.h>
+#include <rtems/score/threadimpl.h>
+
+#include "tr-event-send-receive.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsEventValSendReceive spec:/rtems/event/val/send-receive
+ *
+ * @ingroup TestsuitesValidation0
+ *
+ * @brief Tests the rtems_event_send() and rtems_event_receive() directives.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the event send and receive tests for the application event set defined
+ * by spec:/rtems/event/req/send-receive.
+ *
+ * @{
+ */
+
+static rtems_status_code EventSend(
+ rtems_id id,
+ rtems_event_set event_in
+)
+{
+ return rtems_event_send( id, event_in );
+}
+
+static rtems_status_code EventReceive(
+ rtems_id event_in,
+ rtems_option option_set,
+ rtems_interval ticks,
+ rtems_event_set *event_out
+)
+{
+ return rtems_event_receive( event_in, option_set, ticks, event_out );
+}
+
+static rtems_event_set GetPendingEvents( Thread_Control *thread )
+{
+ RTEMS_API_Control *api;
+
+ api = thread->API_Extensions[ THREAD_API_RTEMS ];
+ return api->Event.pending_events;
+}
+
+/**
+ * @brief Run the event send and receive tests for the application event set
+ * defined by spec:/rtems/event/req/send-receive.
+ */
+static void RtemsEventValSendReceive_Action_0( void )
+{
+ RtemsEventReqSendReceive_Run(
+ EventSend,
+ EventReceive,
+ GetPendingEvents,
+ THREAD_WAIT_CLASS_EVENT,
+ STATES_WAITING_FOR_EVENT
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsEventValSendReceive( void )
+ */
+T_TEST_CASE( RtemsEventValSendReceive )
+{
+ RtemsEventValSendReceive_Action_0();
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsEventValSystemSendReceive \
+ * spec:/rtems/event/val/system-send-receive
+ *
+ * @ingroup TestsuitesValidation0
+ *
+ * @brief Tests the rtems_event_system_send() and rtems_event_system_receive()
+ * directives.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the event send and receive tests for the system event set defined by
+ * spec:/rtems/event/req/send-receive.
+ *
+ * @{
+ */
+
+static rtems_status_code EventSystemSend(
+ rtems_id id,
+ rtems_event_set event_in
+)
+{
+ return rtems_event_system_send( id, event_in );
+}
+
+static rtems_status_code EventSystemReceive(
+ rtems_id event_in,
+ rtems_option option_set,
+ rtems_interval ticks,
+ rtems_event_set *event_out
+)
+{
+ return rtems_event_system_receive(
+ event_in,
+ option_set,
+ ticks,
+ event_out
+ );
+}
+
+static rtems_event_set GetPendingSystemEvents( Thread_Control *thread )
+{
+ RTEMS_API_Control *api;
+
+ api = thread->API_Extensions[ THREAD_API_RTEMS ];
+ return api->System_event.pending_events;
+}
+
+/**
+ * @brief Run the event send and receive tests for the system event set defined
+ * by spec:/rtems/event/req/send-receive.
+ */
+static void RtemsEventValSystemSendReceive_Action_0( void )
+{
+ RtemsEventReqSendReceive_Run(
+ EventSystemSend,
+ EventSystemReceive,
+ GetPendingSystemEvents,
+ THREAD_WAIT_CLASS_SYSTEM_EVENT,
+ STATES_WAITING_FOR_SYSTEM_EVENT
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsEventValSystemSendReceive( void )
+ */
+T_TEST_CASE( RtemsEventValSystemSendReceive )
+{
+ RtemsEventValSystemSendReceive_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-events.c b/testsuites/validation/tc-events.c
new file mode 100644
index 0000000000..e7d009fe8a
--- /dev/null
+++ b/testsuites/validation/tc-events.c
@@ -0,0 +1,197 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsEventValEvents
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tr-event-constant.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsEventValEvents spec:/rtems/event/val/events
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests the Event Manager API.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the event constant and number test for all 32 event constants.
+ *
+ * - Check that RTEMS_PENDING_EVENTS is a constant expression which evaluates
+ * to a value of zero.
+ *
+ * - Calculate the value of a bitwise or of all 32 event constants.
+ *
+ * - Check that the value is equal to RTEMS_ALL_EVENTS.
+ *
+ * - Validate the Event Manager directive options.
+ *
+ * - Check that RTEMS_EVENT_ALL is equal to zero.
+ *
+ * - Check that RTEMS_EVENT_ANY is a power of two.
+ *
+ * @{
+ */
+
+static const rtems_event_set events[] = {
+ RTEMS_EVENT_0,
+ RTEMS_EVENT_1,
+ RTEMS_EVENT_2,
+ RTEMS_EVENT_3,
+ RTEMS_EVENT_4,
+ RTEMS_EVENT_5,
+ RTEMS_EVENT_6,
+ RTEMS_EVENT_7,
+ RTEMS_EVENT_8,
+ RTEMS_EVENT_9,
+ RTEMS_EVENT_10,
+ RTEMS_EVENT_11,
+ RTEMS_EVENT_12,
+ RTEMS_EVENT_13,
+ RTEMS_EVENT_14,
+ RTEMS_EVENT_15,
+ RTEMS_EVENT_16,
+ RTEMS_EVENT_17,
+ RTEMS_EVENT_18,
+ RTEMS_EVENT_19,
+ RTEMS_EVENT_20,
+ RTEMS_EVENT_21,
+ RTEMS_EVENT_22,
+ RTEMS_EVENT_23,
+ RTEMS_EVENT_24,
+ RTEMS_EVENT_25,
+ RTEMS_EVENT_26,
+ RTEMS_EVENT_27,
+ RTEMS_EVENT_28,
+ RTEMS_EVENT_29,
+ RTEMS_EVENT_30,
+ RTEMS_EVENT_31
+};
+
+/**
+ * @brief Run the event constant and number test for all 32 event constants.
+ */
+static void RtemsEventValEvents_Action_0( void )
+{
+ unsigned int i;
+
+ for ( i = 0; i < 32; ++i ) {
+ RtemsEventValEventConstant_Run( events[ i ], i );
+ T_step( i ); /* Accounts for 32 test plan steps */
+ }
+}
+
+/**
+ * @brief Check that RTEMS_PENDING_EVENTS is a constant expression which
+ * evaluates to a value of zero.
+ */
+static void RtemsEventValEvents_Action_1( void )
+{
+ RTEMS_STATIC_ASSERT( RTEMS_PENDING_EVENTS == 0, PENDING_EVENTS );
+}
+
+/**
+ * @brief Calculate the value of a bitwise or of all 32 event constants.
+ */
+static void RtemsEventValEvents_Action_2( void )
+{
+ rtems_event_set all;
+ int i;
+
+ all = 0;
+
+ for ( i = 0; i < 32; ++i ) {
+ all |= events[ i ];
+ }
+
+ /*
+ * Check that the value is equal to RTEMS_ALL_EVENTS.
+ */
+ T_step_eq_u32( 32, all, RTEMS_ALL_EVENTS );
+}
+
+/**
+ * @brief Validate the Event Manager directive options.
+ */
+static void RtemsEventValEvents_Action_3( void )
+{
+ /* No action */
+
+ /*
+ * Check that RTEMS_EVENT_ALL is equal to zero.
+ */
+ T_step_eq_u32( 33, RTEMS_EVENT_ALL, 0 );
+
+ /*
+ * Check that RTEMS_EVENT_ANY is a power of two.
+ */
+ T_step_ne_u32( 34, RTEMS_EVENT_ANY, 0 );
+ T_step_eq_u32( 35, RTEMS_EVENT_ANY & ( RTEMS_EVENT_ANY - 1 ), 0 );
+}
+
+/**
+ * @fn void T_case_body_RtemsEventValEvents( void )
+ */
+T_TEST_CASE( RtemsEventValEvents )
+{
+ T_plan( 36 );
+
+ RtemsEventValEvents_Action_0();
+ RtemsEventValEvents_Action_1();
+ RtemsEventValEvents_Action_2();
+ RtemsEventValEvents_Action_3();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-flsl.c b/testsuites/validation/tc-flsl.c
new file mode 100644
index 0000000000..95f0ed9ccf
--- /dev/null
+++ b/testsuites/validation/tc-flsl.c
@@ -0,0 +1,275 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup CReqFlsl
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <limits.h>
+#include <strings.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup CReqFlsl spec:/c/req/flsl
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ CReqFlsl_Pre_Value_Zero,
+ CReqFlsl_Pre_Value_NonZero,
+ CReqFlsl_Pre_Value_NA
+} CReqFlsl_Pre_Value;
+
+typedef enum {
+ CReqFlsl_Post_Result_Zero,
+ CReqFlsl_Post_Result_LastBitSet,
+ CReqFlsl_Post_Result_NA
+} CReqFlsl_Post_Result;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Value_NA : 1;
+ uint8_t Post_Result : 2;
+} CReqFlsl_Entry;
+
+/**
+ * @brief Test context for spec:/c/req/flsl test case.
+ */
+typedef struct {
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ CReqFlsl_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} CReqFlsl_Context;
+
+static CReqFlsl_Context
+ CReqFlsl_Instance;
+
+static const char * const CReqFlsl_PreDesc_Value[] = {
+ "Zero",
+ "NonZero",
+ "NA"
+};
+
+static const char * const * const CReqFlsl_PreDesc[] = {
+ CReqFlsl_PreDesc_Value,
+ NULL
+};
+
+static void CReqFlsl_Pre_Value_Prepare(
+ CReqFlsl_Context *ctx,
+ CReqFlsl_Pre_Value state
+)
+{
+ switch ( state ) {
+ case CReqFlsl_Pre_Value_Zero: {
+ /*
+ * While the parameter value is equal to zero.
+ */
+ /* Nothing to prepare */
+ break;
+ }
+
+ case CReqFlsl_Pre_Value_NonZero: {
+ /*
+ * While the parameter value is not equal to zero.
+ */
+ /* Nothing to prepare */
+ break;
+ }
+
+ case CReqFlsl_Pre_Value_NA:
+ break;
+ }
+}
+
+static void CReqFlsl_Post_Result_Check(
+ CReqFlsl_Context *ctx,
+ CReqFlsl_Post_Result state
+)
+{
+ int expected_result;
+ long value;
+ size_t i;
+
+ switch ( state ) {
+ case CReqFlsl_Post_Result_Zero: {
+ /*
+ * The return value of flsl() shall be equal to zero.
+ */
+ T_eq_int( flsl( 0 ), 0 );
+ break;
+ }
+
+ case CReqFlsl_Post_Result_LastBitSet: {
+ /*
+ * The return value of flsl() shall be equal to the index of the
+ * most-significant bit set in the parameter value.
+ */
+ expected_result = 1;
+ value = 1;
+
+ for ( i = 0; i < sizeof( long ) * CHAR_BIT; ++i ) {
+ T_eq_int( flsl( value ), expected_result );
+ ++expected_result;
+ value <<= 1;
+ }
+ break;
+ }
+
+ case CReqFlsl_Post_Result_NA:
+ break;
+ }
+}
+
+static void CReqFlsl_Action( CReqFlsl_Context *ctx )
+{
+ /* The action is performed in the post-condition states */
+}
+
+static const CReqFlsl_Entry
+CReqFlsl_Entries[] = {
+ { 0, 0, CReqFlsl_Post_Result_Zero },
+ { 0, 0, CReqFlsl_Post_Result_LastBitSet }
+};
+
+static const uint8_t
+CReqFlsl_Map[] = {
+ 0, 1
+};
+
+static size_t CReqFlsl_Scope( void *arg, char *buf, size_t n )
+{
+ CReqFlsl_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( CReqFlsl_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture CReqFlsl_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = CReqFlsl_Scope,
+ .initial_context = &CReqFlsl_Instance
+};
+
+static inline CReqFlsl_Entry CReqFlsl_PopEntry( CReqFlsl_Context *ctx )
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return CReqFlsl_Entries[
+ CReqFlsl_Map[ index ]
+ ];
+}
+
+static void CReqFlsl_TestVariant( CReqFlsl_Context *ctx )
+{
+ CReqFlsl_Pre_Value_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ CReqFlsl_Action( ctx );
+ CReqFlsl_Post_Result_Check( ctx, ctx->Map.entry.Post_Result );
+}
+
+/**
+ * @fn void T_case_body_CReqFlsl( void )
+ */
+T_TEST_CASE_FIXTURE( CReqFlsl, &CReqFlsl_Fixture )
+{
+ CReqFlsl_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = CReqFlsl_Pre_Value_Zero;
+ ctx->Map.pcs[ 0 ] < CReqFlsl_Pre_Value_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = CReqFlsl_PopEntry( ctx );
+ CReqFlsl_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-futex-wait.c b/testsuites/validation/tc-futex-wait.c
new file mode 100644
index 0000000000..3730df2a40
--- /dev/null
+++ b/testsuites/validation/tc-futex-wait.c
@@ -0,0 +1,411 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup NewlibReqFutexWait
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <limits.h>
+#include <rtems.h>
+#include <sys/lock.h>
+
+#include "tr-tq-enqueue-fifo.h"
+#include "tx-thread-queue.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup NewlibReqFutexWait spec:/newlib/req/futex-wait
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ NewlibReqFutexWait_Pre_State_Equal,
+ NewlibReqFutexWait_Pre_State_NotEqual,
+ NewlibReqFutexWait_Pre_State_NA
+} NewlibReqFutexWait_Pre_State;
+
+typedef enum {
+ NewlibReqFutexWait_Post_Result_Zero,
+ NewlibReqFutexWait_Post_Result_EAGAIN,
+ NewlibReqFutexWait_Post_Result_NA
+} NewlibReqFutexWait_Post_Result;
+
+typedef enum {
+ NewlibReqFutexWait_Post_Enqueue_No,
+ NewlibReqFutexWait_Post_Enqueue_Yes,
+ NewlibReqFutexWait_Post_Enqueue_NA
+} NewlibReqFutexWait_Post_Enqueue;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_State_NA : 1;
+ uint8_t Post_Result : 2;
+ uint8_t Post_Enqueue : 2;
+} NewlibReqFutexWait_Entry;
+
+/**
+ * @brief Test context for spec:/newlib/req/futex-wait test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the thread queue test context.
+ */
+ TQContext tq_ctx;
+
+ /**
+ * @brief This member specifies the expected futex state value.
+ */
+ int expected_value;
+
+ /**
+ * @brief This member provides the futex object.
+ */
+ struct _Futex_Control futex;
+
+ /**
+ * @brief This member provides the futex state.
+ */
+ int state;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ NewlibReqFutexWait_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} NewlibReqFutexWait_Context;
+
+static NewlibReqFutexWait_Context
+ NewlibReqFutexWait_Instance;
+
+static const char * const NewlibReqFutexWait_PreDesc_State[] = {
+ "Equal",
+ "NotEqual",
+ "NA"
+};
+
+static const char * const * const NewlibReqFutexWait_PreDesc[] = {
+ NewlibReqFutexWait_PreDesc_State,
+ NULL
+};
+
+typedef NewlibReqFutexWait_Context Context;
+
+static Context *ToContext( TQContext *tq_ctx )
+{
+ return RTEMS_CONTAINER_OF( tq_ctx, Context, tq_ctx );
+}
+
+static Status_Control Enqueue( TQContext *tq_ctx, TQWait wait )
+{
+ Context *ctx;
+ int eno;
+
+ ctx = ToContext( tq_ctx );
+ eno = _Futex_Wait( &ctx->futex, &ctx->state, ctx->expected_value );
+ T_eq_int( eno, 0 );
+
+ return STATUS_BUILD( 0, eno );
+}
+
+static void EnqueueDone( TQContext *tq_ctx )
+{
+ Context *ctx;
+ int count;
+
+ ctx = ToContext( tq_ctx );
+ count = _Futex_Wake( &ctx->futex, INT_MAX );
+ T_eq_int( count, (int) ctx->tq_ctx.how_many );
+}
+
+static void NewlibReqFutexWait_Pre_State_Prepare(
+ NewlibReqFutexWait_Context *ctx,
+ NewlibReqFutexWait_Pre_State state
+)
+{
+ switch ( state ) {
+ case NewlibReqFutexWait_Pre_State_Equal: {
+ /*
+ * While the expected futex state value is equal to the actual futex
+ * state value.
+ */
+ ctx->expected_value = 0;
+ break;
+ }
+
+ case NewlibReqFutexWait_Pre_State_NotEqual: {
+ /*
+ * While the expected futex state value is not equal to the actual futex
+ * state value.
+ */
+ ctx->expected_value = 1;
+ break;
+ }
+
+ case NewlibReqFutexWait_Pre_State_NA:
+ break;
+ }
+}
+
+static void NewlibReqFutexWait_Post_Result_Check(
+ NewlibReqFutexWait_Context *ctx,
+ NewlibReqFutexWait_Post_Result state
+)
+{
+ int eno;
+
+ switch ( state ) {
+ case NewlibReqFutexWait_Post_Result_Zero: {
+ /*
+ * The return status of _Futex_Wait() shall be zero.
+ */
+ /* This result is checked by Enqueue() */
+ break;
+ }
+
+ case NewlibReqFutexWait_Post_Result_EAGAIN: {
+ /*
+ * The return status of _Futex_Wait() shall be EAGAIN.
+ */
+ eno = _Futex_Wait( &ctx->futex, &ctx->state, ctx->expected_value );
+ T_eq_int( eno, EAGAIN );
+ break;
+ }
+
+ case NewlibReqFutexWait_Post_Result_NA:
+ break;
+ }
+}
+
+static void NewlibReqFutexWait_Post_Enqueue_Check(
+ NewlibReqFutexWait_Context *ctx,
+ NewlibReqFutexWait_Post_Enqueue state
+)
+{
+ switch ( state ) {
+ case NewlibReqFutexWait_Post_Enqueue_No: {
+ /*
+ * The calling thread shall not be enqueued on the thread queue of the
+ * futex object.
+ */
+ /* The runner would block forever */
+ break;
+ }
+
+ case NewlibReqFutexWait_Post_Enqueue_Yes: {
+ /*
+ * The calling thread shall be enqueued in FIFO order on the thread queue
+ * of the futex object.
+ */
+ ScoreTqReqEnqueueFifo_Run( &ctx->tq_ctx );
+ break;
+ }
+
+ case NewlibReqFutexWait_Post_Enqueue_NA:
+ break;
+ }
+}
+
+static void NewlibReqFutexWait_Setup( NewlibReqFutexWait_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->tq_ctx.discipline = TQ_FIFO;
+ ctx->tq_ctx.wait = TQ_WAIT_FOREVER;
+ ctx->tq_ctx.enqueue_prepare = TQDoNothing;
+ ctx->tq_ctx.enqueue = Enqueue;
+ ctx->tq_ctx.enqueue_done = EnqueueDone;
+ ctx->tq_ctx.surrender = TQDoNothingSuccessfully;
+ ctx->tq_ctx.convert_status = TQConvertStatusPOSIX;
+ TQInitialize( &ctx->tq_ctx );
+}
+
+static void NewlibReqFutexWait_Setup_Wrap( void *arg )
+{
+ NewlibReqFutexWait_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ NewlibReqFutexWait_Setup( ctx );
+}
+
+static void NewlibReqFutexWait_Teardown( NewlibReqFutexWait_Context *ctx )
+{
+ TQDestroy( &ctx->tq_ctx );
+}
+
+static void NewlibReqFutexWait_Teardown_Wrap( void *arg )
+{
+ NewlibReqFutexWait_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ NewlibReqFutexWait_Teardown( ctx );
+}
+
+static void NewlibReqFutexWait_Prepare( NewlibReqFutexWait_Context *ctx )
+{
+ _Futex_Initialize( &ctx->futex );
+ ctx->state = 0;
+}
+
+static void NewlibReqFutexWait_Action( NewlibReqFutexWait_Context *ctx )
+{
+ /* The action is performed in the post-conditions. */
+}
+
+static void NewlibReqFutexWait_Cleanup( NewlibReqFutexWait_Context *ctx )
+{
+ _Futex_Destroy( &ctx->futex );
+}
+
+static const NewlibReqFutexWait_Entry
+NewlibReqFutexWait_Entries[] = {
+ { 0, 0, NewlibReqFutexWait_Post_Result_Zero,
+ NewlibReqFutexWait_Post_Enqueue_Yes },
+ { 0, 0, NewlibReqFutexWait_Post_Result_EAGAIN,
+ NewlibReqFutexWait_Post_Enqueue_No }
+};
+
+static const uint8_t
+NewlibReqFutexWait_Map[] = {
+ 0, 1
+};
+
+static size_t NewlibReqFutexWait_Scope( void *arg, char *buf, size_t n )
+{
+ NewlibReqFutexWait_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( NewlibReqFutexWait_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture NewlibReqFutexWait_Fixture = {
+ .setup = NewlibReqFutexWait_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NewlibReqFutexWait_Teardown_Wrap,
+ .scope = NewlibReqFutexWait_Scope,
+ .initial_context = &NewlibReqFutexWait_Instance
+};
+
+static inline NewlibReqFutexWait_Entry NewlibReqFutexWait_PopEntry(
+ NewlibReqFutexWait_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return NewlibReqFutexWait_Entries[
+ NewlibReqFutexWait_Map[ index ]
+ ];
+}
+
+static void NewlibReqFutexWait_TestVariant( NewlibReqFutexWait_Context *ctx )
+{
+ NewlibReqFutexWait_Pre_State_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ NewlibReqFutexWait_Action( ctx );
+ NewlibReqFutexWait_Post_Result_Check( ctx, ctx->Map.entry.Post_Result );
+ NewlibReqFutexWait_Post_Enqueue_Check( ctx, ctx->Map.entry.Post_Enqueue );
+}
+
+/**
+ * @fn void T_case_body_NewlibReqFutexWait( void )
+ */
+T_TEST_CASE_FIXTURE( NewlibReqFutexWait, &NewlibReqFutexWait_Fixture )
+{
+ NewlibReqFutexWait_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = NewlibReqFutexWait_Pre_State_Equal;
+ ctx->Map.pcs[ 0 ] < NewlibReqFutexWait_Pre_State_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = NewlibReqFutexWait_PopEntry( ctx );
+ NewlibReqFutexWait_Prepare( ctx );
+ NewlibReqFutexWait_TestVariant( ctx );
+ NewlibReqFutexWait_Cleanup( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-futex-wake.c b/testsuites/validation/tc-futex-wake.c
new file mode 100644
index 0000000000..baaa0daa6b
--- /dev/null
+++ b/testsuites/validation/tc-futex-wake.c
@@ -0,0 +1,409 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup NewlibReqFutexWake
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <limits.h>
+#include <rtems.h>
+#include <sys/lock.h>
+
+#include "tr-tq-flush-fifo.h"
+#include "tx-thread-queue.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup NewlibReqFutexWake spec:/newlib/req/futex-wake
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ NewlibReqFutexWake_Pre_Count_NegativeOrZero,
+ NewlibReqFutexWake_Pre_Count_Positive,
+ NewlibReqFutexWake_Pre_Count_NA
+} NewlibReqFutexWake_Pre_Count;
+
+typedef enum {
+ NewlibReqFutexWake_Post_Result_Count,
+ NewlibReqFutexWake_Post_Result_NA
+} NewlibReqFutexWake_Post_Result;
+
+typedef enum {
+ NewlibReqFutexWake_Post_Flush_No,
+ NewlibReqFutexWake_Post_Flush_Yes,
+ NewlibReqFutexWake_Post_Flush_NA
+} NewlibReqFutexWake_Post_Flush;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Count_NA : 1;
+ uint8_t Post_Result : 1;
+ uint8_t Post_Flush : 2;
+} NewlibReqFutexWake_Entry;
+
+/**
+ * @brief Test context for spec:/newlib/req/futex-wake test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the thread queue test context.
+ */
+ TQContext tq_ctx;
+
+ /**
+ * @brief This member provides the futex object.
+ */
+ struct _Futex_Control futex;
+
+ /**
+ * @brief This member provides the futex state.
+ */
+ int state;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ NewlibReqFutexWake_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} NewlibReqFutexWake_Context;
+
+static NewlibReqFutexWake_Context
+ NewlibReqFutexWake_Instance;
+
+static const char * const NewlibReqFutexWake_PreDesc_Count[] = {
+ "NegativeOrZero",
+ "Positive",
+ "NA"
+};
+
+static const char * const * const NewlibReqFutexWake_PreDesc[] = {
+ NewlibReqFutexWake_PreDesc_Count,
+ NULL
+};
+
+typedef NewlibReqFutexWake_Context Context;
+
+static Context *ToContext( TQContext *tq_ctx )
+{
+ return RTEMS_CONTAINER_OF( tq_ctx, Context, tq_ctx );
+}
+
+static Status_Control Enqueue( TQContext *tq_ctx, TQWait wait )
+{
+ Context *ctx;
+ int count;
+ int eno;
+
+ ctx = ToContext( tq_ctx );
+
+ count = _Futex_Wake( &ctx->futex, -1 );
+ T_eq_int( count, 0 );
+
+ count = _Futex_Wake( &ctx->futex, 0 );
+ T_eq_int( count, 0 );
+
+ eno = _Futex_Wait( &ctx->futex, &ctx->state, 0 );
+ T_eq_int( eno, 0 );
+
+ return STATUS_BUILD( 0, eno );
+}
+
+static uint32_t Flush( TQContext *tq_ctx, uint32_t thread_count, bool all )
+{
+ Context *ctx;
+ int count;
+
+ (void) thread_count;
+
+ ctx = ToContext( tq_ctx );
+
+ if ( all ) {
+ count = _Futex_Wake( &ctx->futex, INT_MAX );
+ } else {
+ count = _Futex_Wake( &ctx->futex, 1 );
+ }
+
+ return (uint32_t) count;
+}
+
+static void NewlibReqFutexWake_Pre_Count_Prepare(
+ NewlibReqFutexWake_Context *ctx,
+ NewlibReqFutexWake_Pre_Count state
+)
+{
+ switch ( state ) {
+ case NewlibReqFutexWake_Pre_Count_NegativeOrZero: {
+ /*
+ * While the ``count`` parameter is less or equal to than zero.
+ */
+ /* This state is prepared by Enqueue() */
+ break;
+ }
+
+ case NewlibReqFutexWake_Pre_Count_Positive: {
+ /*
+ * While the ``count`` parameter is greater than zero.
+ */
+ /* This state is prepared by Flush() */
+ break;
+ }
+
+ case NewlibReqFutexWake_Pre_Count_NA:
+ break;
+ }
+}
+
+static void NewlibReqFutexWake_Post_Result_Check(
+ NewlibReqFutexWake_Context *ctx,
+ NewlibReqFutexWake_Post_Result state
+)
+{
+ switch ( state ) {
+ case NewlibReqFutexWake_Post_Result_Count: {
+ /*
+ * The return status of _Futex_Wake() shall be the count of threads
+ * extracted from the thread queue of the futex object.
+ */
+ /* This result is checked by Flush() */
+ break;
+ }
+
+ case NewlibReqFutexWake_Post_Result_NA:
+ break;
+ }
+}
+
+static void NewlibReqFutexWake_Post_Flush_Check(
+ NewlibReqFutexWake_Context *ctx,
+ NewlibReqFutexWake_Post_Flush state
+)
+{
+ switch ( state ) {
+ case NewlibReqFutexWake_Post_Flush_No: {
+ /*
+ * No thread shall be extracted from the thread queue of the futex
+ * object.
+ */
+ /* This state is checked by Enqueue() */
+ break;
+ }
+
+ case NewlibReqFutexWake_Post_Flush_Yes: {
+ /*
+ * The first count threads specified by the ``count`` parameter shall be
+ * extracted from the thread queue of the futex object in FIFO order.
+ */
+ ScoreTqReqFlushFifo_Run( &ctx->tq_ctx, true );
+ break;
+ }
+
+ case NewlibReqFutexWake_Post_Flush_NA:
+ break;
+ }
+}
+
+static void NewlibReqFutexWake_Setup( NewlibReqFutexWake_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->tq_ctx.discipline = TQ_FIFO;
+ ctx->tq_ctx.wait = TQ_WAIT_FOREVER;
+ ctx->tq_ctx.enqueue_prepare = TQDoNothing;
+ ctx->tq_ctx.enqueue = Enqueue;
+ ctx->tq_ctx.enqueue_done = TQDoNothing;
+ ctx->tq_ctx.flush = Flush;
+ ctx->tq_ctx.surrender = TQDoNothingSuccessfully;
+ ctx->tq_ctx.convert_status = TQConvertStatusPOSIX;
+ TQInitialize( &ctx->tq_ctx );
+}
+
+static void NewlibReqFutexWake_Setup_Wrap( void *arg )
+{
+ NewlibReqFutexWake_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ NewlibReqFutexWake_Setup( ctx );
+}
+
+static void NewlibReqFutexWake_Teardown( NewlibReqFutexWake_Context *ctx )
+{
+ TQDestroy( &ctx->tq_ctx );
+}
+
+static void NewlibReqFutexWake_Teardown_Wrap( void *arg )
+{
+ NewlibReqFutexWake_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ NewlibReqFutexWake_Teardown( ctx );
+}
+
+static void NewlibReqFutexWake_Prepare( NewlibReqFutexWake_Context *ctx )
+{
+ _Futex_Initialize( &ctx->futex );
+}
+
+static void NewlibReqFutexWake_Action( NewlibReqFutexWake_Context *ctx )
+{
+ /* The action is performed in the ``Flush`` post-condition ``All`` state. */
+}
+
+static void NewlibReqFutexWake_Cleanup( NewlibReqFutexWake_Context *ctx )
+{
+ _Futex_Destroy( &ctx->futex );
+}
+
+static const NewlibReqFutexWake_Entry
+NewlibReqFutexWake_Entries[] = {
+ { 0, 0, NewlibReqFutexWake_Post_Result_Count,
+ NewlibReqFutexWake_Post_Flush_No },
+ { 0, 0, NewlibReqFutexWake_Post_Result_Count,
+ NewlibReqFutexWake_Post_Flush_Yes }
+};
+
+static const uint8_t
+NewlibReqFutexWake_Map[] = {
+ 0, 1
+};
+
+static size_t NewlibReqFutexWake_Scope( void *arg, char *buf, size_t n )
+{
+ NewlibReqFutexWake_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( NewlibReqFutexWake_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture NewlibReqFutexWake_Fixture = {
+ .setup = NewlibReqFutexWake_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NewlibReqFutexWake_Teardown_Wrap,
+ .scope = NewlibReqFutexWake_Scope,
+ .initial_context = &NewlibReqFutexWake_Instance
+};
+
+static inline NewlibReqFutexWake_Entry NewlibReqFutexWake_PopEntry(
+ NewlibReqFutexWake_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return NewlibReqFutexWake_Entries[
+ NewlibReqFutexWake_Map[ index ]
+ ];
+}
+
+static void NewlibReqFutexWake_TestVariant( NewlibReqFutexWake_Context *ctx )
+{
+ NewlibReqFutexWake_Pre_Count_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ NewlibReqFutexWake_Action( ctx );
+ NewlibReqFutexWake_Post_Result_Check( ctx, ctx->Map.entry.Post_Result );
+ NewlibReqFutexWake_Post_Flush_Check( ctx, ctx->Map.entry.Post_Flush );
+}
+
+/**
+ * @fn void T_case_body_NewlibReqFutexWake( void )
+ */
+T_TEST_CASE_FIXTURE( NewlibReqFutexWake, &NewlibReqFutexWake_Fixture )
+{
+ NewlibReqFutexWake_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = NewlibReqFutexWake_Pre_Count_NegativeOrZero;
+ ctx->Map.pcs[ 0 ] < NewlibReqFutexWake_Pre_Count_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = NewlibReqFutexWake_PopEntry( ctx );
+ NewlibReqFutexWake_Prepare( ctx );
+ NewlibReqFutexWake_TestVariant( ctx );
+ NewlibReqFutexWake_Cleanup( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-intr-clear.c b/testsuites/validation/tc-intr-clear.c
index 8c4e1e1deb..b131b738fd 100644
--- a/testsuites/validation/tc-intr-clear.c
+++ b/testsuites/validation/tc-intr-clear.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsIntrReqClear
+ * @ingroup RtemsIntrReqClear
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,9 +61,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsIntrReqClear spec:/rtems/intr/req/clear
+ * @defgroup RtemsIntrReqClear spec:/rtems/intr/req/clear
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationIntr
*
* @{
*/
@@ -134,6 +134,12 @@ typedef struct {
struct {
/**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 2 ];
+
+ /**
* @brief This member defines the pre-condition states for the next action.
*/
size_t pcs[ 2 ];
@@ -560,13 +566,23 @@ static inline RtemsIntrReqClear_Entry RtemsIntrReqClear_PopEntry(
];
}
+static void RtemsIntrReqClear_SetPreConditionStates(
+ RtemsIntrReqClear_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_CanClear_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsIntrReqClear_Pre_CanClear_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+}
+
static void RtemsIntrReqClear_TestVariant( RtemsIntrReqClear_Context *ctx )
{
RtemsIntrReqClear_Pre_Vector_Prepare( ctx, ctx->Map.pcs[ 0 ] );
- RtemsIntrReqClear_Pre_CanClear_Prepare(
- ctx,
- ctx->Map.entry.Pre_CanClear_NA ? RtemsIntrReqClear_Pre_CanClear_NA : ctx->Map.pcs[ 1 ]
- );
+ RtemsIntrReqClear_Pre_CanClear_Prepare( ctx, ctx->Map.pcs[ 1 ] );
RtemsIntrReqClear_Action( ctx );
RtemsIntrReqClear_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
RtemsIntrReqClear_Post_Cleared_Check( ctx, ctx->Map.entry.Post_Cleared );
@@ -584,16 +600,17 @@ T_TEST_CASE_FIXTURE( RtemsIntrReqClear, &RtemsIntrReqClear_Fixture )
ctx->Map.index = 0;
for (
- ctx->Map.pcs[ 0 ] = RtemsIntrReqClear_Pre_Vector_Valid;
- ctx->Map.pcs[ 0 ] < RtemsIntrReqClear_Pre_Vector_NA;
- ++ctx->Map.pcs[ 0 ]
+ ctx->Map.pci[ 0 ] = RtemsIntrReqClear_Pre_Vector_Valid;
+ ctx->Map.pci[ 0 ] < RtemsIntrReqClear_Pre_Vector_NA;
+ ++ctx->Map.pci[ 0 ]
) {
for (
- ctx->Map.pcs[ 1 ] = RtemsIntrReqClear_Pre_CanClear_Yes;
- ctx->Map.pcs[ 1 ] < RtemsIntrReqClear_Pre_CanClear_NA;
- ++ctx->Map.pcs[ 1 ]
+ ctx->Map.pci[ 1 ] = RtemsIntrReqClear_Pre_CanClear_Yes;
+ ctx->Map.pci[ 1 ] < RtemsIntrReqClear_Pre_CanClear_NA;
+ ++ctx->Map.pci[ 1 ]
) {
ctx->Map.entry = RtemsIntrReqClear_PopEntry( ctx );
+ RtemsIntrReqClear_SetPreConditionStates( ctx );
RtemsIntrReqClear_TestVariant( ctx );
}
}
diff --git a/testsuites/validation/tc-intr-entry-install.c b/testsuites/validation/tc-intr-entry-install.c
index 37583249aa..58c7989dbe 100644
--- a/testsuites/validation/tc-intr-entry-install.c
+++ b/testsuites/validation/tc-intr-entry-install.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsIntrReqEntryInstall
+ * @ingroup RtemsIntrReqEntryInstall
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -60,10 +60,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsIntrReqEntryInstall \
- * spec:/rtems/intr/req/entry-install
+ * @defgroup RtemsIntrReqEntryInstall spec:/rtems/intr/req/entry-install
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationIntr
*
* @{
*/
@@ -174,9 +173,14 @@ typedef struct {
bool initialized_during_setup;
/**
- * @brief If this member is true, then an interrupt occurred.
+ * @brief This member provides a counter for handler invocations.
*/
- bool interrupt_occurred;
+ uint32_t handler_counter;
+
+ /**
+ * @brief This member provides a counter snapshot for each entry.
+ */
+ uint32_t counter_by_entry[ 3 ];
/**
* @brief This member provides the vector number of a testable interrupt
@@ -185,6 +189,12 @@ typedef struct {
rtems_vector_number test_vector;
/**
+ * @brief If this member is true, then the testable interrupt vector was
+ * enabled at the test case begin.
+ */
+ bool test_vector_was_enabled;
+
+ /**
* @brief This member provides the attributes of the testable interrupt
* vector.
*/
@@ -262,7 +272,7 @@ typedef struct {
/**
* @brief This member specifies if the ``entry`` parameter value.
*/
- rtems_interrupt_entry *entry;;
+ rtems_interrupt_entry *entry;
/**
* @brief This member contains the return value of the
@@ -272,6 +282,12 @@ typedef struct {
struct {
/**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 8 ];
+
+ /**
* @brief This member defines the pre-condition states for the next action.
*/
size_t pcs[ 8 ];
@@ -409,29 +425,63 @@ static void Install(
ctx->other_installed = true;
}
-static void OtherRoutine( void *arg )
+static void Routine( Context *ctx, uint32_t counter )
{
- Context *ctx;
rtems_status_code sc;
- (void) arg;
- ctx = T_fixture_context();
- sc = rtems_interrupt_vector_disable( ctx->test_vector );
- T_rsc_success( sc );
+ ctx->handler_counter = counter;
+
+ if ( !ctx->attributes.cleared_by_acknowledge ) {
+ sc = ClearSoftwareInterrupt( ctx->test_vector );
+ T_rsc_success( sc );
+ }
- ctx->interrupt_occurred = true;
+ if ( counter > 3 ) {
+ sc = rtems_interrupt_vector_disable( ctx->test_vector );
+ T_rsc_success( sc );
+ }
}
static void EntryRoutine( void *arg )
{
- T_eq_ptr( arg, &entry_arg );
- OtherRoutine( NULL );
+ Context *ctx;
+ uint32_t counter;
+
+ ctx = T_fixture_context();
+ counter = ctx->handler_counter + 1;
+
+ if ( arg == &other_arg ) {
+ ctx->counter_by_entry[ 1 ] = counter;
+ } else {
+ ctx->counter_by_entry[ 0 ] = counter;
+ T_eq_ptr( arg, &entry_arg );
+ }
+
+ Routine( ctx, counter );
+}
+
+static void OtherRoutine( void *arg )
+{
+ Context *ctx;
+ uint32_t counter;
+
+ (void) arg;
+ ctx = T_fixture_context();
+ counter = ctx->handler_counter + 1;
+ ctx->counter_by_entry[ 1 ] = counter;
+ Routine( ctx, counter );
}
static void ThirdRoutine( void *arg )
{
+ Context *ctx;
+ uint32_t counter;
+
+ ctx = T_fixture_context();
+ counter = ctx->handler_counter + 1;
+ ctx->counter_by_entry[ 2 ] = counter;
T_eq_ptr( arg, &third_arg );
- OtherRoutine( NULL );
+ Routine( ctx, counter );
}
static void InstallThird( Context *ctx )
@@ -469,7 +519,7 @@ static void Action( void *arg )
T_rsc_success( sc );
bsp_interrupt_set_handler_unique(
- BSP_INTERRUPT_HANDLER_TABLE_SIZE,
+ BSP_INTERRUPT_DISPATCH_TABLE_SIZE,
ctx->initialized
);
@@ -480,7 +530,7 @@ static void Action( void *arg )
);
bsp_interrupt_set_handler_unique(
- BSP_INTERRUPT_HANDLER_TABLE_SIZE,
+ BSP_INTERRUPT_DISPATCH_TABLE_SIZE,
ctx->initialized_during_setup
);
@@ -489,6 +539,11 @@ static void Action( void *arg )
&ctx->enabled_after
);
T_rsc_success( sc );
+
+ if ( ctx->status == RTEMS_SUCCESSFUL ) {
+ sc = RaiseSoftwareInterrupt( ctx->test_vector );
+ T_rsc_success( sc );
+ }
}
static void VisitInstalled(
@@ -940,7 +995,7 @@ static void RtemsIntrReqEntryInstall_Post_Enable_Check(
* The enabled status of the interrupt vector specified by ``vector``
* shall not be modified by the rtems_interrupt_entry_install() call.
*/
- if ( !ctx->interrupt_occurred ) {
+ if ( ctx->handler_counter == 0 ) {
T_eq( ctx->enabled_before, ctx->enabled_after );
}
break;
@@ -950,9 +1005,7 @@ static void RtemsIntrReqEntryInstall_Post_Enable_Check(
/*
* The interrupt vector specified by ``vector`` shall be enabled.
*/
- if ( ctx->attributes.can_enable ) {
- T_true( ctx->enabled_after || ctx->interrupt_occurred );
- }
+ T_true( ctx->enabled_after || ctx->handler_counter > 3 );
break;
}
@@ -960,10 +1013,13 @@ static void RtemsIntrReqEntryInstall_Post_Enable_Check(
/*
* The interrupt vector specified by ``vector`` may be enabled.
*/
- /* The comment of pre-condition ``CanEnable`` for the ``Yes`` state. */
- if ( ctx->attributes.can_enable ) {
- T_true( ctx->enabled_after || ctx->interrupt_occurred );
- }
+ /*
+ * Interrupt vectors which cannot be enabled are not selected as a
+ * testable interrupt vector by GetTestableInterruptVector(), so this
+ * path is not validated by this test. See also comment for
+ * ``CanEnable`` pre-condition state ``Yes``.
+ */
+ T_true( ctx->enabled_after || ctx->handler_counter > 3 );
break;
}
@@ -973,8 +1029,11 @@ static void RtemsIntrReqEntryInstall_Post_Enable_Check(
*/
/*
* Interrupt vectors which cannot be enabled are not selected as a
- * testable interrupt vector by GetTestableInterruptVector().
+ * testable interrupt vector by GetTestableInterruptVector(), so this
+ * path is not validated by this test. See also comment for
+ * ``CanEnable`` pre-condition state ``Yes``.
*/
+ T_true( ctx->enabled_after || ctx->handler_counter > 3 );
break;
}
@@ -998,6 +1057,24 @@ static void RtemsIntrReqEntryInstall_Post_Installed_Check(
);
T_rsc_success( sc );
+ if ( ctx->status == RTEMS_SUCCESSFUL ) {
+ uint32_t counter;
+
+ counter = 1;
+
+ if ( ctx->other_installed ) {
+ T_eq_u32( ctx->counter_by_entry[ 1 ], counter );
+ ++counter;
+ }
+
+ if ( ctx->third_installed ) {
+ T_eq_u32( ctx->counter_by_entry[ 2 ], counter );
+ ++counter;
+ }
+
+ T_eq_u32( ctx->counter_by_entry[ 0 ], counter );
+ }
+
switch ( state ) {
case RtemsIntrReqEntryInstall_Post_Installed_No: {
/*
@@ -1038,10 +1115,18 @@ static void RtemsIntrReqEntryInstall_Setup(
RtemsIntrReqEntryInstall_Context *ctx
)
{
+ rtems_interrupt_attributes required = {
+ .can_raise = true
+ };
rtems_status_code sc;
ctx->initialized_during_setup = bsp_interrupt_is_initialized();
- ctx->test_vector = GetTestableInterruptVector();
+ ctx->test_vector = GetTestableInterruptVector( &required );
+ ctx->test_vector_was_enabled = false;
+ (void) rtems_interrupt_vector_is_enabled(
+ ctx->test_vector,
+ &ctx->test_vector_was_enabled
+ );
sc = rtems_interrupt_get_attributes( ctx->test_vector, &ctx->attributes );
T_rsc_success( sc );
}
@@ -1055,11 +1140,35 @@ static void RtemsIntrReqEntryInstall_Setup_Wrap( void *arg )
RtemsIntrReqEntryInstall_Setup( ctx );
}
+static void RtemsIntrReqEntryInstall_Teardown(
+ RtemsIntrReqEntryInstall_Context *ctx
+)
+{
+ if ( ctx->test_vector_was_enabled ) {
+ (void) rtems_interrupt_vector_enable( ctx->test_vector );
+ }
+}
+
+static void RtemsIntrReqEntryInstall_Teardown_Wrap( void *arg )
+{
+ RtemsIntrReqEntryInstall_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsIntrReqEntryInstall_Teardown( ctx );
+}
+
static void RtemsIntrReqEntryInstall_Prepare(
RtemsIntrReqEntryInstall_Context *ctx
)
{
- ctx->interrupt_occurred = false;
+ size_t i;
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( ctx->counter_by_entry ); ++i ) {
+ ctx->counter_by_entry[ i ] = 0;
+ }
+
+ ctx->handler_counter = 0;
ctx->other_installed = false;
ctx->third_installed = false;
}
@@ -1236,7 +1345,7 @@ static size_t RtemsIntrReqEntryInstall_Scope( void *arg, char *buf, size_t n )
static T_fixture RtemsIntrReqEntryInstall_Fixture = {
.setup = RtemsIntrReqEntryInstall_Setup_Wrap,
.stop = NULL,
- .teardown = NULL,
+ .teardown = RtemsIntrReqEntryInstall_Teardown_Wrap,
.scope = RtemsIntrReqEntryInstall_Scope,
.initial_context = &RtemsIntrReqEntryInstall_Instance
};
@@ -1254,6 +1363,36 @@ static inline RtemsIntrReqEntryInstall_Entry RtemsIntrReqEntryInstall_PopEntry(
];
}
+static void RtemsIntrReqEntryInstall_SetPreConditionStates(
+ RtemsIntrReqEntryInstall_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+
+ if ( ctx->Map.entry.Pre_Routine_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsIntrReqEntryInstall_Pre_Routine_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+ ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
+
+ if ( ctx->Map.entry.Pre_CanEnable_NA ) {
+ ctx->Map.pcs[ 6 ] = RtemsIntrReqEntryInstall_Pre_CanEnable_NA;
+ } else {
+ ctx->Map.pcs[ 6 ] = ctx->Map.pci[ 6 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Installed_NA ) {
+ ctx->Map.pcs[ 7 ] = RtemsIntrReqEntryInstall_Pre_Installed_NA;
+ } else {
+ ctx->Map.pcs[ 7 ] = ctx->Map.pci[ 7 ];
+ }
+}
+
static void RtemsIntrReqEntryInstall_TestVariant(
RtemsIntrReqEntryInstall_Context *ctx
)
@@ -1261,20 +1400,11 @@ static void RtemsIntrReqEntryInstall_TestVariant(
RtemsIntrReqEntryInstall_Pre_Vector_Prepare( ctx, ctx->Map.pcs[ 0 ] );
RtemsIntrReqEntryInstall_Pre_Options_Prepare( ctx, ctx->Map.pcs[ 1 ] );
RtemsIntrReqEntryInstall_Pre_Entry_Prepare( ctx, ctx->Map.pcs[ 2 ] );
- RtemsIntrReqEntryInstall_Pre_Routine_Prepare(
- ctx,
- ctx->Map.entry.Pre_Routine_NA ? RtemsIntrReqEntryInstall_Pre_Routine_NA : ctx->Map.pcs[ 3 ]
- );
+ RtemsIntrReqEntryInstall_Pre_Routine_Prepare( ctx, ctx->Map.pcs[ 3 ] );
RtemsIntrReqEntryInstall_Pre_Init_Prepare( ctx, ctx->Map.pcs[ 4 ] );
RtemsIntrReqEntryInstall_Pre_ISR_Prepare( ctx, ctx->Map.pcs[ 5 ] );
- RtemsIntrReqEntryInstall_Pre_CanEnable_Prepare(
- ctx,
- ctx->Map.entry.Pre_CanEnable_NA ? RtemsIntrReqEntryInstall_Pre_CanEnable_NA : ctx->Map.pcs[ 6 ]
- );
- RtemsIntrReqEntryInstall_Pre_Installed_Prepare(
- ctx,
- ctx->Map.entry.Pre_Installed_NA ? RtemsIntrReqEntryInstall_Pre_Installed_NA : ctx->Map.pcs[ 7 ]
- );
+ RtemsIntrReqEntryInstall_Pre_CanEnable_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsIntrReqEntryInstall_Pre_Installed_Prepare( ctx, ctx->Map.pcs[ 7 ] );
RtemsIntrReqEntryInstall_Action( ctx );
RtemsIntrReqEntryInstall_Post_Status_Check(
ctx,
@@ -1305,46 +1435,47 @@ T_TEST_CASE_FIXTURE(
ctx->Map.index = 0;
for (
- ctx->Map.pcs[ 0 ] = RtemsIntrReqEntryInstall_Pre_Vector_Valid;
- ctx->Map.pcs[ 0 ] < RtemsIntrReqEntryInstall_Pre_Vector_NA;
- ++ctx->Map.pcs[ 0 ]
+ ctx->Map.pci[ 0 ] = RtemsIntrReqEntryInstall_Pre_Vector_Valid;
+ ctx->Map.pci[ 0 ] < RtemsIntrReqEntryInstall_Pre_Vector_NA;
+ ++ctx->Map.pci[ 0 ]
) {
for (
- ctx->Map.pcs[ 1 ] = RtemsIntrReqEntryInstall_Pre_Options_Unique;
- ctx->Map.pcs[ 1 ] < RtemsIntrReqEntryInstall_Pre_Options_NA;
- ++ctx->Map.pcs[ 1 ]
+ ctx->Map.pci[ 1 ] = RtemsIntrReqEntryInstall_Pre_Options_Unique;
+ ctx->Map.pci[ 1 ] < RtemsIntrReqEntryInstall_Pre_Options_NA;
+ ++ctx->Map.pci[ 1 ]
) {
for (
- ctx->Map.pcs[ 2 ] = RtemsIntrReqEntryInstall_Pre_Entry_Obj;
- ctx->Map.pcs[ 2 ] < RtemsIntrReqEntryInstall_Pre_Entry_NA;
- ++ctx->Map.pcs[ 2 ]
+ ctx->Map.pci[ 2 ] = RtemsIntrReqEntryInstall_Pre_Entry_Obj;
+ ctx->Map.pci[ 2 ] < RtemsIntrReqEntryInstall_Pre_Entry_NA;
+ ++ctx->Map.pci[ 2 ]
) {
for (
- ctx->Map.pcs[ 3 ] = RtemsIntrReqEntryInstall_Pre_Routine_Valid;
- ctx->Map.pcs[ 3 ] < RtemsIntrReqEntryInstall_Pre_Routine_NA;
- ++ctx->Map.pcs[ 3 ]
+ ctx->Map.pci[ 3 ] = RtemsIntrReqEntryInstall_Pre_Routine_Valid;
+ ctx->Map.pci[ 3 ] < RtemsIntrReqEntryInstall_Pre_Routine_NA;
+ ++ctx->Map.pci[ 3 ]
) {
for (
- ctx->Map.pcs[ 4 ] = RtemsIntrReqEntryInstall_Pre_Init_Yes;
- ctx->Map.pcs[ 4 ] < RtemsIntrReqEntryInstall_Pre_Init_NA;
- ++ctx->Map.pcs[ 4 ]
+ ctx->Map.pci[ 4 ] = RtemsIntrReqEntryInstall_Pre_Init_Yes;
+ ctx->Map.pci[ 4 ] < RtemsIntrReqEntryInstall_Pre_Init_NA;
+ ++ctx->Map.pci[ 4 ]
) {
for (
- ctx->Map.pcs[ 5 ] = RtemsIntrReqEntryInstall_Pre_ISR_Yes;
- ctx->Map.pcs[ 5 ] < RtemsIntrReqEntryInstall_Pre_ISR_NA;
- ++ctx->Map.pcs[ 5 ]
+ ctx->Map.pci[ 5 ] = RtemsIntrReqEntryInstall_Pre_ISR_Yes;
+ ctx->Map.pci[ 5 ] < RtemsIntrReqEntryInstall_Pre_ISR_NA;
+ ++ctx->Map.pci[ 5 ]
) {
for (
- ctx->Map.pcs[ 6 ] = RtemsIntrReqEntryInstall_Pre_CanEnable_Yes;
- ctx->Map.pcs[ 6 ] < RtemsIntrReqEntryInstall_Pre_CanEnable_NA;
- ++ctx->Map.pcs[ 6 ]
+ ctx->Map.pci[ 6 ] = RtemsIntrReqEntryInstall_Pre_CanEnable_Yes;
+ ctx->Map.pci[ 6 ] < RtemsIntrReqEntryInstall_Pre_CanEnable_NA;
+ ++ctx->Map.pci[ 6 ]
) {
for (
- ctx->Map.pcs[ 7 ] = RtemsIntrReqEntryInstall_Pre_Installed_None;
- ctx->Map.pcs[ 7 ] < RtemsIntrReqEntryInstall_Pre_Installed_NA;
- ++ctx->Map.pcs[ 7 ]
+ ctx->Map.pci[ 7 ] = RtemsIntrReqEntryInstall_Pre_Installed_None;
+ ctx->Map.pci[ 7 ] < RtemsIntrReqEntryInstall_Pre_Installed_NA;
+ ++ctx->Map.pci[ 7 ]
) {
ctx->Map.entry = RtemsIntrReqEntryInstall_PopEntry( ctx );
+ RtemsIntrReqEntryInstall_SetPreConditionStates( ctx );
RtemsIntrReqEntryInstall_Prepare( ctx );
RtemsIntrReqEntryInstall_TestVariant( ctx );
RtemsIntrReqEntryInstall_Cleanup( ctx );
diff --git a/testsuites/validation/tc-intr-entry-remove.c b/testsuites/validation/tc-intr-entry-remove.c
index 65cbbb28d3..01a72410e1 100644
--- a/testsuites/validation/tc-intr-entry-remove.c
+++ b/testsuites/validation/tc-intr-entry-remove.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsIntrReqEntryRemove
+ * @ingroup RtemsIntrReqEntryRemove
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -60,10 +60,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsIntrReqEntryRemove \
- * spec:/rtems/intr/req/entry-remove
+ * @defgroup RtemsIntrReqEntryRemove spec:/rtems/intr/req/entry-remove
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationIntr
*
* @{
*/
@@ -182,7 +181,7 @@ typedef struct {
/**
* @brief This member provides a counter incremented by EntryRoutine().
*/
- uint32_t entry_counter;;
+ uint32_t entry_counter;
/**
* @brief This member provides another rtems_interrupt_entry object.
@@ -234,6 +233,12 @@ typedef struct {
rtems_vector_number test_vector;
/**
+ * @brief If this member is true, then the testable interrupt vector was
+ * enabled at the test case begin.
+ */
+ bool test_vector_was_enabled;
+
+ /**
* @brief This member provides the attributes of the testable interrupt
* vector.
*/
@@ -280,7 +285,7 @@ typedef struct {
/**
* @brief This member specifies if the ``entry`` parameter value.
*/
- rtems_interrupt_entry *entry;;
+ rtems_interrupt_entry *entry;
/**
* @brief This member contains the return value of the
@@ -290,6 +295,12 @@ typedef struct {
struct {
/**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 9 ];
+
+ /**
* @brief This member defines the pre-condition states for the next action.
*/
size_t pcs[ 9 ];
@@ -467,14 +478,14 @@ static void Action( void *arg )
T_rsc_success( sc );
bsp_interrupt_set_handler_unique(
- BSP_INTERRUPT_HANDLER_TABLE_SIZE,
+ BSP_INTERRUPT_DISPATCH_TABLE_SIZE,
ctx->initialized
);
ctx->status = rtems_interrupt_entry_remove( ctx->vector, ctx->entry );
bsp_interrupt_set_handler_unique(
- BSP_INTERRUPT_HANDLER_TABLE_SIZE,
+ BSP_INTERRUPT_DISPATCH_TABLE_SIZE,
ctx->initialized_during_setup
);
@@ -1023,13 +1034,13 @@ static void RtemsIntrReqEntryRemove_Post_Installed_Check(
if ( expected_entries > 0 ) {
ctx->entry_counter = 0;
- bsp_interrupt_handler_dispatch( ctx->test_vector );
+ bsp_interrupt_handler_dispatch_unchecked( ctx->test_vector );
T_eq_u32( ctx->entry_counter, 0 );
} else {
rtems_interrupt_entry *first;
- first = bsp_interrupt_handler_table[
- bsp_interrupt_handler_index( ctx->test_vector )
+ first = bsp_interrupt_dispatch_table[
+ bsp_interrupt_dispatch_index( ctx->test_vector )
];
T_null( first );
}
@@ -1063,7 +1074,7 @@ static void RtemsIntrReqEntryRemove_Post_Installed_Check(
if ( ctx->installed ) {
ctx->entry_counter = 0;
- bsp_interrupt_handler_dispatch( ctx->test_vector );
+ bsp_interrupt_handler_dispatch_unchecked( ctx->test_vector );
T_eq_u32( ctx->entry_counter, 1 );
}
break;
@@ -1081,7 +1092,12 @@ static void RtemsIntrReqEntryRemove_Setup(
rtems_status_code sc;
ctx->initialized_during_setup = bsp_interrupt_is_initialized();
- ctx->test_vector = GetTestableInterruptVector();
+ ctx->test_vector = GetTestableInterruptVector( NULL );
+ ctx->test_vector_was_enabled = false;
+ (void) rtems_interrupt_vector_is_enabled(
+ ctx->test_vector,
+ &ctx->test_vector_was_enabled
+ );
sc = rtems_interrupt_get_attributes( ctx->test_vector, &ctx->attributes );
T_rsc_success( sc );
}
@@ -1095,6 +1111,24 @@ static void RtemsIntrReqEntryRemove_Setup_Wrap( void *arg )
RtemsIntrReqEntryRemove_Setup( ctx );
}
+static void RtemsIntrReqEntryRemove_Teardown(
+ RtemsIntrReqEntryRemove_Context *ctx
+)
+{
+ if ( ctx->test_vector_was_enabled ) {
+ (void) rtems_interrupt_vector_enable( ctx->test_vector );
+ }
+}
+
+static void RtemsIntrReqEntryRemove_Teardown_Wrap( void *arg )
+{
+ RtemsIntrReqEntryRemove_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsIntrReqEntryRemove_Teardown( ctx );
+}
+
static void RtemsIntrReqEntryRemove_Prepare(
RtemsIntrReqEntryRemove_Context *ctx
)
@@ -1286,7 +1320,7 @@ static size_t RtemsIntrReqEntryRemove_Scope( void *arg, char *buf, size_t n )
static T_fixture RtemsIntrReqEntryRemove_Fixture = {
.setup = RtemsIntrReqEntryRemove_Setup_Wrap,
.stop = NULL,
- .teardown = NULL,
+ .teardown = RtemsIntrReqEntryRemove_Teardown_Wrap,
.scope = RtemsIntrReqEntryRemove_Scope,
.initial_context = &RtemsIntrReqEntryRemove_Instance
};
@@ -1304,34 +1338,60 @@ static inline RtemsIntrReqEntryRemove_Entry RtemsIntrReqEntryRemove_PopEntry(
];
}
+static void RtemsIntrReqEntryRemove_SetPreConditionStates(
+ RtemsIntrReqEntryRemove_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+
+ if ( ctx->Map.entry.Pre_Routine_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsIntrReqEntryRemove_Pre_Routine_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+
+ if ( ctx->Map.entry.Pre_EntryObj_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsIntrReqEntryRemove_Pre_EntryObj_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+ ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
+
+ if ( ctx->Map.entry.Pre_CanDisable_NA ) {
+ ctx->Map.pcs[ 6 ] = RtemsIntrReqEntryRemove_Pre_CanDisable_NA;
+ } else {
+ ctx->Map.pcs[ 6 ] = ctx->Map.pci[ 6 ];
+ }
+
+ if ( ctx->Map.entry.Pre_First_NA ) {
+ ctx->Map.pcs[ 7 ] = RtemsIntrReqEntryRemove_Pre_First_NA;
+ } else {
+ ctx->Map.pcs[ 7 ] = ctx->Map.pci[ 7 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Last_NA ) {
+ ctx->Map.pcs[ 8 ] = RtemsIntrReqEntryRemove_Pre_Last_NA;
+ } else {
+ ctx->Map.pcs[ 8 ] = ctx->Map.pci[ 8 ];
+ }
+}
+
static void RtemsIntrReqEntryRemove_TestVariant(
RtemsIntrReqEntryRemove_Context *ctx
)
{
RtemsIntrReqEntryRemove_Pre_Vector_Prepare( ctx, ctx->Map.pcs[ 0 ] );
RtemsIntrReqEntryRemove_Pre_Entry_Prepare( ctx, ctx->Map.pcs[ 1 ] );
- RtemsIntrReqEntryRemove_Pre_Routine_Prepare(
- ctx,
- ctx->Map.entry.Pre_Routine_NA ? RtemsIntrReqEntryRemove_Pre_Routine_NA : ctx->Map.pcs[ 2 ]
- );
- RtemsIntrReqEntryRemove_Pre_EntryObj_Prepare(
- ctx,
- ctx->Map.entry.Pre_EntryObj_NA ? RtemsIntrReqEntryRemove_Pre_EntryObj_NA : ctx->Map.pcs[ 3 ]
- );
+ RtemsIntrReqEntryRemove_Pre_Routine_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsIntrReqEntryRemove_Pre_EntryObj_Prepare( ctx, ctx->Map.pcs[ 3 ] );
RtemsIntrReqEntryRemove_Pre_Init_Prepare( ctx, ctx->Map.pcs[ 4 ] );
RtemsIntrReqEntryRemove_Pre_ISR_Prepare( ctx, ctx->Map.pcs[ 5 ] );
- RtemsIntrReqEntryRemove_Pre_CanDisable_Prepare(
- ctx,
- ctx->Map.entry.Pre_CanDisable_NA ? RtemsIntrReqEntryRemove_Pre_CanDisable_NA : ctx->Map.pcs[ 6 ]
- );
- RtemsIntrReqEntryRemove_Pre_First_Prepare(
- ctx,
- ctx->Map.entry.Pre_First_NA ? RtemsIntrReqEntryRemove_Pre_First_NA : ctx->Map.pcs[ 7 ]
- );
- RtemsIntrReqEntryRemove_Pre_Last_Prepare(
- ctx,
- ctx->Map.entry.Pre_Last_NA ? RtemsIntrReqEntryRemove_Pre_Last_NA : ctx->Map.pcs[ 8 ]
- );
+ RtemsIntrReqEntryRemove_Pre_CanDisable_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsIntrReqEntryRemove_Pre_First_Prepare( ctx, ctx->Map.pcs[ 7 ] );
+ RtemsIntrReqEntryRemove_Pre_Last_Prepare( ctx, ctx->Map.pcs[ 8 ] );
RtemsIntrReqEntryRemove_Action( ctx );
RtemsIntrReqEntryRemove_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
RtemsIntrReqEntryRemove_Post_Disabled_Check(
@@ -1359,51 +1419,52 @@ T_TEST_CASE_FIXTURE(
ctx->Map.index = 0;
for (
- ctx->Map.pcs[ 0 ] = RtemsIntrReqEntryRemove_Pre_Vector_Valid;
- ctx->Map.pcs[ 0 ] < RtemsIntrReqEntryRemove_Pre_Vector_NA;
- ++ctx->Map.pcs[ 0 ]
+ ctx->Map.pci[ 0 ] = RtemsIntrReqEntryRemove_Pre_Vector_Valid;
+ ctx->Map.pci[ 0 ] < RtemsIntrReqEntryRemove_Pre_Vector_NA;
+ ++ctx->Map.pci[ 0 ]
) {
for (
- ctx->Map.pcs[ 1 ] = RtemsIntrReqEntryRemove_Pre_Entry_Obj;
- ctx->Map.pcs[ 1 ] < RtemsIntrReqEntryRemove_Pre_Entry_NA;
- ++ctx->Map.pcs[ 1 ]
+ ctx->Map.pci[ 1 ] = RtemsIntrReqEntryRemove_Pre_Entry_Obj;
+ ctx->Map.pci[ 1 ] < RtemsIntrReqEntryRemove_Pre_Entry_NA;
+ ++ctx->Map.pci[ 1 ]
) {
for (
- ctx->Map.pcs[ 2 ] = RtemsIntrReqEntryRemove_Pre_Routine_Valid;
- ctx->Map.pcs[ 2 ] < RtemsIntrReqEntryRemove_Pre_Routine_NA;
- ++ctx->Map.pcs[ 2 ]
+ ctx->Map.pci[ 2 ] = RtemsIntrReqEntryRemove_Pre_Routine_Valid;
+ ctx->Map.pci[ 2 ] < RtemsIntrReqEntryRemove_Pre_Routine_NA;
+ ++ctx->Map.pci[ 2 ]
) {
for (
- ctx->Map.pcs[ 3 ] = RtemsIntrReqEntryRemove_Pre_EntryObj_Installed;
- ctx->Map.pcs[ 3 ] < RtemsIntrReqEntryRemove_Pre_EntryObj_NA;
- ++ctx->Map.pcs[ 3 ]
+ ctx->Map.pci[ 3 ] = RtemsIntrReqEntryRemove_Pre_EntryObj_Installed;
+ ctx->Map.pci[ 3 ] < RtemsIntrReqEntryRemove_Pre_EntryObj_NA;
+ ++ctx->Map.pci[ 3 ]
) {
for (
- ctx->Map.pcs[ 4 ] = RtemsIntrReqEntryRemove_Pre_Init_Yes;
- ctx->Map.pcs[ 4 ] < RtemsIntrReqEntryRemove_Pre_Init_NA;
- ++ctx->Map.pcs[ 4 ]
+ ctx->Map.pci[ 4 ] = RtemsIntrReqEntryRemove_Pre_Init_Yes;
+ ctx->Map.pci[ 4 ] < RtemsIntrReqEntryRemove_Pre_Init_NA;
+ ++ctx->Map.pci[ 4 ]
) {
for (
- ctx->Map.pcs[ 5 ] = RtemsIntrReqEntryRemove_Pre_ISR_Yes;
- ctx->Map.pcs[ 5 ] < RtemsIntrReqEntryRemove_Pre_ISR_NA;
- ++ctx->Map.pcs[ 5 ]
+ ctx->Map.pci[ 5 ] = RtemsIntrReqEntryRemove_Pre_ISR_Yes;
+ ctx->Map.pci[ 5 ] < RtemsIntrReqEntryRemove_Pre_ISR_NA;
+ ++ctx->Map.pci[ 5 ]
) {
for (
- ctx->Map.pcs[ 6 ] = RtemsIntrReqEntryRemove_Pre_CanDisable_Yes;
- ctx->Map.pcs[ 6 ] < RtemsIntrReqEntryRemove_Pre_CanDisable_NA;
- ++ctx->Map.pcs[ 6 ]
+ ctx->Map.pci[ 6 ] = RtemsIntrReqEntryRemove_Pre_CanDisable_Yes;
+ ctx->Map.pci[ 6 ] < RtemsIntrReqEntryRemove_Pre_CanDisable_NA;
+ ++ctx->Map.pci[ 6 ]
) {
for (
- ctx->Map.pcs[ 7 ] = RtemsIntrReqEntryRemove_Pre_First_Yes;
- ctx->Map.pcs[ 7 ] < RtemsIntrReqEntryRemove_Pre_First_NA;
- ++ctx->Map.pcs[ 7 ]
+ ctx->Map.pci[ 7 ] = RtemsIntrReqEntryRemove_Pre_First_Yes;
+ ctx->Map.pci[ 7 ] < RtemsIntrReqEntryRemove_Pre_First_NA;
+ ++ctx->Map.pci[ 7 ]
) {
for (
- ctx->Map.pcs[ 8 ] = RtemsIntrReqEntryRemove_Pre_Last_Yes;
- ctx->Map.pcs[ 8 ] < RtemsIntrReqEntryRemove_Pre_Last_NA;
- ++ctx->Map.pcs[ 8 ]
+ ctx->Map.pci[ 8 ] = RtemsIntrReqEntryRemove_Pre_Last_Yes;
+ ctx->Map.pci[ 8 ] < RtemsIntrReqEntryRemove_Pre_Last_NA;
+ ++ctx->Map.pci[ 8 ]
) {
ctx->Map.entry = RtemsIntrReqEntryRemove_PopEntry( ctx );
+ RtemsIntrReqEntryRemove_SetPreConditionStates( ctx );
RtemsIntrReqEntryRemove_Prepare( ctx );
RtemsIntrReqEntryRemove_TestVariant( ctx );
RtemsIntrReqEntryRemove_Cleanup( ctx );
diff --git a/testsuites/validation/tc-intr-get-affinity.c b/testsuites/validation/tc-intr-get-affinity.c
index 375a131a05..60509203b4 100644
--- a/testsuites/validation/tc-intr-get-affinity.c
+++ b/testsuites/validation/tc-intr-get-affinity.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsIntrReqGetAffinity
+ * @ingroup RtemsIntrReqGetAffinity
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,10 +61,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsIntrReqGetAffinity \
- * spec:/rtems/intr/req/get-affinity
+ * @defgroup RtemsIntrReqGetAffinity spec:/rtems/intr/req/get-affinity
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationIntr
*
* @{
*/
@@ -139,7 +138,7 @@ typedef struct {
* @brief This member provides the object referenced by the ``affinity``
* parameter.
*/
- cpu_set_t cpuset_obj[ 2 ];;
+ cpu_set_t cpuset_obj[ 2 ];
/**
* @brief This member contains the return value of the
@@ -165,6 +164,12 @@ typedef struct {
struct {
/**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 4 ];
+
+ /**
* @brief This member defines the pre-condition states for the next action.
*/
size_t pcs[ 4 ];
@@ -238,6 +243,9 @@ static void CheckGetAffinity(
rtems_status_code sc;
cpu_set_t set[ 2 ];
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Warray-bounds"
+
if ( attr->can_get_affinity ) {
CPU_ZERO_S( sizeof( ctx->cpuset_obj ), ctx->cpuset_obj );
} else {
@@ -259,6 +267,8 @@ static void CheckGetAffinity(
T_rsc( sc, RTEMS_UNSATISFIED );
T_true( CPU_EQUAL_S( sizeof( set ), ctx->cpuset_obj, set ) );
}
+
+ #pragma GCC diagnostic pop
}
static void RtemsIntrReqGetAffinity_Pre_Vector_Prepare(
@@ -559,6 +569,9 @@ static void RtemsIntrReqGetAffinity_Action(
ctx->vector = BSP_INTERRUPT_VECTOR_COUNT;
}
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Warray-bounds"
+
CPU_FILL_S( sizeof( ctx->cpuset_obj ), ctx->cpuset_obj );
ctx->status = rtems_interrupt_get_affinity(
@@ -577,6 +590,8 @@ static void RtemsIntrReqGetAffinity_Action(
}
T_true( CPU_EQUAL_S( sizeof( set ), ctx->cpuset_obj, set ) );
+
+ #pragma GCC diagnostic pop
}
}
@@ -642,6 +657,21 @@ static inline RtemsIntrReqGetAffinity_Entry RtemsIntrReqGetAffinity_PopEntry(
];
}
+static void RtemsIntrReqGetAffinity_SetPreConditionStates(
+ RtemsIntrReqGetAffinity_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+
+ if ( ctx->Map.entry.Pre_CanGetAffinity_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsIntrReqGetAffinity_Pre_CanGetAffinity_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+}
+
static void RtemsIntrReqGetAffinity_TestVariant(
RtemsIntrReqGetAffinity_Context *ctx
)
@@ -649,10 +679,7 @@ static void RtemsIntrReqGetAffinity_TestVariant(
RtemsIntrReqGetAffinity_Pre_Vector_Prepare( ctx, ctx->Map.pcs[ 0 ] );
RtemsIntrReqGetAffinity_Pre_CPUSetSize_Prepare( ctx, ctx->Map.pcs[ 1 ] );
RtemsIntrReqGetAffinity_Pre_CPUSet_Prepare( ctx, ctx->Map.pcs[ 2 ] );
- RtemsIntrReqGetAffinity_Pre_CanGetAffinity_Prepare(
- ctx,
- ctx->Map.entry.Pre_CanGetAffinity_NA ? RtemsIntrReqGetAffinity_Pre_CanGetAffinity_NA : ctx->Map.pcs[ 3 ]
- );
+ RtemsIntrReqGetAffinity_Pre_CanGetAffinity_Prepare( ctx, ctx->Map.pcs[ 3 ] );
RtemsIntrReqGetAffinity_Action( ctx );
RtemsIntrReqGetAffinity_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
RtemsIntrReqGetAffinity_Post_CPUSetObj_Check(
@@ -676,26 +703,27 @@ T_TEST_CASE_FIXTURE(
ctx->Map.index = 0;
for (
- ctx->Map.pcs[ 0 ] = RtemsIntrReqGetAffinity_Pre_Vector_Valid;
- ctx->Map.pcs[ 0 ] < RtemsIntrReqGetAffinity_Pre_Vector_NA;
- ++ctx->Map.pcs[ 0 ]
+ ctx->Map.pci[ 0 ] = RtemsIntrReqGetAffinity_Pre_Vector_Valid;
+ ctx->Map.pci[ 0 ] < RtemsIntrReqGetAffinity_Pre_Vector_NA;
+ ++ctx->Map.pci[ 0 ]
) {
for (
- ctx->Map.pcs[ 1 ] = RtemsIntrReqGetAffinity_Pre_CPUSetSize_Valid;
- ctx->Map.pcs[ 1 ] < RtemsIntrReqGetAffinity_Pre_CPUSetSize_NA;
- ++ctx->Map.pcs[ 1 ]
+ ctx->Map.pci[ 1 ] = RtemsIntrReqGetAffinity_Pre_CPUSetSize_Valid;
+ ctx->Map.pci[ 1 ] < RtemsIntrReqGetAffinity_Pre_CPUSetSize_NA;
+ ++ctx->Map.pci[ 1 ]
) {
for (
- ctx->Map.pcs[ 2 ] = RtemsIntrReqGetAffinity_Pre_CPUSet_Valid;
- ctx->Map.pcs[ 2 ] < RtemsIntrReqGetAffinity_Pre_CPUSet_NA;
- ++ctx->Map.pcs[ 2 ]
+ ctx->Map.pci[ 2 ] = RtemsIntrReqGetAffinity_Pre_CPUSet_Valid;
+ ctx->Map.pci[ 2 ] < RtemsIntrReqGetAffinity_Pre_CPUSet_NA;
+ ++ctx->Map.pci[ 2 ]
) {
for (
- ctx->Map.pcs[ 3 ] = RtemsIntrReqGetAffinity_Pre_CanGetAffinity_Yes;
- ctx->Map.pcs[ 3 ] < RtemsIntrReqGetAffinity_Pre_CanGetAffinity_NA;
- ++ctx->Map.pcs[ 3 ]
+ ctx->Map.pci[ 3 ] = RtemsIntrReqGetAffinity_Pre_CanGetAffinity_Yes;
+ ctx->Map.pci[ 3 ] < RtemsIntrReqGetAffinity_Pre_CanGetAffinity_NA;
+ ++ctx->Map.pci[ 3 ]
) {
ctx->Map.entry = RtemsIntrReqGetAffinity_PopEntry( ctx );
+ RtemsIntrReqGetAffinity_SetPreConditionStates( ctx );
RtemsIntrReqGetAffinity_TestVariant( ctx );
}
}
diff --git a/testsuites/validation/tc-intr-get-attributes.c b/testsuites/validation/tc-intr-get-attributes.c
index f64eef1563..4594c78a2e 100644
--- a/testsuites/validation/tc-intr-get-attributes.c
+++ b/testsuites/validation/tc-intr-get-attributes.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsIntrReqGetAttributes
+ * @ingroup RtemsIntrReqGetAttributes
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -59,10 +59,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsIntrReqGetAttributes \
- * spec:/rtems/intr/req/get-attributes
+ * @defgroup RtemsIntrReqGetAttributes spec:/rtems/intr/req/get-attributes
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationIntr
*
* @{
*/
@@ -119,7 +118,7 @@ typedef struct {
/**
* @brief This member specifies if the ``attributes`` parameter value.
*/
- rtems_interrupt_attributes *attributes;;
+ rtems_interrupt_attributes *attributes;
/**
* @brief This member contains the return value of the
diff --git a/testsuites/validation/tc-intr-handler-iterate.c b/testsuites/validation/tc-intr-handler-iterate.c
index 2014e829bf..fc3f498838 100644
--- a/testsuites/validation/tc-intr-handler-iterate.c
+++ b/testsuites/validation/tc-intr-handler-iterate.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsIntrReqHandlerIterate
+ * @ingroup RtemsIntrReqHandlerIterate
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -60,10 +60,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsIntrReqHandlerIterate \
- * spec:/rtems/intr/req/handler-iterate
+ * @defgroup RtemsIntrReqHandlerIterate spec:/rtems/intr/req/handler-iterate
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationIntr
*
* @{
*/
@@ -134,6 +133,12 @@ typedef struct {
rtems_vector_number test_vector;
/**
+ * @brief If this member is true, then the testable interrupt vector was
+ * enabled at the test case begin.
+ */
+ bool test_vector_was_enabled;
+
+ /**
* @brief If this member is true, then the service shall be initialized.
*/
bool initialized;
@@ -282,7 +287,7 @@ static void Action( void *arg )
ctx->visited_entries = 0;
bsp_interrupt_set_handler_unique(
- BSP_INTERRUPT_HANDLER_TABLE_SIZE,
+ BSP_INTERRUPT_DISPATCH_TABLE_SIZE,
ctx->initialized
);
@@ -293,7 +298,7 @@ static void Action( void *arg )
);
bsp_interrupt_set_handler_unique(
- BSP_INTERRUPT_HANDLER_TABLE_SIZE,
+ BSP_INTERRUPT_DISPATCH_TABLE_SIZE,
ctx->initialized_during_setup
);
}
@@ -505,7 +510,12 @@ static void RtemsIntrReqHandlerIterate_Setup(
rtems_status_code sc;
ctx->initialized_during_setup = bsp_interrupt_is_initialized();
- ctx->test_vector = GetTestableInterruptVector();
+ ctx->test_vector = GetTestableInterruptVector( NULL );
+ ctx->test_vector_was_enabled = false;
+ (void) rtems_interrupt_vector_is_enabled(
+ ctx->test_vector,
+ &ctx->test_vector_was_enabled
+ );
rtems_interrupt_entry_initialize(
&ctx->entry,
EntryRoutine,
@@ -529,6 +539,32 @@ static void RtemsIntrReqHandlerIterate_Setup_Wrap( void *arg )
RtemsIntrReqHandlerIterate_Setup( ctx );
}
+static void RtemsIntrReqHandlerIterate_Teardown(
+ RtemsIntrReqHandlerIterate_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_interrupt_entry_remove(
+ ctx->test_vector,
+ &ctx->entry
+ );
+ T_rsc_success( sc );
+
+ if ( ctx->test_vector_was_enabled ) {
+ (void) rtems_interrupt_vector_enable( ctx->test_vector );
+ }
+}
+
+static void RtemsIntrReqHandlerIterate_Teardown_Wrap( void *arg )
+{
+ RtemsIntrReqHandlerIterate_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsIntrReqHandlerIterate_Teardown( ctx );
+}
+
static void RtemsIntrReqHandlerIterate_Action(
RtemsIntrReqHandlerIterate_Context *ctx
)
@@ -586,7 +622,7 @@ static size_t RtemsIntrReqHandlerIterate_Scope(
static T_fixture RtemsIntrReqHandlerIterate_Fixture = {
.setup = RtemsIntrReqHandlerIterate_Setup_Wrap,
.stop = NULL,
- .teardown = NULL,
+ .teardown = RtemsIntrReqHandlerIterate_Teardown_Wrap,
.scope = RtemsIntrReqHandlerIterate_Scope,
.initial_context = &RtemsIntrReqHandlerIterate_Instance
};
diff --git a/testsuites/validation/tc-intr-is-pending.c b/testsuites/validation/tc-intr-is-pending.c
index 4963827538..097e3d7a17 100644
--- a/testsuites/validation/tc-intr-is-pending.c
+++ b/testsuites/validation/tc-intr-is-pending.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsIntrReqIsPending
+ * @ingroup RtemsIntrReqIsPending
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,9 +61,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsIntrReqIsPending spec:/rtems/intr/req/is-pending
+ * @defgroup RtemsIntrReqIsPending spec:/rtems/intr/req/is-pending
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationIntr
*
* @{
*/
@@ -142,7 +142,7 @@ typedef struct {
/**
* @brief This member specifies if the ``pending`` parameter value.
*/
- bool *pending;;
+ bool *pending;
/**
* @brief This member contains the return value of the
@@ -152,6 +152,12 @@ typedef struct {
struct {
/**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 3 ];
+
+ /**
* @brief This member defines the pre-condition states for the next action.
*/
size_t pcs[ 3 ];
@@ -284,14 +290,21 @@ static void CheckIsPending(
if ( has_installed_entries ) {
/*
* We cannot test this vector thoroughly, since it is used by a device
- * driver.
+ * driver. It may be pending or not. For example in SMP configurations,
+ * it may be pending while being serviced right now on another processor.
*/
- T_false( IsPending( ctx ) );
+ (void) IsPending( ctx );
} else if ( !attr->is_maskable ) {
/* We can only safely test maskable interrupts */
T_false( IsPending( ctx ) );
+ } else if ( IsPending( ctx ) ) {
+ /*
+ * If there is already an interrupt pending, then it is probably raised
+ * by a peripheral which we cannot control.
+ */
} else if (
- attr->can_disable && ( attr->can_clear || attr->cleared_by_acknowledge )
+ attr->can_raise && attr->can_disable &&
+ ( attr->can_clear || attr->cleared_by_acknowledge )
) {
rtems_interrupt_entry entry;
rtems_interrupt_level level;
@@ -307,19 +320,21 @@ static void CheckIsPending(
T_rsc_success( sc );
if ( !IsPending( ctx) && ( attr->can_enable || IsEnabled( ctx ) ) ) {
- if ( attr->can_disable ) {
- Disable( ctx );
- Raise( ctx );
- T_true( IsPending( ctx ) );
-
- sc = rtems_interrupt_vector_enable( ctx->vector );
- T_rsc_success( sc );
-
- while ( ctx->interrupt_count < 1 ) {
- /* Wait */
- }
- } else {
- ++ctx->interrupt_count;
+ Disable( ctx );
+ Raise( ctx );
+
+ /*
+ * Some interrupt controllers will signal a pending interrupt if it is
+ * disabled (for example ARM GIC), others will not signal a pending
+ * interrupt if it is disabled (for example Freescale/NXP MPIC).
+ */
+ (void) IsPending( ctx );
+
+ sc = rtems_interrupt_vector_enable( ctx->vector );
+ T_rsc_success( sc );
+
+ while ( ctx->interrupt_count < 1 ) {
+ /* Wait */
}
rtems_interrupt_local_disable( level );
@@ -593,16 +608,27 @@ static inline RtemsIntrReqIsPending_Entry RtemsIntrReqIsPending_PopEntry(
];
}
+static void RtemsIntrReqIsPending_SetPreConditionStates(
+ RtemsIntrReqIsPending_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+
+ if ( ctx->Map.entry.Pre_IsPending_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsIntrReqIsPending_Pre_IsPending_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+}
+
static void RtemsIntrReqIsPending_TestVariant(
RtemsIntrReqIsPending_Context *ctx
)
{
RtemsIntrReqIsPending_Pre_Vector_Prepare( ctx, ctx->Map.pcs[ 0 ] );
RtemsIntrReqIsPending_Pre_Pending_Prepare( ctx, ctx->Map.pcs[ 1 ] );
- RtemsIntrReqIsPending_Pre_IsPending_Prepare(
- ctx,
- ctx->Map.entry.Pre_IsPending_NA ? RtemsIntrReqIsPending_Pre_IsPending_NA : ctx->Map.pcs[ 2 ]
- );
+ RtemsIntrReqIsPending_Pre_IsPending_Prepare( ctx, ctx->Map.pcs[ 2 ] );
RtemsIntrReqIsPending_Action( ctx );
RtemsIntrReqIsPending_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
RtemsIntrReqIsPending_Post_IsPending_Check(
@@ -623,21 +649,22 @@ T_TEST_CASE_FIXTURE( RtemsIntrReqIsPending, &RtemsIntrReqIsPending_Fixture )
ctx->Map.index = 0;
for (
- ctx->Map.pcs[ 0 ] = RtemsIntrReqIsPending_Pre_Vector_Valid;
- ctx->Map.pcs[ 0 ] < RtemsIntrReqIsPending_Pre_Vector_NA;
- ++ctx->Map.pcs[ 0 ]
+ ctx->Map.pci[ 0 ] = RtemsIntrReqIsPending_Pre_Vector_Valid;
+ ctx->Map.pci[ 0 ] < RtemsIntrReqIsPending_Pre_Vector_NA;
+ ++ctx->Map.pci[ 0 ]
) {
for (
- ctx->Map.pcs[ 1 ] = RtemsIntrReqIsPending_Pre_Pending_Obj;
- ctx->Map.pcs[ 1 ] < RtemsIntrReqIsPending_Pre_Pending_NA;
- ++ctx->Map.pcs[ 1 ]
+ ctx->Map.pci[ 1 ] = RtemsIntrReqIsPending_Pre_Pending_Obj;
+ ctx->Map.pci[ 1 ] < RtemsIntrReqIsPending_Pre_Pending_NA;
+ ++ctx->Map.pci[ 1 ]
) {
for (
- ctx->Map.pcs[ 2 ] = RtemsIntrReqIsPending_Pre_IsPending_Yes;
- ctx->Map.pcs[ 2 ] < RtemsIntrReqIsPending_Pre_IsPending_NA;
- ++ctx->Map.pcs[ 2 ]
+ ctx->Map.pci[ 2 ] = RtemsIntrReqIsPending_Pre_IsPending_Yes;
+ ctx->Map.pci[ 2 ] < RtemsIntrReqIsPending_Pre_IsPending_NA;
+ ++ctx->Map.pci[ 2 ]
) {
ctx->Map.entry = RtemsIntrReqIsPending_PopEntry( ctx );
+ RtemsIntrReqIsPending_SetPreConditionStates( ctx );
RtemsIntrReqIsPending_TestVariant( ctx );
}
}
diff --git a/testsuites/validation/tc-intr-non-smp.c b/testsuites/validation/tc-intr-non-smp.c
new file mode 100644
index 0000000000..ce34571298
--- /dev/null
+++ b/testsuites/validation/tc-intr-non-smp.c
@@ -0,0 +1,170 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsIntrValIntrNonSmp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsIntrValIntrNonSmp spec:/rtems/intr/val/intr-non-smp
+ *
+ * @ingroup TestsuitesValidationNonSmp
+ *
+ * @brief Tests some @ref RTEMSAPIClassicIntr interfaces.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate some interrupt lock macros.
+ *
+ * - Check that RTEMS_INTERRUPT_LOCK_DECLARE() expands to white space only.
+ *
+ * - Check that RTEMS_INTERRUPT_LOCK_DEFINE() expands to white space only.
+ *
+ * - Check that RTEMS_INTERRUPT_LOCK_MEMBER() expands to white space only.
+ *
+ * - Check that RTEMS_INTERRUPT_LOCK_REFERENCE() expands to white space only.
+ *
+ * - Check that rtems_interrupt_lock_destroy() expands to white space only.
+ *
+ * - Check that RTEMS_INTERRUPT_LOCK_INITIALIZER() expands to an empty
+ * structure initializer.
+ *
+ * - Check that rtems_interrupt_lock_initialize() expands to white space
+ * only.
+ *
+ * - Check that rtems_interrupt_lock_acquire_isr() expands to a code block
+ * which marks the second parameter as used.
+ *
+ * - Check that rtems_interrupt_lock_release_isr() expands to a code block
+ * which marks the second parameter as used.
+ *
+ * @{
+ */
+
+/**
+ * @brief Validate some interrupt lock macros.
+ */
+static void RtemsIntrValIntrNonSmp_Action_0( void )
+{
+ const char *s;
+
+ /*
+ * Check that RTEMS_INTERRUPT_LOCK_DECLARE() expands to white space only.
+ */
+ s = RTEMS_XSTRING( RTEMS_INTERRUPT_LOCK_DECLARE( x, y ) );
+ T_true( IsWhiteSpaceOnly( s ) );
+
+ /*
+ * Check that RTEMS_INTERRUPT_LOCK_DEFINE() expands to white space only.
+ */
+ s = RTEMS_XSTRING( RTEMS_INTERRUPT_LOCK_DEFINE( x, y, z ) );
+ T_true( IsWhiteSpaceOnly( s ) );
+
+ /*
+ * Check that RTEMS_INTERRUPT_LOCK_MEMBER() expands to white space only.
+ */
+ s = RTEMS_XSTRING( RTEMS_INTERRUPT_LOCK_MEMBER( x ) );
+ T_true( IsWhiteSpaceOnly( s ) );
+
+ /*
+ * Check that RTEMS_INTERRUPT_LOCK_REFERENCE() expands to white space only.
+ */
+ s = RTEMS_XSTRING( RTEMS_INTERRUPT_LOCK_REFERENCE( x, y ) );
+ T_true( IsWhiteSpaceOnly( s ) );
+
+ /*
+ * Check that rtems_interrupt_lock_destroy() expands to white space only.
+ */
+ s = RTEMS_XSTRING( rtems_interrupt_lock_destroy( x ) );
+ T_true( IsWhiteSpaceOnly( s ) );
+
+ /*
+ * Check that RTEMS_INTERRUPT_LOCK_INITIALIZER() expands to an empty
+ * structure initializer.
+ */
+ s = RTEMS_XSTRING( RTEMS_INTERRUPT_LOCK_INITIALIZER( x ) );
+ T_true( IsEqualIgnoreWhiteSpace( s, "{}" ) );
+
+ /*
+ * Check that rtems_interrupt_lock_initialize() expands to white space only.
+ */
+ s = RTEMS_XSTRING( rtems_interrupt_lock_initialize( x, y ) );
+ T_true( IsWhiteSpaceOnly( s ) );
+
+ /*
+ * Check that rtems_interrupt_lock_acquire_isr() expands to a code block
+ * which marks the second parameter as used.
+ */
+ s = RTEMS_XSTRING( rtems_interrupt_lock_acquire_isr( x, y ) );
+ T_true( IsEqualIgnoreWhiteSpace( s, "do{(void)y;}while(0)" ) );
+
+ /*
+ * Check that rtems_interrupt_lock_release_isr() expands to a code block
+ * which marks the second parameter as used.
+ */
+ s = RTEMS_XSTRING( rtems_interrupt_lock_release_isr( x, y ) );
+ T_true( IsEqualIgnoreWhiteSpace( s, "do{(void)y;}while(0)" ) );
+}
+
+/**
+ * @fn void T_case_body_RtemsIntrValIntrNonSmp( void )
+ */
+T_TEST_CASE( RtemsIntrValIntrNonSmp )
+{
+ RtemsIntrValIntrNonSmp_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-intr-raise-on.c b/testsuites/validation/tc-intr-raise-on.c
index efe468aebd..d4298463b6 100644
--- a/testsuites/validation/tc-intr-raise-on.c
+++ b/testsuites/validation/tc-intr-raise-on.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsIntrReqRaiseOn
+ * @ingroup RtemsIntrReqRaiseOn
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,9 +61,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsIntrReqRaiseOn spec:/rtems/intr/req/raise-on
+ * @defgroup RtemsIntrReqRaiseOn spec:/rtems/intr/req/raise-on
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationIntr
*
* @{
*/
@@ -154,6 +154,12 @@ typedef struct {
struct {
/**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 3 ];
+
+ /**
* @brief This member defines the pre-condition states for the next action.
*/
size_t pcs[ 3 ];
@@ -332,21 +338,21 @@ static void CheckRaiseOn(
T_rsc_success( sc );
if ( !IsPending( ctx) && ( attr->can_enable || IsEnabled( ctx ) ) ) {
- T_false( IsPending( ctx ) );
+ Disable( ctx );
+ RaiseOn( ctx );
- if ( attr->can_disable ) {
- Disable( ctx );
- RaiseOn( ctx );
- T_true( IsPending( ctx ) );
+ /*
+ * Some interrupt controllers will signal a pending interrupt if it is
+ * disabled (for example ARM GIC), others will not signal a pending
+ * interrupt if it is disabled (for example Freescale/NXP MPIC).
+ */
+ (void) IsPending( ctx );
- sc = rtems_interrupt_vector_enable( ctx->vector );
- T_rsc_success( sc );
+ sc = rtems_interrupt_vector_enable( ctx->vector );
+ T_rsc_success( sc );
- while ( ctx->interrupt_count < 1 ) {
- /* Wait */
- }
- } else {
- ++ctx->interrupt_count;
+ while ( ctx->interrupt_count < 1 ) {
+ /* Wait */
}
T_false( IsPending( ctx ) );
@@ -672,14 +678,25 @@ static inline RtemsIntrReqRaiseOn_Entry RtemsIntrReqRaiseOn_PopEntry(
];
}
+static void RtemsIntrReqRaiseOn_SetPreConditionStates(
+ RtemsIntrReqRaiseOn_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+
+ if ( ctx->Map.entry.Pre_CanRaiseOn_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsIntrReqRaiseOn_Pre_CanRaiseOn_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+}
+
static void RtemsIntrReqRaiseOn_TestVariant( RtemsIntrReqRaiseOn_Context *ctx )
{
RtemsIntrReqRaiseOn_Pre_Vector_Prepare( ctx, ctx->Map.pcs[ 0 ] );
RtemsIntrReqRaiseOn_Pre_CPU_Prepare( ctx, ctx->Map.pcs[ 1 ] );
- RtemsIntrReqRaiseOn_Pre_CanRaiseOn_Prepare(
- ctx,
- ctx->Map.entry.Pre_CanRaiseOn_NA ? RtemsIntrReqRaiseOn_Pre_CanRaiseOn_NA : ctx->Map.pcs[ 2 ]
- );
+ RtemsIntrReqRaiseOn_Pre_CanRaiseOn_Prepare( ctx, ctx->Map.pcs[ 2 ] );
RtemsIntrReqRaiseOn_Action( ctx );
RtemsIntrReqRaiseOn_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
RtemsIntrReqRaiseOn_Post_Pending_Check( ctx, ctx->Map.entry.Post_Pending );
@@ -697,19 +714,19 @@ T_TEST_CASE_FIXTURE( RtemsIntrReqRaiseOn, &RtemsIntrReqRaiseOn_Fixture )
ctx->Map.index = 0;
for (
- ctx->Map.pcs[ 0 ] = RtemsIntrReqRaiseOn_Pre_Vector_Valid;
- ctx->Map.pcs[ 0 ] < RtemsIntrReqRaiseOn_Pre_Vector_NA;
- ++ctx->Map.pcs[ 0 ]
+ ctx->Map.pci[ 0 ] = RtemsIntrReqRaiseOn_Pre_Vector_Valid;
+ ctx->Map.pci[ 0 ] < RtemsIntrReqRaiseOn_Pre_Vector_NA;
+ ++ctx->Map.pci[ 0 ]
) {
for (
- ctx->Map.pcs[ 1 ] = RtemsIntrReqRaiseOn_Pre_CPU_Online;
- ctx->Map.pcs[ 1 ] < RtemsIntrReqRaiseOn_Pre_CPU_NA;
- ++ctx->Map.pcs[ 1 ]
+ ctx->Map.pci[ 1 ] = RtemsIntrReqRaiseOn_Pre_CPU_Online;
+ ctx->Map.pci[ 1 ] < RtemsIntrReqRaiseOn_Pre_CPU_NA;
+ ++ctx->Map.pci[ 1 ]
) {
for (
- ctx->Map.pcs[ 2 ] = RtemsIntrReqRaiseOn_Pre_CanRaiseOn_Yes;
- ctx->Map.pcs[ 2 ] < RtemsIntrReqRaiseOn_Pre_CanRaiseOn_NA;
- ++ctx->Map.pcs[ 2 ]
+ ctx->Map.pci[ 2 ] = RtemsIntrReqRaiseOn_Pre_CanRaiseOn_Yes;
+ ctx->Map.pci[ 2 ] < RtemsIntrReqRaiseOn_Pre_CanRaiseOn_NA;
+ ++ctx->Map.pci[ 2 ]
) {
ctx->Map.entry = RtemsIntrReqRaiseOn_PopEntry( ctx );
@@ -717,6 +734,7 @@ T_TEST_CASE_FIXTURE( RtemsIntrReqRaiseOn, &RtemsIntrReqRaiseOn_Fixture )
continue;
}
+ RtemsIntrReqRaiseOn_SetPreConditionStates( ctx );
RtemsIntrReqRaiseOn_TestVariant( ctx );
}
}
diff --git a/testsuites/validation/tc-intr-raise.c b/testsuites/validation/tc-intr-raise.c
index 81e8f8e856..1faa48fc79 100644
--- a/testsuites/validation/tc-intr-raise.c
+++ b/testsuites/validation/tc-intr-raise.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsIntrReqRaise
+ * @ingroup RtemsIntrReqRaise
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,9 +61,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsIntrReqRaise spec:/rtems/intr/req/raise
+ * @defgroup RtemsIntrReqRaise spec:/rtems/intr/req/raise
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationIntr
*
* @{
*/
@@ -134,6 +134,12 @@ typedef struct {
struct {
/**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 2 ];
+
+ /**
* @brief This member defines the pre-condition states for the next action.
*/
size_t pcs[ 2 ];
@@ -304,21 +310,21 @@ static void CheckRaise(
T_rsc_success( sc );
if ( !IsPending( ctx) && ( attr->can_enable || IsEnabled( ctx ) ) ) {
- T_false( IsPending( ctx ) );
+ Disable( ctx );
+ Raise( ctx );
- if ( attr->can_disable ) {
- Disable( ctx );
- Raise( ctx );
- T_true( IsPending( ctx ) );
+ /*
+ * Some interrupt controllers will signal a pending interrupt if it is
+ * disabled (for example ARM GIC), others will not signal a pending
+ * interrupt if it is disabled (for example Freescale/NXP MPIC).
+ */
+ (void) IsPending( ctx );
- sc = rtems_interrupt_vector_enable( ctx->vector );
- T_rsc_success( sc );
+ sc = rtems_interrupt_vector_enable( ctx->vector );
+ T_rsc_success( sc );
- while ( ctx->interrupt_count < 1 ) {
- /* Wait */
- }
- } else {
- ++ctx->interrupt_count;
+ while ( ctx->interrupt_count < 1 ) {
+ /* Wait */
}
T_false( IsPending( ctx ) );
@@ -550,13 +556,23 @@ static inline RtemsIntrReqRaise_Entry RtemsIntrReqRaise_PopEntry(
];
}
+static void RtemsIntrReqRaise_SetPreConditionStates(
+ RtemsIntrReqRaise_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_CanRaise_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsIntrReqRaise_Pre_CanRaise_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+}
+
static void RtemsIntrReqRaise_TestVariant( RtemsIntrReqRaise_Context *ctx )
{
RtemsIntrReqRaise_Pre_Vector_Prepare( ctx, ctx->Map.pcs[ 0 ] );
- RtemsIntrReqRaise_Pre_CanRaise_Prepare(
- ctx,
- ctx->Map.entry.Pre_CanRaise_NA ? RtemsIntrReqRaise_Pre_CanRaise_NA : ctx->Map.pcs[ 1 ]
- );
+ RtemsIntrReqRaise_Pre_CanRaise_Prepare( ctx, ctx->Map.pcs[ 1 ] );
RtemsIntrReqRaise_Action( ctx );
RtemsIntrReqRaise_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
RtemsIntrReqRaise_Post_Pending_Check( ctx, ctx->Map.entry.Post_Pending );
@@ -574,16 +590,17 @@ T_TEST_CASE_FIXTURE( RtemsIntrReqRaise, &RtemsIntrReqRaise_Fixture )
ctx->Map.index = 0;
for (
- ctx->Map.pcs[ 0 ] = RtemsIntrReqRaise_Pre_Vector_Valid;
- ctx->Map.pcs[ 0 ] < RtemsIntrReqRaise_Pre_Vector_NA;
- ++ctx->Map.pcs[ 0 ]
+ ctx->Map.pci[ 0 ] = RtemsIntrReqRaise_Pre_Vector_Valid;
+ ctx->Map.pci[ 0 ] < RtemsIntrReqRaise_Pre_Vector_NA;
+ ++ctx->Map.pci[ 0 ]
) {
for (
- ctx->Map.pcs[ 1 ] = RtemsIntrReqRaise_Pre_CanRaise_Yes;
- ctx->Map.pcs[ 1 ] < RtemsIntrReqRaise_Pre_CanRaise_NA;
- ++ctx->Map.pcs[ 1 ]
+ ctx->Map.pci[ 1 ] = RtemsIntrReqRaise_Pre_CanRaise_Yes;
+ ctx->Map.pci[ 1 ] < RtemsIntrReqRaise_Pre_CanRaise_NA;
+ ++ctx->Map.pci[ 1 ]
) {
ctx->Map.entry = RtemsIntrReqRaise_PopEntry( ctx );
+ RtemsIntrReqRaise_SetPreConditionStates( ctx );
RtemsIntrReqRaise_TestVariant( ctx );
}
}
diff --git a/testsuites/validation/tc-intr-set-affinity.c b/testsuites/validation/tc-intr-set-affinity.c
index a2a6a45e09..3354681b47 100644
--- a/testsuites/validation/tc-intr-set-affinity.c
+++ b/testsuites/validation/tc-intr-set-affinity.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsIntrReqSetAffinity
+ * @ingroup RtemsIntrReqSetAffinity
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021, 2022 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -60,10 +60,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsIntrReqSetAffinity \
- * spec:/rtems/intr/req/set-affinity
+ * @defgroup RtemsIntrReqSetAffinity spec:/rtems/intr/req/set-affinity
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationIntr
*
* @{
*/
@@ -75,11 +74,23 @@ typedef enum {
} RtemsIntrReqSetAffinity_Pre_Vector;
typedef enum {
- RtemsIntrReqSetAffinity_Pre_CPUSetKind_Valid,
- RtemsIntrReqSetAffinity_Pre_CPUSetKind_Huge,
- RtemsIntrReqSetAffinity_Pre_CPUSetKind_Askew,
- RtemsIntrReqSetAffinity_Pre_CPUSetKind_NA
-} RtemsIntrReqSetAffinity_Pre_CPUSetKind;
+ RtemsIntrReqSetAffinity_Pre_CPUSetSize_Askew,
+ RtemsIntrReqSetAffinity_Pre_CPUSetSize_Normal,
+ RtemsIntrReqSetAffinity_Pre_CPUSetSize_Huge,
+ RtemsIntrReqSetAffinity_Pre_CPUSetSize_NA
+} RtemsIntrReqSetAffinity_Pre_CPUSetSize;
+
+typedef enum {
+ RtemsIntrReqSetAffinity_Pre_CPUSetOnline_Valid,
+ RtemsIntrReqSetAffinity_Pre_CPUSetOnline_Empty,
+ RtemsIntrReqSetAffinity_Pre_CPUSetOnline_NA
+} RtemsIntrReqSetAffinity_Pre_CPUSetOnline;
+
+typedef enum {
+ RtemsIntrReqSetAffinity_Pre_CPUSetHuge_NotZero,
+ RtemsIntrReqSetAffinity_Pre_CPUSetHuge_Zero,
+ RtemsIntrReqSetAffinity_Pre_CPUSetHuge_NA
+} RtemsIntrReqSetAffinity_Pre_CPUSetHuge;
typedef enum {
RtemsIntrReqSetAffinity_Pre_CPUSet_Valid,
@@ -103,7 +114,7 @@ typedef enum {
} RtemsIntrReqSetAffinity_Post_Status;
typedef enum {
- RtemsIntrReqSetAffinity_Post_SetAffinity_Yes,
+ RtemsIntrReqSetAffinity_Post_SetAffinity_Set,
RtemsIntrReqSetAffinity_Post_SetAffinity_Nop,
RtemsIntrReqSetAffinity_Post_SetAffinity_NA
} RtemsIntrReqSetAffinity_Post_SetAffinity;
@@ -111,7 +122,9 @@ typedef enum {
typedef struct {
uint16_t Skip : 1;
uint16_t Pre_Vector_NA : 1;
- uint16_t Pre_CPUSetKind_NA : 1;
+ uint16_t Pre_CPUSetSize_NA : 1;
+ uint16_t Pre_CPUSetOnline_NA : 1;
+ uint16_t Pre_CPUSetHuge_NA : 1;
uint16_t Pre_CPUSet_NA : 1;
uint16_t Pre_CanSetAffinity_NA : 1;
uint16_t Post_Status : 3;
@@ -162,9 +175,15 @@ typedef struct {
struct {
/**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 6 ];
+
+ /**
* @brief This member defines the pre-condition states for the next action.
*/
- size_t pcs[ 4 ];
+ size_t pcs[ 6 ];
/**
* @brief If this member is true, then the test action loop is executed.
@@ -198,10 +217,22 @@ static const char * const RtemsIntrReqSetAffinity_PreDesc_Vector[] = {
"NA"
};
-static const char * const RtemsIntrReqSetAffinity_PreDesc_CPUSetKind[] = {
- "Valid",
- "Huge",
+static const char * const RtemsIntrReqSetAffinity_PreDesc_CPUSetSize[] = {
"Askew",
+ "Normal",
+ "Huge",
+ "NA"
+};
+
+static const char * const RtemsIntrReqSetAffinity_PreDesc_CPUSetOnline[] = {
+ "Valid",
+ "Empty",
+ "NA"
+};
+
+static const char * const RtemsIntrReqSetAffinity_PreDesc_CPUSetHuge[] = {
+ "NotZero",
+ "Zero",
"NA"
};
@@ -219,7 +250,9 @@ static const char * const RtemsIntrReqSetAffinity_PreDesc_CanSetAffinity[] = {
static const char * const * const RtemsIntrReqSetAffinity_PreDesc[] = {
RtemsIntrReqSetAffinity_PreDesc_Vector,
- RtemsIntrReqSetAffinity_PreDesc_CPUSetKind,
+ RtemsIntrReqSetAffinity_PreDesc_CPUSetSize,
+ RtemsIntrReqSetAffinity_PreDesc_CPUSetOnline,
+ RtemsIntrReqSetAffinity_PreDesc_CPUSetHuge,
RtemsIntrReqSetAffinity_PreDesc_CPUSet,
RtemsIntrReqSetAffinity_PreDesc_CanSetAffinity,
NULL
@@ -295,43 +328,107 @@ static void RtemsIntrReqSetAffinity_Pre_Vector_Prepare(
}
}
-static void RtemsIntrReqSetAffinity_Pre_CPUSetKind_Prepare(
+static void RtemsIntrReqSetAffinity_Pre_CPUSetSize_Prepare(
RtemsIntrReqSetAffinity_Context *ctx,
- RtemsIntrReqSetAffinity_Pre_CPUSetKind state
+ RtemsIntrReqSetAffinity_Pre_CPUSetSize state
)
{
switch ( state ) {
- case RtemsIntrReqSetAffinity_Pre_CPUSetKind_Valid: {
+ case RtemsIntrReqSetAffinity_Pre_CPUSetSize_Askew: {
+ /*
+ * While the ``affinity_size`` parameter is not an integral multiple of
+ * the size of long.
+ */
+ ctx->cpusetsize = SIZE_MAX;
+ break;
+ }
+
+ case RtemsIntrReqSetAffinity_Pre_CPUSetSize_Normal: {
/*
* While the ``affinity_size`` parameter is an integral multiple of the
- * size of long, while the ``affinity_size`` and ``affinity`` parameter
- * specify a processor set which is within the implementation limits.
+ * size of long, while the ``affinity_size`` parameter is less than or
+ * equal to the maximum processor set size storable in the system.
*/
ctx->cpusetsize = sizeof( ctx->cpuset_obj[ 0 ] );
break;
}
- case RtemsIntrReqSetAffinity_Pre_CPUSetKind_Huge: {
+ case RtemsIntrReqSetAffinity_Pre_CPUSetSize_Huge: {
/*
* While the ``affinity_size`` parameter is an integral multiple of the
- * size of long, while the ``affinity_size`` and ``affinity`` parameter
- * specify a processor set which exceeds the implementation limits.
+ * size of long, while the ``affinity_size`` parameter is greater than
+ * the maximum processor set size storable in the system.
*/
ctx->cpusetsize = sizeof( ctx->cpuset_obj );
+ break;
+ }
+
+ case RtemsIntrReqSetAffinity_Pre_CPUSetSize_NA:
+ break;
+ }
+}
+
+static void RtemsIntrReqSetAffinity_Pre_CPUSetOnline_Prepare(
+ RtemsIntrReqSetAffinity_Context *ctx,
+ RtemsIntrReqSetAffinity_Pre_CPUSetOnline state
+)
+{
+ switch ( state ) {
+ case RtemsIntrReqSetAffinity_Pre_CPUSetOnline_Valid: {
+ /*
+ * While the intersection of the processor set specified by the
+ * ``affinity_size`` and ``affinity`` parameters and the set of online
+ * processors is not empty, while the intersection of the processor set
+ * specified by the ``affinity_size`` and ``affinity`` parameters and the
+ * set of online processors is a processor affinity set supported by the
+ * interrupt vector.
+ */
+ /* Already prepared */
+ break;
+ }
+
+ case RtemsIntrReqSetAffinity_Pre_CPUSetOnline_Empty: {
+ /*
+ * While the intersection of the processor set specified by the
+ * ``affinity_size`` and ``affinity`` parameters and the set of online
+ * processors is empty.
+ */
CPU_ZERO( &ctx->cpuset_obj[ 0 ] );
break;
}
- case RtemsIntrReqSetAffinity_Pre_CPUSetKind_Askew: {
+ case RtemsIntrReqSetAffinity_Pre_CPUSetOnline_NA:
+ break;
+ }
+}
+
+static void RtemsIntrReqSetAffinity_Pre_CPUSetHuge_Prepare(
+ RtemsIntrReqSetAffinity_Context *ctx,
+ RtemsIntrReqSetAffinity_Pre_CPUSetHuge state
+)
+{
+ switch ( state ) {
+ case RtemsIntrReqSetAffinity_Pre_CPUSetHuge_NotZero: {
/*
- * While the ``affinity_size`` parameter is not an integral multiple of
- * the size of long.
+ * While the processor set specified by the ``affinity_size`` and
+ * ``affinity`` parameters contains at least one processor which is not
+ * storable in a processor set supported by the system.
*/
- ctx->cpusetsize = SIZE_MAX;
+ /* Already prepared */
+ break;
+ }
+
+ case RtemsIntrReqSetAffinity_Pre_CPUSetHuge_Zero: {
+ /*
+ * While the processor set specified by the ``affinity_size`` and
+ * ``affinity`` parameters contains no processor which is not storable in
+ * a processor set supported by the system.
+ */
+ CPU_ZERO( &ctx->cpuset_obj[ 1 ] );
break;
}
- case RtemsIntrReqSetAffinity_Pre_CPUSetKind_NA:
+ case RtemsIntrReqSetAffinity_Pre_CPUSetHuge_NA:
break;
}
}
@@ -455,7 +552,7 @@ static void RtemsIntrReqSetAffinity_Post_SetAffinity_Check(
)
{
switch ( state ) {
- case RtemsIntrReqSetAffinity_Post_SetAffinity_Yes: {
+ case RtemsIntrReqSetAffinity_Post_SetAffinity_Set: {
/*
* The affinity set of the interrupt specified by ``vector`` shall be set
* to the processor set specified by ``affinity_size`` and ``affinity``
@@ -513,7 +610,7 @@ static void RtemsIntrReqSetAffinity_Action(
if (
ctx->valid_vector && ctx->cpusetsize == sizeof( ctx->cpuset_obj[ 0 ] ) &&
- ctx->cpuset == &ctx->cpuset_obj[ 0 ]
+ ctx->cpuset == &ctx->cpuset_obj[ 0 ] && !CPU_EMPTY( &ctx->cpuset_obj[ 0 ] )
) {
for (
ctx->vector = 0;
@@ -532,6 +629,7 @@ static void RtemsIntrReqSetAffinity_Action(
T_rsc_success( sc );
CheckSetAffinity( ctx, &attr );
+ ctx->status = RTEMS_SUCCESSFUL;
}
} else {
cpu_set_t set;
@@ -539,6 +637,8 @@ static void RtemsIntrReqSetAffinity_Action(
CPU_ZERO( &set );
CPU_ZERO( &set2 );
+ CPU_SET( 0, &set );
+ CPU_SET( 0, &set2 );
if ( ctx->valid_vector ) {
ctx->vector = ctx->some_vector;
@@ -549,7 +649,9 @@ static void RtemsIntrReqSetAffinity_Action(
ctx->vector = BSP_INTERRUPT_VECTOR_COUNT;
}
- CPU_ZERO( &ctx->cpuset_obj[ 0 ] );
+ if ( !CPU_EMPTY( &ctx->cpuset_obj[ 0 ] ) ) {
+ CPU_COPY( &set, &ctx->cpuset_obj[ 0 ] );
+ }
ctx->status = rtems_interrupt_set_affinity(
ctx->vector,
@@ -567,23 +669,34 @@ static void RtemsIntrReqSetAffinity_Action(
static const RtemsIntrReqSetAffinity_Entry
RtemsIntrReqSetAffinity_Entries[] = {
- { 0, 0, 0, 0, 0, RtemsIntrReqSetAffinity_Post_Status_InvAddr,
+ { 0, 0, 0, 1, 1, 0, 0, RtemsIntrReqSetAffinity_Post_Status_InvAddr,
+ RtemsIntrReqSetAffinity_Post_SetAffinity_Nop },
+ { 0, 0, 0, 1, 1, 0, 1, RtemsIntrReqSetAffinity_Post_Status_InvAddr,
+ RtemsIntrReqSetAffinity_Post_SetAffinity_Nop },
+ { 0, 0, 0, 1, 1, 0, 1, RtemsIntrReqSetAffinity_Post_Status_InvId,
RtemsIntrReqSetAffinity_Post_SetAffinity_Nop },
- { 0, 0, 0, 0, 1, RtemsIntrReqSetAffinity_Post_Status_InvId,
- RtemsIntrReqSetAffinity_Post_SetAffinity_NA },
- { 0, 0, 0, 0, 1, RtemsIntrReqSetAffinity_Post_Status_InvAddr,
- RtemsIntrReqSetAffinity_Post_SetAffinity_NA },
- { 0, 0, 0, 0, 0, RtemsIntrReqSetAffinity_Post_Status_InvNum,
+ { 0, 0, 0, 0, 1, 0, 0, RtemsIntrReqSetAffinity_Post_Status_InvNum,
RtemsIntrReqSetAffinity_Post_SetAffinity_Nop },
- { 0, 0, 0, 0, 0, RtemsIntrReqSetAffinity_Post_Status_Ok,
- RtemsIntrReqSetAffinity_Post_SetAffinity_Yes },
- { 0, 0, 0, 0, 0, RtemsIntrReqSetAffinity_Post_Status_Unsat,
+ { 0, 0, 0, 1, 0, 0, 1, RtemsIntrReqSetAffinity_Post_Status_InvId,
+ RtemsIntrReqSetAffinity_Post_SetAffinity_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsIntrReqSetAffinity_Post_Status_InvNum,
+ RtemsIntrReqSetAffinity_Post_SetAffinity_Nop },
+ { 0, 0, 0, 0, 1, 0, 0, RtemsIntrReqSetAffinity_Post_Status_Ok,
+ RtemsIntrReqSetAffinity_Post_SetAffinity_Set },
+ { 0, 0, 0, 0, 1, 0, 0, RtemsIntrReqSetAffinity_Post_Status_Unsat,
+ RtemsIntrReqSetAffinity_Post_SetAffinity_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsIntrReqSetAffinity_Post_Status_Ok,
+ RtemsIntrReqSetAffinity_Post_SetAffinity_Set },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsIntrReqSetAffinity_Post_Status_Unsat,
RtemsIntrReqSetAffinity_Post_SetAffinity_Nop }
};
static const uint8_t
RtemsIntrReqSetAffinity_Map[] = {
- 4, 5, 0, 0, 3, 3, 0, 0, 3, 3, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2
+ 3, 3, 0, 0, 3, 3, 0, 0, 3, 3, 0, 0, 3, 3, 0, 0, 6, 7, 0, 0, 6, 7, 0, 0, 3, 3,
+ 0, 0, 3, 3, 0, 0, 8, 9, 0, 0, 8, 9, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 2, 2, 1, 1,
+ 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2,
+ 1, 1, 4, 4, 1, 1, 4, 4, 1, 1, 4, 4, 1, 1, 4, 4, 1, 1
};
static size_t RtemsIntrReqSetAffinity_Scope( void *arg, char *buf, size_t n )
@@ -625,17 +738,44 @@ static inline RtemsIntrReqSetAffinity_Entry RtemsIntrReqSetAffinity_PopEntry(
];
}
+static void RtemsIntrReqSetAffinity_SetPreConditionStates(
+ RtemsIntrReqSetAffinity_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+
+ if ( ctx->Map.entry.Pre_CPUSetOnline_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsIntrReqSetAffinity_Pre_CPUSetOnline_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+
+ if ( ctx->Map.entry.Pre_CPUSetHuge_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsIntrReqSetAffinity_Pre_CPUSetHuge_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+
+ if ( ctx->Map.entry.Pre_CanSetAffinity_NA ) {
+ ctx->Map.pcs[ 5 ] = RtemsIntrReqSetAffinity_Pre_CanSetAffinity_NA;
+ } else {
+ ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
+ }
+}
+
static void RtemsIntrReqSetAffinity_TestVariant(
RtemsIntrReqSetAffinity_Context *ctx
)
{
RtemsIntrReqSetAffinity_Pre_Vector_Prepare( ctx, ctx->Map.pcs[ 0 ] );
- RtemsIntrReqSetAffinity_Pre_CPUSetKind_Prepare( ctx, ctx->Map.pcs[ 1 ] );
- RtemsIntrReqSetAffinity_Pre_CPUSet_Prepare( ctx, ctx->Map.pcs[ 2 ] );
- RtemsIntrReqSetAffinity_Pre_CanSetAffinity_Prepare(
- ctx,
- ctx->Map.entry.Pre_CanSetAffinity_NA ? RtemsIntrReqSetAffinity_Pre_CanSetAffinity_NA : ctx->Map.pcs[ 3 ]
- );
+ RtemsIntrReqSetAffinity_Pre_CPUSetSize_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsIntrReqSetAffinity_Pre_CPUSetOnline_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsIntrReqSetAffinity_Pre_CPUSetHuge_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsIntrReqSetAffinity_Pre_CPUSet_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsIntrReqSetAffinity_Pre_CanSetAffinity_Prepare( ctx, ctx->Map.pcs[ 5 ] );
RtemsIntrReqSetAffinity_Action( ctx );
RtemsIntrReqSetAffinity_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
RtemsIntrReqSetAffinity_Post_SetAffinity_Check(
@@ -659,28 +799,41 @@ T_TEST_CASE_FIXTURE(
ctx->Map.index = 0;
for (
- ctx->Map.pcs[ 0 ] = RtemsIntrReqSetAffinity_Pre_Vector_Valid;
- ctx->Map.pcs[ 0 ] < RtemsIntrReqSetAffinity_Pre_Vector_NA;
- ++ctx->Map.pcs[ 0 ]
+ ctx->Map.pci[ 0 ] = RtemsIntrReqSetAffinity_Pre_Vector_Valid;
+ ctx->Map.pci[ 0 ] < RtemsIntrReqSetAffinity_Pre_Vector_NA;
+ ++ctx->Map.pci[ 0 ]
) {
for (
- ctx->Map.pcs[ 1 ] = RtemsIntrReqSetAffinity_Pre_CPUSetKind_Valid;
- ctx->Map.pcs[ 1 ] < RtemsIntrReqSetAffinity_Pre_CPUSetKind_NA;
- ++ctx->Map.pcs[ 1 ]
+ ctx->Map.pci[ 1 ] = RtemsIntrReqSetAffinity_Pre_CPUSetSize_Askew;
+ ctx->Map.pci[ 1 ] < RtemsIntrReqSetAffinity_Pre_CPUSetSize_NA;
+ ++ctx->Map.pci[ 1 ]
) {
for (
- ctx->Map.pcs[ 2 ] = RtemsIntrReqSetAffinity_Pre_CPUSet_Valid;
- ctx->Map.pcs[ 2 ] < RtemsIntrReqSetAffinity_Pre_CPUSet_NA;
- ++ctx->Map.pcs[ 2 ]
+ ctx->Map.pci[ 2 ] = RtemsIntrReqSetAffinity_Pre_CPUSetOnline_Valid;
+ ctx->Map.pci[ 2 ] < RtemsIntrReqSetAffinity_Pre_CPUSetOnline_NA;
+ ++ctx->Map.pci[ 2 ]
) {
for (
- ctx->Map.pcs[ 3 ] = RtemsIntrReqSetAffinity_Pre_CanSetAffinity_Yes;
- ctx->Map.pcs[ 3 ] < RtemsIntrReqSetAffinity_Pre_CanSetAffinity_NA;
- ++ctx->Map.pcs[ 3 ]
+ ctx->Map.pci[ 3 ] = RtemsIntrReqSetAffinity_Pre_CPUSetHuge_NotZero;
+ ctx->Map.pci[ 3 ] < RtemsIntrReqSetAffinity_Pre_CPUSetHuge_NA;
+ ++ctx->Map.pci[ 3 ]
) {
- ctx->Map.entry = RtemsIntrReqSetAffinity_PopEntry( ctx );
- RtemsIntrReqSetAffinity_Prepare( ctx );
- RtemsIntrReqSetAffinity_TestVariant( ctx );
+ for (
+ ctx->Map.pci[ 4 ] = RtemsIntrReqSetAffinity_Pre_CPUSet_Valid;
+ ctx->Map.pci[ 4 ] < RtemsIntrReqSetAffinity_Pre_CPUSet_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ for (
+ ctx->Map.pci[ 5 ] = RtemsIntrReqSetAffinity_Pre_CanSetAffinity_Yes;
+ ctx->Map.pci[ 5 ] < RtemsIntrReqSetAffinity_Pre_CanSetAffinity_NA;
+ ++ctx->Map.pci[ 5 ]
+ ) {
+ ctx->Map.entry = RtemsIntrReqSetAffinity_PopEntry( ctx );
+ RtemsIntrReqSetAffinity_SetPreConditionStates( ctx );
+ RtemsIntrReqSetAffinity_Prepare( ctx );
+ RtemsIntrReqSetAffinity_TestVariant( ctx );
+ }
+ }
}
}
}
diff --git a/testsuites/validation/tc-intr-smp-only.c b/testsuites/validation/tc-intr-smp-only.c
new file mode 100644
index 0000000000..4d1f64b699
--- /dev/null
+++ b/testsuites/validation/tc-intr-smp-only.c
@@ -0,0 +1,225 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsIntrValIntrSmpOnly
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsIntrValIntrSmpOnly spec:/rtems/intr/val/intr-smp-only
+ *
+ * @ingroup TestsuitesValidationSmpOnly0
+ *
+ * @brief Tests some @ref RTEMSAPIClassicIntr directives.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate the interrupt lock directives.
+ *
+ * - Check that RTEMS_INTERRUPT_LOCK_REFERENCE() expanded to a lock reference
+ * definition. Check that the lock is available after static
+ * initialization.
+ *
+ * - Check that the lock is available after initialization.
+ *
+ * - Check that maskable interrupts are disabled before the call to
+ * rtems_interrupt_lock_interrupt_disable() and disabled afterwards.
+ *
+ * - Check that the maskable interrupt status is not changed by the
+ * rtems_interrupt_lock_acquire_isr() call. Check that the lock is no
+ * longer available.
+ *
+ * - Check that the maskable interrupt status is restored by the call to
+ * rtems_interrupt_lock_release() according to the ``_lock_context``
+ * parameter. Check that the lock is available afterwards.
+ *
+ * - Check that the maskable interrupt status is not changed by the
+ * rtems_interrupt_lock_destroy() call.
+ *
+ * - Initialize the lock using rtems_interrupt_lock_initialize(). Check that
+ * the lock is available after initialization.
+ *
+ * - Check that maskable interrupts are disabled before the call to
+ * rtems_interrupt_lock_acquire() and disabled afterwards. Check that the
+ * lock is no longer available.
+ *
+ * - Check that the maskable interrupt status is restored by the call to
+ * rtems_interrupt_lock_release() according to the ``_lock_context``
+ * parameter. Check that the lock is available afterwards.
+ *
+ * - Check that the maskable interrupt status is not changed by the
+ * rtems_interrupt_lock_destroy() call.
+ *
+ * @{
+ */
+
+RTEMS_INTERRUPT_LOCK_DECLARE( static, the_lock )
+RTEMS_INTERRUPT_LOCK_DEFINE( static, the_lock, "name " )
+
+/**
+ * @brief Validate the interrupt lock directives.
+ */
+static void RtemsIntrValIntrSmpOnly_Action_0( void )
+{
+ struct {
+ int a;
+ RTEMS_INTERRUPT_LOCK_MEMBER( member )
+ int b;
+ } lock = {
+ .member = RTEMS_INTERRUPT_LOCK_INITIALIZER( "name" )
+ };
+
+ RTEMS_INTERRUPT_LOCK_REFERENCE( ref, &the_lock )
+ rtems_interrupt_lock_context lock_context;
+
+ /*
+ * Check that RTEMS_INTERRUPT_LOCK_REFERENCE() expanded to a lock reference
+ * definition. Check that the lock is available after static initialization.
+ */
+ T_true( ISRLockIsAvailable( ref ) );
+
+ /*
+ * Check that the lock is available after initialization.
+ */
+ T_true( ISRLockIsAvailable( &lock.member ) );
+
+ /*
+ * Check that maskable interrupts are disabled before the call to
+ * rtems_interrupt_lock_interrupt_disable() and disabled afterwards.
+ */
+ T_true( AreInterruptsEnabled() );
+ T_true( ISRLockIsAvailable( &lock.member ) );
+ rtems_interrupt_lock_interrupt_disable( &lock_context );
+ T_false( AreInterruptsEnabled() );
+ T_true( ISRLockIsAvailable( &lock.member ) );
+
+ /*
+ * Check that the maskable interrupt status is not changed by the
+ * rtems_interrupt_lock_acquire_isr() call. Check that the lock is no longer
+ * available.
+ */
+ T_false( AreInterruptsEnabled() );
+ T_true( ISRLockIsAvailable( &lock.member ) );
+ rtems_interrupt_lock_acquire_isr( &lock.member, &lock_context );
+ T_false( AreInterruptsEnabled() );
+ T_false( ISRLockIsAvailable( &lock.member ) );
+
+ /*
+ * Check that the maskable interrupt status is restored by the call to
+ * rtems_interrupt_lock_release() according to the ``_lock_context``
+ * parameter. Check that the lock is available afterwards.
+ */
+ T_false( AreInterruptsEnabled() );
+ T_false( ISRLockIsAvailable( &lock.member ) );
+ rtems_interrupt_lock_release( &lock.member, &lock_context );
+ T_true( AreInterruptsEnabled() );
+ T_true( ISRLockIsAvailable( &lock.member ) );
+
+ /*
+ * Check that the maskable interrupt status is not changed by the
+ * rtems_interrupt_lock_destroy() call.
+ */
+ T_true( AreInterruptsEnabled() );
+ rtems_interrupt_lock_destroy( &lock.member );
+ T_true( AreInterruptsEnabled() );
+
+ /*
+ * Initialize the lock using rtems_interrupt_lock_initialize(). Check that
+ * the lock is available after initialization.
+ */
+ rtems_interrupt_lock_initialize( &lock.member, "name" );
+ T_true( ISRLockIsAvailable( &lock.member ) );
+
+ /*
+ * Check that maskable interrupts are disabled before the call to
+ * rtems_interrupt_lock_acquire() and disabled afterwards. Check that the
+ * lock is no longer available.
+ */
+ T_true( AreInterruptsEnabled() );
+ T_true( ISRLockIsAvailable( &lock.member ) );
+ rtems_interrupt_lock_acquire( &lock.member, &lock_context );
+ T_false( AreInterruptsEnabled() );
+ T_false( ISRLockIsAvailable( &lock.member ) );
+
+ /*
+ * Check that the maskable interrupt status is restored by the call to
+ * rtems_interrupt_lock_release() according to the ``_lock_context``
+ * parameter. Check that the lock is available afterwards.
+ */
+ T_false( AreInterruptsEnabled() );
+ T_false( ISRLockIsAvailable( &lock.member ) );
+ rtems_interrupt_lock_release( &lock.member, &lock_context );
+ T_true( AreInterruptsEnabled() );
+ T_true( ISRLockIsAvailable( &lock.member ) );
+
+ /*
+ * Check that the maskable interrupt status is not changed by the
+ * rtems_interrupt_lock_destroy() call.
+ */
+ T_true( AreInterruptsEnabled() );
+ rtems_interrupt_lock_destroy( &lock.member );
+ T_true( AreInterruptsEnabled() );
+}
+
+/**
+ * @fn void T_case_body_RtemsIntrValIntrSmpOnly( void )
+ */
+T_TEST_CASE( RtemsIntrValIntrSmpOnly )
+{
+ RtemsIntrValIntrSmpOnly_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-intr-vector-disable.c b/testsuites/validation/tc-intr-vector-disable.c
index fea05a257a..013befeff8 100644
--- a/testsuites/validation/tc-intr-vector-disable.c
+++ b/testsuites/validation/tc-intr-vector-disable.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsIntrReqVectorDisable
+ * @ingroup RtemsIntrReqVectorDisable
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,10 +61,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsIntrReqVectorDisable \
- * spec:/rtems/intr/req/vector-disable
+ * @defgroup RtemsIntrReqVectorDisable spec:/rtems/intr/req/vector-disable
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationIntr
*
* @{
*/
@@ -139,6 +138,12 @@ typedef struct {
struct {
/**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 3 ];
+
+ /**
* @brief This member defines the pre-condition states for the next action.
*/
size_t pcs[ 3 ];
@@ -594,19 +599,32 @@ RtemsIntrReqVectorDisable_PopEntry( RtemsIntrReqVectorDisable_Context *ctx )
];
}
+static void RtemsIntrReqVectorDisable_SetPreConditionStates(
+ RtemsIntrReqVectorDisable_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_IsEnabled_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsIntrReqVectorDisable_Pre_IsEnabled_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+
+ if ( ctx->Map.entry.Pre_CanDisable_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsIntrReqVectorDisable_Pre_CanDisable_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+}
+
static void RtemsIntrReqVectorDisable_TestVariant(
RtemsIntrReqVectorDisable_Context *ctx
)
{
RtemsIntrReqVectorDisable_Pre_Vector_Prepare( ctx, ctx->Map.pcs[ 0 ] );
- RtemsIntrReqVectorDisable_Pre_IsEnabled_Prepare(
- ctx,
- ctx->Map.entry.Pre_IsEnabled_NA ? RtemsIntrReqVectorDisable_Pre_IsEnabled_NA : ctx->Map.pcs[ 1 ]
- );
- RtemsIntrReqVectorDisable_Pre_CanDisable_Prepare(
- ctx,
- ctx->Map.entry.Pre_CanDisable_NA ? RtemsIntrReqVectorDisable_Pre_CanDisable_NA : ctx->Map.pcs[ 2 ]
- );
+ RtemsIntrReqVectorDisable_Pre_IsEnabled_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsIntrReqVectorDisable_Pre_CanDisable_Prepare( ctx, ctx->Map.pcs[ 2 ] );
RtemsIntrReqVectorDisable_Action( ctx );
RtemsIntrReqVectorDisable_Post_Status_Check(
ctx,
@@ -633,21 +651,22 @@ T_TEST_CASE_FIXTURE(
ctx->Map.index = 0;
for (
- ctx->Map.pcs[ 0 ] = RtemsIntrReqVectorDisable_Pre_Vector_Valid;
- ctx->Map.pcs[ 0 ] < RtemsIntrReqVectorDisable_Pre_Vector_NA;
- ++ctx->Map.pcs[ 0 ]
+ ctx->Map.pci[ 0 ] = RtemsIntrReqVectorDisable_Pre_Vector_Valid;
+ ctx->Map.pci[ 0 ] < RtemsIntrReqVectorDisable_Pre_Vector_NA;
+ ++ctx->Map.pci[ 0 ]
) {
for (
- ctx->Map.pcs[ 1 ] = RtemsIntrReqVectorDisable_Pre_IsEnabled_Yes;
- ctx->Map.pcs[ 1 ] < RtemsIntrReqVectorDisable_Pre_IsEnabled_NA;
- ++ctx->Map.pcs[ 1 ]
+ ctx->Map.pci[ 1 ] = RtemsIntrReqVectorDisable_Pre_IsEnabled_Yes;
+ ctx->Map.pci[ 1 ] < RtemsIntrReqVectorDisable_Pre_IsEnabled_NA;
+ ++ctx->Map.pci[ 1 ]
) {
for (
- ctx->Map.pcs[ 2 ] = RtemsIntrReqVectorDisable_Pre_CanDisable_Yes;
- ctx->Map.pcs[ 2 ] < RtemsIntrReqVectorDisable_Pre_CanDisable_NA;
- ++ctx->Map.pcs[ 2 ]
+ ctx->Map.pci[ 2 ] = RtemsIntrReqVectorDisable_Pre_CanDisable_Yes;
+ ctx->Map.pci[ 2 ] < RtemsIntrReqVectorDisable_Pre_CanDisable_NA;
+ ++ctx->Map.pci[ 2 ]
) {
ctx->Map.entry = RtemsIntrReqVectorDisable_PopEntry( ctx );
+ RtemsIntrReqVectorDisable_SetPreConditionStates( ctx );
RtemsIntrReqVectorDisable_TestVariant( ctx );
}
}
diff --git a/testsuites/validation/tc-intr-vector-enable.c b/testsuites/validation/tc-intr-vector-enable.c
index c0d985a9d0..91993fb8d4 100644
--- a/testsuites/validation/tc-intr-vector-enable.c
+++ b/testsuites/validation/tc-intr-vector-enable.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsIntrReqVectorEnable
+ * @ingroup RtemsIntrReqVectorEnable
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,10 +61,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsIntrReqVectorEnable \
- * spec:/rtems/intr/req/vector-enable
+ * @defgroup RtemsIntrReqVectorEnable spec:/rtems/intr/req/vector-enable
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationIntr
*
* @{
*/
@@ -139,6 +138,12 @@ typedef struct {
struct {
/**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 3 ];
+
+ /**
* @brief This member defines the pre-condition states for the next action.
*/
size_t pcs[ 3 ];
@@ -362,7 +367,7 @@ static void RtemsIntrReqVectorEnable_Pre_IsEnabled_Prepare(
case RtemsIntrReqVectorEnable_Pre_IsEnabled_No: {
/*
* While the interrupt vector associated with the ``vector`` parameter is
- * enabled.
+ * disabled.
*/
/*
* This pre-condition depends on the attributes of an interrupt vector,
@@ -600,19 +605,32 @@ static inline RtemsIntrReqVectorEnable_Entry RtemsIntrReqVectorEnable_PopEntry(
];
}
+static void RtemsIntrReqVectorEnable_SetPreConditionStates(
+ RtemsIntrReqVectorEnable_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_IsEnabled_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsIntrReqVectorEnable_Pre_IsEnabled_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+
+ if ( ctx->Map.entry.Pre_CanEnable_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsIntrReqVectorEnable_Pre_CanEnable_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+}
+
static void RtemsIntrReqVectorEnable_TestVariant(
RtemsIntrReqVectorEnable_Context *ctx
)
{
RtemsIntrReqVectorEnable_Pre_Vector_Prepare( ctx, ctx->Map.pcs[ 0 ] );
- RtemsIntrReqVectorEnable_Pre_IsEnabled_Prepare(
- ctx,
- ctx->Map.entry.Pre_IsEnabled_NA ? RtemsIntrReqVectorEnable_Pre_IsEnabled_NA : ctx->Map.pcs[ 1 ]
- );
- RtemsIntrReqVectorEnable_Pre_CanEnable_Prepare(
- ctx,
- ctx->Map.entry.Pre_CanEnable_NA ? RtemsIntrReqVectorEnable_Pre_CanEnable_NA : ctx->Map.pcs[ 2 ]
- );
+ RtemsIntrReqVectorEnable_Pre_IsEnabled_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsIntrReqVectorEnable_Pre_CanEnable_Prepare( ctx, ctx->Map.pcs[ 2 ] );
RtemsIntrReqVectorEnable_Action( ctx );
RtemsIntrReqVectorEnable_Post_Status_Check(
ctx,
@@ -639,21 +657,22 @@ T_TEST_CASE_FIXTURE(
ctx->Map.index = 0;
for (
- ctx->Map.pcs[ 0 ] = RtemsIntrReqVectorEnable_Pre_Vector_Valid;
- ctx->Map.pcs[ 0 ] < RtemsIntrReqVectorEnable_Pre_Vector_NA;
- ++ctx->Map.pcs[ 0 ]
+ ctx->Map.pci[ 0 ] = RtemsIntrReqVectorEnable_Pre_Vector_Valid;
+ ctx->Map.pci[ 0 ] < RtemsIntrReqVectorEnable_Pre_Vector_NA;
+ ++ctx->Map.pci[ 0 ]
) {
for (
- ctx->Map.pcs[ 1 ] = RtemsIntrReqVectorEnable_Pre_IsEnabled_Yes;
- ctx->Map.pcs[ 1 ] < RtemsIntrReqVectorEnable_Pre_IsEnabled_NA;
- ++ctx->Map.pcs[ 1 ]
+ ctx->Map.pci[ 1 ] = RtemsIntrReqVectorEnable_Pre_IsEnabled_Yes;
+ ctx->Map.pci[ 1 ] < RtemsIntrReqVectorEnable_Pre_IsEnabled_NA;
+ ++ctx->Map.pci[ 1 ]
) {
for (
- ctx->Map.pcs[ 2 ] = RtemsIntrReqVectorEnable_Pre_CanEnable_Yes;
- ctx->Map.pcs[ 2 ] < RtemsIntrReqVectorEnable_Pre_CanEnable_NA;
- ++ctx->Map.pcs[ 2 ]
+ ctx->Map.pci[ 2 ] = RtemsIntrReqVectorEnable_Pre_CanEnable_Yes;
+ ctx->Map.pci[ 2 ] < RtemsIntrReqVectorEnable_Pre_CanEnable_NA;
+ ++ctx->Map.pci[ 2 ]
) {
ctx->Map.entry = RtemsIntrReqVectorEnable_PopEntry( ctx );
+ RtemsIntrReqVectorEnable_SetPreConditionStates( ctx );
RtemsIntrReqVectorEnable_TestVariant( ctx );
}
}
diff --git a/testsuites/validation/tc-intr-vector-is-enabled.c b/testsuites/validation/tc-intr-vector-is-enabled.c
index de1d0c2ebb..d24ad3f602 100644
--- a/testsuites/validation/tc-intr-vector-is-enabled.c
+++ b/testsuites/validation/tc-intr-vector-is-enabled.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsIntrReqVectorIsEnabled
+ * @ingroup RtemsIntrReqVectorIsEnabled
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,10 +61,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsIntrReqVectorIsEnabled \
- * spec:/rtems/intr/req/vector-is-enabled
+ * @defgroup RtemsIntrReqVectorIsEnabled spec:/rtems/intr/req/vector-is-enabled
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationIntr
*
* @{
*/
@@ -144,7 +143,7 @@ typedef struct {
/**
* @brief This member specifies if the ``enabled`` parameter value.
*/
- bool *enabled;;
+ bool *enabled;
/**
* @brief This member contains the return value of the
@@ -154,6 +153,12 @@ typedef struct {
struct {
/**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 3 ];
+
+ /**
* @brief This member defines the pre-condition states for the next action.
*/
size_t pcs[ 3 ];
@@ -584,16 +589,27 @@ RtemsIntrReqVectorIsEnabled_PopEntry(
];
}
+static void RtemsIntrReqVectorIsEnabled_SetPreConditionStates(
+ RtemsIntrReqVectorIsEnabled_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+
+ if ( ctx->Map.entry.Pre_IsEnabled_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsIntrReqVectorIsEnabled_Pre_IsEnabled_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+}
+
static void RtemsIntrReqVectorIsEnabled_TestVariant(
RtemsIntrReqVectorIsEnabled_Context *ctx
)
{
RtemsIntrReqVectorIsEnabled_Pre_Vector_Prepare( ctx, ctx->Map.pcs[ 0 ] );
RtemsIntrReqVectorIsEnabled_Pre_Enabled_Prepare( ctx, ctx->Map.pcs[ 1 ] );
- RtemsIntrReqVectorIsEnabled_Pre_IsEnabled_Prepare(
- ctx,
- ctx->Map.entry.Pre_IsEnabled_NA ? RtemsIntrReqVectorIsEnabled_Pre_IsEnabled_NA : ctx->Map.pcs[ 2 ]
- );
+ RtemsIntrReqVectorIsEnabled_Pre_IsEnabled_Prepare( ctx, ctx->Map.pcs[ 2 ] );
RtemsIntrReqVectorIsEnabled_Action( ctx );
RtemsIntrReqVectorIsEnabled_Post_Status_Check(
ctx,
@@ -620,21 +636,22 @@ T_TEST_CASE_FIXTURE(
ctx->Map.index = 0;
for (
- ctx->Map.pcs[ 0 ] = RtemsIntrReqVectorIsEnabled_Pre_Vector_Valid;
- ctx->Map.pcs[ 0 ] < RtemsIntrReqVectorIsEnabled_Pre_Vector_NA;
- ++ctx->Map.pcs[ 0 ]
+ ctx->Map.pci[ 0 ] = RtemsIntrReqVectorIsEnabled_Pre_Vector_Valid;
+ ctx->Map.pci[ 0 ] < RtemsIntrReqVectorIsEnabled_Pre_Vector_NA;
+ ++ctx->Map.pci[ 0 ]
) {
for (
- ctx->Map.pcs[ 1 ] = RtemsIntrReqVectorIsEnabled_Pre_Enabled_Obj;
- ctx->Map.pcs[ 1 ] < RtemsIntrReqVectorIsEnabled_Pre_Enabled_NA;
- ++ctx->Map.pcs[ 1 ]
+ ctx->Map.pci[ 1 ] = RtemsIntrReqVectorIsEnabled_Pre_Enabled_Obj;
+ ctx->Map.pci[ 1 ] < RtemsIntrReqVectorIsEnabled_Pre_Enabled_NA;
+ ++ctx->Map.pci[ 1 ]
) {
for (
- ctx->Map.pcs[ 2 ] = RtemsIntrReqVectorIsEnabled_Pre_IsEnabled_Yes;
- ctx->Map.pcs[ 2 ] < RtemsIntrReqVectorIsEnabled_Pre_IsEnabled_NA;
- ++ctx->Map.pcs[ 2 ]
+ ctx->Map.pci[ 2 ] = RtemsIntrReqVectorIsEnabled_Pre_IsEnabled_Yes;
+ ctx->Map.pci[ 2 ] < RtemsIntrReqVectorIsEnabled_Pre_IsEnabled_NA;
+ ++ctx->Map.pci[ 2 ]
) {
ctx->Map.entry = RtemsIntrReqVectorIsEnabled_PopEntry( ctx );
+ RtemsIntrReqVectorIsEnabled_SetPreConditionStates( ctx );
RtemsIntrReqVectorIsEnabled_TestVariant( ctx );
}
}
diff --git a/testsuites/validation/tc-intr.c b/testsuites/validation/tc-intr.c
new file mode 100644
index 0000000000..72ac626c97
--- /dev/null
+++ b/testsuites/validation/tc-intr.c
@@ -0,0 +1,286 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsIntrValIntr
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/irq-extension.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsIntrValIntr spec:/rtems/intr/val/intr
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests some @ref RTEMSAPIClassicIntr directives.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate rtems_interrupt_local_disable() and
+ * rtems_interrupt_local_enable().
+ *
+ * - Check that maskable interrupts are enabled before the call to
+ * rtems_interrupt_local_disable() and disabled afterwards.
+ *
+ * - Check that maskable interrupts are disabled before the call to
+ * rtems_interrupt_local_disable() and disabled afterwards.
+ *
+ * - Check that the maskable interrupt status is restored by the call to
+ * rtems_interrupt_local_enable() according to the ``_isr_cookie``
+ * parameter. In this case maskable interrupts are still disabled
+ * afterwards.
+ *
+ * - Check that the maskable interrupt status is restored by the call to
+ * rtems_interrupt_local_enable() according to the ``_isr_cookie``
+ * parameter. In this case maskable interrupts are enabled afterwards.
+ *
+ * - Validate the interrupt lock directives.
+ *
+ * - Check that maskable interrupts are disabled before the call to
+ * rtems_interrupt_lock_interrupt_disable() and disabled afterwards.
+ *
+ * - Check that the maskable interrupt status is not changed by the
+ * rtems_interrupt_lock_acquire_isr() call.
+ *
+ * - Check that the maskable interrupt status is restored by the call to
+ * rtems_interrupt_lock_release() according to the ``_lock_context``
+ * parameter.
+ *
+ * - Check that maskable interrupts are disabled before the call to
+ * rtems_interrupt_lock_acquire() and disabled afterwards.
+ *
+ * - Check that the maskable interrupt status is restored by the call to
+ * rtems_interrupt_lock_release() according to the ``_lock_context``
+ * parameter.
+ *
+ * - Check that the maskable interrupt status is not changed by the
+ * rtems_interrupt_lock_destroy() call.
+ *
+ * - Validate the interrupt entry initialization.
+ *
+ * - Check that the entry is properly initialized by
+ * RTEMS_INTERRUPT_ENTRY_INITIALIZER().
+ *
+ * - Call rtems_interrupt_entry_initialize(). Check that the entry is
+ * properly initialized by rtems_interrupt_entry_initialize().
+ *
+ * @{
+ */
+
+static void EntryRoutine( void *arg )
+{
+ (void) arg;
+}
+
+static void EntryRoutine2( void *arg )
+{
+ (void) arg;
+}
+
+/**
+ * @brief Validate rtems_interrupt_local_disable() and
+ * rtems_interrupt_local_enable().
+ */
+static void RtemsIntrValIntr_Action_0( void )
+{
+ rtems_interrupt_level level;
+ rtems_interrupt_level level_2;
+
+ /*
+ * Check that maskable interrupts are enabled before the call to
+ * rtems_interrupt_local_disable() and disabled afterwards.
+ */
+ T_true( AreInterruptsEnabled() );
+ rtems_interrupt_local_disable( level );
+ T_false( AreInterruptsEnabled() );
+
+ /*
+ * Check that maskable interrupts are disabled before the call to
+ * rtems_interrupt_local_disable() and disabled afterwards.
+ */
+ T_false( AreInterruptsEnabled() );
+ rtems_interrupt_local_disable( level_2 );
+ T_false( AreInterruptsEnabled() );
+
+ /*
+ * Check that the maskable interrupt status is restored by the call to
+ * rtems_interrupt_local_enable() according to the ``_isr_cookie`` parameter.
+ * In this case maskable interrupts are still disabled afterwards.
+ */
+ T_false( AreInterruptsEnabled() );
+ rtems_interrupt_local_enable( level_2 );
+ T_false( AreInterruptsEnabled() );
+
+ /*
+ * Check that the maskable interrupt status is restored by the call to
+ * rtems_interrupt_local_enable() according to the ``_isr_cookie`` parameter.
+ * In this case maskable interrupts are enabled afterwards.
+ */
+ T_false( AreInterruptsEnabled() );
+ rtems_interrupt_local_enable( level );
+ T_true( AreInterruptsEnabled() );
+}
+
+/**
+ * @brief Validate the interrupt lock directives.
+ */
+static void RtemsIntrValIntr_Action_1( void )
+{
+ RTEMS_INTERRUPT_LOCK_DEFINE( , lock, "name" );
+ rtems_interrupt_lock_context lock_context;
+
+ /*
+ * Check that maskable interrupts are disabled before the call to
+ * rtems_interrupt_lock_interrupt_disable() and disabled afterwards.
+ */
+ T_true( AreInterruptsEnabled() );
+ rtems_interrupt_lock_interrupt_disable( &lock_context );
+ T_false( AreInterruptsEnabled() );
+
+ /*
+ * Check that the maskable interrupt status is not changed by the
+ * rtems_interrupt_lock_acquire_isr() call.
+ */
+ T_false( AreInterruptsEnabled() );
+ rtems_interrupt_lock_acquire_isr( &lock, &lock_context );
+ T_false( AreInterruptsEnabled() );
+
+ /*
+ * Check that the maskable interrupt status is restored by the call to
+ * rtems_interrupt_lock_release() according to the ``_lock_context``
+ * parameter.
+ */
+ T_false( AreInterruptsEnabled() );
+ rtems_interrupt_lock_release( &lock, &lock_context );
+ T_true( AreInterruptsEnabled() );
+
+ /*
+ * Check that maskable interrupts are disabled before the call to
+ * rtems_interrupt_lock_acquire() and disabled afterwards.
+ */
+ T_true( AreInterruptsEnabled() );
+ rtems_interrupt_lock_acquire( &lock, &lock_context );
+ T_false( AreInterruptsEnabled() );
+
+ /*
+ * Check that the maskable interrupt status is restored by the call to
+ * rtems_interrupt_lock_release() according to the ``_lock_context``
+ * parameter.
+ */
+ T_false( AreInterruptsEnabled() );
+ rtems_interrupt_lock_release( &lock, &lock_context );
+ T_true( AreInterruptsEnabled() );
+
+ /*
+ * Check that the maskable interrupt status is not changed by the
+ * rtems_interrupt_lock_destroy() call.
+ */
+ T_true( AreInterruptsEnabled() );
+ rtems_interrupt_lock_destroy( &lock );
+ T_true( AreInterruptsEnabled() );
+}
+
+/**
+ * @brief Validate the interrupt entry initialization.
+ */
+static void RtemsIntrValIntr_Action_2( void )
+{
+ int entry_arg;
+ int entry_arg_2;
+ const char entry_info[] = "1";
+ const char entry_info_2[] = "1";
+ rtems_interrupt_entry entry = RTEMS_INTERRUPT_ENTRY_INITIALIZER(
+ EntryRoutine,
+ &entry_arg,
+ entry_info
+ );
+
+ /*
+ * Check that the entry is properly initialized by
+ * RTEMS_INTERRUPT_ENTRY_INITIALIZER().
+ */
+ T_eq_ptr( entry.handler, EntryRoutine );
+ T_eq_ptr( entry.arg, &entry_arg );
+ T_eq_ptr( entry.next, NULL );
+ T_eq_ptr( entry.info, entry_info );
+
+ /*
+ * Call rtems_interrupt_entry_initialize(). Check that the entry is properly
+ * initialized by rtems_interrupt_entry_initialize().
+ */
+ entry.next = &entry;
+ rtems_interrupt_entry_initialize(
+ &entry,
+ EntryRoutine2,
+ &entry_arg_2,
+ entry_info_2
+ );
+ T_eq_ptr( entry.handler, EntryRoutine2 );
+ T_eq_ptr( entry.arg, &entry_arg_2 );
+ T_eq_ptr( entry.next, NULL );
+ T_eq_ptr( entry.info, entry_info_2 );
+}
+
+/**
+ * @fn void T_case_body_RtemsIntrValIntr( void )
+ */
+T_TEST_CASE( RtemsIntrValIntr )
+{
+ RtemsIntrValIntr_Action_0();
+ RtemsIntrValIntr_Action_1();
+ RtemsIntrValIntr_Action_2();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-io-getchark.c b/testsuites/validation/tc-io-getchark.c
new file mode 100644
index 0000000000..20aede7fd9
--- /dev/null
+++ b/testsuites/validation/tc-io-getchark.c
@@ -0,0 +1,328 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsIoReqGetchark
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/bspIo.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsIoReqGetchark spec:/rtems/io/req/getchark
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsIoReqGetchark_Pre_PollChar_Valid,
+ RtemsIoReqGetchark_Pre_PollChar_Null,
+ RtemsIoReqGetchark_Pre_PollChar_NA
+} RtemsIoReqGetchark_Pre_PollChar;
+
+typedef enum {
+ RtemsIoReqGetchark_Post_Result_PollChar,
+ RtemsIoReqGetchark_Post_Result_MinusOne,
+ RtemsIoReqGetchark_Post_Result_NA
+} RtemsIoReqGetchark_Post_Result;
+
+typedef enum {
+ RtemsIoReqGetchark_Post_Calls_Once,
+ RtemsIoReqGetchark_Post_Calls_NA
+} RtemsIoReqGetchark_Post_Calls;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_PollChar_NA : 1;
+ uint8_t Post_Result : 2;
+ uint8_t Post_Calls : 1;
+} RtemsIoReqGetchark_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/io/req/getchark test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the character input count.
+ */
+ size_t input_count;
+
+ /**
+ * @brief This member specifies the value for BSP_poll_char.
+ */
+ BSP_polling_getchar_function_type poll_char;
+
+ /**
+ * @brief This member contains the return value of the getchark() call.
+ */
+ int result;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsIoReqGetchark_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsIoReqGetchark_Context;
+
+static RtemsIoReqGetchark_Context
+ RtemsIoReqGetchark_Instance;
+
+static const char * const RtemsIoReqGetchark_PreDesc_PollChar[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsIoReqGetchark_PreDesc[] = {
+ RtemsIoReqGetchark_PreDesc_PollChar,
+ NULL
+};
+
+typedef RtemsIoReqGetchark_Context Context;
+
+static int PollChar( void )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ ++ctx->input_count;
+
+ return 123;
+}
+
+static void RtemsIoReqGetchark_Pre_PollChar_Prepare(
+ RtemsIoReqGetchark_Context *ctx,
+ RtemsIoReqGetchark_Pre_PollChar state
+)
+{
+ switch ( state ) {
+ case RtemsIoReqGetchark_Pre_PollChar_Valid: {
+ /*
+ * While BSP_poll_char references a function.
+ */
+ ctx->poll_char = PollChar;
+ break;
+ }
+
+ case RtemsIoReqGetchark_Pre_PollChar_Null: {
+ /*
+ * While BSP_poll_char is equal to NULL.
+ */
+ ctx->poll_char = NULL;
+ break;
+ }
+
+ case RtemsIoReqGetchark_Pre_PollChar_NA:
+ break;
+ }
+}
+
+static void RtemsIoReqGetchark_Post_Result_Check(
+ RtemsIoReqGetchark_Context *ctx,
+ RtemsIoReqGetchark_Post_Result state
+)
+{
+ switch ( state ) {
+ case RtemsIoReqGetchark_Post_Result_PollChar: {
+ /*
+ * The return value of getchark() shall be the return value of the
+ * function referenced by BSP_poll_char.
+ */
+ T_eq_int( ctx->result, 123 );
+ break;
+ }
+
+ case RtemsIoReqGetchark_Post_Result_MinusOne: {
+ /*
+ * The return value of getchark() shall be minus one.
+ */
+ T_eq_int( ctx->result, -1 );
+ T_eq_u32( ctx->input_count, 0 );
+ break;
+ }
+
+ case RtemsIoReqGetchark_Post_Result_NA:
+ break;
+ }
+}
+
+static void RtemsIoReqGetchark_Post_Calls_Check(
+ RtemsIoReqGetchark_Context *ctx,
+ RtemsIoReqGetchark_Post_Calls state
+)
+{
+ switch ( state ) {
+ case RtemsIoReqGetchark_Post_Calls_Once: {
+ /*
+ * The function referenced by BSP_poll_char shall be called exactly once
+ * to get the return value for getchark().
+ */
+ T_eq_u32( ctx->input_count, 1 );
+ break;
+ }
+
+ case RtemsIoReqGetchark_Post_Calls_NA:
+ break;
+ }
+}
+
+static void RtemsIoReqGetchark_Action( RtemsIoReqGetchark_Context *ctx )
+{
+ BSP_polling_getchar_function_type poll_char;
+
+ ctx->input_count = 0;
+ poll_char = BSP_poll_char;
+ BSP_poll_char = ctx->poll_char;
+ ctx->result = getchark();
+ BSP_poll_char = poll_char;
+}
+
+static const RtemsIoReqGetchark_Entry
+RtemsIoReqGetchark_Entries[] = {
+ { 0, 0, RtemsIoReqGetchark_Post_Result_PollChar,
+ RtemsIoReqGetchark_Post_Calls_Once },
+ { 0, 0, RtemsIoReqGetchark_Post_Result_MinusOne,
+ RtemsIoReqGetchark_Post_Calls_NA }
+};
+
+static const uint8_t
+RtemsIoReqGetchark_Map[] = {
+ 0, 1
+};
+
+static size_t RtemsIoReqGetchark_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsIoReqGetchark_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsIoReqGetchark_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsIoReqGetchark_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsIoReqGetchark_Scope,
+ .initial_context = &RtemsIoReqGetchark_Instance
+};
+
+static inline RtemsIoReqGetchark_Entry RtemsIoReqGetchark_PopEntry(
+ RtemsIoReqGetchark_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsIoReqGetchark_Entries[
+ RtemsIoReqGetchark_Map[ index ]
+ ];
+}
+
+static void RtemsIoReqGetchark_TestVariant( RtemsIoReqGetchark_Context *ctx )
+{
+ RtemsIoReqGetchark_Pre_PollChar_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsIoReqGetchark_Action( ctx );
+ RtemsIoReqGetchark_Post_Result_Check( ctx, ctx->Map.entry.Post_Result );
+ RtemsIoReqGetchark_Post_Calls_Check( ctx, ctx->Map.entry.Post_Calls );
+}
+
+/**
+ * @fn void T_case_body_RtemsIoReqGetchark( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsIoReqGetchark, &RtemsIoReqGetchark_Fixture )
+{
+ RtemsIoReqGetchark_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsIoReqGetchark_Pre_PollChar_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsIoReqGetchark_Pre_PollChar_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = RtemsIoReqGetchark_PopEntry( ctx );
+ RtemsIoReqGetchark_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-io-put-char.c b/testsuites/validation/tc-io-put-char.c
new file mode 100644
index 0000000000..671eed9835
--- /dev/null
+++ b/testsuites/validation/tc-io-put-char.c
@@ -0,0 +1,319 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsIoReqPutChar
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/bspIo.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsIoReqPutChar spec:/rtems/io/req/put-char
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsIoReqPutChar_Pre_Char_Nl,
+ RtemsIoReqPutChar_Pre_Char_Other,
+ RtemsIoReqPutChar_Pre_Char_NA
+} RtemsIoReqPutChar_Pre_Char;
+
+typedef enum {
+ RtemsIoReqPutChar_Post_Output_CrNl,
+ RtemsIoReqPutChar_Post_Output_Other,
+ RtemsIoReqPutChar_Post_Output_NA
+} RtemsIoReqPutChar_Post_Output;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Char_NA : 1;
+ uint8_t Post_Output : 2;
+} RtemsIoReqPutChar_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/io/req/put-char test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the character output.
+ */
+ int output[ 2 ];
+
+ /**
+ * @brief This member contains the character output count.
+ */
+ size_t output_count;
+
+ /**
+ * @brief This member specifies if the ``c`` parameter value.
+ */
+ int character;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsIoReqPutChar_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsIoReqPutChar_Context;
+
+static RtemsIoReqPutChar_Context
+ RtemsIoReqPutChar_Instance;
+
+static const char * const RtemsIoReqPutChar_PreDesc_Char[] = {
+ "Nl",
+ "Other",
+ "NA"
+};
+
+static const char * const * const RtemsIoReqPutChar_PreDesc[] = {
+ RtemsIoReqPutChar_PreDesc_Char,
+ NULL
+};
+
+typedef RtemsIoReqPutChar_Context Context;
+
+static void Output( int value )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+
+ if ( ctx->output_count < RTEMS_ARRAY_SIZE( ctx->output ) ) {
+ ctx->output[ ctx->output_count ] = value;
+ }
+
+ ++ctx->output_count;
+}
+
+static void WrongOutput( char c )
+{
+ (void) c;
+ Output( -1 );
+}
+
+static void OutputChar( char c )
+{
+ BSP_output_char = WrongOutput;
+ Output( (unsigned char) c );
+}
+
+static void RtemsIoReqPutChar_Pre_Char_Prepare(
+ RtemsIoReqPutChar_Context *ctx,
+ RtemsIoReqPutChar_Pre_Char state
+)
+{
+ switch ( state ) {
+ case RtemsIoReqPutChar_Pre_Char_Nl: {
+ /*
+ * While the ``c`` parameter is equal to ``NL``.
+ */
+ ctx->character = '\n';
+ break;
+ }
+
+ case RtemsIoReqPutChar_Pre_Char_Other: {
+ /*
+ * While the ``c`` parameter is not equal to ``NL``.
+ */
+ ctx->character = 0xff;
+ break;
+ }
+
+ case RtemsIoReqPutChar_Pre_Char_NA:
+ break;
+ }
+}
+
+static void RtemsIoReqPutChar_Post_Output_Check(
+ RtemsIoReqPutChar_Context *ctx,
+ RtemsIoReqPutChar_Post_Output state
+)
+{
+ switch ( state ) {
+ case RtemsIoReqPutChar_Post_Output_CrNl: {
+ /*
+ * The function referenced by BSP_output_char shall be called with a
+ * ``CR`` character followed by a call with a ``NL`` character.
+ */
+ T_eq_int( ctx->output[ 0 ], (unsigned char) '\r' );
+ T_eq_int( ctx->output[ 1 ], (unsigned char) '\n' );
+ T_eq_sz( ctx->output_count, 2 );
+ break;
+ }
+
+ case RtemsIoReqPutChar_Post_Output_Other: {
+ /*
+ * The function referenced by BSP_output_char shall be called with the
+ * character specified by ``c``.
+ */
+ T_eq_int( ctx->output[ 0 ], 0xff );
+ T_eq_sz( ctx->output_count, 1 );
+ break;
+ }
+
+ case RtemsIoReqPutChar_Post_Output_NA:
+ break;
+ }
+}
+
+static void RtemsIoReqPutChar_Action( RtemsIoReqPutChar_Context *ctx )
+{
+ BSP_output_char_function_type output_char;
+
+ ctx->output[ 0 ] = -1;
+ ctx->output[ 1 ] = -1;
+ ctx->output_count = 0;
+ output_char = BSP_output_char;
+ BSP_output_char = OutputChar;
+ rtems_put_char( ctx->character, NULL );
+ BSP_output_char = output_char;
+}
+
+static const RtemsIoReqPutChar_Entry
+RtemsIoReqPutChar_Entries[] = {
+ { 0, 0, RtemsIoReqPutChar_Post_Output_CrNl },
+ { 0, 0, RtemsIoReqPutChar_Post_Output_Other }
+};
+
+static const uint8_t
+RtemsIoReqPutChar_Map[] = {
+ 0, 1
+};
+
+static size_t RtemsIoReqPutChar_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsIoReqPutChar_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsIoReqPutChar_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsIoReqPutChar_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsIoReqPutChar_Scope,
+ .initial_context = &RtemsIoReqPutChar_Instance
+};
+
+static inline RtemsIoReqPutChar_Entry RtemsIoReqPutChar_PopEntry(
+ RtemsIoReqPutChar_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsIoReqPutChar_Entries[
+ RtemsIoReqPutChar_Map[ index ]
+ ];
+}
+
+static void RtemsIoReqPutChar_TestVariant( RtemsIoReqPutChar_Context *ctx )
+{
+ RtemsIoReqPutChar_Pre_Char_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsIoReqPutChar_Action( ctx );
+ RtemsIoReqPutChar_Post_Output_Check( ctx, ctx->Map.entry.Post_Output );
+}
+
+/**
+ * @fn void T_case_body_RtemsIoReqPutChar( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsIoReqPutChar, &RtemsIoReqPutChar_Fixture )
+{
+ RtemsIoReqPutChar_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsIoReqPutChar_Pre_Char_Nl;
+ ctx->Map.pcs[ 0 ] < RtemsIoReqPutChar_Pre_Char_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = RtemsIoReqPutChar_PopEntry( ctx );
+ RtemsIoReqPutChar_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-io-putc.c b/testsuites/validation/tc-io-putc.c
new file mode 100644
index 0000000000..7b0efe2b17
--- /dev/null
+++ b/testsuites/validation/tc-io-putc.c
@@ -0,0 +1,319 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsIoReqPutc
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/bspIo.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsIoReqPutc spec:/rtems/io/req/putc
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsIoReqPutc_Pre_Char_Nl,
+ RtemsIoReqPutc_Pre_Char_Other,
+ RtemsIoReqPutc_Pre_Char_NA
+} RtemsIoReqPutc_Pre_Char;
+
+typedef enum {
+ RtemsIoReqPutc_Post_Output_CrNl,
+ RtemsIoReqPutc_Post_Output_Other,
+ RtemsIoReqPutc_Post_Output_NA
+} RtemsIoReqPutc_Post_Output;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Char_NA : 1;
+ uint8_t Post_Output : 2;
+} RtemsIoReqPutc_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/io/req/putc test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the character output.
+ */
+ int output[ 2 ];
+
+ /**
+ * @brief This member contains the character output count.
+ */
+ size_t output_count;
+
+ /**
+ * @brief This member specifies if the ``c`` parameter value.
+ */
+ char character;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsIoReqPutc_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsIoReqPutc_Context;
+
+static RtemsIoReqPutc_Context
+ RtemsIoReqPutc_Instance;
+
+static const char * const RtemsIoReqPutc_PreDesc_Char[] = {
+ "Nl",
+ "Other",
+ "NA"
+};
+
+static const char * const * const RtemsIoReqPutc_PreDesc[] = {
+ RtemsIoReqPutc_PreDesc_Char,
+ NULL
+};
+
+typedef RtemsIoReqPutc_Context Context;
+
+static void Output( int value )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+
+ if ( ctx->output_count < RTEMS_ARRAY_SIZE( ctx->output ) ) {
+ ctx->output[ ctx->output_count ] = value;
+ }
+
+ ++ctx->output_count;
+}
+
+static void WrongOutput( char c )
+{
+ (void) c;
+ Output( -1 );
+}
+
+static void OutputChar( char c )
+{
+ BSP_output_char = WrongOutput;
+ Output( (unsigned char) c );
+}
+
+static void RtemsIoReqPutc_Pre_Char_Prepare(
+ RtemsIoReqPutc_Context *ctx,
+ RtemsIoReqPutc_Pre_Char state
+)
+{
+ switch ( state ) {
+ case RtemsIoReqPutc_Pre_Char_Nl: {
+ /*
+ * While the ``c`` parameter is equal to ``NL``.
+ */
+ ctx->character = '\n';
+ break;
+ }
+
+ case RtemsIoReqPutc_Pre_Char_Other: {
+ /*
+ * While the ``c`` parameter is not equal to ``NL``.
+ */
+ ctx->character = (char) 0xff;
+ break;
+ }
+
+ case RtemsIoReqPutc_Pre_Char_NA:
+ break;
+ }
+}
+
+static void RtemsIoReqPutc_Post_Output_Check(
+ RtemsIoReqPutc_Context *ctx,
+ RtemsIoReqPutc_Post_Output state
+)
+{
+ switch ( state ) {
+ case RtemsIoReqPutc_Post_Output_CrNl: {
+ /*
+ * The function referenced by BSP_output_char shall be called with a
+ * ``CR`` character followed by a call with a ``NL`` character.
+ */
+ T_eq_int( ctx->output[ 0 ], (unsigned char) '\r' );
+ T_eq_int( ctx->output[ 1 ], (unsigned char) '\n' );
+ T_eq_sz( ctx->output_count, 2 );
+ break;
+ }
+
+ case RtemsIoReqPutc_Post_Output_Other: {
+ /*
+ * The function referenced by BSP_output_char shall be called with the
+ * character specified by ``c``.
+ */
+ T_eq_int( ctx->output[ 0 ], 0xff );
+ T_eq_sz( ctx->output_count, 1 );
+ break;
+ }
+
+ case RtemsIoReqPutc_Post_Output_NA:
+ break;
+ }
+}
+
+static void RtemsIoReqPutc_Action( RtemsIoReqPutc_Context *ctx )
+{
+ BSP_output_char_function_type output_char;
+
+ ctx->output[ 0 ] = -1;
+ ctx->output[ 1 ] = -1;
+ ctx->output_count = 0;
+ output_char = BSP_output_char;
+ BSP_output_char = OutputChar;
+ rtems_putc( ctx->character );
+ BSP_output_char = output_char;
+}
+
+static const RtemsIoReqPutc_Entry
+RtemsIoReqPutc_Entries[] = {
+ { 0, 0, RtemsIoReqPutc_Post_Output_CrNl },
+ { 0, 0, RtemsIoReqPutc_Post_Output_Other }
+};
+
+static const uint8_t
+RtemsIoReqPutc_Map[] = {
+ 0, 1
+};
+
+static size_t RtemsIoReqPutc_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsIoReqPutc_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsIoReqPutc_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsIoReqPutc_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsIoReqPutc_Scope,
+ .initial_context = &RtemsIoReqPutc_Instance
+};
+
+static inline RtemsIoReqPutc_Entry RtemsIoReqPutc_PopEntry(
+ RtemsIoReqPutc_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsIoReqPutc_Entries[
+ RtemsIoReqPutc_Map[ index ]
+ ];
+}
+
+static void RtemsIoReqPutc_TestVariant( RtemsIoReqPutc_Context *ctx )
+{
+ RtemsIoReqPutc_Pre_Char_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsIoReqPutc_Action( ctx );
+ RtemsIoReqPutc_Post_Output_Check( ctx, ctx->Map.entry.Post_Output );
+}
+
+/**
+ * @fn void T_case_body_RtemsIoReqPutc( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsIoReqPutc, &RtemsIoReqPutc_Fixture )
+{
+ RtemsIoReqPutc_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsIoReqPutc_Pre_Char_Nl;
+ ctx->Map.pcs[ 0 ] < RtemsIoReqPutc_Pre_Char_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = RtemsIoReqPutc_PopEntry( ctx );
+ RtemsIoReqPutc_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-message-broadcast.c b/testsuites/validation/tc-message-broadcast.c
new file mode 100644
index 0000000000..01de6a99b3
--- /dev/null
+++ b/testsuites/validation/tc-message-broadcast.c
@@ -0,0 +1,1203 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsMessageReqBroadcast
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsMessageReqBroadcast spec:/rtems/message/req/broadcast
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsMessageReqBroadcast_Pre_SendBuffer_Valid,
+ RtemsMessageReqBroadcast_Pre_SendBuffer_Null,
+ RtemsMessageReqBroadcast_Pre_SendBuffer_NA
+} RtemsMessageReqBroadcast_Pre_SendBuffer;
+
+typedef enum {
+ RtemsMessageReqBroadcast_Pre_Count_Valid,
+ RtemsMessageReqBroadcast_Pre_Count_Null,
+ RtemsMessageReqBroadcast_Pre_Count_NA
+} RtemsMessageReqBroadcast_Pre_Count;
+
+typedef enum {
+ RtemsMessageReqBroadcast_Pre_Id_Valid,
+ RtemsMessageReqBroadcast_Pre_Id_Invalid,
+ RtemsMessageReqBroadcast_Pre_Id_NA
+} RtemsMessageReqBroadcast_Pre_Id;
+
+typedef enum {
+ RtemsMessageReqBroadcast_Pre_MsgSize_Zero,
+ RtemsMessageReqBroadcast_Pre_MsgSize_SomeSize,
+ RtemsMessageReqBroadcast_Pre_MsgSize_MaxSize,
+ RtemsMessageReqBroadcast_Pre_MsgSize_TooLarge,
+ RtemsMessageReqBroadcast_Pre_MsgSize_NA
+} RtemsMessageReqBroadcast_Pre_MsgSize;
+
+typedef enum {
+ RtemsMessageReqBroadcast_Pre_MsgQueue_Empty,
+ RtemsMessageReqBroadcast_Pre_MsgQueue_Several,
+ RtemsMessageReqBroadcast_Pre_MsgQueue_NA
+} RtemsMessageReqBroadcast_Pre_MsgQueue;
+
+typedef enum {
+ RtemsMessageReqBroadcast_Pre_Receivers_Waiting,
+ RtemsMessageReqBroadcast_Pre_Receivers_None,
+ RtemsMessageReqBroadcast_Pre_Receivers_NA
+} RtemsMessageReqBroadcast_Pre_Receivers;
+
+typedef enum {
+ RtemsMessageReqBroadcast_Pre_Storage_Nop,
+ RtemsMessageReqBroadcast_Pre_Storage_NA
+} RtemsMessageReqBroadcast_Pre_Storage;
+
+typedef enum {
+ RtemsMessageReqBroadcast_Post_Status_Ok,
+ RtemsMessageReqBroadcast_Post_Status_InvId,
+ RtemsMessageReqBroadcast_Post_Status_InvAddr,
+ RtemsMessageReqBroadcast_Post_Status_InvSize,
+ RtemsMessageReqBroadcast_Post_Status_NA
+} RtemsMessageReqBroadcast_Post_Status;
+
+typedef enum {
+ RtemsMessageReqBroadcast_Post_Count_Zero,
+ RtemsMessageReqBroadcast_Post_Count_Set,
+ RtemsMessageReqBroadcast_Post_Count_Nop,
+ RtemsMessageReqBroadcast_Post_Count_NA
+} RtemsMessageReqBroadcast_Post_Count;
+
+typedef enum {
+ RtemsMessageReqBroadcast_Post_MsgQueue_Nop,
+ RtemsMessageReqBroadcast_Post_MsgQueue_NA
+} RtemsMessageReqBroadcast_Post_MsgQueue;
+
+typedef enum {
+ RtemsMessageReqBroadcast_Post_Receivers_Unblocked,
+ RtemsMessageReqBroadcast_Post_Receivers_Nop,
+ RtemsMessageReqBroadcast_Post_Receivers_NA
+} RtemsMessageReqBroadcast_Post_Receivers;
+
+typedef enum {
+ RtemsMessageReqBroadcast_Post_RecSize_Message,
+ RtemsMessageReqBroadcast_Post_RecSize_Nop,
+ RtemsMessageReqBroadcast_Post_RecSize_NA
+} RtemsMessageReqBroadcast_Post_RecSize;
+
+typedef enum {
+ RtemsMessageReqBroadcast_Post_RecBuffer_Message,
+ RtemsMessageReqBroadcast_Post_RecBuffer_Nop,
+ RtemsMessageReqBroadcast_Post_RecBuffer_NA
+} RtemsMessageReqBroadcast_Post_RecBuffer;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_SendBuffer_NA : 1;
+ uint32_t Pre_Count_NA : 1;
+ uint32_t Pre_Id_NA : 1;
+ uint32_t Pre_MsgSize_NA : 1;
+ uint32_t Pre_MsgQueue_NA : 1;
+ uint32_t Pre_Receivers_NA : 1;
+ uint32_t Pre_Storage_NA : 1;
+ uint32_t Post_Status : 3;
+ uint32_t Post_Count : 2;
+ uint32_t Post_MsgQueue : 1;
+ uint32_t Post_Receivers : 2;
+ uint32_t Post_RecSize : 2;
+ uint32_t Post_RecBuffer : 2;
+} RtemsMessageReqBroadcast_Entry;
+
+#define MAXIMUM_PENDING_MESSAGES 3
+#define MAXIMUM_MESSAGE_SIZE 5
+#define NUMBER_OF_WORKERS 3
+
+/**
+ * @brief Test context for spec:/rtems/message/req/broadcast test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a valid ID of a message queue.
+ */
+ rtems_id message_queue_id;
+
+ /**
+ * @brief This member is used as storage area for the message queue.
+ */
+ RTEMS_MESSAGE_QUEUE_BUFFER( MAXIMUM_MESSAGE_SIZE )
+ storage_area[ MAXIMUM_PENDING_MESSAGES ];
+
+ /**
+ * @brief This member contains a buffer to receive messages from the queue.
+ */
+ uint8_t receive_buffer[ NUMBER_OF_WORKERS ][ MAXIMUM_MESSAGE_SIZE ];
+
+ /**
+ * @brief This member contains several buffers to receive a messages size.
+ */
+ size_t receive_size[ NUMBER_OF_WORKERS ];
+
+ /**
+ * @brief This member contains the returned status codes of the receivers.
+ */
+ rtems_status_code receive_status[ NUMBER_OF_WORKERS ];
+
+ /**
+ * @brief This member specifies the ``id`` parameter of the action.
+ */
+ rtems_id id_param;
+
+ /**
+ * @brief This member specifies the ``buffer`` parameter of the action.
+ */
+ const void *buffer_param;
+
+ /**
+ * @brief This member specifies the ``size`` parameter of the action.
+ */
+ size_t size_param;
+
+ /**
+ * @brief This member specifies the ``count`` parameter of the action.
+ */
+ uint32_t *count_param;
+
+ /**
+ * @brief This member contains the returned status code of the action.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member contains the value returned in parameter ``count`` of
+ * the action.
+ */
+ uint32_t count;
+
+ /**
+ * @brief This member contains the task identifiers of the worker tasks.
+ */
+ rtems_id worker_id[ NUMBER_OF_WORKERS ];
+
+ /**
+ * @brief This member contains a pointer to a function which is executed to
+ * check that the action has not changed the content of the message queue.
+ */
+ void (*check_msgq_unchanged)( void *ctx_in );
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 7 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsMessageReqBroadcast_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsMessageReqBroadcast_Context;
+
+static RtemsMessageReqBroadcast_Context
+ RtemsMessageReqBroadcast_Instance;
+
+static const char * const RtemsMessageReqBroadcast_PreDesc_SendBuffer[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsMessageReqBroadcast_PreDesc_Count[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsMessageReqBroadcast_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsMessageReqBroadcast_PreDesc_MsgSize[] = {
+ "Zero",
+ "SomeSize",
+ "MaxSize",
+ "TooLarge",
+ "NA"
+};
+
+static const char * const RtemsMessageReqBroadcast_PreDesc_MsgQueue[] = {
+ "Empty",
+ "Several",
+ "NA"
+};
+
+static const char * const RtemsMessageReqBroadcast_PreDesc_Receivers[] = {
+ "Waiting",
+ "None",
+ "NA"
+};
+
+static const char * const RtemsMessageReqBroadcast_PreDesc_Storage[] = {
+ "Nop",
+ "NA"
+};
+
+static const char * const * const RtemsMessageReqBroadcast_PreDesc[] = {
+ RtemsMessageReqBroadcast_PreDesc_SendBuffer,
+ RtemsMessageReqBroadcast_PreDesc_Count,
+ RtemsMessageReqBroadcast_PreDesc_Id,
+ RtemsMessageReqBroadcast_PreDesc_MsgSize,
+ RtemsMessageReqBroadcast_PreDesc_MsgQueue,
+ RtemsMessageReqBroadcast_PreDesc_Receivers,
+ RtemsMessageReqBroadcast_PreDesc_Storage,
+ NULL
+};
+
+typedef RtemsMessageReqBroadcast_Context Context;
+static const rtems_interval TIMEOUT_TICKS = 1;
+static const rtems_event_set EVENT_RECEIVE = RTEMS_EVENT_17;
+static const uint8_t message[ MAXIMUM_MESSAGE_SIZE ] =
+ { 13, 42, 99, 222, 101 };
+static const uint8_t queued_message[] = { 200, 201, 202 };
+
+static void Receive( Context *ctx, size_t worker_index )
+{
+ ctx->receive_status[worker_index] = rtems_message_queue_receive(
+ ctx->message_queue_id,
+ ctx->receive_buffer[worker_index],
+ &ctx->receive_size[worker_index],
+ RTEMS_WAIT,
+ TIMEOUT_TICKS
+ );
+}
+
+static void WorkerTask( rtems_task_argument argument )
+{
+ static size_t worker_number = 0;
+ size_t worker_index = worker_number++;
+ Context *ctx = (Context *) argument;
+
+ while ( true ) {
+ ReceiveAnyEvents();
+ Receive( ctx, worker_index );
+ }
+}
+
+static void CheckForNoMessage(
+ Context *ctx,
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ (void) ctx;
+ (void) message_buffer;
+ (void) message_size;
+ T_rsc( status, RTEMS_UNSATISFIED );
+}
+
+static void CheckForMessage(
+ Context *ctx,
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ T_rsc_success( status );
+ T_eq_u32( message_size, ctx->size_param );
+ T_eq_mem( message_buffer, message, ctx->size_param );
+}
+
+static void CheckForQueuedMessage(
+ Context *ctx,
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ (void) ctx;
+ T_rsc_success( status );
+ T_eq_u32( message_size, sizeof( queued_message ) );
+ T_eq_mem( message_buffer, queued_message, sizeof( queued_message ) );
+}
+
+static void PopMessage(
+ Context *ctx,
+ void (*check_fn)(
+ Context *ctx,
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+ )
+)
+{
+ rtems_status_code status;
+ uint8_t message_buffer[ MAXIMUM_MESSAGE_SIZE ];
+ size_t message_size;
+
+ status = rtems_message_queue_receive(
+ ctx->message_queue_id,
+ &message_buffer,
+ &message_size,
+ RTEMS_LOCAL | RTEMS_NO_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+
+ check_fn( ctx, status, message_buffer, message_size );
+}
+
+static void CheckForNoMessageInQueue( void *ctx_in )
+{
+ Context *ctx = ctx_in;
+ PopMessage( ctx, CheckForNoMessage );
+}
+
+static void CheckForSeveralMessagesInQueue( void *ctx_in )
+{
+ Context *ctx = ctx_in;
+ PopMessage( ctx, CheckForQueuedMessage );
+ PopMessage( ctx, CheckForQueuedMessage );
+ PopMessage( ctx, CheckForNoMessage );
+}
+
+static void SendMsg( Context *ctx )
+{
+ rtems_status_code status;
+
+ status = rtems_message_queue_send(
+ ctx->message_queue_id,
+ queued_message,
+ sizeof( queued_message )
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsMessageReqBroadcast_Pre_SendBuffer_Prepare(
+ RtemsMessageReqBroadcast_Context *ctx,
+ RtemsMessageReqBroadcast_Pre_SendBuffer state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqBroadcast_Pre_SendBuffer_Valid: {
+ /*
+ * While the ``buffer`` parameter references a memory area where the
+ * message to be sent is stored.
+ */
+ ctx->buffer_param = &message;
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_SendBuffer_Null: {
+ /*
+ * While the ``buffer`` parameter is NULL.
+ */
+ ctx->buffer_param = NULL;
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_SendBuffer_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqBroadcast_Pre_Count_Prepare(
+ RtemsMessageReqBroadcast_Context *ctx,
+ RtemsMessageReqBroadcast_Pre_Count state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqBroadcast_Pre_Count_Valid: {
+ /*
+ * While the ``count`` parameter references an ``uint32_t`` object.
+ */
+ ctx->count_param = &ctx->count;
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_Count_Null: {
+ /*
+ * While the ``count`` parameter is NULL.
+ */
+ ctx->count_param = NULL;
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_Count_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqBroadcast_Pre_Id_Prepare(
+ RtemsMessageReqBroadcast_Context *ctx,
+ RtemsMessageReqBroadcast_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqBroadcast_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is valid.
+ */
+ ctx->id_param = ctx->message_queue_id;
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id_param = RTEMS_ID_NONE;
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqBroadcast_Pre_MsgSize_Prepare(
+ RtemsMessageReqBroadcast_Context *ctx,
+ RtemsMessageReqBroadcast_Pre_MsgSize state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqBroadcast_Pre_MsgSize_Zero: {
+ /*
+ * While the ``size`` parameter is 0.
+ */
+ ctx->size_param = 0;
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_MsgSize_SomeSize: {
+ /*
+ * While the ``size`` parameter has a value between 0 and the maximum
+ * message size.
+ */
+ ctx->size_param = MAXIMUM_MESSAGE_SIZE / 2 + 1;
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_MsgSize_MaxSize: {
+ /*
+ * While the ``size`` parameter has a value of the maximum message size.
+ */
+ ctx->size_param = MAXIMUM_MESSAGE_SIZE;
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_MsgSize_TooLarge: {
+ /*
+ * While the ``size`` parameter has a value greater than the maximum
+ * message size.
+ */
+ ctx->size_param = MAXIMUM_MESSAGE_SIZE + 1;
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_MsgSize_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqBroadcast_Pre_MsgQueue_Prepare(
+ RtemsMessageReqBroadcast_Context *ctx,
+ RtemsMessageReqBroadcast_Pre_MsgQueue state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqBroadcast_Pre_MsgQueue_Empty: {
+ /*
+ * While there is no message in the message queue.
+ */
+ /* Message queue is already empty. */
+ ctx->check_msgq_unchanged = CheckForNoMessageInQueue;
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_MsgQueue_Several: {
+ /*
+ * While there are messages in the message queue.
+ */
+ SendMsg( ctx );
+ SendMsg( ctx );
+ ctx->check_msgq_unchanged = CheckForSeveralMessagesInQueue;
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_MsgQueue_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqBroadcast_Pre_Receivers_Prepare(
+ RtemsMessageReqBroadcast_Context *ctx,
+ RtemsMessageReqBroadcast_Pre_Receivers state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqBroadcast_Pre_Receivers_Waiting: {
+ /*
+ * While one or more receivers are waiting to receive a message.
+ */
+ size_t i;
+ for ( i = 0; i < NUMBER_OF_WORKERS; ++i ) {
+ SendEvents( ctx->worker_id[i], EVENT_RECEIVE );
+ }
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_Receivers_None: {
+ /*
+ * While no receiver is waiting to receive a message.
+ */
+ /* There is already no receiver waiting. */
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_Receivers_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqBroadcast_Pre_Storage_Prepare(
+ RtemsMessageReqBroadcast_Context *ctx,
+ RtemsMessageReqBroadcast_Pre_Storage state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqBroadcast_Pre_Storage_Nop: {
+ /*
+ * While the memory area to which a pointer is provided as member
+ * storage_area of type rtems_message_queue_config when the message queue
+ * is constructed by rtems_message_queue_construct() is altered only by
+ * the RTEMS operating system.
+ */
+ /* Only a requirement text. */
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Pre_Storage_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqBroadcast_Post_Status_Check(
+ RtemsMessageReqBroadcast_Context *ctx,
+ RtemsMessageReqBroadcast_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqBroadcast_Post_Status_Ok: {
+ /*
+ * The return status of rtems_message_queue_broadcast() shall be
+ * RTEMS_SUCCESSFUL
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_Status_InvId: {
+ /*
+ * The return status of rtems_message_queue_broadcast() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_message_queue_broadcast() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_Status_InvSize: {
+ /*
+ * The return status of rtems_message_queue_broadcast() shall be
+ * RTEMS_INVALID_SIZE.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_SIZE );
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqBroadcast_Post_Count_Check(
+ RtemsMessageReqBroadcast_Context *ctx,
+ RtemsMessageReqBroadcast_Post_Count state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqBroadcast_Post_Count_Zero: {
+ /*
+ * The value of the object referenced by the ``count`` parameter shall be
+ * set to 0 after the return of the rtems_message_queue_broadcast() call.
+ */
+ T_eq_u32( ctx->count, 0 );
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_Count_Set: {
+ /*
+ * The value of the object referenced by the ``count`` parameter shall be
+ * set to the number of tasks unblocked (see unblock) by the call to
+ * directive rtems_message_queue_broadcast() after the return of the
+ * rtems_message_queue_broadcast() call.
+ */
+ T_eq_u32( ctx->count, NUMBER_OF_WORKERS );
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_Count_Nop: {
+ /*
+ * The value of the object referenced by the ``count`` parameter in past
+ * call to rtems_message_queue_broadcast() shall not be accessed by the
+ * rtems_message_queue_broadcast() call (see also Nop).
+ */
+ T_eq_u32( ctx->count, UINT8_MAX );
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_Count_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqBroadcast_Post_MsgQueue_Check(
+ RtemsMessageReqBroadcast_Context *ctx,
+ RtemsMessageReqBroadcast_Post_MsgQueue state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqBroadcast_Post_MsgQueue_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in the past call to
+ * rtems_message_queue_broadcast() shall not be accessed by that call
+ * (see also Nop).
+ */
+ ctx->check_msgq_unchanged( ctx );
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_MsgQueue_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqBroadcast_Post_Receivers_Check(
+ RtemsMessageReqBroadcast_Context *ctx,
+ RtemsMessageReqBroadcast_Post_Receivers state
+)
+{
+ size_t i;
+
+ switch ( state ) {
+ case RtemsMessageReqBroadcast_Post_Receivers_Unblocked: {
+ /*
+ * The call to the rtems_message_queue_broadcast() directive shall
+ * unblock all receivers waiting for a message at the message queue.
+ *
+ * Note: Currently, rtems_message_queue_broadcast() unblocks receivers in
+ * a none-atomic way. Meaning, it will not only unblock those receivers
+ * it finds waiting at the queue when rtems_message_queue_broadcast() is
+ * invoked but also any new receivers which start waiting for messages
+ * after rtems_message_queue_broadcast() is invoked and before it
+ * returns. This may lead to infinite unblocking loops.
+ */
+ for ( i = 0; i < NUMBER_OF_WORKERS; ++i ) {
+ T_rsc_success( ctx->receive_status[i] );
+ }
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_Receivers_Nop: {
+ /*
+ * The receivers waiting for a message at the message queue shall not be
+ * affected by the call to the rtems_message_queue_broadcast() directive.
+ */
+ for ( i = 0; i < NUMBER_OF_WORKERS; ++i ) {
+ T_rsc( ctx->receive_status[i], RTEMS_TIMEOUT );
+ }
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_Receivers_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqBroadcast_Post_RecSize_Check(
+ RtemsMessageReqBroadcast_Context *ctx,
+ RtemsMessageReqBroadcast_Post_RecSize state
+)
+{
+ size_t i;
+
+ switch ( state ) {
+ case RtemsMessageReqBroadcast_Post_RecSize_Message: {
+ /*
+ * The values of the objects referenced by the ``size`` parameter in all
+ * calls to rtems_message_queue_receive() which are unblocked (see
+ * unblock) by the rtems_message_queue_broadcast() call shall be set to
+ * the same value as provided by parameter ``size`` of the
+ * rtems_message_queue_broadcast() call after the return of the
+ * rtems_message_queue_broadcast() call.
+ */
+ for ( i = 0; i < NUMBER_OF_WORKERS; ++i ) {
+ CheckForMessage(
+ ctx,
+ ctx->receive_status[i],
+ ctx->receive_buffer[i],
+ ctx->receive_size[i]
+ );
+ }
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_RecSize_Nop: {
+ /*
+ * Objects referenced by the ``size`` parameter in past calls to
+ * rtems_message_queue_receive() shall not be accessed by the
+ * rtems_message_queue_broadcast() call (see also Nop).
+ */
+ for ( i = 0; i < NUMBER_OF_WORKERS; ++i ) {
+ T_eq_sz( ctx->receive_size[i], SIZE_MAX );
+ }
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_RecSize_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqBroadcast_Post_RecBuffer_Check(
+ RtemsMessageReqBroadcast_Context *ctx,
+ RtemsMessageReqBroadcast_Post_RecBuffer state
+)
+{
+ size_t w, i;
+
+ switch ( state ) {
+ case RtemsMessageReqBroadcast_Post_RecBuffer_Message: {
+ /*
+ * Bytes 0 till ``size`` - 1 of the object referenced by the ``buffer``
+ * parameter in all calls to rtems_message_queue_receive() which are
+ * unblocked (see unblock) by the rtems_message_queue_broadcast() call
+ * shall be set to the same values as bytes 0 till ``size`` - 1 of the
+ * object referenced by parameter ``buffer`` of the
+ * rtems_message_queue_broadcast() call after the return of the
+ * rtems_message_queue_receive() call.
+ */
+ for ( i = 0; i < NUMBER_OF_WORKERS; ++i ) {
+ CheckForMessage(
+ ctx,
+ ctx->receive_status[i],
+ ctx->receive_buffer[i],
+ ctx->receive_size[i]
+ );
+ }
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_RecBuffer_Nop: {
+ /*
+ * Objects referenced by the ``buffer`` parameter in past calls to
+ * rtems_message_queue_receive() shall not be accessed by the
+ * rtems_message_queue_broadcast() call (see also Nop).
+ */
+ for ( w = 0; w < NUMBER_OF_WORKERS; ++w ) {
+ for ( i = 0; i < MAXIMUM_MESSAGE_SIZE; ++i ) {
+ T_eq_u8( ctx->receive_buffer[w][i], UINT8_MAX );
+ }
+ }
+ break;
+ }
+
+ case RtemsMessageReqBroadcast_Post_RecBuffer_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqBroadcast_Setup(
+ RtemsMessageReqBroadcast_Context *ctx
+)
+{
+ size_t i;
+ SetSelfPriority( PRIO_NORMAL );
+
+ for ( i = 0; i < NUMBER_OF_WORKERS; ++i ) {
+ ctx->worker_id[i] = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id[i], WorkerTask, ctx );
+ }
+}
+
+static void RtemsMessageReqBroadcast_Setup_Wrap( void *arg )
+{
+ RtemsMessageReqBroadcast_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsMessageReqBroadcast_Setup( ctx );
+}
+
+static void RtemsMessageReqBroadcast_Teardown(
+ RtemsMessageReqBroadcast_Context *ctx
+)
+{
+ size_t i;
+
+ for ( i = 0; i < NUMBER_OF_WORKERS; ++i ) {
+ DeleteTask( ctx->worker_id[i] );
+ }
+ RestoreRunnerPriority();
+}
+
+static void RtemsMessageReqBroadcast_Teardown_Wrap( void *arg )
+{
+ RtemsMessageReqBroadcast_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsMessageReqBroadcast_Teardown( ctx );
+}
+
+static void RtemsMessageReqBroadcast_Prepare(
+ RtemsMessageReqBroadcast_Context *ctx
+)
+{
+ rtems_status_code status;
+ size_t i;
+
+ rtems_message_queue_config config = {
+ .name = rtems_build_name( 'M', 'S', 'G', 'Q' ),
+ .maximum_pending_messages = MAXIMUM_PENDING_MESSAGES,
+ .maximum_message_size = MAXIMUM_MESSAGE_SIZE,
+ .storage_area = ctx->storage_area,
+ .storage_size = sizeof( ctx->storage_area ),
+ .storage_free = NULL,
+ .attributes = RTEMS_DEFAULT_ATTRIBUTES
+ };
+
+ status = rtems_message_queue_construct(
+ &config,
+ &ctx->message_queue_id
+ );
+ T_rsc_success( status );
+
+ ctx->count = UINT8_MAX;
+ for ( i = 0; i < NUMBER_OF_WORKERS; ++i ) {
+ ctx->receive_size[i] = SIZE_MAX;
+ memset( ctx->receive_buffer[i], UINT8_MAX, MAXIMUM_MESSAGE_SIZE );
+ }
+}
+
+static void RtemsMessageReqBroadcast_Action(
+ RtemsMessageReqBroadcast_Context *ctx
+)
+{
+ ctx->status = rtems_message_queue_broadcast(
+ ctx->id_param,
+ ctx->buffer_param,
+ ctx->size_param,
+ ctx->count_param
+ );
+
+ FinalClockTick();
+}
+
+static void RtemsMessageReqBroadcast_Cleanup(
+ RtemsMessageReqBroadcast_Context *ctx
+)
+{
+ T_rsc_success( rtems_message_queue_delete( ctx->message_queue_id ) );
+}
+
+static const RtemsMessageReqBroadcast_Entry
+RtemsMessageReqBroadcast_Entries[] = {
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqBroadcast_Post_Status_InvAddr,
+ RtemsMessageReqBroadcast_Post_Count_Nop,
+ RtemsMessageReqBroadcast_Post_MsgQueue_Nop,
+ RtemsMessageReqBroadcast_Post_Receivers_NA,
+ RtemsMessageReqBroadcast_Post_RecSize_NA,
+ RtemsMessageReqBroadcast_Post_RecBuffer_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqBroadcast_Post_Status_NA,
+ RtemsMessageReqBroadcast_Post_Count_NA,
+ RtemsMessageReqBroadcast_Post_MsgQueue_NA,
+ RtemsMessageReqBroadcast_Post_Receivers_NA,
+ RtemsMessageReqBroadcast_Post_RecSize_NA,
+ RtemsMessageReqBroadcast_Post_RecBuffer_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqBroadcast_Post_Status_InvAddr,
+ RtemsMessageReqBroadcast_Post_Count_Nop,
+ RtemsMessageReqBroadcast_Post_MsgQueue_Nop,
+ RtemsMessageReqBroadcast_Post_Receivers_Nop,
+ RtemsMessageReqBroadcast_Post_RecSize_Nop,
+ RtemsMessageReqBroadcast_Post_RecBuffer_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqBroadcast_Post_Status_InvId,
+ RtemsMessageReqBroadcast_Post_Count_Nop,
+ RtemsMessageReqBroadcast_Post_MsgQueue_Nop,
+ RtemsMessageReqBroadcast_Post_Receivers_NA,
+ RtemsMessageReqBroadcast_Post_RecSize_NA,
+ RtemsMessageReqBroadcast_Post_RecBuffer_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqBroadcast_Post_Status_Ok,
+ RtemsMessageReqBroadcast_Post_Count_Zero,
+ RtemsMessageReqBroadcast_Post_MsgQueue_Nop,
+ RtemsMessageReqBroadcast_Post_Receivers_NA,
+ RtemsMessageReqBroadcast_Post_RecSize_NA,
+ RtemsMessageReqBroadcast_Post_RecBuffer_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqBroadcast_Post_Status_InvId,
+ RtemsMessageReqBroadcast_Post_Count_Nop,
+ RtemsMessageReqBroadcast_Post_MsgQueue_Nop,
+ RtemsMessageReqBroadcast_Post_Receivers_Nop,
+ RtemsMessageReqBroadcast_Post_RecSize_Nop,
+ RtemsMessageReqBroadcast_Post_RecBuffer_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqBroadcast_Post_Status_Ok,
+ RtemsMessageReqBroadcast_Post_Count_Set,
+ RtemsMessageReqBroadcast_Post_MsgQueue_Nop,
+ RtemsMessageReqBroadcast_Post_Receivers_Unblocked,
+ RtemsMessageReqBroadcast_Post_RecSize_Message,
+ RtemsMessageReqBroadcast_Post_RecBuffer_Message },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqBroadcast_Post_Status_InvSize,
+ RtemsMessageReqBroadcast_Post_Count_Nop,
+ RtemsMessageReqBroadcast_Post_MsgQueue_Nop,
+ RtemsMessageReqBroadcast_Post_Receivers_NA,
+ RtemsMessageReqBroadcast_Post_RecSize_NA,
+ RtemsMessageReqBroadcast_Post_RecBuffer_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqBroadcast_Post_Status_InvSize,
+ RtemsMessageReqBroadcast_Post_Count_Nop,
+ RtemsMessageReqBroadcast_Post_MsgQueue_Nop,
+ RtemsMessageReqBroadcast_Post_Receivers_Nop,
+ RtemsMessageReqBroadcast_Post_RecSize_Nop,
+ RtemsMessageReqBroadcast_Post_RecBuffer_Nop }
+};
+
+static const uint8_t
+RtemsMessageReqBroadcast_Map[] = {
+ 6, 4, 1, 4, 6, 4, 1, 4, 6, 4, 1, 4, 8, 7, 1, 7, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3,
+ 1, 3, 5, 3, 1, 3, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0,
+ 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0,
+ 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0,
+ 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0
+};
+
+static size_t RtemsMessageReqBroadcast_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsMessageReqBroadcast_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsMessageReqBroadcast_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsMessageReqBroadcast_Fixture = {
+ .setup = RtemsMessageReqBroadcast_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsMessageReqBroadcast_Teardown_Wrap,
+ .scope = RtemsMessageReqBroadcast_Scope,
+ .initial_context = &RtemsMessageReqBroadcast_Instance
+};
+
+static inline RtemsMessageReqBroadcast_Entry RtemsMessageReqBroadcast_PopEntry(
+ RtemsMessageReqBroadcast_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsMessageReqBroadcast_Entries[
+ RtemsMessageReqBroadcast_Map[ index ]
+ ];
+}
+
+static void RtemsMessageReqBroadcast_TestVariant(
+ RtemsMessageReqBroadcast_Context *ctx
+)
+{
+ RtemsMessageReqBroadcast_Pre_SendBuffer_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsMessageReqBroadcast_Pre_Count_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsMessageReqBroadcast_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsMessageReqBroadcast_Pre_MsgSize_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsMessageReqBroadcast_Pre_MsgQueue_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsMessageReqBroadcast_Pre_Receivers_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsMessageReqBroadcast_Pre_Storage_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsMessageReqBroadcast_Action( ctx );
+ RtemsMessageReqBroadcast_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsMessageReqBroadcast_Post_Count_Check( ctx, ctx->Map.entry.Post_Count );
+ RtemsMessageReqBroadcast_Post_MsgQueue_Check(
+ ctx,
+ ctx->Map.entry.Post_MsgQueue
+ );
+ RtemsMessageReqBroadcast_Post_Receivers_Check(
+ ctx,
+ ctx->Map.entry.Post_Receivers
+ );
+ RtemsMessageReqBroadcast_Post_RecSize_Check(
+ ctx,
+ ctx->Map.entry.Post_RecSize
+ );
+ RtemsMessageReqBroadcast_Post_RecBuffer_Check(
+ ctx,
+ ctx->Map.entry.Post_RecBuffer
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsMessageReqBroadcast( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsMessageReqBroadcast,
+ &RtemsMessageReqBroadcast_Fixture
+)
+{
+ RtemsMessageReqBroadcast_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsMessageReqBroadcast_Pre_SendBuffer_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsMessageReqBroadcast_Pre_SendBuffer_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsMessageReqBroadcast_Pre_Count_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsMessageReqBroadcast_Pre_Count_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsMessageReqBroadcast_Pre_Id_Valid;
+ ctx->Map.pcs[ 2 ] < RtemsMessageReqBroadcast_Pre_Id_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsMessageReqBroadcast_Pre_MsgSize_Zero;
+ ctx->Map.pcs[ 3 ] < RtemsMessageReqBroadcast_Pre_MsgSize_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsMessageReqBroadcast_Pre_MsgQueue_Empty;
+ ctx->Map.pcs[ 4 ] < RtemsMessageReqBroadcast_Pre_MsgQueue_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = RtemsMessageReqBroadcast_Pre_Receivers_Waiting;
+ ctx->Map.pcs[ 5 ] < RtemsMessageReqBroadcast_Pre_Receivers_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 6 ] = RtemsMessageReqBroadcast_Pre_Storage_Nop;
+ ctx->Map.pcs[ 6 ] < RtemsMessageReqBroadcast_Pre_Storage_NA;
+ ++ctx->Map.pcs[ 6 ]
+ ) {
+ ctx->Map.entry = RtemsMessageReqBroadcast_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsMessageReqBroadcast_Prepare( ctx );
+ RtemsMessageReqBroadcast_TestVariant( ctx );
+ RtemsMessageReqBroadcast_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-message-construct-errors.c b/testsuites/validation/tc-message-construct-errors.c
deleted file mode 100644
index 570160b947..0000000000
--- a/testsuites/validation/tc-message-construct-errors.c
+++ /dev/null
@@ -1,932 +0,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSTestCaseRtemsMessageReqConstructErrors
- */
-
-/*
- * Copyright (C) 2020, 2021 embedded brains GmbH (http://www.embedded-brains.de)
- *
- * 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 OWNER 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.
- */
-
-/*
- * This file is part of the RTEMS quality process and was automatically
- * generated. If you find something that needs to be fixed or
- * worded better please post a report or patch to an RTEMS mailing list
- * or raise a bug report:
- *
- * https://www.rtems.org/bugs.html
- *
- * For information on updating and regenerating please refer to the How-To
- * section in the Software Requirements Engineering chapter of the
- * RTEMS Software Engineering manual. The manual is provided as a part of
- * a release. For development sources please refer to the online
- * documentation at:
- *
- * https://docs.rtems.org
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems.h>
-#include <string.h>
-
-#include "tx-support.h"
-
-#include <rtems/test.h>
-
-/**
- * @defgroup RTEMSTestCaseRtemsMessageReqConstructErrors \
- * spec:/rtems/message/req/construct-errors
- *
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
- *
- * @{
- */
-
-typedef enum {
- RtemsMessageReqConstructErrors_Pre_Config_Valid,
- RtemsMessageReqConstructErrors_Pre_Config_Null,
- RtemsMessageReqConstructErrors_Pre_Config_NA
-} RtemsMessageReqConstructErrors_Pre_Config;
-
-typedef enum {
- RtemsMessageReqConstructErrors_Pre_Name_Valid,
- RtemsMessageReqConstructErrors_Pre_Name_Invalid,
- RtemsMessageReqConstructErrors_Pre_Name_NA
-} RtemsMessageReqConstructErrors_Pre_Name;
-
-typedef enum {
- RtemsMessageReqConstructErrors_Pre_Id_Id,
- RtemsMessageReqConstructErrors_Pre_Id_Null,
- RtemsMessageReqConstructErrors_Pre_Id_NA
-} RtemsMessageReqConstructErrors_Pre_Id;
-
-typedef enum {
- RtemsMessageReqConstructErrors_Pre_MaxPending_Valid,
- RtemsMessageReqConstructErrors_Pre_MaxPending_Zero,
- RtemsMessageReqConstructErrors_Pre_MaxPending_Big,
- RtemsMessageReqConstructErrors_Pre_MaxPending_NA
-} RtemsMessageReqConstructErrors_Pre_MaxPending;
-
-typedef enum {
- RtemsMessageReqConstructErrors_Pre_MaxSize_Valid,
- RtemsMessageReqConstructErrors_Pre_MaxSize_Zero,
- RtemsMessageReqConstructErrors_Pre_MaxSize_Big,
- RtemsMessageReqConstructErrors_Pre_MaxSize_NA
-} RtemsMessageReqConstructErrors_Pre_MaxSize;
-
-typedef enum {
- RtemsMessageReqConstructErrors_Pre_Free_Yes,
- RtemsMessageReqConstructErrors_Pre_Free_No,
- RtemsMessageReqConstructErrors_Pre_Free_NA
-} RtemsMessageReqConstructErrors_Pre_Free;
-
-typedef enum {
- RtemsMessageReqConstructErrors_Pre_Area_Valid,
- RtemsMessageReqConstructErrors_Pre_Area_Null,
- RtemsMessageReqConstructErrors_Pre_Area_NA
-} RtemsMessageReqConstructErrors_Pre_Area;
-
-typedef enum {
- RtemsMessageReqConstructErrors_Pre_AreaSize_Valid,
- RtemsMessageReqConstructErrors_Pre_AreaSize_Invalid,
- RtemsMessageReqConstructErrors_Pre_AreaSize_NA
-} RtemsMessageReqConstructErrors_Pre_AreaSize;
-
-typedef enum {
- RtemsMessageReqConstructErrors_Post_Status_Ok,
- RtemsMessageReqConstructErrors_Post_Status_InvAddr,
- RtemsMessageReqConstructErrors_Post_Status_InvName,
- RtemsMessageReqConstructErrors_Post_Status_InvNum,
- RtemsMessageReqConstructErrors_Post_Status_InvSize,
- RtemsMessageReqConstructErrors_Post_Status_TooMany,
- RtemsMessageReqConstructErrors_Post_Status_Unsat,
- RtemsMessageReqConstructErrors_Post_Status_NA
-} RtemsMessageReqConstructErrors_Post_Status;
-
-typedef enum {
- RtemsMessageReqConstructErrors_Post_Name_Valid,
- RtemsMessageReqConstructErrors_Post_Name_Invalid,
- RtemsMessageReqConstructErrors_Post_Name_NA
-} RtemsMessageReqConstructErrors_Post_Name;
-
-typedef enum {
- RtemsMessageReqConstructErrors_Post_IdVar_Set,
- RtemsMessageReqConstructErrors_Post_IdVar_Nop,
- RtemsMessageReqConstructErrors_Post_IdVar_NA
-} RtemsMessageReqConstructErrors_Post_IdVar;
-
-/**
- * @brief Test context for spec:/rtems/message/req/construct-errors test case.
- */
-typedef struct {
- rtems_status_code status;
-
- const rtems_message_queue_config *config;
-
- rtems_message_queue_config config_value;
-
- rtems_id *id;
-
- rtems_id id_value;
-
- void *seized_objects;
-
- /**
- * @brief This member defines the pre-condition states for the next action.
- */
- size_t pcs[ 8 ];
-
- /**
- * @brief This member indicates if the test action loop is currently
- * executed.
- */
- bool in_action_loop;
-} RtemsMessageReqConstructErrors_Context;
-
-static RtemsMessageReqConstructErrors_Context
- RtemsMessageReqConstructErrors_Instance;
-
-static const char * const RtemsMessageReqConstructErrors_PreDesc_Config[] = {
- "Valid",
- "Null",
- "NA"
-};
-
-static const char * const RtemsMessageReqConstructErrors_PreDesc_Name[] = {
- "Valid",
- "Invalid",
- "NA"
-};
-
-static const char * const RtemsMessageReqConstructErrors_PreDesc_Id[] = {
- "Id",
- "Null",
- "NA"
-};
-
-static const char * const RtemsMessageReqConstructErrors_PreDesc_MaxPending[] = {
- "Valid",
- "Zero",
- "Big",
- "NA"
-};
-
-static const char * const RtemsMessageReqConstructErrors_PreDesc_MaxSize[] = {
- "Valid",
- "Zero",
- "Big",
- "NA"
-};
-
-static const char * const RtemsMessageReqConstructErrors_PreDesc_Free[] = {
- "Yes",
- "No",
- "NA"
-};
-
-static const char * const RtemsMessageReqConstructErrors_PreDesc_Area[] = {
- "Valid",
- "Null",
- "NA"
-};
-
-static const char * const RtemsMessageReqConstructErrors_PreDesc_AreaSize[] = {
- "Valid",
- "Invalid",
- "NA"
-};
-
-static const char * const * const RtemsMessageReqConstructErrors_PreDesc[] = {
- RtemsMessageReqConstructErrors_PreDesc_Config,
- RtemsMessageReqConstructErrors_PreDesc_Name,
- RtemsMessageReqConstructErrors_PreDesc_Id,
- RtemsMessageReqConstructErrors_PreDesc_MaxPending,
- RtemsMessageReqConstructErrors_PreDesc_MaxSize,
- RtemsMessageReqConstructErrors_PreDesc_Free,
- RtemsMessageReqConstructErrors_PreDesc_Area,
- RtemsMessageReqConstructErrors_PreDesc_AreaSize,
- NULL
-};
-
-#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
-
-#define MAX_MESSAGE_QUEUES 4
-
-#define MAX_PENDING_MESSAGES 1
-
-#define MAX_MESSAGE_SIZE 1
-
-static RTEMS_MESSAGE_QUEUE_BUFFER( MAX_MESSAGE_SIZE )
- buffers_to_seize[ MAX_MESSAGE_QUEUES ][ MAX_PENDING_MESSAGES ];
-
-static RTEMS_MESSAGE_QUEUE_BUFFER( MAX_MESSAGE_SIZE )
- buffers[ MAX_PENDING_MESSAGES ];
-
-static rtems_status_code Create( void *arg, uint32_t *id )
-{
- rtems_message_queue_config config;
- size_t *i;
-
- i = arg;
- T_quiet_lt_sz( *i, MAX_MESSAGE_QUEUES );
-
- memset( &config, 0, sizeof( config ) );
- config.name = rtems_build_name( 'S', 'I', 'Z', 'E' );
- config.maximum_pending_messages = MAX_PENDING_MESSAGES;
- config.maximum_message_size = MAX_MESSAGE_SIZE;
- config.storage_size = sizeof( buffers_to_seize[ *i ] );
- config.storage_area = buffers_to_seize[ *i ];
- config.attributes = RTEMS_DEFAULT_ATTRIBUTES;
-
- ++(*i);
-
- return rtems_message_queue_construct( &config, id );
-}
-
-static void RtemsMessageReqConstructErrors_Pre_Config_Prepare(
- RtemsMessageReqConstructErrors_Context *ctx,
- RtemsMessageReqConstructErrors_Pre_Config state
-)
-{
- switch ( state ) {
- case RtemsMessageReqConstructErrors_Pre_Config_Valid: {
- /*
- * While the ``config`` parameter references an object of type
- * rtems_message_queue_config.
- */
- ctx->config = &ctx->config_value;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_Config_Null: {
- /*
- * While the ``config`` parameter is NULL.
- */
- ctx->config = NULL;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_Config_NA:
- break;
- }
-}
-
-static void RtemsMessageReqConstructErrors_Pre_Name_Prepare(
- RtemsMessageReqConstructErrors_Context *ctx,
- RtemsMessageReqConstructErrors_Pre_Name state
-)
-{
- switch ( state ) {
- case RtemsMessageReqConstructErrors_Pre_Name_Valid: {
- /*
- * While the name of the message queue configuration is valid.
- */
- ctx->config_value.name = NAME;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_Name_Invalid: {
- /*
- * While the name of the message queue configuration is invalid.
- */
- ctx->config_value.name = 0;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_Name_NA:
- break;
- }
-}
-
-static void RtemsMessageReqConstructErrors_Pre_Id_Prepare(
- RtemsMessageReqConstructErrors_Context *ctx,
- RtemsMessageReqConstructErrors_Pre_Id state
-)
-{
- switch ( state ) {
- case RtemsMessageReqConstructErrors_Pre_Id_Id: {
- /*
- * While the ``id`` parameter references an object of type rtems_id.
- */
- ctx->id = &ctx->id_value;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_Id_Null: {
- /*
- * While the ``id`` parameter is NULL.
- */
- ctx->id = NULL;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_Id_NA:
- break;
- }
-}
-
-static void RtemsMessageReqConstructErrors_Pre_MaxPending_Prepare(
- RtemsMessageReqConstructErrors_Context *ctx,
- RtemsMessageReqConstructErrors_Pre_MaxPending state
-)
-{
- switch ( state ) {
- case RtemsMessageReqConstructErrors_Pre_MaxPending_Valid: {
- /*
- * While the maximum number of pending messages of the message queue
- * configuration is valid.
- */
- ctx->config_value.maximum_pending_messages = MAX_PENDING_MESSAGES;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_MaxPending_Zero: {
- /*
- * While the maximum number of pending messages of the message queue
- * configuration is zero.
- */
- ctx->config_value.maximum_pending_messages = 0;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_MaxPending_Big: {
- /*
- * While the maximum number of pending messages of the message queue
- * configuration is big enough so that a calculation to get the message
- * buffer storage area size overflows.
- */
- ctx->config_value.maximum_pending_messages = UINT32_MAX;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_MaxPending_NA:
- break;
- }
-}
-
-static void RtemsMessageReqConstructErrors_Pre_MaxSize_Prepare(
- RtemsMessageReqConstructErrors_Context *ctx,
- RtemsMessageReqConstructErrors_Pre_MaxSize state
-)
-{
- switch ( state ) {
- case RtemsMessageReqConstructErrors_Pre_MaxSize_Valid: {
- /*
- * While the maximum message size of the message queue configuration is
- * valid.
- */
- if ( ctx->config_value.maximum_pending_messages == UINT32_MAX ) {
- /*
- * At least on 64-bit systems we need a bit of help to ensure that we
- * meet the Big state of the MaxPending pre-condition. The following
- * message size is valid with respect to calculations involving only
- * the message size.
- */
- ctx->config_value.maximum_message_size = SIZE_MAX - sizeof( uintptr_t ) +
- 1 - sizeof( CORE_message_queue_Buffer );
- } else {
- ctx->config_value.maximum_message_size = MAX_MESSAGE_SIZE;
- }
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_MaxSize_Zero: {
- /*
- * While the maximum message size of the message queue configuration is
- * zero.
- */
- ctx->config_value.maximum_message_size = 0;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_MaxSize_Big: {
- /*
- * While the maximum message size of the message queue configuration is
- * big enough so that a calculation to get the message buffer storage
- * area size overflows.
- */
- ctx->config_value.maximum_message_size = SIZE_MAX;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_MaxSize_NA:
- break;
- }
-}
-
-static void RtemsMessageReqConstructErrors_Pre_Free_Prepare(
- RtemsMessageReqConstructErrors_Context *ctx,
- RtemsMessageReqConstructErrors_Pre_Free state
-)
-{
- size_t i;
-
- switch ( state ) {
- case RtemsMessageReqConstructErrors_Pre_Free_Yes: {
- /*
- * While the system has at least one inactive message queue object
- * available.
- */
- /* Nothing to do */
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_Free_No: {
- /*
- * While the system has no inactive message queue object available.
- */
- i = 0;
- ctx->seized_objects = T_seize_objects( Create, &i );
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_Free_NA:
- break;
- }
-}
-
-static void RtemsMessageReqConstructErrors_Pre_Area_Prepare(
- RtemsMessageReqConstructErrors_Context *ctx,
- RtemsMessageReqConstructErrors_Pre_Area state
-)
-{
- switch ( state ) {
- case RtemsMessageReqConstructErrors_Pre_Area_Valid: {
- /*
- * While the message buffer storage area begin pointer of the message
- * queue configuration is valid.
- */
- ctx->config_value.storage_area = buffers;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_Area_Null: {
- /*
- * While the message buffer storage area begin pointer of the message
- * queue configuration is NULL.
- */
- ctx->config_value.storage_area = NULL;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_Area_NA:
- break;
- }
-}
-
-static void RtemsMessageReqConstructErrors_Pre_AreaSize_Prepare(
- RtemsMessageReqConstructErrors_Context *ctx,
- RtemsMessageReqConstructErrors_Pre_AreaSize state
-)
-{
- switch ( state ) {
- case RtemsMessageReqConstructErrors_Pre_AreaSize_Valid: {
- /*
- * While the message buffer storage area size of the message queue
- * configuration is valid.
- */
- ctx->config_value.storage_size = sizeof( buffers );
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_AreaSize_Invalid: {
- /*
- * While the message buffer storage area size of the message queue
- * configuration is invalid.
- */
- ctx->config_value.storage_size = SIZE_MAX;
- break;
- }
-
- case RtemsMessageReqConstructErrors_Pre_AreaSize_NA:
- break;
- }
-}
-
-static void RtemsMessageReqConstructErrors_Post_Status_Check(
- RtemsMessageReqConstructErrors_Context *ctx,
- RtemsMessageReqConstructErrors_Post_Status state
-)
-{
- switch ( state ) {
- case RtemsMessageReqConstructErrors_Post_Status_Ok: {
- /*
- * The return status of rtems_message_queue_construct() shall be
- * RTEMS_SUCCESSFUL.
- */
- T_rsc_success( ctx->status );
- break;
- }
-
- case RtemsMessageReqConstructErrors_Post_Status_InvAddr: {
- /*
- * The return status of rtems_message_queue_construct() shall be
- * RTEMS_INVALID_ADDRESS.
- */
- T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
- break;
- }
-
- case RtemsMessageReqConstructErrors_Post_Status_InvName: {
- /*
- * The return status of rtems_message_queue_construct() shall be
- * RTEMS_INVALID_NAME.
- */
- T_rsc( ctx->status, RTEMS_INVALID_NAME );
- break;
- }
-
- case RtemsMessageReqConstructErrors_Post_Status_InvNum: {
- /*
- * The return status of rtems_message_queue_construct() shall be
- * RTEMS_INVALID_NUMBER.
- */
- T_rsc( ctx->status, RTEMS_INVALID_NUMBER );
- break;
- }
-
- case RtemsMessageReqConstructErrors_Post_Status_InvSize: {
- /*
- * The return status of rtems_message_queue_construct() shall be
- * RTEMS_INVALID_SIZE.
- */
- T_rsc( ctx->status, RTEMS_INVALID_SIZE );
- break;
- }
-
- case RtemsMessageReqConstructErrors_Post_Status_TooMany: {
- /*
- * The return status of rtems_message_queue_construct() shall be
- * RTEMS_TOO_MANY.
- */
- T_rsc( ctx->status, RTEMS_TOO_MANY );
- break;
- }
-
- case RtemsMessageReqConstructErrors_Post_Status_Unsat: {
- /*
- * The return status of rtems_message_queue_construct() shall be
- * RTEMS_UNSATISFIED.
- */
- T_rsc( ctx->status, RTEMS_UNSATISFIED );
- break;
- }
-
- case RtemsMessageReqConstructErrors_Post_Status_NA:
- break;
- }
-}
-
-static void RtemsMessageReqConstructErrors_Post_Name_Check(
- RtemsMessageReqConstructErrors_Context *ctx,
- RtemsMessageReqConstructErrors_Post_Name state
-)
-{
- rtems_status_code sc;
- rtems_id id;
-
- switch ( state ) {
- case RtemsMessageReqConstructErrors_Post_Name_Valid: {
- /*
- * The unique object name shall identify the message queue constructed by
- * the rtems_message_queue_construct() call.
- */
- id = 0;
- sc = rtems_message_queue_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
- T_rsc_success( sc );
- T_eq_u32( id, ctx->id_value );
- break;
- }
-
- case RtemsMessageReqConstructErrors_Post_Name_Invalid: {
- /*
- * The unique object name shall not identify a message queue.
- */
- sc = rtems_message_queue_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
- T_rsc( sc, RTEMS_INVALID_NAME );
- break;
- }
-
- case RtemsMessageReqConstructErrors_Post_Name_NA:
- break;
- }
-}
-
-static void RtemsMessageReqConstructErrors_Post_IdVar_Check(
- RtemsMessageReqConstructErrors_Context *ctx,
- RtemsMessageReqConstructErrors_Post_IdVar state
-)
-{
- switch ( state ) {
- case RtemsMessageReqConstructErrors_Post_IdVar_Set: {
- /*
- * The value of the object referenced by the ``id`` parameter shall be
- * set to the object identifier of the constructed message queue after
- * the return of the rtems_message_queue_construct() call.
- */
- T_eq_ptr( ctx->id, &ctx->id_value );
- T_ne_u32( ctx->id_value, INVALID_ID );
- break;
- }
-
- case RtemsMessageReqConstructErrors_Post_IdVar_Nop: {
- /*
- * Objects referenced by the ``id`` parameter in past calls to
- * rtems_message_queue_construct() shall not be accessed by the
- * rtems_message_queue_construct() call.
- */
- T_eq_u32( ctx->id_value, INVALID_ID );
- break;
- }
-
- case RtemsMessageReqConstructErrors_Post_IdVar_NA:
- break;
- }
-}
-
-static void RtemsMessageReqConstructErrors_Prepare(
- RtemsMessageReqConstructErrors_Context *ctx
-)
-{
- ctx->id_value = INVALID_ID;
- memset( &ctx->config_value, 0, sizeof( ctx->config_value ) );
-}
-
-static void RtemsMessageReqConstructErrors_Action(
- RtemsMessageReqConstructErrors_Context *ctx
-)
-{
- ctx->status = rtems_message_queue_construct( ctx->config, ctx->id );
-}
-
-static void RtemsMessageReqConstructErrors_Cleanup(
- RtemsMessageReqConstructErrors_Context *ctx
-)
-{
- if ( ctx->id_value != INVALID_ID ) {
- rtems_status_code sc;
-
- sc = rtems_message_queue_delete( ctx->id_value );
- T_rsc_success( sc );
-
- ctx->id_value = INVALID_ID;
- }
-
- T_surrender_objects( &ctx->seized_objects, rtems_message_queue_delete );
-}
-
-typedef struct {
- uint16_t Skip : 1;
- uint16_t Pre_Config_NA : 1;
- uint16_t Pre_Name_NA : 1;
- uint16_t Pre_Id_NA : 1;
- uint16_t Pre_MaxPending_NA : 1;
- uint16_t Pre_MaxSize_NA : 1;
- uint16_t Pre_Free_NA : 1;
- uint16_t Pre_Area_NA : 1;
- uint16_t Pre_AreaSize_NA : 1;
- uint16_t Post_Status : 3;
- uint16_t Post_Name : 2;
- uint16_t Post_IdVar : 2;
-} RtemsMessageReqConstructErrors_Entry;
-
-static const RtemsMessageReqConstructErrors_Entry
-RtemsMessageReqConstructErrors_Entries[] = {
- { 0, 0, 0, 0, 0, 0, 0, 0, 0,
- RtemsMessageReqConstructErrors_Post_Status_InvAddr,
- RtemsMessageReqConstructErrors_Post_Name_Invalid,
- RtemsMessageReqConstructErrors_Post_IdVar_Nop },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0,
- RtemsMessageReqConstructErrors_Post_Status_InvName,
- RtemsMessageReqConstructErrors_Post_Name_Invalid,
- RtemsMessageReqConstructErrors_Post_IdVar_Nop },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0,
- RtemsMessageReqConstructErrors_Post_Status_InvNum,
- RtemsMessageReqConstructErrors_Post_Name_Invalid,
- RtemsMessageReqConstructErrors_Post_IdVar_Nop },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0,
- RtemsMessageReqConstructErrors_Post_Status_InvSize,
- RtemsMessageReqConstructErrors_Post_Name_Invalid,
- RtemsMessageReqConstructErrors_Post_IdVar_Nop },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0,
- RtemsMessageReqConstructErrors_Post_Status_TooMany,
- RtemsMessageReqConstructErrors_Post_Name_Invalid,
- RtemsMessageReqConstructErrors_Post_IdVar_Nop },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0,
- RtemsMessageReqConstructErrors_Post_Status_Unsat,
- RtemsMessageReqConstructErrors_Post_Name_Invalid,
- RtemsMessageReqConstructErrors_Post_IdVar_Nop },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqConstructErrors_Post_Status_Ok,
- RtemsMessageReqConstructErrors_Post_Name_Valid,
- RtemsMessageReqConstructErrors_Post_IdVar_Set }
-};
-
-static const uint8_t
-RtemsMessageReqConstructErrors_Map[] = {
- 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
-};
-
-static size_t RtemsMessageReqConstructErrors_Scope(
- void *arg,
- char *buf,
- size_t n
-)
-{
- RtemsMessageReqConstructErrors_Context *ctx;
-
- ctx = arg;
-
- if ( ctx->in_action_loop ) {
- return T_get_scope(
- RtemsMessageReqConstructErrors_PreDesc,
- buf,
- n,
- ctx->pcs
- );
- }
-
- return 0;
-}
-
-static T_fixture RtemsMessageReqConstructErrors_Fixture = {
- .setup = NULL,
- .stop = NULL,
- .teardown = NULL,
- .scope = RtemsMessageReqConstructErrors_Scope,
- .initial_context = &RtemsMessageReqConstructErrors_Instance
-};
-
-static inline RtemsMessageReqConstructErrors_Entry
-RtemsMessageReqConstructErrors_GetEntry( size_t index )
-{
- return RtemsMessageReqConstructErrors_Entries[
- RtemsMessageReqConstructErrors_Map[ index ]
- ];
-}
-
-/**
- * @fn void T_case_body_RtemsMessageReqConstructErrors( void )
- */
-T_TEST_CASE_FIXTURE(
- RtemsMessageReqConstructErrors,
- &RtemsMessageReqConstructErrors_Fixture
-)
-{
- RtemsMessageReqConstructErrors_Context *ctx;
- size_t index;
-
- ctx = T_fixture_context();
- ctx->in_action_loop = true;
- index = 0;
-
- for (
- ctx->pcs[ 0 ] = RtemsMessageReqConstructErrors_Pre_Config_Valid;
- ctx->pcs[ 0 ] < RtemsMessageReqConstructErrors_Pre_Config_NA;
- ++ctx->pcs[ 0 ]
- ) {
- for (
- ctx->pcs[ 1 ] = RtemsMessageReqConstructErrors_Pre_Name_Valid;
- ctx->pcs[ 1 ] < RtemsMessageReqConstructErrors_Pre_Name_NA;
- ++ctx->pcs[ 1 ]
- ) {
- for (
- ctx->pcs[ 2 ] = RtemsMessageReqConstructErrors_Pre_Id_Id;
- ctx->pcs[ 2 ] < RtemsMessageReqConstructErrors_Pre_Id_NA;
- ++ctx->pcs[ 2 ]
- ) {
- for (
- ctx->pcs[ 3 ] = RtemsMessageReqConstructErrors_Pre_MaxPending_Valid;
- ctx->pcs[ 3 ] < RtemsMessageReqConstructErrors_Pre_MaxPending_NA;
- ++ctx->pcs[ 3 ]
- ) {
- for (
- ctx->pcs[ 4 ] = RtemsMessageReqConstructErrors_Pre_MaxSize_Valid;
- ctx->pcs[ 4 ] < RtemsMessageReqConstructErrors_Pre_MaxSize_NA;
- ++ctx->pcs[ 4 ]
- ) {
- for (
- ctx->pcs[ 5 ] = RtemsMessageReqConstructErrors_Pre_Free_Yes;
- ctx->pcs[ 5 ] < RtemsMessageReqConstructErrors_Pre_Free_NA;
- ++ctx->pcs[ 5 ]
- ) {
- for (
- ctx->pcs[ 6 ] = RtemsMessageReqConstructErrors_Pre_Area_Valid;
- ctx->pcs[ 6 ] < RtemsMessageReqConstructErrors_Pre_Area_NA;
- ++ctx->pcs[ 6 ]
- ) {
- for (
- ctx->pcs[ 7 ] = RtemsMessageReqConstructErrors_Pre_AreaSize_Valid;
- ctx->pcs[ 7 ] < RtemsMessageReqConstructErrors_Pre_AreaSize_NA;
- ++ctx->pcs[ 7 ]
- ) {
- RtemsMessageReqConstructErrors_Entry entry;
-
- entry = RtemsMessageReqConstructErrors_GetEntry( index );
- ++index;
-
- RtemsMessageReqConstructErrors_Prepare( ctx );
- RtemsMessageReqConstructErrors_Pre_Config_Prepare(
- ctx,
- ctx->pcs[ 0 ]
- );
- RtemsMessageReqConstructErrors_Pre_Name_Prepare(
- ctx,
- ctx->pcs[ 1 ]
- );
- RtemsMessageReqConstructErrors_Pre_Id_Prepare(
- ctx,
- ctx->pcs[ 2 ]
- );
- RtemsMessageReqConstructErrors_Pre_MaxPending_Prepare(
- ctx,
- ctx->pcs[ 3 ]
- );
- RtemsMessageReqConstructErrors_Pre_MaxSize_Prepare(
- ctx,
- ctx->pcs[ 4 ]
- );
- RtemsMessageReqConstructErrors_Pre_Free_Prepare(
- ctx,
- ctx->pcs[ 5 ]
- );
- RtemsMessageReqConstructErrors_Pre_Area_Prepare(
- ctx,
- ctx->pcs[ 6 ]
- );
- RtemsMessageReqConstructErrors_Pre_AreaSize_Prepare(
- ctx,
- ctx->pcs[ 7 ]
- );
- RtemsMessageReqConstructErrors_Action( ctx );
- RtemsMessageReqConstructErrors_Post_Status_Check(
- ctx,
- entry.Post_Status
- );
- RtemsMessageReqConstructErrors_Post_Name_Check(
- ctx,
- entry.Post_Name
- );
- RtemsMessageReqConstructErrors_Post_IdVar_Check(
- ctx,
- entry.Post_IdVar
- );
- RtemsMessageReqConstructErrors_Cleanup( ctx );
- }
- }
- }
- }
- }
- }
- }
- }
-}
-
-/** @} */
diff --git a/testsuites/validation/tc-message-construct.c b/testsuites/validation/tc-message-construct.c
new file mode 100644
index 0000000000..316849ba68
--- /dev/null
+++ b/testsuites/validation/tc-message-construct.c
@@ -0,0 +1,1058 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsMessageReqConstruct
+ */
+
+/*
+ * Copyright (C) 2020, 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsMessageReqConstruct spec:/rtems/message/req/construct
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsMessageReqConstruct_Pre_Config_Valid,
+ RtemsMessageReqConstruct_Pre_Config_Null,
+ RtemsMessageReqConstruct_Pre_Config_NA
+} RtemsMessageReqConstruct_Pre_Config;
+
+typedef enum {
+ RtemsMessageReqConstruct_Pre_Name_Valid,
+ RtemsMessageReqConstruct_Pre_Name_Invalid,
+ RtemsMessageReqConstruct_Pre_Name_NA
+} RtemsMessageReqConstruct_Pre_Name;
+
+typedef enum {
+ RtemsMessageReqConstruct_Pre_Id_Id,
+ RtemsMessageReqConstruct_Pre_Id_Null,
+ RtemsMessageReqConstruct_Pre_Id_NA
+} RtemsMessageReqConstruct_Pre_Id;
+
+typedef enum {
+ RtemsMessageReqConstruct_Pre_MaxPending_Valid,
+ RtemsMessageReqConstruct_Pre_MaxPending_Zero,
+ RtemsMessageReqConstruct_Pre_MaxPending_Big,
+ RtemsMessageReqConstruct_Pre_MaxPending_NA
+} RtemsMessageReqConstruct_Pre_MaxPending;
+
+typedef enum {
+ RtemsMessageReqConstruct_Pre_MaxSize_Valid,
+ RtemsMessageReqConstruct_Pre_MaxSize_Zero,
+ RtemsMessageReqConstruct_Pre_MaxSize_Big,
+ RtemsMessageReqConstruct_Pre_MaxSize_NA
+} RtemsMessageReqConstruct_Pre_MaxSize;
+
+typedef enum {
+ RtemsMessageReqConstruct_Pre_Free_Yes,
+ RtemsMessageReqConstruct_Pre_Free_No,
+ RtemsMessageReqConstruct_Pre_Free_NA
+} RtemsMessageReqConstruct_Pre_Free;
+
+typedef enum {
+ RtemsMessageReqConstruct_Pre_Area_Valid,
+ RtemsMessageReqConstruct_Pre_Area_Null,
+ RtemsMessageReqConstruct_Pre_Area_NA
+} RtemsMessageReqConstruct_Pre_Area;
+
+typedef enum {
+ RtemsMessageReqConstruct_Pre_AreaSize_Valid,
+ RtemsMessageReqConstruct_Pre_AreaSize_Invalid,
+ RtemsMessageReqConstruct_Pre_AreaSize_NA
+} RtemsMessageReqConstruct_Pre_AreaSize;
+
+typedef enum {
+ RtemsMessageReqConstruct_Pre_StorageFree_Null,
+ RtemsMessageReqConstruct_Pre_StorageFree_Handler,
+ RtemsMessageReqConstruct_Pre_StorageFree_NA
+} RtemsMessageReqConstruct_Pre_StorageFree;
+
+typedef enum {
+ RtemsMessageReqConstruct_Post_Status_Ok,
+ RtemsMessageReqConstruct_Post_Status_InvAddr,
+ RtemsMessageReqConstruct_Post_Status_InvName,
+ RtemsMessageReqConstruct_Post_Status_InvNum,
+ RtemsMessageReqConstruct_Post_Status_InvSize,
+ RtemsMessageReqConstruct_Post_Status_TooMany,
+ RtemsMessageReqConstruct_Post_Status_Unsat,
+ RtemsMessageReqConstruct_Post_Status_NA
+} RtemsMessageReqConstruct_Post_Status;
+
+typedef enum {
+ RtemsMessageReqConstruct_Post_Name_Valid,
+ RtemsMessageReqConstruct_Post_Name_Invalid,
+ RtemsMessageReqConstruct_Post_Name_NA
+} RtemsMessageReqConstruct_Post_Name;
+
+typedef enum {
+ RtemsMessageReqConstruct_Post_IdObj_Set,
+ RtemsMessageReqConstruct_Post_IdObj_Nop,
+ RtemsMessageReqConstruct_Post_IdObj_NA
+} RtemsMessageReqConstruct_Post_IdObj;
+
+typedef enum {
+ RtemsMessageReqConstruct_Post_StorageFree_Free,
+ RtemsMessageReqConstruct_Post_StorageFree_Nop,
+ RtemsMessageReqConstruct_Post_StorageFree_NA
+} RtemsMessageReqConstruct_Post_StorageFree;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Config_NA : 1;
+ uint32_t Pre_Name_NA : 1;
+ uint32_t Pre_Id_NA : 1;
+ uint32_t Pre_MaxPending_NA : 1;
+ uint32_t Pre_MaxSize_NA : 1;
+ uint32_t Pre_Free_NA : 1;
+ uint32_t Pre_Area_NA : 1;
+ uint32_t Pre_AreaSize_NA : 1;
+ uint32_t Pre_StorageFree_NA : 1;
+ uint32_t Post_Status : 3;
+ uint32_t Post_Name : 2;
+ uint32_t Post_IdObj : 2;
+ uint32_t Post_StorageFree : 2;
+} RtemsMessageReqConstruct_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/message/req/construct test case.
+ */
+typedef struct {
+ rtems_status_code status;
+
+ const rtems_message_queue_config *config;
+
+ rtems_message_queue_config config_obj;
+
+ rtems_id *id;
+
+ rtems_id id_obj;
+
+ void *seized_objects;
+
+ uint32_t storage_free_counter;
+
+ uint32_t expected_storage_free_counter;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 9 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsMessageReqConstruct_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsMessageReqConstruct_Context;
+
+static RtemsMessageReqConstruct_Context
+ RtemsMessageReqConstruct_Instance;
+
+static const char * const RtemsMessageReqConstruct_PreDesc_Config[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsMessageReqConstruct_PreDesc_Name[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsMessageReqConstruct_PreDesc_Id[] = {
+ "Id",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsMessageReqConstruct_PreDesc_MaxPending[] = {
+ "Valid",
+ "Zero",
+ "Big",
+ "NA"
+};
+
+static const char * const RtemsMessageReqConstruct_PreDesc_MaxSize[] = {
+ "Valid",
+ "Zero",
+ "Big",
+ "NA"
+};
+
+static const char * const RtemsMessageReqConstruct_PreDesc_Free[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsMessageReqConstruct_PreDesc_Area[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsMessageReqConstruct_PreDesc_AreaSize[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsMessageReqConstruct_PreDesc_StorageFree[] = {
+ "Null",
+ "Handler",
+ "NA"
+};
+
+static const char * const * const RtemsMessageReqConstruct_PreDesc[] = {
+ RtemsMessageReqConstruct_PreDesc_Config,
+ RtemsMessageReqConstruct_PreDesc_Name,
+ RtemsMessageReqConstruct_PreDesc_Id,
+ RtemsMessageReqConstruct_PreDesc_MaxPending,
+ RtemsMessageReqConstruct_PreDesc_MaxSize,
+ RtemsMessageReqConstruct_PreDesc_Free,
+ RtemsMessageReqConstruct_PreDesc_Area,
+ RtemsMessageReqConstruct_PreDesc_AreaSize,
+ RtemsMessageReqConstruct_PreDesc_StorageFree,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+#define MAX_MESSAGE_QUEUES 4
+
+#define MAX_PENDING_MESSAGES 1
+
+#define MAX_MESSAGE_SIZE 1
+
+typedef RtemsMessageReqConstruct_Context Context;
+
+static RTEMS_MESSAGE_QUEUE_BUFFER( MAX_MESSAGE_SIZE )
+ buffers_to_seize[ MAX_MESSAGE_QUEUES ][ MAX_PENDING_MESSAGES ];
+
+static RTEMS_MESSAGE_QUEUE_BUFFER( MAX_MESSAGE_SIZE )
+ buffers[ MAX_PENDING_MESSAGES ];
+
+static rtems_status_code Create( void *arg, uint32_t *id )
+{
+ rtems_message_queue_config config;
+ size_t *i;
+
+ i = arg;
+ T_quiet_lt_sz( *i, MAX_MESSAGE_QUEUES );
+
+ memset( &config, 0, sizeof( config ) );
+ config.name = rtems_build_name( 'S', 'I', 'Z', 'E' );
+ config.maximum_pending_messages = MAX_PENDING_MESSAGES;
+ config.maximum_message_size = MAX_MESSAGE_SIZE;
+ config.storage_size = sizeof( buffers_to_seize[ *i ] );
+ config.storage_area = buffers_to_seize[ *i ];
+ config.attributes = RTEMS_DEFAULT_ATTRIBUTES;
+
+ ++(*i);
+
+ return rtems_message_queue_construct( &config, id );
+}
+
+static void StorageFree( void *ptr )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ T_eq_ptr( ptr, buffers );
+ ++ctx->storage_free_counter;
+}
+
+static void RtemsMessageReqConstruct_Pre_Config_Prepare(
+ RtemsMessageReqConstruct_Context *ctx,
+ RtemsMessageReqConstruct_Pre_Config state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqConstruct_Pre_Config_Valid: {
+ /*
+ * While the ``config`` parameter references an object of type
+ * rtems_message_queue_config.
+ */
+ ctx->config = &ctx->config_obj;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_Config_Null: {
+ /*
+ * While the ``config`` parameter is NULL.
+ */
+ ctx->config = NULL;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_Config_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqConstruct_Pre_Name_Prepare(
+ RtemsMessageReqConstruct_Context *ctx,
+ RtemsMessageReqConstruct_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqConstruct_Pre_Name_Valid: {
+ /*
+ * While the name of the message queue configuration is valid.
+ */
+ ctx->config_obj.name = NAME;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_Name_Invalid: {
+ /*
+ * While the name of the message queue configuration is invalid.
+ */
+ ctx->config_obj.name = 0;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqConstruct_Pre_Id_Prepare(
+ RtemsMessageReqConstruct_Context *ctx,
+ RtemsMessageReqConstruct_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqConstruct_Pre_Id_Id: {
+ /*
+ * While the ``id`` parameter references an object of type rtems_id.
+ */
+ ctx->id = &ctx->id_obj;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_Id_Null: {
+ /*
+ * While the ``id`` parameter is NULL.
+ */
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqConstruct_Pre_MaxPending_Prepare(
+ RtemsMessageReqConstruct_Context *ctx,
+ RtemsMessageReqConstruct_Pre_MaxPending state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqConstruct_Pre_MaxPending_Valid: {
+ /*
+ * While the maximum number of pending messages of the message queue
+ * configuration is valid.
+ */
+ ctx->config_obj.maximum_pending_messages = MAX_PENDING_MESSAGES;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_MaxPending_Zero: {
+ /*
+ * While the maximum number of pending messages of the message queue
+ * configuration is zero.
+ */
+ ctx->config_obj.maximum_pending_messages = 0;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_MaxPending_Big: {
+ /*
+ * While the maximum number of pending messages of the message queue
+ * configuration is big enough so that a calculation to get the message
+ * buffer storage area size overflows.
+ */
+ ctx->config_obj.maximum_pending_messages = UINT32_MAX;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_MaxPending_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqConstruct_Pre_MaxSize_Prepare(
+ RtemsMessageReqConstruct_Context *ctx,
+ RtemsMessageReqConstruct_Pre_MaxSize state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqConstruct_Pre_MaxSize_Valid: {
+ /*
+ * While the maximum message size of the message queue configuration is
+ * valid.
+ */
+ if ( ctx->config_obj.maximum_pending_messages == UINT32_MAX ) {
+ /*
+ * At least on 64-bit systems we need a bit of help to ensure that we
+ * meet the Big state of the MaxPending pre-condition. The following
+ * message size is valid with respect to calculations involving only
+ * the message size.
+ */
+ ctx->config_obj.maximum_message_size = SIZE_MAX - sizeof( uintptr_t ) +
+ 1 - sizeof( CORE_message_queue_Buffer );
+ } else {
+ ctx->config_obj.maximum_message_size = MAX_MESSAGE_SIZE;
+ }
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_MaxSize_Zero: {
+ /*
+ * While the maximum message size of the message queue configuration is
+ * zero.
+ */
+ ctx->config_obj.maximum_message_size = 0;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_MaxSize_Big: {
+ /*
+ * While the maximum message size of the message queue configuration is
+ * big enough so that a calculation to get the message buffer storage
+ * area size overflows.
+ */
+ ctx->config_obj.maximum_message_size = SIZE_MAX;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_MaxSize_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqConstruct_Pre_Free_Prepare(
+ RtemsMessageReqConstruct_Context *ctx,
+ RtemsMessageReqConstruct_Pre_Free state
+)
+{
+ size_t i;
+
+ switch ( state ) {
+ case RtemsMessageReqConstruct_Pre_Free_Yes: {
+ /*
+ * While the system has at least one inactive message queue object
+ * available.
+ */
+ /* Nothing to do */
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_Free_No: {
+ /*
+ * While the system has no inactive message queue object available.
+ */
+ i = 0;
+ ctx->seized_objects = T_seize_objects( Create, &i );
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_Free_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqConstruct_Pre_Area_Prepare(
+ RtemsMessageReqConstruct_Context *ctx,
+ RtemsMessageReqConstruct_Pre_Area state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqConstruct_Pre_Area_Valid: {
+ /*
+ * While the message buffer storage area begin pointer of the message
+ * queue configuration is valid.
+ */
+ ctx->config_obj.storage_area = buffers;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_Area_Null: {
+ /*
+ * While the message buffer storage area begin pointer of the message
+ * queue configuration is NULL.
+ */
+ ctx->config_obj.storage_area = NULL;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_Area_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqConstruct_Pre_AreaSize_Prepare(
+ RtemsMessageReqConstruct_Context *ctx,
+ RtemsMessageReqConstruct_Pre_AreaSize state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqConstruct_Pre_AreaSize_Valid: {
+ /*
+ * While the message buffer storage area size of the message queue
+ * configuration is valid.
+ */
+ ctx->config_obj.storage_size = sizeof( buffers );
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_AreaSize_Invalid: {
+ /*
+ * While the message buffer storage area size of the message queue
+ * configuration is invalid.
+ */
+ ctx->config_obj.storage_size = SIZE_MAX;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_AreaSize_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqConstruct_Pre_StorageFree_Prepare(
+ RtemsMessageReqConstruct_Context *ctx,
+ RtemsMessageReqConstruct_Pre_StorageFree state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqConstruct_Pre_StorageFree_Null: {
+ /*
+ * While the storage free member of the message queue configuration is
+ * equal to NULL.
+ */
+ ctx->config_obj.storage_free = NULL;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_StorageFree_Handler: {
+ /*
+ * While the storage free member of the message queue configuration
+ * references a storage free handler.
+ */
+ ctx->config_obj.storage_free = StorageFree;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Pre_StorageFree_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqConstruct_Post_Status_Check(
+ RtemsMessageReqConstruct_Context *ctx,
+ RtemsMessageReqConstruct_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqConstruct_Post_Status_Ok: {
+ /*
+ * The return status of rtems_message_queue_construct() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_message_queue_construct() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Post_Status_InvName: {
+ /*
+ * The return status of rtems_message_queue_construct() shall be
+ * RTEMS_INVALID_NAME.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Post_Status_InvNum: {
+ /*
+ * The return status of rtems_message_queue_construct() shall be
+ * RTEMS_INVALID_NUMBER.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NUMBER );
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Post_Status_InvSize: {
+ /*
+ * The return status of rtems_message_queue_construct() shall be
+ * RTEMS_INVALID_SIZE.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_SIZE );
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Post_Status_TooMany: {
+ /*
+ * The return status of rtems_message_queue_construct() shall be
+ * RTEMS_TOO_MANY.
+ */
+ T_rsc( ctx->status, RTEMS_TOO_MANY );
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Post_Status_Unsat: {
+ /*
+ * The return status of rtems_message_queue_construct() shall be
+ * RTEMS_UNSATISFIED.
+ */
+ T_rsc( ctx->status, RTEMS_UNSATISFIED );
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqConstruct_Post_Name_Check(
+ RtemsMessageReqConstruct_Context *ctx,
+ RtemsMessageReqConstruct_Post_Name state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ switch ( state ) {
+ case RtemsMessageReqConstruct_Post_Name_Valid: {
+ /*
+ * The unique object name shall identify the message queue constructed by
+ * the rtems_message_queue_construct() call.
+ */
+ id = 0;
+ sc = rtems_message_queue_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc_success( sc );
+ T_eq_u32( id, ctx->id_obj );
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Post_Name_Invalid: {
+ /*
+ * The unique object name shall not identify a message queue.
+ */
+ sc = rtems_message_queue_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Post_Name_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqConstruct_Post_IdObj_Check(
+ RtemsMessageReqConstruct_Context *ctx,
+ RtemsMessageReqConstruct_Post_IdObj state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqConstruct_Post_IdObj_Set: {
+ /*
+ * The value of the object referenced by the ``id`` parameter shall be
+ * set to the object identifier of the constructed message queue after
+ * the return of the rtems_message_queue_construct() call.
+ */
+ T_eq_ptr( ctx->id, &ctx->id_obj );
+ T_ne_u32( ctx->id_obj, INVALID_ID );
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Post_IdObj_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_message_queue_construct() shall not be accessed by the
+ * rtems_message_queue_construct() call.
+ */
+ T_eq_u32( ctx->id_obj, INVALID_ID );
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Post_IdObj_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqConstruct_Post_StorageFree_Check(
+ RtemsMessageReqConstruct_Context *ctx,
+ RtemsMessageReqConstruct_Post_StorageFree state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqConstruct_Post_StorageFree_Free: {
+ /*
+ * The storage free handler of the message queue configuration specified
+ * by the ``config`` parameter shall be used to free the message queue
+ * storage area.
+ */
+ ctx->expected_storage_free_counter = 1;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Post_StorageFree_Nop: {
+ /*
+ * No operation shall be performed to free the message queue storage
+ * area.
+ */
+ ctx->expected_storage_free_counter = 0;
+ break;
+ }
+
+ case RtemsMessageReqConstruct_Post_StorageFree_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqConstruct_Prepare(
+ RtemsMessageReqConstruct_Context *ctx
+)
+{
+ ctx->id_obj = INVALID_ID;
+ ctx->storage_free_counter = 0;
+ ctx->expected_storage_free_counter = UINT32_MAX;
+ memset( &ctx->config_obj, 0, sizeof( ctx->config_obj ) );
+}
+
+static void RtemsMessageReqConstruct_Action(
+ RtemsMessageReqConstruct_Context *ctx
+)
+{
+ ctx->status = rtems_message_queue_construct( ctx->config, ctx->id );
+}
+
+static void RtemsMessageReqConstruct_Cleanup(
+ RtemsMessageReqConstruct_Context *ctx
+)
+{
+ if ( ctx->id_obj != INVALID_ID ) {
+ rtems_status_code sc;
+
+ sc = rtems_message_queue_delete( ctx->id_obj );
+ T_rsc_success( sc );
+
+ T_eq_u32( ctx->storage_free_counter, ctx->expected_storage_free_counter );
+ } else {
+ T_eq_u32( ctx->storage_free_counter, 0 );
+ }
+
+ T_surrender_objects( &ctx->seized_objects, rtems_message_queue_delete );
+}
+
+static const RtemsMessageReqConstruct_Entry
+RtemsMessageReqConstruct_Entries[] = {
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqConstruct_Post_Status_InvAddr,
+ RtemsMessageReqConstruct_Post_Name_Invalid,
+ RtemsMessageReqConstruct_Post_IdObj_Nop,
+ RtemsMessageReqConstruct_Post_StorageFree_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqConstruct_Post_Status_InvName,
+ RtemsMessageReqConstruct_Post_Name_Invalid,
+ RtemsMessageReqConstruct_Post_IdObj_Nop,
+ RtemsMessageReqConstruct_Post_StorageFree_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqConstruct_Post_Status_InvNum,
+ RtemsMessageReqConstruct_Post_Name_Invalid,
+ RtemsMessageReqConstruct_Post_IdObj_Nop,
+ RtemsMessageReqConstruct_Post_StorageFree_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqConstruct_Post_Status_InvSize,
+ RtemsMessageReqConstruct_Post_Name_Invalid,
+ RtemsMessageReqConstruct_Post_IdObj_Nop,
+ RtemsMessageReqConstruct_Post_StorageFree_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqConstruct_Post_Status_TooMany,
+ RtemsMessageReqConstruct_Post_Name_Invalid,
+ RtemsMessageReqConstruct_Post_IdObj_Nop,
+ RtemsMessageReqConstruct_Post_StorageFree_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqConstruct_Post_Status_Unsat,
+ RtemsMessageReqConstruct_Post_Name_Invalid,
+ RtemsMessageReqConstruct_Post_IdObj_Nop,
+ RtemsMessageReqConstruct_Post_StorageFree_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqConstruct_Post_Status_Ok,
+ RtemsMessageReqConstruct_Post_Name_Valid,
+ RtemsMessageReqConstruct_Post_IdObj_Set,
+ RtemsMessageReqConstruct_Post_StorageFree_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqConstruct_Post_Status_Ok,
+ RtemsMessageReqConstruct_Post_Name_Valid,
+ RtemsMessageReqConstruct_Post_IdObj_Set,
+ RtemsMessageReqConstruct_Post_StorageFree_Free }
+};
+
+static const uint8_t
+RtemsMessageReqConstruct_Map[] = {
+ 6, 7, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static size_t RtemsMessageReqConstruct_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsMessageReqConstruct_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsMessageReqConstruct_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsMessageReqConstruct_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsMessageReqConstruct_Scope,
+ .initial_context = &RtemsMessageReqConstruct_Instance
+};
+
+static inline RtemsMessageReqConstruct_Entry RtemsMessageReqConstruct_PopEntry(
+ RtemsMessageReqConstruct_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsMessageReqConstruct_Entries[
+ RtemsMessageReqConstruct_Map[ index ]
+ ];
+}
+
+static void RtemsMessageReqConstruct_TestVariant(
+ RtemsMessageReqConstruct_Context *ctx
+)
+{
+ RtemsMessageReqConstruct_Pre_Config_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsMessageReqConstruct_Pre_Name_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsMessageReqConstruct_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsMessageReqConstruct_Pre_MaxPending_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsMessageReqConstruct_Pre_MaxSize_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsMessageReqConstruct_Pre_Free_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsMessageReqConstruct_Pre_Area_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsMessageReqConstruct_Pre_AreaSize_Prepare( ctx, ctx->Map.pcs[ 7 ] );
+ RtemsMessageReqConstruct_Pre_StorageFree_Prepare( ctx, ctx->Map.pcs[ 8 ] );
+ RtemsMessageReqConstruct_Action( ctx );
+ RtemsMessageReqConstruct_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsMessageReqConstruct_Post_Name_Check( ctx, ctx->Map.entry.Post_Name );
+ RtemsMessageReqConstruct_Post_IdObj_Check( ctx, ctx->Map.entry.Post_IdObj );
+ RtemsMessageReqConstruct_Post_StorageFree_Check(
+ ctx,
+ ctx->Map.entry.Post_StorageFree
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsMessageReqConstruct( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsMessageReqConstruct,
+ &RtemsMessageReqConstruct_Fixture
+)
+{
+ RtemsMessageReqConstruct_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsMessageReqConstruct_Pre_Config_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsMessageReqConstruct_Pre_Config_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsMessageReqConstruct_Pre_Name_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsMessageReqConstruct_Pre_Name_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsMessageReqConstruct_Pre_Id_Id;
+ ctx->Map.pcs[ 2 ] < RtemsMessageReqConstruct_Pre_Id_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsMessageReqConstruct_Pre_MaxPending_Valid;
+ ctx->Map.pcs[ 3 ] < RtemsMessageReqConstruct_Pre_MaxPending_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsMessageReqConstruct_Pre_MaxSize_Valid;
+ ctx->Map.pcs[ 4 ] < RtemsMessageReqConstruct_Pre_MaxSize_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = RtemsMessageReqConstruct_Pre_Free_Yes;
+ ctx->Map.pcs[ 5 ] < RtemsMessageReqConstruct_Pre_Free_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 6 ] = RtemsMessageReqConstruct_Pre_Area_Valid;
+ ctx->Map.pcs[ 6 ] < RtemsMessageReqConstruct_Pre_Area_NA;
+ ++ctx->Map.pcs[ 6 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 7 ] = RtemsMessageReqConstruct_Pre_AreaSize_Valid;
+ ctx->Map.pcs[ 7 ] < RtemsMessageReqConstruct_Pre_AreaSize_NA;
+ ++ctx->Map.pcs[ 7 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 8 ] = RtemsMessageReqConstruct_Pre_StorageFree_Null;
+ ctx->Map.pcs[ 8 ] < RtemsMessageReqConstruct_Pre_StorageFree_NA;
+ ++ctx->Map.pcs[ 8 ]
+ ) {
+ ctx->Map.entry = RtemsMessageReqConstruct_PopEntry( ctx );
+ RtemsMessageReqConstruct_Prepare( ctx );
+ RtemsMessageReqConstruct_TestVariant( ctx );
+ RtemsMessageReqConstruct_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-message-delete.c b/testsuites/validation/tc-message-delete.c
new file mode 100644
index 0000000000..b0fa53be66
--- /dev/null
+++ b/testsuites/validation/tc-message-delete.c
@@ -0,0 +1,479 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsMessageReqDelete
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsMessageReqDelete spec:/rtems/message/req/delete
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsMessageReqDelete_Pre_Id_NoObj,
+ RtemsMessageReqDelete_Pre_Id_MsgQueue,
+ RtemsMessageReqDelete_Pre_Id_NA
+} RtemsMessageReqDelete_Pre_Id;
+
+typedef enum {
+ RtemsMessageReqDelete_Post_Status_Ok,
+ RtemsMessageReqDelete_Post_Status_InvId,
+ RtemsMessageReqDelete_Post_Status_NA
+} RtemsMessageReqDelete_Post_Status;
+
+typedef enum {
+ RtemsMessageReqDelete_Post_Name_Valid,
+ RtemsMessageReqDelete_Post_Name_Invalid,
+ RtemsMessageReqDelete_Post_Name_NA
+} RtemsMessageReqDelete_Post_Name;
+
+typedef enum {
+ RtemsMessageReqDelete_Post_Flush_Yes,
+ RtemsMessageReqDelete_Post_Flush_No,
+ RtemsMessageReqDelete_Post_Flush_NA
+} RtemsMessageReqDelete_Post_Flush;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_Name : 2;
+ uint8_t Post_Flush : 2;
+} RtemsMessageReqDelete_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/message/req/delete test case.
+ */
+typedef struct {
+ rtems_id worker_id;
+
+ rtems_id message_queue_id;
+
+ uint32_t wait_done;
+
+ uint32_t wait_expected;
+
+ rtems_id id;
+
+ rtems_status_code status;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsMessageReqDelete_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsMessageReqDelete_Context;
+
+static RtemsMessageReqDelete_Context
+ RtemsMessageReqDelete_Instance;
+
+static const char * const RtemsMessageReqDelete_PreDesc_Id[] = {
+ "NoObj",
+ "MsgQueue",
+ "NA"
+};
+
+static const char * const * const RtemsMessageReqDelete_PreDesc[] = {
+ RtemsMessageReqDelete_PreDesc_Id,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+#define MAX_PENDING_MESSAGES 1
+
+#define MAX_MESSAGE_SIZE 1
+
+typedef RtemsMessageReqDelete_Context Context;
+
+static RTEMS_MESSAGE_QUEUE_BUFFER( MAX_MESSAGE_SIZE )
+ buffers[ MAX_PENDING_MESSAGES ];
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ rtems_status_code sc;
+ rtems_message_queue_config config;
+ char buffer[ MAX_MESSAGE_SIZE ];
+ size_t size;
+ rtems_task_priority prio;
+
+ memset( &config, 0, sizeof( config ) );
+ config.name = NAME;
+ config.maximum_pending_messages = MAX_PENDING_MESSAGES;
+ config.maximum_message_size = MAX_MESSAGE_SIZE;
+ config.storage_size = sizeof( buffers );
+ config.storage_area = buffers;
+ config.attributes = RTEMS_DEFAULT_ATTRIBUTES;
+
+ T_eq_u32( ctx->message_queue_id, 0 );
+
+ sc = rtems_message_queue_construct( &config, &ctx->message_queue_id );
+ T_rsc_success( sc );
+
+ size = SIZE_MAX;
+ sc = rtems_message_queue_receive(
+ ctx->message_queue_id,
+ buffer,
+ &size,
+ RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+ T_rsc( sc, RTEMS_OBJECT_WAS_DELETED );
+ T_eq_sz( size, SIZE_MAX );
+
+ ++ctx->wait_done;
+
+ prio = SetSelfPriority( PRIO_LOW );
+ T_eq_u32( prio, PRIO_HIGH );
+ }
+}
+
+static void RtemsMessageReqDelete_Pre_Id_Prepare(
+ RtemsMessageReqDelete_Context *ctx,
+ RtemsMessageReqDelete_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqDelete_Pre_Id_NoObj: {
+ /*
+ * While the ``id`` parameter is not associated with a message queue.
+ */
+ ctx->id = 0;
+ break;
+ }
+
+ case RtemsMessageReqDelete_Pre_Id_MsgQueue: {
+ /*
+ * While the ``id`` parameter is associated with a message queue.
+ */
+ ctx->id = ctx->message_queue_id;
+ break;
+ }
+
+ case RtemsMessageReqDelete_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqDelete_Post_Status_Check(
+ RtemsMessageReqDelete_Context *ctx,
+ RtemsMessageReqDelete_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqDelete_Post_Status_Ok: {
+ /*
+ * The return status of rtems_message_queue_delete() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ ctx->message_queue_id = 0;
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsMessageReqDelete_Post_Status_InvId: {
+ /*
+ * The return status of rtems_message_queue_delete() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsMessageReqDelete_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqDelete_Post_Name_Check(
+ RtemsMessageReqDelete_Context *ctx,
+ RtemsMessageReqDelete_Post_Name state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ switch ( state ) {
+ case RtemsMessageReqDelete_Post_Name_Valid: {
+ /*
+ * The unique object name shall identify a message queue.
+ */
+ id = 0;
+ sc = rtems_message_queue_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc_success( sc );
+ T_eq_u32( id, ctx->message_queue_id );
+ break;
+ }
+
+ case RtemsMessageReqDelete_Post_Name_Invalid: {
+ /*
+ * The unique object name shall not identify a message queue.
+ */
+ sc = rtems_message_queue_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsMessageReqDelete_Post_Name_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqDelete_Post_Flush_Check(
+ RtemsMessageReqDelete_Context *ctx,
+ RtemsMessageReqDelete_Post_Flush state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqDelete_Post_Flush_Yes: {
+ /*
+ * Tasks waiting at the message queue shall be unblocked.
+ */
+ ++ctx->wait_expected;
+ T_eq_u32( ctx->wait_done, ctx->wait_expected );
+ break;
+ }
+
+ case RtemsMessageReqDelete_Post_Flush_No: {
+ /*
+ * Tasks waiting at the message queue shall remain blocked.
+ */
+ T_eq_u32( ctx->wait_done, ctx->wait_expected );
+ break;
+ }
+
+ case RtemsMessageReqDelete_Post_Flush_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqDelete_Setup( RtemsMessageReqDelete_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->worker_id = CreateTask( "WORK", PRIO_LOW );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+static void RtemsMessageReqDelete_Setup_Wrap( void *arg )
+{
+ RtemsMessageReqDelete_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsMessageReqDelete_Setup( ctx );
+}
+
+static void RtemsMessageReqDelete_Teardown(
+ RtemsMessageReqDelete_Context *ctx
+)
+{
+ DeleteTask( ctx->worker_id );
+ RestoreRunnerPriority();
+}
+
+static void RtemsMessageReqDelete_Teardown_Wrap( void *arg )
+{
+ RtemsMessageReqDelete_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsMessageReqDelete_Teardown( ctx );
+}
+
+static void RtemsMessageReqDelete_Prepare( RtemsMessageReqDelete_Context *ctx )
+{
+ rtems_task_priority prio;
+
+ prio = SetPriority( ctx->worker_id, PRIO_HIGH );
+ T_true( prio == PRIO_LOW || prio == PRIO_HIGH );
+}
+
+static void RtemsMessageReqDelete_Action( RtemsMessageReqDelete_Context *ctx )
+{
+ ctx->status = rtems_message_queue_delete( ctx->id );
+}
+
+static void RtemsMessageReqDelete_Cleanup( RtemsMessageReqDelete_Context *ctx )
+{
+ if ( ctx->message_queue_id != 0 ) {
+ rtems_status_code sc;
+
+ sc = rtems_message_queue_delete( ctx->message_queue_id );
+ T_rsc_success( sc );
+
+ ++ctx->wait_expected;
+ T_eq_u32( ctx->wait_done, ctx->wait_expected );
+
+ ctx->message_queue_id = 0;
+ }
+}
+
+static const RtemsMessageReqDelete_Entry
+RtemsMessageReqDelete_Entries[] = {
+ { 0, 0, RtemsMessageReqDelete_Post_Status_InvId,
+ RtemsMessageReqDelete_Post_Name_Valid, RtemsMessageReqDelete_Post_Flush_No },
+ { 0, 0, RtemsMessageReqDelete_Post_Status_Ok,
+ RtemsMessageReqDelete_Post_Name_Invalid,
+ RtemsMessageReqDelete_Post_Flush_Yes }
+};
+
+static const uint8_t
+RtemsMessageReqDelete_Map[] = {
+ 0, 1
+};
+
+static size_t RtemsMessageReqDelete_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsMessageReqDelete_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsMessageReqDelete_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsMessageReqDelete_Fixture = {
+ .setup = RtemsMessageReqDelete_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsMessageReqDelete_Teardown_Wrap,
+ .scope = RtemsMessageReqDelete_Scope,
+ .initial_context = &RtemsMessageReqDelete_Instance
+};
+
+static inline RtemsMessageReqDelete_Entry RtemsMessageReqDelete_PopEntry(
+ RtemsMessageReqDelete_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsMessageReqDelete_Entries[
+ RtemsMessageReqDelete_Map[ index ]
+ ];
+}
+
+static void RtemsMessageReqDelete_TestVariant(
+ RtemsMessageReqDelete_Context *ctx
+)
+{
+ RtemsMessageReqDelete_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsMessageReqDelete_Action( ctx );
+ RtemsMessageReqDelete_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsMessageReqDelete_Post_Name_Check( ctx, ctx->Map.entry.Post_Name );
+ RtemsMessageReqDelete_Post_Flush_Check( ctx, ctx->Map.entry.Post_Flush );
+}
+
+/**
+ * @fn void T_case_body_RtemsMessageReqDelete( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsMessageReqDelete, &RtemsMessageReqDelete_Fixture )
+{
+ RtemsMessageReqDelete_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsMessageReqDelete_Pre_Id_NoObj;
+ ctx->Map.pcs[ 0 ] < RtemsMessageReqDelete_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = RtemsMessageReqDelete_PopEntry( ctx );
+ RtemsMessageReqDelete_Prepare( ctx );
+ RtemsMessageReqDelete_TestVariant( ctx );
+ RtemsMessageReqDelete_Cleanup( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-message-flush-pending.c b/testsuites/validation/tc-message-flush-pending.c
new file mode 100644
index 0000000000..48ade108d0
--- /dev/null
+++ b/testsuites/validation/tc-message-flush-pending.c
@@ -0,0 +1,981 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsMessageReqFlushPending
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsMessageReqFlushPending spec:/rtems/message/req/flush-pending
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsMessageReqFlushPending_Pre_Count_Valid,
+ RtemsMessageReqFlushPending_Pre_Count_Null,
+ RtemsMessageReqFlushPending_Pre_Count_NA
+} RtemsMessageReqFlushPending_Pre_Count;
+
+typedef enum {
+ RtemsMessageReqFlushPending_Pre_Id_Valid,
+ RtemsMessageReqFlushPending_Pre_Id_Invalid,
+ RtemsMessageReqFlushPending_Pre_Id_NA
+} RtemsMessageReqFlushPending_Pre_Id;
+
+typedef enum {
+ RtemsMessageReqFlushPending_Pre_MsgQueue_Empty,
+ RtemsMessageReqFlushPending_Pre_MsgQueue_Several,
+ RtemsMessageReqFlushPending_Pre_MsgQueue_NA
+} RtemsMessageReqFlushPending_Pre_MsgQueue;
+
+typedef enum {
+ RtemsMessageReqFlushPending_Pre_Receivers_Waiting,
+ RtemsMessageReqFlushPending_Pre_Receivers_None,
+ RtemsMessageReqFlushPending_Pre_Receivers_NA
+} RtemsMessageReqFlushPending_Pre_Receivers;
+
+typedef enum {
+ RtemsMessageReqFlushPending_Pre_Directive_Flush,
+ RtemsMessageReqFlushPending_Pre_Directive_Pending,
+ RtemsMessageReqFlushPending_Pre_Directive_NA
+} RtemsMessageReqFlushPending_Pre_Directive;
+
+typedef enum {
+ RtemsMessageReqFlushPending_Pre_Storage_Nop,
+ RtemsMessageReqFlushPending_Pre_Storage_NA
+} RtemsMessageReqFlushPending_Pre_Storage;
+
+typedef enum {
+ RtemsMessageReqFlushPending_Post_Status_Ok,
+ RtemsMessageReqFlushPending_Post_Status_InvId,
+ RtemsMessageReqFlushPending_Post_Status_InvAddr,
+ RtemsMessageReqFlushPending_Post_Status_NA
+} RtemsMessageReqFlushPending_Post_Status;
+
+typedef enum {
+ RtemsMessageReqFlushPending_Post_Count_Zero,
+ RtemsMessageReqFlushPending_Post_Count_Set,
+ RtemsMessageReqFlushPending_Post_Count_Nop,
+ RtemsMessageReqFlushPending_Post_Count_NA
+} RtemsMessageReqFlushPending_Post_Count;
+
+typedef enum {
+ RtemsMessageReqFlushPending_Post_MsgQueue_Empty,
+ RtemsMessageReqFlushPending_Post_MsgQueue_Nop,
+ RtemsMessageReqFlushPending_Post_MsgQueue_NA
+} RtemsMessageReqFlushPending_Post_MsgQueue;
+
+typedef enum {
+ RtemsMessageReqFlushPending_Post_Receivers_Nop,
+ RtemsMessageReqFlushPending_Post_Receivers_NA
+} RtemsMessageReqFlushPending_Post_Receivers;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Count_NA : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_MsgQueue_NA : 1;
+ uint16_t Pre_Receivers_NA : 1;
+ uint16_t Pre_Directive_NA : 1;
+ uint16_t Pre_Storage_NA : 1;
+ uint16_t Post_Status : 2;
+ uint16_t Post_Count : 2;
+ uint16_t Post_MsgQueue : 2;
+ uint16_t Post_Receivers : 1;
+} RtemsMessageReqFlushPending_Entry;
+
+#define MAXIMUM_PENDING_MESSAGES 3
+#define MAXIMUM_MESSAGE_SIZE 5
+#define NUMBER_OF_WORKERS 3
+
+/**
+ * @brief Test context for spec:/rtems/message/req/flush-pending test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a valid ID of a message queue.
+ */
+ rtems_id message_queue_id;
+
+ /**
+ * @brief This member is used as storage area for the message queue.
+ */
+ RTEMS_MESSAGE_QUEUE_BUFFER( MAXIMUM_MESSAGE_SIZE )
+ storage_area[ MAXIMUM_PENDING_MESSAGES ];
+
+ /**
+ * @brief This member contains the returned status codes of the receivers.
+ */
+ rtems_status_code receive_status[ NUMBER_OF_WORKERS ];
+
+ /**
+ * @brief This member specifies the directive to be called as action.
+ *
+ * This is either rtems_message_queue_flush() or
+ * rtems_message_queue_get_number_pending().
+ */
+ rtems_status_code (*action)( rtems_id id, uint32_t *count );
+
+ /**
+ * @brief This member specifies the ``id`` parameter of the action.
+ */
+ rtems_id id_param;
+
+ /**
+ * @brief This member specifies the ``count`` parameter of the action.
+ */
+ uint32_t *count_param;
+
+ /**
+ * @brief This member contains the returned status code of the action.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member contains the value returned in parameter ``count`` of
+ * the action.
+ */
+ uint32_t count;
+
+ /**
+ * @brief This member contains the task identifiers of the worker tasks.
+ */
+ rtems_id worker_id[ NUMBER_OF_WORKERS ];
+
+ /**
+ * @brief This member contains a pointer to a function which is executed to
+ * check that the action has not changed the content of the message queue.
+ */
+ void (*check_msgq_unchanged)( void *ctx_in );
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 6 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsMessageReqFlushPending_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsMessageReqFlushPending_Context;
+
+static RtemsMessageReqFlushPending_Context
+ RtemsMessageReqFlushPending_Instance;
+
+static const char * const RtemsMessageReqFlushPending_PreDesc_Count[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsMessageReqFlushPending_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsMessageReqFlushPending_PreDesc_MsgQueue[] = {
+ "Empty",
+ "Several",
+ "NA"
+};
+
+static const char * const RtemsMessageReqFlushPending_PreDesc_Receivers[] = {
+ "Waiting",
+ "None",
+ "NA"
+};
+
+static const char * const RtemsMessageReqFlushPending_PreDesc_Directive[] = {
+ "Flush",
+ "Pending",
+ "NA"
+};
+
+static const char * const RtemsMessageReqFlushPending_PreDesc_Storage[] = {
+ "Nop",
+ "NA"
+};
+
+static const char * const * const RtemsMessageReqFlushPending_PreDesc[] = {
+ RtemsMessageReqFlushPending_PreDesc_Count,
+ RtemsMessageReqFlushPending_PreDesc_Id,
+ RtemsMessageReqFlushPending_PreDesc_MsgQueue,
+ RtemsMessageReqFlushPending_PreDesc_Receivers,
+ RtemsMessageReqFlushPending_PreDesc_Directive,
+ RtemsMessageReqFlushPending_PreDesc_Storage,
+ NULL
+};
+
+typedef RtemsMessageReqFlushPending_Context Context;
+static const uint32_t NUMBER_OF_PENDING_MESSAGES = 2;
+static const rtems_interval TIMEOUT_TICKS = 1;
+static const rtems_event_set EVENT_RECEIVE = RTEMS_EVENT_17;
+static const uint8_t queued_message[] = { 200, 201, 202 };
+
+static void Receive( Context *ctx, size_t worker_index )
+{
+ size_t size;
+ uint8_t buffer[ MAXIMUM_MESSAGE_SIZE ];
+
+ ctx->receive_status[worker_index] = rtems_message_queue_receive(
+ ctx->message_queue_id,
+ buffer,
+ &size,
+ RTEMS_WAIT,
+ TIMEOUT_TICKS
+ );
+}
+
+static void WorkerTask( rtems_task_argument argument )
+{
+ static size_t worker_number = 0;
+ size_t worker_index = worker_number++;
+ Context *ctx = (Context *) argument;
+
+ while ( true ) {
+ ReceiveAnyEvents();
+ Receive( ctx, worker_index );
+ }
+}
+
+static void CheckForNoMessage(
+ Context *ctx,
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ (void) ctx;
+ (void) message_buffer;
+ (void) message_size;
+ T_rsc( status, RTEMS_UNSATISFIED );
+}
+
+static void CheckForQueuedMessage(
+ Context *ctx,
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ (void) ctx;
+ T_rsc_success( status );
+ T_eq_u32( message_size, sizeof( queued_message ) );
+ T_eq_mem( message_buffer, queued_message, sizeof( queued_message ) );
+}
+
+static void PopMessage(
+ Context *ctx,
+ void (*check_fn)(
+ Context *ctx,
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+ )
+)
+{
+ rtems_status_code status;
+ uint8_t message_buffer[ MAXIMUM_MESSAGE_SIZE ];
+ size_t message_size;
+
+ status = rtems_message_queue_receive(
+ ctx->message_queue_id,
+ &message_buffer,
+ &message_size,
+ RTEMS_LOCAL | RTEMS_NO_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+
+ check_fn( ctx, status, message_buffer, message_size );
+}
+
+static void CheckForNoMessageInQueue( void *ctx_in )
+{
+ Context *ctx = ctx_in;
+ PopMessage( ctx, CheckForNoMessage );
+}
+
+static void CheckForSeveralMessagesInQueue( void *ctx_in )
+{
+ Context *ctx = ctx_in;
+ uint32_t i;
+ for ( i = 0; i < NUMBER_OF_PENDING_MESSAGES; ++i ) {
+ PopMessage( ctx, CheckForQueuedMessage );
+ }
+ PopMessage( ctx, CheckForNoMessage );
+}
+
+static void SendMsg( Context *ctx )
+{
+ rtems_status_code status;
+
+ status = rtems_message_queue_send(
+ ctx->message_queue_id,
+ queued_message,
+ sizeof( queued_message )
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsMessageReqFlushPending_Pre_Count_Prepare(
+ RtemsMessageReqFlushPending_Context *ctx,
+ RtemsMessageReqFlushPending_Pre_Count state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqFlushPending_Pre_Count_Valid: {
+ /*
+ * While the ``count`` parameter references an ``uint32_t`` object.
+ */
+ ctx->count_param = &ctx->count;
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Pre_Count_Null: {
+ /*
+ * While the ``count`` parameter is NULL.
+ */
+ ctx->count_param = NULL;
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Pre_Count_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqFlushPending_Pre_Id_Prepare(
+ RtemsMessageReqFlushPending_Context *ctx,
+ RtemsMessageReqFlushPending_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqFlushPending_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is valid.
+ */
+ ctx->id_param = ctx->message_queue_id;
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id_param = RTEMS_ID_NONE;
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqFlushPending_Pre_MsgQueue_Prepare(
+ RtemsMessageReqFlushPending_Context *ctx,
+ RtemsMessageReqFlushPending_Pre_MsgQueue state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqFlushPending_Pre_MsgQueue_Empty: {
+ /*
+ * While there is no message in the message queue.
+ */
+ /* Message queue is already empty. */
+ ctx->check_msgq_unchanged = CheckForNoMessageInQueue;
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Pre_MsgQueue_Several: {
+ /*
+ * While there are messages in the message queue.
+ */
+ uint32_t i;
+ for ( i = 0; i < NUMBER_OF_PENDING_MESSAGES; ++i ) {
+ SendMsg( ctx );
+ }
+ ctx->check_msgq_unchanged = CheckForSeveralMessagesInQueue;
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Pre_MsgQueue_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqFlushPending_Pre_Receivers_Prepare(
+ RtemsMessageReqFlushPending_Context *ctx,
+ RtemsMessageReqFlushPending_Pre_Receivers state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqFlushPending_Pre_Receivers_Waiting: {
+ /*
+ * While one or more receivers are waiting to receive a message.
+ */
+ size_t i;
+ for ( i = 0; i < NUMBER_OF_WORKERS; ++i ) {
+ SendEvents( ctx->worker_id[i], EVENT_RECEIVE );
+ }
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Pre_Receivers_None: {
+ /*
+ * While no receiver is waiting to receive a message.
+ */
+ /* There is already no receiver waiting. */
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Pre_Receivers_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqFlushPending_Pre_Directive_Prepare(
+ RtemsMessageReqFlushPending_Context *ctx,
+ RtemsMessageReqFlushPending_Pre_Directive state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqFlushPending_Pre_Directive_Flush: {
+ /*
+ * While the directive rtems_message_queue_flush() is called.
+ */
+ ctx->action = rtems_message_queue_flush;
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Pre_Directive_Pending: {
+ /*
+ * While the directive rtems_message_queue_get_number_pending() is
+ * called.
+ */
+ ctx->action = rtems_message_queue_get_number_pending;
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Pre_Directive_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqFlushPending_Pre_Storage_Prepare(
+ RtemsMessageReqFlushPending_Context *ctx,
+ RtemsMessageReqFlushPending_Pre_Storage state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqFlushPending_Pre_Storage_Nop: {
+ /*
+ * While the memory area to which a pointer is provided as member
+ * storage_area of type rtems_message_queue_config when the message queue
+ * is constructed by rtems_message_queue_construct() is altered only by
+ * the RTEMS operating system.
+ */
+ /* Only a requirement text. */
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Pre_Storage_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqFlushPending_Post_Status_Check(
+ RtemsMessageReqFlushPending_Context *ctx,
+ RtemsMessageReqFlushPending_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqFlushPending_Post_Status_Ok: {
+ /*
+ * The return status of the called directive (rtems_message_queue_flush()
+ * or rtems_message_queue_get_number_pending()) shall be RTEMS_SUCCESSFUL
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Post_Status_InvId: {
+ /*
+ * The return status of the called directive (rtems_message_queue_flush()
+ * or rtems_message_queue_get_number_pending()) shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Post_Status_InvAddr: {
+ /*
+ * The return status of the called directive (rtems_message_queue_flush()
+ * or rtems_message_queue_get_number_pending()) shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqFlushPending_Post_Count_Check(
+ RtemsMessageReqFlushPending_Context *ctx,
+ RtemsMessageReqFlushPending_Post_Count state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqFlushPending_Post_Count_Zero: {
+ /*
+ * The value of the object referenced by the ``count`` parameter shall be
+ * 0 after the return of the rtems_message_queue_flush() or
+ * rtems_message_queue_get_number_pending() call.
+ */
+ T_eq_u32( ctx->count, 0 );
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Post_Count_Set: {
+ /*
+ * The rtems_message_queue_get_number_pending() directive shall set the
+ * value of the object referenced by the ``count`` parameter to the
+ * number of messages present in the message queue at a point in time
+ * during the single execution of the
+ * rtems_message_queue_get_number_pending() directive.
+ *
+ * The rtems_message_queue_flush() directive shall set the value of the
+ * object referenced by the ``count`` parameter to the number of messages
+ * it removed from the message queue during the single execution of the
+ * rtems_message_queue_flush() directive.
+ */
+ T_eq_u32( ctx->count, NUMBER_OF_PENDING_MESSAGES );
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Post_Count_Nop: {
+ /*
+ * The value of the object referenced by the ``count`` parameter in past
+ * call to rtems_message_queue_flush() or
+ * rtems_message_queue_get_number_pending() shall not be accessed by the
+ * rtems_message_queue_flush() or
+ * rtems_message_queue_get_number_pending() call (see also Nop).
+ */
+ T_eq_u32( ctx->count, UINT8_MAX );
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Post_Count_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqFlushPending_Post_MsgQueue_Check(
+ RtemsMessageReqFlushPending_Context *ctx,
+ RtemsMessageReqFlushPending_Post_MsgQueue state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqFlushPending_Post_MsgQueue_Empty: {
+ /*
+ * The message queue shall contain no messages after the last call to
+ * ``id``.
+ */
+ PopMessage( ctx, CheckForNoMessage );
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Post_MsgQueue_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in the past call to
+ * rtems_message_queue_flush() or
+ * rtems_message_queue_get_number_pending() shall not be changed by that
+ * call (see also Nop).
+ */
+ ctx->check_msgq_unchanged( ctx );
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Post_MsgQueue_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqFlushPending_Post_Receivers_Check(
+ RtemsMessageReqFlushPending_Context *ctx,
+ RtemsMessageReqFlushPending_Post_Receivers state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqFlushPending_Post_Receivers_Nop: {
+ /*
+ * The receivers waiting for a message at the message queue shall not be
+ * affected by the call to the rtems_message_queue_flush() or
+ * rtems_message_queue_get_number_pending() directive.
+ */
+ size_t i;
+ for ( i = 0; i < NUMBER_OF_WORKERS; ++i ) {
+ T_rsc( ctx->receive_status[i], RTEMS_TIMEOUT );
+ }
+ break;
+ }
+
+ case RtemsMessageReqFlushPending_Post_Receivers_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqFlushPending_Setup(
+ RtemsMessageReqFlushPending_Context *ctx
+)
+{
+ size_t i;
+ SetSelfPriority( PRIO_NORMAL );
+
+ for ( i = 0; i < NUMBER_OF_WORKERS; ++i ) {
+ ctx->worker_id[i] = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id[i], WorkerTask, ctx );
+ }
+}
+
+static void RtemsMessageReqFlushPending_Setup_Wrap( void *arg )
+{
+ RtemsMessageReqFlushPending_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsMessageReqFlushPending_Setup( ctx );
+}
+
+static void RtemsMessageReqFlushPending_Teardown(
+ RtemsMessageReqFlushPending_Context *ctx
+)
+{
+ size_t i;
+
+ for ( i = 0; i < NUMBER_OF_WORKERS; ++i ) {
+ DeleteTask( ctx->worker_id[i] );
+ }
+ RestoreRunnerPriority();
+}
+
+static void RtemsMessageReqFlushPending_Teardown_Wrap( void *arg )
+{
+ RtemsMessageReqFlushPending_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsMessageReqFlushPending_Teardown( ctx );
+}
+
+static void RtemsMessageReqFlushPending_Prepare(
+ RtemsMessageReqFlushPending_Context *ctx
+)
+{
+ rtems_status_code status;
+
+ rtems_message_queue_config config = {
+ .name = rtems_build_name( 'M', 'S', 'G', 'Q' ),
+ .maximum_pending_messages = MAXIMUM_PENDING_MESSAGES,
+ .maximum_message_size = MAXIMUM_MESSAGE_SIZE,
+ .storage_area = ctx->storage_area,
+ .storage_size = sizeof( ctx->storage_area ),
+ .storage_free = NULL,
+ .attributes = RTEMS_DEFAULT_ATTRIBUTES
+ };
+
+ status = rtems_message_queue_construct(
+ &config,
+ &ctx->message_queue_id
+ );
+ T_rsc_success( status );
+
+ ctx->count = UINT8_MAX;
+}
+
+static void RtemsMessageReqFlushPending_Action(
+ RtemsMessageReqFlushPending_Context *ctx
+)
+{
+ ctx->status = (ctx->action)(
+ ctx->id_param,
+ ctx->count_param
+ );
+
+ FinalClockTick();
+}
+
+static void RtemsMessageReqFlushPending_Cleanup(
+ RtemsMessageReqFlushPending_Context *ctx
+)
+{
+ T_rsc_success( rtems_message_queue_delete( ctx->message_queue_id ) );
+}
+
+static const RtemsMessageReqFlushPending_Entry
+RtemsMessageReqFlushPending_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, 0, RtemsMessageReqFlushPending_Post_Status_NA,
+ RtemsMessageReqFlushPending_Post_Count_NA,
+ RtemsMessageReqFlushPending_Post_MsgQueue_NA,
+ RtemsMessageReqFlushPending_Post_Receivers_NA },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqFlushPending_Post_Status_InvAddr,
+ RtemsMessageReqFlushPending_Post_Count_Nop,
+ RtemsMessageReqFlushPending_Post_MsgQueue_Nop,
+ RtemsMessageReqFlushPending_Post_Receivers_NA },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqFlushPending_Post_Status_InvId,
+ RtemsMessageReqFlushPending_Post_Count_Nop,
+ RtemsMessageReqFlushPending_Post_MsgQueue_Nop,
+ RtemsMessageReqFlushPending_Post_Receivers_NA },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqFlushPending_Post_Status_InvAddr,
+ RtemsMessageReqFlushPending_Post_Count_Nop,
+ RtemsMessageReqFlushPending_Post_MsgQueue_Nop,
+ RtemsMessageReqFlushPending_Post_Receivers_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqFlushPending_Post_Status_InvId,
+ RtemsMessageReqFlushPending_Post_Count_Nop,
+ RtemsMessageReqFlushPending_Post_MsgQueue_Nop,
+ RtemsMessageReqFlushPending_Post_Receivers_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqFlushPending_Post_Status_Ok,
+ RtemsMessageReqFlushPending_Post_Count_Zero,
+ RtemsMessageReqFlushPending_Post_MsgQueue_Empty,
+ RtemsMessageReqFlushPending_Post_Receivers_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqFlushPending_Post_Status_Ok,
+ RtemsMessageReqFlushPending_Post_Count_Zero,
+ RtemsMessageReqFlushPending_Post_MsgQueue_Nop,
+ RtemsMessageReqFlushPending_Post_Receivers_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqFlushPending_Post_Status_Ok,
+ RtemsMessageReqFlushPending_Post_Count_Zero,
+ RtemsMessageReqFlushPending_Post_MsgQueue_Empty,
+ RtemsMessageReqFlushPending_Post_Receivers_NA },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqFlushPending_Post_Status_Ok,
+ RtemsMessageReqFlushPending_Post_Count_Zero,
+ RtemsMessageReqFlushPending_Post_MsgQueue_Nop,
+ RtemsMessageReqFlushPending_Post_Receivers_NA },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqFlushPending_Post_Status_Ok,
+ RtemsMessageReqFlushPending_Post_Count_Set,
+ RtemsMessageReqFlushPending_Post_MsgQueue_Empty,
+ RtemsMessageReqFlushPending_Post_Receivers_NA },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqFlushPending_Post_Status_Ok,
+ RtemsMessageReqFlushPending_Post_Count_Set,
+ RtemsMessageReqFlushPending_Post_MsgQueue_Nop,
+ RtemsMessageReqFlushPending_Post_Receivers_NA }
+};
+
+static const uint8_t
+RtemsMessageReqFlushPending_Map[] = {
+ 5, 6, 7, 8, 0, 0, 9, 10, 4, 4, 2, 2, 0, 0, 2, 2, 3, 3, 1, 1, 0, 0, 1, 1, 3,
+ 3, 1, 1, 0, 0, 1, 1
+};
+
+static size_t RtemsMessageReqFlushPending_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ RtemsMessageReqFlushPending_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsMessageReqFlushPending_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsMessageReqFlushPending_Fixture = {
+ .setup = RtemsMessageReqFlushPending_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsMessageReqFlushPending_Teardown_Wrap,
+ .scope = RtemsMessageReqFlushPending_Scope,
+ .initial_context = &RtemsMessageReqFlushPending_Instance
+};
+
+static inline RtemsMessageReqFlushPending_Entry
+RtemsMessageReqFlushPending_PopEntry(
+ RtemsMessageReqFlushPending_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsMessageReqFlushPending_Entries[
+ RtemsMessageReqFlushPending_Map[ index ]
+ ];
+}
+
+static void RtemsMessageReqFlushPending_TestVariant(
+ RtemsMessageReqFlushPending_Context *ctx
+)
+{
+ RtemsMessageReqFlushPending_Pre_Count_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsMessageReqFlushPending_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsMessageReqFlushPending_Pre_MsgQueue_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsMessageReqFlushPending_Pre_Receivers_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsMessageReqFlushPending_Pre_Directive_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsMessageReqFlushPending_Pre_Storage_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsMessageReqFlushPending_Action( ctx );
+ RtemsMessageReqFlushPending_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsMessageReqFlushPending_Post_Count_Check(
+ ctx,
+ ctx->Map.entry.Post_Count
+ );
+ RtemsMessageReqFlushPending_Post_MsgQueue_Check(
+ ctx,
+ ctx->Map.entry.Post_MsgQueue
+ );
+ RtemsMessageReqFlushPending_Post_Receivers_Check(
+ ctx,
+ ctx->Map.entry.Post_Receivers
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsMessageReqFlushPending( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsMessageReqFlushPending,
+ &RtemsMessageReqFlushPending_Fixture
+)
+{
+ RtemsMessageReqFlushPending_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsMessageReqFlushPending_Pre_Count_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsMessageReqFlushPending_Pre_Count_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsMessageReqFlushPending_Pre_Id_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsMessageReqFlushPending_Pre_Id_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsMessageReqFlushPending_Pre_MsgQueue_Empty;
+ ctx->Map.pcs[ 2 ] < RtemsMessageReqFlushPending_Pre_MsgQueue_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsMessageReqFlushPending_Pre_Receivers_Waiting;
+ ctx->Map.pcs[ 3 ] < RtemsMessageReqFlushPending_Pre_Receivers_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsMessageReqFlushPending_Pre_Directive_Flush;
+ ctx->Map.pcs[ 4 ] < RtemsMessageReqFlushPending_Pre_Directive_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = RtemsMessageReqFlushPending_Pre_Storage_Nop;
+ ctx->Map.pcs[ 5 ] < RtemsMessageReqFlushPending_Pre_Storage_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ ctx->Map.entry = RtemsMessageReqFlushPending_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsMessageReqFlushPending_Prepare( ctx );
+ RtemsMessageReqFlushPending_TestVariant( ctx );
+ RtemsMessageReqFlushPending_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-message-ident.c b/testsuites/validation/tc-message-ident.c
new file mode 100644
index 0000000000..dc3ed119a6
--- /dev/null
+++ b/testsuites/validation/tc-message-ident.c
@@ -0,0 +1,129 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsMessageValIdent
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsMessageValIdent spec:/rtems/message/val/ident
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Test the rtems_message_queue_ident() directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API message queue
+ * class objects defined by spec:/rtems/req/ident.
+ *
+ * @{
+ */
+
+#define NAME_LOCAL_OBJECT rtems_build_name( 'M', 'E', 'S', 'Q' )
+
+static RTEMS_MESSAGE_QUEUE_BUFFER( 1 ) ClassicMessageIdentBuffers[ 1 ];
+
+static rtems_message_queue_config ClassicObjectIdentConfig = {
+ .name = NAME_LOCAL_OBJECT,
+ .maximum_pending_messages = RTEMS_ARRAY_SIZE( ClassicMessageIdentBuffers ),
+ .maximum_message_size = 1,
+ .storage_area = ClassicMessageIdentBuffers,
+ .storage_size = sizeof( ClassicMessageIdentBuffers ),
+ .attributes = RTEMS_DEFAULT_ATTRIBUTES
+};
+
+static rtems_status_code ClassicMessageIdentAction(
+ rtems_name name,
+ uint32_t node,
+ rtems_id *id
+)
+{
+ return rtems_message_queue_ident( name, node, id );
+}
+
+/**
+ * @brief Run the generic object identification tests for Classic API message
+ * queue class objects defined by spec:/rtems/req/ident.
+ */
+static void RtemsMessageValIdent_Action_0( void )
+{
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_message_queue_construct(
+ &ClassicObjectIdentConfig,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdent_Run(
+ id_local_object,
+ NAME_LOCAL_OBJECT,
+ ClassicMessageIdentAction
+ );
+
+ sc = rtems_message_queue_delete( id_local_object );
+ T_rsc_success( sc );
+}
+
+/**
+ * @fn void T_case_body_RtemsMessageValIdent( void )
+ */
+T_TEST_CASE( RtemsMessageValIdent )
+{
+ RtemsMessageValIdent_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-message-macros.c b/testsuites/validation/tc-message-macros.c
new file mode 100644
index 0000000000..b3c37b1963
--- /dev/null
+++ b/testsuites/validation/tc-message-macros.c
@@ -0,0 +1,147 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsMessageValMessageMacros
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsMessageValMessageMacros \
+ * spec:/rtems/message/val/message-macros
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests the macros of the @ref RTEMSAPIClassicMessage.
+ *
+ * This test case performs the following actions:
+ *
+ * - Check the RTEMS_MESSAGE_QUEUE_BUFFER() macro.
+ *
+ * - Check that the object defined by the RTEMS_MESSAGE_QUEUE_BUFFER()
+ * expression has the desired size. rtems_message_queue_construct() will
+ * return RTEMS_UNSATISFIED instead of RTEMS_SUCCESSFUL if the object
+ * defined by the RTEMS_MESSAGE_QUEUE_BUFFER() expression has incorrect
+ * size.
+ *
+ * @{
+ */
+
+/**
+ * @brief Check the RTEMS_MESSAGE_QUEUE_BUFFER() macro.
+ */
+static void RtemsMessageValMessageMacros_Action_0( void )
+{
+ rtems_status_code status;
+ rtems_id id;
+
+ static const uint32_t maximum_pending_messages_0 = 1;
+ static const size_t maximum_message_size_0 = 1;
+ RTEMS_MESSAGE_QUEUE_BUFFER( maximum_message_size_0 )
+ storage_area_0[ maximum_pending_messages_0 ];
+ rtems_message_queue_config config_0 = {
+ .name = rtems_build_name( 'M', 'S', 'G', '0' ),
+ .maximum_pending_messages = maximum_pending_messages_0,
+ .maximum_message_size = maximum_message_size_0,
+ .storage_area = storage_area_0,
+ .storage_size = sizeof( storage_area_0 ),
+ .storage_free = NULL,
+ .attributes = RTEMS_DEFAULT_OPTIONS
+ };
+
+ static const uint32_t maximum_pending_messages_1 = 3;
+ static const size_t maximum_message_size_1 = 5;
+ RTEMS_MESSAGE_QUEUE_BUFFER( maximum_message_size_1 )
+ storage_area_1[ maximum_pending_messages_1 ];
+ rtems_message_queue_config config_1 = {
+ .name = rtems_build_name( 'M', 'S', 'G', '1' ),
+ .maximum_pending_messages = maximum_pending_messages_1,
+ .maximum_message_size = maximum_message_size_1,
+ .storage_area = storage_area_1,
+ .storage_size = sizeof( storage_area_1 ),
+ .storage_free = NULL,
+ .attributes = RTEMS_DEFAULT_OPTIONS
+ };
+
+ /*
+ * Check that the object defined by the RTEMS_MESSAGE_QUEUE_BUFFER()
+ * expression has the desired size. rtems_message_queue_construct() will
+ * return RTEMS_UNSATISFIED instead of RTEMS_SUCCESSFUL if the object defined
+ * by the RTEMS_MESSAGE_QUEUE_BUFFER() expression has incorrect size.
+ */
+ status = rtems_message_queue_construct(
+ &config_0,
+ &id
+ );
+ T_step_rsc_success( 0, status );
+ T_step_rsc_success( 1, rtems_message_queue_delete( id ) );
+
+ status = rtems_message_queue_construct(
+ &config_1,
+ &id
+ );
+ T_step_rsc_success( 2, status );
+ T_step_rsc_success( 3, rtems_message_queue_delete( id ) );
+}
+
+/**
+ * @fn void T_case_body_RtemsMessageValMessageMacros( void )
+ */
+T_TEST_CASE( RtemsMessageValMessageMacros )
+{
+ T_plan( 4 );
+
+ RtemsMessageValMessageMacros_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-message-performance.c b/testsuites/validation/tc-message-performance.c
new file mode 100644
index 0000000000..c01570b772
--- /dev/null
+++ b/testsuites/validation/tc-message-performance.c
@@ -0,0 +1,946 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsMessageValPerf
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsMessageValPerf spec:/rtems/message/val/perf
+ *
+ * @ingroup TestsuitesPerformanceNoClock0
+ *
+ * @brief This test case provides a context to run @ref RTEMSAPIClassicMessage
+ * performance tests.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/rtems/message/val/perf test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides a message queue identifier.
+ */
+ rtems_id queue_id;
+
+ /**
+ * @brief This member provides a message to send.
+ */
+ long message;
+
+ /**
+ * @brief This member provides a worker identifier.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member provides a status code.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member references the measure runtime context.
+ */
+ T_measure_runtime_context *context;
+
+ /**
+ * @brief This member provides the measure runtime request.
+ */
+ T_measure_runtime_request request;
+
+ /**
+ * @brief This member provides an optional measurement begin time point.
+ */
+ T_ticks begin;
+
+ /**
+ * @brief This member provides an optional measurement end time point.
+ */
+ T_ticks end;
+} RtemsMessageValPerf_Context;
+
+static RtemsMessageValPerf_Context
+ RtemsMessageValPerf_Instance;
+
+#define MAXIMUM_PENDING_MESSAGES 1
+
+#define MAXIMUM_MESSAGE_SIZE 8
+
+#define EVENT_END RTEMS_EVENT_0
+
+#define EVENT_SEND RTEMS_EVENT_1
+
+#define EVENT_SEND_END RTEMS_EVENT_2
+
+#define EVENT_RECEIVE RTEMS_EVENT_3
+
+#define EVENT_RECEIVE_END RTEMS_EVENT_4
+
+typedef RtemsMessageValPerf_Context Context;
+
+static RTEMS_MESSAGE_QUEUE_BUFFER( MAXIMUM_MESSAGE_SIZE )
+ storage_area[ MAXIMUM_PENDING_MESSAGES ];
+
+rtems_message_queue_config config = {
+ .name = OBJECT_NAME,
+ .maximum_pending_messages = MAXIMUM_PENDING_MESSAGES,
+ .maximum_message_size = MAXIMUM_MESSAGE_SIZE,
+ .storage_area = storage_area,
+ .storage_size = sizeof( storage_area )
+};
+
+static void Send( const Context *ctx, rtems_event_set events )
+{
+ SendEvents( ctx->worker_id, events );
+}
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ rtems_event_set events;
+ rtems_status_code sc;
+ T_ticks ticks;
+
+ sc = rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_EVENT_ANY | RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT,
+ &events
+ );
+ ticks = T_tick();
+ T_quiet_rsc_success( sc );
+
+ if ( ( events & EVENT_END ) != 0 ) {
+ ctx->end = ticks;
+ }
+
+ if ( ( events & EVENT_SEND ) != 0 ) {
+ sc = rtems_message_queue_send(
+ ctx->queue_id,
+ &ctx->message,
+ sizeof( ctx->message )
+ );
+ ticks = T_tick();
+ T_quiet_rsc_success( sc );
+
+ if ( ( events & EVENT_SEND_END ) != 0 ) {
+ ctx->end = ticks;
+ }
+ }
+
+ if ( ( events & EVENT_RECEIVE ) != 0 ) {
+ long message;
+ size_t size;
+
+ sc = rtems_message_queue_receive(
+ ctx->queue_id,
+ &message,
+ &size,
+ RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+ ticks = T_tick();
+ T_quiet_rsc_success( sc );
+
+ if ( ( events & EVENT_RECEIVE_END ) != 0 ) {
+ ctx->end = ticks;
+ }
+ }
+ }
+}
+
+static void RtemsMessageValPerf_Setup_Context(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ T_measure_runtime_config config;
+
+ memset( &config, 0, sizeof( config ) );
+ config.sample_count = 100;
+ ctx->request.arg = ctx;
+ ctx->request.flags = T_MEASURE_RUNTIME_REPORT_SAMPLES;
+ ctx->context = T_measure_runtime_create( &config );
+ T_assert_not_null( ctx->context );
+}
+
+/**
+ * @brief Create a message queue and a worker task.
+ */
+static void RtemsMessageValPerf_Setup( RtemsMessageValPerf_Context *ctx )
+{
+ rtems_status_code sc;
+
+ SetSelfPriority( PRIO_NORMAL );
+
+ sc = rtems_message_queue_construct( &config, &ctx->queue_id );
+ T_rsc_success( sc );
+
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+static void RtemsMessageValPerf_Setup_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageValPerf_Setup_Context( ctx );
+ RtemsMessageValPerf_Setup( ctx );
+}
+
+/**
+ * @brief Delete the worker task and the message queue.
+ */
+static void RtemsMessageValPerf_Teardown( RtemsMessageValPerf_Context *ctx )
+{
+ rtems_status_code sc;
+
+ DeleteTask( ctx->worker_id );
+
+ sc = rtems_message_queue_delete( ctx->queue_id );
+ T_rsc_success( sc );
+
+ RestoreRunnerPriority();
+}
+
+static void RtemsMessageValPerf_Teardown_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageValPerf_Teardown( ctx );
+}
+
+static T_fixture RtemsMessageValPerf_Fixture = {
+ .setup = RtemsMessageValPerf_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsMessageValPerf_Teardown_Wrap,
+ .scope = NULL,
+ .initial_context = &RtemsMessageValPerf_Instance
+};
+
+/**
+ * @defgroup RtemsMessageReqPerfReceiveTry \
+ * spec:/rtems/message/req/perf-receive-try
+ *
+ * @{
+ */
+
+/**
+ * @brief Try to receive a message.
+ */
+static void RtemsMessageReqPerfReceiveTry_Body(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ uint64_t message;
+ size_t size;
+
+ ctx->status = rtems_message_queue_receive(
+ ctx->queue_id,
+ &message,
+ &size,
+ RTEMS_NO_WAIT,
+ 0
+ );
+}
+
+static void RtemsMessageReqPerfReceiveTry_Body_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageReqPerfReceiveTry_Body( ctx );
+}
+
+/**
+ * @brief Discard samples interrupted by a clock tick.
+ */
+static bool RtemsMessageReqPerfReceiveTry_Teardown(
+ RtemsMessageValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc( ctx->status, RTEMS_UNSATISFIED );
+
+ return tic == toc;
+}
+
+static bool RtemsMessageReqPerfReceiveTry_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsMessageReqPerfReceiveTry_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsMessageReqPerfReceiveWaitForever \
+ * spec:/rtems/message/req/perf-receive-wait-forever
+ *
+ * @{
+ */
+
+/**
+ * @brief Schedule a message send.
+ */
+static void RtemsMessageReqPerfReceiveWaitForever_Setup(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ SetPriority( ctx->worker_id, PRIO_LOW );
+ Send( ctx, EVENT_END | EVENT_SEND );
+}
+
+static void RtemsMessageReqPerfReceiveWaitForever_Setup_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageReqPerfReceiveWaitForever_Setup( ctx );
+}
+
+/**
+ * @brief Receive a message. Wait forever.
+ */
+static void RtemsMessageReqPerfReceiveWaitForever_Body(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ uint64_t message;
+ size_t size;
+
+ ctx->begin = T_tick();
+ ctx->status = rtems_message_queue_receive(
+ ctx->queue_id,
+ &message,
+ &size,
+ RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+}
+
+static void RtemsMessageReqPerfReceiveWaitForever_Body_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageReqPerfReceiveWaitForever_Body( ctx );
+}
+
+/**
+ * @brief Set the measured runtime. Restore the worker priority. Discard
+ * samples interrupted by a clock tick.
+ */
+static bool RtemsMessageReqPerfReceiveWaitForever_Teardown(
+ RtemsMessageValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ *delta = ctx->end - ctx->begin;
+ SetPriority( ctx->worker_id, PRIO_HIGH );
+
+ return tic == toc;
+}
+
+static bool RtemsMessageReqPerfReceiveWaitForever_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsMessageReqPerfReceiveWaitForever_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsMessageReqPerfReceiveWaitTimed \
+ * spec:/rtems/message/req/perf-receive-wait-timed
+ *
+ * @{
+ */
+
+/**
+ * @brief Schedule a message send.
+ */
+static void RtemsMessageReqPerfReceiveWaitTimed_Setup(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ SetPriority( ctx->worker_id, PRIO_LOW );
+ Send( ctx, EVENT_END | EVENT_SEND );
+}
+
+static void RtemsMessageReqPerfReceiveWaitTimed_Setup_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageReqPerfReceiveWaitTimed_Setup( ctx );
+}
+
+/**
+ * @brief Receive a message. Wait with a timeout.
+ */
+static void RtemsMessageReqPerfReceiveWaitTimed_Body(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ uint64_t message;
+ size_t size;
+
+ ctx->begin = T_tick();
+ ctx->status = rtems_message_queue_receive(
+ ctx->queue_id,
+ &message,
+ &size,
+ RTEMS_WAIT,
+ UINT32_MAX
+ );
+}
+
+static void RtemsMessageReqPerfReceiveWaitTimed_Body_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageReqPerfReceiveWaitTimed_Body( ctx );
+}
+
+/**
+ * @brief Set the measured runtime. Restore the worker priority. Discard
+ * samples interrupted by a clock tick.
+ */
+static bool RtemsMessageReqPerfReceiveWaitTimed_Teardown(
+ RtemsMessageValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ *delta = ctx->end - ctx->begin;
+ SetPriority( ctx->worker_id, PRIO_HIGH );
+
+ return tic == toc;
+}
+
+static bool RtemsMessageReqPerfReceiveWaitTimed_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsMessageReqPerfReceiveWaitTimed_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsMessageReqPerfSend spec:/rtems/message/req/perf-send
+ *
+ * @{
+ */
+
+/**
+ * @brief Send a message.
+ */
+static void RtemsMessageReqPerfSend_Body( RtemsMessageValPerf_Context *ctx )
+{
+ ctx->status = rtems_message_queue_send(
+ ctx->queue_id,
+ &ctx->message,
+ sizeof( ctx->message )
+ );
+}
+
+static void RtemsMessageReqPerfSend_Body_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageReqPerfSend_Body( ctx );
+}
+
+/**
+ * @brief Flush the message queue. Discard samples interrupted by a clock
+ * tick.
+ */
+static bool RtemsMessageReqPerfSend_Teardown(
+ RtemsMessageValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ rtems_status_code sc;
+ uint32_t count;
+
+ T_quiet_rsc_success( ctx->status );
+
+ sc = rtems_message_queue_flush( ctx->queue_id, &count );
+ T_quiet_rsc_success( sc );
+ T_quiet_eq_u32( count, 1 );
+
+ return tic == toc;
+}
+
+static bool RtemsMessageReqPerfSend_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsMessageReqPerfSend_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsMessageReqPerfSendOther \
+ * spec:/rtems/message/req/perf-send-other
+ *
+ * @{
+ */
+
+/**
+ * @brief Let the worker wait on the message queue.
+ */
+static void RtemsMessageReqPerfSendOther_Setup(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ Send( ctx, EVENT_RECEIVE );
+ SetPriority( ctx->worker_id, PRIO_LOW );
+}
+
+static void RtemsMessageReqPerfSendOther_Setup_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageReqPerfSendOther_Setup( ctx );
+}
+
+/**
+ * @brief Send a message.
+ */
+static void RtemsMessageReqPerfSendOther_Body(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ ctx->status = rtems_message_queue_send(
+ ctx->queue_id,
+ &ctx->message,
+ sizeof( ctx->message )
+ );
+}
+
+static void RtemsMessageReqPerfSendOther_Body_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageReqPerfSendOther_Body( ctx );
+}
+
+/**
+ * @brief Restore the worker priority. Discard samples interrupted by a clock
+ * tick.
+ */
+static bool RtemsMessageReqPerfSendOther_Teardown(
+ RtemsMessageValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ SetPriority( ctx->worker_id, PRIO_HIGH );
+
+ return tic == toc;
+}
+
+static bool RtemsMessageReqPerfSendOther_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsMessageReqPerfSendOther_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+#if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsMessageReqPerfSendOtherCpu \
+ * spec:/rtems/message/req/perf-send-other-cpu
+ *
+ * @{
+ */
+
+/**
+ * @brief Move worker to scheduler B.
+ */
+static void RtemsMessageReqPerfSendOtherCpu_Prepare(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ SetScheduler( ctx->worker_id, SCHEDULER_B_ID, PRIO_NORMAL );
+}
+
+/**
+ * @brief Let the worker wait on the message queue.
+ */
+static void RtemsMessageReqPerfSendOtherCpu_Setup(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ Send( ctx, EVENT_RECEIVE | EVENT_RECEIVE_END );
+ WaitForNextTask( 1, ctx->worker_id );
+}
+
+static void RtemsMessageReqPerfSendOtherCpu_Setup_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageReqPerfSendOtherCpu_Setup( ctx );
+}
+
+/**
+ * @brief Send a message.
+ */
+static void RtemsMessageReqPerfSendOtherCpu_Body(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ ctx->begin = T_tick();
+ ctx->status = rtems_message_queue_send(
+ ctx->queue_id,
+ &ctx->message,
+ sizeof( ctx->message )
+ );
+}
+
+static void RtemsMessageReqPerfSendOtherCpu_Body_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageReqPerfSendOtherCpu_Body( ctx );
+}
+
+/**
+ * @brief Make sure the worker waits for the next event. Set the measured
+ * runtime. Discard samples interrupted by a clock tick.
+ */
+static bool RtemsMessageReqPerfSendOtherCpu_Teardown(
+ RtemsMessageValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ WaitForNextTask( 1, ctx->worker_id );
+ *delta = ctx->end - ctx->begin;
+
+ return tic == toc;
+}
+
+static bool RtemsMessageReqPerfSendOtherCpu_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsMessageReqPerfSendOtherCpu_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/**
+ * @brief Move worker to scheduler A.
+ */
+static void RtemsMessageReqPerfSendOtherCpu_Cleanup(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ SetScheduler( ctx->worker_id, SCHEDULER_A_ID, PRIO_HIGH );
+}
+
+/** @} */
+#endif
+
+/**
+ * @defgroup RtemsMessageReqPerfSendPreempt \
+ * spec:/rtems/message/req/perf-send-preempt
+ *
+ * @{
+ */
+
+/**
+ * @brief Let the worker wait on the message queue.
+ */
+static void RtemsMessageReqPerfSendPreempt_Setup(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ Send( ctx, EVENT_RECEIVE | EVENT_RECEIVE_END );
+}
+
+static void RtemsMessageReqPerfSendPreempt_Setup_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageReqPerfSendPreempt_Setup( ctx );
+}
+
+/**
+ * @brief Send a message.
+ */
+static void RtemsMessageReqPerfSendPreempt_Body(
+ RtemsMessageValPerf_Context *ctx
+)
+{
+ ctx->begin = T_tick();
+ ctx->status = rtems_message_queue_send(
+ ctx->queue_id,
+ &ctx->message,
+ sizeof( ctx->message )
+ );
+}
+
+static void RtemsMessageReqPerfSendPreempt_Body_Wrap( void *arg )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsMessageReqPerfSendPreempt_Body( ctx );
+}
+
+/**
+ * @brief Set the measured runtime. Discard samples interrupted by a clock
+ * tick.
+ */
+static bool RtemsMessageReqPerfSendPreempt_Teardown(
+ RtemsMessageValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ *delta = ctx->end - ctx->begin;
+
+ return tic == toc;
+}
+
+static bool RtemsMessageReqPerfSendPreempt_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsMessageReqPerfSendPreempt_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/** @} */
+
+/**
+ * @fn void T_case_body_RtemsMessageValPerf( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsMessageValPerf, &RtemsMessageValPerf_Fixture )
+{
+ RtemsMessageValPerf_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ctx->request.name = "RtemsMessageReqPerfReceiveTry";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsMessageReqPerfReceiveTry_Body_Wrap;
+ ctx->request.teardown = RtemsMessageReqPerfReceiveTry_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ ctx->request.name = "RtemsMessageReqPerfReceiveWaitForever";
+ ctx->request.setup = RtemsMessageReqPerfReceiveWaitForever_Setup_Wrap;
+ ctx->request.body = RtemsMessageReqPerfReceiveWaitForever_Body_Wrap;
+ ctx->request.teardown = RtemsMessageReqPerfReceiveWaitForever_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ ctx->request.name = "RtemsMessageReqPerfReceiveWaitTimed";
+ ctx->request.setup = RtemsMessageReqPerfReceiveWaitTimed_Setup_Wrap;
+ ctx->request.body = RtemsMessageReqPerfReceiveWaitTimed_Body_Wrap;
+ ctx->request.teardown = RtemsMessageReqPerfReceiveWaitTimed_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ ctx->request.name = "RtemsMessageReqPerfSend";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsMessageReqPerfSend_Body_Wrap;
+ ctx->request.teardown = RtemsMessageReqPerfSend_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ ctx->request.name = "RtemsMessageReqPerfSendOther";
+ ctx->request.setup = RtemsMessageReqPerfSendOther_Setup_Wrap;
+ ctx->request.body = RtemsMessageReqPerfSendOther_Body_Wrap;
+ ctx->request.teardown = RtemsMessageReqPerfSendOther_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ #if defined(RTEMS_SMP)
+ RtemsMessageReqPerfSendOtherCpu_Prepare( ctx );
+ ctx->request.name = "RtemsMessageReqPerfSendOtherCpu";
+ ctx->request.setup = RtemsMessageReqPerfSendOtherCpu_Setup_Wrap;
+ ctx->request.body = RtemsMessageReqPerfSendOtherCpu_Body_Wrap;
+ ctx->request.teardown = RtemsMessageReqPerfSendOtherCpu_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsMessageReqPerfSendOtherCpu_Cleanup( ctx );
+ #endif
+
+ ctx->request.name = "RtemsMessageReqPerfSendPreempt";
+ ctx->request.setup = RtemsMessageReqPerfSendPreempt_Setup_Wrap;
+ ctx->request.body = RtemsMessageReqPerfSendPreempt_Body_Wrap;
+ ctx->request.teardown = RtemsMessageReqPerfSendPreempt_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-message-receive.c b/testsuites/validation/tc-message-receive.c
new file mode 100644
index 0000000000..944512eaa8
--- /dev/null
+++ b/testsuites/validation/tc-message-receive.c
@@ -0,0 +1,1473 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsMessageReqReceive
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/statesimpl.h>
+
+#include "tr-tq-enqueue-fifo.h"
+#include "tr-tq-enqueue-priority.h"
+#include "tx-support.h"
+#include "tx-thread-queue.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsMessageReqReceive spec:/rtems/message/req/receive
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsMessageReqReceive_Pre_Buffer_Valid,
+ RtemsMessageReqReceive_Pre_Buffer_Null,
+ RtemsMessageReqReceive_Pre_Buffer_NA
+} RtemsMessageReqReceive_Pre_Buffer;
+
+typedef enum {
+ RtemsMessageReqReceive_Pre_Size_Valid,
+ RtemsMessageReqReceive_Pre_Size_Null,
+ RtemsMessageReqReceive_Pre_Size_NA
+} RtemsMessageReqReceive_Pre_Size;
+
+typedef enum {
+ RtemsMessageReqReceive_Pre_Id_Valid,
+ RtemsMessageReqReceive_Pre_Id_Invalid,
+ RtemsMessageReqReceive_Pre_Id_NA
+} RtemsMessageReqReceive_Pre_Id;
+
+typedef enum {
+ RtemsMessageReqReceive_Pre_DuringWait_Nop,
+ RtemsMessageReqReceive_Pre_DuringWait_Deleted,
+ RtemsMessageReqReceive_Pre_DuringWait_NA
+} RtemsMessageReqReceive_Pre_DuringWait;
+
+typedef enum {
+ RtemsMessageReqReceive_Pre_TaskQueue_Fifo,
+ RtemsMessageReqReceive_Pre_TaskQueue_Priority,
+ RtemsMessageReqReceive_Pre_TaskQueue_NA
+} RtemsMessageReqReceive_Pre_TaskQueue;
+
+typedef enum {
+ RtemsMessageReqReceive_Pre_Wait_No,
+ RtemsMessageReqReceive_Pre_Wait_Timeout,
+ RtemsMessageReqReceive_Pre_Wait_Forever,
+ RtemsMessageReqReceive_Pre_Wait_NA
+} RtemsMessageReqReceive_Pre_Wait;
+
+typedef enum {
+ RtemsMessageReqReceive_Pre_MsgQueue_Empty,
+ RtemsMessageReqReceive_Pre_MsgQueue_One,
+ RtemsMessageReqReceive_Pre_MsgQueue_Several,
+ RtemsMessageReqReceive_Pre_MsgQueue_NA
+} RtemsMessageReqReceive_Pre_MsgQueue;
+
+typedef enum {
+ RtemsMessageReqReceive_Pre_Storage_Nop,
+ RtemsMessageReqReceive_Pre_Storage_NA
+} RtemsMessageReqReceive_Pre_Storage;
+
+typedef enum {
+ RtemsMessageReqReceive_Post_Status_Ok,
+ RtemsMessageReqReceive_Post_Status_InvId,
+ RtemsMessageReqReceive_Post_Status_InvAddr,
+ RtemsMessageReqReceive_Post_Status_Unsat,
+ RtemsMessageReqReceive_Post_Status_Timeout,
+ RtemsMessageReqReceive_Post_Status_Deleted,
+ RtemsMessageReqReceive_Post_Status_NA
+} RtemsMessageReqReceive_Post_Status;
+
+typedef enum {
+ RtemsMessageReqReceive_Post_Delay_None,
+ RtemsMessageReqReceive_Post_Delay_Ticks,
+ RtemsMessageReqReceive_Post_Delay_Forever,
+ RtemsMessageReqReceive_Post_Delay_NA
+} RtemsMessageReqReceive_Post_Delay;
+
+typedef enum {
+ RtemsMessageReqReceive_Post_Size_First,
+ RtemsMessageReqReceive_Post_Size_Nop,
+ RtemsMessageReqReceive_Post_Size_NA
+} RtemsMessageReqReceive_Post_Size;
+
+typedef enum {
+ RtemsMessageReqReceive_Post_Msg_First,
+ RtemsMessageReqReceive_Post_Msg_Nop,
+ RtemsMessageReqReceive_Post_Msg_NA
+} RtemsMessageReqReceive_Post_Msg;
+
+typedef enum {
+ RtemsMessageReqReceive_Post_MsgQueue_Empty,
+ RtemsMessageReqReceive_Post_MsgQueue_OneLess,
+ RtemsMessageReqReceive_Post_MsgQueue_Nop,
+ RtemsMessageReqReceive_Post_MsgQueue_NA
+} RtemsMessageReqReceive_Post_MsgQueue;
+
+typedef enum {
+ RtemsMessageReqReceive_Post_Tasks_Fifo,
+ RtemsMessageReqReceive_Post_Tasks_Priority,
+ RtemsMessageReqReceive_Post_Tasks_NA
+} RtemsMessageReqReceive_Post_Tasks;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Buffer_NA : 1;
+ uint32_t Pre_Size_NA : 1;
+ uint32_t Pre_Id_NA : 1;
+ uint32_t Pre_DuringWait_NA : 1;
+ uint32_t Pre_TaskQueue_NA : 1;
+ uint32_t Pre_Wait_NA : 1;
+ uint32_t Pre_MsgQueue_NA : 1;
+ uint32_t Pre_Storage_NA : 1;
+ uint32_t Post_Status : 3;
+ uint32_t Post_Delay : 2;
+ uint32_t Post_Size : 2;
+ uint32_t Post_Msg : 2;
+ uint32_t Post_MsgQueue : 2;
+ uint32_t Post_Tasks : 2;
+} RtemsMessageReqReceive_Entry;
+
+#define MAXIMUM_PENDING_MESSAGES 3
+#define MAXIMUM_MESSAGE_SIZE 5
+
+/**
+ * @brief Test context for spec:/rtems/message/req/receive test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the thread queue test context.
+ */
+ TQContext tq_ctx;
+
+ /**
+ * @brief This member specifies the attribute set of the message queue.
+ */
+ rtems_attribute attribute_set;
+
+ /**
+ * @brief This member is used as storage area for the message queue.
+ */
+ RTEMS_MESSAGE_QUEUE_BUFFER( MAXIMUM_MESSAGE_SIZE )
+ storage_area[ MAXIMUM_PENDING_MESSAGES];
+
+ /**
+ * @brief This member contains always the same arbitrary number ``magic``.
+ *
+ * It is used for run-time type checking.
+ */
+ uint32_t magic;
+
+ /**
+ * @brief This member contains a number which is sent as next message.
+ */
+ uint8_t send_msg_counter;
+
+ /**
+ * @brief This member contains a buffer to receive messages from the queue.
+ */
+ uint8_t receive_buffer[ MAXIMUM_MESSAGE_SIZE ];
+
+ /**
+ * @brief This member contains a buffer to receive the messages size.
+ */
+ size_t receive_size;
+
+ /**
+ * @brief This member specifies the ``id`` parameter for the action.
+ */
+ rtems_id id_param;
+
+ /**
+ * @brief This member specifies the ``buffer`` parameter for the action.
+ */
+ void *buffer_param;
+
+ /**
+ * @brief This member specifies the ``size`` parameter for the action.
+ */
+ size_t *size_param;
+
+ /**
+ * @brief This member specifies the ``option_set`` parameter for the action.
+ */
+ rtems_option option_set_param;
+
+ /**
+ * @brief This member specifies the ``timeout`` parameter for the action.
+ */
+ rtems_interval timeout_param;
+
+ /**
+ * @brief This member contains the returned status code of the action.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member contains the duration of the action in ticks.
+ */
+ uint32_t action_duration;
+
+ /**
+ * @brief This member contains the task identifier of the main task.
+ */
+ rtems_id task_id;
+
+ /**
+ * @brief This member contains the task identifier of the worker task.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member contains a pointer to a function which is executed
+ * while the worker is waiting to receive a message (`delete(), nop()``).
+ */
+ void (*concurrent_activity)( void *ctx_in );
+
+ /**
+ * @brief This member contains a pointer to a function which is executed to
+ * check that the action has not changed the content of the message queue.
+ */
+ void (*check_msgq_unchanged)( void *ctx_in );
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 8 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsMessageReqReceive_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsMessageReqReceive_Context;
+
+static RtemsMessageReqReceive_Context
+ RtemsMessageReqReceive_Instance;
+
+static const char * const RtemsMessageReqReceive_PreDesc_Buffer[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsMessageReqReceive_PreDesc_Size[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsMessageReqReceive_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsMessageReqReceive_PreDesc_DuringWait[] = {
+ "Nop",
+ "Deleted",
+ "NA"
+};
+
+static const char * const RtemsMessageReqReceive_PreDesc_TaskQueue[] = {
+ "Fifo",
+ "Priority",
+ "NA"
+};
+
+static const char * const RtemsMessageReqReceive_PreDesc_Wait[] = {
+ "No",
+ "Timeout",
+ "Forever",
+ "NA"
+};
+
+static const char * const RtemsMessageReqReceive_PreDesc_MsgQueue[] = {
+ "Empty",
+ "One",
+ "Several",
+ "NA"
+};
+
+static const char * const RtemsMessageReqReceive_PreDesc_Storage[] = {
+ "Nop",
+ "NA"
+};
+
+static const char * const * const RtemsMessageReqReceive_PreDesc[] = {
+ RtemsMessageReqReceive_PreDesc_Buffer,
+ RtemsMessageReqReceive_PreDesc_Size,
+ RtemsMessageReqReceive_PreDesc_Id,
+ RtemsMessageReqReceive_PreDesc_DuringWait,
+ RtemsMessageReqReceive_PreDesc_TaskQueue,
+ RtemsMessageReqReceive_PreDesc_Wait,
+ RtemsMessageReqReceive_PreDesc_MsgQueue,
+ RtemsMessageReqReceive_PreDesc_Storage,
+ NULL
+};
+
+typedef RtemsMessageReqReceive_Context Context;
+static const uint32_t magic = 0xA55CA3D1; /* an arbitrary number */
+static const rtems_interval timeout_ticks = 3;
+static const rtems_event_set wake_main_task_event = RTEMS_EVENT_17;
+
+static void DoAction( void *ctx_in )
+{
+ Context *ctx = ctx_in;
+ ctx->status = rtems_message_queue_receive(
+ ctx->id_param,
+ ctx->buffer_param,
+ ctx->size_param,
+ ctx->option_set_param,
+ ctx->timeout_param
+ );
+}
+
+static void WorkerTask( rtems_task_argument argument )
+{
+ Context *ctx = (Context *) argument;
+ if ( ctx != NULL ) {
+ T_assert_eq_u32( ctx->magic, magic ); /* Run-time type check */
+ DoAction( ctx );
+ T_rsc_success( rtems_event_send( ctx->task_id, wake_main_task_event ) );
+ }
+ T_rsc_success( rtems_task_suspend( RTEMS_SELF ) );
+}
+
+static void WorkerDoAction( void *ctx_in )
+{
+ rtems_status_code status;
+ Context *ctx = ctx_in;
+ T_assert_eq_u32( ctx->magic, magic ); /* Run-time type check */
+ status = rtems_task_restart( ctx->worker_id, (rtems_task_argument) ctx );
+ T_rsc_success( status );
+}
+
+static uint32_t WaitForWorker( Context *ctx )
+{
+ uint32_t ticks_to_wait = timeout_ticks + 1;
+ rtems_status_code status;
+ rtems_event_set event_set;
+
+ for ( ; ticks_to_wait > 0; --ticks_to_wait ) {
+ /* Check whether the worker finished executing the action */
+ status = rtems_event_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ RTEMS_NO_TIMEOUT,
+ &event_set
+ );
+ T_rsc_success( status );
+
+ if ( ( event_set & wake_main_task_event ) == wake_main_task_event ) {
+ break;
+ }
+ TimecounterTick();
+ }
+
+ if ( ctx->timeout_param != RTEMS_NO_TIMEOUT ) {
+ /* Wait till the worker task finishes */
+ status = rtems_event_receive(
+ wake_main_task_event,
+ RTEMS_DEFAULT_OPTIONS,
+ RTEMS_NO_TIMEOUT,
+ &event_set
+ );
+ T_rsc_success( status );
+ }
+
+ return timeout_ticks + 1 - ticks_to_wait;
+}
+
+static void MessageQueueSetup( Context *ctx )
+{
+ rtems_status_code status;
+ /* Sanity check: Make sure the message queue does not exist, yet. */
+ T_assert_eq_u32( ctx->tq_ctx.thread_queue_id, RTEMS_ID_NONE );
+ rtems_message_queue_config config = {
+ .name = rtems_build_name( 'M', 'S', 'G', 'Q' ),
+ .maximum_pending_messages = MAXIMUM_PENDING_MESSAGES,
+ .maximum_message_size = MAXIMUM_MESSAGE_SIZE,
+ .storage_area = ctx->storage_area,
+ .storage_size = sizeof( ctx->storage_area ),
+ .storage_free = NULL,
+ .attributes = ctx->attribute_set
+ };
+
+ status = rtems_message_queue_construct(
+ &config,
+ &ctx->tq_ctx.thread_queue_id
+ );
+ T_rsc_success( status );
+
+ if ( ctx->id_param != RTEMS_ID_NONE ) {
+ ctx->id_param = ctx->tq_ctx.thread_queue_id;
+ }
+}
+
+static void MessageQueueTeardown( Context *ctx )
+{
+ rtems_status_code status;
+ if ( ctx->tq_ctx.thread_queue_id != RTEMS_ID_NONE ) {
+ status = rtems_message_queue_delete( ctx->tq_ctx.thread_queue_id );
+ T_rsc_success( status );
+ ctx->tq_ctx.thread_queue_id = RTEMS_ID_NONE;
+ }
+}
+
+static void CheckForNoMessage(
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ (void) message_buffer;
+ (void) message_size;
+ T_rsc( status, RTEMS_UNSATISFIED );
+}
+
+static void CheckForFirstMessage(
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ T_rsc_success( status );
+ T_eq_u32( message_size, 1 );
+ T_eq_u8( message_buffer[0], 0 );
+}
+
+static void CheckForSecondMessage(
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ T_rsc_success( status );
+ T_eq_u32( message_size, 3 );
+ T_eq_u8( message_buffer[0], 1 );
+ T_eq_u8( message_buffer[1], 1 );
+ T_eq_u8( message_buffer[2], 1 );
+}
+
+static void CheckForThirdMessage(
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ T_rsc_success( status );
+ T_eq_u32( message_size, 5 );
+ T_eq_u8( message_buffer[0], 2 );
+ T_eq_u8( message_buffer[1], 2 );
+ T_eq_u8( message_buffer[2], 2 );
+ T_eq_u8( message_buffer[3], 2 );
+ T_eq_u8( message_buffer[4], 2 );
+}
+
+static void PopMessage(
+ Context *ctx,
+ void (*check_fn)(
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+ )
+)
+{
+ rtems_status_code status;
+ uint8_t message_buffer[ MAXIMUM_MESSAGE_SIZE ];
+ size_t message_size;
+
+ status = rtems_message_queue_receive(
+ ctx->tq_ctx.thread_queue_id,
+ &message_buffer,
+ &message_size,
+ RTEMS_LOCAL | RTEMS_NO_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+
+ check_fn( status, message_buffer, message_size );
+}
+
+static void CheckForNoMessageInQueue( void *ctx_in )
+{
+ Context *ctx = ctx_in;
+ T_assert_eq_u32( ctx->magic, magic ); /* Run-time type check */
+ PopMessage( ctx, CheckForNoMessage );
+}
+
+static void CheckForOneMessageInQueue( void *ctx_in )
+{
+ Context *ctx = ctx_in;
+ T_assert_eq_u32( ctx->magic, magic ); /* Run-time type check */
+ PopMessage( ctx, CheckForFirstMessage );
+ PopMessage( ctx, CheckForNoMessage );
+}
+
+static void CheckForSeveralMessagesInQueue( void *ctx_in )
+{
+ Context *ctx = ctx_in;
+ T_assert_eq_u32( ctx->magic, magic ); /* Run-time type check */
+ PopMessage( ctx, CheckForFirstMessage );
+ PopMessage( ctx, CheckForSecondMessage );
+ PopMessage( ctx, CheckForThirdMessage );
+ PopMessage( ctx, CheckForNoMessage );
+}
+
+static void MessageQueueNop( void *ctx_in )
+{
+ (void) ctx_in;
+}
+
+static void MessageQueueDelete( void *ctx_in )
+{
+ Context *ctx = ctx_in;
+ T_assert_eq_u32( ctx->magic, magic ); /* Run-time type check */
+ MessageQueueTeardown( ctx );
+}
+
+static Context *ToContext( TQContext *tqctx )
+{
+ Context *ctx = RTEMS_CONTAINER_OF( tqctx, Context, tq_ctx );
+ T_assert_eq_u32( ctx->magic, magic ); /* Run-time type check */
+ return ctx;
+}
+
+static Status_Control ReceiveMsg( TQContext *tqctx, TQWait wait )
+{
+ Context *ctx = ToContext( tqctx );
+ rtems_status_code status;
+ rtems_option option_set;
+ rtems_interval timeout;
+
+ switch ( wait ) {
+ case TQ_WAIT_FOREVER:
+ option_set = RTEMS_WAIT;
+ timeout = RTEMS_NO_TIMEOUT;
+ break;
+ case TQ_WAIT_TIMED:
+ option_set = RTEMS_WAIT;
+ timeout = UINT32_MAX;
+ break;
+ default:
+ option_set = RTEMS_NO_WAIT;
+ timeout = 0;
+ break;
+ }
+
+ status = rtems_message_queue_receive(
+ ctx->tq_ctx.thread_queue_id,
+ ctx->receive_buffer,
+ &ctx->receive_size,
+ option_set,
+ timeout
+ );
+
+ return STATUS_BUILD( status, 0 );
+}
+
+static void SendMsg( TQContext *tqctx )
+{
+ Context *ctx = ToContext( tqctx );
+ rtems_status_code status;
+ uint8_t msg[ MAXIMUM_MESSAGE_SIZE ];
+
+ memset( msg, ctx->send_msg_counter, MAXIMUM_MESSAGE_SIZE );
+ status = rtems_message_queue_send(
+ ctx->tq_ctx.thread_queue_id,
+ msg,
+ ( ctx->send_msg_counter * 2 ) % MAXIMUM_MESSAGE_SIZE + 1
+ );
+ T_rsc_success( status );
+ ++ctx->send_msg_counter;
+}
+
+static void EnqueuePrepare( TQContext *tqctx )
+{
+ Status_Control status;
+
+ /* Check that the message queue is empty */
+ status = TQEnqueue( tqctx, TQ_NO_WAIT );
+ T_eq_int( status, STATUS_BUILD( RTEMS_UNSATISFIED, 0 ) );
+}
+
+static void EnqueueDone( TQContext *tqctx )
+{
+ uint32_t i;
+
+ for ( i = 0; i < tqctx->how_many; ++i ) {
+ SendMsg( tqctx );
+ }
+}
+
+static void RtemsMessageReqReceive_Pre_Buffer_Prepare(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Pre_Buffer state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqReceive_Pre_Buffer_Valid: {
+ /*
+ * While the ``buffer`` parameter references a memory area able to store
+ * a message up to the maximum size permitted in this message queue.
+ */
+ ctx->buffer_param = ctx->receive_buffer;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_Buffer_Null: {
+ /*
+ * While the ``buffer`` parameter is NULL.
+ */
+ ctx->buffer_param = NULL;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_Buffer_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqReceive_Pre_Size_Prepare(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Pre_Size state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqReceive_Pre_Size_Valid: {
+ /*
+ * While the ``size`` parameter references an object of type ``size_t``.
+ */
+ ctx->size_param = &ctx->receive_size;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_Size_Null: {
+ /*
+ * While the ``size`` parameter is NULL.
+ */
+ ctx->size_param = NULL;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_Size_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqReceive_Pre_Id_Prepare(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqReceive_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is valid.
+ */
+ ctx->id_param = 1;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id_param = RTEMS_ID_NONE;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqReceive_Pre_DuringWait_Prepare(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Pre_DuringWait state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqReceive_Pre_DuringWait_Nop: {
+ /*
+ * While no rtems_message_queue_delete() directive is called successfully
+ * on the message queue during the time one or more tasks are waiting to
+ * receive messages.
+ */
+ ctx->concurrent_activity = MessageQueueNop;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_DuringWait_Deleted: {
+ /*
+ * While rtems_message_queue_delete() is called successfully on the
+ * message queue while one or more tasks are waiting to receive messages.
+ */
+ ctx->concurrent_activity = MessageQueueDelete;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_DuringWait_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqReceive_Pre_TaskQueue_Prepare(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Pre_TaskQueue state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqReceive_Pre_TaskQueue_Fifo: {
+ /*
+ * While the member attributes of type rtems_message_queue_config
+ * contains value RTEMS_FIFO when the message queue is constructed.
+ *
+ * Note: RTEMS_GLOBAL is not part of the space profile because no remote
+ * nodes are supported.
+ */
+ ctx->attribute_set = RTEMS_LOCAL | RTEMS_FIFO;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_TaskQueue_Priority: {
+ /*
+ * While the member attributes of type rtems_message_queue_config
+ * contains value RTEMS_PRIORITY when the message queue is constructed.
+ *
+ * Note: RTEMS_GLOBAL is not part of the space profile because no remote
+ * nodes are supported.
+ */
+ ctx->attribute_set = RTEMS_LOCAL | RTEMS_PRIORITY;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_TaskQueue_NA:
+ break;
+ }
+
+ MessageQueueSetup( ctx );
+}
+
+static void RtemsMessageReqReceive_Pre_Wait_Prepare(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Pre_Wait state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqReceive_Pre_Wait_No: {
+ /*
+ * While the ``option_set`` parameter indicates the RTEMS_NO_WAIT option.
+ */
+ ctx->tq_ctx.wait = TQ_NO_WAIT;
+ ctx->option_set_param = RTEMS_NO_WAIT;
+ ctx->timeout_param = 1; /* 0 would be RTEMS_NO_TIMEOUT */
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_Wait_Timeout: {
+ /*
+ * While the ``option_set`` parameter indicates the RTEMS_WAIT option,
+ * while the ``timeout`` parameter is not equal to RTEMS_NO_TIMEOUT.
+ */
+ ctx->tq_ctx.wait = TQ_WAIT_TIMED;
+ ctx->option_set_param = RTEMS_WAIT;
+ ctx->timeout_param = timeout_ticks;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_Wait_Forever: {
+ /*
+ * While the ``option_set`` parameter indicates the RTEMS_WAIT option,
+ * while the ``timeout`` parameter is equal to RTEMS_NO_TIMEOUT.
+ */
+ ctx->tq_ctx.wait = TQ_WAIT_FOREVER;
+ ctx->option_set_param = RTEMS_WAIT;
+ ctx->timeout_param = RTEMS_NO_TIMEOUT;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_Wait_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqReceive_Pre_MsgQueue_Prepare(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Pre_MsgQueue state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqReceive_Pre_MsgQueue_Empty: {
+ /*
+ * While there is no message in the message queue.
+ */
+ /* Message queue is already empty. */
+ ctx->check_msgq_unchanged = CheckForNoMessageInQueue;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_MsgQueue_One: {
+ /*
+ * While there is exactly one message in the message queue.
+ */
+ SendMsg( &( ctx->tq_ctx ) );
+ ctx->check_msgq_unchanged = CheckForOneMessageInQueue;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_MsgQueue_Several: {
+ /*
+ * While there are more than one message in the message queue.
+ */
+ SendMsg( &( ctx->tq_ctx ) );
+ SendMsg( &( ctx->tq_ctx ) );
+ SendMsg( &( ctx->tq_ctx ) );
+ ctx->check_msgq_unchanged = CheckForSeveralMessagesInQueue;
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_MsgQueue_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqReceive_Pre_Storage_Prepare(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Pre_Storage state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqReceive_Pre_Storage_Nop: {
+ /*
+ * While the memory area to which a pointer is provided as member
+ * storage_area of type rtems_message_queue_config when the message queue
+ * is constructed by rtems_message_queue_construct() is altered only by
+ * the RTEMS operating system.
+ */
+ /* Only a requirement text. */
+ break;
+ }
+
+ case RtemsMessageReqReceive_Pre_Storage_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqReceive_Post_Status_Check(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqReceive_Post_Status_Ok: {
+ /*
+ * The return status of rtems_message_queue_receive() shall be
+ * RTEMS_SUCCESSFUL
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Status_InvId: {
+ /*
+ * The return status of rtems_message_queue_receive() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_message_queue_receive() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Status_Unsat: {
+ /*
+ * The return status of rtems_message_queue_receive() shall be
+ * RTEMS_UNSATISFIED.
+ */
+ T_rsc( ctx->status, RTEMS_UNSATISFIED );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Status_Timeout: {
+ /*
+ * The return status of rtems_message_queue_receive() shall be
+ * RTEMS_TIMEOUT.
+ */
+ T_rsc( ctx->status, RTEMS_TIMEOUT );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Status_Deleted: {
+ /*
+ * The return status of rtems_message_queue_receive() shall be
+ * RTEMS_OBJECT_WAS_DELETED.
+ */
+ T_rsc( ctx->status, RTEMS_OBJECT_WAS_DELETED );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqReceive_Post_Delay_Check(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Post_Delay state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqReceive_Post_Delay_None: {
+ /*
+ * The rtems_message_queue_receive() call shall return immediately.
+ */
+ T_eq_u32( ctx->action_duration, 0 );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Delay_Ticks: {
+ /*
+ * The rtems_message_queue_receive() call shall return after the timeout
+ * period in ticks.
+ */
+ T_eq_u32( ctx->action_duration, timeout_ticks );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Delay_Forever: {
+ /*
+ * The rtems_message_queue_receive() call shall not return.
+ */
+ T_gt_u32( ctx->action_duration, timeout_ticks );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Delay_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqReceive_Post_Size_Check(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Post_Size state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqReceive_Post_Size_First: {
+ /*
+ * The value of the object referenced by the ``size`` parameter shall be
+ * set to the size of the first message (the same value as provided by
+ * parameter ``size`` of the rtems_message_queue_send() or
+ * rtems_message_queue_urgent() directive which added the message to the
+ * queue) after the return of the rtems_message_queue_receive() call.
+ */
+ CheckForFirstMessage(
+ ctx->status,
+ ctx->receive_buffer,
+ ctx->receive_size
+ );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Size_Nop: {
+ /*
+ * Objects referenced by the ``size`` parameter in past calls to
+ * rtems_message_queue_receive() shall not be accessed by the
+ * rtems_message_queue_receive() call (see also Nop).
+ */
+ T_eq_sz( ctx->receive_size, SIZE_MAX );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Size_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqReceive_Post_Msg_Check(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Post_Msg state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqReceive_Post_Msg_First: {
+ /*
+ * The bytes 0 till ``size`` - 1 of the object referenced by the
+ * ``option_set`` parameter shall contain a copy of the content of the
+ * first message (all bytes unchanged and in the same order as provided
+ * by parameter ``buffer`` of the rtems_message_queue_send() or
+ * rtems_message_queue_urgent() directive which added the message to the
+ * queue) after the return of the rtems_message_queue_receive() call.
+ */
+ CheckForFirstMessage(
+ ctx->status,
+ ctx->receive_buffer,
+ ctx->receive_size
+ );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Msg_Nop: {
+ /*
+ * Objects referenced by the ``option_set`` parameter in past calls to
+ * rtems_message_queue_receive() shall not be accessed by the
+ * rtems_message_queue_receive() call (see also Nop).
+ */
+ int i;
+ for ( i = 0; i < MAXIMUM_MESSAGE_SIZE; ++i ) {
+ T_eq_u8( ctx->receive_buffer[i], UINT8_MAX );
+ }
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Msg_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqReceive_Post_MsgQueue_Check(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Post_MsgQueue state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqReceive_Post_MsgQueue_Empty: {
+ /*
+ * The message queue shall be empty after the return of the
+ * rtems_message_queue_receive() call.
+ */
+ PopMessage( ctx, CheckForNoMessage );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_MsgQueue_OneLess: {
+ /*
+ * The first message shall be removed from the message queue after the
+ * return of the rtems_message_queue_receive() call.
+ */
+ PopMessage( ctx, CheckForSecondMessage );
+ PopMessage( ctx, CheckForThirdMessage );
+ PopMessage( ctx, CheckForNoMessage );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_MsgQueue_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_message_queue_receive() shall not be accessed by the
+ * rtems_message_queue_receive() call (see also Nop).
+ */
+ ctx->check_msgq_unchanged( ctx );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_MsgQueue_NA:
+ break;
+ }
+
+ MessageQueueTeardown( ctx );
+}
+
+static void RtemsMessageReqReceive_Post_Tasks_Check(
+ RtemsMessageReqReceive_Context *ctx,
+ RtemsMessageReqReceive_Post_Tasks state
+)
+{
+ MessageQueueSetup( ctx );
+
+ switch ( state ) {
+ case RtemsMessageReqReceive_Post_Tasks_Fifo: {
+ /*
+ * Where the thread queue uses the FIFO discipline, the calling thread
+ * shall be enqueued in FIFO order.
+ */
+ ScoreTqReqEnqueueFifo_Run( &ctx->tq_ctx );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Tasks_Priority: {
+ /*
+ * Where the thread queue uses the priority discipline, the calling
+ * thread shall be enqueued in priority order.
+ */
+ ScoreTqReqEnqueuePriority_Run( &ctx->tq_ctx );
+ break;
+ }
+
+ case RtemsMessageReqReceive_Post_Tasks_NA:
+ break;
+ }
+
+ MessageQueueTeardown( ctx );
+}
+
+static void RtemsMessageReqReceive_Setup( RtemsMessageReqReceive_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->magic = magic;
+ ctx->tq_ctx.enqueue = ReceiveMsg;
+ ctx->tq_ctx.surrender = TQDoNothingSuccessfully;
+ ctx->tq_ctx.convert_status = TQConvertStatusClassic;
+ ctx->tq_ctx.enqueue_prepare = EnqueuePrepare;
+ ctx->tq_ctx.enqueue_done = EnqueueDone;
+ TQInitialize( &ctx->tq_ctx );
+
+ /*
+ * ctx->tq_ctx.thread_queue_id = RTEMS_ID_NONE indicates that the message
+ * queue does currently not exist. A message queue is created
+ * two times in a row in a single test cycle. First after the attributes
+ * are set in the preconditions. That queue is used for all tests of
+ * usual message queue requirements. Second a message queue is recreated
+ * in the tasks post-conditions for the tests of the task queue.
+ * To avoid an accidentally creation of a second
+ * message queue without the first being deleted prior,
+ * ctx->tq_ctx.thread_queue_id is checked for being RTEMS_ID_NONE before
+ * any message queue is created - a run-time sanity check.
+ */
+ ctx->tq_ctx.thread_queue_id = RTEMS_ID_NONE;
+ ctx->task_id = rtems_task_self();
+
+ /* Note: TQInitialize() will assign the "main" task priority PRIO_NORMAL */
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, WorkerTask, NULL );
+}
+
+static void RtemsMessageReqReceive_Setup_Wrap( void *arg )
+{
+ RtemsMessageReqReceive_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsMessageReqReceive_Setup( ctx );
+}
+
+static void RtemsMessageReqReceive_Teardown(
+ RtemsMessageReqReceive_Context *ctx
+)
+{
+ DeleteTask( ctx->worker_id );
+ TQDestroy( &ctx->tq_ctx );
+ (void) PollAnyEvents();
+}
+
+static void RtemsMessageReqReceive_Teardown_Wrap( void *arg )
+{
+ RtemsMessageReqReceive_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsMessageReqReceive_Teardown( ctx );
+}
+
+static void RtemsMessageReqReceive_Prepare(
+ RtemsMessageReqReceive_Context *ctx
+)
+{
+ /* Clean away pending events - happens after RTEMS_WAIT + RTEMS_NO_TIMEOUT */
+ (void) PollAnyEvents();
+
+ ctx->send_msg_counter = 0;
+ ctx->receive_size = SIZE_MAX;
+ memset( ctx->receive_buffer, UINT8_MAX, MAXIMUM_MESSAGE_SIZE );
+}
+
+static void RtemsMessageReqReceive_Action(
+ RtemsMessageReqReceive_Context *ctx
+)
+{
+ WorkerDoAction( ctx );
+ ctx->concurrent_activity( ctx );
+ ctx->action_duration = WaitForWorker( ctx );
+}
+
+static const RtemsMessageReqReceive_Entry
+RtemsMessageReqReceive_Entries[] = {
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqReceive_Post_Status_InvAddr,
+ RtemsMessageReqReceive_Post_Delay_None,
+ RtemsMessageReqReceive_Post_Size_Nop, RtemsMessageReqReceive_Post_Msg_Nop,
+ RtemsMessageReqReceive_Post_MsgQueue_Nop,
+ RtemsMessageReqReceive_Post_Tasks_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqReceive_Post_Status_InvAddr,
+ RtemsMessageReqReceive_Post_Delay_None,
+ RtemsMessageReqReceive_Post_Size_Nop, RtemsMessageReqReceive_Post_Msg_Nop,
+ RtemsMessageReqReceive_Post_MsgQueue_NA,
+ RtemsMessageReqReceive_Post_Tasks_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqReceive_Post_Status_InvId,
+ RtemsMessageReqReceive_Post_Delay_None,
+ RtemsMessageReqReceive_Post_Size_Nop, RtemsMessageReqReceive_Post_Msg_Nop,
+ RtemsMessageReqReceive_Post_MsgQueue_Nop,
+ RtemsMessageReqReceive_Post_Tasks_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqReceive_Post_Status_InvId,
+ RtemsMessageReqReceive_Post_Delay_None,
+ RtemsMessageReqReceive_Post_Size_Nop, RtemsMessageReqReceive_Post_Msg_Nop,
+ RtemsMessageReqReceive_Post_MsgQueue_NA,
+ RtemsMessageReqReceive_Post_Tasks_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqReceive_Post_Status_NA,
+ RtemsMessageReqReceive_Post_Delay_NA, RtemsMessageReqReceive_Post_Size_NA,
+ RtemsMessageReqReceive_Post_Msg_NA,
+ RtemsMessageReqReceive_Post_MsgQueue_NA,
+ RtemsMessageReqReceive_Post_Tasks_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqReceive_Post_Status_Ok,
+ RtemsMessageReqReceive_Post_Delay_None,
+ RtemsMessageReqReceive_Post_Size_First,
+ RtemsMessageReqReceive_Post_Msg_First,
+ RtemsMessageReqReceive_Post_MsgQueue_Empty,
+ RtemsMessageReqReceive_Post_Tasks_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqReceive_Post_Status_Ok,
+ RtemsMessageReqReceive_Post_Delay_None,
+ RtemsMessageReqReceive_Post_Size_First,
+ RtemsMessageReqReceive_Post_Msg_First,
+ RtemsMessageReqReceive_Post_MsgQueue_OneLess,
+ RtemsMessageReqReceive_Post_Tasks_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqReceive_Post_Status_Deleted,
+ RtemsMessageReqReceive_Post_Delay_None,
+ RtemsMessageReqReceive_Post_Size_Nop, RtemsMessageReqReceive_Post_Msg_Nop,
+ RtemsMessageReqReceive_Post_MsgQueue_NA,
+ RtemsMessageReqReceive_Post_Tasks_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqReceive_Post_Status_Unsat,
+ RtemsMessageReqReceive_Post_Delay_None,
+ RtemsMessageReqReceive_Post_Size_Nop, RtemsMessageReqReceive_Post_Msg_Nop,
+ RtemsMessageReqReceive_Post_MsgQueue_Nop,
+ RtemsMessageReqReceive_Post_Tasks_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqReceive_Post_Status_Timeout,
+ RtemsMessageReqReceive_Post_Delay_Ticks,
+ RtemsMessageReqReceive_Post_Size_Nop, RtemsMessageReqReceive_Post_Msg_Nop,
+ RtemsMessageReqReceive_Post_MsgQueue_Nop,
+ RtemsMessageReqReceive_Post_Tasks_Fifo },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqReceive_Post_Status_NA,
+ RtemsMessageReqReceive_Post_Delay_Forever,
+ RtemsMessageReqReceive_Post_Size_Nop, RtemsMessageReqReceive_Post_Msg_Nop,
+ RtemsMessageReqReceive_Post_MsgQueue_Nop,
+ RtemsMessageReqReceive_Post_Tasks_Fifo },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqReceive_Post_Status_Timeout,
+ RtemsMessageReqReceive_Post_Delay_Ticks,
+ RtemsMessageReqReceive_Post_Size_Nop, RtemsMessageReqReceive_Post_Msg_Nop,
+ RtemsMessageReqReceive_Post_MsgQueue_Nop,
+ RtemsMessageReqReceive_Post_Tasks_Priority },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqReceive_Post_Status_NA,
+ RtemsMessageReqReceive_Post_Delay_Forever,
+ RtemsMessageReqReceive_Post_Size_Nop, RtemsMessageReqReceive_Post_Msg_Nop,
+ RtemsMessageReqReceive_Post_MsgQueue_Nop,
+ RtemsMessageReqReceive_Post_Tasks_Priority }
+};
+
+static const uint8_t
+RtemsMessageReqReceive_Map[] = {
+ 8, 5, 6, 9, 5, 6, 10, 5, 6, 8, 5, 6, 11, 5, 6, 12, 5, 6, 4, 4, 4, 7, 4, 4, 7,
+ 4, 4, 4, 4, 4, 7, 4, 4, 7, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1
+};
+
+static size_t RtemsMessageReqReceive_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsMessageReqReceive_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsMessageReqReceive_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsMessageReqReceive_Fixture = {
+ .setup = RtemsMessageReqReceive_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsMessageReqReceive_Teardown_Wrap,
+ .scope = RtemsMessageReqReceive_Scope,
+ .initial_context = &RtemsMessageReqReceive_Instance
+};
+
+static inline RtemsMessageReqReceive_Entry RtemsMessageReqReceive_PopEntry(
+ RtemsMessageReqReceive_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsMessageReqReceive_Entries[
+ RtemsMessageReqReceive_Map[ index ]
+ ];
+}
+
+static void RtemsMessageReqReceive_TestVariant(
+ RtemsMessageReqReceive_Context *ctx
+)
+{
+ RtemsMessageReqReceive_Pre_Buffer_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsMessageReqReceive_Pre_Size_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsMessageReqReceive_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsMessageReqReceive_Pre_DuringWait_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsMessageReqReceive_Pre_TaskQueue_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsMessageReqReceive_Pre_Wait_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsMessageReqReceive_Pre_MsgQueue_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsMessageReqReceive_Pre_Storage_Prepare( ctx, ctx->Map.pcs[ 7 ] );
+ RtemsMessageReqReceive_Action( ctx );
+ RtemsMessageReqReceive_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsMessageReqReceive_Post_Delay_Check( ctx, ctx->Map.entry.Post_Delay );
+ RtemsMessageReqReceive_Post_Size_Check( ctx, ctx->Map.entry.Post_Size );
+ RtemsMessageReqReceive_Post_Msg_Check( ctx, ctx->Map.entry.Post_Msg );
+ RtemsMessageReqReceive_Post_MsgQueue_Check(
+ ctx,
+ ctx->Map.entry.Post_MsgQueue
+ );
+ RtemsMessageReqReceive_Post_Tasks_Check( ctx, ctx->Map.entry.Post_Tasks );
+}
+
+/**
+ * @fn void T_case_body_RtemsMessageReqReceive( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsMessageReqReceive, &RtemsMessageReqReceive_Fixture )
+{
+ RtemsMessageReqReceive_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsMessageReqReceive_Pre_Buffer_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsMessageReqReceive_Pre_Buffer_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsMessageReqReceive_Pre_Size_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsMessageReqReceive_Pre_Size_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsMessageReqReceive_Pre_Id_Valid;
+ ctx->Map.pcs[ 2 ] < RtemsMessageReqReceive_Pre_Id_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsMessageReqReceive_Pre_DuringWait_Nop;
+ ctx->Map.pcs[ 3 ] < RtemsMessageReqReceive_Pre_DuringWait_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsMessageReqReceive_Pre_TaskQueue_Fifo;
+ ctx->Map.pcs[ 4 ] < RtemsMessageReqReceive_Pre_TaskQueue_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = RtemsMessageReqReceive_Pre_Wait_No;
+ ctx->Map.pcs[ 5 ] < RtemsMessageReqReceive_Pre_Wait_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 6 ] = RtemsMessageReqReceive_Pre_MsgQueue_Empty;
+ ctx->Map.pcs[ 6 ] < RtemsMessageReqReceive_Pre_MsgQueue_NA;
+ ++ctx->Map.pcs[ 6 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 7 ] = RtemsMessageReqReceive_Pre_Storage_Nop;
+ ctx->Map.pcs[ 7 ] < RtemsMessageReqReceive_Pre_Storage_NA;
+ ++ctx->Map.pcs[ 7 ]
+ ) {
+ ctx->Map.entry = RtemsMessageReqReceive_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsMessageReqReceive_Prepare( ctx );
+ RtemsMessageReqReceive_TestVariant( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-message-urgent-send.c b/testsuites/validation/tc-message-urgent-send.c
new file mode 100644
index 0000000000..e7364f108d
--- /dev/null
+++ b/testsuites/validation/tc-message-urgent-send.c
@@ -0,0 +1,1166 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsMessageReqUrgentSend
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsMessageReqUrgentSend spec:/rtems/message/req/urgent-send
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsMessageReqUrgentSend_Pre_Buffer_Valid,
+ RtemsMessageReqUrgentSend_Pre_Buffer_Null,
+ RtemsMessageReqUrgentSend_Pre_Buffer_NA
+} RtemsMessageReqUrgentSend_Pre_Buffer;
+
+typedef enum {
+ RtemsMessageReqUrgentSend_Pre_Id_Valid,
+ RtemsMessageReqUrgentSend_Pre_Id_Invalid,
+ RtemsMessageReqUrgentSend_Pre_Id_NA
+} RtemsMessageReqUrgentSend_Pre_Id;
+
+typedef enum {
+ RtemsMessageReqUrgentSend_Pre_Size_Zero,
+ RtemsMessageReqUrgentSend_Pre_Size_SomeSize,
+ RtemsMessageReqUrgentSend_Pre_Size_MaxSize,
+ RtemsMessageReqUrgentSend_Pre_Size_TooLarge,
+ RtemsMessageReqUrgentSend_Pre_Size_NA
+} RtemsMessageReqUrgentSend_Pre_Size;
+
+typedef enum {
+ RtemsMessageReqUrgentSend_Pre_MsgQueue_Empty,
+ RtemsMessageReqUrgentSend_Pre_MsgQueue_One,
+ RtemsMessageReqUrgentSend_Pre_MsgQueue_Several,
+ RtemsMessageReqUrgentSend_Pre_MsgQueue_Full,
+ RtemsMessageReqUrgentSend_Pre_MsgQueue_NA
+} RtemsMessageReqUrgentSend_Pre_MsgQueue;
+
+typedef enum {
+ RtemsMessageReqUrgentSend_Pre_Receiver_Waiting,
+ RtemsMessageReqUrgentSend_Pre_Receiver_No,
+ RtemsMessageReqUrgentSend_Pre_Receiver_NA
+} RtemsMessageReqUrgentSend_Pre_Receiver;
+
+typedef enum {
+ RtemsMessageReqUrgentSend_Pre_Directive_Send,
+ RtemsMessageReqUrgentSend_Pre_Directive_Urgent,
+ RtemsMessageReqUrgentSend_Pre_Directive_NA
+} RtemsMessageReqUrgentSend_Pre_Directive;
+
+typedef enum {
+ RtemsMessageReqUrgentSend_Pre_Storage_Nop,
+ RtemsMessageReqUrgentSend_Pre_Storage_NA
+} RtemsMessageReqUrgentSend_Pre_Storage;
+
+typedef enum {
+ RtemsMessageReqUrgentSend_Post_Status_Ok,
+ RtemsMessageReqUrgentSend_Post_Status_InvId,
+ RtemsMessageReqUrgentSend_Post_Status_InvAddr,
+ RtemsMessageReqUrgentSend_Post_Status_InvSize,
+ RtemsMessageReqUrgentSend_Post_Status_TooMany,
+ RtemsMessageReqUrgentSend_Post_Status_NA
+} RtemsMessageReqUrgentSend_Post_Status;
+
+typedef enum {
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Empty,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_One,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Prepend,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Append,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Nop,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_NA
+} RtemsMessageReqUrgentSend_Post_MsgQueue;
+
+typedef enum {
+ RtemsMessageReqUrgentSend_Post_Receiver_GotMsg,
+ RtemsMessageReqUrgentSend_Post_Receiver_Waiting,
+ RtemsMessageReqUrgentSend_Post_Receiver_NA
+} RtemsMessageReqUrgentSend_Post_Receiver;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Buffer_NA : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_Size_NA : 1;
+ uint16_t Pre_MsgQueue_NA : 1;
+ uint16_t Pre_Receiver_NA : 1;
+ uint16_t Pre_Directive_NA : 1;
+ uint16_t Pre_Storage_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_MsgQueue : 3;
+ uint16_t Post_Receiver : 2;
+} RtemsMessageReqUrgentSend_Entry;
+
+#define MAXIMUM_PENDING_MESSAGES 3
+#define MAXIMUM_MESSAGE_SIZE 5
+
+/**
+ * @brief Test context for spec:/rtems/message/req/urgent-send test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a valid ID of a message queue.
+ */
+ rtems_id message_queue_id;
+
+ /**
+ * @brief This member is used as storage area for the message queue.
+ */
+ RTEMS_MESSAGE_QUEUE_BUFFER( MAXIMUM_MESSAGE_SIZE )
+ storage_area[ MAXIMUM_PENDING_MESSAGES];
+
+ /**
+ * @brief This member contains always the same arbitrary number ``magic``.
+ *
+ * It is used for run-time type checking.
+ */
+ uint32_t magic;
+
+ /**
+ * @brief This member contains a number which is sent as next message.
+ */
+ uint8_t send_msg_counter;
+
+ /**
+ * @brief This member contains a buffer to receive messages from the queue.
+ */
+ uint8_t receive_buffer[ MAXIMUM_MESSAGE_SIZE ];
+
+ /**
+ * @brief This member contains a buffer to receive the messages size.
+ */
+ size_t receive_size;
+
+ /**
+ * @brief This member contains the returned status code of the receiver.
+ */
+ rtems_status_code receive_status;
+
+ /**
+ * @brief This member indicates whether the a receiver task should be started
+ * to receive a message.
+ */
+ bool is_receiver_waiting;
+
+ /**
+ * @brief This member contains the message to be sent by the action.
+ */
+ uint8_t send_message[ MAXIMUM_MESSAGE_SIZE ];
+
+ /**
+ * @brief This member specifies the directive to be called as action.
+ *
+ * This is either rtems_message_queue_send() or rtems_message_queue_urgent().
+ */
+ rtems_status_code (*action)( rtems_id id, const void *buffer, size_t size );
+
+ /**
+ * @brief This member specifies the ``id`` parameter for the action.
+ */
+ rtems_id id_param;
+
+ /**
+ * @brief This member specifies the ``buffer`` parameter for the action.
+ */
+ void *buffer_param;
+
+ /**
+ * @brief This member specifies the ``size`` parameter for the action.
+ */
+ size_t size_param;
+
+ /**
+ * @brief This member contains the returned status code of the action.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member contains the task identifier of the worker task.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member contains a pointer to a function which is executed to
+ * check that the action has not changed the content of the message queue.
+ */
+ void (*check_msgq_unchanged)( void *ctx_in );
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 7 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsMessageReqUrgentSend_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsMessageReqUrgentSend_Context;
+
+static RtemsMessageReqUrgentSend_Context
+ RtemsMessageReqUrgentSend_Instance;
+
+static const char * const RtemsMessageReqUrgentSend_PreDesc_Buffer[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsMessageReqUrgentSend_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsMessageReqUrgentSend_PreDesc_Size[] = {
+ "Zero",
+ "SomeSize",
+ "MaxSize",
+ "TooLarge",
+ "NA"
+};
+
+static const char * const RtemsMessageReqUrgentSend_PreDesc_MsgQueue[] = {
+ "Empty",
+ "One",
+ "Several",
+ "Full",
+ "NA"
+};
+
+static const char * const RtemsMessageReqUrgentSend_PreDesc_Receiver[] = {
+ "Waiting",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsMessageReqUrgentSend_PreDesc_Directive[] = {
+ "Send",
+ "Urgent",
+ "NA"
+};
+
+static const char * const RtemsMessageReqUrgentSend_PreDesc_Storage[] = {
+ "Nop",
+ "NA"
+};
+
+static const char * const * const RtemsMessageReqUrgentSend_PreDesc[] = {
+ RtemsMessageReqUrgentSend_PreDesc_Buffer,
+ RtemsMessageReqUrgentSend_PreDesc_Id,
+ RtemsMessageReqUrgentSend_PreDesc_Size,
+ RtemsMessageReqUrgentSend_PreDesc_MsgQueue,
+ RtemsMessageReqUrgentSend_PreDesc_Receiver,
+ RtemsMessageReqUrgentSend_PreDesc_Directive,
+ RtemsMessageReqUrgentSend_PreDesc_Storage,
+ NULL
+};
+
+typedef RtemsMessageReqUrgentSend_Context Context;
+static const uint32_t MAGIC = 0xA66FE31; /* an arbitrary number */
+static const rtems_interval TIMEOUT_TICKS = 1;
+static const rtems_event_set EVENT_RECEIVE = RTEMS_EVENT_17;
+
+static void Receive( Context *ctx )
+{
+ ctx->receive_status = rtems_message_queue_receive(
+ ctx->message_queue_id,
+ ctx->receive_buffer,
+ &ctx->receive_size,
+ RTEMS_WAIT,
+ TIMEOUT_TICKS
+ );
+}
+
+static void WorkerTask( rtems_task_argument argument )
+{
+ Context *ctx = (Context *) argument;
+
+ while ( true ) {
+ rtems_event_set events;
+
+ events = ReceiveAnyEvents();
+
+ if ( ( events & EVENT_RECEIVE ) != 0 ) {
+ Receive( ctx );
+ }
+ }
+}
+
+static void CheckForNoMessage(
+ Context *ctx,
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ (void) ctx;
+ T_rsc( status, RTEMS_UNSATISFIED );
+}
+
+static void CheckForFirstMessage(
+ Context *ctx,
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ (void) ctx;
+ T_rsc_success( status );
+ T_eq_u32( message_size, 1 );
+ T_eq_u8( message_buffer[0], 0 );
+}
+
+static void CheckForSecondMessage(
+ Context *ctx,
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ (void) ctx;
+ T_rsc_success( status );
+ T_eq_u32( message_size, 3 );
+ T_eq_u8( message_buffer[0], 1 );
+ T_eq_u8( message_buffer[1], 1 );
+ T_eq_u8( message_buffer[2], 1 );
+}
+
+static void CheckForThirdMessage(
+ Context *ctx,
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ (void) ctx;
+ T_rsc_success( status );
+ T_eq_u32( message_size, 5 );
+ T_eq_u8( message_buffer[0], 2 );
+ T_eq_u8( message_buffer[1], 2 );
+ T_eq_u8( message_buffer[2], 2 );
+ T_eq_u8( message_buffer[3], 2 );
+ T_eq_u8( message_buffer[4], 2 );
+}
+
+static void CheckForSendMessage(
+ Context *ctx,
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+)
+{
+ size_t i;
+ T_rsc_success( status );
+ T_eq_u32( message_size, ctx->size_param );
+ for ( i = 0; i < ctx->size_param; ++i ) {
+ T_eq_u8( message_buffer[i], ctx->send_message[i] );
+ }
+}
+
+static void PopMessage(
+ Context *ctx,
+ void (*check_fn)(
+ Context *ctx,
+ rtems_status_code status,
+ uint8_t *message_buffer,
+ size_t message_size
+ )
+)
+{
+ rtems_status_code status;
+ uint8_t message_buffer[ MAXIMUM_MESSAGE_SIZE ];
+ size_t message_size;
+
+ status = rtems_message_queue_receive(
+ ctx->message_queue_id,
+ &message_buffer,
+ &message_size,
+ RTEMS_LOCAL | RTEMS_NO_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+
+ check_fn( ctx, status, message_buffer, message_size );
+}
+
+static void CheckForNoMessageInQueue( void *ctx_in )
+{}
+
+static void CheckForOneMessageInQueue( void *ctx_in )
+{
+ Context *ctx = ctx_in;
+ T_assert_eq_u32( ctx->magic, MAGIC ); /* Run-time type check */
+ PopMessage( ctx, CheckForFirstMessage );
+}
+
+static void CheckForSeveralMessagesInQueue( void *ctx_in )
+{
+ Context *ctx = ctx_in;
+ T_assert_eq_u32( ctx->magic, MAGIC ); /* Run-time type check */
+ PopMessage( ctx, CheckForFirstMessage );
+ PopMessage( ctx, CheckForSecondMessage );
+}
+
+static void CheckForAllMessagesInQueue( void *ctx_in )
+{
+ Context *ctx = ctx_in;
+ T_assert_eq_u32( ctx->magic, MAGIC ); /* Run-time type check */
+ PopMessage( ctx, CheckForFirstMessage );
+ PopMessage( ctx, CheckForSecondMessage );
+ PopMessage( ctx, CheckForThirdMessage );
+}
+
+static void SendMsg( Context *ctx )
+{
+ rtems_status_code status;
+ uint8_t msg[ MAXIMUM_MESSAGE_SIZE ];
+
+ memset( msg, ctx->send_msg_counter, MAXIMUM_MESSAGE_SIZE );
+ status = rtems_message_queue_send(
+ ctx->message_queue_id,
+ msg,
+ ( ctx->send_msg_counter * 2 ) % MAXIMUM_MESSAGE_SIZE + 1
+ );
+ T_rsc_success( status );
+ ++ctx->send_msg_counter;
+}
+
+static void RtemsMessageReqUrgentSend_Pre_Buffer_Prepare(
+ RtemsMessageReqUrgentSend_Context *ctx,
+ RtemsMessageReqUrgentSend_Pre_Buffer state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqUrgentSend_Pre_Buffer_Valid: {
+ /*
+ * While the ``buffer`` parameter references a memory area where the
+ * message to be sent is stored.
+ */
+ uint8_t i;
+ for ( i = 0; i < MAXIMUM_MESSAGE_SIZE; ++i ) {
+ ctx->send_message[i] = 42 + i;
+ }
+ ctx->buffer_param = &ctx->send_message;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_Buffer_Null: {
+ /*
+ * While the ``buffer`` parameter is NULL.
+ */
+ ctx->buffer_param = NULL;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_Buffer_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqUrgentSend_Pre_Id_Prepare(
+ RtemsMessageReqUrgentSend_Context *ctx,
+ RtemsMessageReqUrgentSend_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqUrgentSend_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is valid.
+ */
+ ctx->id_param = ctx->message_queue_id;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id_param = RTEMS_ID_NONE;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqUrgentSend_Pre_Size_Prepare(
+ RtemsMessageReqUrgentSend_Context *ctx,
+ RtemsMessageReqUrgentSend_Pre_Size state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqUrgentSend_Pre_Size_Zero: {
+ /*
+ * While the ``size`` parameter is 0.
+ */
+ ctx->size_param = 0;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_Size_SomeSize: {
+ /*
+ * While the ``size`` parameter has a value between 0 and the maximum
+ * message size.
+ */
+ ctx->size_param = MAXIMUM_MESSAGE_SIZE / 2 + 1;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_Size_MaxSize: {
+ /*
+ * While the ``size`` parameter has a value of the maximum message size.
+ */
+ ctx->size_param = MAXIMUM_MESSAGE_SIZE;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_Size_TooLarge: {
+ /*
+ * While the ``size`` parameter has a value greater than the maximum
+ * message size.
+ */
+ ctx->size_param = MAXIMUM_MESSAGE_SIZE + 1;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_Size_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqUrgentSend_Pre_MsgQueue_Prepare(
+ RtemsMessageReqUrgentSend_Context *ctx,
+ RtemsMessageReqUrgentSend_Pre_MsgQueue state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqUrgentSend_Pre_MsgQueue_Empty: {
+ /*
+ * While there is no message in the message queue.
+ */
+ /* Message queue is already empty. */
+ ctx->check_msgq_unchanged = CheckForNoMessageInQueue;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_MsgQueue_One: {
+ /*
+ * While there is exactly one message in the message queue.
+ */
+ SendMsg( ctx );
+ ctx->check_msgq_unchanged = CheckForOneMessageInQueue;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_MsgQueue_Several: {
+ /*
+ * While there are more than one and less than maximum pending messages
+ * in the message queue.
+ */
+ SendMsg( ctx );
+ SendMsg( ctx );
+ ctx->check_msgq_unchanged = CheckForSeveralMessagesInQueue;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_MsgQueue_Full: {
+ /*
+ * While there are maximum pending messages in the message queue.
+ */
+ SendMsg( ctx );
+ SendMsg( ctx );
+ SendMsg( ctx );
+ ctx->check_msgq_unchanged = CheckForAllMessagesInQueue;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_MsgQueue_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqUrgentSend_Pre_Receiver_Prepare(
+ RtemsMessageReqUrgentSend_Context *ctx,
+ RtemsMessageReqUrgentSend_Pre_Receiver state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqUrgentSend_Pre_Receiver_Waiting: {
+ /*
+ * While a receiver is waiting to receive a message.
+ */
+ ctx->is_receiver_waiting = true;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_Receiver_No: {
+ /*
+ * While no receiver is waiting to receive a message.
+ */
+ ctx->is_receiver_waiting = false;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_Receiver_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqUrgentSend_Pre_Directive_Prepare(
+ RtemsMessageReqUrgentSend_Context *ctx,
+ RtemsMessageReqUrgentSend_Pre_Directive state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqUrgentSend_Pre_Directive_Send: {
+ /*
+ * While the directive rtems_message_queue_send() is called.
+ */
+ ctx->action = rtems_message_queue_send;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_Directive_Urgent: {
+ /*
+ * While the directive rtems_message_queue_urgent() is called.
+ */
+ ctx->action = rtems_message_queue_urgent;
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_Directive_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqUrgentSend_Pre_Storage_Prepare(
+ RtemsMessageReqUrgentSend_Context *ctx,
+ RtemsMessageReqUrgentSend_Pre_Storage state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqUrgentSend_Pre_Storage_Nop: {
+ /*
+ * While the memory area to which a pointer is provided as member
+ * storage_area of type rtems_message_queue_config when the message queue
+ * is constructed by rtems_message_queue_construct() is altered only by
+ * the RTEMS operating system.
+ */
+ /* Only a requirement text. */
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Pre_Storage_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqUrgentSend_Post_Status_Check(
+ RtemsMessageReqUrgentSend_Context *ctx,
+ RtemsMessageReqUrgentSend_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqUrgentSend_Post_Status_Ok: {
+ /*
+ * The return status of the called directive (rtems_message_queue_send()
+ * or rtems_message_queue_urgent()) shall be RTEMS_SUCCESSFUL
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Post_Status_InvId: {
+ /*
+ * The return status of the called directive (rtems_message_queue_send()
+ * or rtems_message_queue_urgent()) shall be RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Post_Status_InvAddr: {
+ /*
+ * The return status of the called directive (rtems_message_queue_send()
+ * or rtems_message_queue_urgent()) shall be RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Post_Status_InvSize: {
+ /*
+ * The return status of the called directive (rtems_message_queue_send()
+ * or rtems_message_queue_urgent()) shall be RTEMS_INVALID_SIZE.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_SIZE );
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Post_Status_TooMany: {
+ /*
+ * The return status of the called directive (rtems_message_queue_send()
+ * or rtems_message_queue_urgent()) shall be RTEMS_TOO_MANY.
+ */
+ T_rsc( ctx->status, RTEMS_TOO_MANY );
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqUrgentSend_Post_MsgQueue_Check(
+ RtemsMessageReqUrgentSend_Context *ctx,
+ RtemsMessageReqUrgentSend_Post_MsgQueue state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqUrgentSend_Post_MsgQueue_Empty: {
+ /*
+ * The message queue shall be empty after the return of the
+ * rtems_message_queue_send() or rtems_message_queue_urgent() call.
+ */
+ PopMessage( ctx, CheckForNoMessage );
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Post_MsgQueue_One: {
+ /*
+ * The message queue shall contain only the send message after the return
+ * of the rtems_message_queue_send() or rtems_message_queue_urgent()
+ * call.
+ */
+ PopMessage( ctx, CheckForSendMessage );
+ PopMessage( ctx, CheckForNoMessage );
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Post_MsgQueue_Prepend: {
+ /*
+ * The message queue shall contain the message send by the last call to
+ * rtems_message_queue_urgent() as first message followed by all the
+ * messages which were in the message queue before that call (in the same
+ * order and each message with the same content and size).
+ */
+ PopMessage( ctx, CheckForSendMessage );
+ ctx->check_msgq_unchanged( ctx );
+ PopMessage( ctx, CheckForNoMessage );
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Post_MsgQueue_Append: {
+ /*
+ * The message queue shall contain the message send by the last call to
+ * rtems_message_queue_send() as last message preceded by all the
+ * messages which were in the message queue before that call (in the same
+ * order and each message with the same content and size).
+ */
+ ctx->check_msgq_unchanged( ctx );
+ PopMessage( ctx, CheckForSendMessage );
+ PopMessage( ctx, CheckForNoMessage );
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Post_MsgQueue_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past call to
+ * rtems_message_queue_send() or rtems_message_queue_urgent() shall not
+ * be accessed by that call (see also Nop).
+ */
+ ctx->check_msgq_unchanged( ctx );
+ PopMessage( ctx, CheckForNoMessage );
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Post_MsgQueue_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqUrgentSend_Post_Receiver_Check(
+ RtemsMessageReqUrgentSend_Context *ctx,
+ RtemsMessageReqUrgentSend_Post_Receiver state
+)
+{
+ switch ( state ) {
+ case RtemsMessageReqUrgentSend_Post_Receiver_GotMsg: {
+ /*
+ * The receiver shall receive the message send by the last call to the
+ * rtems_message_queue_send() or rtems_message_queue_urgent() directive.
+ */
+ CheckForSendMessage(
+ ctx,
+ ctx->receive_status,
+ ctx->receive_buffer,
+ ctx->receive_size
+ );
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Post_Receiver_Waiting: {
+ /*
+ * The receiver shall still wait to receive a message after the last call
+ * to the rtems_message_queue_send() or rtems_message_queue_urgent()
+ * directive.
+ */
+ T_rsc( ctx->receive_status, RTEMS_TIMEOUT );
+ break;
+ }
+
+ case RtemsMessageReqUrgentSend_Post_Receiver_NA:
+ break;
+ }
+}
+
+static void RtemsMessageReqUrgentSend_Setup(
+ RtemsMessageReqUrgentSend_Context *ctx
+)
+{
+ ctx->magic = MAGIC;
+
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, WorkerTask, ctx );
+}
+
+static void RtemsMessageReqUrgentSend_Setup_Wrap( void *arg )
+{
+ RtemsMessageReqUrgentSend_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsMessageReqUrgentSend_Setup( ctx );
+}
+
+static void RtemsMessageReqUrgentSend_Teardown(
+ RtemsMessageReqUrgentSend_Context *ctx
+)
+{
+ DeleteTask( ctx->worker_id );
+ RestoreRunnerPriority();
+}
+
+static void RtemsMessageReqUrgentSend_Teardown_Wrap( void *arg )
+{
+ RtemsMessageReqUrgentSend_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsMessageReqUrgentSend_Teardown( ctx );
+}
+
+static void RtemsMessageReqUrgentSend_Prepare(
+ RtemsMessageReqUrgentSend_Context *ctx
+)
+{
+ rtems_status_code status;
+
+ ctx->send_msg_counter = 0;
+
+ rtems_message_queue_config config = {
+ .name = rtems_build_name( 'M', 'S', 'G', 'Q' ),
+ .maximum_pending_messages = MAXIMUM_PENDING_MESSAGES,
+ .maximum_message_size = MAXIMUM_MESSAGE_SIZE,
+ .storage_area = ctx->storage_area,
+ .storage_size = sizeof( ctx->storage_area ),
+ .storage_free = NULL,
+ .attributes = RTEMS_DEFAULT_ATTRIBUTES
+ };
+
+ status = rtems_message_queue_construct(
+ &config,
+ &ctx->message_queue_id
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsMessageReqUrgentSend_Action(
+ RtemsMessageReqUrgentSend_Context *ctx
+)
+{
+ if ( ctx->is_receiver_waiting ) {
+ SendEvents( ctx->worker_id, EVENT_RECEIVE );
+ }
+
+ ctx->status = (ctx->action)(
+ ctx->id_param,
+ ctx->buffer_param,
+ ctx->size_param
+ );
+
+ if ( ctx->is_receiver_waiting ) {
+ FinalClockTick();
+ }
+}
+
+static void RtemsMessageReqUrgentSend_Cleanup(
+ RtemsMessageReqUrgentSend_Context *ctx
+)
+{
+ T_rsc_success( rtems_message_queue_delete( ctx->message_queue_id ) );
+}
+
+static const RtemsMessageReqUrgentSend_Entry
+RtemsMessageReqUrgentSend_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqUrgentSend_Post_Status_NA,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_NA,
+ RtemsMessageReqUrgentSend_Post_Receiver_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqUrgentSend_Post_Status_InvAddr,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Nop,
+ RtemsMessageReqUrgentSend_Post_Receiver_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqUrgentSend_Post_Status_InvId,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Nop,
+ RtemsMessageReqUrgentSend_Post_Receiver_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqUrgentSend_Post_Status_InvAddr,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Nop,
+ RtemsMessageReqUrgentSend_Post_Receiver_Waiting },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqUrgentSend_Post_Status_InvSize,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Nop,
+ RtemsMessageReqUrgentSend_Post_Receiver_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqUrgentSend_Post_Status_InvId,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Nop,
+ RtemsMessageReqUrgentSend_Post_Receiver_Waiting },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqUrgentSend_Post_Status_Ok,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Empty,
+ RtemsMessageReqUrgentSend_Post_Receiver_GotMsg },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqUrgentSend_Post_Status_Ok,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_One,
+ RtemsMessageReqUrgentSend_Post_Receiver_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqUrgentSend_Post_Status_Ok,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Append,
+ RtemsMessageReqUrgentSend_Post_Receiver_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqUrgentSend_Post_Status_Ok,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Prepend,
+ RtemsMessageReqUrgentSend_Post_Receiver_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqUrgentSend_Post_Status_TooMany,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Nop,
+ RtemsMessageReqUrgentSend_Post_Receiver_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsMessageReqUrgentSend_Post_Status_InvSize,
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Nop,
+ RtemsMessageReqUrgentSend_Post_Receiver_Waiting }
+};
+
+static const uint8_t
+RtemsMessageReqUrgentSend_Map[] = {
+ 6, 6, 7, 7, 0, 0, 8, 9, 0, 0, 8, 9, 0, 0, 10, 10, 6, 6, 7, 7, 0, 0, 8, 9, 0,
+ 0, 8, 9, 0, 0, 10, 10, 6, 6, 7, 7, 0, 0, 8, 9, 0, 0, 8, 9, 0, 0, 10, 10, 11,
+ 11, 4, 4, 0, 0, 4, 4, 0, 0, 4, 4, 0, 0, 4, 4, 5, 5, 2, 2, 0, 0, 2, 2, 0, 0,
+ 2, 2, 0, 0, 2, 2, 5, 5, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 5, 5, 2, 2,
+ 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 5, 5, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0,
+ 2, 2, 3, 3, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 3, 3, 1, 1, 0, 0, 1, 1,
+ 0, 0, 1, 1, 0, 0, 1, 1, 3, 3, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 3, 3,
+ 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 3, 3, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1,
+ 0, 0, 1, 1, 3, 3, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 3, 3, 1, 1, 0, 0,
+ 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 3, 3, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1
+};
+
+static size_t RtemsMessageReqUrgentSend_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsMessageReqUrgentSend_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsMessageReqUrgentSend_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsMessageReqUrgentSend_Fixture = {
+ .setup = RtemsMessageReqUrgentSend_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsMessageReqUrgentSend_Teardown_Wrap,
+ .scope = RtemsMessageReqUrgentSend_Scope,
+ .initial_context = &RtemsMessageReqUrgentSend_Instance
+};
+
+static inline RtemsMessageReqUrgentSend_Entry
+RtemsMessageReqUrgentSend_PopEntry( RtemsMessageReqUrgentSend_Context *ctx )
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsMessageReqUrgentSend_Entries[
+ RtemsMessageReqUrgentSend_Map[ index ]
+ ];
+}
+
+static void RtemsMessageReqUrgentSend_TestVariant(
+ RtemsMessageReqUrgentSend_Context *ctx
+)
+{
+ RtemsMessageReqUrgentSend_Pre_Buffer_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsMessageReqUrgentSend_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsMessageReqUrgentSend_Pre_Size_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsMessageReqUrgentSend_Pre_MsgQueue_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsMessageReqUrgentSend_Pre_Receiver_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsMessageReqUrgentSend_Pre_Directive_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsMessageReqUrgentSend_Pre_Storage_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsMessageReqUrgentSend_Action( ctx );
+ RtemsMessageReqUrgentSend_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsMessageReqUrgentSend_Post_MsgQueue_Check(
+ ctx,
+ ctx->Map.entry.Post_MsgQueue
+ );
+ RtemsMessageReqUrgentSend_Post_Receiver_Check(
+ ctx,
+ ctx->Map.entry.Post_Receiver
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsMessageReqUrgentSend( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsMessageReqUrgentSend,
+ &RtemsMessageReqUrgentSend_Fixture
+)
+{
+ RtemsMessageReqUrgentSend_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsMessageReqUrgentSend_Pre_Buffer_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsMessageReqUrgentSend_Pre_Buffer_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsMessageReqUrgentSend_Pre_Id_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsMessageReqUrgentSend_Pre_Id_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsMessageReqUrgentSend_Pre_Size_Zero;
+ ctx->Map.pcs[ 2 ] < RtemsMessageReqUrgentSend_Pre_Size_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsMessageReqUrgentSend_Pre_MsgQueue_Empty;
+ ctx->Map.pcs[ 3 ] < RtemsMessageReqUrgentSend_Pre_MsgQueue_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsMessageReqUrgentSend_Pre_Receiver_Waiting;
+ ctx->Map.pcs[ 4 ] < RtemsMessageReqUrgentSend_Pre_Receiver_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = RtemsMessageReqUrgentSend_Pre_Directive_Send;
+ ctx->Map.pcs[ 5 ] < RtemsMessageReqUrgentSend_Pre_Directive_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 6 ] = RtemsMessageReqUrgentSend_Pre_Storage_Nop;
+ ctx->Map.pcs[ 6 ] < RtemsMessageReqUrgentSend_Pre_Storage_NA;
+ ++ctx->Map.pcs[ 6 ]
+ ) {
+ ctx->Map.entry = RtemsMessageReqUrgentSend_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsMessageReqUrgentSend_Prepare( ctx );
+ RtemsMessageReqUrgentSend_TestVariant( ctx );
+ RtemsMessageReqUrgentSend_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-modes.c b/testsuites/validation/tc-modes.c
new file mode 100644
index 0000000000..91d26e835c
--- /dev/null
+++ b/testsuites/validation/tc-modes.c
@@ -0,0 +1,363 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsModeValModes
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsModeValModes spec:/rtems/mode/val/modes
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests the task mode constants and function-like macros of the Classic
+ * API.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate the non-default task mode constants.
+ *
+ * - Check that RTEMS_NO_ASR is a power of two representable as an integer of
+ * type rtems_mode.
+ *
+ * - Check that RTEMS_NO_PREEMPT is a power of two representable as an
+ * integer of type rtems_mode.
+ *
+ * - Check that RTEMS_TIMESLICE is a power of two representable as an integer
+ * of type rtems_mode.
+ *
+ * - Validate the default task mode constants.
+ *
+ * - Check that RTEMS_ASR is equal to zero.
+ *
+ * - Check that RTEMS_DEFAULT_MODES is equal to zero.
+ *
+ * - Check that RTEMS_NO_TIMESLICE is equal to zero.
+ *
+ * - Check that RTEMS_PREEMPT is equal to zero.
+ *
+ * - Validate RTEMS_ALL_MODE_MASKS.
+ *
+ * - Check that the bitwise and of RTEMS_ASR_MASK and RTEMS_ALL_MODE_MASKS is
+ * equal to RTEMS_ASR_MASK.
+ *
+ * - Check that the bitwise and of RTEMS_PREEMPT_MASK and
+ * RTEMS_ALL_MODE_MASKS is equal to RTEMS_PREEMPT_MASK.
+ *
+ * - Check that the bitwise and of RTEMS_TIMESLICE_MASK and
+ * RTEMS_ALL_MODE_MASKS is equal to RTEMS_TIMESLICE_MASK.
+ *
+ * - Check that the bitwise and of RTEMS_INTERRUPT_MASK and
+ * RTEMS_ALL_MODE_MASKS is equal to RTEMS_INTERRUPT_MASK.
+ *
+ * - Validate the task mode mask constants except RTEMS_INTERRUPT_MASK.
+ *
+ * - Check that RTEMS_ASR_MASK is a power of two representable as an integer
+ * of type rtems_mode.
+ *
+ * - Check that RTEMS_PREEMPT_MASK is a power of two representable as an
+ * integer of type rtems_mode.
+ *
+ * - Check that RTEMS_TIMESLICE_MASK is a power of two representable as an
+ * integer of type rtems_mode.
+ *
+ * - Calculate the bitwise or of all task mode mask constants and 0xff.
+ *
+ * - Check that the count of set bits in the calculated value is equal to the
+ * count of task mode mask constants except RTEMS_INTERRUPT_MASK plus
+ * eight. Since each task mode mask constants except RTEMS_INTERRUPT_MASK
+ * is a power of two and the bitwise and of 0xff and RTEMS_INTERRUPT_MASK
+ * is equal to RTEMS_INTERRUPT_MASK this proves that each constant and 0xff
+ * has a unique value.
+ *
+ * - Calculate the bitwise or of all non-default task mode constants.
+ *
+ * - Check that the count of set bits in the calculated value is equal to the
+ * count of non-default task mode constants. Since each non-default task
+ * mode constants except is a power of this proves that each constant has a
+ * unique value.
+ *
+ * - Validate RTEMS_INTERRUPT_LEVEL().
+ *
+ * - Check the result of RTEMS_INTERRUPT_LEVEL() for a sample value.
+ *
+ * @{
+ */
+
+static bool IsPowerOfTwo( rtems_mode mode )
+{
+ return mode != 0 && ( mode & ( mode - 1 ) ) == 0;
+}
+
+static int PopCount( rtems_mode modes )
+{
+ int count;
+
+ count = 0;
+
+ while ( modes != 0 ) {
+ ++count;
+ modes &= modes - 1;
+ }
+
+ return count;
+}
+
+/**
+ * @brief Validate the non-default task mode constants.
+ */
+static void RtemsModeValModes_Action_0( void )
+{
+ /* No action */
+
+ /*
+ * Check that RTEMS_NO_ASR is a power of two representable as an integer of
+ * type rtems_mode.
+ */
+ T_step_true( 0, IsPowerOfTwo( RTEMS_NO_ASR ) );
+
+ /*
+ * Check that RTEMS_NO_PREEMPT is a power of two representable as an integer
+ * of type rtems_mode.
+ */
+ T_step_true( 1, IsPowerOfTwo( RTEMS_NO_PREEMPT ) );
+
+ /*
+ * Check that RTEMS_TIMESLICE is a power of two representable as an integer
+ * of type rtems_mode.
+ */
+ T_step_true( 2, IsPowerOfTwo( RTEMS_TIMESLICE ) );
+}
+
+/**
+ * @brief Validate the default task mode constants.
+ */
+static void RtemsModeValModes_Action_1( void )
+{
+ /* No action */
+
+ /*
+ * Check that RTEMS_ASR is equal to zero.
+ */
+ T_step_eq_u32( 3, RTEMS_ASR, 0 );
+
+ /*
+ * Check that RTEMS_DEFAULT_MODES is equal to zero.
+ */
+ T_step_eq_u32( 4, RTEMS_DEFAULT_MODES, 0 );
+
+ /*
+ * Check that RTEMS_NO_TIMESLICE is equal to zero.
+ */
+ T_step_eq_u32( 5, RTEMS_NO_TIMESLICE, 0 );
+
+ /*
+ * Check that RTEMS_PREEMPT is equal to zero.
+ */
+ T_step_eq_u32( 6, RTEMS_PREEMPT, 0 );
+}
+
+/**
+ * @brief Validate RTEMS_ALL_MODE_MASKS.
+ */
+static void RtemsModeValModes_Action_2( void )
+{
+ /* No action */
+
+ /*
+ * Check that the bitwise and of RTEMS_ASR_MASK and RTEMS_ALL_MODE_MASKS is
+ * equal to RTEMS_ASR_MASK.
+ */
+ T_step_eq_u32(
+ 7,
+ RTEMS_ASR_MASK & RTEMS_ALL_MODE_MASKS,
+ RTEMS_ASR_MASK
+ );
+
+ /*
+ * Check that the bitwise and of RTEMS_PREEMPT_MASK and RTEMS_ALL_MODE_MASKS
+ * is equal to RTEMS_PREEMPT_MASK.
+ */
+ T_step_eq_u32(
+ 8,
+ RTEMS_PREEMPT_MASK & RTEMS_ALL_MODE_MASKS,
+ RTEMS_PREEMPT_MASK
+ );
+
+ /*
+ * Check that the bitwise and of RTEMS_TIMESLICE_MASK and
+ * RTEMS_ALL_MODE_MASKS is equal to RTEMS_TIMESLICE_MASK.
+ */
+ T_step_eq_u32(
+ 9,
+ RTEMS_TIMESLICE_MASK & RTEMS_ALL_MODE_MASKS,
+ RTEMS_TIMESLICE_MASK
+ );
+
+ /*
+ * Check that the bitwise and of RTEMS_INTERRUPT_MASK and
+ * RTEMS_ALL_MODE_MASKS is equal to RTEMS_INTERRUPT_MASK.
+ */
+ T_step_eq_u32(
+ 10,
+ RTEMS_INTERRUPT_MASK & RTEMS_ALL_MODE_MASKS,
+ RTEMS_INTERRUPT_MASK
+ );
+}
+
+/**
+ * @brief Validate the task mode mask constants except RTEMS_INTERRUPT_MASK.
+ */
+static void RtemsModeValModes_Action_3( void )
+{
+ /* No action */
+
+ /*
+ * Check that RTEMS_ASR_MASK is a power of two representable as an integer of
+ * type rtems_mode.
+ */
+ T_step_true( 11, IsPowerOfTwo( RTEMS_ASR_MASK ) );
+
+ /*
+ * Check that RTEMS_PREEMPT_MASK is a power of two representable as an
+ * integer of type rtems_mode.
+ */
+ T_step_true( 12, IsPowerOfTwo( RTEMS_PREEMPT_MASK ) );
+
+ /*
+ * Check that RTEMS_TIMESLICE_MASK is a power of two representable as an
+ * integer of type rtems_mode.
+ */
+ T_step_true( 13, IsPowerOfTwo( RTEMS_TIMESLICE_MASK ) );
+}
+
+/**
+ * @brief Calculate the bitwise or of all task mode mask constants and 0xff.
+ */
+static void RtemsModeValModes_Action_4( void )
+{
+ rtems_mode modes;
+
+ modes = 0;
+ modes |= 0xff;
+ modes |= RTEMS_ASR_MASK;
+ modes |= RTEMS_PREEMPT_MASK;
+ modes |= RTEMS_TIMESLICE_MASK;
+
+ /*
+ * Check that the count of set bits in the calculated value is equal to the
+ * count of task mode mask constants except RTEMS_INTERRUPT_MASK plus eight.
+ * Since each task mode mask constants except RTEMS_INTERRUPT_MASK is a power
+ * of two and the bitwise and of 0xff and RTEMS_INTERRUPT_MASK is equal to
+ * RTEMS_INTERRUPT_MASK this proves that each constant and 0xff has a unique
+ * value.
+ */
+ T_step_eq_int( 14, PopCount( modes ), 11 );
+}
+
+/**
+ * @brief Calculate the bitwise or of all non-default task mode constants.
+ */
+static void RtemsModeValModes_Action_5( void )
+{
+ rtems_mode modes;
+
+ modes = 0;
+ modes |= RTEMS_NO_ASR;
+ modes |= RTEMS_NO_PREEMPT;
+ modes |= RTEMS_TIMESLICE;
+
+ /*
+ * Check that the count of set bits in the calculated value is equal to the
+ * count of non-default task mode constants. Since each non-default task
+ * mode constants except is a power of this proves that each constant has a
+ * unique value.
+ */
+ T_step_eq_int( 15, PopCount( modes ), 3 );
+}
+
+/**
+ * @brief Validate RTEMS_INTERRUPT_LEVEL().
+ */
+static void RtemsModeValModes_Action_6( void )
+{
+ /* Nothing to do */
+
+ /*
+ * Check the result of RTEMS_INTERRUPT_LEVEL() for a sample value.
+ */
+ T_step_eq_u32(
+ 16,
+ RTEMS_INTERRUPT_LEVEL( UINT32_MAX ),
+ RTEMS_INTERRUPT_MASK
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsModeValModes( void )
+ */
+T_TEST_CASE( RtemsModeValModes )
+{
+ T_plan( 17 );
+
+ RtemsModeValModes_Action_0();
+ RtemsModeValModes_Action_1();
+ RtemsModeValModes_Action_2();
+ RtemsModeValModes_Action_3();
+ RtemsModeValModes_Action_4();
+ RtemsModeValModes_Action_5();
+ RtemsModeValModes_Action_6();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-object.c b/testsuites/validation/tc-object.c
index 916c35aa95..6ee87dbf4e 100644
--- a/testsuites/validation/tc-object.c
+++ b/testsuites/validation/tc-object.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsObjectValObject
+ * @ingroup RtemsObjectValObject
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -57,24 +57,41 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsObjectValObject spec:/rtems/object/val/object
+ * @defgroup RtemsObjectValObject spec:/rtems/object/val/object
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidationNoClock0
*
- * @brief Tests the rtems_build_name() macro.
+ * @brief Tests some @ref RTEMSAPIClassicObject directives.
*
* This test case performs the following actions:
*
- * - Validate the results of rtems_build_name() for a sample set of parameters.
+ * - Validate the results of rtems_build_name() (function) and
+ * rtems_build_name() (macro) for a sample set of parameters.
*
* - Check that the accumulated name has the expected value.
*
+ * - Validate the result of rtems_object_get_local_node().
+ *
+ * - Check that the returned value is one.
+ *
* @{
*/
+static rtems_name BuildNameMacro( char c1, char c2, char c3, char c4 )
+{
+ return rtems_build_name( c1, c2, c3, c4 );
+}
+
+#undef rtems_build_name
+
+static rtems_name BuildName( char c1, char c2, char c3, char c4 )
+{
+ return rtems_build_name( c1, c2, c3, c4 );
+}
+
/**
- * @brief Validate the results of rtems_build_name() for a sample set of
- * parameters.
+ * @brief Validate the results of rtems_build_name() (function) and
+ * rtems_build_name() (macro) for a sample set of parameters.
*/
static void RtemsObjectValObject_Action_0( void )
{
@@ -123,13 +140,22 @@ static void RtemsObjectValObject_Action_0( void )
T_quiet_eq_u32( actual_name, expected_name )
accumulated_name += actual_name;
- actual_name = rtems_build_name(
+ actual_name = BuildName(
+ chars[ i ],
+ chars[ j ],
+ chars[ k ],
+ chars[ r ]
+ );
+ T_quiet_eq_u32( actual_name, expected_name );
+
+ actual_name = BuildNameMacro(
chars[ i ],
chars[ j ],
chars[ k ],
chars[ r ]
);
T_quiet_eq_u32( actual_name, expected_name );
+
accumulated_name += actual_name;
}
}
@@ -143,13 +169,29 @@ static void RtemsObjectValObject_Action_0( void )
}
/**
+ * @brief Validate the result of rtems_object_get_local_node().
+ */
+static void RtemsObjectValObject_Action_1( void )
+{
+ uint32_t node;
+
+ node = rtems_object_get_local_node();
+
+ /*
+ * Check that the returned value is one.
+ */
+ T_step_eq_u32( 1, node, 1 );
+}
+
+/**
* @fn void T_case_body_RtemsObjectValObject( void )
*/
T_TEST_CASE( RtemsObjectValObject )
{
- T_plan( 1 );
+ T_plan( 2 );
RtemsObjectValObject_Action_0();
+ RtemsObjectValObject_Action_1();
}
/** @} */
diff --git a/testsuites/validation/tc-options.c b/testsuites/validation/tc-options.c
new file mode 100644
index 0000000000..166b3b8b31
--- /dev/null
+++ b/testsuites/validation/tc-options.c
@@ -0,0 +1,202 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsOptionValOptions
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsOptionValOptions spec:/rtems/option/val/options
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests the option constants of the Classic API.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate the non-default option constants.
+ *
+ * - Check that RTEMS_EVENT_ANY is a power of two.
+ *
+ * - Check that RTEMS_NO_WAIT is a power of two.
+ *
+ * - Validate the default option constants.
+ *
+ * - Check that RTEMS_DEFAULT_OPTIONS is equal to zero.
+ *
+ * - Check that RTEMS_EVENT_ALL is equal to zero.
+ *
+ * - Check that RTEMS_WAIT is equal to zero.
+ *
+ * - Calculate the bitwise or of all non-default option constants.
+ *
+ * - Check that the count of set bits in the calculated value is equal to the
+ * count of non-default option constants. Since each non-default option
+ * constant is a power of two, this proves that each constant has a unique
+ * value.
+ *
+ * - Check the value of RTEMS_DEFAULT_OPTIONS.
+ *
+ * - Check RTEMS_DEFAULT_OPTIONS equals RTEMS_WAIT.
+ *
+ * @{
+ */
+
+static bool IsPowerOfTwo( rtems_option option )
+{
+ return option != 0 && ( option & ( option - 1 ) ) == 0;
+}
+
+static int PopCount( rtems_option options )
+{
+ int count;
+
+ count = 0;
+
+ while ( options != 0 ) {
+ ++count;
+ options &= options - 1;
+ }
+
+ return count;
+}
+
+/**
+ * @brief Validate the non-default option constants.
+ */
+static void RtemsOptionValOptions_Action_0( void )
+{
+ /* No action */
+
+ /*
+ * Check that RTEMS_EVENT_ANY is a power of two.
+ */
+ T_step_true( 0, IsPowerOfTwo( RTEMS_EVENT_ANY ) );
+
+ /*
+ * Check that RTEMS_NO_WAIT is a power of two.
+ */
+ T_step_true( 1, IsPowerOfTwo( RTEMS_NO_WAIT ) );
+}
+
+/**
+ * @brief Validate the default option constants.
+ */
+static void RtemsOptionValOptions_Action_1( void )
+{
+ /* No action */
+
+ /*
+ * Check that RTEMS_DEFAULT_OPTIONS is equal to zero.
+ */
+ T_step_eq_u32( 2, RTEMS_DEFAULT_OPTIONS, 0 );
+
+ /*
+ * Check that RTEMS_EVENT_ALL is equal to zero.
+ */
+ T_step_eq_u32( 3, RTEMS_EVENT_ALL, 0 );
+
+ /*
+ * Check that RTEMS_WAIT is equal to zero.
+ */
+ T_step_eq_u32( 4, RTEMS_WAIT, 0 );
+}
+
+/**
+ * @brief Calculate the bitwise or of all non-default option constants.
+ */
+static void RtemsOptionValOptions_Action_2( void )
+{
+ rtems_option options;
+
+ options = 0;
+ options |= RTEMS_EVENT_ANY;
+ options |= RTEMS_NO_WAIT;
+
+ /*
+ * Check that the count of set bits in the calculated value is equal to the
+ * count of non-default option constants. Since each non-default option
+ * constant is a power of two, this proves that each constant has a unique
+ * value.
+ */
+ T_step_eq_int( 5, PopCount( options ), 2 );
+}
+
+/**
+ * @brief Check the value of RTEMS_DEFAULT_OPTIONS.
+ */
+static void RtemsOptionValOptions_Action_3( void )
+{
+ /* No action */
+
+ /*
+ * Check RTEMS_DEFAULT_OPTIONS equals RTEMS_WAIT.
+ */
+ T_step_eq_int( 6, RTEMS_DEFAULT_OPTIONS, RTEMS_WAIT );
+}
+
+/**
+ * @fn void T_case_body_RtemsOptionValOptions( void )
+ */
+T_TEST_CASE( RtemsOptionValOptions )
+{
+ T_plan( 7 );
+
+ RtemsOptionValOptions_Action_0();
+ RtemsOptionValOptions_Action_1();
+ RtemsOptionValOptions_Action_2();
+ RtemsOptionValOptions_Action_3();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-part-create.c b/testsuites/validation/tc-part-create.c
new file mode 100644
index 0000000000..3e7389d98a
--- /dev/null
+++ b/testsuites/validation/tc-part-create.c
@@ -0,0 +1,791 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsPartReqCreate
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsPartReqCreate spec:/rtems/part/req/create
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsPartReqCreate_Pre_Name_Valid,
+ RtemsPartReqCreate_Pre_Name_Invalid,
+ RtemsPartReqCreate_Pre_Name_NA
+} RtemsPartReqCreate_Pre_Name;
+
+typedef enum {
+ RtemsPartReqCreate_Pre_Id_Valid,
+ RtemsPartReqCreate_Pre_Id_Null,
+ RtemsPartReqCreate_Pre_Id_NA
+} RtemsPartReqCreate_Pre_Id;
+
+typedef enum {
+ RtemsPartReqCreate_Pre_Start_Valid,
+ RtemsPartReqCreate_Pre_Start_Null,
+ RtemsPartReqCreate_Pre_Start_BadAlign,
+ RtemsPartReqCreate_Pre_Start_NA
+} RtemsPartReqCreate_Pre_Start;
+
+typedef enum {
+ RtemsPartReqCreate_Pre_Length_Valid,
+ RtemsPartReqCreate_Pre_Length_Zero,
+ RtemsPartReqCreate_Pre_Length_Invalid,
+ RtemsPartReqCreate_Pre_Length_NA
+} RtemsPartReqCreate_Pre_Length;
+
+typedef enum {
+ RtemsPartReqCreate_Pre_Size_Valid,
+ RtemsPartReqCreate_Pre_Size_Zero,
+ RtemsPartReqCreate_Pre_Size_Skew,
+ RtemsPartReqCreate_Pre_Size_Small,
+ RtemsPartReqCreate_Pre_Size_NA
+} RtemsPartReqCreate_Pre_Size;
+
+typedef enum {
+ RtemsPartReqCreate_Pre_Free_Yes,
+ RtemsPartReqCreate_Pre_Free_No,
+ RtemsPartReqCreate_Pre_Free_NA
+} RtemsPartReqCreate_Pre_Free;
+
+typedef enum {
+ RtemsPartReqCreate_Post_Status_Ok,
+ RtemsPartReqCreate_Post_Status_InvAddr,
+ RtemsPartReqCreate_Post_Status_InvName,
+ RtemsPartReqCreate_Post_Status_InvSize,
+ RtemsPartReqCreate_Post_Status_TooMany,
+ RtemsPartReqCreate_Post_Status_NA
+} RtemsPartReqCreate_Post_Status;
+
+typedef enum {
+ RtemsPartReqCreate_Post_Name_Valid,
+ RtemsPartReqCreate_Post_Name_Invalid,
+ RtemsPartReqCreate_Post_Name_NA
+} RtemsPartReqCreate_Post_Name;
+
+typedef enum {
+ RtemsPartReqCreate_Post_IdVar_Set,
+ RtemsPartReqCreate_Post_IdVar_Nop,
+ RtemsPartReqCreate_Post_IdVar_NA
+} RtemsPartReqCreate_Post_IdVar;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Name_NA : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_Start_NA : 1;
+ uint16_t Pre_Length_NA : 1;
+ uint16_t Pre_Size_NA : 1;
+ uint16_t Pre_Free_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_Name : 2;
+ uint16_t Post_IdVar : 2;
+} RtemsPartReqCreate_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/part/req/create test case.
+ */
+typedef struct {
+ void *seized_objects;
+
+ rtems_status_code status;
+
+ rtems_name name;
+
+ void *starting_address;
+
+ uintptr_t length;
+
+ size_t buffer_size;
+
+ rtems_attribute attribute_set;
+
+ rtems_id *id;
+
+ rtems_id id_value;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 6 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsPartReqCreate_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsPartReqCreate_Context;
+
+static RtemsPartReqCreate_Context
+ RtemsPartReqCreate_Instance;
+
+static const char * const RtemsPartReqCreate_PreDesc_Name[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsPartReqCreate_PreDesc_Id[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsPartReqCreate_PreDesc_Start[] = {
+ "Valid",
+ "Null",
+ "BadAlign",
+ "NA"
+};
+
+static const char * const RtemsPartReqCreate_PreDesc_Length[] = {
+ "Valid",
+ "Zero",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsPartReqCreate_PreDesc_Size[] = {
+ "Valid",
+ "Zero",
+ "Skew",
+ "Small",
+ "NA"
+};
+
+static const char * const RtemsPartReqCreate_PreDesc_Free[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsPartReqCreate_PreDesc[] = {
+ RtemsPartReqCreate_PreDesc_Name,
+ RtemsPartReqCreate_PreDesc_Id,
+ RtemsPartReqCreate_PreDesc_Start,
+ RtemsPartReqCreate_PreDesc_Length,
+ RtemsPartReqCreate_PreDesc_Size,
+ RtemsPartReqCreate_PreDesc_Free,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+#define MAX_PARTITIONS ( TEST_MAXIMUM_PARTITIONS + 1 )
+
+#define BUFFER_COUNT 2
+
+#define BUFFER_SIZE ( 2 * sizeof( void * ) )
+
+static RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t
+ buffers_to_seize[ MAX_PARTITIONS ][ BUFFER_COUNT ][ BUFFER_SIZE ];
+
+static RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t
+ buffers[ BUFFER_COUNT ][ BUFFER_SIZE ];
+
+static rtems_status_code Create( void *arg, uint32_t *id )
+{
+ size_t *i;
+ size_t j;
+
+ i = arg;
+ j = *i;
+ T_quiet_lt_sz( j, MAX_PARTITIONS );
+
+ *i = j + 1;
+
+ return rtems_partition_create(
+ rtems_build_name( 'S', 'I', 'Z', 'E' ),
+ buffers_to_seize[ j ],
+ sizeof( buffers_to_seize[ j ] ),
+ sizeof( buffers_to_seize[ j ][ 0 ] ),
+ RTEMS_DEFAULT_ATTRIBUTES,
+ id
+ );
+}
+
+static void RtemsPartReqCreate_Pre_Name_Prepare(
+ RtemsPartReqCreate_Context *ctx,
+ RtemsPartReqCreate_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqCreate_Pre_Name_Valid: {
+ /*
+ * While the ``name`` parameter is valid.
+ */
+ ctx->name = NAME;
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Name_Invalid: {
+ /*
+ * While the ``name`` parameter is invalid.
+ */
+ ctx->name = 0;
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqCreate_Pre_Id_Prepare(
+ RtemsPartReqCreate_Context *ctx,
+ RtemsPartReqCreate_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqCreate_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter references an object of type rtems_id.
+ */
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Id_Null: {
+ /*
+ * While the ``id`` parameter is NULL.
+ */
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqCreate_Pre_Start_Prepare(
+ RtemsPartReqCreate_Context *ctx,
+ RtemsPartReqCreate_Pre_Start state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqCreate_Pre_Start_Valid: {
+ /*
+ * While the ``starting_address`` parameter is valid.
+ */
+ ctx->starting_address = buffers;
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Start_Null: {
+ /*
+ * While the ``starting_address`` parameter is NULL.
+ */
+ ctx->starting_address = NULL;
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Start_BadAlign: {
+ /*
+ * While the ``starting_address`` parameter is misaligned.
+ */
+ ctx->starting_address = &buffers[ 0 ][ 1 ];
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Start_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqCreate_Pre_Length_Prepare(
+ RtemsPartReqCreate_Context *ctx,
+ RtemsPartReqCreate_Pre_Length state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqCreate_Pre_Length_Valid: {
+ /*
+ * While the ``length`` parameter is valid.
+ */
+ ctx->length = sizeof( buffers );
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Length_Zero: {
+ /*
+ * While the ``length`` parameter is zero.
+ */
+ ctx->length = 0;
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Length_Invalid: {
+ /*
+ * While the ``length`` parameter is less than the buffer size.
+ */
+ ctx->length = sizeof( buffers[ 0 ] ) - 1;
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Length_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqCreate_Pre_Size_Prepare(
+ RtemsPartReqCreate_Context *ctx,
+ RtemsPartReqCreate_Pre_Size state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqCreate_Pre_Size_Valid: {
+ /*
+ * While the ``buffer_size`` parameter is valid.
+ */
+ ctx->buffer_size = sizeof( buffers[ 0 ] );
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Size_Zero: {
+ /*
+ * While the ``buffer_size`` parameter is zero.
+ */
+ ctx->buffer_size = 0;
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Size_Skew: {
+ /*
+ * The ``buffer_size`` parameter shall not an integral multiple of the
+ * pointer size.
+ */
+ ctx->buffer_size = 1;
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Size_Small: {
+ /*
+ * The ``buffer_size`` parameter shall greater than zero and an integral
+ * multiple of the pointer size and less than the size of two pointers.
+ */
+ ctx->buffer_size = sizeof( uintptr_t );
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Size_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqCreate_Pre_Free_Prepare(
+ RtemsPartReqCreate_Context *ctx,
+ RtemsPartReqCreate_Pre_Free state
+)
+{
+ size_t i;
+
+ switch ( state ) {
+ case RtemsPartReqCreate_Pre_Free_Yes: {
+ /*
+ * While the system has at least one inactive partition object available.
+ */
+ /* Nothing to do */
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Free_No: {
+ /*
+ * While the system has no inactive partition object available.
+ */
+ i = 0;
+ ctx->seized_objects = T_seize_objects( Create, &i );
+ break;
+ }
+
+ case RtemsPartReqCreate_Pre_Free_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqCreate_Post_Status_Check(
+ RtemsPartReqCreate_Context *ctx,
+ RtemsPartReqCreate_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqCreate_Post_Status_Ok: {
+ /*
+ * The return status of rtems_partition_create() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsPartReqCreate_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_partition_create() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsPartReqCreate_Post_Status_InvName: {
+ /*
+ * The return status of rtems_partition_create() shall be
+ * RTEMS_INVALID_NAME.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsPartReqCreate_Post_Status_InvSize: {
+ /*
+ * The return status of rtems_partition_create() shall be
+ * RTEMS_INVALID_SIZE.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_SIZE );
+ break;
+ }
+
+ case RtemsPartReqCreate_Post_Status_TooMany: {
+ /*
+ * The return status of rtems_partition_create() shall be RTEMS_TOO_MANY.
+ */
+ T_rsc( ctx->status, RTEMS_TOO_MANY );
+ break;
+ }
+
+ case RtemsPartReqCreate_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqCreate_Post_Name_Check(
+ RtemsPartReqCreate_Context *ctx,
+ RtemsPartReqCreate_Post_Name state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ switch ( state ) {
+ case RtemsPartReqCreate_Post_Name_Valid: {
+ /*
+ * The unique object name shall identify the partition created by the
+ * rtems_partition_create() call.
+ */
+ id = 0;
+ sc = rtems_partition_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc_success( sc );
+ T_eq_u32( id, ctx->id_value );
+ break;
+ }
+
+ case RtemsPartReqCreate_Post_Name_Invalid: {
+ /*
+ * The unique object name shall not identify a partition.
+ */
+ sc = rtems_partition_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsPartReqCreate_Post_Name_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqCreate_Post_IdVar_Check(
+ RtemsPartReqCreate_Context *ctx,
+ RtemsPartReqCreate_Post_IdVar state
+)
+{
+ rtems_status_code sc;
+ size_t i;
+ void *buffers[ BUFFER_COUNT ];
+ void *no_buffer;
+
+ switch ( state ) {
+ case RtemsPartReqCreate_Post_IdVar_Set: {
+ /*
+ * The value of the object referenced by the ``id`` parameter shall be
+ * set to the object identifier of the created partition after the return
+ * of the rtems_partition_create() call.
+ */
+ T_eq_ptr( ctx->id, &ctx->id_value );
+ T_ne_u32( ctx->id_value, INVALID_ID );
+
+ for ( i = 0; i < BUFFER_COUNT; ++i) {
+ sc = rtems_partition_get_buffer( ctx->id_value, &buffers[ i ] );
+ T_rsc_success( sc );
+ T_not_null( buffers[ i ] );
+ }
+
+ no_buffer = (void *) (uintptr_t) 1;
+ sc = rtems_partition_get_buffer( ctx->id_value, &no_buffer );
+ T_rsc( sc, RTEMS_UNSATISFIED );
+ T_eq_ptr( no_buffer, (void *) (uintptr_t) 1 );
+
+ for ( i = 0; i < BUFFER_COUNT; ++i) {
+ sc = rtems_partition_return_buffer( ctx->id_value, buffers[ i ] );
+ T_rsc_success( sc );
+ }
+
+ sc = rtems_partition_delete( ctx->id_value );
+ T_rsc_success( sc );
+ break;
+ }
+
+ case RtemsPartReqCreate_Post_IdVar_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_partition_create() shall not be accessed by the
+ * rtems_partition_create() call.
+ */
+ T_eq_u32( ctx->id_value, INVALID_ID );
+ break;
+ }
+
+ case RtemsPartReqCreate_Post_IdVar_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqCreate_Prepare( RtemsPartReqCreate_Context *ctx )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ ctx->id_value = INVALID_ID;
+ ctx->attribute_set = RTEMS_DEFAULT_ATTRIBUTES;
+
+ id = INVALID_ID;
+ sc = rtems_partition_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ T_eq_u32( id, INVALID_ID );
+}
+
+static void RtemsPartReqCreate_Action( RtemsPartReqCreate_Context *ctx )
+{
+ ctx->status = rtems_partition_create(
+ ctx->name,
+ ctx->starting_address,
+ ctx->length,
+ ctx->buffer_size,
+ ctx->attribute_set,
+ ctx->id
+ );
+}
+
+static void RtemsPartReqCreate_Cleanup( RtemsPartReqCreate_Context *ctx )
+{
+ T_surrender_objects( &ctx->seized_objects, rtems_partition_delete );
+}
+
+static const RtemsPartReqCreate_Entry
+RtemsPartReqCreate_Entries[] = {
+ { 0, 0, 0, 0, 0, 0, 0, RtemsPartReqCreate_Post_Status_InvName,
+ RtemsPartReqCreate_Post_Name_Invalid, RtemsPartReqCreate_Post_IdVar_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsPartReqCreate_Post_Status_InvAddr,
+ RtemsPartReqCreate_Post_Name_Invalid, RtemsPartReqCreate_Post_IdVar_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsPartReqCreate_Post_Status_InvSize,
+ RtemsPartReqCreate_Post_Name_Invalid, RtemsPartReqCreate_Post_IdVar_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsPartReqCreate_Post_Status_Ok,
+ RtemsPartReqCreate_Post_Name_Valid, RtemsPartReqCreate_Post_IdVar_Set },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsPartReqCreate_Post_Status_TooMany,
+ RtemsPartReqCreate_Post_Name_Invalid, RtemsPartReqCreate_Post_IdVar_Nop }
+};
+
+static const uint8_t
+RtemsPartReqCreate_Map[] = {
+ 3, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0
+};
+
+static size_t RtemsPartReqCreate_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsPartReqCreate_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsPartReqCreate_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsPartReqCreate_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsPartReqCreate_Scope,
+ .initial_context = &RtemsPartReqCreate_Instance
+};
+
+static inline RtemsPartReqCreate_Entry RtemsPartReqCreate_PopEntry(
+ RtemsPartReqCreate_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsPartReqCreate_Entries[
+ RtemsPartReqCreate_Map[ index ]
+ ];
+}
+
+static void RtemsPartReqCreate_TestVariant( RtemsPartReqCreate_Context *ctx )
+{
+ RtemsPartReqCreate_Pre_Name_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsPartReqCreate_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsPartReqCreate_Pre_Start_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsPartReqCreate_Pre_Length_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsPartReqCreate_Pre_Size_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsPartReqCreate_Pre_Free_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsPartReqCreate_Action( ctx );
+ RtemsPartReqCreate_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsPartReqCreate_Post_Name_Check( ctx, ctx->Map.entry.Post_Name );
+ RtemsPartReqCreate_Post_IdVar_Check( ctx, ctx->Map.entry.Post_IdVar );
+}
+
+/**
+ * @fn void T_case_body_RtemsPartReqCreate( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsPartReqCreate, &RtemsPartReqCreate_Fixture )
+{
+ RtemsPartReqCreate_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsPartReqCreate_Pre_Name_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsPartReqCreate_Pre_Name_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsPartReqCreate_Pre_Id_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsPartReqCreate_Pre_Id_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsPartReqCreate_Pre_Start_Valid;
+ ctx->Map.pcs[ 2 ] < RtemsPartReqCreate_Pre_Start_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsPartReqCreate_Pre_Length_Valid;
+ ctx->Map.pcs[ 3 ] < RtemsPartReqCreate_Pre_Length_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsPartReqCreate_Pre_Size_Valid;
+ ctx->Map.pcs[ 4 ] < RtemsPartReqCreate_Pre_Size_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = RtemsPartReqCreate_Pre_Free_Yes;
+ ctx->Map.pcs[ 5 ] < RtemsPartReqCreate_Pre_Free_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ ctx->Map.entry = RtemsPartReqCreate_PopEntry( ctx );
+ RtemsPartReqCreate_Prepare( ctx );
+ RtemsPartReqCreate_TestVariant( ctx );
+ RtemsPartReqCreate_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-part-delete.c b/testsuites/validation/tc-part-delete.c
new file mode 100644
index 0000000000..227382961f
--- /dev/null
+++ b/testsuites/validation/tc-part-delete.c
@@ -0,0 +1,396 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsPartReqDelete
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsPartReqDelete spec:/rtems/part/req/delete
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsPartReqDelete_Pre_Id_NoObj,
+ RtemsPartReqDelete_Pre_Id_Part,
+ RtemsPartReqDelete_Pre_Id_NA
+} RtemsPartReqDelete_Pre_Id;
+
+typedef enum {
+ RtemsPartReqDelete_Pre_InUse_Yes,
+ RtemsPartReqDelete_Pre_InUse_No,
+ RtemsPartReqDelete_Pre_InUse_NA
+} RtemsPartReqDelete_Pre_InUse;
+
+typedef enum {
+ RtemsPartReqDelete_Post_Status_Ok,
+ RtemsPartReqDelete_Post_Status_InvId,
+ RtemsPartReqDelete_Post_Status_InUse,
+ RtemsPartReqDelete_Post_Status_NA
+} RtemsPartReqDelete_Post_Status;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Pre_InUse_NA : 1;
+ uint8_t Post_Status : 2;
+} RtemsPartReqDelete_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/part/req/delete test case.
+ */
+typedef struct {
+ rtems_status_code status;
+
+ rtems_id id;
+
+ rtems_id id_value;
+
+ void *buffer;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsPartReqDelete_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsPartReqDelete_Context;
+
+static RtemsPartReqDelete_Context
+ RtemsPartReqDelete_Instance;
+
+static const char * const RtemsPartReqDelete_PreDesc_Id[] = {
+ "NoObj",
+ "Part",
+ "NA"
+};
+
+static const char * const RtemsPartReqDelete_PreDesc_InUse[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsPartReqDelete_PreDesc[] = {
+ RtemsPartReqDelete_PreDesc_Id,
+ RtemsPartReqDelete_PreDesc_InUse,
+ NULL
+};
+
+#define PART_NAME rtems_build_name( 'N', 'A', 'M', 'E' )
+
+#define BUFFER_COUNT 1
+
+#define BUFFER_SIZE ( 2 * sizeof( void * ) )
+
+static RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t
+ buffers[ BUFFER_COUNT ][ BUFFER_SIZE ];
+
+static void RtemsPartReqDelete_Pre_Id_Prepare(
+ RtemsPartReqDelete_Context *ctx,
+ RtemsPartReqDelete_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqDelete_Pre_Id_NoObj: {
+ /*
+ * While the ``id`` parameter is not associated with a partition.
+ */
+ ctx->id = 0xffffffff;
+ break;
+ }
+
+ case RtemsPartReqDelete_Pre_Id_Part: {
+ /*
+ * While the ``id`` parameter is associated with a partition.
+ */
+ ctx->id = ctx->id_value;
+ break;
+ }
+
+ case RtemsPartReqDelete_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqDelete_Pre_InUse_Prepare(
+ RtemsPartReqDelete_Context *ctx,
+ RtemsPartReqDelete_Pre_InUse state
+)
+{
+ rtems_status_code sc;
+
+ switch ( state ) {
+ case RtemsPartReqDelete_Pre_InUse_Yes: {
+ /*
+ * While the partition has at least one buffer in use.
+ */
+ ctx->buffer = NULL;
+ sc = rtems_partition_get_buffer( ctx->id_value, &ctx->buffer );
+ T_rsc_success( sc );
+ T_not_null( ctx->buffer );
+ break;
+ }
+
+ case RtemsPartReqDelete_Pre_InUse_No: {
+ /*
+ * While the partition does not have a buffer in use.
+ */
+ ctx->buffer = NULL;
+ break;
+ }
+
+ case RtemsPartReqDelete_Pre_InUse_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqDelete_Post_Status_Check(
+ RtemsPartReqDelete_Context *ctx,
+ RtemsPartReqDelete_Post_Status state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ switch ( state ) {
+ case RtemsPartReqDelete_Post_Status_Ok: {
+ /*
+ * The status shall be RTEMS_SUCCESSFUL. The deleted partition object
+ * shall be inactive.
+ */
+ T_rsc_success( ctx->status );
+ ctx->id_value = 0xffffffff;
+
+ id = 0xffffffff;
+ sc = rtems_partition_ident( PART_NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ T_eq_u32( id, 0xffffffff );
+ break;
+ }
+
+ case RtemsPartReqDelete_Post_Status_InvId: {
+ /*
+ * The status shall be RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+
+ id = 0xffffffff;
+ sc = rtems_partition_ident( PART_NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc_success( sc);
+ T_eq_u32( id, ctx->id_value );
+ break;
+ }
+
+ case RtemsPartReqDelete_Post_Status_InUse: {
+ /*
+ * The status shall be RTEMS_RESOURCE_IN_USE.
+ */
+ T_rsc( ctx->status, RTEMS_RESOURCE_IN_USE );
+
+ id = 0xffffffff;
+ sc = rtems_partition_ident( PART_NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc_success( sc);
+ T_eq_u32( id, ctx->id_value );
+ break;
+ }
+
+ case RtemsPartReqDelete_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqDelete_Prepare( RtemsPartReqDelete_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_partition_create(
+ PART_NAME,
+ buffers,
+ sizeof( buffers ),
+ sizeof( buffers[ 0 ] ),
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &ctx->id_value
+ );
+ T_rsc_success( sc );
+}
+
+static void RtemsPartReqDelete_Action( RtemsPartReqDelete_Context *ctx )
+{
+ ctx->status = rtems_partition_delete( ctx->id );
+}
+
+static void RtemsPartReqDelete_Cleanup( RtemsPartReqDelete_Context *ctx )
+{
+ rtems_status_code sc;
+
+ if ( ctx->buffer != NULL ) {
+ sc = rtems_partition_return_buffer( ctx->id_value, ctx->buffer );
+ T_rsc_success( sc );
+ }
+
+ if ( ctx->id_value != 0xffffffff ) {
+ sc = rtems_partition_delete( ctx->id_value );
+ T_rsc_success( sc );
+ }
+}
+
+static const RtemsPartReqDelete_Entry
+RtemsPartReqDelete_Entries[] = {
+ { 0, 0, 0, RtemsPartReqDelete_Post_Status_InvId },
+ { 0, 0, 0, RtemsPartReqDelete_Post_Status_InUse },
+ { 0, 0, 0, RtemsPartReqDelete_Post_Status_Ok }
+};
+
+static const uint8_t
+RtemsPartReqDelete_Map[] = {
+ 0, 0, 1, 2
+};
+
+static size_t RtemsPartReqDelete_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsPartReqDelete_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsPartReqDelete_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsPartReqDelete_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsPartReqDelete_Scope,
+ .initial_context = &RtemsPartReqDelete_Instance
+};
+
+static inline RtemsPartReqDelete_Entry RtemsPartReqDelete_PopEntry(
+ RtemsPartReqDelete_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsPartReqDelete_Entries[
+ RtemsPartReqDelete_Map[ index ]
+ ];
+}
+
+static void RtemsPartReqDelete_TestVariant( RtemsPartReqDelete_Context *ctx )
+{
+ RtemsPartReqDelete_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsPartReqDelete_Pre_InUse_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsPartReqDelete_Action( ctx );
+ RtemsPartReqDelete_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+}
+
+/**
+ * @fn void T_case_body_RtemsPartReqDelete( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsPartReqDelete, &RtemsPartReqDelete_Fixture )
+{
+ RtemsPartReqDelete_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsPartReqDelete_Pre_Id_NoObj;
+ ctx->Map.pcs[ 0 ] < RtemsPartReqDelete_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsPartReqDelete_Pre_InUse_Yes;
+ ctx->Map.pcs[ 1 ] < RtemsPartReqDelete_Pre_InUse_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsPartReqDelete_PopEntry( ctx );
+ RtemsPartReqDelete_Prepare( ctx );
+ RtemsPartReqDelete_TestVariant( ctx );
+ RtemsPartReqDelete_Cleanup( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-part-get.c b/testsuites/validation/tc-part-get.c
new file mode 100644
index 0000000000..3b8d2cc59b
--- /dev/null
+++ b/testsuites/validation/tc-part-get.c
@@ -0,0 +1,526 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsPartReqGetBuffer
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsPartReqGetBuffer spec:/rtems/part/req/get-buffer
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsPartReqGetBuffer_Pre_Id_NoObj,
+ RtemsPartReqGetBuffer_Pre_Id_Part,
+ RtemsPartReqGetBuffer_Pre_Id_NA
+} RtemsPartReqGetBuffer_Pre_Id;
+
+typedef enum {
+ RtemsPartReqGetBuffer_Pre_Buf_Valid,
+ RtemsPartReqGetBuffer_Pre_Buf_Null,
+ RtemsPartReqGetBuffer_Pre_Buf_NA
+} RtemsPartReqGetBuffer_Pre_Buf;
+
+typedef enum {
+ RtemsPartReqGetBuffer_Pre_Avail_Yes,
+ RtemsPartReqGetBuffer_Pre_Avail_No,
+ RtemsPartReqGetBuffer_Pre_Avail_NA
+} RtemsPartReqGetBuffer_Pre_Avail;
+
+typedef enum {
+ RtemsPartReqGetBuffer_Post_Status_Ok,
+ RtemsPartReqGetBuffer_Post_Status_InvId,
+ RtemsPartReqGetBuffer_Post_Status_InvAddr,
+ RtemsPartReqGetBuffer_Post_Status_Unsat,
+ RtemsPartReqGetBuffer_Post_Status_NA
+} RtemsPartReqGetBuffer_Post_Status;
+
+typedef enum {
+ RtemsPartReqGetBuffer_Post_BufVar_Set,
+ RtemsPartReqGetBuffer_Post_BufVar_Nop,
+ RtemsPartReqGetBuffer_Post_BufVar_NA
+} RtemsPartReqGetBuffer_Post_BufVar;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_Buf_NA : 1;
+ uint16_t Pre_Avail_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_BufVar : 2;
+} RtemsPartReqGetBuffer_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/part/req/get-buffer test case.
+ */
+typedef struct {
+ rtems_status_code status;
+
+ rtems_id id;
+
+ rtems_id id_value;
+
+ void **buffer;
+
+ void *buffer_pointer;
+
+ void *stolen_buffer;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsPartReqGetBuffer_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsPartReqGetBuffer_Context;
+
+static RtemsPartReqGetBuffer_Context
+ RtemsPartReqGetBuffer_Instance;
+
+static const char * const RtemsPartReqGetBuffer_PreDesc_Id[] = {
+ "NoObj",
+ "Part",
+ "NA"
+};
+
+static const char * const RtemsPartReqGetBuffer_PreDesc_Buf[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsPartReqGetBuffer_PreDesc_Avail[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsPartReqGetBuffer_PreDesc[] = {
+ RtemsPartReqGetBuffer_PreDesc_Id,
+ RtemsPartReqGetBuffer_PreDesc_Buf,
+ RtemsPartReqGetBuffer_PreDesc_Avail,
+ NULL
+};
+
+#define BUFFER_COUNT 1
+
+#define BUFFER_SIZE ( 2 * sizeof( void * ) )
+
+static RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t
+ buffers[ BUFFER_COUNT ][ BUFFER_SIZE ];
+
+static void RtemsPartReqGetBuffer_Pre_Id_Prepare(
+ RtemsPartReqGetBuffer_Context *ctx,
+ RtemsPartReqGetBuffer_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqGetBuffer_Pre_Id_NoObj: {
+ /*
+ * While the ``id`` parameter is not associated with a partition.
+ */
+ ctx->id = 0xffffffff;
+ break;
+ }
+
+ case RtemsPartReqGetBuffer_Pre_Id_Part: {
+ /*
+ * While the ``id`` parameter is associated with a partition.
+ */
+ ctx->id = ctx->id_value;
+ break;
+ }
+
+ case RtemsPartReqGetBuffer_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqGetBuffer_Pre_Buf_Prepare(
+ RtemsPartReqGetBuffer_Context *ctx,
+ RtemsPartReqGetBuffer_Pre_Buf state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqGetBuffer_Pre_Buf_Valid: {
+ /*
+ * While the ``buffer`` parameter references an object of type ``void
+ * *``.
+ */
+ ctx->buffer = &ctx->buffer_pointer;
+ break;
+ }
+
+ case RtemsPartReqGetBuffer_Pre_Buf_Null: {
+ /*
+ * While the ``buffer`` parameter is NULL.
+ */
+ ctx->buffer = NULL;
+ break;
+ }
+
+ case RtemsPartReqGetBuffer_Pre_Buf_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqGetBuffer_Pre_Avail_Prepare(
+ RtemsPartReqGetBuffer_Context *ctx,
+ RtemsPartReqGetBuffer_Pre_Avail state
+)
+{
+ rtems_status_code sc;
+
+ switch ( state ) {
+ case RtemsPartReqGetBuffer_Pre_Avail_Yes: {
+ /*
+ * While the partition has at least one free buffer available.
+ */
+ /* Nothing to do */
+ break;
+ }
+
+ case RtemsPartReqGetBuffer_Pre_Avail_No: {
+ /*
+ * While the partition does not have a buffer available.
+ */
+ sc = rtems_partition_get_buffer( ctx->id_value, &ctx->stolen_buffer );
+ T_rsc_success( sc );
+ break;
+ }
+
+ case RtemsPartReqGetBuffer_Pre_Avail_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqGetBuffer_Post_Status_Check(
+ RtemsPartReqGetBuffer_Context *ctx,
+ RtemsPartReqGetBuffer_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqGetBuffer_Post_Status_Ok: {
+ /*
+ * The return status of rtems_partition_get_buffer() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ T_eq_ptr( ctx->buffer_pointer, buffers );
+ break;
+ }
+
+ case RtemsPartReqGetBuffer_Post_Status_InvId: {
+ /*
+ * The return status of rtems_partition_get_buffer() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ T_eq_ptr( ctx->buffer_pointer, (void *) (uintptr_t) 1 );
+ break;
+ }
+
+ case RtemsPartReqGetBuffer_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_partition_get_buffer() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsPartReqGetBuffer_Post_Status_Unsat: {
+ /*
+ * The return status of rtems_partition_get_buffer() shall be
+ * RTEMS_UNSATISFIED.
+ */
+ T_rsc( ctx->status, RTEMS_UNSATISFIED );
+ T_eq_ptr( ctx->buffer_pointer, (void *) (uintptr_t) 1 );
+ break;
+ }
+
+ case RtemsPartReqGetBuffer_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqGetBuffer_Post_BufVar_Check(
+ RtemsPartReqGetBuffer_Context *ctx,
+ RtemsPartReqGetBuffer_Post_BufVar state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqGetBuffer_Post_BufVar_Set: {
+ /*
+ * The value of the object referenced by the ``starting_address``
+ * parameter shall be set to the object identifier of the begin address
+ * of the returned buffer after the return of the
+ * rtems_partition_create() call.
+ */
+ T_eq_ptr( ctx->buffer, &ctx->buffer_pointer );
+ T_eq_ptr( ctx->buffer_pointer, buffers );
+ break;
+ }
+
+ case RtemsPartReqGetBuffer_Post_BufVar_Nop: {
+ /*
+ * Objects referenced by the ``buffer`` parameter in past calls to
+ * rtems_partition_get_buffer() shall not be accessed by the
+ * rtems_partition_get_buffer() call.
+ */
+ T_eq_ptr( ctx->buffer_pointer, (void *) (uintptr_t) 1 );
+ break;
+ }
+
+ case RtemsPartReqGetBuffer_Post_BufVar_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqGetBuffer_Setup( RtemsPartReqGetBuffer_Context *ctx )
+{
+ rtems_status_code sc;
+
+ ctx->id_value = 0;
+ sc = rtems_partition_create(
+ rtems_build_name( 'N', 'A', 'M', 'E' ),
+ buffers,
+ sizeof( buffers ),
+ sizeof( buffers[ 0 ] ),
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &ctx->id_value
+ );
+ T_assert_rsc_success( sc );
+}
+
+static void RtemsPartReqGetBuffer_Setup_Wrap( void *arg )
+{
+ RtemsPartReqGetBuffer_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsPartReqGetBuffer_Setup( ctx );
+}
+
+static void RtemsPartReqGetBuffer_Teardown(
+ RtemsPartReqGetBuffer_Context *ctx
+)
+{
+ if ( ctx->id_value != 0 ) {
+ rtems_status_code sc;
+
+ sc = rtems_partition_delete( ctx->id_value );
+ T_rsc_success( sc );
+ }
+}
+
+static void RtemsPartReqGetBuffer_Teardown_Wrap( void *arg )
+{
+ RtemsPartReqGetBuffer_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsPartReqGetBuffer_Teardown( ctx );
+}
+
+static void RtemsPartReqGetBuffer_Prepare( RtemsPartReqGetBuffer_Context *ctx )
+{
+ ctx->buffer_pointer = (void *) (uintptr_t) 1;
+ ctx->stolen_buffer = NULL;
+}
+
+static void RtemsPartReqGetBuffer_Action( RtemsPartReqGetBuffer_Context *ctx )
+{
+ ctx->status = rtems_partition_get_buffer( ctx->id, ctx->buffer );
+}
+
+static void RtemsPartReqGetBuffer_Cleanup( RtemsPartReqGetBuffer_Context *ctx )
+{
+ rtems_status_code sc;
+
+ if ( (uintptr_t) ctx->buffer_pointer != 1 ) {
+ sc = rtems_partition_return_buffer( ctx->id_value, ctx->buffer_pointer );
+ T_rsc_success( sc );
+ }
+
+ if ( ctx->stolen_buffer != NULL ) {
+ sc = rtems_partition_return_buffer( ctx->id_value, ctx->stolen_buffer );
+ T_rsc_success( sc );
+ }
+}
+
+static const RtemsPartReqGetBuffer_Entry
+RtemsPartReqGetBuffer_Entries[] = {
+ { 0, 0, 0, 0, RtemsPartReqGetBuffer_Post_Status_InvAddr,
+ RtemsPartReqGetBuffer_Post_BufVar_Nop },
+ { 0, 0, 0, 0, RtemsPartReqGetBuffer_Post_Status_InvId,
+ RtemsPartReqGetBuffer_Post_BufVar_Nop },
+ { 0, 0, 0, 0, RtemsPartReqGetBuffer_Post_Status_Ok,
+ RtemsPartReqGetBuffer_Post_BufVar_Set },
+ { 0, 0, 0, 0, RtemsPartReqGetBuffer_Post_Status_Unsat,
+ RtemsPartReqGetBuffer_Post_BufVar_Nop }
+};
+
+static const uint8_t
+RtemsPartReqGetBuffer_Map[] = {
+ 1, 1, 0, 0, 2, 3, 0, 0
+};
+
+static size_t RtemsPartReqGetBuffer_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsPartReqGetBuffer_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsPartReqGetBuffer_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsPartReqGetBuffer_Fixture = {
+ .setup = RtemsPartReqGetBuffer_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsPartReqGetBuffer_Teardown_Wrap,
+ .scope = RtemsPartReqGetBuffer_Scope,
+ .initial_context = &RtemsPartReqGetBuffer_Instance
+};
+
+static inline RtemsPartReqGetBuffer_Entry RtemsPartReqGetBuffer_PopEntry(
+ RtemsPartReqGetBuffer_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsPartReqGetBuffer_Entries[
+ RtemsPartReqGetBuffer_Map[ index ]
+ ];
+}
+
+static void RtemsPartReqGetBuffer_TestVariant(
+ RtemsPartReqGetBuffer_Context *ctx
+)
+{
+ RtemsPartReqGetBuffer_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsPartReqGetBuffer_Pre_Buf_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsPartReqGetBuffer_Pre_Avail_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsPartReqGetBuffer_Action( ctx );
+ RtemsPartReqGetBuffer_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsPartReqGetBuffer_Post_BufVar_Check( ctx, ctx->Map.entry.Post_BufVar );
+}
+
+/**
+ * @fn void T_case_body_RtemsPartReqGetBuffer( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsPartReqGetBuffer, &RtemsPartReqGetBuffer_Fixture )
+{
+ RtemsPartReqGetBuffer_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsPartReqGetBuffer_Pre_Id_NoObj;
+ ctx->Map.pcs[ 0 ] < RtemsPartReqGetBuffer_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsPartReqGetBuffer_Pre_Buf_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsPartReqGetBuffer_Pre_Buf_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsPartReqGetBuffer_Pre_Avail_Yes;
+ ctx->Map.pcs[ 2 ] < RtemsPartReqGetBuffer_Pre_Avail_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ ctx->Map.entry = RtemsPartReqGetBuffer_PopEntry( ctx );
+ RtemsPartReqGetBuffer_Prepare( ctx );
+ RtemsPartReqGetBuffer_TestVariant( ctx );
+ RtemsPartReqGetBuffer_Cleanup( ctx );
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-part-ident.c b/testsuites/validation/tc-part-ident.c
new file mode 100644
index 0000000000..40f66d436e
--- /dev/null
+++ b/testsuites/validation/tc-part-ident.c
@@ -0,0 +1,123 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsPartValIdent
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsPartValIdent spec:/rtems/part/val/ident
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Test the rtems_partition_ident() directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API partition
+ * class objects defined by spec:/rtems/req/ident.
+ *
+ * @{
+ */
+
+#define NAME_LOCAL_OBJECT rtems_build_name( 'P', 'A', 'R', 'T' )
+
+static rtems_status_code ClassicPartIdentAction(
+ rtems_name name,
+ uint32_t node,
+ rtems_id *id
+)
+{
+ return rtems_partition_ident( name, node, id );
+}
+
+/**
+ * @brief Run the generic object identification tests for Classic API partition
+ * class objects defined by spec:/rtems/req/ident.
+ */
+static void RtemsPartValIdent_Action_0( void )
+{
+ static RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) long area[32];
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_partition_create(
+ NAME_LOCAL_OBJECT,
+ area,
+ sizeof( area ),
+ sizeof( area ),
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdent_Run(
+ id_local_object,
+ NAME_LOCAL_OBJECT,
+ ClassicPartIdentAction
+ );
+
+ sc = rtems_partition_delete( id_local_object );
+ T_rsc_success( sc );
+}
+
+/**
+ * @fn void T_case_body_RtemsPartValIdent( void )
+ */
+T_TEST_CASE( RtemsPartValIdent )
+{
+ RtemsPartValIdent_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-part-performance.c b/testsuites/validation/tc-part-performance.c
index 5c3148edcc..858dbc0b4b 100644
--- a/testsuites/validation/tc-part-performance.c
+++ b/testsuites/validation/tc-part-performance.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsPartValPerformance
+ * @ingroup RtemsPartValPerf
*/
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -53,24 +53,22 @@
#endif
#include <rtems.h>
-#include <rtems/chain.h>
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsPartValPerformance \
- * spec:/rtems/part/val/performance
+ * @defgroup RtemsPartValPerf spec:/rtems/part/val/perf
*
- * @ingroup RTEMSTestSuiteTestsuitesPerformance0
+ * @ingroup TestsuitesPerformanceNoClock0
*
- * @brief This test case provides a context to run Partition Manager
+ * @brief This test case provides a context to run @ref RTEMSAPIClassicPart
* performance tests.
*
* @{
*/
/**
- * @brief Test context for spec:/rtems/part/val/performance test case.
+ * @brief Test context for spec:/rtems/part/val/perf test case.
*/
typedef struct {
/**
@@ -79,8 +77,7 @@ typedef struct {
rtems_id part_one;
/**
- * @brief This member provides a partition with exactly
- * ${.:/params/buffer-count} free buffers.
+ * @brief This member provides a partition with exactly 100 free buffers.
*/
rtems_id part_many;
@@ -108,20 +105,29 @@ typedef struct {
* @brief This member provides the measure runtime request.
*/
T_measure_runtime_request request;
-} RtemsPartValPerformance_Context;
-static RtemsPartValPerformance_Context
- RtemsPartValPerformance_Instance;
+ /**
+ * @brief This member provides an optional measurement begin time point.
+ */
+ T_ticks begin;
-static void RtemsPartValPerformance_Setup_Context(
- RtemsPartValPerformance_Context *ctx
-)
+ /**
+ * @brief This member provides an optional measurement end time point.
+ */
+ T_ticks end;
+} RtemsPartValPerf_Context;
+
+static RtemsPartValPerf_Context
+ RtemsPartValPerf_Instance;
+
+static void RtemsPartValPerf_Setup_Context( RtemsPartValPerf_Context *ctx )
{
T_measure_runtime_config config;
memset( &config, 0, sizeof( config ) );
- config.sample_count = 1000;
+ config.sample_count = 100;
ctx->request.arg = ctx;
+ ctx->request.flags = T_MEASURE_RUNTIME_REPORT_SAMPLES;
ctx->context = T_measure_runtime_create( &config );
T_assert_not_null( ctx->context );
}
@@ -129,16 +135,14 @@ static void RtemsPartValPerformance_Setup_Context(
/**
* @brief Creates the test partition.
*/
-static void RtemsPartValPerformance_Setup(
- RtemsPartValPerformance_Context *ctx
-)
+static void RtemsPartValPerf_Setup( RtemsPartValPerf_Context *ctx )
{
rtems_status_code sc;
size_t size;
void *area;
uintptr_t length;
- size = sizeof( rtems_chain_node );
+ size = 2 * sizeof( uintptr_t );
area = T_malloc( size );
sc = rtems_partition_create(
@@ -164,21 +168,19 @@ static void RtemsPartValPerformance_Setup(
T_assert_rsc_success( sc );
}
-static void RtemsPartValPerformance_Setup_Wrap( void *arg )
+static void RtemsPartValPerf_Setup_Wrap( void *arg )
{
- RtemsPartValPerformance_Context *ctx;
+ RtemsPartValPerf_Context *ctx;
ctx = arg;
- RtemsPartValPerformance_Setup_Context( ctx );
- RtemsPartValPerformance_Setup( ctx );
+ RtemsPartValPerf_Setup_Context( ctx );
+ RtemsPartValPerf_Setup( ctx );
}
/**
* @brief Deletes the test partition.
*/
-static void RtemsPartValPerformance_Teardown(
- RtemsPartValPerformance_Context *ctx
-)
+static void RtemsPartValPerf_Teardown( RtemsPartValPerf_Context *ctx )
{
rtems_status_code sc;
@@ -193,35 +195,39 @@ static void RtemsPartValPerformance_Teardown(
}
}
-static void RtemsPartValPerformance_Teardown_Wrap( void *arg )
+static void RtemsPartValPerf_Teardown_Wrap( void *arg )
{
- RtemsPartValPerformance_Context *ctx;
+ RtemsPartValPerf_Context *ctx;
ctx = arg;
- RtemsPartValPerformance_Teardown( ctx );
+ RtemsPartValPerf_Teardown( ctx );
}
-static T_fixture RtemsPartValPerformance_Fixture = {
- .setup = RtemsPartValPerformance_Setup_Wrap,
+static T_fixture RtemsPartValPerf_Fixture = {
+ .setup = RtemsPartValPerf_Setup_Wrap,
.stop = NULL,
- .teardown = RtemsPartValPerformance_Teardown_Wrap,
+ .teardown = RtemsPartValPerf_Teardown_Wrap,
.scope = NULL,
- .initial_context = &RtemsPartValPerformance_Instance
+ .initial_context = &RtemsPartValPerf_Instance
};
/**
+ * @defgroup RtemsPartReqPerfGetBuffer spec:/rtems/part/req/perf-get-buffer
+ *
+ * @{
+ */
+
+/**
* @brief Get a buffer.
*/
-static void RtemsPartReqPerfGetBuffer_Body(
- RtemsPartValPerformance_Context *ctx
-)
+static void RtemsPartReqPerfGetBuffer_Body( RtemsPartValPerf_Context *ctx )
{
ctx->status = rtems_partition_get_buffer( ctx->part_many, &ctx->buffer );
}
static void RtemsPartReqPerfGetBuffer_Body_Wrap( void *arg )
{
- RtemsPartValPerformance_Context *ctx;
+ RtemsPartValPerf_Context *ctx;
ctx = arg;
RtemsPartReqPerfGetBuffer_Body( ctx );
@@ -231,11 +237,11 @@ static void RtemsPartReqPerfGetBuffer_Body_Wrap( void *arg )
* @brief Return the buffer.
*/
static bool RtemsPartReqPerfGetBuffer_Teardown(
- RtemsPartValPerformance_Context *ctx,
- T_ticks *delta,
- uint32_t tic,
- uint32_t toc,
- unsigned int retry
+ RtemsPartValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
)
{
rtems_status_code sc;
@@ -256,17 +262,26 @@ static bool RtemsPartReqPerfGetBuffer_Teardown_Wrap(
unsigned int retry
)
{
- RtemsPartValPerformance_Context *ctx;
+ RtemsPartValPerf_Context *ctx;
ctx = arg;
return RtemsPartReqPerfGetBuffer_Teardown( ctx, delta, tic, toc, retry );
}
+/** @} */
+
+/**
+ * @defgroup RtemsPartReqPerfGetNoBuffer \
+ * spec:/rtems/part/req/perf-get-no-buffer
+ *
+ * @{
+ */
+
/**
* @brief Get the buffer.
*/
static void RtemsPartReqPerfGetNoBuffer_Prepare(
- RtemsPartValPerformance_Context *ctx
+ RtemsPartValPerf_Context *ctx
)
{
rtems_status_code sc;
@@ -278,16 +293,14 @@ static void RtemsPartReqPerfGetNoBuffer_Prepare(
/**
* @brief Try to get a buffer.
*/
-static void RtemsPartReqPerfGetNoBuffer_Body(
- RtemsPartValPerformance_Context *ctx
-)
+static void RtemsPartReqPerfGetNoBuffer_Body( RtemsPartValPerf_Context *ctx )
{
ctx->status = rtems_partition_get_buffer( ctx->part_one, &ctx->buffer );
}
static void RtemsPartReqPerfGetNoBuffer_Body_Wrap( void *arg )
{
- RtemsPartValPerformance_Context *ctx;
+ RtemsPartValPerf_Context *ctx;
ctx = arg;
RtemsPartReqPerfGetNoBuffer_Body( ctx );
@@ -297,11 +310,11 @@ static void RtemsPartReqPerfGetNoBuffer_Body_Wrap( void *arg )
* @brief Check the status code.
*/
static bool RtemsPartReqPerfGetNoBuffer_Teardown(
- RtemsPartValPerformance_Context *ctx,
- T_ticks *delta,
- uint32_t tic,
- uint32_t toc,
- unsigned int retry
+ RtemsPartValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
)
{
T_quiet_rsc( ctx->status, RTEMS_UNSATISFIED );
@@ -317,7 +330,7 @@ static bool RtemsPartReqPerfGetNoBuffer_Teardown_Wrap(
unsigned int retry
)
{
- RtemsPartValPerformance_Context *ctx;
+ RtemsPartValPerf_Context *ctx;
ctx = arg;
return RtemsPartReqPerfGetNoBuffer_Teardown( ctx, delta, tic, toc, retry );
@@ -327,7 +340,7 @@ static bool RtemsPartReqPerfGetNoBuffer_Teardown_Wrap(
* @brief Return the buffer.
*/
static void RtemsPartReqPerfGetNoBuffer_Cleanup(
- RtemsPartValPerformance_Context *ctx
+ RtemsPartValPerf_Context *ctx
)
{
rtems_status_code sc;
@@ -336,12 +349,19 @@ static void RtemsPartReqPerfGetNoBuffer_Cleanup(
T_rsc_success( sc );
}
+/** @} */
+
+/**
+ * @defgroup RtemsPartReqPerfReturnBuffer \
+ * spec:/rtems/part/req/perf-return-buffer
+ *
+ * @{
+ */
+
/**
* @brief Get the buffer.
*/
-static void RtemsPartReqPerfReturnBuffer_Setup(
- RtemsPartValPerformance_Context *ctx
-)
+static void RtemsPartReqPerfReturnBuffer_Setup( RtemsPartValPerf_Context *ctx )
{
rtems_status_code sc;
@@ -351,7 +371,7 @@ static void RtemsPartReqPerfReturnBuffer_Setup(
static void RtemsPartReqPerfReturnBuffer_Setup_Wrap( void *arg )
{
- RtemsPartValPerformance_Context *ctx;
+ RtemsPartValPerf_Context *ctx;
ctx = arg;
RtemsPartReqPerfReturnBuffer_Setup( ctx );
@@ -360,16 +380,14 @@ static void RtemsPartReqPerfReturnBuffer_Setup_Wrap( void *arg )
/**
* @brief Return the buffer.
*/
-static void RtemsPartReqPerfReturnBuffer_Body(
- RtemsPartValPerformance_Context *ctx
-)
+static void RtemsPartReqPerfReturnBuffer_Body( RtemsPartValPerf_Context *ctx )
{
ctx->status = rtems_partition_return_buffer( ctx->part_many, ctx->buffer );
}
static void RtemsPartReqPerfReturnBuffer_Body_Wrap( void *arg )
{
- RtemsPartValPerformance_Context *ctx;
+ RtemsPartValPerf_Context *ctx;
ctx = arg;
RtemsPartReqPerfReturnBuffer_Body( ctx );
@@ -379,11 +397,11 @@ static void RtemsPartReqPerfReturnBuffer_Body_Wrap( void *arg )
* @brief Check the status code.
*/
static bool RtemsPartReqPerfReturnBuffer_Teardown(
- RtemsPartValPerformance_Context *ctx,
- T_ticks *delta,
- uint32_t tic,
- uint32_t toc,
- unsigned int retry
+ RtemsPartValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
)
{
T_quiet_rsc( ctx->status, RTEMS_SUCCESSFUL );
@@ -399,21 +417,20 @@ static bool RtemsPartReqPerfReturnBuffer_Teardown_Wrap(
unsigned int retry
)
{
- RtemsPartValPerformance_Context *ctx;
+ RtemsPartValPerf_Context *ctx;
ctx = arg;
return RtemsPartReqPerfReturnBuffer_Teardown( ctx, delta, tic, toc, retry );
}
+/** @} */
+
/**
- * @fn void T_case_body_RtemsPartValPerformance( void )
+ * @fn void T_case_body_RtemsPartValPerf( void )
*/
-T_TEST_CASE_FIXTURE(
- RtemsPartValPerformance,
- &RtemsPartValPerformance_Fixture
-)
+T_TEST_CASE_FIXTURE( RtemsPartValPerf, &RtemsPartValPerf_Fixture )
{
- RtemsPartValPerformance_Context *ctx;
+ RtemsPartValPerf_Context *ctx;
ctx = T_fixture_context();
diff --git a/testsuites/validation/tc-part-return.c b/testsuites/validation/tc-part-return.c
new file mode 100644
index 0000000000..864d916f61
--- /dev/null
+++ b/testsuites/validation/tc-part-return.c
@@ -0,0 +1,486 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsPartReqReturnBuffer
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsPartReqReturnBuffer spec:/rtems/part/req/return-buffer
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsPartReqReturnBuffer_Pre_Id_NoObj,
+ RtemsPartReqReturnBuffer_Pre_Id_Part,
+ RtemsPartReqReturnBuffer_Pre_Id_NA
+} RtemsPartReqReturnBuffer_Pre_Id;
+
+typedef enum {
+ RtemsPartReqReturnBuffer_Pre_Buf_Valid,
+ RtemsPartReqReturnBuffer_Pre_Buf_BadAlign,
+ RtemsPartReqReturnBuffer_Pre_Buf_BelowArea,
+ RtemsPartReqReturnBuffer_Pre_Buf_AboveArea,
+ RtemsPartReqReturnBuffer_Pre_Buf_NA
+} RtemsPartReqReturnBuffer_Pre_Buf;
+
+typedef enum {
+ RtemsPartReqReturnBuffer_Post_Status_Ok,
+ RtemsPartReqReturnBuffer_Post_Status_InvId,
+ RtemsPartReqReturnBuffer_Post_Status_InvAddr,
+ RtemsPartReqReturnBuffer_Post_Status_NA
+} RtemsPartReqReturnBuffer_Post_Status;
+
+typedef enum {
+ RtemsPartReqReturnBuffer_Post_Buf_Free,
+ RtemsPartReqReturnBuffer_Post_Buf_InUse,
+ RtemsPartReqReturnBuffer_Post_Buf_NA
+} RtemsPartReqReturnBuffer_Post_Buf;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Pre_Buf_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_Buf : 2;
+} RtemsPartReqReturnBuffer_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/part/req/return-buffer test case.
+ */
+typedef struct {
+ rtems_status_code status;
+
+ rtems_id id;
+
+ rtems_id id_value;
+
+ void *buffer;
+
+ void *buffer_in_use;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsPartReqReturnBuffer_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsPartReqReturnBuffer_Context;
+
+static RtemsPartReqReturnBuffer_Context
+ RtemsPartReqReturnBuffer_Instance;
+
+static const char * const RtemsPartReqReturnBuffer_PreDesc_Id[] = {
+ "NoObj",
+ "Part",
+ "NA"
+};
+
+static const char * const RtemsPartReqReturnBuffer_PreDesc_Buf[] = {
+ "Valid",
+ "BadAlign",
+ "BelowArea",
+ "AboveArea",
+ "NA"
+};
+
+static const char * const * const RtemsPartReqReturnBuffer_PreDesc[] = {
+ RtemsPartReqReturnBuffer_PreDesc_Id,
+ RtemsPartReqReturnBuffer_PreDesc_Buf,
+ NULL
+};
+
+#define BUFFER_COUNT 1
+
+#define BUFFER_SIZE ( 2 * sizeof( void * ) )
+
+static RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t
+ buffers[ BUFFER_COUNT ][ BUFFER_SIZE ];
+
+static void RtemsPartReqReturnBuffer_Pre_Id_Prepare(
+ RtemsPartReqReturnBuffer_Context *ctx,
+ RtemsPartReqReturnBuffer_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqReturnBuffer_Pre_Id_NoObj: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id = 0xffffffff;
+ break;
+ }
+
+ case RtemsPartReqReturnBuffer_Pre_Id_Part: {
+ /*
+ * While the ``id`` parameter is associated with a partition.
+ */
+ ctx->id = ctx->id_value;
+ break;
+ }
+
+ case RtemsPartReqReturnBuffer_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqReturnBuffer_Pre_Buf_Prepare(
+ RtemsPartReqReturnBuffer_Context *ctx,
+ RtemsPartReqReturnBuffer_Pre_Buf state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqReturnBuffer_Pre_Buf_Valid: {
+ /*
+ * While the ``buffer`` parameter references a buffer previously returned
+ * by rtems_partition_get_buffer().
+ */
+ ctx->buffer = ctx->buffer_in_use;
+ break;
+ }
+
+ case RtemsPartReqReturnBuffer_Pre_Buf_BadAlign: {
+ /*
+ * While the ``buffer`` parameter is an address inside the buffer area of
+ * the partition, while the address is not on a valid buffer boundary.
+ */
+ ctx->buffer = (void *) ( (uintptr_t) ctx->buffer_in_use + 1 );
+ break;
+ }
+
+ case RtemsPartReqReturnBuffer_Pre_Buf_BelowArea: {
+ /*
+ * While the ``buffer`` parameter is an address below the buffer area of
+ * the partition.
+ */
+ ctx->buffer = (void *) ( (uintptr_t) buffers - 1 );
+ break;
+ }
+
+ case RtemsPartReqReturnBuffer_Pre_Buf_AboveArea: {
+ /*
+ * While the ``buffer`` parameter is an address above the buffer area of
+ * the partition.
+ */
+ ctx->buffer = (void *) ( (uintptr_t) buffers + sizeof( buffers ) );
+ break;
+ }
+
+ case RtemsPartReqReturnBuffer_Pre_Buf_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqReturnBuffer_Post_Status_Check(
+ RtemsPartReqReturnBuffer_Context *ctx,
+ RtemsPartReqReturnBuffer_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsPartReqReturnBuffer_Post_Status_Ok: {
+ /*
+ * The return status of rtems_partition_return_buffer() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsPartReqReturnBuffer_Post_Status_InvId: {
+ /*
+ * The return status of rtems_partition_return_buffer() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsPartReqReturnBuffer_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_partition_return_buffer() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsPartReqReturnBuffer_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqReturnBuffer_Post_Buf_Check(
+ RtemsPartReqReturnBuffer_Context *ctx,
+ RtemsPartReqReturnBuffer_Post_Buf state
+)
+{
+ rtems_status_code sc;
+ void *no_buffer;
+
+ switch ( state ) {
+ case RtemsPartReqReturnBuffer_Post_Buf_Free: {
+ /*
+ * The buffer obtained from the partition shall be made available for
+ * re-use by the rtems_partition_return_buffer() call.
+ */
+ sc = rtems_partition_get_buffer( ctx->id_value, &ctx->buffer_in_use );
+ T_rsc_success( sc );
+ T_eq_ptr( ctx->buffer_in_use, buffers );
+ break;
+ }
+
+ case RtemsPartReqReturnBuffer_Post_Buf_InUse: {
+ /*
+ * The buffer obtained from the partition shall be still in use after the
+ * rtems_partition_return_buffer() call.
+ */
+ sc = rtems_partition_get_buffer( ctx->id_value, &no_buffer );
+ T_rsc( sc, RTEMS_UNSATISFIED );
+ break;
+ }
+
+ case RtemsPartReqReturnBuffer_Post_Buf_NA:
+ break;
+ }
+}
+
+static void RtemsPartReqReturnBuffer_Setup(
+ RtemsPartReqReturnBuffer_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ ctx->buffer_in_use = NULL;
+ ctx->id_value = 0;
+
+ sc = rtems_partition_create(
+ rtems_build_name( 'N', 'A', 'M', 'E' ),
+ buffers,
+ sizeof( buffers ),
+ sizeof( buffers[ 0 ] ),
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &ctx->id_value
+ );
+ T_assert_rsc_success( sc );
+
+ sc = rtems_partition_get_buffer( ctx->id_value, &ctx->buffer_in_use );
+ T_assert_rsc_success( sc );
+ T_assert_eq_ptr( ctx->buffer_in_use, buffers );
+}
+
+static void RtemsPartReqReturnBuffer_Setup_Wrap( void *arg )
+{
+ RtemsPartReqReturnBuffer_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsPartReqReturnBuffer_Setup( ctx );
+}
+
+static void RtemsPartReqReturnBuffer_Teardown(
+ RtemsPartReqReturnBuffer_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ if ( ctx->buffer_in_use != NULL ) {
+ sc = rtems_partition_return_buffer( ctx->id_value, ctx->buffer_in_use );
+ T_rsc_success( sc );
+ }
+
+ if ( ctx->id_value != 0 ) {
+ sc = rtems_partition_delete( ctx->id_value );
+ T_rsc_success( sc );
+ }
+}
+
+static void RtemsPartReqReturnBuffer_Teardown_Wrap( void *arg )
+{
+ RtemsPartReqReturnBuffer_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsPartReqReturnBuffer_Teardown( ctx );
+}
+
+static void RtemsPartReqReturnBuffer_Action(
+ RtemsPartReqReturnBuffer_Context *ctx
+)
+{
+ ctx->status = rtems_partition_return_buffer( ctx->id, ctx->buffer );
+}
+
+static const RtemsPartReqReturnBuffer_Entry
+RtemsPartReqReturnBuffer_Entries[] = {
+ { 0, 0, 0, RtemsPartReqReturnBuffer_Post_Status_InvId,
+ RtemsPartReqReturnBuffer_Post_Buf_InUse },
+ { 0, 0, 0, RtemsPartReqReturnBuffer_Post_Status_InvAddr,
+ RtemsPartReqReturnBuffer_Post_Buf_InUse },
+ { 0, 0, 0, RtemsPartReqReturnBuffer_Post_Status_Ok,
+ RtemsPartReqReturnBuffer_Post_Buf_Free }
+};
+
+static const uint8_t
+RtemsPartReqReturnBuffer_Map[] = {
+ 0, 0, 0, 0, 2, 1, 1, 1
+};
+
+static size_t RtemsPartReqReturnBuffer_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsPartReqReturnBuffer_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsPartReqReturnBuffer_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsPartReqReturnBuffer_Fixture = {
+ .setup = RtemsPartReqReturnBuffer_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsPartReqReturnBuffer_Teardown_Wrap,
+ .scope = RtemsPartReqReturnBuffer_Scope,
+ .initial_context = &RtemsPartReqReturnBuffer_Instance
+};
+
+static inline RtemsPartReqReturnBuffer_Entry RtemsPartReqReturnBuffer_PopEntry(
+ RtemsPartReqReturnBuffer_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsPartReqReturnBuffer_Entries[
+ RtemsPartReqReturnBuffer_Map[ index ]
+ ];
+}
+
+static void RtemsPartReqReturnBuffer_TestVariant(
+ RtemsPartReqReturnBuffer_Context *ctx
+)
+{
+ RtemsPartReqReturnBuffer_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsPartReqReturnBuffer_Pre_Buf_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsPartReqReturnBuffer_Action( ctx );
+ RtemsPartReqReturnBuffer_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsPartReqReturnBuffer_Post_Buf_Check( ctx, ctx->Map.entry.Post_Buf );
+}
+
+/**
+ * @fn void T_case_body_RtemsPartReqReturnBuffer( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsPartReqReturnBuffer,
+ &RtemsPartReqReturnBuffer_Fixture
+)
+{
+ RtemsPartReqReturnBuffer_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsPartReqReturnBuffer_Pre_Id_NoObj;
+ ctx->Map.pcs[ 0 ] < RtemsPartReqReturnBuffer_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsPartReqReturnBuffer_Pre_Buf_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsPartReqReturnBuffer_Pre_Buf_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsPartReqReturnBuffer_PopEntry( ctx );
+ RtemsPartReqReturnBuffer_TestVariant( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-part.c b/testsuites/validation/tc-part.c
new file mode 100644
index 0000000000..ad241e975c
--- /dev/null
+++ b/testsuites/validation/tc-part.c
@@ -0,0 +1,196 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsPartValPart
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsPartValPart spec:/rtems/part/val/part
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief This test case collection provides validation test cases for
+ * requirements of the @ref RTEMSAPIClassicPart.
+ *
+ * This test case performs the following actions:
+ *
+ * - Create a partition with a buffer area length which is greater than three
+ * times the buffer size and less than four times the buffer size.
+ *
+ * - Check that exactly three buffers can be obtained from the partition for
+ * use in parallel.
+ *
+ * - Return the three buffers in use to the partition and check that they can
+ * be obtained from the partition for use in parallel in FIFO order.
+ *
+ * - Assert that RTEMS_PARTITION_ALIGNMENT is a constant expression which
+ * evaluates to the expected value.
+ *
+ * @{
+ */
+
+/**
+ * @brief Create a partition with a buffer area length which is greater than
+ * three times the buffer size and less than four times the buffer size.
+ */
+static void RtemsPartValPart_Action_0( void )
+{
+ RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t
+ buffers[ 4 ][ 2 * sizeof( void * ) ];
+ void *pointers[ RTEMS_ARRAY_SIZE( buffers ) ];
+ void *pointer;
+ rtems_status_code sc;
+ rtems_id id;
+
+ id = 0xffffffff;
+ sc = rtems_partition_create(
+ rtems_build_name( 'N', 'A', 'M', 'E' ),
+ buffers,
+ sizeof( buffers ) - 1,
+ sizeof( buffers[ 0 ] ),
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &id
+ );
+ T_step_rsc_success( 0, sc );
+
+ /*
+ * Check that exactly three buffers can be obtained from the partition for
+ * use in parallel.
+ */
+ pointers[ 0 ] = NULL;
+ sc = rtems_partition_get_buffer( id, &pointers[ 0 ] );
+ T_step_rsc_success( 1, sc );
+ T_step_not_null( 2, pointers[ 0 ] );
+
+ pointers[ 1 ] = NULL;
+ sc = rtems_partition_get_buffer( id, &pointers[ 1 ] );
+ T_step_rsc_success( 3, sc );
+ T_step_not_null( 4, pointers[ 1 ] );
+
+ pointers[ 2 ] = NULL;
+ sc = rtems_partition_get_buffer( id, &pointers[ 2 ] );
+ T_step_rsc_success( 5, sc );
+ T_step_not_null( 6, pointers[ 2 ] );
+
+ pointers[ 3 ] = NULL;
+ sc = rtems_partition_get_buffer( id, &pointers[ 3 ] );
+ T_step_rsc( 7, sc, RTEMS_UNSATISFIED );
+ T_step_null( 8, pointers[ 3 ] );
+
+ /*
+ * Return the three buffers in use to the partition and check that they can
+ * be obtained from the partition for use in parallel in FIFO order.
+ */
+ sc = rtems_partition_return_buffer( id, pointers[ 1 ] );
+ T_step_rsc_success( 9, sc );
+
+ sc = rtems_partition_return_buffer( id, pointers[ 2 ] );
+ T_step_rsc_success( 10, sc );
+
+ sc = rtems_partition_return_buffer( id, pointers[ 0 ] );
+ T_step_rsc_success( 11, sc );
+
+ pointer = NULL;
+ sc = rtems_partition_get_buffer( id, &pointer );
+ T_step_rsc_success( 12, sc );
+ T_step_eq_ptr( 13, pointer, pointers[ 1 ] );
+
+ pointer = NULL;
+ sc = rtems_partition_get_buffer( id, &pointer );
+ T_step_rsc_success( 14, sc );
+ T_step_eq_ptr( 15, pointer, pointers[ 2 ] );
+
+ pointer = NULL;
+ sc = rtems_partition_get_buffer( id, &pointer );
+ T_step_rsc_success( 16, sc );
+ T_step_eq_ptr( 17, pointer, pointers[ 0 ] );
+
+ sc = rtems_partition_return_buffer( id, pointers[ 0 ] );
+ T_step_rsc_success( 18, sc );
+
+ sc = rtems_partition_return_buffer( id, pointers[ 1 ] );
+ T_step_rsc_success( 19, sc );
+
+ sc = rtems_partition_return_buffer( id, pointers[ 2 ] );
+ T_step_rsc_success( 20, sc );
+
+ sc = rtems_partition_delete( id );
+ T_step_rsc_success( 21, sc );
+}
+
+/**
+ * @brief Assert that RTEMS_PARTITION_ALIGNMENT is a constant expression which
+ * evaluates to the expected value.
+ */
+static void RtemsPartValPart_Action_1( void )
+{
+ RTEMS_STATIC_ASSERT(
+ RTEMS_PARTITION_ALIGNMENT == CPU_SIZEOF_POINTER,
+ ALIGNMENT
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsPartValPart( void )
+ */
+T_TEST_CASE( RtemsPartValPart )
+{
+ T_plan( 22 );
+
+ RtemsPartValPart_Action_0();
+ RtemsPartValPart_Action_1();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-preinit-array.c b/testsuites/validation/tc-preinit-array.c
new file mode 100644
index 0000000000..244b30b40e
--- /dev/null
+++ b/testsuites/validation/tc-preinit-array.c
@@ -0,0 +1,150 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreThreadValPreinitArray
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreThreadValPreinitArray spec:/score/thread/val/preinit-array
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests the ``.preinit_array`` constructor handling of the C runtime
+ * support.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate the ``.preinit_array`` constructor invocation. Mark that the
+ * test case executed.
+ *
+ * - Check that the ``.preinit_array`` constructor was called exactly once.
+ *
+ * - Check that the ``.preeinit_array`` construction was done by the Classic
+ * API user initialization task.
+ *
+ * - Check that the ``.preinit_array`` constructor was called before the
+ * global constructor invocations.
+ *
+ * @{
+ */
+
+static bool test_case_executed;
+
+static bool constructor_test_case_executed;
+
+static uint32_t counter;
+
+static uint32_t normal_constructor_counter;
+
+static uint32_t constructor_counter;
+
+static uint32_t constructor_calls;
+
+static rtems_id constructor_id;
+
+static __attribute__(( __constructor__ )) void NormalConstructor( void )
+{
+ ++counter;
+ normal_constructor_counter = counter;
+}
+
+static void Constructor( void )
+{
+ constructor_test_case_executed = test_case_executed;
+ ++counter;
+ constructor_counter = counter;
+ ++constructor_calls;
+ constructor_id = rtems_task_self();
+}
+
+static RTEMS_USED RTEMS_SECTION( ".preinit_array" ) void
+ ( * const constructor_registration )( void ) = Constructor;
+
+/**
+ * @brief Validate the ``.preinit_array`` constructor invocation. Mark that
+ * the test case executed.
+ */
+static void ScoreThreadValPreinitArray_Action_0( void )
+{
+ test_case_executed = true;
+
+ /*
+ * Check that the ``.preinit_array`` constructor was called exactly once.
+ */
+ T_eq_u32( constructor_calls, 1 );
+
+ /*
+ * Check that the ``.preeinit_array`` construction was done by the Classic
+ * API user initialization task.
+ */
+ T_eq_u32( constructor_id, rtems_task_self() );
+
+ /*
+ * Check that the ``.preinit_array`` constructor was called before the global
+ * constructor invocations.
+ */
+ T_eq_u32( constructor_counter, 1 );
+ T_eq_u32( normal_constructor_counter, 2 );
+}
+
+/**
+ * @fn void T_case_body_ScoreThreadValPreinitArray( void )
+ */
+T_TEST_CASE( ScoreThreadValPreinitArray )
+{
+ ScoreThreadValPreinitArray_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-ratemon-cancel.c b/testsuites/validation/tc-ratemon-cancel.c
new file mode 100644
index 0000000000..b3683ac338
--- /dev/null
+++ b/testsuites/validation/tc-ratemon-cancel.c
@@ -0,0 +1,882 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsRatemonReqCancel
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsRatemonReqCancel spec:/rtems/ratemon/req/cancel
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationOneCpu0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsRatemonReqCancel_Pre_Id_Valid,
+ RtemsRatemonReqCancel_Pre_Id_Invalid,
+ RtemsRatemonReqCancel_Pre_Id_NA
+} RtemsRatemonReqCancel_Pre_Id;
+
+typedef enum {
+ RtemsRatemonReqCancel_Pre_Caller_OwnerTask,
+ RtemsRatemonReqCancel_Pre_Caller_OtherTask,
+ RtemsRatemonReqCancel_Pre_Caller_NA
+} RtemsRatemonReqCancel_Pre_Caller;
+
+typedef enum {
+ RtemsRatemonReqCancel_Pre_State_Inactive,
+ RtemsRatemonReqCancel_Pre_State_Active,
+ RtemsRatemonReqCancel_Pre_State_Expired,
+ RtemsRatemonReqCancel_Pre_State_NA
+} RtemsRatemonReqCancel_Pre_State;
+
+typedef enum {
+ RtemsRatemonReqCancel_Pre_Postponed_Zero,
+ RtemsRatemonReqCancel_Pre_Postponed_One,
+ RtemsRatemonReqCancel_Pre_Postponed_Several,
+ RtemsRatemonReqCancel_Pre_Postponed_NA
+} RtemsRatemonReqCancel_Pre_Postponed;
+
+typedef enum {
+ RtemsRatemonReqCancel_Post_Status_Ok,
+ RtemsRatemonReqCancel_Post_Status_InvId,
+ RtemsRatemonReqCancel_Post_Status_NotOwn,
+ RtemsRatemonReqCancel_Post_Status_NA
+} RtemsRatemonReqCancel_Post_Status;
+
+typedef enum {
+ RtemsRatemonReqCancel_Post_State_Inactive,
+ RtemsRatemonReqCancel_Post_State_Nop,
+ RtemsRatemonReqCancel_Post_State_NA
+} RtemsRatemonReqCancel_Post_State;
+
+typedef enum {
+ RtemsRatemonReqCancel_Post_Postponed_Zero,
+ RtemsRatemonReqCancel_Post_Postponed_Nop,
+ RtemsRatemonReqCancel_Post_Postponed_NA
+} RtemsRatemonReqCancel_Post_Postponed;
+
+typedef enum {
+ RtemsRatemonReqCancel_Post_Scheduler_Called,
+ RtemsRatemonReqCancel_Post_Scheduler_Nop,
+ RtemsRatemonReqCancel_Post_Scheduler_NA
+} RtemsRatemonReqCancel_Post_Scheduler;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_Caller_NA : 1;
+ uint16_t Pre_State_NA : 1;
+ uint16_t Pre_Postponed_NA : 1;
+ uint16_t Post_Status : 2;
+ uint16_t Post_State : 2;
+ uint16_t Post_Postponed : 2;
+ uint16_t Post_Scheduler : 2;
+} RtemsRatemonReqCancel_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/ratemon/req/cancel test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a valid identifier of a period.
+ */
+ rtems_id period_id;
+
+ /**
+ * @brief This member is used to receive the
+ * rtems_rate_monotonic_period_status after the action.
+ */
+ rtems_rate_monotonic_period_status period_status;
+
+ /**
+ * @brief This member specifies the ``id`` parameter for the action.
+ */
+ rtems_id id_param;
+
+ /**
+ * @brief This member contains the returned status code of the action.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member contains the pointer to the function which executes the
+ * action.
+ *
+ * The action is either executed by the owner task or by the worker task
+ * depending on the function pointer used here. ``argument`` is a pointer to
+ * this context structure.
+ */
+ void ( *do_action )( void *ctx );
+
+ /**
+ * @brief This member contains the task identifier of the owner task.
+ */
+ rtems_id task_id;
+
+ /**
+ * @brief This member contains the task identifier of the worker task (which
+ * is not the owner task).
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member contains a backup of the task priority before the
+ * execution of this test.
+ */
+ rtems_id original_priority;
+
+ /**
+ * @brief This member contains the number of postponed jobs before the
+ * action.
+ */
+ uint32_t postponed_jobs_count;
+
+ /**
+ * @brief This member contains the state before the action.
+ */
+ rtems_rate_monotonic_period_states previous_state;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 4 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 4 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsRatemonReqCancel_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsRatemonReqCancel_Context;
+
+static RtemsRatemonReqCancel_Context
+ RtemsRatemonReqCancel_Instance;
+
+static const char * const RtemsRatemonReqCancel_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqCancel_PreDesc_Caller[] = {
+ "OwnerTask",
+ "OtherTask",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqCancel_PreDesc_State[] = {
+ "Inactive",
+ "Active",
+ "Expired",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqCancel_PreDesc_Postponed[] = {
+ "Zero",
+ "One",
+ "Several",
+ "NA"
+};
+
+static const char * const * const RtemsRatemonReqCancel_PreDesc[] = {
+ RtemsRatemonReqCancel_PreDesc_Id,
+ RtemsRatemonReqCancel_PreDesc_Caller,
+ RtemsRatemonReqCancel_PreDesc_State,
+ RtemsRatemonReqCancel_PreDesc_Postponed,
+ NULL
+};
+
+static const rtems_interval period_length = 5;
+static const rtems_task_priority background_task_priority = 100;
+static const rtems_task_priority foreground_task_priority = 10;
+static const rtems_event_set wake_main_task_event = RTEMS_EVENT_17;
+
+static void TickTheClock(
+ RtemsRatemonReqCancel_Context *ctx,
+ uint32_t ticks
+)
+{
+ uint32_t i;
+ for ( i = 0; i < ticks; ++i ) {
+ TimecounterTick();
+ }
+}
+
+static void Action( void *ctx_in )
+{
+ RtemsRatemonReqCancel_Context *ctx = ctx_in;
+ ctx->status = rtems_rate_monotonic_cancel( ctx->id_param );
+}
+
+static void WorkerTask( rtems_task_argument argument )
+{
+ RtemsRatemonReqCancel_Context *ctx =
+ (RtemsRatemonReqCancel_Context *) argument;
+
+ if ( ctx != NULL ) {
+ Action( ctx );
+ T_rsc_success( rtems_event_send( ctx->task_id, wake_main_task_event ) );
+ }
+
+ T_rsc_success( rtems_task_suspend( RTEMS_SELF ) );
+}
+
+static void WorkerTaskAction( void *ctx_in )
+{
+ rtems_status_code status;
+ rtems_event_set event_set;
+ RtemsRatemonReqCancel_Context *ctx = ctx_in;
+
+ status = rtems_task_restart( ctx->worker_id, (rtems_task_argument) ctx );
+ T_rsc_success( status );
+
+ /* Wait till the worker task finishes */
+ status = rtems_event_receive(
+ wake_main_task_event,
+ RTEMS_DEFAULT_OPTIONS,
+ RTEMS_NO_TIMEOUT,
+ &event_set
+ );
+ T_rsc_success( status );
+}
+
+static void CreatePostponedJobs(
+ RtemsRatemonReqCancel_Context *ctx,
+ uint32_t jobs_count
+)
+{
+ rtems_status_code status;
+ ctx->postponed_jobs_count = jobs_count;
+ if ( ctx->previous_state == RATE_MONOTONIC_ACTIVE ) {
+ TickTheClock( ctx, ( jobs_count + 1 ) * period_length );
+ status = rtems_rate_monotonic_period( ctx->period_id, period_length );
+ T_rsc( status, RTEMS_TIMEOUT );
+ } else {
+ /* ctx->previous_state == RATE_MONOTONIC_INACTIVE || _EXPIRED */
+ TickTheClock( ctx, jobs_count * period_length );
+ }
+}
+
+static void RtemsRatemonReqCancel_Pre_Id_Prepare(
+ RtemsRatemonReqCancel_Context *ctx,
+ RtemsRatemonReqCancel_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqCancel_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is valid.
+ */
+ ctx->id_param = ctx->period_id;
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id_param = RTEMS_ID_NONE;
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCancel_Pre_Caller_Prepare(
+ RtemsRatemonReqCancel_Context *ctx,
+ RtemsRatemonReqCancel_Pre_Caller state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqCancel_Pre_Caller_OwnerTask: {
+ /*
+ * While the task invoking rtems_rate_monotonic_cancel() is the task
+ * which created the period - the owner task.
+ */
+ ctx->do_action = Action;
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Pre_Caller_OtherTask: {
+ /*
+ * While the task invoking rtems_rate_monotonic_cancel() is not the owner
+ * task.
+ */
+ ctx->do_action = WorkerTaskAction;
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Pre_Caller_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCancel_Pre_State_Prepare(
+ RtemsRatemonReqCancel_Context *ctx,
+ RtemsRatemonReqCancel_Pre_State state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqCancel_Pre_State_Inactive: {
+ /*
+ * While the ``id`` parameter references an period object in inactive
+ * state.
+ */
+ /* Nothing to do here as the period is newly created. */
+ ctx->previous_state = RATE_MONOTONIC_INACTIVE;
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Pre_State_Active: {
+ /*
+ * While the ``id`` parameter references an period object in active
+ * state.
+ */
+ rtems_status_code status;
+ status = rtems_rate_monotonic_period( ctx->period_id, period_length );
+ T_rsc_success( status );
+ ctx->previous_state = RATE_MONOTONIC_ACTIVE;
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Pre_State_Expired: {
+ /*
+ * While the ``id`` parameter references an period object in expired
+ * state.
+ */
+ rtems_status_code status;
+ status = rtems_rate_monotonic_period( ctx->period_id, period_length );
+ T_rsc_success( status );
+ ctx->previous_state = RATE_MONOTONIC_EXPIRED;
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Pre_State_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCancel_Pre_Postponed_Prepare(
+ RtemsRatemonReqCancel_Context *ctx,
+ RtemsRatemonReqCancel_Pre_Postponed state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqCancel_Pre_Postponed_Zero: {
+ /*
+ * While the period is not in expired state.
+ */
+ ctx->postponed_jobs_count = 0;
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Pre_Postponed_One: {
+ /*
+ * While there is one postponed job.
+ */
+ CreatePostponedJobs( ctx, 1 );
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Pre_Postponed_Several: {
+ /*
+ * While there are two or more postponed jobs.
+ */
+ CreatePostponedJobs( ctx, 5 );
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Pre_Postponed_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCancel_Post_Status_Check(
+ RtemsRatemonReqCancel_Context *ctx,
+ RtemsRatemonReqCancel_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqCancel_Post_Status_Ok: {
+ /*
+ * The return status of rtems_rate_monotonic_cancel() shall be
+ * RTEMS_SUCCESSFUL
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Post_Status_InvId: {
+ /*
+ * The return status of rtems_rate_monotonic_cancel() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Post_Status_NotOwn: {
+ /*
+ * The return status of rtems_rate_monotonic_cancel() shall be
+ * RTEMS_NOT_OWNER_OF_RESOURCE.
+ */
+ T_rsc( ctx->status, RTEMS_NOT_OWNER_OF_RESOURCE );
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCancel_Post_State_Check(
+ RtemsRatemonReqCancel_Context *ctx,
+ RtemsRatemonReqCancel_Post_State state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqCancel_Post_State_Inactive: {
+ /*
+ * The state of the period shall be inactive after the return of the
+ * rtems_rate_monotonic_cancel() call.
+ */
+ T_eq_int( ctx->period_status.state, RATE_MONOTONIC_INACTIVE );
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Post_State_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_rate_monotonic_cancel() shall not be accessed by the
+ * rtems_rate_monotonic_cancel() call (see also Nop).
+ */
+ T_eq_u32( ctx->period_status.state, ctx->previous_state );
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Post_State_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCancel_Post_Postponed_Check(
+ RtemsRatemonReqCancel_Context *ctx,
+ RtemsRatemonReqCancel_Post_Postponed state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqCancel_Post_Postponed_Zero: {
+ /*
+ * There shall be no postponed jobs after the return of the
+ * rtems_rate_monotonic_cancel() call.
+ */
+ T_eq_u32( ctx->period_status.postponed_jobs_count, 0 );
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Post_Postponed_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_rate_monotonic_cancel() shall not be accessed by the
+ * rtems_rate_monotonic_cancel() call (see also Nop).
+ */
+ T_eq_u32( ctx->period_status.postponed_jobs_count,
+ ctx->postponed_jobs_count );
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Post_Postponed_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCancel_Post_Scheduler_Check(
+ RtemsRatemonReqCancel_Context *ctx,
+ RtemsRatemonReqCancel_Post_Scheduler state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqCancel_Post_Scheduler_Called: {
+ /*
+ * The last call of the rtems_rate_monotonic_cancel() function shall
+ * execute the ``cancel_job`` scheduler operation of the home scheduler.
+ */
+ /* Cannot be tested as the effect is unknown. */
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Post_Scheduler_Nop: {
+ /*
+ * The last call of the rtems_rate_monotonic_cancel() function shall not
+ * execute any scheduler operation.
+ */
+ /* Cannot be tested as the effect is unknown. */
+ break;
+ }
+
+ case RtemsRatemonReqCancel_Post_Scheduler_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCancel_Setup( RtemsRatemonReqCancel_Context *ctx )
+{
+ rtems_status_code status;
+ rtems_task_priority priority;
+ rtems_event_set event_set;
+ ctx->worker_id = RTEMS_INVALID_ID;
+
+ status = rtems_task_ident(
+ RTEMS_SELF,
+ RTEMS_SEARCH_ALL_NODES,
+ &ctx->task_id
+ );
+ T_rsc_success( status );
+
+ status = rtems_task_set_priority(
+ RTEMS_SELF,
+ RTEMS_CURRENT_PRIORITY,
+ &ctx->original_priority
+ );
+ T_rsc_success( status );
+
+ status = rtems_task_set_priority(
+ RTEMS_SELF,
+ background_task_priority,
+ &priority
+ );
+ T_rsc_success( status );
+
+ status = rtems_task_create(
+ rtems_build_name( 'W', 'O', 'R', 'K' ),
+ foreground_task_priority,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &ctx->worker_id
+ );
+ T_rsc_success( status );
+
+ /* Defensive programming: clean away any pending events */
+ status = rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ RTEMS_NO_TIMEOUT,
+ &event_set
+ );
+ T_true( status == RTEMS_SUCCESSFUL || status == RTEMS_UNSATISFIED );
+
+ status = rtems_task_start(
+ ctx->worker_id,
+ WorkerTask,
+ (rtems_task_argument) NULL
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsRatemonReqCancel_Setup_Wrap( void *arg )
+{
+ RtemsRatemonReqCancel_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsRatemonReqCancel_Setup( ctx );
+}
+
+static void RtemsRatemonReqCancel_Teardown(
+ RtemsRatemonReqCancel_Context *ctx
+)
+{
+ rtems_status_code status;
+ rtems_task_priority priority;
+
+ T_rsc_success( rtems_task_delete( ctx->worker_id ) );
+
+ status = rtems_task_set_priority(
+ RTEMS_SELF,
+ ctx->original_priority,
+ &priority
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsRatemonReqCancel_Teardown_Wrap( void *arg )
+{
+ RtemsRatemonReqCancel_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsRatemonReqCancel_Teardown( ctx );
+}
+
+static void RtemsRatemonReqCancel_Prepare( RtemsRatemonReqCancel_Context *ctx )
+{
+ rtems_status_code status;
+ status = rtems_rate_monotonic_create(
+ rtems_build_name( 'R', 'M', 'O', 'N' ),
+ &ctx->period_id
+ );
+ T_rsc_success( status );
+
+ ctx->postponed_jobs_count = 0;
+}
+
+static void RtemsRatemonReqCancel_Action( RtemsRatemonReqCancel_Context *ctx )
+{
+ rtems_status_code status;
+
+ ctx->do_action( ctx );
+
+ status = rtems_rate_monotonic_get_status(
+ ctx->period_id,
+ &ctx->period_status
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsRatemonReqCancel_Cleanup( RtemsRatemonReqCancel_Context *ctx )
+{
+ T_rsc_success( rtems_rate_monotonic_delete( ctx->period_id ) );
+}
+
+static const RtemsRatemonReqCancel_Entry
+RtemsRatemonReqCancel_Entries[] = {
+ { 0, 0, 0, 0, 0, RtemsRatemonReqCancel_Post_Status_InvId,
+ RtemsRatemonReqCancel_Post_State_Nop,
+ RtemsRatemonReqCancel_Post_Postponed_Nop,
+ RtemsRatemonReqCancel_Post_Scheduler_Nop },
+ { 1, 0, 0, 0, 0, RtemsRatemonReqCancel_Post_Status_NA,
+ RtemsRatemonReqCancel_Post_State_NA,
+ RtemsRatemonReqCancel_Post_Postponed_NA,
+ RtemsRatemonReqCancel_Post_Scheduler_NA },
+ { 0, 0, 0, 0, 0, RtemsRatemonReqCancel_Post_Status_Ok,
+ RtemsRatemonReqCancel_Post_State_Inactive,
+ RtemsRatemonReqCancel_Post_Postponed_Zero,
+ RtemsRatemonReqCancel_Post_Scheduler_Called },
+ { 0, 0, 0, 0, 0, RtemsRatemonReqCancel_Post_Status_NotOwn,
+ RtemsRatemonReqCancel_Post_State_Nop,
+ RtemsRatemonReqCancel_Post_Postponed_Nop,
+ RtemsRatemonReqCancel_Post_Scheduler_Nop },
+ { 1, 0, 0, 0, 0, RtemsRatemonReqCancel_Post_Status_NA,
+ RtemsRatemonReqCancel_Post_State_NA,
+ RtemsRatemonReqCancel_Post_Postponed_NA,
+ RtemsRatemonReqCancel_Post_Scheduler_NA },
+ { 0, 0, 0, 0, 1, RtemsRatemonReqCancel_Post_Status_InvId,
+ RtemsRatemonReqCancel_Post_State_Nop,
+ RtemsRatemonReqCancel_Post_Postponed_Nop,
+ RtemsRatemonReqCancel_Post_Scheduler_Nop },
+ { 0, 0, 0, 0, 1, RtemsRatemonReqCancel_Post_Status_Ok,
+ RtemsRatemonReqCancel_Post_State_Inactive,
+ RtemsRatemonReqCancel_Post_Postponed_NA,
+ RtemsRatemonReqCancel_Post_Scheduler_Called },
+ { 0, 0, 0, 0, 1, RtemsRatemonReqCancel_Post_Status_NotOwn,
+ RtemsRatemonReqCancel_Post_State_Nop,
+ RtemsRatemonReqCancel_Post_Postponed_Nop,
+ RtemsRatemonReqCancel_Post_Scheduler_Nop }
+};
+
+static const uint8_t
+RtemsRatemonReqCancel_Map[] = {
+ 6, 1, 1, 2, 2, 2, 4, 2, 2, 7, 1, 1, 3, 3, 3, 4, 3, 3, 5, 1, 1, 0, 0, 0, 4, 0,
+ 0, 5, 1, 1, 0, 0, 0, 4, 0, 0
+};
+
+static size_t RtemsRatemonReqCancel_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsRatemonReqCancel_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsRatemonReqCancel_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsRatemonReqCancel_Fixture = {
+ .setup = RtemsRatemonReqCancel_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsRatemonReqCancel_Teardown_Wrap,
+ .scope = RtemsRatemonReqCancel_Scope,
+ .initial_context = &RtemsRatemonReqCancel_Instance
+};
+
+static inline RtemsRatemonReqCancel_Entry RtemsRatemonReqCancel_PopEntry(
+ RtemsRatemonReqCancel_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsRatemonReqCancel_Entries[
+ RtemsRatemonReqCancel_Map[ index ]
+ ];
+}
+
+static void RtemsRatemonReqCancel_SetPreConditionStates(
+ RtemsRatemonReqCancel_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+
+ if ( ctx->Map.entry.Pre_Postponed_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsRatemonReqCancel_Pre_Postponed_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+}
+
+static void RtemsRatemonReqCancel_TestVariant(
+ RtemsRatemonReqCancel_Context *ctx
+)
+{
+ RtemsRatemonReqCancel_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsRatemonReqCancel_Pre_Caller_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsRatemonReqCancel_Pre_State_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsRatemonReqCancel_Pre_Postponed_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsRatemonReqCancel_Action( ctx );
+ RtemsRatemonReqCancel_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsRatemonReqCancel_Post_State_Check( ctx, ctx->Map.entry.Post_State );
+ RtemsRatemonReqCancel_Post_Postponed_Check(
+ ctx,
+ ctx->Map.entry.Post_Postponed
+ );
+ RtemsRatemonReqCancel_Post_Scheduler_Check(
+ ctx,
+ ctx->Map.entry.Post_Scheduler
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsRatemonReqCancel( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsRatemonReqCancel, &RtemsRatemonReqCancel_Fixture )
+{
+ RtemsRatemonReqCancel_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsRatemonReqCancel_Pre_Id_Valid;
+ ctx->Map.pci[ 0 ] < RtemsRatemonReqCancel_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsRatemonReqCancel_Pre_Caller_OwnerTask;
+ ctx->Map.pci[ 1 ] < RtemsRatemonReqCancel_Pre_Caller_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsRatemonReqCancel_Pre_State_Inactive;
+ ctx->Map.pci[ 2 ] < RtemsRatemonReqCancel_Pre_State_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsRatemonReqCancel_Pre_Postponed_Zero;
+ ctx->Map.pci[ 3 ] < RtemsRatemonReqCancel_Pre_Postponed_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ ctx->Map.entry = RtemsRatemonReqCancel_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsRatemonReqCancel_SetPreConditionStates( ctx );
+ RtemsRatemonReqCancel_Prepare( ctx );
+ RtemsRatemonReqCancel_TestVariant( ctx );
+ RtemsRatemonReqCancel_Cleanup( ctx );
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-ratemon-create.c b/testsuites/validation/tc-ratemon-create.c
new file mode 100644
index 0000000000..ff7672beeb
--- /dev/null
+++ b/testsuites/validation/tc-ratemon-create.c
@@ -0,0 +1,529 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsRatemonReqCreate
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsRatemonReqCreate spec:/rtems/ratemon/req/create
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsRatemonReqCreate_Pre_Name_Valid,
+ RtemsRatemonReqCreate_Pre_Name_Invalid,
+ RtemsRatemonReqCreate_Pre_Name_NA
+} RtemsRatemonReqCreate_Pre_Name;
+
+typedef enum {
+ RtemsRatemonReqCreate_Pre_Id_Valid,
+ RtemsRatemonReqCreate_Pre_Id_Null,
+ RtemsRatemonReqCreate_Pre_Id_NA
+} RtemsRatemonReqCreate_Pre_Id;
+
+typedef enum {
+ RtemsRatemonReqCreate_Pre_Free_Yes,
+ RtemsRatemonReqCreate_Pre_Free_No,
+ RtemsRatemonReqCreate_Pre_Free_NA
+} RtemsRatemonReqCreate_Pre_Free;
+
+typedef enum {
+ RtemsRatemonReqCreate_Post_Status_Ok,
+ RtemsRatemonReqCreate_Post_Status_InvName,
+ RtemsRatemonReqCreate_Post_Status_InvAddr,
+ RtemsRatemonReqCreate_Post_Status_TooMany,
+ RtemsRatemonReqCreate_Post_Status_NA
+} RtemsRatemonReqCreate_Post_Status;
+
+typedef enum {
+ RtemsRatemonReqCreate_Post_Name_Valid,
+ RtemsRatemonReqCreate_Post_Name_Invalid,
+ RtemsRatemonReqCreate_Post_Name_NA
+} RtemsRatemonReqCreate_Post_Name;
+
+typedef enum {
+ RtemsRatemonReqCreate_Post_IdVar_Set,
+ RtemsRatemonReqCreate_Post_IdVar_Nop,
+ RtemsRatemonReqCreate_Post_IdVar_NA
+} RtemsRatemonReqCreate_Post_IdVar;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Name_NA : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_Free_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_Name : 2;
+ uint16_t Post_IdVar : 2;
+} RtemsRatemonReqCreate_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/ratemon/req/create test case.
+ */
+typedef struct {
+ void *seized_objects;
+
+ rtems_id id_value;
+
+ rtems_name name;
+
+ rtems_id *id;
+
+ rtems_status_code status;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsRatemonReqCreate_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsRatemonReqCreate_Context;
+
+static RtemsRatemonReqCreate_Context
+ RtemsRatemonReqCreate_Instance;
+
+static const char * const RtemsRatemonReqCreate_PreDesc_Name[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqCreate_PreDesc_Id[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqCreate_PreDesc_Free[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsRatemonReqCreate_PreDesc[] = {
+ RtemsRatemonReqCreate_PreDesc_Name,
+ RtemsRatemonReqCreate_PreDesc_Id,
+ RtemsRatemonReqCreate_PreDesc_Free,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+static rtems_status_code Create( void *arg, uint32_t *id )
+{
+ return rtems_rate_monotonic_create(
+ rtems_build_name( 'S', 'I', 'Z', 'E' ),
+ id
+ );
+}
+
+static void RtemsRatemonReqCreate_Pre_Name_Prepare(
+ RtemsRatemonReqCreate_Context *ctx,
+ RtemsRatemonReqCreate_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqCreate_Pre_Name_Valid: {
+ /*
+ * While the ``name`` parameter is valid.
+ */
+ ctx->name = NAME;
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Pre_Name_Invalid: {
+ /*
+ * While the ``name`` parameter is invalid.
+ */
+ ctx->name = 0;
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCreate_Pre_Id_Prepare(
+ RtemsRatemonReqCreate_Context *ctx,
+ RtemsRatemonReqCreate_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqCreate_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter references an object of type rtems_id.
+ */
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Pre_Id_Null: {
+ /*
+ * While the ``id`` parameter is NULL.
+ */
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCreate_Pre_Free_Prepare(
+ RtemsRatemonReqCreate_Context *ctx,
+ RtemsRatemonReqCreate_Pre_Free state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqCreate_Pre_Free_Yes: {
+ /*
+ * While the system has at least one inactive period object available.
+ */
+ /* Nothing to do */
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Pre_Free_No: {
+ /*
+ * While the system has no inactive period object available.
+ */
+ ctx->seized_objects = T_seize_objects( Create, NULL );
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Pre_Free_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCreate_Post_Status_Check(
+ RtemsRatemonReqCreate_Context *ctx,
+ RtemsRatemonReqCreate_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqCreate_Post_Status_Ok: {
+ /*
+ * The return status of rtems_rate_monotonic_create() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Post_Status_InvName: {
+ /*
+ * The return status of rtems_rate_monotonic_create() shall be
+ * RTEMS_INVALID_NAME.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_rate_monotonic_create() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Post_Status_TooMany: {
+ /*
+ * The return status of rtems_rate_monotonic_create() shall be
+ * RTEMS_TOO_MANY.
+ */
+ T_rsc( ctx->status, RTEMS_TOO_MANY );
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCreate_Post_Name_Check(
+ RtemsRatemonReqCreate_Context *ctx,
+ RtemsRatemonReqCreate_Post_Name state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ switch ( state ) {
+ case RtemsRatemonReqCreate_Post_Name_Valid: {
+ /*
+ * The unique object name shall identify the period created by the
+ * rtems_rate_monotonic_create() call.
+ */
+ id = 0;
+ sc = rtems_rate_monotonic_ident( NAME, &id );
+ T_rsc_success( sc );
+ T_eq_u32( id, ctx->id_value );
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Post_Name_Invalid: {
+ /*
+ * The unique object name shall not identify a period.
+ */
+ sc = rtems_rate_monotonic_ident( NAME, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Post_Name_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCreate_Post_IdVar_Check(
+ RtemsRatemonReqCreate_Context *ctx,
+ RtemsRatemonReqCreate_Post_IdVar state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqCreate_Post_IdVar_Set: {
+ /*
+ * The value of the object referenced by the ``id`` parameter shall be
+ * set to the object identifier of the created period after the return of
+ * the rtems_rate_monotonic_create() call.
+ */
+ T_eq_ptr( ctx->id, &ctx->id_value );
+ T_ne_u32( ctx->id_value, INVALID_ID );
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Post_IdVar_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_rate_monotonic_create() shall not be accessed by the
+ * rtems_rate_monotonic_create() call.
+ */
+ T_eq_u32( ctx->id_value, INVALID_ID );
+ break;
+ }
+
+ case RtemsRatemonReqCreate_Post_IdVar_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqCreate_Setup( RtemsRatemonReqCreate_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->id_value = INVALID_ID;
+}
+
+static void RtemsRatemonReqCreate_Setup_Wrap( void *arg )
+{
+ RtemsRatemonReqCreate_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsRatemonReqCreate_Setup( ctx );
+}
+
+static void RtemsRatemonReqCreate_Action( RtemsRatemonReqCreate_Context *ctx )
+{
+ ctx->status = rtems_rate_monotonic_create( ctx->name, ctx->id );
+}
+
+static void RtemsRatemonReqCreate_Cleanup( RtemsRatemonReqCreate_Context *ctx )
+{
+ if ( ctx->id_value != INVALID_ID ) {
+ rtems_status_code sc;
+
+ sc = rtems_rate_monotonic_delete( ctx->id_value );
+ T_rsc_success( sc );
+
+ ctx->id_value = INVALID_ID;
+ }
+
+ T_surrender_objects( &ctx->seized_objects, rtems_rate_monotonic_delete );
+}
+
+static const RtemsRatemonReqCreate_Entry
+RtemsRatemonReqCreate_Entries[] = {
+ { 0, 0, 0, 0, RtemsRatemonReqCreate_Post_Status_InvName,
+ RtemsRatemonReqCreate_Post_Name_Invalid,
+ RtemsRatemonReqCreate_Post_IdVar_Nop },
+ { 0, 0, 0, 0, RtemsRatemonReqCreate_Post_Status_InvAddr,
+ RtemsRatemonReqCreate_Post_Name_Invalid,
+ RtemsRatemonReqCreate_Post_IdVar_Nop },
+ { 0, 0, 0, 0, RtemsRatemonReqCreate_Post_Status_Ok,
+ RtemsRatemonReqCreate_Post_Name_Valid, RtemsRatemonReqCreate_Post_IdVar_Set },
+ { 0, 0, 0, 0, RtemsRatemonReqCreate_Post_Status_TooMany,
+ RtemsRatemonReqCreate_Post_Name_Invalid,
+ RtemsRatemonReqCreate_Post_IdVar_Nop }
+};
+
+static const uint8_t
+RtemsRatemonReqCreate_Map[] = {
+ 2, 3, 1, 1, 0, 0, 0, 0
+};
+
+static size_t RtemsRatemonReqCreate_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsRatemonReqCreate_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsRatemonReqCreate_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsRatemonReqCreate_Fixture = {
+ .setup = RtemsRatemonReqCreate_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsRatemonReqCreate_Scope,
+ .initial_context = &RtemsRatemonReqCreate_Instance
+};
+
+static inline RtemsRatemonReqCreate_Entry RtemsRatemonReqCreate_PopEntry(
+ RtemsRatemonReqCreate_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsRatemonReqCreate_Entries[
+ RtemsRatemonReqCreate_Map[ index ]
+ ];
+}
+
+static void RtemsRatemonReqCreate_TestVariant(
+ RtemsRatemonReqCreate_Context *ctx
+)
+{
+ RtemsRatemonReqCreate_Pre_Name_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsRatemonReqCreate_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsRatemonReqCreate_Pre_Free_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsRatemonReqCreate_Action( ctx );
+ RtemsRatemonReqCreate_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsRatemonReqCreate_Post_Name_Check( ctx, ctx->Map.entry.Post_Name );
+ RtemsRatemonReqCreate_Post_IdVar_Check( ctx, ctx->Map.entry.Post_IdVar );
+}
+
+/**
+ * @fn void T_case_body_RtemsRatemonReqCreate( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsRatemonReqCreate, &RtemsRatemonReqCreate_Fixture )
+{
+ RtemsRatemonReqCreate_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsRatemonReqCreate_Pre_Name_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsRatemonReqCreate_Pre_Name_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsRatemonReqCreate_Pre_Id_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsRatemonReqCreate_Pre_Id_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsRatemonReqCreate_Pre_Free_Yes;
+ ctx->Map.pcs[ 2 ] < RtemsRatemonReqCreate_Pre_Free_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ ctx->Map.entry = RtemsRatemonReqCreate_PopEntry( ctx );
+ RtemsRatemonReqCreate_TestVariant( ctx );
+ RtemsRatemonReqCreate_Cleanup( ctx );
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-ratemon-delete.c b/testsuites/validation/tc-ratemon-delete.c
new file mode 100644
index 0000000000..93e863f023
--- /dev/null
+++ b/testsuites/validation/tc-ratemon-delete.c
@@ -0,0 +1,368 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsRatemonReqDelete
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsRatemonReqDelete spec:/rtems/ratemon/req/delete
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsRatemonReqDelete_Pre_Id_NoObj,
+ RtemsRatemonReqDelete_Pre_Id_Period,
+ RtemsRatemonReqDelete_Pre_Id_NA
+} RtemsRatemonReqDelete_Pre_Id;
+
+typedef enum {
+ RtemsRatemonReqDelete_Post_Status_Ok,
+ RtemsRatemonReqDelete_Post_Status_InvId,
+ RtemsRatemonReqDelete_Post_Status_NA
+} RtemsRatemonReqDelete_Post_Status;
+
+typedef enum {
+ RtemsRatemonReqDelete_Post_Name_Valid,
+ RtemsRatemonReqDelete_Post_Name_Invalid,
+ RtemsRatemonReqDelete_Post_Name_NA
+} RtemsRatemonReqDelete_Post_Name;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_Name : 2;
+} RtemsRatemonReqDelete_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/ratemon/req/delete test case.
+ */
+typedef struct {
+ rtems_id period_id;
+
+ rtems_id id;
+
+ rtems_status_code status;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsRatemonReqDelete_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsRatemonReqDelete_Context;
+
+static RtemsRatemonReqDelete_Context
+ RtemsRatemonReqDelete_Instance;
+
+static const char * const RtemsRatemonReqDelete_PreDesc_Id[] = {
+ "NoObj",
+ "Period",
+ "NA"
+};
+
+static const char * const * const RtemsRatemonReqDelete_PreDesc[] = {
+ RtemsRatemonReqDelete_PreDesc_Id,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+static void RtemsRatemonReqDelete_Pre_Id_Prepare(
+ RtemsRatemonReqDelete_Context *ctx,
+ RtemsRatemonReqDelete_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqDelete_Pre_Id_NoObj: {
+ /*
+ * While the ``id`` parameter is not associated with a period.
+ */
+ ctx->id = 0;
+ break;
+ }
+
+ case RtemsRatemonReqDelete_Pre_Id_Period: {
+ /*
+ * While the ``id`` parameter is associated with a period.
+ */
+ ctx->id = ctx->period_id;
+ break;
+ }
+
+ case RtemsRatemonReqDelete_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqDelete_Post_Status_Check(
+ RtemsRatemonReqDelete_Context *ctx,
+ RtemsRatemonReqDelete_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqDelete_Post_Status_Ok: {
+ /*
+ * The return status of rtems_rate_monotonic_delete() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ ctx->period_id = 0;
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsRatemonReqDelete_Post_Status_InvId: {
+ /*
+ * The return status of rtems_rate_monotonic_delete() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsRatemonReqDelete_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqDelete_Post_Name_Check(
+ RtemsRatemonReqDelete_Context *ctx,
+ RtemsRatemonReqDelete_Post_Name state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ switch ( state ) {
+ case RtemsRatemonReqDelete_Post_Name_Valid: {
+ /*
+ * The unique object name shall identify a period.
+ */
+ id = 0;
+ sc = rtems_rate_monotonic_ident( NAME, &id );
+ T_rsc_success( sc );
+ T_eq_u32( id, ctx->period_id );
+ break;
+ }
+
+ case RtemsRatemonReqDelete_Post_Name_Invalid: {
+ /*
+ * The unique object name shall not identify a period.
+ */
+ sc = rtems_rate_monotonic_ident( NAME, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsRatemonReqDelete_Post_Name_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqDelete_Setup( RtemsRatemonReqDelete_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+}
+
+static void RtemsRatemonReqDelete_Setup_Wrap( void *arg )
+{
+ RtemsRatemonReqDelete_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsRatemonReqDelete_Setup( ctx );
+}
+
+static void RtemsRatemonReqDelete_Teardown(
+ RtemsRatemonReqDelete_Context *ctx
+)
+{
+ if ( ctx->period_id != 0 ) {
+ rtems_status_code sc;
+
+ sc = rtems_rate_monotonic_delete( ctx->period_id );
+ T_rsc_success( sc );
+ }
+}
+
+static void RtemsRatemonReqDelete_Teardown_Wrap( void *arg )
+{
+ RtemsRatemonReqDelete_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsRatemonReqDelete_Teardown( ctx );
+}
+
+static void RtemsRatemonReqDelete_Prepare( RtemsRatemonReqDelete_Context *ctx )
+{
+ if ( ctx->period_id == 0 ) {
+ rtems_status_code sc;
+
+ sc = rtems_rate_monotonic_create( NAME, &ctx->period_id );
+ T_rsc_success( sc );
+ }
+}
+
+static void RtemsRatemonReqDelete_Action( RtemsRatemonReqDelete_Context *ctx )
+{
+ ctx->status = rtems_rate_monotonic_delete( ctx->id );
+}
+
+static const RtemsRatemonReqDelete_Entry
+RtemsRatemonReqDelete_Entries[] = {
+ { 0, 0, RtemsRatemonReqDelete_Post_Status_InvId,
+ RtemsRatemonReqDelete_Post_Name_Valid },
+ { 0, 0, RtemsRatemonReqDelete_Post_Status_Ok,
+ RtemsRatemonReqDelete_Post_Name_Invalid }
+};
+
+static const uint8_t
+RtemsRatemonReqDelete_Map[] = {
+ 0, 1
+};
+
+static size_t RtemsRatemonReqDelete_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsRatemonReqDelete_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsRatemonReqDelete_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsRatemonReqDelete_Fixture = {
+ .setup = RtemsRatemonReqDelete_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsRatemonReqDelete_Teardown_Wrap,
+ .scope = RtemsRatemonReqDelete_Scope,
+ .initial_context = &RtemsRatemonReqDelete_Instance
+};
+
+static inline RtemsRatemonReqDelete_Entry RtemsRatemonReqDelete_PopEntry(
+ RtemsRatemonReqDelete_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsRatemonReqDelete_Entries[
+ RtemsRatemonReqDelete_Map[ index ]
+ ];
+}
+
+static void RtemsRatemonReqDelete_TestVariant(
+ RtemsRatemonReqDelete_Context *ctx
+)
+{
+ RtemsRatemonReqDelete_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsRatemonReqDelete_Action( ctx );
+ RtemsRatemonReqDelete_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsRatemonReqDelete_Post_Name_Check( ctx, ctx->Map.entry.Post_Name );
+}
+
+/**
+ * @fn void T_case_body_RtemsRatemonReqDelete( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsRatemonReqDelete, &RtemsRatemonReqDelete_Fixture )
+{
+ RtemsRatemonReqDelete_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsRatemonReqDelete_Pre_Id_NoObj;
+ ctx->Map.pcs[ 0 ] < RtemsRatemonReqDelete_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = RtemsRatemonReqDelete_PopEntry( ctx );
+ RtemsRatemonReqDelete_Prepare( ctx );
+ RtemsRatemonReqDelete_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-ratemon-get-status.c b/testsuites/validation/tc-ratemon-get-status.c
new file mode 100644
index 0000000000..750654e2c9
--- /dev/null
+++ b/testsuites/validation/tc-ratemon-get-status.c
@@ -0,0 +1,1170 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsRatemonReqGetStatus
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/cpuuse.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsRatemonReqGetStatus spec:/rtems/ratemon/req/get-status
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationOneCpu0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsRatemonReqGetStatus_Pre_StatusAddr_Valid,
+ RtemsRatemonReqGetStatus_Pre_StatusAddr_Null,
+ RtemsRatemonReqGetStatus_Pre_StatusAddr_NA
+} RtemsRatemonReqGetStatus_Pre_StatusAddr;
+
+typedef enum {
+ RtemsRatemonReqGetStatus_Pre_Id_Valid,
+ RtemsRatemonReqGetStatus_Pre_Id_Invalid,
+ RtemsRatemonReqGetStatus_Pre_Id_NA
+} RtemsRatemonReqGetStatus_Pre_Id;
+
+typedef enum {
+ RtemsRatemonReqGetStatus_Pre_State_Inactive,
+ RtemsRatemonReqGetStatus_Pre_State_Active,
+ RtemsRatemonReqGetStatus_Pre_State_Expired,
+ RtemsRatemonReqGetStatus_Pre_State_NA
+} RtemsRatemonReqGetStatus_Pre_State;
+
+typedef enum {
+ RtemsRatemonReqGetStatus_Pre_Elapsed_Time,
+ RtemsRatemonReqGetStatus_Pre_Elapsed_NA
+} RtemsRatemonReqGetStatus_Pre_Elapsed;
+
+typedef enum {
+ RtemsRatemonReqGetStatus_Pre_Consumed_CpuTime,
+ RtemsRatemonReqGetStatus_Pre_Consumed_NA
+} RtemsRatemonReqGetStatus_Pre_Consumed;
+
+typedef enum {
+ RtemsRatemonReqGetStatus_Pre_Postponed_Zero,
+ RtemsRatemonReqGetStatus_Pre_Postponed_One,
+ RtemsRatemonReqGetStatus_Pre_Postponed_Several,
+ RtemsRatemonReqGetStatus_Pre_Postponed_NA
+} RtemsRatemonReqGetStatus_Pre_Postponed;
+
+typedef enum {
+ RtemsRatemonReqGetStatus_Post_Status_Ok,
+ RtemsRatemonReqGetStatus_Post_Status_InvAddr,
+ RtemsRatemonReqGetStatus_Post_Status_InvId,
+ RtemsRatemonReqGetStatus_Post_Status_NA
+} RtemsRatemonReqGetStatus_Post_Status;
+
+typedef enum {
+ RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
+ RtemsRatemonReqGetStatus_Post_Owner_Nop,
+ RtemsRatemonReqGetStatus_Post_Owner_NA
+} RtemsRatemonReqGetStatus_Post_Owner;
+
+typedef enum {
+ RtemsRatemonReqGetStatus_Post_State_Inactive,
+ RtemsRatemonReqGetStatus_Post_State_Active,
+ RtemsRatemonReqGetStatus_Post_State_Expired,
+ RtemsRatemonReqGetStatus_Post_State_Nop,
+ RtemsRatemonReqGetStatus_Post_State_NA
+} RtemsRatemonReqGetStatus_Post_State;
+
+typedef enum {
+ RtemsRatemonReqGetStatus_Post_Elapsed_Time,
+ RtemsRatemonReqGetStatus_Post_Elapsed_Zero,
+ RtemsRatemonReqGetStatus_Post_Elapsed_Nop,
+ RtemsRatemonReqGetStatus_Post_Elapsed_NA
+} RtemsRatemonReqGetStatus_Post_Elapsed;
+
+typedef enum {
+ RtemsRatemonReqGetStatus_Post_Consumed_CpuTime,
+ RtemsRatemonReqGetStatus_Post_Consumed_Zero,
+ RtemsRatemonReqGetStatus_Post_Consumed_Nop,
+ RtemsRatemonReqGetStatus_Post_Consumed_NA
+} RtemsRatemonReqGetStatus_Post_Consumed;
+
+typedef enum {
+ RtemsRatemonReqGetStatus_Post_Postponed_Zero,
+ RtemsRatemonReqGetStatus_Post_Postponed_One,
+ RtemsRatemonReqGetStatus_Post_Postponed_Several,
+ RtemsRatemonReqGetStatus_Post_Postponed_Nop,
+ RtemsRatemonReqGetStatus_Post_Postponed_NA
+} RtemsRatemonReqGetStatus_Post_Postponed;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_StatusAddr_NA : 1;
+ uint32_t Pre_Id_NA : 1;
+ uint32_t Pre_State_NA : 1;
+ uint32_t Pre_Elapsed_NA : 1;
+ uint32_t Pre_Consumed_NA : 1;
+ uint32_t Pre_Postponed_NA : 1;
+ uint32_t Post_Status : 2;
+ uint32_t Post_Owner : 2;
+ uint32_t Post_State : 3;
+ uint32_t Post_Elapsed : 2;
+ uint32_t Post_Consumed : 2;
+ uint32_t Post_Postponed : 3;
+} RtemsRatemonReqGetStatus_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/ratemon/req/get-status test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a valid identifier of a period.
+ */
+ rtems_id period_id;
+
+ /**
+ * @brief This member contains the previous timecounter handler to restore.
+ */
+ GetTimecountHandler previous_timecounter_handler;
+
+ /**
+ * @brief This member is used to receive the
+ * rtems_rate_monotonic_period_status from the action.
+ */
+ rtems_rate_monotonic_period_status period_status;
+
+ /**
+ * @brief This member specifies the ``id`` parameter for the action.
+ */
+ rtems_id id_param;
+
+ /**
+ * @brief This member specifies the ``status`` parameter for the action.
+ */
+ rtems_rate_monotonic_period_status *status_param;
+
+ /**
+ * @brief This member contains the returned status code of the action.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member contains the task identifier of the owner task.
+ */
+ rtems_id task_id;
+
+ /**
+ * @brief This member contains the state before the action.
+ */
+ rtems_rate_monotonic_period_states previous_state;
+
+ /**
+ * @brief If the rtems_cpu_usage_reset() directive should be called before
+ * rtems_rate_monotonic_get_status(), this member contains a pointer to it.
+ */
+ void (*do_reset)( void );
+
+ /**
+ * @brief This member contains the CLOCK_MONOTONIC time elapsed.
+ */
+ struct timespec elapsed;
+
+ /**
+ * @brief This member contains the CPU time consumed by the owner task.
+ */
+ struct timespec consumed;
+
+ /**
+ * @brief This member contains the number of postponed jobs.
+ */
+ uint32_t postponed_jobs_count;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 6 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 6 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsRatemonReqGetStatus_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsRatemonReqGetStatus_Context;
+
+static RtemsRatemonReqGetStatus_Context
+ RtemsRatemonReqGetStatus_Instance;
+
+static const char * const RtemsRatemonReqGetStatus_PreDesc_StatusAddr[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqGetStatus_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqGetStatus_PreDesc_State[] = {
+ "Inactive",
+ "Active",
+ "Expired",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqGetStatus_PreDesc_Elapsed[] = {
+ "Time",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqGetStatus_PreDesc_Consumed[] = {
+ "CpuTime",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqGetStatus_PreDesc_Postponed[] = {
+ "Zero",
+ "One",
+ "Several",
+ "NA"
+};
+
+static const char * const * const RtemsRatemonReqGetStatus_PreDesc[] = {
+ RtemsRatemonReqGetStatus_PreDesc_StatusAddr,
+ RtemsRatemonReqGetStatus_PreDesc_Id,
+ RtemsRatemonReqGetStatus_PreDesc_State,
+ RtemsRatemonReqGetStatus_PreDesc_Elapsed,
+ RtemsRatemonReqGetStatus_PreDesc_Consumed,
+ RtemsRatemonReqGetStatus_PreDesc_Postponed,
+ NULL
+};
+
+static const rtems_id initial_owner = 0xFFFFFFFF;
+static const rtems_rate_monotonic_period_states initial_state =
+ (rtems_rate_monotonic_period_states) 0xFFFFFFFF;
+static const struct timespec initial_period = { 0xFFFFFFFF, 0xFFFFFFFF };
+static const uint32_t initial_postponed_jobs_count = 0xFFFFFFFF;
+static const rtems_interval period_length = 5;
+static const uint32_t elapsed_cpu_ticks = 3;
+
+static uint32_t FreezeTime( void )
+{
+ return GetTimecountCounter() - 1;
+}
+
+static void TickTheClock(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ uint32_t ticks
+)
+{
+ uint32_t i;
+ for ( i = 0; i < ticks; ++i ) {
+ TimecounterTick();
+ }
+ ctx->elapsed.tv_nsec +=
+ rtems_configuration_get_nanoseconds_per_tick() * ticks;
+}
+
+static void CreatePostponedJobs(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ uint32_t jobs_count
+)
+{
+ rtems_status_code status;
+ ctx->postponed_jobs_count = jobs_count;
+ if ( ctx->previous_state == RATE_MONOTONIC_ACTIVE ) {
+ jobs_count++;
+ TickTheClock( ctx, jobs_count * period_length );
+ status = rtems_rate_monotonic_period( ctx->period_id, period_length );
+ T_rsc( status, RTEMS_TIMEOUT );
+ } else {
+ /* ctx->previous_state == RATE_MONOTONIC_INACTIVE || _EXPIRED */
+ TickTheClock( ctx, jobs_count * period_length );
+ }
+ ctx->consumed.tv_nsec +=
+ rtems_configuration_get_nanoseconds_per_tick() *
+ jobs_count * period_length;
+}
+
+static void RtemsRatemonReqGetStatus_Pre_StatusAddr_Prepare(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ RtemsRatemonReqGetStatus_Pre_StatusAddr state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqGetStatus_Pre_StatusAddr_Valid: {
+ /*
+ * While the ``status`` parameter references an object of type
+ * rtems_rate_monotonic_period_status.
+ */
+ ctx->status_param = &ctx->period_status;
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Pre_StatusAddr_Null: {
+ /*
+ * While the ``status`` parameter is NULL.
+ */
+ ctx->status_param = NULL;
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Pre_StatusAddr_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqGetStatus_Pre_Id_Prepare(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ RtemsRatemonReqGetStatus_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqGetStatus_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is valid.
+ */
+ ctx->id_param = ctx->period_id;
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id_param = RTEMS_ID_NONE;
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqGetStatus_Pre_State_Prepare(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ RtemsRatemonReqGetStatus_Pre_State state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqGetStatus_Pre_State_Inactive: {
+ /*
+ * While the ``id`` parameter references an period object in inactive
+ * state.
+ */
+ /* Nothing to do here as the period is newly created. */
+ ctx->previous_state = RATE_MONOTONIC_INACTIVE;
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Pre_State_Active: {
+ /*
+ * While the ``id`` parameter references an period object in active
+ * state.
+ */
+ rtems_status_code status;
+ status = rtems_rate_monotonic_period( ctx->period_id, period_length );
+ T_rsc_success( status );
+ ctx->previous_state = RATE_MONOTONIC_ACTIVE;
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Pre_State_Expired: {
+ /*
+ * While the ``id`` parameter references an period object in expired
+ * state.
+ */
+ rtems_status_code status;
+ status = rtems_rate_monotonic_period( ctx->period_id, period_length );
+ T_rsc_success( status );
+ ctx->previous_state = RATE_MONOTONIC_EXPIRED;
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Pre_State_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqGetStatus_Pre_Elapsed_Prepare(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ RtemsRatemonReqGetStatus_Pre_Elapsed state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqGetStatus_Pre_Elapsed_Time: {
+ /*
+ * While a certain time of the CLOCK_MONOTONIC has elapsed.
+ */
+ /* Time elapsed while having a CPU is added below in "CpuTime". */
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Pre_Elapsed_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqGetStatus_Pre_Consumed_Prepare(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ RtemsRatemonReqGetStatus_Pre_Consumed state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqGetStatus_Pre_Consumed_CpuTime: {
+ /*
+ * While the owner task has consumed a certain amount of CPU time.
+ */
+ TickTheClock( ctx, elapsed_cpu_ticks );
+ ctx->consumed.tv_nsec +=
+ rtems_configuration_get_nanoseconds_per_tick() * elapsed_cpu_ticks;
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Pre_Consumed_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqGetStatus_Pre_Postponed_Prepare(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ RtemsRatemonReqGetStatus_Pre_Postponed state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqGetStatus_Pre_Postponed_Zero: {
+ /*
+ * While the period is not in expired state.
+ */
+ ctx->postponed_jobs_count = 0;
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Pre_Postponed_One: {
+ /*
+ * While there is one postponed job.
+ */
+ CreatePostponedJobs( ctx, 1 );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Pre_Postponed_Several: {
+ /*
+ * While there are two or more postponed job.
+ */
+ CreatePostponedJobs( ctx, 5 );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Pre_Postponed_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqGetStatus_Post_Status_Check(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ RtemsRatemonReqGetStatus_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqGetStatus_Post_Status_Ok: {
+ /*
+ * The return status of rtems_rate_monotonic_get_status() shall be
+ * RTEMS_SUCCESSFUL
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_rate_monotonic_get_status() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Status_InvId: {
+ /*
+ * The return status of rtems_rate_monotonic_get_status() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqGetStatus_Post_Owner_Check(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ RtemsRatemonReqGetStatus_Post_Owner state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqGetStatus_Post_Owner_OwnerTask: {
+ /*
+ * The value of the member owner of the object referenced by the
+ * ``status`` parameter shall be set to the object identifier of the
+ * owner task of the period after the return of the
+ * rtems_rate_monotonic_get_status() call.
+ */
+ T_eq_u32( ctx->period_status.owner, ctx->task_id );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Owner_Nop: {
+ /*
+ * Objects referenced by the ``status`` parameter in past call to
+ * rtems_rate_monotonic_get_status() shall not be accessed by the
+ * rtems_rate_monotonic_get_status() call (see also Nop).
+ */
+ T_eq_u32( ctx->period_status.owner, initial_owner );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Owner_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqGetStatus_Post_State_Check(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ RtemsRatemonReqGetStatus_Post_State state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqGetStatus_Post_State_Inactive: {
+ /*
+ * The value of the member state of the object referenced by the
+ * ``status`` parameter shall be set to RATE_MONOTONIC_INACTIVE after the
+ * return of the rtems_rate_monotonic_get_status() call. (See also
+ * inactive)
+ */
+ T_eq_int( ctx->period_status.state, RATE_MONOTONIC_INACTIVE );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_State_Active: {
+ /*
+ * The value of the member state of the object referenced by the
+ * ``status`` parameter shall be set to RATE_MONOTONIC_ACTIVE after the
+ * return of the rtems_rate_monotonic_get_status() call. (See also
+ * active)
+ */
+ T_eq_int( ctx->period_status.state, RATE_MONOTONIC_ACTIVE );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_State_Expired: {
+ /*
+ * The value of the member state of the object referenced by the
+ * ``status`` parameter shall be set to RATE_MONOTONIC_EXPIRED after the
+ * return of the rtems_rate_monotonic_get_status() call. (See also
+ * expired)
+ */
+ T_eq_int( ctx->period_status.state, RATE_MONOTONIC_EXPIRED );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_State_Nop: {
+ /*
+ * Objects referenced by the ``status`` parameter in past calls to
+ * rtems_rate_monotonic_get_status() shall not be accessed by the
+ * rtems_rate_monotonic_get_status() call (see also Nop).
+ */
+ T_eq_u32( ctx->period_status.state, initial_state );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_State_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqGetStatus_Post_Elapsed_Check(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ RtemsRatemonReqGetStatus_Post_Elapsed state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqGetStatus_Post_Elapsed_Time: {
+ /*
+ * The value of the member since_last_period of the object referenced by
+ * the ``status`` parameter shall be set to the time elapsed.
+ */
+ T_log( T_VERBOSE, "Elapsed: %lld.%ld (expected: %lld.%ld)",
+ ctx->period_status.since_last_period.tv_sec,
+ ctx->period_status.since_last_period.tv_nsec,
+ ctx->elapsed.tv_sec,
+ ctx->elapsed.tv_nsec
+ );
+ T_eq_u64(
+ ctx->period_status.since_last_period.tv_sec,
+ ctx->elapsed.tv_sec
+ );
+ /* period_status integer arithmetic is plagued by a rounding error. */
+ T_le_long(
+ ctx->period_status.since_last_period.tv_nsec,
+ ctx->elapsed.tv_nsec + 1
+ );
+ T_ge_long(
+ ctx->period_status.since_last_period.tv_nsec,
+ ctx->elapsed.tv_nsec - 1
+ );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Elapsed_Zero: {
+ /*
+ * The value of the member since_last_period of the object referenced by
+ * the ``status`` parameter shall be set to 0.
+ */
+ T_eq_u64( ctx->period_status.since_last_period.tv_sec, 0 );
+ T_eq_long( ctx->period_status.since_last_period.tv_nsec, 0 );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Elapsed_Nop: {
+ /*
+ * Objects referenced by the ``status`` parameter in past calls to
+ * rtems_rate_monotonic_get_status() shall not be accessed by the
+ * rtems_rate_monotonic_get_status() call (see also Nop).
+ */
+ T_eq_u64(
+ ctx->period_status.since_last_period.tv_sec,
+ initial_period.tv_sec
+ );
+ T_eq_long(
+ ctx->period_status.since_last_period.tv_nsec,
+ initial_period.tv_nsec
+ );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Elapsed_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqGetStatus_Post_Consumed_Check(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ RtemsRatemonReqGetStatus_Post_Consumed state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqGetStatus_Post_Consumed_CpuTime: {
+ /*
+ * The value of the member executed_since_last_period of the object
+ * referenced by the ``status`` parameter shall be set to the CPU time
+ * consumed by the owner task.
+ */
+ T_log( T_VERBOSE, "CPU elapsed: %lld.%ld (expected: %lld.%ld)",
+ ctx->period_status.executed_since_last_period.tv_sec,
+ ctx->period_status.executed_since_last_period.tv_nsec,
+ ctx->consumed.tv_sec,
+ ctx->consumed.tv_nsec
+ );
+ T_eq_u64(
+ ctx->period_status.executed_since_last_period.tv_sec,
+ ctx->consumed.tv_sec
+ );
+ /* period_status integer arithmetic is plagued by a rounding error. */
+ T_le_long(
+ ctx->period_status.executed_since_last_period.tv_nsec,
+ ctx->consumed.tv_nsec + 1
+ );
+ T_ge_long(
+ ctx->period_status.executed_since_last_period.tv_nsec,
+ ctx->consumed.tv_nsec - 1
+ );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Consumed_Zero: {
+ /*
+ * The value of the member since_last_period of the object referenced by
+ * the ``status`` parameter shall be set to 0.
+ */
+ T_eq_u64( ctx->period_status.executed_since_last_period.tv_sec, 0 );
+ T_eq_long( ctx->period_status.executed_since_last_period.tv_nsec, 0 );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Consumed_Nop: {
+ /*
+ * Objects referenced by the ``status`` parameter in past calls to
+ * rtems_rate_monotonic_get_status() shall not be accessed by the
+ * rtems_rate_monotonic_get_status() call (see also Nop).
+ */
+ T_eq_u64(
+ ctx->period_status.executed_since_last_period.tv_sec,
+ initial_period.tv_sec
+ );
+ T_eq_long(
+ ctx->period_status.executed_since_last_period.tv_nsec,
+ initial_period.tv_nsec
+ );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Consumed_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqGetStatus_Post_Postponed_Check(
+ RtemsRatemonReqGetStatus_Context *ctx,
+ RtemsRatemonReqGetStatus_Post_Postponed state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqGetStatus_Post_Postponed_Zero: {
+ /*
+ * The value of the member postponed_jobs_count of the object referenced
+ * by the ``status`` parameter shall be set to 0 after the return of the
+ * rtems_rate_monotonic_get_status() call.
+ */
+ T_eq_u32( ctx->period_status.postponed_jobs_count, 0 );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Postponed_One: {
+ /*
+ * The value of the member postponed_jobs_count of the object referenced
+ * by the ``status`` parameter shall be set to the number of postponed
+ * jobs (here 1) after the return of the
+ * rtems_rate_monotonic_get_status() call.
+ */
+ T_eq_u32( ctx->period_status.postponed_jobs_count, 1 );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Postponed_Several: {
+ /*
+ * The value of the member postponed_jobs_count of the object referenced
+ * by the ``status`` parameter shall be set to the number of postponed
+ * jobs after the return of the rtems_rate_monotonic_get_status() call.
+ */
+ T_eq_u32(
+ ctx->period_status.postponed_jobs_count,
+ ctx->postponed_jobs_count
+ );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Postponed_Nop: {
+ /*
+ * Objects referenced by the ``status`` parameter in past calls to
+ * rtems_rate_monotonic_get_status() shall not be accessed by the
+ * rtems_rate_monotonic_get_status() call (see also Nop).
+ */
+ T_eq_u32( ctx->period_status.postponed_jobs_count,
+ initial_postponed_jobs_count );
+ break;
+ }
+
+ case RtemsRatemonReqGetStatus_Post_Postponed_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqGetStatus_Setup(
+ RtemsRatemonReqGetStatus_Context *ctx
+)
+{
+ ctx->previous_timecounter_handler = SetGetTimecountHandler( FreezeTime );
+ ctx->task_id = rtems_task_self();
+}
+
+static void RtemsRatemonReqGetStatus_Setup_Wrap( void *arg )
+{
+ RtemsRatemonReqGetStatus_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsRatemonReqGetStatus_Setup( ctx );
+}
+
+static void RtemsRatemonReqGetStatus_Teardown(
+ RtemsRatemonReqGetStatus_Context *ctx
+)
+{
+ SetGetTimecountHandler( ctx->previous_timecounter_handler );
+}
+
+static void RtemsRatemonReqGetStatus_Teardown_Wrap( void *arg )
+{
+ RtemsRatemonReqGetStatus_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsRatemonReqGetStatus_Teardown( ctx );
+}
+
+static void RtemsRatemonReqGetStatus_Prepare(
+ RtemsRatemonReqGetStatus_Context *ctx
+)
+{
+ rtems_status_code status;
+ status = rtems_rate_monotonic_create(
+ rtems_build_name( 'R', 'M', 'O', 'N' ),
+ &ctx->period_id
+ );
+ T_rsc_success( status );
+
+ ctx->period_status = (rtems_rate_monotonic_period_status) {
+ .owner = initial_owner,
+ .state = initial_state,
+ .since_last_period = initial_period,
+ .executed_since_last_period = initial_period,
+ .postponed_jobs_count = initial_postponed_jobs_count
+ };
+
+ ctx->elapsed.tv_sec = 0;
+ ctx->elapsed.tv_nsec = 0;
+ ctx->consumed.tv_sec = 0;
+ ctx->consumed.tv_nsec = 0;
+ ctx->postponed_jobs_count = 0;
+ TimecounterTick();
+}
+
+static void RtemsRatemonReqGetStatus_Action(
+ RtemsRatemonReqGetStatus_Context *ctx
+)
+{
+ if ( ctx->do_reset != NULL ) {
+ ctx->do_reset();
+ }
+ ctx->status = rtems_rate_monotonic_get_status(
+ ctx->id_param,
+ ctx->status_param
+ );
+}
+
+static void RtemsRatemonReqGetStatus_Cleanup(
+ RtemsRatemonReqGetStatus_Context *ctx
+)
+{
+ T_rsc_success( rtems_rate_monotonic_delete( ctx->period_id ) );
+}
+
+static const RtemsRatemonReqGetStatus_Entry
+RtemsRatemonReqGetStatus_Entries[] = {
+ { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_InvAddr,
+ RtemsRatemonReqGetStatus_Post_Owner_Nop,
+ RtemsRatemonReqGetStatus_Post_State_Nop,
+ RtemsRatemonReqGetStatus_Post_Elapsed_Nop,
+ RtemsRatemonReqGetStatus_Post_Consumed_Nop,
+ RtemsRatemonReqGetStatus_Post_Postponed_Nop },
+ { 1, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_NA,
+ RtemsRatemonReqGetStatus_Post_Owner_NA,
+ RtemsRatemonReqGetStatus_Post_State_NA,
+ RtemsRatemonReqGetStatus_Post_Elapsed_NA,
+ RtemsRatemonReqGetStatus_Post_Consumed_NA,
+ RtemsRatemonReqGetStatus_Post_Postponed_NA },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_InvId,
+ RtemsRatemonReqGetStatus_Post_Owner_Nop,
+ RtemsRatemonReqGetStatus_Post_State_Nop,
+ RtemsRatemonReqGetStatus_Post_Elapsed_Nop,
+ RtemsRatemonReqGetStatus_Post_Consumed_Nop,
+ RtemsRatemonReqGetStatus_Post_Postponed_Nop },
+ { 1, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_NA,
+ RtemsRatemonReqGetStatus_Post_Owner_NA,
+ RtemsRatemonReqGetStatus_Post_State_NA,
+ RtemsRatemonReqGetStatus_Post_Elapsed_NA,
+ RtemsRatemonReqGetStatus_Post_Consumed_NA,
+ RtemsRatemonReqGetStatus_Post_Postponed_NA },
+ { 0, 0, 0, 0, 0, 0, 1, RtemsRatemonReqGetStatus_Post_Status_InvAddr,
+ RtemsRatemonReqGetStatus_Post_Owner_Nop,
+ RtemsRatemonReqGetStatus_Post_State_Nop,
+ RtemsRatemonReqGetStatus_Post_Elapsed_Nop,
+ RtemsRatemonReqGetStatus_Post_Consumed_Nop,
+ RtemsRatemonReqGetStatus_Post_Postponed_Nop },
+ { 0, 0, 0, 0, 1, 1, 1, RtemsRatemonReqGetStatus_Post_Status_Ok,
+ RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
+ RtemsRatemonReqGetStatus_Post_State_Inactive,
+ RtemsRatemonReqGetStatus_Post_Elapsed_Zero,
+ RtemsRatemonReqGetStatus_Post_Consumed_Zero,
+ RtemsRatemonReqGetStatus_Post_Postponed_NA },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_Ok,
+ RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
+ RtemsRatemonReqGetStatus_Post_State_Active,
+ RtemsRatemonReqGetStatus_Post_Elapsed_Time,
+ RtemsRatemonReqGetStatus_Post_Consumed_CpuTime,
+ RtemsRatemonReqGetStatus_Post_Postponed_Zero },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_Ok,
+ RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
+ RtemsRatemonReqGetStatus_Post_State_Active,
+ RtemsRatemonReqGetStatus_Post_Elapsed_Time,
+ RtemsRatemonReqGetStatus_Post_Consumed_CpuTime,
+ RtemsRatemonReqGetStatus_Post_Postponed_One },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_Ok,
+ RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
+ RtemsRatemonReqGetStatus_Post_State_Active,
+ RtemsRatemonReqGetStatus_Post_Elapsed_Time,
+ RtemsRatemonReqGetStatus_Post_Consumed_CpuTime,
+ RtemsRatemonReqGetStatus_Post_Postponed_Several },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_Ok,
+ RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
+ RtemsRatemonReqGetStatus_Post_State_Expired,
+ RtemsRatemonReqGetStatus_Post_Elapsed_Time,
+ RtemsRatemonReqGetStatus_Post_Consumed_CpuTime,
+ RtemsRatemonReqGetStatus_Post_Postponed_One },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_Ok,
+ RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
+ RtemsRatemonReqGetStatus_Post_State_Expired,
+ RtemsRatemonReqGetStatus_Post_Elapsed_Time,
+ RtemsRatemonReqGetStatus_Post_Consumed_CpuTime,
+ RtemsRatemonReqGetStatus_Post_Postponed_Several },
+ { 0, 0, 0, 0, 0, 0, 1, RtemsRatemonReqGetStatus_Post_Status_InvId,
+ RtemsRatemonReqGetStatus_Post_Owner_Nop,
+ RtemsRatemonReqGetStatus_Post_State_Nop,
+ RtemsRatemonReqGetStatus_Post_Elapsed_Nop,
+ RtemsRatemonReqGetStatus_Post_Consumed_Nop,
+ RtemsRatemonReqGetStatus_Post_Postponed_Nop }
+};
+
+static const uint8_t
+RtemsRatemonReqGetStatus_Map[] = {
+ 5, 1, 1, 6, 7, 8, 3, 9, 10, 11, 1, 1, 2, 2, 2, 3, 2, 2, 4, 1, 1, 0, 0, 0, 3,
+ 0, 0, 4, 1, 1, 0, 0, 0, 3, 0, 0
+};
+
+static size_t RtemsRatemonReqGetStatus_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsRatemonReqGetStatus_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsRatemonReqGetStatus_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsRatemonReqGetStatus_Fixture = {
+ .setup = RtemsRatemonReqGetStatus_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsRatemonReqGetStatus_Teardown_Wrap,
+ .scope = RtemsRatemonReqGetStatus_Scope,
+ .initial_context = &RtemsRatemonReqGetStatus_Instance
+};
+
+static inline RtemsRatemonReqGetStatus_Entry RtemsRatemonReqGetStatus_PopEntry(
+ RtemsRatemonReqGetStatus_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsRatemonReqGetStatus_Entries[
+ RtemsRatemonReqGetStatus_Map[ index ]
+ ];
+}
+
+static void RtemsRatemonReqGetStatus_SetPreConditionStates(
+ RtemsRatemonReqGetStatus_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+
+ if ( ctx->Map.entry.Pre_Elapsed_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsRatemonReqGetStatus_Pre_Elapsed_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Consumed_NA ) {
+ ctx->Map.pcs[ 4 ] = RtemsRatemonReqGetStatus_Pre_Consumed_NA;
+ } else {
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Postponed_NA ) {
+ ctx->Map.pcs[ 5 ] = RtemsRatemonReqGetStatus_Pre_Postponed_NA;
+ } else {
+ ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
+ }
+}
+
+static void RtemsRatemonReqGetStatus_TestVariant(
+ RtemsRatemonReqGetStatus_Context *ctx
+)
+{
+ RtemsRatemonReqGetStatus_Pre_StatusAddr_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsRatemonReqGetStatus_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsRatemonReqGetStatus_Pre_State_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsRatemonReqGetStatus_Pre_Elapsed_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsRatemonReqGetStatus_Pre_Consumed_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsRatemonReqGetStatus_Pre_Postponed_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsRatemonReqGetStatus_Action( ctx );
+ RtemsRatemonReqGetStatus_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsRatemonReqGetStatus_Post_Owner_Check( ctx, ctx->Map.entry.Post_Owner );
+ RtemsRatemonReqGetStatus_Post_State_Check( ctx, ctx->Map.entry.Post_State );
+ RtemsRatemonReqGetStatus_Post_Elapsed_Check(
+ ctx,
+ ctx->Map.entry.Post_Elapsed
+ );
+ RtemsRatemonReqGetStatus_Post_Consumed_Check(
+ ctx,
+ ctx->Map.entry.Post_Consumed
+ );
+ RtemsRatemonReqGetStatus_Post_Postponed_Check(
+ ctx,
+ ctx->Map.entry.Post_Postponed
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsRatemonReqGetStatus( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsRatemonReqGetStatus,
+ &RtemsRatemonReqGetStatus_Fixture
+)
+{
+ RtemsRatemonReqGetStatus_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsRatemonReqGetStatus_Pre_StatusAddr_Valid;
+ ctx->Map.pci[ 0 ] < RtemsRatemonReqGetStatus_Pre_StatusAddr_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsRatemonReqGetStatus_Pre_Id_Valid;
+ ctx->Map.pci[ 1 ] < RtemsRatemonReqGetStatus_Pre_Id_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsRatemonReqGetStatus_Pre_State_Inactive;
+ ctx->Map.pci[ 2 ] < RtemsRatemonReqGetStatus_Pre_State_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsRatemonReqGetStatus_Pre_Elapsed_Time;
+ ctx->Map.pci[ 3 ] < RtemsRatemonReqGetStatus_Pre_Elapsed_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = RtemsRatemonReqGetStatus_Pre_Consumed_CpuTime;
+ ctx->Map.pci[ 4 ] < RtemsRatemonReqGetStatus_Pre_Consumed_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ for (
+ ctx->Map.pci[ 5 ] = RtemsRatemonReqGetStatus_Pre_Postponed_Zero;
+ ctx->Map.pci[ 5 ] < RtemsRatemonReqGetStatus_Pre_Postponed_NA;
+ ++ctx->Map.pci[ 5 ]
+ ) {
+ ctx->Map.entry = RtemsRatemonReqGetStatus_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsRatemonReqGetStatus_SetPreConditionStates( ctx );
+ RtemsRatemonReqGetStatus_Prepare( ctx );
+ RtemsRatemonReqGetStatus_TestVariant( ctx );
+ RtemsRatemonReqGetStatus_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-ratemon-ident.c b/testsuites/validation/tc-ratemon-ident.c
new file mode 100644
index 0000000000..27a414a980
--- /dev/null
+++ b/testsuites/validation/tc-ratemon-ident.c
@@ -0,0 +1,117 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsRatemonValIdent
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident-local.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsRatemonValIdent spec:/rtems/ratemon/val/ident
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Test the rtems_rate_monotonic_ident() directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API rate monotonic
+ * class objects defined by spec:/rtems/req/ident-local.
+ *
+ * @{
+ */
+
+#define NAME_LOCAL_OBJECT rtems_build_name( 'R', 'A', 'T', 'E' )
+
+static rtems_status_code ClassicRatemonIdentAction(
+ rtems_name name,
+ rtems_id *id
+)
+{
+ return rtems_rate_monotonic_ident( name, id );
+}
+
+/**
+ * @brief Run the generic object identification tests for Classic API rate
+ * monotonic class objects defined by spec:/rtems/req/ident-local.
+ */
+static void RtemsRatemonValIdent_Action_0( void )
+{
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_rate_monotonic_create(
+ NAME_LOCAL_OBJECT,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdentLocal_Run(
+ id_local_object,
+ NAME_LOCAL_OBJECT,
+ ClassicRatemonIdentAction
+ );
+
+ sc = rtems_rate_monotonic_delete( id_local_object );
+ T_rsc_success( sc );
+}
+
+/**
+ * @fn void T_case_body_RtemsRatemonValIdent( void )
+ */
+T_TEST_CASE( RtemsRatemonValIdent )
+{
+ RtemsRatemonValIdent_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-ratemon-period.c b/testsuites/validation/tc-ratemon-period.c
new file mode 100644
index 0000000000..c8a73905c1
--- /dev/null
+++ b/testsuites/validation/tc-ratemon-period.c
@@ -0,0 +1,1273 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsRatemonReqPeriod
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsRatemonReqPeriod spec:/rtems/ratemon/req/period
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationOneCpu0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsRatemonReqPeriod_Pre_Id_Valid,
+ RtemsRatemonReqPeriod_Pre_Id_Invalid,
+ RtemsRatemonReqPeriod_Pre_Id_NA
+} RtemsRatemonReqPeriod_Pre_Id;
+
+typedef enum {
+ RtemsRatemonReqPeriod_Pre_Caller_OwnerTask,
+ RtemsRatemonReqPeriod_Pre_Caller_OtherTask,
+ RtemsRatemonReqPeriod_Pre_Caller_NA
+} RtemsRatemonReqPeriod_Pre_Caller;
+
+typedef enum {
+ RtemsRatemonReqPeriod_Pre_Length_Ticks,
+ RtemsRatemonReqPeriod_Pre_Length_Status,
+ RtemsRatemonReqPeriod_Pre_Length_NA
+} RtemsRatemonReqPeriod_Pre_Length;
+
+typedef enum {
+ RtemsRatemonReqPeriod_Pre_State_Inactive,
+ RtemsRatemonReqPeriod_Pre_State_Active,
+ RtemsRatemonReqPeriod_Pre_State_Expired,
+ RtemsRatemonReqPeriod_Pre_State_NA
+} RtemsRatemonReqPeriod_Pre_State;
+
+typedef enum {
+ RtemsRatemonReqPeriod_Pre_Postponed_Zero,
+ RtemsRatemonReqPeriod_Pre_Postponed_One,
+ RtemsRatemonReqPeriod_Pre_Postponed_Several,
+ RtemsRatemonReqPeriod_Pre_Postponed_NA
+} RtemsRatemonReqPeriod_Pre_Postponed;
+
+typedef enum {
+ RtemsRatemonReqPeriod_Pre_InactiveCause_New,
+ RtemsRatemonReqPeriod_Pre_InactiveCause_Canceled,
+ RtemsRatemonReqPeriod_Pre_InactiveCause_NA
+} RtemsRatemonReqPeriod_Pre_InactiveCause;
+
+typedef enum {
+ RtemsRatemonReqPeriod_Post_Status_Ok,
+ RtemsRatemonReqPeriod_Post_Status_InvId,
+ RtemsRatemonReqPeriod_Post_Status_NotOwn,
+ RtemsRatemonReqPeriod_Post_Status_NotDef,
+ RtemsRatemonReqPeriod_Post_Status_TimeOut,
+ RtemsRatemonReqPeriod_Post_Status_NA
+} RtemsRatemonReqPeriod_Post_Status;
+
+typedef enum {
+ RtemsRatemonReqPeriod_Post_State_Inactive,
+ RtemsRatemonReqPeriod_Post_State_Active,
+ RtemsRatemonReqPeriod_Post_State_Expired,
+ RtemsRatemonReqPeriod_Post_State_Nop,
+ RtemsRatemonReqPeriod_Post_State_NA
+} RtemsRatemonReqPeriod_Post_State;
+
+typedef enum {
+ RtemsRatemonReqPeriod_Post_Postponed_Zero,
+ RtemsRatemonReqPeriod_Post_Postponed_OneOrMore,
+ RtemsRatemonReqPeriod_Post_Postponed_Nop,
+ RtemsRatemonReqPeriod_Post_Postponed_NA
+} RtemsRatemonReqPeriod_Post_Postponed;
+
+typedef enum {
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Delay_TillDeadline,
+ RtemsRatemonReqPeriod_Post_Delay_NA
+} RtemsRatemonReqPeriod_Post_Delay;
+
+typedef enum {
+ RtemsRatemonReqPeriod_Post_Scheduler_Called,
+ RtemsRatemonReqPeriod_Post_Scheduler_Nop,
+ RtemsRatemonReqPeriod_Post_Scheduler_NA
+} RtemsRatemonReqPeriod_Post_Scheduler;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Id_NA : 1;
+ uint32_t Pre_Caller_NA : 1;
+ uint32_t Pre_Length_NA : 1;
+ uint32_t Pre_State_NA : 1;
+ uint32_t Pre_Postponed_NA : 1;
+ uint32_t Pre_InactiveCause_NA : 1;
+ uint32_t Post_Status : 3;
+ uint32_t Post_State : 3;
+ uint32_t Post_Postponed : 2;
+ uint32_t Post_Delay : 2;
+ uint32_t Post_Scheduler : 2;
+} RtemsRatemonReqPeriod_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/ratemon/req/period test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a valid identifier of a period.
+ */
+ rtems_id period_id;
+
+ /**
+ * @brief This member is used to receive the
+ * rtems_rate_monotonic_period_status after the action.
+ */
+ rtems_rate_monotonic_period_status period_status;
+
+ /**
+ * @brief This member specifies the ``id`` parameter for the action.
+ */
+ rtems_id id_param;
+
+ /**
+ * @brief This member specifies the ``length`` parameter for the action.
+ */
+ rtems_interval length_param;
+
+ /**
+ * @brief This member contains the returned status code of the action.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member contains the pointer to the function which executes the
+ * action.
+ *
+ * The action is either executed by the owner task or by the worker task
+ * depending on the function pointer used here. ``ctx_arg`` must be a
+ * pointer to this context structure.
+ */
+ uint32_t ( *do_action )( void *ctx, void (*todo)( void *ctx_arg ) );
+
+ /**
+ * @brief This member serves to pass the pointer to the function which the
+ * work owner task shall execute from function ``OwnerDoWork`` to function
+ * ``WorkerTask``.
+ */
+ void (*worker_todo)( void *ctx );
+
+ /**
+ * @brief This member contains the owner task identifier of the owner task.
+ */
+ rtems_id task_id;
+
+ /**
+ * @brief This member contains the owner task identifier of the worker task
+ * (which is not the owner task).
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member contains a backup of the task priority before the
+ * execution of this test.
+ */
+ rtems_id original_priority;
+
+ /**
+ * @brief This member contains the number of postponed jobs before the
+ * action.
+ */
+ uint32_t postponed_jobs_count;
+
+ /**
+ * @brief This member contains the state before the action.
+ */
+ rtems_rate_monotonic_period_states previous_state;
+
+ /**
+ * @brief This member contains the number of clock ticks passed since the
+ * test started.
+ */
+ uint32_t test_duration;
+
+ /**
+ * @brief This member contains the number of clock ticks passed since the
+ * test started till (before) the rtems_rate_monotonic_period() action is
+ * invoked.
+ */
+ uint32_t test_duration_till_action;
+
+ /**
+ * @brief This member contains the number of times the
+ * rtems_rate_monotonic_period() function returned since the test started.
+ */
+ uint32_t period_calls;
+
+ /**
+ * @brief This member contains the number of clock ticks which passed in the
+ * action till the rtems_rate_monotonic_period() function returned.
+ */
+ uint32_t action_duration;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 6 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 6 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsRatemonReqPeriod_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsRatemonReqPeriod_Context;
+
+static RtemsRatemonReqPeriod_Context
+ RtemsRatemonReqPeriod_Instance;
+
+static const char * const RtemsRatemonReqPeriod_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqPeriod_PreDesc_Caller[] = {
+ "OwnerTask",
+ "OtherTask",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqPeriod_PreDesc_Length[] = {
+ "Ticks",
+ "Status",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqPeriod_PreDesc_State[] = {
+ "Inactive",
+ "Active",
+ "Expired",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqPeriod_PreDesc_Postponed[] = {
+ "Zero",
+ "One",
+ "Several",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqPeriod_PreDesc_InactiveCause[] = {
+ "New",
+ "Canceled",
+ "NA"
+};
+
+static const char * const * const RtemsRatemonReqPeriod_PreDesc[] = {
+ RtemsRatemonReqPeriod_PreDesc_Id,
+ RtemsRatemonReqPeriod_PreDesc_Caller,
+ RtemsRatemonReqPeriod_PreDesc_Length,
+ RtemsRatemonReqPeriod_PreDesc_State,
+ RtemsRatemonReqPeriod_PreDesc_Postponed,
+ RtemsRatemonReqPeriod_PreDesc_InactiveCause,
+ NULL
+};
+
+static const rtems_interval period_length = 5;
+static const rtems_task_priority background_task_priority = 100;
+static const rtems_task_priority foreground_task_priority = 10;
+static const rtems_event_set wake_main_task_event = RTEMS_EVENT_17;
+
+static void TickTheClock(
+ RtemsRatemonReqPeriod_Context *ctx,
+ uint32_t ticks
+)
+{
+ uint32_t i;
+ for ( i = 0; i < ticks; ++i ) {
+ TimecounterTick();
+ ctx->test_duration++;
+ }
+}
+
+static rtems_status_code CallPeriodFunction(
+ RtemsRatemonReqPeriod_Context *ctx,
+ rtems_id id,
+ rtems_interval length
+)
+{
+ rtems_status_code status;
+ status = rtems_rate_monotonic_period( id, length );
+ ctx->period_calls++;
+ return status;
+}
+
+static void CreatePeriod( void *ctx_in )
+{
+ RtemsRatemonReqPeriod_Context *ctx = ctx_in;
+ rtems_status_code status;
+ status = rtems_rate_monotonic_create(
+ rtems_build_name( 'R', 'M', 'O', 'N' ),
+ &ctx->period_id
+ );
+ T_rsc_success( status );
+}
+
+static void DeletePeriod( void *ctx_in )
+{
+ RtemsRatemonReqPeriod_Context *ctx = ctx_in;
+ T_rsc_success( rtems_rate_monotonic_delete( ctx->period_id ) );
+}
+
+static void CancelPeriod( void *ctx_in )
+{
+ RtemsRatemonReqPeriod_Context *ctx = ctx_in;
+ T_rsc_success( rtems_rate_monotonic_cancel( ctx->period_id ) );
+}
+
+static void CallPeriod( void *ctx_in )
+{
+ RtemsRatemonReqPeriod_Context *ctx = ctx_in;
+ T_rsc_success( CallPeriodFunction( ctx, ctx->period_id, period_length ) );
+}
+
+static void CallPeriodTimeout( void *ctx_in )
+{
+ RtemsRatemonReqPeriod_Context *ctx = ctx_in;
+ rtems_status_code status;
+ status = CallPeriodFunction( ctx, ctx->period_id, period_length );
+ T_rsc( status, RTEMS_TIMEOUT );
+}
+
+static void DoAction( void *ctx_in )
+{
+ RtemsRatemonReqPeriod_Context *ctx = ctx_in;
+ ctx->status = CallPeriodFunction( ctx, ctx->id_param, ctx->length_param );
+}
+
+static void WorkerTask( rtems_task_argument argument )
+{
+ RtemsRatemonReqPeriod_Context *ctx =
+ (RtemsRatemonReqPeriod_Context *) argument;
+ if ( ctx != NULL ) {
+ ctx->worker_todo( ctx );
+ T_rsc_success( rtems_event_send( ctx->task_id, wake_main_task_event ) );
+ }
+ T_rsc_success( rtems_task_suspend( RTEMS_SELF ) );
+}
+
+static uint32_t OwnerDoWork( void *ctx_in, void (*todo)( void *ctx_arg ) )
+{
+ RtemsRatemonReqPeriod_Context *ctx = ctx_in;
+ uint32_t ticks_to_wait = period_length + 1;
+ rtems_status_code status;
+ rtems_event_set event_set;
+
+ ctx->worker_todo = todo;
+ status = rtems_task_restart( ctx->worker_id, (rtems_task_argument) ctx );
+ T_rsc_success( status );
+
+ for ( ; ticks_to_wait > 0; --ticks_to_wait ) {
+ /* Check whether the worker finished executing the action */
+ status = rtems_event_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ RTEMS_NO_TIMEOUT,
+ &event_set
+ );
+ T_rsc_success( status );
+
+ if ( ( event_set & wake_main_task_event ) == wake_main_task_event ) {
+ break;
+ }
+ TickTheClock( ctx, 1 );
+ }
+
+ /* Wait till the worker task finishes */
+ status = rtems_event_receive(
+ wake_main_task_event,
+ RTEMS_DEFAULT_OPTIONS,
+ RTEMS_NO_TIMEOUT,
+ &event_set
+ );
+ T_rsc_success( status );
+
+ return period_length + 1 - ticks_to_wait;
+}
+
+static uint32_t OtherDoWork( void *ctx_in, void (*todo)( void *ctx_arg ) )
+{
+ RtemsRatemonReqPeriod_Context *ctx = ctx_in;
+ todo( ctx );
+ /* Duration = 0 ticks as DoAction() does not call TickTheClock() */
+ return 0;
+}
+
+static void CreatePostponedJobs(
+ RtemsRatemonReqPeriod_Context *ctx,
+ uint32_t jobs_count
+)
+{
+ ctx->postponed_jobs_count = jobs_count;
+ if ( ctx->previous_state == RATE_MONOTONIC_ACTIVE ) {
+ TickTheClock( ctx, ( jobs_count + 1 ) * period_length );
+ OwnerDoWork( ctx, CallPeriodTimeout );
+ } else {
+ /* ctx->previous_state == RATE_MONOTONIC_INACTIVE || _EXPIRED */
+ TickTheClock( ctx, jobs_count * period_length );
+ }
+}
+
+static void RtemsRatemonReqPeriod_Pre_Id_Prepare(
+ RtemsRatemonReqPeriod_Context *ctx,
+ RtemsRatemonReqPeriod_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqPeriod_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is valid.
+ */
+ ctx->id_param = ctx->period_id;
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id_param = RTEMS_ID_NONE;
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqPeriod_Pre_Caller_Prepare(
+ RtemsRatemonReqPeriod_Context *ctx,
+ RtemsRatemonReqPeriod_Pre_Caller state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqPeriod_Pre_Caller_OwnerTask: {
+ /*
+ * While the task invoking rtems_rate_monotonic_period() is the task
+ * which created the period - the owner task.
+ */
+ ctx->do_action = OwnerDoWork;
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_Caller_OtherTask: {
+ /*
+ * While the task invoking rtems_rate_monotonic_period() is not the owner
+ * task.
+ */
+ ctx->do_action = OtherDoWork;
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_Caller_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqPeriod_Pre_Length_Prepare(
+ RtemsRatemonReqPeriod_Context *ctx,
+ RtemsRatemonReqPeriod_Pre_Length state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqPeriod_Pre_Length_Ticks: {
+ /*
+ * While the ``length`` parameter is a number larger than 0.
+ *
+ * Note:
+ *
+ * * RTEMS_PERIOD_STATUS == 0
+ *
+ * * The ``length`` parameter of all calls to
+ * rtems_rate_monotonic_period() must have the same value (see
+ * interval).
+ */
+ ctx->length_param = period_length;
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_Length_Status: {
+ /*
+ * While the ``length`` parameter is RTEMS_PERIOD_STATUS.
+ */
+ ctx->length_param = RTEMS_PERIOD_STATUS;
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_Length_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqPeriod_Pre_State_Prepare(
+ RtemsRatemonReqPeriod_Context *ctx,
+ RtemsRatemonReqPeriod_Pre_State state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqPeriod_Pre_State_Inactive: {
+ /*
+ * While the ``id`` parameter references an period object in inactive
+ * state.
+ */
+ /* Nothing to do here as the period is newly created. */
+ ctx->previous_state = RATE_MONOTONIC_INACTIVE;
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_State_Active: {
+ /*
+ * While the ``id`` parameter references an period object in active
+ * state.
+ */
+ OwnerDoWork( ctx, CallPeriod );
+ ctx->previous_state = RATE_MONOTONIC_ACTIVE;
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_State_Expired: {
+ /*
+ * While the ``id`` parameter references an period object in expired
+ * state.
+ */
+ OwnerDoWork( ctx, CallPeriod );
+ ctx->previous_state = RATE_MONOTONIC_EXPIRED;
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_State_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqPeriod_Pre_Postponed_Prepare(
+ RtemsRatemonReqPeriod_Context *ctx,
+ RtemsRatemonReqPeriod_Pre_Postponed state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqPeriod_Pre_Postponed_Zero: {
+ /*
+ * While there is no postponed job.
+ */
+ ctx->postponed_jobs_count = 0;
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_Postponed_One: {
+ /*
+ * While there is one postponed job.
+ */
+ CreatePostponedJobs( ctx, 1 );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_Postponed_Several: {
+ /*
+ * While there are two or more postponed jobs.
+ */
+ CreatePostponedJobs( ctx, 5 );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_Postponed_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqPeriod_Pre_InactiveCause_Prepare(
+ RtemsRatemonReqPeriod_Context *ctx,
+ RtemsRatemonReqPeriod_Pre_InactiveCause state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqPeriod_Pre_InactiveCause_New: {
+ /*
+ * While rtems_rate_monotonic_period() has never been invoked with result
+ * RTEMS_SUCCESSFUL on the period object referenced by the ``id``
+ * parameter since that period object has been created.
+ */
+ /* Nothing to do here as the period is newly created. */
+ ctx->postponed_jobs_count = 0;
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_InactiveCause_Canceled: {
+ /*
+ * While rtems_rate_monotonic_period() has never been invoked with result
+ * RTEMS_SUCCESSFUL on the period object referenced by the ``id``
+ * parameter since that period object has been canceled using
+ * rtems_rate_monotonic_cancel().
+ */
+ if ( ctx->period_calls == 0 ) {
+ OwnerDoWork( ctx, CallPeriod );
+ TickTheClock( ctx, ctx->postponed_jobs_count * period_length );
+ }
+ OwnerDoWork( ctx, CancelPeriod );
+ ctx->postponed_jobs_count = 0;
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Pre_InactiveCause_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqPeriod_Post_Status_Check(
+ RtemsRatemonReqPeriod_Context *ctx,
+ RtemsRatemonReqPeriod_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqPeriod_Post_Status_Ok: {
+ /*
+ * The return status of rtems_rate_monotonic_period() shall be
+ * RTEMS_SUCCESSFUL
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_Status_InvId: {
+ /*
+ * The return status of rtems_rate_monotonic_period() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_Status_NotOwn: {
+ /*
+ * The return status of rtems_rate_monotonic_period() shall be
+ * RTEMS_NOT_OWNER_OF_RESOURCE.
+ */
+ T_rsc( ctx->status, RTEMS_NOT_OWNER_OF_RESOURCE );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_Status_NotDef: {
+ /*
+ * The return status of rtems_rate_monotonic_period() shall be
+ * RTEMS_NOT_DEFINED.
+ */
+ T_rsc( ctx->status, RTEMS_NOT_DEFINED );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_Status_TimeOut: {
+ /*
+ * The return status of rtems_rate_monotonic_period() shall be
+ * RTEMS_TIMEOUT.
+ */
+ T_rsc( ctx->status, RTEMS_TIMEOUT );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqPeriod_Post_State_Check(
+ RtemsRatemonReqPeriod_Context *ctx,
+ RtemsRatemonReqPeriod_Post_State state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqPeriod_Post_State_Inactive: {
+ /*
+ * The state of the period shall be inactive after the return of the
+ * rtems_rate_monotonic_period() call.
+ */
+ T_eq_int( ctx->period_status.state, RATE_MONOTONIC_INACTIVE );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_State_Active: {
+ /*
+ * The state of the period shall be RATE_MONOTONIC_ACTIVE after the
+ * return of the rtems_rate_monotonic_period() call.
+ */
+ T_eq_int( ctx->period_status.state, RATE_MONOTONIC_ACTIVE );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_State_Expired: {
+ /*
+ * The state of the period shall be RATE_MONOTONIC_EXPIRED after the
+ * return of the rtems_rate_monotonic_period() call.
+ */
+ T_eq_int( ctx->period_status.state, RATE_MONOTONIC_EXPIRED );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_State_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_rate_monotonic_period() shall not be accessed by the
+ * rtems_rate_monotonic_period() call (see also Nop).
+ */
+ T_eq_u32( ctx->period_status.state, ctx->previous_state );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_State_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqPeriod_Post_Postponed_Check(
+ RtemsRatemonReqPeriod_Context *ctx,
+ RtemsRatemonReqPeriod_Post_Postponed state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqPeriod_Post_Postponed_Zero: {
+ /*
+ * There shall be no postponed jobs after the return of the
+ * rtems_rate_monotonic_period() call.
+ */
+ T_eq_u32( ctx->period_status.postponed_jobs_count, 0 );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_Postponed_OneOrMore: {
+ /*
+ * The number of postponed jobs shall be the number of deadlines passed
+ * minus the number of returned calls to rtems_rate_monotonic_period().
+ *
+ * The last call to rtems_rate_monotonic_period() where the state changes
+ * from inactive to RATE_MONOTONIC_ACTIVE is counted as the first
+ * returned call. The first deadline occurred at a point in time during
+ * that call to rtems_rate_monotonic_period().
+ */
+ T_eq_u32(
+ ctx->period_status.postponed_jobs_count,
+ ( ctx->test_duration / period_length + 1 ) - ctx->period_calls
+ );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_Postponed_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_rate_monotonic_period() shall not be accessed by the
+ * rtems_rate_monotonic_period() call (see also Nop).
+ */
+ T_eq_u32(
+ ctx->period_status.postponed_jobs_count,
+ ctx->postponed_jobs_count
+ );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_Postponed_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqPeriod_Post_Delay_Check(
+ RtemsRatemonReqPeriod_Context *ctx,
+ RtemsRatemonReqPeriod_Post_Delay state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqPeriod_Post_Delay_None: {
+ /*
+ * The last call to rtems_rate_monotonic_period() shall return without
+ * delay.
+ */
+ T_eq_u32( ctx->action_duration, 0 );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_Delay_TillDeadline: {
+ /*
+ * The last call to rtems_rate_monotonic_period() shall block the owner
+ * task till the next deadline and return afterwards.
+ */
+ T_eq_u32(
+ ctx->action_duration,
+ ( ctx->test_duration_till_action % period_length + 1 ) * period_length -
+ ctx->test_duration_till_action
+ );
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_Delay_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqPeriod_Post_Scheduler_Check(
+ RtemsRatemonReqPeriod_Context *ctx,
+ RtemsRatemonReqPeriod_Post_Scheduler state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqPeriod_Post_Scheduler_Called: {
+ /*
+ * The last call of the rtems_rate_monotonic_period() function shall
+ * execute the ``release_job`` scheduler operation of the home scheduler.
+ */
+ /* Cannot be tested as the effect is unknown. */
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_Scheduler_Nop: {
+ /*
+ * The last call of the rtems_rate_monotonic_period() function shall not
+ * execute any scheduler operation.
+ */
+ /* Cannot be tested as the effect is unknown. */
+ break;
+ }
+
+ case RtemsRatemonReqPeriod_Post_Scheduler_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqPeriod_Setup( RtemsRatemonReqPeriod_Context *ctx )
+{
+ rtems_status_code status;
+ rtems_task_priority priority;
+ rtems_event_set event_set;
+ ctx->worker_id = RTEMS_INVALID_ID;
+
+ status = rtems_task_ident(
+ RTEMS_SELF,
+ RTEMS_SEARCH_ALL_NODES,
+ &ctx->task_id
+ );
+ T_rsc_success( status );
+
+ status = rtems_task_set_priority(
+ RTEMS_SELF,
+ RTEMS_CURRENT_PRIORITY,
+ &ctx->original_priority
+ );
+ T_rsc_success( status );
+
+ status = rtems_task_set_priority(
+ RTEMS_SELF,
+ background_task_priority,
+ &priority
+ );
+ T_rsc_success( status );
+
+ status = rtems_task_create(
+ rtems_build_name( 'W', 'O', 'R', 'K' ),
+ foreground_task_priority,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &ctx->worker_id
+ );
+ T_rsc_success( status );
+
+ /* Defensive programming: clean away any pending events */
+ status = rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ RTEMS_NO_TIMEOUT,
+ &event_set
+ );
+ T_true( status == RTEMS_SUCCESSFUL || status == RTEMS_UNSATISFIED );
+
+ status = rtems_task_start(
+ ctx->worker_id,
+ WorkerTask,
+ (rtems_task_argument) NULL
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsRatemonReqPeriod_Setup_Wrap( void *arg )
+{
+ RtemsRatemonReqPeriod_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsRatemonReqPeriod_Setup( ctx );
+}
+
+static void RtemsRatemonReqPeriod_Teardown(
+ RtemsRatemonReqPeriod_Context *ctx
+)
+{
+ rtems_status_code status;
+ rtems_task_priority priority;
+
+ T_rsc_success( rtems_task_delete( ctx->worker_id ) );
+
+ status = rtems_task_set_priority(
+ RTEMS_SELF,
+ ctx->original_priority,
+ &priority
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsRatemonReqPeriod_Teardown_Wrap( void *arg )
+{
+ RtemsRatemonReqPeriod_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsRatemonReqPeriod_Teardown( ctx );
+}
+
+static void RtemsRatemonReqPeriod_Prepare( RtemsRatemonReqPeriod_Context *ctx )
+{
+ rtems_status_code status;
+ rtems_rate_monotonic_period_status period_status;
+ ctx->test_duration = 0;
+ ctx->period_calls = 0;
+ OwnerDoWork( ctx, CreatePeriod );
+
+ /*
+ * In case of a new period the postponed jobs count is arbitrary
+ * (what ever value happens to be stored in that field of the internal data
+ * structure) until period() is called.
+ */
+ status = rtems_rate_monotonic_get_status(
+ ctx->period_id,
+ &period_status
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsRatemonReqPeriod_Action( RtemsRatemonReqPeriod_Context *ctx )
+{
+ rtems_status_code status;
+
+ ctx->test_duration_till_action = ctx->test_duration;
+ ctx->action_duration = ctx->do_action( ctx, DoAction );
+
+ status = rtems_rate_monotonic_get_status(
+ ctx->period_id,
+ &ctx->period_status
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsRatemonReqPeriod_Cleanup( RtemsRatemonReqPeriod_Context *ctx )
+{
+ OwnerDoWork( ctx, DeletePeriod );
+}
+
+static const RtemsRatemonReqPeriod_Entry
+RtemsRatemonReqPeriod_Entries[] = {
+ { 0, 0, 0, 0, 0, 0, 1, RtemsRatemonReqPeriod_Post_Status_InvId,
+ RtemsRatemonReqPeriod_Post_State_Nop,
+ RtemsRatemonReqPeriod_Post_Postponed_Nop,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 1, RtemsRatemonReqPeriod_Post_Status_NotOwn,
+ RtemsRatemonReqPeriod_Post_State_Nop,
+ RtemsRatemonReqPeriod_Post_Postponed_Nop,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Nop },
+ { 1, 0, 0, 0, 0, 0, 1, RtemsRatemonReqPeriod_Post_Status_NA,
+ RtemsRatemonReqPeriod_Post_State_NA,
+ RtemsRatemonReqPeriod_Post_Postponed_NA,
+ RtemsRatemonReqPeriod_Post_Delay_NA,
+ RtemsRatemonReqPeriod_Post_Scheduler_NA },
+ { 0, 0, 0, 0, 0, 1, 0, RtemsRatemonReqPeriod_Post_Status_InvId,
+ RtemsRatemonReqPeriod_Post_State_Nop,
+ RtemsRatemonReqPeriod_Post_Postponed_Nop,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqPeriod_Post_Status_InvId,
+ RtemsRatemonReqPeriod_Post_State_Nop,
+ RtemsRatemonReqPeriod_Post_Postponed_Nop,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 1, RtemsRatemonReqPeriod_Post_Status_Ok,
+ RtemsRatemonReqPeriod_Post_State_Nop,
+ RtemsRatemonReqPeriod_Post_Postponed_Nop,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Nop },
+ { 0, 0, 0, 0, 0, 1, 0, RtemsRatemonReqPeriod_Post_Status_NotOwn,
+ RtemsRatemonReqPeriod_Post_State_Nop,
+ RtemsRatemonReqPeriod_Post_Postponed_Nop,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqPeriod_Post_Status_NotOwn,
+ RtemsRatemonReqPeriod_Post_State_Nop,
+ RtemsRatemonReqPeriod_Post_Postponed_Nop,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 1, RtemsRatemonReqPeriod_Post_Status_TimeOut,
+ RtemsRatemonReqPeriod_Post_State_Active,
+ RtemsRatemonReqPeriod_Post_Postponed_Zero,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Called },
+ { 0, 0, 0, 0, 0, 0, 1, RtemsRatemonReqPeriod_Post_Status_TimeOut,
+ RtemsRatemonReqPeriod_Post_State_Active,
+ RtemsRatemonReqPeriod_Post_Postponed_OneOrMore,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Called },
+ { 0, 0, 0, 0, 0, 0, 1, RtemsRatemonReqPeriod_Post_Status_TimeOut,
+ RtemsRatemonReqPeriod_Post_State_Nop,
+ RtemsRatemonReqPeriod_Post_Postponed_Nop,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Nop },
+ { 0, 0, 0, 0, 0, 1, 0, RtemsRatemonReqPeriod_Post_Status_Ok,
+ RtemsRatemonReqPeriod_Post_State_Active,
+ RtemsRatemonReqPeriod_Post_Postponed_Zero,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Called },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqPeriod_Post_Status_Ok,
+ RtemsRatemonReqPeriod_Post_State_Active,
+ RtemsRatemonReqPeriod_Post_Postponed_Zero,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Called },
+ { 0, 0, 0, 0, 0, 1, 0, RtemsRatemonReqPeriod_Post_Status_NotDef,
+ RtemsRatemonReqPeriod_Post_State_Nop,
+ RtemsRatemonReqPeriod_Post_Postponed_Nop,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqPeriod_Post_Status_NotDef,
+ RtemsRatemonReqPeriod_Post_State_Nop,
+ RtemsRatemonReqPeriod_Post_Postponed_Nop,
+ RtemsRatemonReqPeriod_Post_Delay_None,
+ RtemsRatemonReqPeriod_Post_Scheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 1, RtemsRatemonReqPeriod_Post_Status_Ok,
+ RtemsRatemonReqPeriod_Post_State_Active,
+ RtemsRatemonReqPeriod_Post_Postponed_Zero,
+ RtemsRatemonReqPeriod_Post_Delay_TillDeadline,
+ RtemsRatemonReqPeriod_Post_Scheduler_Called }
+};
+
+static const uint8_t
+RtemsRatemonReqPeriod_Map[] = {
+ 11, 12, 11, 12, 11, 12, 15, 15, 8, 8, 9, 9, 2, 2, 8, 8, 9, 9, 13, 14, 13, 14,
+ 13, 14, 5, 5, 5, 5, 5, 5, 2, 2, 10, 10, 10, 10, 6, 7, 6, 7, 6, 7, 1, 1, 1, 1,
+ 1, 1, 2, 2, 1, 1, 1, 1, 6, 7, 6, 7, 6, 7, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1,
+ 3, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 3, 4, 3, 4, 3, 4, 0, 0,
+ 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 3, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0,
+ 0, 0, 3, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0
+};
+
+static size_t RtemsRatemonReqPeriod_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsRatemonReqPeriod_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsRatemonReqPeriod_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsRatemonReqPeriod_Fixture = {
+ .setup = RtemsRatemonReqPeriod_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsRatemonReqPeriod_Teardown_Wrap,
+ .scope = RtemsRatemonReqPeriod_Scope,
+ .initial_context = &RtemsRatemonReqPeriod_Instance
+};
+
+static inline RtemsRatemonReqPeriod_Entry RtemsRatemonReqPeriod_PopEntry(
+ RtemsRatemonReqPeriod_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsRatemonReqPeriod_Entries[
+ RtemsRatemonReqPeriod_Map[ index ]
+ ];
+}
+
+static void RtemsRatemonReqPeriod_SetPreConditionStates(
+ RtemsRatemonReqPeriod_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+
+ if ( ctx->Map.entry.Pre_Postponed_NA ) {
+ ctx->Map.pcs[ 4 ] = RtemsRatemonReqPeriod_Pre_Postponed_NA;
+ } else {
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+ }
+
+ if ( ctx->Map.entry.Pre_InactiveCause_NA ) {
+ ctx->Map.pcs[ 5 ] = RtemsRatemonReqPeriod_Pre_InactiveCause_NA;
+ } else {
+ ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
+ }
+}
+
+static void RtemsRatemonReqPeriod_TestVariant(
+ RtemsRatemonReqPeriod_Context *ctx
+)
+{
+ RtemsRatemonReqPeriod_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsRatemonReqPeriod_Pre_Caller_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsRatemonReqPeriod_Pre_Length_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsRatemonReqPeriod_Pre_State_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsRatemonReqPeriod_Pre_Postponed_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsRatemonReqPeriod_Pre_InactiveCause_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsRatemonReqPeriod_Action( ctx );
+ RtemsRatemonReqPeriod_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsRatemonReqPeriod_Post_State_Check( ctx, ctx->Map.entry.Post_State );
+ RtemsRatemonReqPeriod_Post_Postponed_Check(
+ ctx,
+ ctx->Map.entry.Post_Postponed
+ );
+ RtemsRatemonReqPeriod_Post_Delay_Check( ctx, ctx->Map.entry.Post_Delay );
+ RtemsRatemonReqPeriod_Post_Scheduler_Check(
+ ctx,
+ ctx->Map.entry.Post_Scheduler
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsRatemonReqPeriod( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsRatemonReqPeriod, &RtemsRatemonReqPeriod_Fixture )
+{
+ RtemsRatemonReqPeriod_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsRatemonReqPeriod_Pre_Id_Valid;
+ ctx->Map.pci[ 0 ] < RtemsRatemonReqPeriod_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsRatemonReqPeriod_Pre_Caller_OwnerTask;
+ ctx->Map.pci[ 1 ] < RtemsRatemonReqPeriod_Pre_Caller_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsRatemonReqPeriod_Pre_Length_Ticks;
+ ctx->Map.pci[ 2 ] < RtemsRatemonReqPeriod_Pre_Length_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsRatemonReqPeriod_Pre_State_Inactive;
+ ctx->Map.pci[ 3 ] < RtemsRatemonReqPeriod_Pre_State_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = RtemsRatemonReqPeriod_Pre_Postponed_Zero;
+ ctx->Map.pci[ 4 ] < RtemsRatemonReqPeriod_Pre_Postponed_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ for (
+ ctx->Map.pci[ 5 ] = RtemsRatemonReqPeriod_Pre_InactiveCause_New;
+ ctx->Map.pci[ 5 ] < RtemsRatemonReqPeriod_Pre_InactiveCause_NA;
+ ++ctx->Map.pci[ 5 ]
+ ) {
+ ctx->Map.entry = RtemsRatemonReqPeriod_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsRatemonReqPeriod_SetPreConditionStates( ctx );
+ RtemsRatemonReqPeriod_Prepare( ctx );
+ RtemsRatemonReqPeriod_TestVariant( ctx );
+ RtemsRatemonReqPeriod_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-ratemon-timeout.c b/testsuites/validation/tc-ratemon-timeout.c
new file mode 100644
index 0000000000..dc2c745e61
--- /dev/null
+++ b/testsuites/validation/tc-ratemon-timeout.c
@@ -0,0 +1,961 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsRatemonReqTimeout
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test-scheduler.h>
+#include <rtems/rtems/ratemonimpl.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsRatemonReqTimeout spec:/rtems/ratemon/req/timeout
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationOneCpu0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsRatemonReqTimeout_Pre_WaitFor_PeriodSelf,
+ RtemsRatemonReqTimeout_Pre_WaitFor_PeriodOther,
+ RtemsRatemonReqTimeout_Pre_WaitFor_Other,
+ RtemsRatemonReqTimeout_Pre_WaitFor_NA
+} RtemsRatemonReqTimeout_Pre_WaitFor;
+
+typedef enum {
+ RtemsRatemonReqTimeout_Pre_WaitState_Blocked,
+ RtemsRatemonReqTimeout_Pre_WaitState_IntendToBlock,
+ RtemsRatemonReqTimeout_Pre_WaitState_NA
+} RtemsRatemonReqTimeout_Pre_WaitState;
+
+typedef enum {
+ RtemsRatemonReqTimeout_Pre_PostponedJobs_Zero,
+ RtemsRatemonReqTimeout_Pre_PostponedJobs_NotZeroOrMax,
+ RtemsRatemonReqTimeout_Pre_PostponedJobs_Max,
+ RtemsRatemonReqTimeout_Pre_PostponedJobs_NA
+} RtemsRatemonReqTimeout_Pre_PostponedJobs;
+
+typedef enum {
+ RtemsRatemonReqTimeout_Post_PostponedJobs_Nop,
+ RtemsRatemonReqTimeout_Post_PostponedJobs_PlusOne,
+ RtemsRatemonReqTimeout_Post_PostponedJobs_NA
+} RtemsRatemonReqTimeout_Post_PostponedJobs;
+
+typedef enum {
+ RtemsRatemonReqTimeout_Post_ReleaseJob_Yes,
+ RtemsRatemonReqTimeout_Post_ReleaseJob_No,
+ RtemsRatemonReqTimeout_Post_ReleaseJob_NA
+} RtemsRatemonReqTimeout_Post_ReleaseJob;
+
+typedef enum {
+ RtemsRatemonReqTimeout_Post_Unblock_Yes,
+ RtemsRatemonReqTimeout_Post_Unblock_No,
+ RtemsRatemonReqTimeout_Post_Unblock_NA
+} RtemsRatemonReqTimeout_Post_Unblock;
+
+typedef enum {
+ RtemsRatemonReqTimeout_Post_PeriodState_Active,
+ RtemsRatemonReqTimeout_Post_PeriodState_Expired,
+ RtemsRatemonReqTimeout_Post_PeriodState_NA
+} RtemsRatemonReqTimeout_Post_PeriodState;
+
+typedef enum {
+ RtemsRatemonReqTimeout_Post_Timer_Active,
+ RtemsRatemonReqTimeout_Post_Timer_NA
+} RtemsRatemonReqTimeout_Post_Timer;
+
+typedef enum {
+ RtemsRatemonReqTimeout_Post_Uptime_Nop,
+ RtemsRatemonReqTimeout_Post_Uptime_Set,
+ RtemsRatemonReqTimeout_Post_Uptime_NA
+} RtemsRatemonReqTimeout_Post_Uptime;
+
+typedef enum {
+ RtemsRatemonReqTimeout_Post_CPUUsage_Nop,
+ RtemsRatemonReqTimeout_Post_CPUUsage_Set,
+ RtemsRatemonReqTimeout_Post_CPUUsage_NA
+} RtemsRatemonReqTimeout_Post_CPUUsage;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_WaitFor_NA : 1;
+ uint32_t Pre_WaitState_NA : 1;
+ uint32_t Pre_PostponedJobs_NA : 1;
+ uint32_t Post_PostponedJobs : 2;
+ uint32_t Post_ReleaseJob : 2;
+ uint32_t Post_Unblock : 2;
+ uint32_t Post_PeriodState : 2;
+ uint32_t Post_Timer : 1;
+ uint32_t Post_Uptime : 2;
+ uint32_t Post_CPUUsage : 2;
+} RtemsRatemonReqTimeout_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/ratemon/req/timeout test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the period identifier.
+ */
+ rtems_id period_id;
+
+ /**
+ * @brief This member references the period control block.
+ */
+ Rate_monotonic_Control *period;
+
+ /**
+ * @brief This member contains another period identifier.
+ */
+ rtems_id other_period_id;
+
+ /**
+ * @brief This member contains the worker task identifier.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member contains the call within ISR request.
+ */
+ CallWithinISRRequest request;
+
+ /**
+ * @brief If this member is true, then the worker shall wait for a period.
+ */
+ bool wait_for_period;
+
+ /**
+ * @brief If this member is true, then the worker shall wait for another
+ * period.
+ */
+ bool period_is_other;
+
+ /**
+ * @brief If this member is true, then the worker shall intend to block for a
+ * period.
+ */
+ bool intend_to_block;
+
+ /**
+ * @brief This member contains the postponed jobs count before the timeout.
+ */
+ uint32_t postponed_jobs;
+
+ /**
+ * @brief This member contains the uptime of the period before the timeout.
+ */
+ Timestamp_Control uptime_before;
+
+ /**
+ * @brief This member contains the CPU usage of the period before the
+ * timeout.
+ */
+ Timestamp_Control cpu_usage_before;
+
+ /**
+ * @brief This member contains the release job counter.
+ */
+ uint32_t release_job_counter;
+
+ /**
+ * @brief This member contains the unblock counter.
+ */
+ uint32_t unblock_counter;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 3 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsRatemonReqTimeout_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsRatemonReqTimeout_Context;
+
+static RtemsRatemonReqTimeout_Context
+ RtemsRatemonReqTimeout_Instance;
+
+static const char * const RtemsRatemonReqTimeout_PreDesc_WaitFor[] = {
+ "PeriodSelf",
+ "PeriodOther",
+ "Other",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqTimeout_PreDesc_WaitState[] = {
+ "Blocked",
+ "IntendToBlock",
+ "NA"
+};
+
+static const char * const RtemsRatemonReqTimeout_PreDesc_PostponedJobs[] = {
+ "Zero",
+ "NotZeroOrMax",
+ "Max",
+ "NA"
+};
+
+static const char * const * const RtemsRatemonReqTimeout_PreDesc[] = {
+ RtemsRatemonReqTimeout_PreDesc_WaitFor,
+ RtemsRatemonReqTimeout_PreDesc_WaitState,
+ RtemsRatemonReqTimeout_PreDesc_PostponedJobs,
+ NULL
+};
+
+#define EVENT_RESET RTEMS_EVENT_0
+
+#define EVENT_PERIOD_WAIT RTEMS_EVENT_1
+
+#define EVENT_PERIOD_OTHER RTEMS_EVENT_2
+
+typedef RtemsRatemonReqTimeout_Context Context;
+
+static void Tick( void *arg )
+{
+ Context *ctx;
+ T_scheduler_log_10 scheduler_log_10;
+ const T_scheduler_log *scheduler_log;
+ size_t index;
+
+ ctx = arg;
+ ctx->release_job_counter = 0;
+ ctx->unblock_counter = 0;
+ ctx->uptime_before = ctx->period->time_period_initiated;
+ ctx->cpu_usage_before = ctx->period->cpu_usage_period_initiated;
+ scheduler_log = T_scheduler_record_10( &scheduler_log_10 );
+ T_null( scheduler_log );
+ ClockTick();
+ scheduler_log = T_scheduler_record( NULL );
+ T_eq_ptr( &scheduler_log->header, &scheduler_log_10.header );
+
+ index = 0;
+
+ while ( true ) {
+ const T_scheduler_event *event;
+
+ event = T_scheduler_next_any( &scheduler_log_10.header, &index );
+
+ if ( event == &T_scheduler_event_null ) {
+ break;
+ }
+
+ T_eq_u32( event->thread->Object.id, ctx->worker_id );
+
+ switch ( event->operation ) {
+ case T_SCHEDULER_RELEASE_JOB:
+ ++ctx->release_job_counter;
+ T_eq_u64(
+ event->release_job.deadline,
+ rtems_clock_get_ticks_since_boot() + 1
+ );
+ break;
+ case T_SCHEDULER_UNBLOCK:
+ ++ctx->unblock_counter;
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+static void SchedulerBlock(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_BEFORE &&
+ event->operation == T_SCHEDULER_BLOCK
+ ) {
+ T_scheduler_set_event_handler( NULL, NULL );
+ ctx->request.handler = Tick;
+ CallWithinISRSubmit( &ctx->request );
+ }
+}
+
+static Rate_monotonic_Control *GetControl( rtems_id id )
+{
+ Rate_monotonic_Control *period;
+ ISR_lock_Context lock_context;
+
+ period = _Rate_monotonic_Get( id, &lock_context );
+ T_assert_not_null( period );
+ _ISR_lock_ISR_enable( &lock_context );
+
+ return period;
+}
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+ rtems_status_code sc;
+
+ ctx = (Context *) arg;
+
+ sc = rtems_rate_monotonic_create( OBJECT_NAME, &ctx->period_id );
+ T_rsc_success( sc );
+
+ sc = rtems_rate_monotonic_create( OBJECT_NAME, &ctx->other_period_id );
+ T_rsc_success( sc );
+
+ while ( true ) {
+ rtems_event_set events;
+
+ events = ReceiveAnyEvents();
+
+ if ( ( events & EVENT_RESET ) != 0 ) {
+ sc = rtems_rate_monotonic_cancel( ctx->period_id );
+ T_rsc_success( sc );
+
+ sc = rtems_rate_monotonic_cancel( ctx->other_period_id );
+ T_rsc_success( sc );
+
+ sc = rtems_rate_monotonic_period( ctx->period_id, 1 );
+ T_rsc_success( sc );
+
+ ctx->period->postponed_jobs = ctx->postponed_jobs;
+ }
+
+ if ( ( events & EVENT_PERIOD_WAIT ) != 0 ) {
+ if ( ctx->intend_to_block ) {
+ T_scheduler_set_event_handler( SchedulerBlock, ctx );
+ }
+
+ sc = rtems_rate_monotonic_period( ctx->period_id, 1 );
+ T_rsc_success( sc );
+ }
+
+ if ( ( events & EVENT_PERIOD_OTHER ) != 0 ) {
+ sc = rtems_rate_monotonic_period( ctx->other_period_id, 2 );
+ T_rsc_success( sc );
+
+ sc = rtems_rate_monotonic_period( ctx->other_period_id, 2 );
+ T_rsc_success( sc );
+ }
+ }
+}
+
+static void RtemsRatemonReqTimeout_Pre_WaitFor_Prepare(
+ RtemsRatemonReqTimeout_Context *ctx,
+ RtemsRatemonReqTimeout_Pre_WaitFor state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqTimeout_Pre_WaitFor_PeriodSelf: {
+ /*
+ * While the owner task of the period waits for the period.
+ */
+ ctx->wait_for_period = true;
+ ctx->period_is_other = false;
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Pre_WaitFor_PeriodOther: {
+ /*
+ * While the owner task of the period waits for another period.
+ */
+ ctx->wait_for_period = true;
+ ctx->period_is_other = true;
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Pre_WaitFor_Other: {
+ /*
+ * While the owner task of the period does not wait for a period.
+ */
+ ctx->wait_for_period = false;
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Pre_WaitFor_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqTimeout_Pre_WaitState_Prepare(
+ RtemsRatemonReqTimeout_Context *ctx,
+ RtemsRatemonReqTimeout_Pre_WaitState state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqTimeout_Pre_WaitState_Blocked: {
+ /*
+ * While the owner task is in the blocked wait state.
+ */
+ ctx->intend_to_block = false;
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Pre_WaitState_IntendToBlock: {
+ /*
+ * While the owner task is in the intend to block wait state.
+ */
+ ctx->intend_to_block = true;
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Pre_WaitState_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqTimeout_Pre_PostponedJobs_Prepare(
+ RtemsRatemonReqTimeout_Context *ctx,
+ RtemsRatemonReqTimeout_Pre_PostponedJobs state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqTimeout_Pre_PostponedJobs_Zero: {
+ /*
+ * While the count of postponed jobs is equal to zero.
+ */
+ ctx->postponed_jobs = 0;
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Pre_PostponedJobs_NotZeroOrMax: {
+ /*
+ * While the count of postponed jobs is not equal to zero or UINT32_MAX.
+ */
+ ctx->postponed_jobs = 123;
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Pre_PostponedJobs_Max: {
+ /*
+ * While the count of postponed jobs is equal to UINT32_MAX.
+ */
+ ctx->postponed_jobs = UINT32_MAX;
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Pre_PostponedJobs_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqTimeout_Post_PostponedJobs_Check(
+ RtemsRatemonReqTimeout_Context *ctx,
+ RtemsRatemonReqTimeout_Post_PostponedJobs state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqTimeout_Post_PostponedJobs_Nop: {
+ /*
+ * The count of postponed jobs of the period shall not be modified.
+ */
+ T_eq_u32( ctx->period->postponed_jobs, ctx->postponed_jobs );
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Post_PostponedJobs_PlusOne: {
+ /*
+ * The count of postponed jobs of the period shall be incremented by one.
+ */
+ T_eq_u32( ctx->period->postponed_jobs, ctx->postponed_jobs + 1 );
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Post_PostponedJobs_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqTimeout_Post_ReleaseJob_Check(
+ RtemsRatemonReqTimeout_Context *ctx,
+ RtemsRatemonReqTimeout_Post_ReleaseJob state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqTimeout_Post_ReleaseJob_Yes: {
+ /*
+ * The owner task of the period shall release a job with a deadline equal
+ * to the clock tick plus the next period length by the timeout
+ * operation.
+ */
+ T_eq_u32( ctx->release_job_counter, 1 );
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Post_ReleaseJob_No: {
+ /*
+ * The owner task of the period shall not release a job by the timeout
+ * operation.
+ */
+ T_eq_u32( ctx->release_job_counter, 0 );
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Post_ReleaseJob_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqTimeout_Post_Unblock_Check(
+ RtemsRatemonReqTimeout_Context *ctx,
+ RtemsRatemonReqTimeout_Post_Unblock state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqTimeout_Post_Unblock_Yes: {
+ /*
+ * The owner task of the period shall be unblocked by the timeout
+ * operation.
+ */
+ T_eq_u32( ctx->unblock_counter, 1 );
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Post_Unblock_No: {
+ /*
+ * The owner task of the period shall not be unblocked by the timeout
+ * operation.
+ */
+ T_eq_u32( ctx->unblock_counter, 0 );
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Post_Unblock_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqTimeout_Post_PeriodState_Check(
+ RtemsRatemonReqTimeout_Context *ctx,
+ RtemsRatemonReqTimeout_Post_PeriodState state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqTimeout_Post_PeriodState_Active: {
+ /*
+ * The period state shall be active.
+ */
+ T_eq_int( ctx->period->state, RATE_MONOTONIC_ACTIVE );
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Post_PeriodState_Expired: {
+ /*
+ * The period state shall be expired.
+ */
+ T_eq_int( ctx->period->state, RATE_MONOTONIC_EXPIRED );
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Post_PeriodState_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqTimeout_Post_Timer_Check(
+ RtemsRatemonReqTimeout_Context *ctx,
+ RtemsRatemonReqTimeout_Post_Timer state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqTimeout_Post_Timer_Active: {
+ /*
+ * The timeout timer of the period shall expired at the current clock
+ * tick plus the next period length.
+ */
+ T_true( _Watchdog_Is_scheduled( &ctx->period->Timer ) );
+ T_eq_u64(
+ ctx->period->Timer.expire,
+ rtems_clock_get_ticks_since_boot() + 1
+ );
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Post_Timer_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqTimeout_Post_Uptime_Check(
+ RtemsRatemonReqTimeout_Context *ctx,
+ RtemsRatemonReqTimeout_Post_Uptime state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqTimeout_Post_Uptime_Nop: {
+ /*
+ * The period initiated CLOCK_MONOTONIC value shall not be modified.
+ */
+ T_eq_i64( ctx->uptime_before, ctx->period->time_period_initiated );
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Post_Uptime_Set: {
+ /*
+ * The period initiated CLOCK_MONOTONIC value shall be set to the
+ * CLOCK_MONOTONIC at some time point during the timeout operation.
+ */
+ T_ne_i64( ctx->uptime_before, ctx->period->time_period_initiated );
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Post_Uptime_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqTimeout_Post_CPUUsage_Check(
+ RtemsRatemonReqTimeout_Context *ctx,
+ RtemsRatemonReqTimeout_Post_CPUUsage state
+)
+{
+ switch ( state ) {
+ case RtemsRatemonReqTimeout_Post_CPUUsage_Nop: {
+ /*
+ * The period initiated CPU usage of the owner task value shall not be
+ * modified.
+ */
+ T_eq_i64(
+ ctx->cpu_usage_before,
+ ctx->period->cpu_usage_period_initiated
+ );
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Post_CPUUsage_Set: {
+ /*
+ * The period initiated CPU usage of the owner task value shall be set to
+ * the CPU usage of the owner task at some time point during the timeout
+ * operation.
+ */
+ T_ne_i64(
+ ctx->cpu_usage_before,
+ ctx->period->cpu_usage_period_initiated
+ );
+ break;
+ }
+
+ case RtemsRatemonReqTimeout_Post_CPUUsage_NA:
+ break;
+ }
+}
+
+static void RtemsRatemonReqTimeout_Setup( RtemsRatemonReqTimeout_Context *ctx )
+{
+ ctx->request.arg = ctx;
+ ctx->worker_id = CreateTask( "WORK", GetSelfPriority() );
+ StartTask( ctx->worker_id, Worker, ctx );
+ Yield();
+ ctx->period = GetControl( ctx->period_id );
+}
+
+static void RtemsRatemonReqTimeout_Setup_Wrap( void *arg )
+{
+ RtemsRatemonReqTimeout_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsRatemonReqTimeout_Setup( ctx );
+}
+
+static void RtemsRatemonReqTimeout_Teardown(
+ RtemsRatemonReqTimeout_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ DeleteTask( ctx->worker_id );
+
+ sc = rtems_rate_monotonic_delete( ctx->period_id );
+ T_rsc_success( sc );
+
+ sc = rtems_rate_monotonic_delete( ctx->other_period_id );
+ T_rsc_success( sc );
+}
+
+static void RtemsRatemonReqTimeout_Teardown_Wrap( void *arg )
+{
+ RtemsRatemonReqTimeout_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsRatemonReqTimeout_Teardown( ctx );
+}
+
+static void RtemsRatemonReqTimeout_Action(
+ RtemsRatemonReqTimeout_Context *ctx
+)
+{
+ SendEvents( ctx->worker_id, EVENT_RESET );
+ Yield();
+
+ if ( ctx->wait_for_period ) {
+ if ( ctx->period_is_other ) {
+ SendEvents( ctx->worker_id, EVENT_PERIOD_OTHER );
+ Yield();
+ Tick( ctx );
+ } else {
+ SendEvents( ctx->worker_id, EVENT_PERIOD_WAIT );
+ Yield();
+
+ if ( !ctx->intend_to_block ) {
+ Tick( ctx );
+ }
+ }
+ } else {
+ Tick( ctx );
+ }
+}
+
+static void RtemsRatemonReqTimeout_Cleanup(
+ RtemsRatemonReqTimeout_Context *ctx
+)
+{
+ ClockTick();
+ Yield();
+}
+
+static const RtemsRatemonReqTimeout_Entry
+RtemsRatemonReqTimeout_Entries[] = {
+ { 0, 0, 1, 0, RtemsRatemonReqTimeout_Post_PostponedJobs_PlusOne,
+ RtemsRatemonReqTimeout_Post_ReleaseJob_No,
+ RtemsRatemonReqTimeout_Post_Unblock_No,
+ RtemsRatemonReqTimeout_Post_PeriodState_Expired,
+ RtemsRatemonReqTimeout_Post_Timer_Active,
+ RtemsRatemonReqTimeout_Post_Uptime_Nop,
+ RtemsRatemonReqTimeout_Post_CPUUsage_Nop },
+ { 1, 0, 0, 0, RtemsRatemonReqTimeout_Post_PostponedJobs_NA,
+ RtemsRatemonReqTimeout_Post_ReleaseJob_NA,
+ RtemsRatemonReqTimeout_Post_Unblock_NA,
+ RtemsRatemonReqTimeout_Post_PeriodState_NA,
+ RtemsRatemonReqTimeout_Post_Timer_NA,
+ RtemsRatemonReqTimeout_Post_Uptime_NA,
+ RtemsRatemonReqTimeout_Post_CPUUsage_NA },
+ { 0, 0, 1, 0, RtemsRatemonReqTimeout_Post_PostponedJobs_Nop,
+ RtemsRatemonReqTimeout_Post_ReleaseJob_No,
+ RtemsRatemonReqTimeout_Post_Unblock_No,
+ RtemsRatemonReqTimeout_Post_PeriodState_Expired,
+ RtemsRatemonReqTimeout_Post_Timer_Active,
+ RtemsRatemonReqTimeout_Post_Uptime_Nop,
+ RtemsRatemonReqTimeout_Post_CPUUsage_Nop },
+ { 0, 0, 0, 0, RtemsRatemonReqTimeout_Post_PostponedJobs_Nop,
+ RtemsRatemonReqTimeout_Post_ReleaseJob_Yes,
+ RtemsRatemonReqTimeout_Post_Unblock_Yes,
+ RtemsRatemonReqTimeout_Post_PeriodState_Active,
+ RtemsRatemonReqTimeout_Post_Timer_Active,
+ RtemsRatemonReqTimeout_Post_Uptime_Set,
+ RtemsRatemonReqTimeout_Post_CPUUsage_Set },
+ { 0, 0, 0, 0, RtemsRatemonReqTimeout_Post_PostponedJobs_Nop,
+ RtemsRatemonReqTimeout_Post_ReleaseJob_Yes,
+ RtemsRatemonReqTimeout_Post_Unblock_No,
+ RtemsRatemonReqTimeout_Post_PeriodState_Active,
+ RtemsRatemonReqTimeout_Post_Timer_Active,
+ RtemsRatemonReqTimeout_Post_Uptime_Set,
+ RtemsRatemonReqTimeout_Post_CPUUsage_Set }
+};
+
+static const uint8_t
+RtemsRatemonReqTimeout_Map[] = {
+ 3, 1, 1, 4, 1, 1, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2
+};
+
+static size_t RtemsRatemonReqTimeout_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsRatemonReqTimeout_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsRatemonReqTimeout_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsRatemonReqTimeout_Fixture = {
+ .setup = RtemsRatemonReqTimeout_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsRatemonReqTimeout_Teardown_Wrap,
+ .scope = RtemsRatemonReqTimeout_Scope,
+ .initial_context = &RtemsRatemonReqTimeout_Instance
+};
+
+static inline RtemsRatemonReqTimeout_Entry RtemsRatemonReqTimeout_PopEntry(
+ RtemsRatemonReqTimeout_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsRatemonReqTimeout_Entries[
+ RtemsRatemonReqTimeout_Map[ index ]
+ ];
+}
+
+static void RtemsRatemonReqTimeout_SetPreConditionStates(
+ RtemsRatemonReqTimeout_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_WaitState_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsRatemonReqTimeout_Pre_WaitState_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+}
+
+static void RtemsRatemonReqTimeout_TestVariant(
+ RtemsRatemonReqTimeout_Context *ctx
+)
+{
+ RtemsRatemonReqTimeout_Pre_WaitFor_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsRatemonReqTimeout_Pre_WaitState_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsRatemonReqTimeout_Pre_PostponedJobs_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsRatemonReqTimeout_Action( ctx );
+ RtemsRatemonReqTimeout_Post_PostponedJobs_Check(
+ ctx,
+ ctx->Map.entry.Post_PostponedJobs
+ );
+ RtemsRatemonReqTimeout_Post_ReleaseJob_Check(
+ ctx,
+ ctx->Map.entry.Post_ReleaseJob
+ );
+ RtemsRatemonReqTimeout_Post_Unblock_Check(
+ ctx,
+ ctx->Map.entry.Post_Unblock
+ );
+ RtemsRatemonReqTimeout_Post_PeriodState_Check(
+ ctx,
+ ctx->Map.entry.Post_PeriodState
+ );
+ RtemsRatemonReqTimeout_Post_Timer_Check( ctx, ctx->Map.entry.Post_Timer );
+ RtemsRatemonReqTimeout_Post_Uptime_Check( ctx, ctx->Map.entry.Post_Uptime );
+ RtemsRatemonReqTimeout_Post_CPUUsage_Check(
+ ctx,
+ ctx->Map.entry.Post_CPUUsage
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsRatemonReqTimeout( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsRatemonReqTimeout, &RtemsRatemonReqTimeout_Fixture )
+{
+ RtemsRatemonReqTimeout_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsRatemonReqTimeout_Pre_WaitFor_PeriodSelf;
+ ctx->Map.pci[ 0 ] < RtemsRatemonReqTimeout_Pre_WaitFor_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsRatemonReqTimeout_Pre_WaitState_Blocked;
+ ctx->Map.pci[ 1 ] < RtemsRatemonReqTimeout_Pre_WaitState_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsRatemonReqTimeout_Pre_PostponedJobs_Zero;
+ ctx->Map.pci[ 2 ] < RtemsRatemonReqTimeout_Pre_PostponedJobs_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ ctx->Map.entry = RtemsRatemonReqTimeout_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsRatemonReqTimeout_SetPreConditionStates( ctx );
+ RtemsRatemonReqTimeout_TestVariant( ctx );
+ RtemsRatemonReqTimeout_Cleanup( ctx );
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sched-smp-edf-set-affinity.c b/testsuites/validation/tc-sched-smp-edf-set-affinity.c
new file mode 100644
index 0000000000..9e13c19ff7
--- /dev/null
+++ b/testsuites/validation/tc-sched-smp-edf-set-affinity.c
@@ -0,0 +1,1628 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSchedSmpEdfReqSetAffinity
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/percpu.h>
+#include <rtems/score/threaddispatch.h>
+#include <rtems/score/threadimpl.h>
+
+#include "tx-support.h"
+#include "tx-thread-queue.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSchedSmpEdfReqSetAffinity \
+ * spec:/score/sched/smp/edf/req/set-affinity
+ *
+ * @ingroup TestsuitesValidationSmpOnly0
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Before_All,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Before_X,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Before_NA
+} ScoreSchedSmpEdfReqSetAffinity_Pre_Before;
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Pre_After_All,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_After_X,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_After_Y,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_After_NA
+} ScoreSchedSmpEdfReqSetAffinity_Pre_After;
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Priority_High,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Priority_Low,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Priority_NA
+} ScoreSchedSmpEdfReqSetAffinity_Pre_Priority;
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Pre_State_Ready,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_State_Blocked,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_State_NA
+} ScoreSchedSmpEdfReqSetAffinity_Pre_State;
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Sticky_Yes,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Sticky_No,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Sticky_NA
+} ScoreSchedSmpEdfReqSetAffinity_Pre_Sticky;
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Pinned_Yes,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Pinned_No,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Pinned_NA
+} ScoreSchedSmpEdfReqSetAffinity_Pre_Pinned;
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaPriority_High,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaPriority_Low,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaPriority_NA
+} ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaPriority;
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaAffinity_All,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaAffinity_X,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaAffinity_NA
+} ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaAffinity;
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaIdle_Yes,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaIdle_No,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaIdle_NA
+} ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaIdle;
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaPriority_High,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaPriority_Low,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaPriority_NA
+} ScoreSchedSmpEdfReqSetAffinity_Pre_BetaPriority;
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaAffinity_All,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaAffinity_Y,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaAffinity_NA
+} ScoreSchedSmpEdfReqSetAffinity_Pre_BetaAffinity;
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaIdle_Yes,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaIdle_No,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaIdle_NA
+} ScoreSchedSmpEdfReqSetAffinity_Pre_BetaIdle;
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Task,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_TaskIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Alpha,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_AlphaIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Beta,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_BetaIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_NA
+} ScoreSchedSmpEdfReqSetAffinity_Post_X;
+
+typedef enum {
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Task,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_TaskIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Alpha,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_AlphaIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Beta,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_BetaIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_NA
+} ScoreSchedSmpEdfReqSetAffinity_Post_Y;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Before_NA : 1;
+ uint32_t Pre_After_NA : 1;
+ uint32_t Pre_Priority_NA : 1;
+ uint32_t Pre_State_NA : 1;
+ uint32_t Pre_Sticky_NA : 1;
+ uint32_t Pre_Pinned_NA : 1;
+ uint32_t Pre_AlphaPriority_NA : 1;
+ uint32_t Pre_AlphaAffinity_NA : 1;
+ uint32_t Pre_AlphaIdle_NA : 1;
+ uint32_t Pre_BetaPriority_NA : 1;
+ uint32_t Pre_BetaAffinity_NA : 1;
+ uint32_t Pre_BetaIdle_NA : 1;
+ uint32_t Post_X : 3;
+ uint32_t Post_Y : 3;
+} ScoreSchedSmpEdfReqSetAffinity_Entry;
+
+/**
+ * @brief Test context for spec:/score/sched/smp/edf/req/set-affinity test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the thread queue test context.
+ */
+ TQContext tq_ctx;
+
+ /**
+ * @brief This member specifies the task affinity before changing the
+ * affinity.
+ */
+ cpu_set_t task_affinity_before;
+
+ /**
+ * @brief This member specifies the task affinity after changing the
+ * affinity.
+ */
+ cpu_set_t task_affinity_after;
+
+ /**
+ * @brief This member specifies the priority of the task.
+ */
+ rtems_task_priority task_priority;
+
+ /**
+ * @brief If this member is true, then the task state shall be ready.
+ */
+ bool task_ready;
+
+ /**
+ * @brief If this member is true, then the task shall have obtained a sticky
+ * mutex.
+ */
+ bool task_sticky;
+
+ /**
+ * @brief If this member is true, then the task shall be pinned.
+ */
+ bool task_pinned;
+
+ /**
+ * @brief This member specifies the priority of the alpha task.
+ */
+ rtems_task_priority alpha_priority;
+
+ /**
+ * @brief This member specifies the affinity of the alpha task.
+ */
+ cpu_set_t alpha_affinity;
+
+ /**
+ * @brief If this member is true, then an idle task shall execute on behalf
+ * of the alpha task.
+ */
+ bool alpha_idle;
+
+ /**
+ * @brief This member specifies the priority of the beta task.
+ */
+ rtems_task_priority beta_priority;
+
+ /**
+ * @brief This member specifies the affinity of the beta task.
+ */
+ cpu_set_t beta_affinity;
+
+ /**
+ * @brief If this member is true, then an idle task shall execute on behalf
+ * of the beta task.
+ */
+ bool beta_idle;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 12 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreSchedSmpEdfReqSetAffinity_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreSchedSmpEdfReqSetAffinity_Context;
+
+static ScoreSchedSmpEdfReqSetAffinity_Context
+ ScoreSchedSmpEdfReqSetAffinity_Instance;
+
+static const char * const ScoreSchedSmpEdfReqSetAffinity_PreDesc_Before[] = {
+ "All",
+ "X",
+ "NA"
+};
+
+static const char * const ScoreSchedSmpEdfReqSetAffinity_PreDesc_After[] = {
+ "All",
+ "X",
+ "Y",
+ "NA"
+};
+
+static const char * const ScoreSchedSmpEdfReqSetAffinity_PreDesc_Priority[] = {
+ "High",
+ "Low",
+ "NA"
+};
+
+static const char * const ScoreSchedSmpEdfReqSetAffinity_PreDesc_State[] = {
+ "Ready",
+ "Blocked",
+ "NA"
+};
+
+static const char * const ScoreSchedSmpEdfReqSetAffinity_PreDesc_Sticky[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const ScoreSchedSmpEdfReqSetAffinity_PreDesc_Pinned[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const ScoreSchedSmpEdfReqSetAffinity_PreDesc_AlphaPriority[] = {
+ "High",
+ "Low",
+ "NA"
+};
+
+static const char * const ScoreSchedSmpEdfReqSetAffinity_PreDesc_AlphaAffinity[] = {
+ "All",
+ "X",
+ "NA"
+};
+
+static const char * const ScoreSchedSmpEdfReqSetAffinity_PreDesc_AlphaIdle[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const ScoreSchedSmpEdfReqSetAffinity_PreDesc_BetaPriority[] = {
+ "High",
+ "Low",
+ "NA"
+};
+
+static const char * const ScoreSchedSmpEdfReqSetAffinity_PreDesc_BetaAffinity[] = {
+ "All",
+ "Y",
+ "NA"
+};
+
+static const char * const ScoreSchedSmpEdfReqSetAffinity_PreDesc_BetaIdle[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const ScoreSchedSmpEdfReqSetAffinity_PreDesc[] = {
+ ScoreSchedSmpEdfReqSetAffinity_PreDesc_Before,
+ ScoreSchedSmpEdfReqSetAffinity_PreDesc_After,
+ ScoreSchedSmpEdfReqSetAffinity_PreDesc_Priority,
+ ScoreSchedSmpEdfReqSetAffinity_PreDesc_State,
+ ScoreSchedSmpEdfReqSetAffinity_PreDesc_Sticky,
+ ScoreSchedSmpEdfReqSetAffinity_PreDesc_Pinned,
+ ScoreSchedSmpEdfReqSetAffinity_PreDesc_AlphaPriority,
+ ScoreSchedSmpEdfReqSetAffinity_PreDesc_AlphaAffinity,
+ ScoreSchedSmpEdfReqSetAffinity_PreDesc_AlphaIdle,
+ ScoreSchedSmpEdfReqSetAffinity_PreDesc_BetaPriority,
+ ScoreSchedSmpEdfReqSetAffinity_PreDesc_BetaAffinity,
+ ScoreSchedSmpEdfReqSetAffinity_PreDesc_BetaIdle,
+ NULL
+};
+
+#define TASK TQ_BLOCKER_C
+
+#define ALPHA TQ_BLOCKER_A
+
+#define BETA TQ_BLOCKER_B
+
+static void ScoreSchedSmpEdfReqSetAffinity_Pre_Before_Prepare(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Before state
+)
+{
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_Before_All: {
+ /*
+ * While task ``T`` is affine to all processors of its home scheduler
+ * before the new thread to processor affinity is set.
+ */
+ CPU_FILL( &ctx->task_affinity_before );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_Before_X: {
+ /*
+ * While task ``T`` is affine to processor ``X`` before the new thread to
+ * processor affinity is set.
+ */
+ CPU_ZERO( &ctx->task_affinity_before );
+ CPU_SET( 0, &ctx->task_affinity_before );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_Before_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Pre_After_Prepare(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_After state
+)
+{
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_After_All: {
+ /*
+ * While task ``T`` is set to be affine to all processors of its home
+ * scheduler.
+ */
+ CPU_FILL( &ctx->task_affinity_after );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_After_X: {
+ /*
+ * While task ``T`` is set to be affine to processor ``X``.
+ */
+ CPU_ZERO( &ctx->task_affinity_after );
+ CPU_SET( 0, &ctx->task_affinity_after );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_After_Y: {
+ /*
+ * While task ``T`` is set to be affine to processor ``Y``.
+ */
+ CPU_ZERO( &ctx->task_affinity_after );
+ CPU_SET( 1, &ctx->task_affinity_after );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_After_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Pre_Priority_Prepare(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Priority state
+)
+{
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_Priority_High: {
+ /*
+ * While task ``T`` has a high priority.
+ */
+ ctx->task_priority = PRIO_HIGH;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_Priority_Low: {
+ /*
+ * While task ``T`` has a low priority.
+ */
+ ctx->task_priority = PRIO_NORMAL;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_Priority_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Pre_State_Prepare(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_State state
+)
+{
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_State_Ready: {
+ /*
+ * While task ``T`` is ready.
+ */
+ ctx->task_ready = true;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_State_Blocked: {
+ /*
+ * While task ``T`` is blocked.
+ */
+ ctx->task_ready = false;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_State_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Pre_Sticky_Prepare(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Sticky state
+)
+{
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_Sticky_Yes: {
+ /*
+ * While task ``T`` is sticky.
+ */
+ ctx->task_sticky = true;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_Sticky_No: {
+ /*
+ * While task ``T`` is not sticky.
+ */
+ ctx->task_sticky = false;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_Sticky_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Pre_Pinned_Prepare(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Pinned state
+)
+{
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_Pinned_Yes: {
+ /*
+ * While task ``T`` is pinned to a processor.
+ */
+ ctx->task_pinned = true;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_Pinned_No: {
+ /*
+ * While task ``T`` is not pinned to a processor.
+ */
+ ctx->task_pinned = false;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_Pinned_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaPriority_Prepare(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaPriority state
+)
+{
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaPriority_High: {
+ /*
+ * While task ``A`` has a high priority.
+ */
+ ctx->alpha_priority = PRIO_HIGH;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaPriority_Low: {
+ /*
+ * While task ``A`` has a low priority.
+ */
+ ctx->alpha_priority = PRIO_NORMAL;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaPriority_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaAffinity_Prepare(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaAffinity state
+)
+{
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaAffinity_All: {
+ /*
+ * While task ``A`` is affine to all processors of its home scheduler.
+ */
+ CPU_FILL( &ctx->alpha_affinity );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaAffinity_X: {
+ /*
+ * While task ``A`` is affine to processor ``X``.
+ */
+ CPU_ZERO( &ctx->alpha_affinity );
+ CPU_SET( 0, &ctx->alpha_affinity );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaAffinity_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaIdle_Prepare(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaIdle state
+)
+{
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaIdle_Yes: {
+ /*
+ * While task ``A`` is sticky, while task ``A`` is blocked.
+ */
+ ctx->alpha_idle = true;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaIdle_No: {
+ /*
+ * While task ``A`` is not sticky.
+ */
+ ctx->alpha_idle = false;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaIdle_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Pre_BetaPriority_Prepare(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaPriority state
+)
+{
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_BetaPriority_High: {
+ /*
+ * While task ``B`` has a high priority.
+ */
+ ctx->beta_priority = PRIO_HIGH;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_BetaPriority_Low: {
+ /*
+ * While task ``B`` has a low priority.
+ */
+ ctx->beta_priority = PRIO_NORMAL;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_BetaPriority_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Pre_BetaAffinity_Prepare(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaAffinity state
+)
+{
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_BetaAffinity_All: {
+ /*
+ * While task ``B`` is affine to all processors of its home scheduler.
+ */
+ CPU_FILL( &ctx->beta_affinity );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_BetaAffinity_Y: {
+ /*
+ * While task ``B`` is affine to processor ``Y``.
+ */
+ CPU_ZERO( &ctx->beta_affinity );
+ CPU_SET( 1, &ctx->beta_affinity );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_BetaAffinity_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Pre_BetaIdle_Prepare(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaIdle state
+)
+{
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_BetaIdle_Yes: {
+ /*
+ * While task ``B`` is sticky, while task ``B`` is blocked.
+ */
+ ctx->beta_idle = true;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_BetaIdle_No: {
+ /*
+ * While task ``B`` is not sticky,
+ */
+ ctx->beta_idle = false;
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Pre_BetaIdle_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Post_X_Check(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X state
+)
+{
+ const Per_CPU_Control *cpu;
+ const Thread_Control *scheduled;
+ const Scheduler_Node *scheduler_node;
+
+ cpu = _Per_CPU_Get_by_index( 0 );
+ scheduled = cpu->heir;
+
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Post_X_Task: {
+ /*
+ * The task ``T`` shall be scheduled on processor ``X``.
+ */
+ T_eq_ptr( scheduled, ctx->tq_ctx.worker_tcb[ TASK ] );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Post_X_TaskIdle: {
+ /*
+ * An idle task on behalf of task ``T`` shall be scheduled on processor
+ * ``X``.
+ */
+ T_true( scheduled->is_idle );
+ scheduler_node = _Thread_Scheduler_get_home_node(
+ ctx->tq_ctx.worker_tcb[ TASK ]
+ );
+ T_eq_ptr( scheduler_node->user, scheduled );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Post_X_Alpha: {
+ /*
+ * The task ``A`` shall be scheduled on processor ``X``.
+ */
+ T_eq_ptr( scheduled, ctx->tq_ctx.worker_tcb[ ALPHA ] );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Post_X_AlphaIdle: {
+ /*
+ * An idle task on behalf of task ``A`` shall be scheduled on processor
+ * ``X``.
+ */
+ T_true( scheduled->is_idle );
+ scheduler_node = _Thread_Scheduler_get_home_node(
+ ctx->tq_ctx.worker_tcb[ ALPHA ]
+ );
+ T_eq_ptr( scheduler_node->user, scheduled );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Post_X_Beta: {
+ /*
+ * The task ``B`` shall be scheduled on processor ``X``.
+ */
+ T_eq_ptr( scheduled, ctx->tq_ctx.worker_tcb[ BETA ] );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Post_X_BetaIdle: {
+ /*
+ * An idle task on behalf of task ``B`` shall be scheduled on processor
+ * ``X``.
+ */
+ T_true( scheduled->is_idle );
+ scheduler_node = _Thread_Scheduler_get_home_node(
+ ctx->tq_ctx.worker_tcb[ BETA ]
+ );
+ T_eq_ptr( scheduler_node->user, scheduled );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Post_X_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Post_Y_Check(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y state
+)
+{
+ const Per_CPU_Control *cpu;
+ const Thread_Control *scheduled;
+ const Scheduler_Node *scheduler_node;
+
+ cpu = _Per_CPU_Get_by_index( 1 );
+ scheduled = cpu->heir;
+
+ switch ( state ) {
+ case ScoreSchedSmpEdfReqSetAffinity_Post_Y_Task: {
+ /*
+ * The task ``T`` shall be scheduled on processor ``Y``.
+ */
+ T_eq_ptr( scheduled, ctx->tq_ctx.worker_tcb[ TASK ] );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Post_Y_TaskIdle: {
+ /*
+ * An idle task on behalf of task ``T`` shall be scheduled on processor
+ * ``Y``.
+ */
+ T_true( scheduled->is_idle );
+ scheduler_node = _Thread_Scheduler_get_home_node(
+ ctx->tq_ctx.worker_tcb[ TASK ]
+ );
+ T_eq_ptr( scheduler_node->user, scheduled );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Post_Y_Alpha: {
+ /*
+ * The task ``A`` shall be scheduled on processor ``Y``.
+ */
+ T_eq_ptr( scheduled, ctx->tq_ctx.worker_tcb[ ALPHA ] );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Post_Y_AlphaIdle: {
+ /*
+ * An idle task on behalf of task ``A`` shall be scheduled on processor
+ * ``Y``.
+ */
+ T_true( scheduled->is_idle );
+ scheduler_node = _Thread_Scheduler_get_home_node(
+ ctx->tq_ctx.worker_tcb[ ALPHA ]
+ );
+ T_eq_ptr( scheduler_node->user, scheduled );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Post_Y_Beta: {
+ /*
+ * The task ``B`` shall be scheduled on processor ``Y``.
+ */
+ T_eq_ptr( scheduled, ctx->tq_ctx.worker_tcb[ BETA ] );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Post_Y_BetaIdle: {
+ /*
+ * An idle task on behalf of task ``B`` shall be scheduled on processor
+ * ``Y``.
+ */
+ T_true( scheduled->is_idle );
+ scheduler_node = _Thread_Scheduler_get_home_node(
+ ctx->tq_ctx.worker_tcb[ BETA ]
+ );
+ T_eq_ptr( scheduler_node->user, scheduled );
+ break;
+ }
+
+ case ScoreSchedSmpEdfReqSetAffinity_Post_Y_NA:
+ break;
+ }
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Setup(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_id mutex_a;
+ rtems_id mutex_b;
+ rtems_id mutex_c;
+
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->tq_ctx.deadlock = TQ_DEADLOCK_STATUS;
+ ctx->tq_ctx.enqueue_prepare = TQEnqueuePrepareDefault;
+ ctx->tq_ctx.enqueue_done = TQEnqueueDoneDefault;
+ ctx->tq_ctx.enqueue = TQEnqueueClassicSem;
+ ctx->tq_ctx.surrender = TQSurrenderClassicSem;
+ ctx->tq_ctx.get_owner = TQGetOwnerClassicSem;
+ ctx->tq_ctx.convert_status = TQConvertStatusClassic;
+ TQInitialize( &ctx->tq_ctx );
+
+ DeleteMutex( ctx->tq_ctx.mutex_id[ TQ_MUTEX_A ] );
+ DeleteMutex( ctx->tq_ctx.mutex_id[ TQ_MUTEX_B ] );
+ DeleteMutex( ctx->tq_ctx.mutex_id[ TQ_MUTEX_C ] );
+
+ mutex_a = 0;
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'T', 'X', 'A' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
+ PRIO_LOW,
+ &mutex_a
+ );
+ T_rsc_success( sc );
+
+ mutex_b = 0;
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'T', 'X', 'B' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
+ PRIO_VERY_LOW,
+ &mutex_b
+ );
+ T_rsc_success( sc );
+
+ mutex_c = 0;
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'T', 'X', 'C' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
+ PRIO_NORMAL,
+ &mutex_c
+ );
+ T_rsc_success( sc );
+
+ ctx->tq_ctx.mutex_id[ TQ_MUTEX_A ] = mutex_a;
+ ctx->tq_ctx.mutex_id[ TQ_MUTEX_B ] = mutex_b;
+ ctx->tq_ctx.mutex_id[ TQ_MUTEX_C ] = mutex_c;
+
+ RemoveProcessor( SCHEDULER_B_ID, 1 );
+ AddProcessor( SCHEDULER_A_ID, 1 );
+
+ TQSetPriority( &ctx->tq_ctx, TASK, PRIO_NORMAL );
+ TQSetPriority( &ctx->tq_ctx, ALPHA, PRIO_LOW );
+ TQSetPriority( &ctx->tq_ctx, BETA, PRIO_VERY_LOW );
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Setup_Wrap( void *arg )
+{
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreSchedSmpEdfReqSetAffinity_Setup( ctx );
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Teardown(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx
+)
+{
+ SetSelfAffinityAll();
+ TQDestroy( &ctx->tq_ctx );
+ RemoveProcessor( SCHEDULER_A_ID, 1 );
+ AddProcessor( SCHEDULER_B_ID, 1 );
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Teardown_Wrap( void *arg )
+{
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreSchedSmpEdfReqSetAffinity_Teardown( ctx );
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Action(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx
+)
+{
+ rtems_event_set events;
+
+ SetSelfPriority( PRIO_ULTRA_HIGH );
+ SetSelfAffinityAll();
+
+ if ( ctx->beta_idle ) {
+ events = TQ_EVENT_MUTEX_B_OBTAIN;
+ TQSendAndWaitForExecutionStop( &ctx->tq_ctx, BETA, events );
+ } else {
+ ctx->tq_ctx.busy_wait[ BETA ] = true;
+ events = TQ_EVENT_BUSY_WAIT;
+ TQSendAndSynchronizeRunner( &ctx->tq_ctx, BETA, events );
+ }
+
+ if ( ctx->alpha_idle ) {
+ events = TQ_EVENT_MUTEX_A_OBTAIN;
+ TQSendAndWaitForExecutionStop( &ctx->tq_ctx, ALPHA, events );
+ } else {
+ ctx->tq_ctx.busy_wait[ ALPHA ] = true;
+ events = TQ_EVENT_BUSY_WAIT;
+ TQSendAndSynchronizeRunner( &ctx->tq_ctx, ALPHA, events );
+ }
+
+ if ( ctx->task_pinned ) {
+ SetSelfAffinityOne( 1 );
+ TQSendAndSynchronizeRunner( &ctx->tq_ctx, TASK, TQ_EVENT_PIN );
+ SetSelfAffinityAll();
+ }
+
+ if ( ctx->task_ready ) {
+ ctx->tq_ctx.busy_wait[ TASK ] = true;
+ events = TQ_EVENT_BUSY_WAIT;
+ } else {
+ events = 0;
+ }
+
+ if ( ctx->task_sticky ) {
+ events |= TQ_EVENT_MUTEX_C_OBTAIN;
+ }
+
+ TQSendAndSynchronizeRunner( &ctx->tq_ctx, TASK, events );
+
+ if ( !ctx->task_ready ) {
+ TQWaitForExecutionStop( &ctx->tq_ctx, TASK );
+ }
+
+ (void) _Thread_Dispatch_disable();
+
+ SetAffinity( ctx->tq_ctx.worker_id[ TASK ], &ctx->task_affinity_before );
+ SetAffinity( ctx->tq_ctx.worker_id[ ALPHA ], &ctx->alpha_affinity );
+ SetAffinity( ctx->tq_ctx.worker_id[ BETA ], &ctx->beta_affinity );
+ SetSelfAffinityOne( 1 );
+ TQSetPriority( &ctx->tq_ctx, TASK, ctx->task_priority );
+ SetSelfPriority( PRIO_ULTRA_LOW );
+ TQSetPriority( &ctx->tq_ctx, ALPHA, ctx->alpha_priority );
+ TQSetPriority( &ctx->tq_ctx, BETA, ctx->beta_priority );
+
+ SetAffinity( ctx->tq_ctx.worker_id[ TASK ], &ctx->task_affinity_after );
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_Cleanup(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx
+)
+{
+ rtems_event_set events;
+
+ SetSelfPriority( PRIO_ULTRA_HIGH );
+ _Thread_Dispatch_enable( _Per_CPU_Get() );
+
+ SetSelfAffinityAll();
+
+ ctx->tq_ctx.busy_wait[ TASK ] = false;
+ ctx->tq_ctx.busy_wait[ ALPHA ] = false;
+ ctx->tq_ctx.busy_wait[ BETA ] = false;
+
+ TQSetPriority( &ctx->tq_ctx, TASK, PRIO_NORMAL );
+ TQSetPriority( &ctx->tq_ctx, ALPHA, PRIO_LOW );
+ TQSetPriority( &ctx->tq_ctx, BETA, PRIO_VERY_LOW );
+
+ if ( ctx->task_sticky ) {
+ events = TQ_EVENT_MUTEX_C_RELEASE;
+ } else {
+ events = 0;
+ }
+
+ if ( ctx->task_pinned ) {
+ events |= TQ_EVENT_UNPIN;
+ }
+
+ if ( events != 0 ) {
+ TQSendAndWaitForExecutionStop( &ctx->tq_ctx, TASK, events );
+ } else {
+ TQWaitForExecutionStop( &ctx->tq_ctx, TASK );
+ }
+
+ SetAffinityAll( ctx->tq_ctx.worker_id[ TASK ] );
+ SetAffinityAll( ctx->tq_ctx.worker_id[ ALPHA ] );
+
+ if ( ctx->alpha_idle ) {
+ events = TQ_EVENT_MUTEX_A_RELEASE;
+ } else {
+ events = 0;
+ }
+
+ if ( events != 0 ) {
+ TQSendAndWaitForExecutionStop( &ctx->tq_ctx, ALPHA, events );
+ } else {
+ TQWaitForExecutionStop( &ctx->tq_ctx, ALPHA );
+ }
+
+ SetAffinityAll( ctx->tq_ctx.worker_id[ BETA ] );
+
+ if ( ctx->beta_idle ) {
+ events = TQ_EVENT_MUTEX_B_RELEASE;
+ } else {
+ events = 0;
+ }
+
+ if ( events != 0 ) {
+ TQSendAndWaitForExecutionStop( &ctx->tq_ctx, BETA, events );
+ } else {
+ TQWaitForExecutionStop( &ctx->tq_ctx, BETA );
+ }
+}
+
+static const ScoreSchedSmpEdfReqSetAffinity_Entry
+ScoreSchedSmpEdfReqSetAffinity_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_NA,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_AlphaIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_BetaIdle },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_AlphaIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Beta },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Alpha,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_BetaIdle },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Alpha,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Beta },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Task,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_BetaIdle },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Task,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Beta },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Task,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_AlphaIdle },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Task,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Alpha },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_AlphaIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Task },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Alpha,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Task },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_BetaIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_AlphaIdle },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Beta,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_AlphaIdle },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_BetaIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Alpha },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Beta,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Alpha },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_AlphaIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_TaskIdle },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Alpha,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_TaskIdle },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_TaskIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_BetaIdle },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_TaskIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Beta },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_TaskIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_AlphaIdle },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_TaskIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Alpha },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_BetaIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Task },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Beta,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Task },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_BetaIdle,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_TaskIdle },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Beta,
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_TaskIdle }
+};
+
+static const uint8_t
+ScoreSchedSmpEdfReqSetAffinity_Map[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 7, 7, 9, 9, 13, 14, 3, 4,
+ 8, 8, 10, 10, 1, 2, 1, 2, 9, 9, 9, 9, 3, 4, 3, 4, 10, 10, 10, 10, 5, 6, 5, 6,
+ 7, 7, 9, 9, 5, 6, 5, 6, 8, 8, 10, 10, 5, 6, 5, 6, 9, 9, 9, 9, 5, 6, 5, 6, 10,
+ 10, 10, 10, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 5, 6, 5, 6, 5, 6,
+ 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7, 7, 7, 7, 5, 6, 5, 6, 8, 8, 8, 8,
+ 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 11, 12, 1, 2, 7, 7, 9, 9, 13,
+ 14, 3, 4, 8, 8, 10, 10, 1, 2, 1, 2, 9, 9, 9, 9, 3, 4, 3, 4, 10, 10, 10, 10,
+ 5, 6, 5, 6, 7, 7, 9, 9, 5, 6, 5, 6, 8, 8, 10, 10, 5, 6, 5, 6, 9, 9, 9, 9, 5,
+ 6, 5, 6, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2,
+ 19, 19, 15, 15, 13, 14, 3, 4, 20, 20, 16, 16, 1, 2, 1, 2, 15, 15, 15, 15, 3,
+ 4, 3, 4, 16, 16, 16, 16, 17, 18, 17, 18, 19, 19, 15, 15, 17, 18, 17, 18, 20,
+ 20, 16, 16, 17, 18, 17, 18, 15, 15, 15, 15, 17, 18, 17, 18, 16, 16, 16, 16,
+ 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4,
+ 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2,
+ 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4,
+ 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2,
+ 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 11, 12, 1, 2, 13, 14, 3, 4, 13,
+ 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 11, 12,
+ 1, 2, 3, 4, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3,
+ 4, 11, 12, 1, 2, 7, 7, 7, 7, 13, 14, 3, 4, 8, 8, 8, 8, 1, 2, 1, 2, 1, 2, 1,
+ 2, 3, 4, 3, 4, 3, 4, 3, 4, 5, 6, 5, 6, 7, 7, 7, 7, 5, 6, 5, 6, 8, 8, 8, 8, 5,
+ 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 11, 12, 1, 2, 11, 12, 1, 2, 13,
+ 14, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2,
+ 1, 2, 11, 12, 1, 2, 3, 4, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4,
+ 3, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 11, 12,
+ 1, 2, 13, 14, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4,
+ 3, 4, 1, 2, 1, 2, 11, 12, 1, 2, 3, 4, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2,
+ 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4,
+ 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4,
+ 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2,
+ 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4,
+ 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2,
+ 3, 4, 3, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 7,
+ 7, 7, 7, 13, 14, 3, 4, 8, 8, 8, 8, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4,
+ 3, 4, 5, 6, 5, 6, 7, 7, 7, 7, 5, 6, 5, 6, 8, 8, 8, 8, 5, 6, 5, 6, 5, 6, 5, 6,
+ 5, 6, 5, 6, 5, 6, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 5, 6,
+ 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7, 7, 7, 7, 5, 6, 5, 6,
+ 8, 8, 8, 8, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 11, 12, 1, 2, 7,
+ 7, 7, 7, 13, 14, 3, 4, 8, 8, 8, 8, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4,
+ 3, 4, 5, 6, 5, 6, 7, 7, 7, 7, 5, 6, 5, 6, 8, 8, 8, 8, 5, 6, 5, 6, 5, 6, 5, 6,
+ 5, 6, 5, 6, 5, 6, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 19,
+ 19, 19, 19, 13, 14, 3, 4, 20, 20, 20, 20, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4,
+ 3, 4, 3, 4, 17, 18, 17, 18, 19, 19, 19, 19, 17, 18, 17, 18, 20, 20, 20, 20,
+ 17, 18, 17, 18, 17, 18, 17, 18, 17, 18, 17, 18, 17, 18, 17, 18, 1, 2, 1, 2,
+ 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4,
+ 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2,
+ 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2,
+ 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4,
+ 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 11, 12, 1, 2, 13, 14, 3, 4, 13, 14, 3, 4, 1,
+ 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 11, 12, 1, 2, 3, 4,
+ 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 11, 12,
+ 1, 2, 7, 7, 7, 7, 13, 14, 3, 4, 8, 8, 8, 8, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3,
+ 4, 3, 4, 3, 4, 5, 6, 5, 6, 7, 7, 7, 7, 5, 6, 5, 6, 8, 8, 8, 8, 5, 6, 5, 6, 5,
+ 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 11, 12, 1, 2, 11, 12, 1, 2, 13, 14, 3, 4,
+ 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 11,
+ 12, 1, 2, 3, 4, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4,
+ 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 11, 12, 1, 2, 13, 14,
+ 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1,
+ 2, 11, 12, 1, 2, 3, 4, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3,
+ 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1,
+ 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3,
+ 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3,
+ 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1,
+ 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3,
+ 4, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 9, 9, 9, 9, 13,
+ 14, 3, 4, 10, 10, 10, 10, 1, 2, 1, 2, 9, 9, 9, 9, 3, 4, 3, 4, 10, 10, 10, 10,
+ 21, 22, 1, 2, 9, 9, 9, 9, 21, 22, 3, 4, 10, 10, 10, 10, 21, 22, 1, 2, 9, 9,
+ 9, 9, 21, 22, 3, 4, 10, 10, 10, 10, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8,
+ 8, 8, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7, 7, 7, 7,
+ 5, 6, 5, 6, 8, 8, 8, 8, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 11,
+ 12, 1, 2, 9, 9, 9, 9, 13, 14, 3, 4, 10, 10, 10, 10, 1, 2, 1, 2, 9, 9, 9, 9,
+ 3, 4, 3, 4, 10, 10, 10, 10, 21, 22, 1, 2, 9, 9, 9, 9, 21, 22, 3, 4, 10, 10,
+ 10, 10, 21, 22, 1, 2, 9, 9, 9, 9, 21, 22, 3, 4, 10, 10, 10, 10, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 15, 15, 15, 15, 13, 14, 3, 4, 16, 16,
+ 16, 16, 1, 2, 1, 2, 15, 15, 15, 15, 3, 4, 3, 4, 16, 16, 16, 16, 23, 24, 1, 2,
+ 15, 15, 15, 15, 23, 24, 3, 4, 16, 16, 16, 16, 23, 24, 1, 2, 15, 15, 15, 15,
+ 23, 24, 3, 4, 16, 16, 16, 16, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4,
+ 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4,
+ 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2,
+ 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4,
+ 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2,
+ 3, 4, 3, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 11,
+ 12, 1, 2, 13, 14, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3,
+ 4, 3, 4, 1, 2, 1, 2, 11, 12, 1, 2, 3, 4, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1,
+ 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 11, 12, 1, 2, 7, 7, 7, 7, 13, 14, 3, 4, 8,
+ 8, 8, 8, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 5, 6, 5, 6, 7, 7, 7,
+ 7, 5, 6, 5, 6, 8, 8, 8, 8, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6,
+ 11, 12, 1, 2, 11, 12, 1, 2, 13, 14, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1,
+ 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 11, 12, 1, 2, 3, 4, 3, 4, 13, 14, 3,
+ 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 11, 12, 1, 2, 11, 12, 1, 2, 13, 14, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2,
+ 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 11, 12, 1, 2, 3, 4, 3, 4, 13,
+ 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2,
+ 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4,
+ 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4,
+ 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2,
+ 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4,
+ 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 11, 12, 1, 2, 7, 7, 9, 9, 13, 14, 3, 4, 8, 8, 10, 10, 1, 2, 1, 2,
+ 9, 9, 9, 9, 3, 4, 3, 4, 10, 10, 10, 10, 5, 6, 5, 6, 7, 7, 9, 9, 5, 6, 5, 6,
+ 8, 8, 10, 10, 5, 6, 5, 6, 9, 9, 9, 9, 5, 6, 5, 6, 10, 10, 10, 10, 7, 7, 7, 7,
+ 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6,
+ 5, 6, 5, 6, 5, 6, 7, 7, 7, 7, 5, 6, 5, 6, 8, 8, 8, 8, 5, 6, 5, 6, 5, 6, 5, 6,
+ 5, 6, 5, 6, 5, 6, 5, 6, 11, 12, 1, 2, 7, 7, 9, 9, 13, 14, 3, 4, 8, 8, 10, 10,
+ 1, 2, 1, 2, 9, 9, 9, 9, 3, 4, 3, 4, 10, 10, 10, 10, 5, 6, 5, 6, 7, 7, 9, 9,
+ 5, 6, 5, 6, 8, 8, 10, 10, 5, 6, 5, 6, 9, 9, 9, 9, 5, 6, 5, 6, 10, 10, 10, 10,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 19, 19, 15, 15, 13, 14, 3,
+ 4, 20, 20, 16, 16, 1, 2, 1, 2, 15, 15, 15, 15, 3, 4, 3, 4, 16, 16, 16, 16,
+ 17, 18, 17, 18, 19, 19, 15, 15, 17, 18, 17, 18, 20, 20, 16, 16, 17, 18, 17,
+ 18, 15, 15, 15, 15, 17, 18, 17, 18, 16, 16, 16, 16, 1, 2, 1, 2, 1, 2, 1, 2,
+ 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2,
+ 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4,
+ 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2,
+ 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4,
+ 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 11, 12, 1, 2, 11, 12, 1, 2, 13, 14, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1,
+ 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 11, 12, 1, 2, 3, 4, 3, 4, 13,
+ 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 11, 12, 1, 2, 7, 7,
+ 7, 7, 13, 14, 3, 4, 8, 8, 8, 8, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3,
+ 4, 5, 6, 5, 6, 7, 7, 7, 7, 5, 6, 5, 6, 8, 8, 8, 8, 5, 6, 5, 6, 5, 6, 5, 6, 5,
+ 6, 5, 6, 5, 6, 5, 6, 11, 12, 1, 2, 11, 12, 1, 2, 13, 14, 3, 4, 13, 14, 3, 4,
+ 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 11, 12, 1, 2, 3,
+ 4, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 11, 12, 1, 2, 13, 14, 3, 4, 13,
+ 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 11, 12,
+ 1, 2, 3, 4, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3,
+ 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3,
+ 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1,
+ 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3,
+ 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1,
+ 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 7, 7, 7, 7, 13, 14, 3, 4, 8,
+ 8, 8, 8, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 5, 6, 5, 6, 7, 7, 7,
+ 7, 5, 6, 5, 6, 8, 8, 8, 8, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7,
+ 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5,
+ 6, 5, 6, 5, 6, 5, 6, 5, 6, 7, 7, 7, 7, 5, 6, 5, 6, 8, 8, 8, 8, 5, 6, 5, 6, 5,
+ 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 11, 12, 1, 2, 7, 7, 7, 7, 13, 14, 3, 4, 8,
+ 8, 8, 8, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 5, 6, 5, 6, 7, 7, 7,
+ 7, 5, 6, 5, 6, 8, 8, 8, 8, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 19, 19, 19, 19, 13, 14, 3, 4,
+ 20, 20, 20, 20, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 17, 18, 17,
+ 18, 19, 19, 19, 19, 17, 18, 17, 18, 20, 20, 20, 20, 17, 18, 17, 18, 17, 18,
+ 17, 18, 17, 18, 17, 18, 17, 18, 17, 18, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4,
+ 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2,
+ 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4,
+ 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4,
+ 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2,
+ 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
+ 12, 1, 2, 11, 12, 1, 2, 13, 14, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2,
+ 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 11, 12, 1, 2, 3, 4, 3, 4, 13, 14, 3, 4,
+ 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 11, 12, 1, 2, 7, 7, 7, 7, 13,
+ 14, 3, 4, 8, 8, 8, 8, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 5, 6,
+ 5, 6, 7, 7, 7, 7, 5, 6, 5, 6, 8, 8, 8, 8, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6,
+ 5, 6, 5, 6, 11, 12, 1, 2, 11, 12, 1, 2, 13, 14, 3, 4, 13, 14, 3, 4, 1, 2, 1,
+ 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 11, 12, 1, 2, 3, 4, 3, 4,
+ 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 11, 12, 1, 2, 13, 14, 3, 4, 13, 14, 3, 4,
+ 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 11, 12, 1, 2, 3,
+ 4, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2,
+ 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4,
+ 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2,
+ 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4,
+ 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4,
+ 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 9, 9, 9, 9, 13, 14, 3, 4, 10, 10, 10,
+ 10, 1, 2, 1, 2, 9, 9, 9, 9, 3, 4, 3, 4, 10, 10, 10, 10, 21, 22, 1, 2, 9, 9,
+ 9, 9, 21, 22, 3, 4, 10, 10, 10, 10, 21, 22, 1, 2, 9, 9, 9, 9, 21, 22, 3, 4,
+ 10, 10, 10, 10, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 5, 6, 5, 6,
+ 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7, 7, 7, 7, 5, 6, 5, 6, 8, 8,
+ 8, 8, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 11, 12, 1, 2, 9, 9, 9,
+ 9, 13, 14, 3, 4, 10, 10, 10, 10, 1, 2, 1, 2, 9, 9, 9, 9, 3, 4, 3, 4, 10, 10,
+ 10, 10, 21, 22, 1, 2, 9, 9, 9, 9, 21, 22, 3, 4, 10, 10, 10, 10, 21, 22, 1, 2,
+ 9, 9, 9, 9, 21, 22, 3, 4, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 11, 12, 1, 2, 15, 15, 15, 15, 13, 14, 3, 4, 16, 16, 16, 16, 1, 2, 1, 2, 15,
+ 15, 15, 15, 3, 4, 3, 4, 16, 16, 16, 16, 23, 24, 1, 2, 15, 15, 15, 15, 23, 24,
+ 3, 4, 16, 16, 16, 16, 23, 24, 1, 2, 15, 15, 15, 15, 23, 24, 3, 4, 16, 16, 16,
+ 16, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2,
+ 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2,
+ 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4,
+ 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2,
+ 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 11, 12, 1, 2, 13, 14, 3, 4,
+ 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 11,
+ 12, 1, 2, 3, 4, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4,
+ 3, 4, 11, 12, 1, 2, 7, 7, 7, 7, 13, 14, 3, 4, 8, 8, 8, 8, 1, 2, 1, 2, 1, 2,
+ 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 5, 6, 5, 6, 7, 7, 7, 7, 5, 6, 5, 6, 8, 8, 8, 8,
+ 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 11, 12, 1, 2, 11, 12, 1, 2,
+ 13, 14, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4,
+ 1, 2, 1, 2, 11, 12, 1, 2, 3, 4, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2,
+ 3, 4, 3, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 1, 2, 11,
+ 12, 1, 2, 13, 14, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3,
+ 4, 3, 4, 1, 2, 1, 2, 11, 12, 1, 2, 3, 4, 3, 4, 13, 14, 3, 4, 1, 2, 1, 2, 1,
+ 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3,
+ 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3,
+ 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1,
+ 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3,
+ 4, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 2, 1, 2, 1,
+ 2, 3, 4, 3, 4, 3, 4, 3, 4
+};
+
+static size_t ScoreSchedSmpEdfReqSetAffinity_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ ScoreSchedSmpEdfReqSetAffinity_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreSchedSmpEdfReqSetAffinity_Fixture = {
+ .setup = ScoreSchedSmpEdfReqSetAffinity_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreSchedSmpEdfReqSetAffinity_Teardown_Wrap,
+ .scope = ScoreSchedSmpEdfReqSetAffinity_Scope,
+ .initial_context = &ScoreSchedSmpEdfReqSetAffinity_Instance
+};
+
+static inline ScoreSchedSmpEdfReqSetAffinity_Entry
+ScoreSchedSmpEdfReqSetAffinity_PopEntry(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreSchedSmpEdfReqSetAffinity_Entries[
+ ScoreSchedSmpEdfReqSetAffinity_Map[ index ]
+ ];
+}
+
+static void ScoreSchedSmpEdfReqSetAffinity_TestVariant(
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx
+)
+{
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Before_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ ScoreSchedSmpEdfReqSetAffinity_Pre_After_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Priority_Prepare(
+ ctx,
+ ctx->Map.pcs[ 2 ]
+ );
+ ScoreSchedSmpEdfReqSetAffinity_Pre_State_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Sticky_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ ScoreSchedSmpEdfReqSetAffinity_Pre_Pinned_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaPriority_Prepare(
+ ctx,
+ ctx->Map.pcs[ 6 ]
+ );
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaAffinity_Prepare(
+ ctx,
+ ctx->Map.pcs[ 7 ]
+ );
+ ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaIdle_Prepare(
+ ctx,
+ ctx->Map.pcs[ 8 ]
+ );
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaPriority_Prepare(
+ ctx,
+ ctx->Map.pcs[ 9 ]
+ );
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaAffinity_Prepare(
+ ctx,
+ ctx->Map.pcs[ 10 ]
+ );
+ ScoreSchedSmpEdfReqSetAffinity_Pre_BetaIdle_Prepare(
+ ctx,
+ ctx->Map.pcs[ 11 ]
+ );
+ ScoreSchedSmpEdfReqSetAffinity_Action( ctx );
+ ScoreSchedSmpEdfReqSetAffinity_Post_X_Check( ctx, ctx->Map.entry.Post_X );
+ ScoreSchedSmpEdfReqSetAffinity_Post_Y_Check( ctx, ctx->Map.entry.Post_Y );
+}
+
+/**
+ * @fn void T_case_body_ScoreSchedSmpEdfReqSetAffinity( void )
+ */
+T_TEST_CASE_FIXTURE(
+ ScoreSchedSmpEdfReqSetAffinity,
+ &ScoreSchedSmpEdfReqSetAffinity_Fixture
+)
+{
+ ScoreSchedSmpEdfReqSetAffinity_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreSchedSmpEdfReqSetAffinity_Pre_Before_All;
+ ctx->Map.pcs[ 0 ] < ScoreSchedSmpEdfReqSetAffinity_Pre_Before_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = ScoreSchedSmpEdfReqSetAffinity_Pre_After_All;
+ ctx->Map.pcs[ 1 ] < ScoreSchedSmpEdfReqSetAffinity_Pre_After_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = ScoreSchedSmpEdfReqSetAffinity_Pre_Priority_High;
+ ctx->Map.pcs[ 2 ] < ScoreSchedSmpEdfReqSetAffinity_Pre_Priority_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = ScoreSchedSmpEdfReqSetAffinity_Pre_State_Ready;
+ ctx->Map.pcs[ 3 ] < ScoreSchedSmpEdfReqSetAffinity_Pre_State_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = ScoreSchedSmpEdfReqSetAffinity_Pre_Sticky_Yes;
+ ctx->Map.pcs[ 4 ] < ScoreSchedSmpEdfReqSetAffinity_Pre_Sticky_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = ScoreSchedSmpEdfReqSetAffinity_Pre_Pinned_Yes;
+ ctx->Map.pcs[ 5 ] < ScoreSchedSmpEdfReqSetAffinity_Pre_Pinned_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 6 ] = ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaPriority_High;
+ ctx->Map.pcs[ 6 ] < ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaPriority_NA;
+ ++ctx->Map.pcs[ 6 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 7 ] = ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaAffinity_All;
+ ctx->Map.pcs[ 7 ] < ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaAffinity_NA;
+ ++ctx->Map.pcs[ 7 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 8 ] = ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaIdle_Yes;
+ ctx->Map.pcs[ 8 ] < ScoreSchedSmpEdfReqSetAffinity_Pre_AlphaIdle_NA;
+ ++ctx->Map.pcs[ 8 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 9 ] = ScoreSchedSmpEdfReqSetAffinity_Pre_BetaPriority_High;
+ ctx->Map.pcs[ 9 ] < ScoreSchedSmpEdfReqSetAffinity_Pre_BetaPriority_NA;
+ ++ctx->Map.pcs[ 9 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 10 ] = ScoreSchedSmpEdfReqSetAffinity_Pre_BetaAffinity_All;
+ ctx->Map.pcs[ 10 ] < ScoreSchedSmpEdfReqSetAffinity_Pre_BetaAffinity_NA;
+ ++ctx->Map.pcs[ 10 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 11 ] = ScoreSchedSmpEdfReqSetAffinity_Pre_BetaIdle_Yes;
+ ctx->Map.pcs[ 11 ] < ScoreSchedSmpEdfReqSetAffinity_Pre_BetaIdle_NA;
+ ++ctx->Map.pcs[ 11 ]
+ ) {
+ ctx->Map.entry =
+ ScoreSchedSmpEdfReqSetAffinity_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ ScoreSchedSmpEdfReqSetAffinity_TestVariant( ctx );
+ ScoreSchedSmpEdfReqSetAffinity_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sched-smp-edf.c b/testsuites/validation/tc-sched-smp-edf.c
new file mode 100644
index 0000000000..7b07813ee1
--- /dev/null
+++ b/testsuites/validation/tc-sched-smp-edf.c
@@ -0,0 +1,111 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSchedSmpEdfValEdf
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSchedSmpEdfValEdf spec:/score/sched/smp/edf/val/edf
+ *
+ * @ingroup TestsuitesValidationSmpOnly0
+ *
+ * @brief Tests for operations of the EDF SMP scheduler.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate a set affinity error case with an unsupported subset.
+ *
+ * @{
+ */
+
+/**
+ * @brief Validate a set affinity error case with an unsupported subset.
+ */
+static void ScoreSchedSmpEdfValEdf_Action_0( void )
+{
+ if ( rtems_scheduler_get_processor_maximum() >= 3 ) {
+ rtems_status_code sc;
+ cpu_set_t affinity;
+
+ CPU_ZERO( &affinity );
+ CPU_SET( 0, &affinity );
+ CPU_SET( 1, &affinity );
+
+ RemoveProcessor( SCHEDULER_B_ID, 1 );
+ RemoveProcessor( SCHEDULER_C_ID, 2 );
+ AddProcessor( SCHEDULER_A_ID, 1 );
+ AddProcessor( SCHEDULER_B_ID, 2 );
+
+ sc = rtems_task_set_affinity( RTEMS_SELF, sizeof( affinity), &affinity );
+ T_rsc( sc, RTEMS_INVALID_NUMBER );
+
+ RemoveProcessor( SCHEDULER_A_ID, 1 );
+ RemoveProcessor( SCHEDULER_B_ID, 2 );
+ AddProcessor( SCHEDULER_B_ID, 1 );
+ AddProcessor( SCHEDULER_C_ID, 2 );
+ }
+}
+
+/**
+ * @fn void T_case_body_ScoreSchedSmpEdfValEdf( void )
+ */
+T_TEST_CASE( ScoreSchedSmpEdfValEdf )
+{
+ ScoreSchedSmpEdfValEdf_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sched-smp.c b/testsuites/validation/tc-sched-smp.c
new file mode 100644
index 0000000000..3e8e3fe1a2
--- /dev/null
+++ b/testsuites/validation/tc-sched-smp.c
@@ -0,0 +1,1404 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSchedSmpValSmp
+ */
+
+/*
+ * Copyright (C) 2021, 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/test-scheduler.h>
+#include <rtems/score/percpu.h>
+#include <rtems/score/schedulersmp.h>
+#include <rtems/score/threadimpl.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSchedSmpValSmp spec:/score/sched/smp/val/smp
+ *
+ * @ingroup TestsuitesValidationSmpOnly0
+ *
+ * @brief Tests SMP-specific scheduler behaviour.
+ *
+ * This test case performs the following actions:
+ *
+ * - Construct a system state in which a sticky thread is blocked while an idle
+ * thread executes on behalf of the thread.
+ *
+ * - Block the sticky worker A while it uses an idle thread in the home
+ * scheduler.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a thread is preempted while it is
+ * blocked.
+ *
+ * - Block worker A and preempt it before the withdraw node operations are
+ * performed for worker A.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a thread is rescheduled while it is not
+ * scheduled on another scheduler.
+ *
+ * - Reschedule worker A by the home scheduler while worker A is not
+ * scheduled on another scheduler.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which an ask for help request is cancelled
+ * while it is processed on another processor.
+ *
+ * - Unblock worker A. It cannot be scheduled on its home scheduler.
+ * Intercept the ask for help request. Block the worker A. This will
+ * cancel the ask for help request. Remove the request while the other
+ * processor tries to cancel the request.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a scheduler tries to schedule a node
+ * those owner thread is already scheduled during a block operation.
+ *
+ * - Block the runner thread while the owner thread of the highest priority
+ * ready node is already scheduled.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a scheduler tries to schedule a node
+ * those owner thread is blocked during a block operation.
+ *
+ * - Block the runner thread while the owner thread of the highest priority
+ * ready node is blocked.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a scheduler tries to schedule a node
+ * those owner thread is already scheduled during a set affinity operation.
+ *
+ * - Set the affinity of the runner thread while the owner thread of the
+ * highest priority ready node is already scheduled.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a scheduler tries to schedule a node
+ * those owner thread is already scheduled during a set affinity operation
+ * while a sticky node is involved.
+ *
+ * - Set the affinity of the runner thread while the owner thread of the
+ * highest priority ready node is already scheduled.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a scheduler tries to schedule a node
+ * those owner thread is blocked during a set affinity operation.
+ *
+ * - Set the affinity of the runner thread while the owner thread of the
+ * highest priority ready node is blocked.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a scheduler tries to schedule a node
+ * those owner thread is blocked during a set affinity operation while a
+ * sticky node is involved.
+ *
+ * - Set the affinity of the runner thread while the owner thread of the
+ * highest priority ready node is blocked.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a scheduler tries to schedule a node
+ * those owner thread is already scheduled during a set priority operation.
+ *
+ * - Set the priority of the runner thread while the owner thread of the
+ * highest priority ready node is already scheduled.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a scheduler tries to schedule a node
+ * those owner thread is already scheduled during a set priority operation
+ * while a sticky node is involved.
+ *
+ * - Set the priority of the runner thread while the owner thread of the
+ * highest priority ready node is already scheduled.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a scheduler tries to schedule a node
+ * those owner thread is blocked during a set priority operation.
+ *
+ * - Set the priority of the runner thread while the owner thread of the
+ * highest priority ready node is blocked.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a scheduler tries to schedule a node
+ * those owner thread is already scheduled during a yield operation.
+ *
+ * - Yield while the owner thread of the highest priority ready node is
+ * already scheduled.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a scheduler tries to schedule a node
+ * those owner thread is already scheduled during a yield operation while a
+ * sticky node is involved.
+ *
+ * - Yield while the owner thread of the highest priority ready node is
+ * already scheduled.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a scheduler tries to schedule a node
+ * those owner thread is blocked during a yield operation.
+ *
+ * - Yield while the owner thread of the highest priority ready node is
+ * blocked.
+ *
+ * - Clean up all used resources.
+ *
+ * - Construct a system state in which a scheduler tries to schedule a node
+ * those owner thread is blocked during a yield operation while a sticky node
+ * is involved.
+ *
+ * - Yield while the owner thread of the highest priority ready node is
+ * blocked.
+ *
+ * - Clean up all used resources.
+ *
+ * - Create three worker threads and a mutex. Use the mutex and the worker to
+ * check that a not scheduled thread does not get removed from the set of
+ * ready threads of a scheduler when a help request is reconsidered.
+ *
+ * - Prevent that worker B can perform a post-switch cleanup.
+ *
+ * - Give worker C a lower priority than worker B. Worker B will try to
+ * finish the thread dispatch by doing a post-switch cleanup. The
+ * post-switch cleanup cannot progress since the runner owns the thread
+ * state lock. Wait until the other processor waits on the thread state
+ * lock of worker B.
+ *
+ * - Give worker C a higher priority than worker B. Let worker B do its
+ * post-switch cleanup which will carry out the reconsider help requests
+ * for a not scheduled thread.
+ *
+ * - Clean up all used resources.
+ *
+ * @{
+ */
+
+typedef enum {
+ WORKER_A,
+ WORKER_B,
+ WORKER_C,
+ WORKER_COUNT
+} WorkerIndex;
+
+/**
+ * @brief Test context for spec:/score/sched/smp/val/smp test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the runner identifier.
+ */
+ rtems_id runner_id;
+
+ /**
+ * @brief This member contains the worker identifiers.
+ */
+ rtems_id worker_id[ WORKER_COUNT ];
+
+ /**
+ * @brief This member contains the mutex identifier.
+ */
+ rtems_id mutex_id;
+
+ /**
+ * @brief This member contains the sticky mutex identifier.
+ */
+ rtems_id sticky_id;
+
+ /**
+ * @brief This member contains the worker busy status.
+ */
+ volatile bool busy[ WORKER_COUNT ];
+
+ /**
+ * @brief This member contains an ISR lock context.
+ */
+ ISR_lock_Context lock_context;
+
+ /**
+ * @brief This member contains a counter.
+ */
+ uint32_t counter;
+
+ /**
+ * @brief If this member is true, then the worker shall be in the busy loop.
+ */
+ volatile bool is_busy[ WORKER_COUNT ];
+
+ /**
+ * @brief This member contains the per-CPU jobs.
+ */
+ Per_CPU_Job job[ 2 ];
+
+ /**
+ * @brief This member contains the per-CPU job contexts.
+ */
+ Per_CPU_Job_context job_context[ 2 ];
+
+ /**
+ * @brief This member contains the call within ISR request.
+ */
+ CallWithinISRRequest request;
+} ScoreSchedSmpValSmp_Context;
+
+static ScoreSchedSmpValSmp_Context
+ ScoreSchedSmpValSmp_Instance;
+
+#define EVENT_OBTAIN RTEMS_EVENT_0
+
+#define EVENT_RELEASE RTEMS_EVENT_1
+
+#define EVENT_STICKY_OBTAIN RTEMS_EVENT_2
+
+#define EVENT_STICKY_RELEASE RTEMS_EVENT_3
+
+#define EVENT_SYNC_RUNNER RTEMS_EVENT_4
+
+#define EVENT_BUSY RTEMS_EVENT_5
+
+typedef ScoreSchedSmpValSmp_Context Context;
+
+static void SendAndSync(
+ Context *ctx,
+ WorkerIndex worker,
+ rtems_event_set event
+)
+{
+ SendEvents( ctx->worker_id[ worker ], EVENT_SYNC_RUNNER | event );
+ ReceiveAllEvents( EVENT_SYNC_RUNNER );
+ WaitForExecutionStop( ctx->worker_id[ worker ] );
+}
+
+static void MakeBusy( Context *ctx, WorkerIndex worker )
+{
+ ctx->is_busy[ worker ] = false;
+ ctx->busy[ worker ] = true;
+ SendEvents( ctx->worker_id[ worker ], EVENT_BUSY );
+}
+
+static void WaitForBusy( Context *ctx, WorkerIndex worker )
+{
+ while ( !ctx->is_busy[ worker ] ) {
+ /* Wait */
+ }
+}
+
+static void StopBusy( Context *ctx, WorkerIndex worker )
+{
+ ctx->busy[ worker ] = false;
+ WaitForExecutionStop( ctx->worker_id[ worker ] );
+}
+
+static void MakeSticky( const Context *ctx )
+{
+ ObtainMutex( ctx->sticky_id );
+}
+
+static void CleanSticky( const Context *ctx )
+{
+ ReleaseMutex( ctx->sticky_id );
+}
+
+static void Block( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ SuspendTask( ctx->runner_id );
+ ResumeTask( ctx->runner_id );
+}
+
+static void OperationStopBusyC(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when,
+ T_scheduler_operation op
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if ( when == T_SCHEDULER_BEFORE && event->operation == op ) {
+ T_scheduler_set_event_handler( NULL, NULL );
+ StopBusy( ctx, WORKER_C );
+ }
+}
+
+static void BlockStopBusyC(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ OperationStopBusyC( arg, event, when, T_SCHEDULER_BLOCK );
+}
+
+static void SetAffinityStopBusyC(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ OperationStopBusyC( arg, event, when, T_SCHEDULER_SET_AFFINITY );
+}
+
+static void UpdatePriorityStopBusyC(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ OperationStopBusyC( arg, event, when, T_SCHEDULER_UPDATE_PRIORITY );
+}
+
+static void YieldStopBusyC(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ OperationStopBusyC( arg, event, when, T_SCHEDULER_YIELD );
+}
+
+static void SuspendA( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ SuspendTask( ctx->worker_id[ WORKER_A ] );
+}
+
+static void OperationSuspendA(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when,
+ T_scheduler_operation op
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if ( when == T_SCHEDULER_BEFORE && event->operation == op ) {
+ const rtems_tcb *worker_a;
+
+ T_scheduler_set_event_handler( NULL, NULL );
+ ctx->job_context[ 0 ].handler = SuspendA;
+ _Per_CPU_Submit_job( _Per_CPU_Get_by_index( 1 ), &ctx->job[ 0 ] );
+
+ worker_a = GetThread( ctx->worker_id[ WORKER_A ] );
+
+ while ( worker_a->Scheduler.state != THREAD_SCHEDULER_BLOCKED ) {
+ RTEMS_COMPILER_MEMORY_BARRIER();
+ }
+ }
+}
+
+static void BlockSuspendA(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ OperationSuspendA( arg, event, when, T_SCHEDULER_BLOCK );
+}
+
+static void SetAffinitySuspendA(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ OperationSuspendA( arg, event, when, T_SCHEDULER_SET_AFFINITY );
+}
+
+static void UpdatePrioritySuspendA(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ OperationSuspendA( arg, event, when, T_SCHEDULER_UPDATE_PRIORITY );
+}
+
+static void YieldSuspendA(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ OperationSuspendA( arg, event, when, T_SCHEDULER_YIELD );
+}
+
+static void GuideAskForHelp( void *arg )
+{
+ Context *ctx;
+ Per_CPU_Control *cpu;
+ ISR_lock_Context lock_context;
+
+ ctx = arg;
+ cpu = _Per_CPU_Get_by_index( 0 );
+
+ _ISR_lock_ISR_disable( &lock_context );
+ _Per_CPU_Acquire( cpu, &lock_context );
+
+ ISRLockWaitForOthers( &cpu->Lock, 1 );
+
+ ctx->job_context[ 0 ].handler = SuspendA;
+ _Per_CPU_Submit_job( _Per_CPU_Get_by_index( 1 ), &ctx->job[ 0 ] );
+ ISRLockWaitForOthers( &cpu->Lock, 2 );
+
+ _Per_CPU_Release( cpu, &lock_context );
+ _ISR_lock_ISR_enable( &lock_context );
+}
+
+static void InterceptAskForHelp( void *arg )
+{
+ Context *ctx;
+ Per_CPU_Control *cpu_self;
+
+ ctx = arg;
+ cpu_self = _Per_CPU_Get();
+
+ if ( rtems_scheduler_get_processor_maximum() > 2 ) {
+ ctx->job_context[ 1 ].handler = GuideAskForHelp;
+ _Per_CPU_Submit_job( _Per_CPU_Get_by_index( 2 ), &ctx->job[ 1 ] );
+ ISRLockWaitForOwned( &cpu_self->Lock );
+ } else {
+ ISR_lock_Context lock_context;
+ Chain_Node *node;
+ Thread_Control *thread;
+
+ _ISR_lock_ISR_disable( &lock_context );
+ _Per_CPU_Acquire( cpu_self, &lock_context );
+ ctx->job_context[ 0 ].handler = SuspendA;
+ _Per_CPU_Submit_job( _Per_CPU_Get_by_index( 1 ), &ctx->job[ 0 ] );
+ ISRLockWaitForOthers( &cpu_self->Lock, 1 );
+
+ /* See _Thread_Preemption_intervention() */
+ node = _Chain_Get_first_unprotected( &cpu_self->Threads_in_need_for_help );
+ thread = THREAD_OF_SCHEDULER_HELP_NODE( node );
+ T_assert_eq_ptr( thread, GetThread( ctx->worker_id[ WORKER_A ] ) );
+ thread->Scheduler.ask_for_help_cpu = NULL;
+
+ _Per_CPU_Release( cpu_self, &lock_context );
+ _ISR_lock_ISR_enable( &lock_context );
+ }
+}
+
+static void UnblockAskForHelp(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_BEFORE &&
+ event->operation == T_SCHEDULER_UNBLOCK
+ ) {
+ T_scheduler_set_event_handler( NULL, NULL );
+ ctx->request.handler = InterceptAskForHelp;
+ ctx->request.arg = ctx;
+ CallWithinISRSubmit( &ctx->request );
+ }
+}
+
+static void RaiseWorkerPriorityWithIdleRunner( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ SuspendTask( ctx->runner_id );
+ T_scheduler_set_event_handler( UpdatePriorityStopBusyC, ctx );
+ SetPriority( ctx->worker_id[ WORKER_A ], PRIO_HIGH );
+ SetPriority( ctx->worker_id[ WORKER_A ], PRIO_NORMAL );
+ ResumeTask( ctx->runner_id );
+}
+
+static void MakeReady( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ MakeBusy( ctx, WORKER_C );
+}
+
+static void UpdatePriorityMakeReady(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_BEFORE &&
+ event->operation == T_SCHEDULER_UPDATE_PRIORITY
+ ) {
+ Thread_Control *thread;
+
+ T_scheduler_set_event_handler( NULL, NULL );
+
+ thread = GetThread( ctx->worker_id[ WORKER_A ] );
+ T_eq_int( thread->Scheduler.state, THREAD_SCHEDULER_SCHEDULED );
+
+ ctx->job_context[ 0 ].handler = MakeReady;
+ _Per_CPU_Submit_job( _Per_CPU_Get_by_index( 1 ), &ctx->job[ 0 ] );
+
+ while ( thread->Scheduler.state != THREAD_SCHEDULER_READY ) {
+ RTEMS_COMPILER_MEMORY_BARRIER();
+ }
+ }
+}
+
+static void ReadyToScheduled( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ SuspendTask( ctx->runner_id );
+
+ T_scheduler_set_event_handler( UpdatePriorityMakeReady, ctx );
+ SetPriority( ctx->worker_id[ WORKER_A ], PRIO_HIGH );
+
+ SetPriority( ctx->runner_id, PRIO_VERY_HIGH );
+ ResumeTask( ctx->runner_id );
+}
+
+static void BlockAndReuseIdle( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ SuspendTask( ctx->runner_id );
+ SuspendTask( ctx->worker_id[ WORKER_A ] );
+ ResumeTask( ctx->worker_id[ WORKER_A ] );
+ SetPriority( ctx->runner_id, PRIO_HIGH );
+ ResumeTask( ctx->runner_id );
+}
+
+static void Preempt( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ MakeBusy( ctx, WORKER_C );
+}
+
+static void BlockAndPreempt(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if ( when == T_SCHEDULER_AFTER && event->operation == T_SCHEDULER_BLOCK ) {
+ Thread_Control *thread;
+
+ T_scheduler_set_event_handler( NULL, NULL );
+
+ thread = GetThread( ctx->worker_id[ WORKER_A ] );
+ T_eq_int( thread->Scheduler.state, THREAD_SCHEDULER_BLOCKED );
+
+ ctx->job_context[ 0 ].handler = Preempt;
+ _Per_CPU_Submit_job( _Per_CPU_Get_by_index( 1 ), &ctx->job[ 0 ] );
+ _Per_CPU_Wait_for_job( _Per_CPU_Get_by_index( 1 ), &ctx->job[ 0 ] );
+ }
+}
+
+static void PrepareOwnerScheduled( Context *ctx )
+{
+ SetScheduler( ctx->worker_id[ WORKER_B ], SCHEDULER_B_ID, PRIO_NORMAL );
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_OBTAIN );
+ SendAndSync( ctx, WORKER_B, EVENT_OBTAIN );
+ SetScheduler( ctx->worker_id[ WORKER_C ], SCHEDULER_B_ID, PRIO_HIGH );
+ SetPriority( ctx->worker_id[ WORKER_A ], PRIO_NORMAL );
+ MakeBusy( ctx, WORKER_C );
+ WaitForBusy( ctx, WORKER_C );
+ MakeBusy( ctx, WORKER_A );
+}
+
+static void CleanupOwnerScheduled( Context *ctx )
+{
+ StopBusy( ctx, WORKER_A );
+ SetPriority( ctx->worker_id[ WORKER_A ], PRIO_HIGH );
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_RELEASE );
+ SendAndSync( ctx, WORKER_B, EVENT_RELEASE );
+ SetScheduler( ctx->worker_id[ WORKER_B ], SCHEDULER_A_ID, PRIO_HIGH );
+ SetScheduler( ctx->worker_id[ WORKER_C ], SCHEDULER_A_ID, PRIO_HIGH );
+}
+
+static void PrepareOwnerBlocked( Context *ctx )
+{
+ SetScheduler( ctx->worker_id[ WORKER_A ], SCHEDULER_B_ID, PRIO_NORMAL );
+ SendAndSync( ctx, WORKER_A, EVENT_OBTAIN );
+ SendEvents( ctx->worker_id[ WORKER_B ], EVENT_OBTAIN );
+ SetScheduler( ctx->worker_id[ WORKER_C ], SCHEDULER_B_ID, PRIO_HIGH );
+ MakeBusy( ctx, WORKER_C );
+ SetPriority( ctx->worker_id[ WORKER_B ], PRIO_LOW );
+ MakeBusy( ctx, WORKER_A );
+ SetPriority( ctx->worker_id[ WORKER_B ], PRIO_NORMAL );
+}
+
+static void CleanupOwnerBlocked( Context *ctx )
+{
+ StopBusy( ctx, WORKER_C );
+ ResumeTask( ctx->worker_id[ WORKER_A ] );
+ StopBusy( ctx, WORKER_A );
+ SendAndSync( ctx, WORKER_A, EVENT_RELEASE );
+ SetPriority( ctx->worker_id[ WORKER_B ], PRIO_HIGH );
+ SendEvents( ctx->worker_id[ WORKER_B ], EVENT_RELEASE );
+ SetScheduler( ctx->worker_id[ WORKER_A ], SCHEDULER_A_ID, PRIO_HIGH );
+ SetScheduler( ctx->worker_id[ WORKER_C ], SCHEDULER_A_ID, PRIO_HIGH );
+}
+
+static void ReconsiderHelpRequestB(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ (void) when;
+ ctx = arg;
+
+ if ( event->operation == T_SCHEDULER_RECONSIDER_HELP_REQUEST ) {
+ Scheduler_SMP_Node *node;
+
+ node = (Scheduler_SMP_Node *) event->node;
+ T_eq_int( node->state, SCHEDULER_SMP_NODE_READY );
+ ++ctx->counter;
+ }
+}
+
+static void ReleaseThreadLockB(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_AFTER &&
+ event->operation == T_SCHEDULER_UPDATE_PRIORITY
+ ) {
+ Thread_Control *worker_b;
+
+ T_scheduler_set_event_handler( ReconsiderHelpRequestB, ctx );
+
+ worker_b = GetThread( ctx->worker_id[ WORKER_B ] );
+ T_eq_int( worker_b->Scheduler.state, THREAD_SCHEDULER_READY );
+
+ _Thread_State_release_critical( worker_b, &ctx->lock_context );
+ }
+}
+
+static void Worker( rtems_task_argument arg, WorkerIndex worker )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ rtems_event_set events;
+
+ events = ReceiveAnyEvents();
+
+ if ( ( events & EVENT_SYNC_RUNNER ) != 0 ) {
+ SendEvents( ctx->runner_id, EVENT_SYNC_RUNNER );
+ }
+
+ if ( ( events & EVENT_OBTAIN ) != 0 ) {
+ ObtainMutex( ctx->mutex_id );
+ }
+
+ if ( ( events & EVENT_RELEASE ) != 0 ) {
+ ReleaseMutex( ctx->mutex_id );
+ }
+
+ if ( ( events & EVENT_STICKY_OBTAIN ) != 0 ) {
+ ObtainMutex( ctx->sticky_id );
+ }
+
+ if ( ( events & EVENT_STICKY_RELEASE ) != 0 ) {
+ ReleaseMutex( ctx->sticky_id );
+ }
+
+ if ( ( events & EVENT_BUSY ) != 0 ) {
+ ctx->is_busy[ worker ] = true;
+
+ while ( ctx->busy[ worker ] ) {
+ /* Wait */
+ }
+
+ ctx->is_busy[ worker ] = false;
+ }
+ }
+}
+
+static void WorkerA( rtems_task_argument arg )
+{
+ Worker( arg, WORKER_A );
+}
+
+static void WorkerB( rtems_task_argument arg )
+{
+ Worker( arg, WORKER_B );
+}
+
+static void WorkerC( rtems_task_argument arg )
+{
+ Worker( arg, WORKER_C );
+}
+
+static void ScoreSchedSmpValSmp_Setup( ScoreSchedSmpValSmp_Context *ctx )
+{
+ rtems_status_code sc;
+ size_t i;
+
+ ctx->runner_id = rtems_task_self();
+ ctx->mutex_id = CreateMutex();
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( ctx->job ); ++i ) {
+ ctx->job_context[ i ].arg = ctx;
+ ctx->job[ i ].context = &ctx->job_context[ i ];
+ }
+
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'S', 'T', 'K', 'Y' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
+ PRIO_NORMAL,
+ &ctx->sticky_id
+ );
+ T_rsc_success( sc );
+
+ SetSelfPriority( PRIO_NORMAL );
+
+ ctx->worker_id[ WORKER_A ] = CreateTask( "WRKA", PRIO_HIGH );
+ StartTask( ctx->worker_id[ WORKER_A ], WorkerA, ctx );
+
+ ctx->worker_id[ WORKER_B ] = CreateTask( "WRKB", PRIO_HIGH );
+ StartTask( ctx->worker_id[ WORKER_B ], WorkerB, ctx );
+
+ ctx->worker_id[ WORKER_C ] = CreateTask( "WRKC", PRIO_HIGH );
+ StartTask( ctx->worker_id[ WORKER_C ], WorkerC, ctx );
+}
+
+static void ScoreSchedSmpValSmp_Setup_Wrap( void *arg )
+{
+ ScoreSchedSmpValSmp_Context *ctx;
+
+ ctx = arg;
+ ScoreSchedSmpValSmp_Setup( ctx );
+}
+
+static void ScoreSchedSmpValSmp_Teardown( ScoreSchedSmpValSmp_Context *ctx )
+{
+ DeleteTask( ctx->worker_id[ WORKER_A ] );
+ DeleteTask( ctx->worker_id[ WORKER_B ] );
+ DeleteTask( ctx->worker_id[ WORKER_C ] );
+ DeleteMutex( ctx->mutex_id );
+ DeleteMutex( ctx->sticky_id );
+ RestoreRunnerPriority();
+}
+
+static void ScoreSchedSmpValSmp_Teardown_Wrap( void *arg )
+{
+ ScoreSchedSmpValSmp_Context *ctx;
+
+ ctx = arg;
+ ScoreSchedSmpValSmp_Teardown( ctx );
+}
+
+static T_fixture ScoreSchedSmpValSmp_Fixture = {
+ .setup = ScoreSchedSmpValSmp_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreSchedSmpValSmp_Teardown_Wrap,
+ .scope = NULL,
+ .initial_context = &ScoreSchedSmpValSmp_Instance
+};
+
+/**
+ * @brief Construct a system state in which a sticky thread is blocked while an
+ * idle thread executes on behalf of the thread.
+ */
+static void ScoreSchedSmpValSmp_Action_0( ScoreSchedSmpValSmp_Context *ctx )
+{
+ SetScheduler( ctx->worker_id[ WORKER_B ], SCHEDULER_B_ID, PRIO_NORMAL );
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_OBTAIN );
+ SendAndSync( ctx, WORKER_B, EVENT_OBTAIN );
+ SetPriority( ctx->worker_id[ WORKER_A ], PRIO_NORMAL );
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_STICKY_OBTAIN );
+ MakeBusy( ctx, WORKER_A );
+ WaitForBusy( ctx, WORKER_A );
+
+ /*
+ * Block the sticky worker A while it uses an idle thread in the home
+ * scheduler.
+ */
+ CallWithinISR( BlockAndReuseIdle, ctx );
+
+ /*
+ * Clean up all used resources.
+ */
+ StopBusy( ctx, WORKER_A );
+ SendAndSync( ctx, WORKER_A, EVENT_STICKY_RELEASE );
+ SetPriority( ctx->worker_id[ WORKER_A ], PRIO_HIGH );
+ SetSelfPriority( PRIO_NORMAL );
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_RELEASE );
+ SendAndSync( ctx, WORKER_B, EVENT_RELEASE );
+ SetScheduler( ctx->worker_id[ WORKER_B ], SCHEDULER_A_ID, PRIO_HIGH );
+}
+
+/**
+ * @brief Construct a system state in which a thread is preempted while it is
+ * blocked.
+ */
+static void ScoreSchedSmpValSmp_Action_1( ScoreSchedSmpValSmp_Context *ctx )
+{
+ SetScheduler( ctx->worker_id[ WORKER_B ], SCHEDULER_B_ID, PRIO_NORMAL );
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_OBTAIN );
+ SendAndSync( ctx, WORKER_B, EVENT_OBTAIN );
+ SetScheduler( ctx->worker_id[ WORKER_C ], SCHEDULER_B_ID, PRIO_HIGH );
+ SetPriority( ctx->worker_id[ WORKER_A ], PRIO_NORMAL );
+ MakeBusy( ctx, WORKER_A );
+ WaitForBusy( ctx, WORKER_A );
+
+ /*
+ * Block worker A and preempt it before the withdraw node operations are
+ * performed for worker A.
+ */
+ T_scheduler_set_event_handler( BlockAndPreempt, ctx );
+ SuspendTask( ctx->worker_id[ WORKER_A ] );
+
+ /*
+ * Clean up all used resources.
+ */
+ ResumeTask( ctx->worker_id[ WORKER_A ] );
+ StopBusy( ctx, WORKER_C );
+ StopBusy( ctx, WORKER_A );
+ SetPriority( ctx->worker_id[ WORKER_A ], PRIO_HIGH );
+ SetSelfPriority( PRIO_NORMAL );
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_RELEASE );
+ SendAndSync( ctx, WORKER_B, EVENT_RELEASE );
+ SetScheduler( ctx->worker_id[ WORKER_B ], SCHEDULER_A_ID, PRIO_HIGH );
+ SetScheduler( ctx->worker_id[ WORKER_C ], SCHEDULER_A_ID, PRIO_HIGH );
+}
+
+/**
+ * @brief Construct a system state in which a thread is rescheduled while it
+ * is not scheduled on another scheduler.
+ */
+static void ScoreSchedSmpValSmp_Action_2( ScoreSchedSmpValSmp_Context *ctx )
+{
+ SetScheduler( ctx->worker_id[ WORKER_B ], SCHEDULER_B_ID, PRIO_NORMAL );
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_OBTAIN );
+ SendAndSync( ctx, WORKER_B, EVENT_OBTAIN );
+ SetScheduler( ctx->worker_id[ WORKER_C ], SCHEDULER_B_ID, PRIO_HIGH );
+ SetPriority( ctx->worker_id[ WORKER_A ], PRIO_NORMAL );
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_STICKY_OBTAIN );
+ MakeBusy( ctx, WORKER_A );
+ WaitForBusy( ctx, WORKER_A );
+
+ /*
+ * Reschedule worker A by the home scheduler while worker A is not scheduled
+ * on another scheduler.
+ */
+ CallWithinISR( ReadyToScheduled, ctx );
+
+ /*
+ * Clean up all used resources.
+ */
+ StopBusy( ctx, WORKER_C );
+ StopBusy( ctx, WORKER_A );
+ SendAndSync( ctx, WORKER_A, EVENT_STICKY_RELEASE );
+ SetPriority( ctx->worker_id[ WORKER_A ], PRIO_HIGH );
+ SetSelfPriority( PRIO_NORMAL );
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_RELEASE );
+ SendAndSync( ctx, WORKER_B, EVENT_RELEASE );
+ SetScheduler( ctx->worker_id[ WORKER_B ], SCHEDULER_A_ID, PRIO_HIGH );
+ SetScheduler( ctx->worker_id[ WORKER_C ], SCHEDULER_A_ID, PRIO_HIGH );
+}
+
+/**
+ * @brief Construct a system state in which an ask for help request is
+ * cancelled while it is processed on another processor.
+ */
+static void ScoreSchedSmpValSmp_Action_3( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerScheduled( ctx );
+
+ /*
+ * Unblock worker A. It cannot be scheduled on its home scheduler. Intercept
+ * the ask for help request. Block the worker A. This will cancel the ask
+ * for help request. Remove the request while the other processor tries to
+ * cancel the request.
+ */
+ SuspendTask( ctx->worker_id[ WORKER_A ] );
+ T_scheduler_set_event_handler( UnblockAskForHelp, ctx );
+ ResumeTask( ctx->worker_id[ WORKER_A ] );
+
+ /*
+ * Clean up all used resources.
+ */
+ ResumeTask( ctx->worker_id[ WORKER_A ] );
+ StopBusy( ctx, WORKER_C );
+ CleanupOwnerScheduled( ctx );
+}
+
+/**
+ * @brief Construct a system state in which a scheduler tries to schedule a
+ * node those owner thread is already scheduled during a block operation.
+ */
+static void ScoreSchedSmpValSmp_Action_4( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerScheduled( ctx );
+
+ /*
+ * Block the runner thread while the owner thread of the highest priority
+ * ready node is already scheduled.
+ */
+ T_scheduler_set_event_handler( BlockStopBusyC, ctx );
+ CallWithinISR( Block, ctx );
+
+ /*
+ * Clean up all used resources.
+ */
+ CleanupOwnerScheduled( ctx );
+}
+
+/**
+ * @brief Construct a system state in which a scheduler tries to schedule a
+ * node those owner thread is blocked during a block operation.
+ */
+static void ScoreSchedSmpValSmp_Action_5( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerBlocked( ctx );
+
+ /*
+ * Block the runner thread while the owner thread of the highest priority
+ * ready node is blocked.
+ */
+ T_scheduler_set_event_handler( BlockSuspendA, ctx );
+ CallWithinISR( Block, ctx );
+
+ /*
+ * Clean up all used resources.
+ */
+ CleanupOwnerBlocked( ctx );
+}
+
+/**
+ * @brief Construct a system state in which a scheduler tries to schedule a
+ * node those owner thread is already scheduled during a set affinity
+ * operation.
+ */
+static void ScoreSchedSmpValSmp_Action_6( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerScheduled( ctx );
+
+ /*
+ * Set the affinity of the runner thread while the owner thread of the
+ * highest priority ready node is already scheduled.
+ */
+ T_scheduler_set_event_handler( SetAffinityStopBusyC, ctx );
+ SetSelfAffinityAll();
+
+ /*
+ * Clean up all used resources.
+ */
+ CleanupOwnerScheduled( ctx );
+}
+
+/**
+ * @brief Construct a system state in which a scheduler tries to schedule a
+ * node those owner thread is already scheduled during a set affinity
+ * operation while a sticky node is involved.
+ */
+static void ScoreSchedSmpValSmp_Action_7( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerScheduled( ctx );
+
+ /*
+ * Set the affinity of the runner thread while the owner thread of the
+ * highest priority ready node is already scheduled.
+ */
+ MakeSticky( ctx );
+ T_scheduler_set_event_handler( SetAffinityStopBusyC, ctx );
+ SetSelfAffinityAll();
+ CleanSticky( ctx );
+
+ /*
+ * Clean up all used resources.
+ */
+ CleanupOwnerScheduled( ctx );
+}
+
+/**
+ * @brief Construct a system state in which a scheduler tries to schedule a
+ * node those owner thread is blocked during a set affinity operation.
+ */
+static void ScoreSchedSmpValSmp_Action_8( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerBlocked( ctx );
+
+ /*
+ * Set the affinity of the runner thread while the owner thread of the
+ * highest priority ready node is blocked.
+ */
+ T_scheduler_set_event_handler( SetAffinitySuspendA, ctx );
+ SetSelfAffinityAll();
+
+ /*
+ * Clean up all used resources.
+ */
+ CleanupOwnerBlocked( ctx );
+}
+
+/**
+ * @brief Construct a system state in which a scheduler tries to schedule a
+ * node those owner thread is blocked during a set affinity operation while a
+ * sticky node is involved.
+ */
+static void ScoreSchedSmpValSmp_Action_9( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerBlocked( ctx );
+
+ /*
+ * Set the affinity of the runner thread while the owner thread of the
+ * highest priority ready node is blocked.
+ */
+ MakeSticky( ctx );
+ T_scheduler_set_event_handler( SetAffinitySuspendA, ctx );
+ SetSelfAffinityAll();
+ CleanSticky( ctx );
+
+ /*
+ * Clean up all used resources.
+ */
+ CleanupOwnerBlocked( ctx );
+}
+
+/**
+ * @brief Construct a system state in which a scheduler tries to schedule a
+ * node those owner thread is already scheduled during a set priority
+ * operation.
+ */
+static void ScoreSchedSmpValSmp_Action_10( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerScheduled( ctx );
+
+ /*
+ * Set the priority of the runner thread while the owner thread of the
+ * highest priority ready node is already scheduled.
+ */
+ SetSelfPriority( PRIO_HIGH );
+ T_scheduler_set_event_handler( UpdatePriorityStopBusyC, ctx );
+ SetSelfPriority( PRIO_NORMAL );
+
+ /*
+ * Clean up all used resources.
+ */
+ CleanupOwnerScheduled( ctx );
+}
+
+/**
+ * @brief Construct a system state in which a scheduler tries to schedule a
+ * node those owner thread is already scheduled during a set priority
+ * operation while a sticky node is involved.
+ */
+static void ScoreSchedSmpValSmp_Action_11( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerScheduled( ctx );
+
+ /*
+ * Set the priority of the runner thread while the owner thread of the
+ * highest priority ready node is already scheduled.
+ */
+ MakeSticky( ctx );
+ CallWithinISR( RaiseWorkerPriorityWithIdleRunner, ctx );
+ CleanSticky( ctx );
+
+ /*
+ * Clean up all used resources.
+ */
+ CleanupOwnerScheduled( ctx );
+}
+
+/**
+ * @brief Construct a system state in which a scheduler tries to schedule a
+ * node those owner thread is blocked during a set priority operation.
+ */
+static void ScoreSchedSmpValSmp_Action_12( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerBlocked( ctx );
+
+ /*
+ * Set the priority of the runner thread while the owner thread of the
+ * highest priority ready node is blocked.
+ */
+ SetSelfPriority( PRIO_HIGH );
+ T_scheduler_set_event_handler( UpdatePrioritySuspendA, ctx );
+ SetSelfPriority( PRIO_NORMAL );
+
+ /*
+ * Clean up all used resources.
+ */
+ CleanupOwnerBlocked( ctx );
+}
+
+/**
+ * @brief Construct a system state in which a scheduler tries to schedule a
+ * node those owner thread is already scheduled during a yield operation.
+ */
+static void ScoreSchedSmpValSmp_Action_13( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerScheduled( ctx );
+
+ /*
+ * Yield while the owner thread of the highest priority ready node is already
+ * scheduled.
+ */
+ T_scheduler_set_event_handler( YieldStopBusyC, ctx );
+ Yield();
+
+ /*
+ * Clean up all used resources.
+ */
+ CleanupOwnerScheduled( ctx );
+}
+
+/**
+ * @brief Construct a system state in which a scheduler tries to schedule a
+ * node those owner thread is already scheduled during a yield operation
+ * while a sticky node is involved.
+ */
+static void ScoreSchedSmpValSmp_Action_14( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerScheduled( ctx );
+
+ /*
+ * Yield while the owner thread of the highest priority ready node is already
+ * scheduled.
+ */
+ MakeSticky( ctx );
+ T_scheduler_set_event_handler( YieldStopBusyC, ctx );
+ Yield();
+ CleanSticky( ctx );
+
+ /*
+ * Clean up all used resources.
+ */
+ CleanupOwnerScheduled( ctx );
+}
+
+/**
+ * @brief Construct a system state in which a scheduler tries to schedule a
+ * node those owner thread is blocked during a yield operation.
+ */
+static void ScoreSchedSmpValSmp_Action_15( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerBlocked( ctx );
+
+ /*
+ * Yield while the owner thread of the highest priority ready node is
+ * blocked.
+ */
+ T_scheduler_set_event_handler( YieldSuspendA, ctx );
+ Yield();
+
+ /*
+ * Clean up all used resources.
+ */
+ CleanupOwnerBlocked( ctx );
+}
+
+/**
+ * @brief Construct a system state in which a scheduler tries to schedule a
+ * node those owner thread is blocked during a yield operation while a sticky
+ * node is involved.
+ */
+static void ScoreSchedSmpValSmp_Action_16( ScoreSchedSmpValSmp_Context *ctx )
+{
+ PrepareOwnerBlocked( ctx );
+
+ /*
+ * Yield while the owner thread of the highest priority ready node is
+ * blocked.
+ */
+ MakeSticky( ctx );
+ T_scheduler_set_event_handler( YieldSuspendA, ctx );
+ Yield();
+ CleanSticky( ctx );
+
+ /*
+ * Clean up all used resources.
+ */
+ CleanupOwnerBlocked( ctx );
+}
+
+/**
+ * @brief Create three worker threads and a mutex. Use the mutex and the
+ * worker to check that a not scheduled thread does not get removed from the
+ * set of ready threads of a scheduler when a help request is reconsidered.
+ */
+static void ScoreSchedSmpValSmp_Action_17( ScoreSchedSmpValSmp_Context *ctx )
+{
+ Thread_Control *worker_b;
+
+ SetScheduler( ctx->worker_id[ WORKER_B ], SCHEDULER_B_ID, PRIO_NORMAL );
+ SetScheduler( ctx->worker_id[ WORKER_C ], SCHEDULER_B_ID, PRIO_HIGH );
+ SendAndSync( ctx, WORKER_B, EVENT_OBTAIN );
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_OBTAIN );
+ SetPriority( ctx->worker_id[ WORKER_A ], PRIO_LOW );
+ MakeBusy( ctx, WORKER_B );
+ WaitForBusy( ctx, WORKER_B );
+ MakeBusy( ctx, WORKER_C );
+ WaitForBusy( ctx, WORKER_C );
+
+ /*
+ * Prevent that worker B can perform a post-switch cleanup.
+ */
+ worker_b = GetThread( ctx->worker_id[ WORKER_B ] );
+ _Thread_State_acquire( worker_b, &ctx->lock_context );
+ _ISR_lock_ISR_enable( &ctx->lock_context );
+
+ /*
+ * Give worker C a lower priority than worker B. Worker B will try to finish
+ * the thread dispatch by doing a post-switch cleanup. The post-switch
+ * cleanup cannot progress since the runner owns the thread state lock. Wait
+ * until the other processor waits on the thread state lock of worker B.
+ */
+ SetPriority( ctx->worker_id[ WORKER_C ], PRIO_LOW );
+ TicketLockWaitForOthers( &worker_b->Join_queue.Queue.Lock, 1 );
+
+ /*
+ * Give worker C a higher priority than worker B. Let worker B do its
+ * post-switch cleanup which will carry out the reconsider help requests for
+ * a not scheduled thread.
+ */
+ ctx->counter = 0;
+ T_scheduler_set_event_handler( ReleaseThreadLockB, ctx );
+ SetPriority( ctx->worker_id[ WORKER_C ], PRIO_HIGH );
+ T_scheduler_set_event_handler( NULL, NULL );
+ T_eq_u32( ctx->counter, 4 );
+
+ /*
+ * Clean up all used resources.
+ */
+ StopBusy( ctx, WORKER_B );
+ StopBusy( ctx, WORKER_C );
+ SendAndSync( ctx, WORKER_B, EVENT_RELEASE );
+ SetPriority( ctx->worker_id[ WORKER_A ], PRIO_HIGH );
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_RELEASE );
+ SetScheduler( ctx->worker_id[ WORKER_B ], SCHEDULER_A_ID, PRIO_HIGH );
+ SetScheduler( ctx->worker_id[ WORKER_C ], SCHEDULER_A_ID, PRIO_HIGH );
+}
+
+/**
+ * @fn void T_case_body_ScoreSchedSmpValSmp( void )
+ */
+T_TEST_CASE_FIXTURE( ScoreSchedSmpValSmp, &ScoreSchedSmpValSmp_Fixture )
+{
+ ScoreSchedSmpValSmp_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ScoreSchedSmpValSmp_Action_0( ctx );
+ ScoreSchedSmpValSmp_Action_1( ctx );
+ ScoreSchedSmpValSmp_Action_2( ctx );
+ ScoreSchedSmpValSmp_Action_3( ctx );
+ ScoreSchedSmpValSmp_Action_4( ctx );
+ ScoreSchedSmpValSmp_Action_5( ctx );
+ ScoreSchedSmpValSmp_Action_6( ctx );
+ ScoreSchedSmpValSmp_Action_7( ctx );
+ ScoreSchedSmpValSmp_Action_8( ctx );
+ ScoreSchedSmpValSmp_Action_9( ctx );
+ ScoreSchedSmpValSmp_Action_10( ctx );
+ ScoreSchedSmpValSmp_Action_11( ctx );
+ ScoreSchedSmpValSmp_Action_12( ctx );
+ ScoreSchedSmpValSmp_Action_13( ctx );
+ ScoreSchedSmpValSmp_Action_14( ctx );
+ ScoreSchedSmpValSmp_Action_15( ctx );
+ ScoreSchedSmpValSmp_Action_16( ctx );
+ ScoreSchedSmpValSmp_Action_17( ctx );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sched-yield.c b/testsuites/validation/tc-sched-yield.c
new file mode 100644
index 0000000000..057579fd1c
--- /dev/null
+++ b/testsuites/validation/tc-sched-yield.c
@@ -0,0 +1,845 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSchedReqYield
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/test-scheduler.h>
+#include <rtems/score/percpu.h>
+
+#include "tx-support.h"
+#include "tx-thread-queue.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSchedReqYield spec:/score/sched/req/yield
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreSchedReqYield_Pre_EligibleScheduler_Home,
+ ScoreSchedReqYield_Pre_EligibleScheduler_Helping,
+ ScoreSchedReqYield_Pre_EligibleScheduler_NA
+} ScoreSchedReqYield_Pre_EligibleScheduler;
+
+typedef enum {
+ ScoreSchedReqYield_Pre_UsedScheduler_Home,
+ ScoreSchedReqYield_Pre_UsedScheduler_Helping,
+ ScoreSchedReqYield_Pre_UsedScheduler_NA
+} ScoreSchedReqYield_Pre_UsedScheduler;
+
+typedef enum {
+ ScoreSchedReqYield_Pre_HomeSchedulerState_Blocked,
+ ScoreSchedReqYield_Pre_HomeSchedulerState_Scheduled,
+ ScoreSchedReqYield_Pre_HomeSchedulerState_Ready,
+ ScoreSchedReqYield_Pre_HomeSchedulerState_NA
+} ScoreSchedReqYield_Pre_HomeSchedulerState;
+
+typedef enum {
+ ScoreSchedReqYield_Pre_Sticky_Yes,
+ ScoreSchedReqYield_Pre_Sticky_No,
+ ScoreSchedReqYield_Pre_Sticky_NA
+} ScoreSchedReqYield_Pre_Sticky;
+
+typedef enum {
+ ScoreSchedReqYield_Pre_Other_Yes,
+ ScoreSchedReqYield_Pre_Other_No,
+ ScoreSchedReqYield_Pre_Other_NA
+} ScoreSchedReqYield_Pre_Other;
+
+typedef enum {
+ ScoreSchedReqYield_Post_HomeSchedulerState_Blocked,
+ ScoreSchedReqYield_Post_HomeSchedulerState_Scheduled,
+ ScoreSchedReqYield_Post_HomeSchedulerState_Ready,
+ ScoreSchedReqYield_Post_HomeSchedulerState_Idle,
+ ScoreSchedReqYield_Post_HomeSchedulerState_NA
+} ScoreSchedReqYield_Post_HomeSchedulerState;
+
+typedef enum {
+ ScoreSchedReqYield_Post_AskForHelp_Yes,
+ ScoreSchedReqYield_Post_AskForHelp_No,
+ ScoreSchedReqYield_Post_AskForHelp_NA
+} ScoreSchedReqYield_Post_AskForHelp;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_EligibleScheduler_NA : 1;
+ uint16_t Pre_UsedScheduler_NA : 1;
+ uint16_t Pre_HomeSchedulerState_NA : 1;
+ uint16_t Pre_Sticky_NA : 1;
+ uint16_t Pre_Other_NA : 1;
+ uint16_t Post_HomeSchedulerState : 3;
+ uint16_t Post_AskForHelp : 2;
+} ScoreSchedReqYield_Entry;
+
+/**
+ * @brief Test context for spec:/score/sched/req/yield test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the thread queue test context.
+ */
+ TQContext tq_ctx;
+
+ /**
+ * @brief This member contains the identifier of a sticky mutex.
+ */
+ rtems_id sticky_mutex;
+
+ /**
+ * @brief This member contains the processor index after yielding.
+ */
+ uint32_t cpu_after_yield;
+
+ /**
+ * @brief If this member is true, then the runner shall have a helping
+ * scheduler.
+ */
+ bool has_helping;
+
+ /**
+ * @brief If this member is true, then the runner shall use a helping
+ * scheduler.
+ */
+ bool use_helping;
+
+ /**
+ * @brief If this member is true, then the runner shall be ready in its home
+ * scheduler.
+ */
+ bool ready;
+
+ /**
+ * @brief If this member is true, then the runner shall be sticky.
+ */
+ bool sticky;
+
+ /**
+ * @brief If this member is true, then another ready task in the home
+ * scheduler of the runner shall be ready with an equal priority.
+ */
+ bool other_ready;
+
+ /**
+ * @brief If this member is true, then the processor zero was idle before
+ * yielding.
+ */
+ bool is_idle_before_yield;
+
+ /**
+ * @brief If this member is true, then the processor zero was idle after
+ * yielding.
+ */
+ bool is_idle_after_yield;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 5 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreSchedReqYield_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreSchedReqYield_Context;
+
+static ScoreSchedReqYield_Context
+ ScoreSchedReqYield_Instance;
+
+static const char * const ScoreSchedReqYield_PreDesc_EligibleScheduler[] = {
+ "Home",
+ "Helping",
+ "NA"
+};
+
+static const char * const ScoreSchedReqYield_PreDesc_UsedScheduler[] = {
+ "Home",
+ "Helping",
+ "NA"
+};
+
+static const char * const ScoreSchedReqYield_PreDesc_HomeSchedulerState[] = {
+ "Blocked",
+ "Scheduled",
+ "Ready",
+ "NA"
+};
+
+static const char * const ScoreSchedReqYield_PreDesc_Sticky[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const ScoreSchedReqYield_PreDesc_Other[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const ScoreSchedReqYield_PreDesc[] = {
+ ScoreSchedReqYield_PreDesc_EligibleScheduler,
+ ScoreSchedReqYield_PreDesc_UsedScheduler,
+ ScoreSchedReqYield_PreDesc_HomeSchedulerState,
+ ScoreSchedReqYield_PreDesc_Sticky,
+ ScoreSchedReqYield_PreDesc_Other,
+ NULL
+};
+
+#define COUNTER TQ_BLOCKER_A
+
+#define HELPER TQ_BLOCKER_B
+
+#define MOVER TQ_BLOCKER_C
+
+typedef ScoreSchedReqYield_Context Context;
+
+static void MoveToHelping( Context *ctx )
+{
+ ctx->tq_ctx.busy_wait[ MOVER ] = true;
+ TQSend( &ctx->tq_ctx, MOVER, TQ_EVENT_BUSY_WAIT );
+ TQWaitForEventsReceived( &ctx->tq_ctx, MOVER );
+ T_eq_u32( rtems_scheduler_get_processor(), 1 );
+ ctx->tq_ctx.busy_wait[ MOVER ] = false;
+ TQWaitForExecutionStop( &ctx->tq_ctx, MOVER );
+}
+
+static uint32_t GetCounter( const Context *ctx )
+{
+ return TQGetWorkerCounter( &ctx->tq_ctx, COUNTER );
+}
+
+static void ScoreSchedReqYield_Pre_EligibleScheduler_Prepare(
+ ScoreSchedReqYield_Context *ctx,
+ ScoreSchedReqYield_Pre_EligibleScheduler state
+)
+{
+ switch ( state ) {
+ case ScoreSchedReqYield_Pre_EligibleScheduler_Home: {
+ /*
+ * While the only eligible scheduler of the thread is the home scheduler.
+ */
+ ctx->has_helping = false;
+ break;
+ }
+
+ case ScoreSchedReqYield_Pre_EligibleScheduler_Helping: {
+ /*
+ * While the thread has at least one helping scheduler.
+ */
+ ctx->has_helping = true;
+ break;
+ }
+
+ case ScoreSchedReqYield_Pre_EligibleScheduler_NA:
+ break;
+ }
+}
+
+static void ScoreSchedReqYield_Pre_UsedScheduler_Prepare(
+ ScoreSchedReqYield_Context *ctx,
+ ScoreSchedReqYield_Pre_UsedScheduler state
+)
+{
+ switch ( state ) {
+ case ScoreSchedReqYield_Pre_UsedScheduler_Home: {
+ /*
+ * While the thread is scheduled on the home scheduler.
+ */
+ ctx->use_helping = false;
+ break;
+ }
+
+ case ScoreSchedReqYield_Pre_UsedScheduler_Helping: {
+ /*
+ * While the thread is scheduled on a helping scheduler.
+ */
+ ctx->use_helping = true;
+ break;
+ }
+
+ case ScoreSchedReqYield_Pre_UsedScheduler_NA:
+ break;
+ }
+}
+
+static void ScoreSchedReqYield_Pre_HomeSchedulerState_Prepare(
+ ScoreSchedReqYield_Context *ctx,
+ ScoreSchedReqYield_Pre_HomeSchedulerState state
+)
+{
+ switch ( state ) {
+ case ScoreSchedReqYield_Pre_HomeSchedulerState_Blocked: {
+ /*
+ * The thread shall be blocked in its home scheduler.
+ */
+ ctx->ready = false;
+ break;
+ }
+
+ case ScoreSchedReqYield_Pre_HomeSchedulerState_Scheduled: {
+ /*
+ * The thread shall be scheduled in its home scheduler.
+ */
+ ctx->ready = false;
+ break;
+ }
+
+ case ScoreSchedReqYield_Pre_HomeSchedulerState_Ready: {
+ /*
+ * The thread shall be ready in its home scheduler.
+ */
+ ctx->ready = true;
+ break;
+ }
+
+ case ScoreSchedReqYield_Pre_HomeSchedulerState_NA:
+ break;
+ }
+}
+
+static void ScoreSchedReqYield_Pre_Sticky_Prepare(
+ ScoreSchedReqYield_Context *ctx,
+ ScoreSchedReqYield_Pre_Sticky state
+)
+{
+ switch ( state ) {
+ case ScoreSchedReqYield_Pre_Sticky_Yes: {
+ /*
+ * While the thread is sticky.
+ */
+ ctx->sticky = true;
+ break;
+ }
+
+ case ScoreSchedReqYield_Pre_Sticky_No: {
+ /*
+ * While the thread not sticky.
+ */
+ ctx->sticky = false;
+ break;
+ }
+
+ case ScoreSchedReqYield_Pre_Sticky_NA:
+ break;
+ }
+}
+
+static void ScoreSchedReqYield_Pre_Other_Prepare(
+ ScoreSchedReqYield_Context *ctx,
+ ScoreSchedReqYield_Pre_Other state
+)
+{
+ switch ( state ) {
+ case ScoreSchedReqYield_Pre_Other_Yes: {
+ /*
+ * While at least one ready thread with a priority equal to the priority
+ * of the thread exists in the home scheduler of the thread.
+ */
+ ctx->other_ready = true;
+ break;
+ }
+
+ case ScoreSchedReqYield_Pre_Other_No: {
+ /*
+ * While no ready thread with a priority equal to the priority of the
+ * thread exists in the home scheduler of the thread.
+ */
+ ctx->other_ready = false;
+ break;
+ }
+
+ case ScoreSchedReqYield_Pre_Other_NA:
+ break;
+ }
+}
+
+static void ScoreSchedReqYield_Post_HomeSchedulerState_Check(
+ ScoreSchedReqYield_Context *ctx,
+ ScoreSchedReqYield_Post_HomeSchedulerState state
+)
+{
+ switch ( state ) {
+ case ScoreSchedReqYield_Post_HomeSchedulerState_Blocked: {
+ /*
+ * The thread shall be blocked in its home scheduler.
+ */
+ T_true( ctx->is_idle_after_yield );
+ T_eq_u32( ctx->cpu_after_yield, 1 );
+ break;
+ }
+
+ case ScoreSchedReqYield_Post_HomeSchedulerState_Scheduled: {
+ /*
+ * The thread shall be scheduled in its home scheduler.
+ */
+ T_false( ctx->is_idle_before_yield );
+ T_false( ctx->is_idle_after_yield );
+ T_eq_u32( GetCounter( ctx ), 0 );
+ T_eq_u32( ctx->cpu_after_yield, 0 );
+ break;
+ }
+
+ case ScoreSchedReqYield_Post_HomeSchedulerState_Ready: {
+ /*
+ * The thread shall be ready in its home scheduler.
+ */
+ T_eq_u32( GetCounter( ctx ), 1 );
+ break;
+ }
+
+ case ScoreSchedReqYield_Post_HomeSchedulerState_Idle: {
+ /*
+ * An idle thread shall execute on behalf of the thread in its home
+ * scheduler.
+ */
+ T_true( ctx->is_idle_before_yield );
+ T_true( ctx->is_idle_after_yield );
+ T_eq_u32( GetCounter( ctx ), 0 );
+ T_eq_u32( ctx->cpu_after_yield, 1 );
+ break;
+ }
+
+ case ScoreSchedReqYield_Post_HomeSchedulerState_NA:
+ break;
+ }
+}
+
+static void ScoreSchedReqYield_Post_AskForHelp_Check(
+ ScoreSchedReqYield_Context *ctx,
+ ScoreSchedReqYield_Post_AskForHelp state
+)
+{
+ size_t index;
+ const T_scheduler_event *event;
+
+ index = 0;
+
+ switch ( state ) {
+ case ScoreSchedReqYield_Post_AskForHelp_Yes: {
+ /*
+ * The thread shall ask all its eligible scheduler for help.
+ */
+ event = TQGetNextAskForHelp( &ctx->tq_ctx, &index );
+ T_eq_ptr( event->thread, ctx->tq_ctx.runner_tcb );
+
+ event = TQGetNextAskForHelp( &ctx->tq_ctx, &index );
+ T_eq_ptr( event->thread, ctx->tq_ctx.runner_tcb );
+
+ event = TQGetNextAskForHelp( &ctx->tq_ctx, &index );
+ T_eq_ptr( event, &T_scheduler_event_null );
+ break;
+ }
+
+ case ScoreSchedReqYield_Post_AskForHelp_No: {
+ /*
+ * The thread shall not ask for help.
+ */
+ event = TQGetNextAskForHelp( &ctx->tq_ctx, &index );
+ T_eq_ptr( event, &T_scheduler_event_null );
+ break;
+ }
+
+ case ScoreSchedReqYield_Post_AskForHelp_NA:
+ break;
+ }
+}
+
+static void ScoreSchedReqYield_Setup( ScoreSchedReqYield_Context *ctx )
+{
+ rtems_status_code sc;
+
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->tq_ctx.enqueue_prepare = TQEnqueuePrepareDefault;
+ ctx->tq_ctx.enqueue_done = TQEnqueueDoneDefault;
+ ctx->tq_ctx.enqueue = TQEnqueueClassicSem;
+ ctx->tq_ctx.surrender = TQSurrenderClassicSem;
+ ctx->tq_ctx.convert_status = TQConvertStatusClassic;
+ TQInitialize( &ctx->tq_ctx );
+
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'U', 'T', 'X' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
+ PRIO_NORMAL,
+ &ctx->sticky_mutex
+ );
+ T_rsc_success( sc );
+
+ TQSetPriority( &ctx->tq_ctx, COUNTER, PRIO_NORMAL );
+
+ #if defined(RTEMS_SMP)
+ TQSetScheduler( &ctx->tq_ctx, HELPER, SCHEDULER_B_ID, PRIO_NORMAL );
+ TQSetPriority( &ctx->tq_ctx, MOVER, PRIO_HIGH );
+ #endif
+}
+
+static void ScoreSchedReqYield_Setup_Wrap( void *arg )
+{
+ ScoreSchedReqYield_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreSchedReqYield_Setup( ctx );
+}
+
+static void ScoreSchedReqYield_Teardown( ScoreSchedReqYield_Context *ctx )
+{
+ TQDestroy( &ctx->tq_ctx );
+ DeleteMutex( ctx->sticky_mutex );
+}
+
+static void ScoreSchedReqYield_Teardown_Wrap( void *arg )
+{
+ ScoreSchedReqYield_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreSchedReqYield_Teardown( ctx );
+}
+
+static void ScoreSchedReqYield_Action( ScoreSchedReqYield_Context *ctx )
+{
+ const Per_CPU_Control *cpu;
+ bool other_busy;
+
+ if ( ctx->has_helping ) {
+ TQMutexObtain( &ctx->tq_ctx, TQ_MUTEX_A );
+ TQSendAndWaitForExecutionStop(
+ &ctx->tq_ctx,
+ HELPER,
+ TQ_EVENT_MUTEX_A_OBTAIN
+ );
+ }
+
+ if ( ctx->use_helping ) {
+ MoveToHelping( ctx );
+ }
+
+ TQResetCounter( &ctx->tq_ctx );
+
+ if ( ctx->use_helping && ctx->ready ) {
+ ctx->tq_ctx.busy_wait[ COUNTER ] = true;
+ TQSend( &ctx->tq_ctx, COUNTER, TQ_EVENT_COUNT | TQ_EVENT_BUSY_WAIT );
+ other_busy = true;
+ } else {
+ other_busy = false;
+ }
+
+ if ( ctx->sticky ) {
+ ObtainMutex( ctx->sticky_mutex );
+ }
+
+ if ( ctx->other_ready && !other_busy ) {
+ TQSend( &ctx->tq_ctx, COUNTER, TQ_EVENT_COUNT );
+ }
+
+ cpu = _Per_CPU_Get_by_index( 0 );
+ ctx->is_idle_before_yield = cpu->heir->is_idle;
+
+ TQSchedulerRecordStart( &ctx->tq_ctx );
+ Yield();
+ TQSchedulerRecordStop( &ctx->tq_ctx );
+
+ #if defined(RTEMS_SMP)
+ ctx->tq_ctx.busy_wait[ COUNTER ] = false;
+
+ while ( cpu->heir == ctx->tq_ctx.worker_tcb[ COUNTER ] ) {
+ RTEMS_COMPILER_MEMORY_BARRIER();
+ }
+ #endif
+
+ ctx->is_idle_after_yield = cpu->heir->is_idle;
+ ctx->cpu_after_yield = rtems_scheduler_get_processor();
+
+ if ( ctx->sticky ) {
+ ReleaseMutex( ctx->sticky_mutex );
+ }
+
+ if ( ctx->has_helping ) {
+ TQMutexRelease( &ctx->tq_ctx, TQ_MUTEX_A );
+ TQSendAndWaitForExecutionStop(
+ &ctx->tq_ctx,
+ HELPER,
+ TQ_EVENT_MUTEX_A_RELEASE
+ );
+ }
+}
+
+static const ScoreSchedReqYield_Entry
+ScoreSchedReqYield_Entries[] = {
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#endif
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_Ready,
+ ScoreSchedReqYield_Post_AskForHelp_No },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_Scheduled,
+ ScoreSchedReqYield_Post_AskForHelp_No },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_Blocked,
+ ScoreSchedReqYield_Post_AskForHelp_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_Ready,
+ ScoreSchedReqYield_Post_AskForHelp_No },
+ { 0, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_Scheduled,
+ ScoreSchedReqYield_Post_AskForHelp_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_Ready,
+ ScoreSchedReqYield_Post_AskForHelp_Yes },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_Ready,
+ ScoreSchedReqYield_Post_AskForHelp_Yes },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_Scheduled,
+ ScoreSchedReqYield_Post_AskForHelp_No },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_NA,
+ ScoreSchedReqYield_Post_AskForHelp_NA }
+#else
+ { 0, 0, 0, 0, 0, 0, ScoreSchedReqYield_Post_HomeSchedulerState_Idle,
+ ScoreSchedReqYield_Post_AskForHelp_No }
+#endif
+};
+
+static const uint8_t
+ScoreSchedReqYield_Map[] = {
+ 0, 0, 2, 2, 3, 8, 10, 11, 0, 0, 2, 2, 4, 4, 1, 1, 5, 5, 1, 1, 5, 5, 1, 1, 0,
+ 0, 6, 6, 12, 8, 13, 14, 0, 0, 6, 6, 4, 4, 9, 9, 3, 15, 7, 7, 3, 3, 7, 7
+};
+
+static size_t ScoreSchedReqYield_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreSchedReqYield_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( ScoreSchedReqYield_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreSchedReqYield_Fixture = {
+ .setup = ScoreSchedReqYield_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreSchedReqYield_Teardown_Wrap,
+ .scope = ScoreSchedReqYield_Scope,
+ .initial_context = &ScoreSchedReqYield_Instance
+};
+
+static inline ScoreSchedReqYield_Entry ScoreSchedReqYield_PopEntry(
+ ScoreSchedReqYield_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreSchedReqYield_Entries[
+ ScoreSchedReqYield_Map[ index ]
+ ];
+}
+
+static void ScoreSchedReqYield_TestVariant( ScoreSchedReqYield_Context *ctx )
+{
+ ScoreSchedReqYield_Pre_EligibleScheduler_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ ScoreSchedReqYield_Pre_UsedScheduler_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ ScoreSchedReqYield_Pre_HomeSchedulerState_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ ScoreSchedReqYield_Pre_Sticky_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ ScoreSchedReqYield_Pre_Other_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ ScoreSchedReqYield_Action( ctx );
+ ScoreSchedReqYield_Post_HomeSchedulerState_Check(
+ ctx,
+ ctx->Map.entry.Post_HomeSchedulerState
+ );
+ ScoreSchedReqYield_Post_AskForHelp_Check(
+ ctx,
+ ctx->Map.entry.Post_AskForHelp
+ );
+}
+
+/**
+ * @fn void T_case_body_ScoreSchedReqYield( void )
+ */
+T_TEST_CASE_FIXTURE( ScoreSchedReqYield, &ScoreSchedReqYield_Fixture )
+{
+ ScoreSchedReqYield_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreSchedReqYield_Pre_EligibleScheduler_Home;
+ ctx->Map.pcs[ 0 ] < ScoreSchedReqYield_Pre_EligibleScheduler_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = ScoreSchedReqYield_Pre_UsedScheduler_Home;
+ ctx->Map.pcs[ 1 ] < ScoreSchedReqYield_Pre_UsedScheduler_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = ScoreSchedReqYield_Pre_HomeSchedulerState_Blocked;
+ ctx->Map.pcs[ 2 ] < ScoreSchedReqYield_Pre_HomeSchedulerState_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = ScoreSchedReqYield_Pre_Sticky_Yes;
+ ctx->Map.pcs[ 3 ] < ScoreSchedReqYield_Pre_Sticky_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = ScoreSchedReqYield_Pre_Other_Yes;
+ ctx->Map.pcs[ 4 ] < ScoreSchedReqYield_Pre_Other_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ ctx->Map.entry = ScoreSchedReqYield_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ ScoreSchedReqYield_TestVariant( ctx );
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-scheduler-add-processor.c b/testsuites/validation/tc-scheduler-add-processor.c
new file mode 100644
index 0000000000..a26132aea0
--- /dev/null
+++ b/testsuites/validation/tc-scheduler-add-processor.c
@@ -0,0 +1,790 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSchedulerReqAddProcessor
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/test-scheduler.h>
+#include <rtems/score/percpu.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSchedulerReqAddProcessor \
+ * spec:/rtems/scheduler/req/add-processor
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSchedulerReqAddProcessor_Pre_HasReady_Ready,
+ RtemsSchedulerReqAddProcessor_Pre_HasReady_Empty,
+ RtemsSchedulerReqAddProcessor_Pre_HasReady_NA
+} RtemsSchedulerReqAddProcessor_Pre_HasReady;
+
+typedef enum {
+ RtemsSchedulerReqAddProcessor_Pre_Id_Invalid,
+ RtemsSchedulerReqAddProcessor_Pre_Id_Scheduler,
+ RtemsSchedulerReqAddProcessor_Pre_Id_NA
+} RtemsSchedulerReqAddProcessor_Pre_Id;
+
+typedef enum {
+ RtemsSchedulerReqAddProcessor_Pre_CPUIndex_Valid,
+ RtemsSchedulerReqAddProcessor_Pre_CPUIndex_Invalid,
+ RtemsSchedulerReqAddProcessor_Pre_CPUIndex_NA
+} RtemsSchedulerReqAddProcessor_Pre_CPUIndex;
+
+typedef enum {
+ RtemsSchedulerReqAddProcessor_Pre_CPUState_Idle,
+ RtemsSchedulerReqAddProcessor_Pre_CPUState_InUse,
+ RtemsSchedulerReqAddProcessor_Pre_CPUState_NotOnline,
+ RtemsSchedulerReqAddProcessor_Pre_CPUState_NotUsable,
+ RtemsSchedulerReqAddProcessor_Pre_CPUState_NA
+} RtemsSchedulerReqAddProcessor_Pre_CPUState;
+
+typedef enum {
+ RtemsSchedulerReqAddProcessor_Post_Status_Ok,
+ RtemsSchedulerReqAddProcessor_Post_Status_InvId,
+ RtemsSchedulerReqAddProcessor_Post_Status_NotConf,
+ RtemsSchedulerReqAddProcessor_Post_Status_IncStat,
+ RtemsSchedulerReqAddProcessor_Post_Status_InUse,
+ RtemsSchedulerReqAddProcessor_Post_Status_NA
+} RtemsSchedulerReqAddProcessor_Post_Status;
+
+typedef enum {
+ RtemsSchedulerReqAddProcessor_Post_Added_Yes,
+ RtemsSchedulerReqAddProcessor_Post_Added_Nop,
+ RtemsSchedulerReqAddProcessor_Post_Added_NA
+} RtemsSchedulerReqAddProcessor_Post_Added;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_HasReady_NA : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_CPUIndex_NA : 1;
+ uint16_t Pre_CPUState_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_Added : 2;
+} RtemsSchedulerReqAddProcessor_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/scheduler/req/add-processor test case.
+ */
+typedef struct {
+ /**
+ * @brief This member specifies the scheduler used to add the processor.
+ */
+ rtems_id scheduler_id;
+
+ /**
+ * @brief This member contains the identifier of scheduler A.
+ */
+ rtems_id scheduler_a_id;
+
+ /**
+ * @brief This member contains the identifier of scheduler B.
+ */
+ rtems_id scheduler_b_id;
+
+ /**
+ * @brief This member contains the identifier of scheduler C.
+ */
+ rtems_id scheduler_c_id;
+
+ /**
+ * @brief This member references the processor control of the processor to
+ * add.
+ */
+ Per_CPU_Control *cpu;
+
+ /**
+ * @brief This member contains the online status of the processor to add
+ * before the rtems_scheduler_add_processor() call is prepared.
+ */
+ bool online;
+
+ /**
+ * @brief If this member is true, then the processor should be added to the
+ * scheduler B during cleanup.
+ */
+ bool add_cpu_to_scheduler_b;
+
+ /**
+ * @brief This member provides the scheduler operation records.
+ */
+ T_scheduler_log_2 scheduler_log;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_scheduler_add_processor() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``scheduler_id`` parameter value.
+ */
+ rtems_id id;
+
+ /**
+ * @brief This member specifies if the ``cpu_index`` parameter value.
+ */
+ uint32_t cpu_index;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 4 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 4 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSchedulerReqAddProcessor_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSchedulerReqAddProcessor_Context;
+
+static RtemsSchedulerReqAddProcessor_Context
+ RtemsSchedulerReqAddProcessor_Instance;
+
+static const char * const RtemsSchedulerReqAddProcessor_PreDesc_HasReady[] = {
+ "Ready",
+ "Empty",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqAddProcessor_PreDesc_Id[] = {
+ "Invalid",
+ "Scheduler",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqAddProcessor_PreDesc_CPUIndex[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqAddProcessor_PreDesc_CPUState[] = {
+ "Idle",
+ "InUse",
+ "NotOnline",
+ "NotUsable",
+ "NA"
+};
+
+static const char * const * const RtemsSchedulerReqAddProcessor_PreDesc[] = {
+ RtemsSchedulerReqAddProcessor_PreDesc_HasReady,
+ RtemsSchedulerReqAddProcessor_PreDesc_Id,
+ RtemsSchedulerReqAddProcessor_PreDesc_CPUIndex,
+ RtemsSchedulerReqAddProcessor_PreDesc_CPUState,
+ NULL
+};
+
+#define CPU_TO_ADD 1
+
+static void RtemsSchedulerReqAddProcessor_Pre_HasReady_Prepare(
+ RtemsSchedulerReqAddProcessor_Context *ctx,
+ RtemsSchedulerReqAddProcessor_Pre_HasReady state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqAddProcessor_Pre_HasReady_Ready: {
+ /*
+ * While the scheduler has at least one ready thread.
+ */
+ ctx->scheduler_id = ctx->scheduler_a_id;
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Pre_HasReady_Empty: {
+ /*
+ * While the scheduler has no ready threads.
+ */
+ #if defined(RTEMS_SMP)
+ ctx->scheduler_id = ctx->scheduler_c_id;
+ #else
+ ctx->scheduler_id = ctx->scheduler_a_id;
+ #endif
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Pre_HasReady_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqAddProcessor_Pre_Id_Prepare(
+ RtemsSchedulerReqAddProcessor_Context *ctx,
+ RtemsSchedulerReqAddProcessor_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqAddProcessor_Pre_Id_Invalid: {
+ /*
+ * While the ``scheduler_id`` parameter is not associated with a
+ * scheduler.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Pre_Id_Scheduler: {
+ /*
+ * While the ``scheduler_id`` parameter is associated with a scheduler.
+ */
+ ctx->id = ctx->scheduler_id;
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqAddProcessor_Pre_CPUIndex_Prepare(
+ RtemsSchedulerReqAddProcessor_Context *ctx,
+ RtemsSchedulerReqAddProcessor_Pre_CPUIndex state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqAddProcessor_Pre_CPUIndex_Valid: {
+ /*
+ * While the ``cpu_index`` parameter is less than the configured
+ * processor maximum.
+ */
+ #if defined(RTEMS_SMP)
+ ctx->cpu_index = CPU_TO_ADD;
+ #else
+ ctx->cpu_index = 0;
+ #endif
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Pre_CPUIndex_Invalid: {
+ /*
+ * While the ``cpu_index`` parameter is greater than or equal to the
+ * configured processor maximum.
+ */
+ ctx->cpu_index = rtems_configuration_get_maximum_processors();
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Pre_CPUIndex_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqAddProcessor_Pre_CPUState_Prepare(
+ RtemsSchedulerReqAddProcessor_Context *ctx,
+ RtemsSchedulerReqAddProcessor_Pre_CPUState state
+)
+{
+ rtems_status_code sc;
+
+ switch ( state ) {
+ case RtemsSchedulerReqAddProcessor_Pre_CPUState_Idle: {
+ /*
+ * While the processor associated with the ``cpu_index`` parameter is
+ * configured to be used by a scheduler, while the processor associated
+ * with the ``cpu_index`` parameter is online, while the processor
+ * associated with the ``cpu_index`` parameter is not owned by a
+ * scheduler.
+ */
+ sc = rtems_scheduler_remove_processor(
+ ctx->scheduler_b_id,
+ CPU_TO_ADD
+ );
+ T_rsc_success( sc );
+ ctx->add_cpu_to_scheduler_b = true;
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Pre_CPUState_InUse: {
+ /*
+ * While the processor associated with the ``cpu_index`` parameter is
+ * owned by a scheduler.
+ */
+ /* Nothing to do */
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Pre_CPUState_NotOnline: {
+ /*
+ * While the processor associated with the ``cpu_index`` parameter is not
+ * online.
+ */
+ sc = rtems_scheduler_remove_processor(
+ ctx->scheduler_b_id,
+ CPU_TO_ADD
+ );
+ T_rsc_success( sc );
+ ctx->add_cpu_to_scheduler_b = true;
+ #if defined(RTEMS_SMP)
+ ctx->cpu->online = false;
+ #endif
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Pre_CPUState_NotUsable: {
+ /*
+ * While the processor associated with the ``cpu_index`` parameter is not
+ * configured to be used by a scheduler.
+ */
+ ctx->cpu_index = rtems_configuration_get_maximum_processors() - 1;
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Pre_CPUState_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqAddProcessor_Post_Status_Check(
+ RtemsSchedulerReqAddProcessor_Context *ctx,
+ RtemsSchedulerReqAddProcessor_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqAddProcessor_Post_Status_Ok: {
+ /*
+ * The return status of rtems_scheduler_add_processor() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Post_Status_InvId: {
+ /*
+ * The return status of rtems_scheduler_add_processor() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Post_Status_NotConf: {
+ /*
+ * The return status of rtems_scheduler_add_processor() shall be
+ * RTEMS_NOT_CONFIGURED.
+ */
+ T_rsc( ctx->status, RTEMS_NOT_CONFIGURED );
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Post_Status_IncStat: {
+ /*
+ * The return status of rtems_scheduler_add_processor() shall be
+ * RTEMS_INCORRECT_STATE.
+ */
+ T_rsc( ctx->status, RTEMS_INCORRECT_STATE );
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Post_Status_InUse: {
+ /*
+ * The return status of rtems_scheduler_add_processor() shall be
+ * RTEMS_RESOURCE_IN_USE.
+ */
+ T_rsc( ctx->status, RTEMS_RESOURCE_IN_USE );
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqAddProcessor_Post_Added_Check(
+ RtemsSchedulerReqAddProcessor_Context *ctx,
+ RtemsSchedulerReqAddProcessor_Post_Added state
+)
+{
+ rtems_status_code sc;
+ cpu_set_t set;
+ rtems_task_priority priority;
+
+ switch ( state ) {
+ case RtemsSchedulerReqAddProcessor_Post_Added_Yes: {
+ /*
+ * The processor specified by the ``cpu_index`` parameter shall be added
+ * to the scheduler specified by the ``scheduler_id`` by the
+ * rtems_scheduler_add_processor() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 2 );
+ T_eq_int(
+ ctx->scheduler_log.events[ 0 ].operation,
+ T_SCHEDULER_MAP_PRIORITY
+ );
+ T_eq_int(
+ ctx->scheduler_log.events[ 1 ].operation,
+ T_SCHEDULER_ADD_PROCESSOR
+ );
+
+ priority = GetSelfPriority();
+
+ if ( ctx->scheduler_id == ctx->scheduler_c_id ) {
+ SetSelfScheduler( ctx->scheduler_c_id, priority );
+ }
+
+ SetSelfAffinityOne( CPU_TO_ADD );
+ T_eq_u32( rtems_scheduler_get_processor(), CPU_TO_ADD );
+ SetSelfAffinityAll();
+
+ if ( ctx->scheduler_id == ctx->scheduler_c_id ) {
+ SetSelfScheduler( ctx->scheduler_a_id, priority );
+ }
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Post_Added_Nop: {
+ /*
+ * No processor shall be added to a scheduler by the
+ * rtems_scheduler_add_processor() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 0 );
+
+ CPU_ZERO( &set );
+ CPU_SET( CPU_TO_ADD, &set );
+ sc = rtems_task_set_affinity( RTEMS_SELF, sizeof( set ), &set );
+ T_rsc( sc, RTEMS_INVALID_NUMBER );
+ break;
+ }
+
+ case RtemsSchedulerReqAddProcessor_Post_Added_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqAddProcessor_Setup(
+ RtemsSchedulerReqAddProcessor_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_scheduler_ident(
+ TEST_SCHEDULER_A_NAME,
+ &ctx->scheduler_a_id
+ );
+ T_rsc_success( sc );
+
+ #if defined(RTEMS_SMP)
+ ctx->cpu = _Per_CPU_Get_by_index( CPU_TO_ADD );
+
+ sc = rtems_scheduler_ident( TEST_SCHEDULER_B_NAME, &ctx->scheduler_b_id );
+ T_rsc_success( sc );
+
+ sc = rtems_scheduler_ident( TEST_SCHEDULER_C_NAME, &ctx->scheduler_c_id );
+ T_rsc_success( sc );
+ #else
+ ctx->scheduler_b_id = INVALID_ID;
+ ctx->scheduler_c_id = INVALID_ID;
+ #endif
+}
+
+static void RtemsSchedulerReqAddProcessor_Setup_Wrap( void *arg )
+{
+ RtemsSchedulerReqAddProcessor_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSchedulerReqAddProcessor_Setup( ctx );
+}
+
+static void RtemsSchedulerReqAddProcessor_Prepare(
+ RtemsSchedulerReqAddProcessor_Context *ctx
+)
+{
+ #if defined(RTEMS_SMP)
+ ctx->add_cpu_to_scheduler_b = false;
+ ctx->online = _Per_CPU_Is_processor_online( ctx->cpu );
+ #endif
+}
+
+static void RtemsSchedulerReqAddProcessor_Action(
+ RtemsSchedulerReqAddProcessor_Context *ctx
+)
+{
+ T_scheduler_log *log;
+
+ log = T_scheduler_record_2( &ctx->scheduler_log );
+ T_null( log );
+
+ ctx->status = rtems_scheduler_add_processor( ctx->id, ctx->cpu_index );
+
+ log = T_scheduler_record( NULL );
+ T_eq_ptr( &log->header, &ctx->scheduler_log.header );
+}
+
+static void RtemsSchedulerReqAddProcessor_Cleanup(
+ RtemsSchedulerReqAddProcessor_Context *ctx
+)
+{
+ #if defined(RTEMS_SMP)
+ rtems_status_code sc;
+
+ ctx->cpu->online = ctx->online;
+
+ if ( ctx->status == RTEMS_SUCCESSFUL ) {
+ sc = rtems_scheduler_remove_processor( ctx->scheduler_id, CPU_TO_ADD );
+ T_rsc_success( sc );
+ }
+
+ if ( ctx->add_cpu_to_scheduler_b ) {
+ sc = rtems_scheduler_add_processor( ctx->scheduler_b_id, CPU_TO_ADD );
+ T_rsc_success( sc );
+ }
+ #endif
+}
+
+static const RtemsSchedulerReqAddProcessor_Entry
+RtemsSchedulerReqAddProcessor_Entries[] = {
+ { 0, 0, 0, 0, 1, RtemsSchedulerReqAddProcessor_Post_Status_InvId,
+ RtemsSchedulerReqAddProcessor_Post_Added_Nop },
+ { 0, 0, 0, 0, 1, RtemsSchedulerReqAddProcessor_Post_Status_NotConf,
+ RtemsSchedulerReqAddProcessor_Post_Added_Nop },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, RtemsSchedulerReqAddProcessor_Post_Status_InvId,
+ RtemsSchedulerReqAddProcessor_Post_Added_Nop },
+#else
+ { 1, 0, 0, 0, 0, RtemsSchedulerReqAddProcessor_Post_Status_NA,
+ RtemsSchedulerReqAddProcessor_Post_Added_NA },
+#endif
+ { 0, 0, 0, 0, 0, RtemsSchedulerReqAddProcessor_Post_Status_InvId,
+ RtemsSchedulerReqAddProcessor_Post_Added_Nop },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, RtemsSchedulerReqAddProcessor_Post_Status_Ok,
+ RtemsSchedulerReqAddProcessor_Post_Added_Yes },
+#else
+ { 1, 0, 0, 0, 0, RtemsSchedulerReqAddProcessor_Post_Status_NA,
+ RtemsSchedulerReqAddProcessor_Post_Added_NA },
+#endif
+ { 0, 0, 0, 0, 0, RtemsSchedulerReqAddProcessor_Post_Status_InUse,
+ RtemsSchedulerReqAddProcessor_Post_Added_Nop },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, RtemsSchedulerReqAddProcessor_Post_Status_IncStat,
+ RtemsSchedulerReqAddProcessor_Post_Added_Nop },
+#else
+ { 1, 0, 0, 0, 0, RtemsSchedulerReqAddProcessor_Post_Status_NA,
+ RtemsSchedulerReqAddProcessor_Post_Added_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, RtemsSchedulerReqAddProcessor_Post_Status_NotConf,
+ RtemsSchedulerReqAddProcessor_Post_Added_Nop }
+#else
+ { 1, 0, 0, 0, 0, RtemsSchedulerReqAddProcessor_Post_Status_NA,
+ RtemsSchedulerReqAddProcessor_Post_Added_NA }
+#endif
+};
+
+static const uint8_t
+RtemsSchedulerReqAddProcessor_Map[] = {
+ 2, 3, 2, 2, 0, 0, 0, 0, 4, 5, 6, 7, 1, 1, 1, 1, 2, 3, 2, 2, 0, 0, 0, 0, 4, 5,
+ 6, 7, 1, 1, 1, 1
+};
+
+static size_t RtemsSchedulerReqAddProcessor_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ RtemsSchedulerReqAddProcessor_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsSchedulerReqAddProcessor_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSchedulerReqAddProcessor_Fixture = {
+ .setup = RtemsSchedulerReqAddProcessor_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsSchedulerReqAddProcessor_Scope,
+ .initial_context = &RtemsSchedulerReqAddProcessor_Instance
+};
+
+static inline RtemsSchedulerReqAddProcessor_Entry
+RtemsSchedulerReqAddProcessor_PopEntry(
+ RtemsSchedulerReqAddProcessor_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSchedulerReqAddProcessor_Entries[
+ RtemsSchedulerReqAddProcessor_Map[ index ]
+ ];
+}
+
+static void RtemsSchedulerReqAddProcessor_SetPreConditionStates(
+ RtemsSchedulerReqAddProcessor_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+
+ if ( ctx->Map.entry.Pre_CPUState_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsSchedulerReqAddProcessor_Pre_CPUState_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+}
+
+static void RtemsSchedulerReqAddProcessor_TestVariant(
+ RtemsSchedulerReqAddProcessor_Context *ctx
+)
+{
+ RtemsSchedulerReqAddProcessor_Pre_HasReady_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSchedulerReqAddProcessor_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsSchedulerReqAddProcessor_Pre_CPUIndex_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsSchedulerReqAddProcessor_Pre_CPUState_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsSchedulerReqAddProcessor_Action( ctx );
+ RtemsSchedulerReqAddProcessor_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsSchedulerReqAddProcessor_Post_Added_Check(
+ ctx,
+ ctx->Map.entry.Post_Added
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsSchedulerReqAddProcessor( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsSchedulerReqAddProcessor,
+ &RtemsSchedulerReqAddProcessor_Fixture
+)
+{
+ RtemsSchedulerReqAddProcessor_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsSchedulerReqAddProcessor_Pre_HasReady_Ready;
+ ctx->Map.pci[ 0 ] < RtemsSchedulerReqAddProcessor_Pre_HasReady_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsSchedulerReqAddProcessor_Pre_Id_Invalid;
+ ctx->Map.pci[ 1 ] < RtemsSchedulerReqAddProcessor_Pre_Id_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsSchedulerReqAddProcessor_Pre_CPUIndex_Valid;
+ ctx->Map.pci[ 2 ] < RtemsSchedulerReqAddProcessor_Pre_CPUIndex_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsSchedulerReqAddProcessor_Pre_CPUState_Idle;
+ ctx->Map.pci[ 3 ] < RtemsSchedulerReqAddProcessor_Pre_CPUState_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ ctx->Map.entry = RtemsSchedulerReqAddProcessor_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsSchedulerReqAddProcessor_SetPreConditionStates( ctx );
+ RtemsSchedulerReqAddProcessor_Prepare( ctx );
+ RtemsSchedulerReqAddProcessor_TestVariant( ctx );
+ RtemsSchedulerReqAddProcessor_Cleanup( ctx );
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-scheduler-get-maximum-priority.c b/testsuites/validation/tc-scheduler-get-maximum-priority.c
new file mode 100644
index 0000000000..82aef23b67
--- /dev/null
+++ b/testsuites/validation/tc-scheduler-get-maximum-priority.c
@@ -0,0 +1,463 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSchedulerReqGetMaximumPriority
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <limits.h>
+#include <rtems.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSchedulerReqGetMaximumPriority \
+ * spec:/rtems/scheduler/req/get-maximum-priority
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSchedulerReqGetMaximumPriority_Pre_Id_Invalid,
+ RtemsSchedulerReqGetMaximumPriority_Pre_Id_Scheduler,
+ RtemsSchedulerReqGetMaximumPriority_Pre_Id_NA
+} RtemsSchedulerReqGetMaximumPriority_Pre_Id;
+
+typedef enum {
+ RtemsSchedulerReqGetMaximumPriority_Pre_Prio_Valid,
+ RtemsSchedulerReqGetMaximumPriority_Pre_Prio_Null,
+ RtemsSchedulerReqGetMaximumPriority_Pre_Prio_NA
+} RtemsSchedulerReqGetMaximumPriority_Pre_Prio;
+
+typedef enum {
+ RtemsSchedulerReqGetMaximumPriority_Post_Status_Ok,
+ RtemsSchedulerReqGetMaximumPriority_Post_Status_InvAddr,
+ RtemsSchedulerReqGetMaximumPriority_Post_Status_InvId,
+ RtemsSchedulerReqGetMaximumPriority_Post_Status_NA
+} RtemsSchedulerReqGetMaximumPriority_Post_Status;
+
+typedef enum {
+ RtemsSchedulerReqGetMaximumPriority_Post_PrioObj_Set,
+ RtemsSchedulerReqGetMaximumPriority_Post_PrioObj_Nop,
+ RtemsSchedulerReqGetMaximumPriority_Post_PrioObj_NA
+} RtemsSchedulerReqGetMaximumPriority_Post_PrioObj;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Pre_Prio_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_PrioObj : 2;
+} RtemsSchedulerReqGetMaximumPriority_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/scheduler/req/get-maximum-priority test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the identifier of a scheduler.
+ */
+ rtems_id scheduler_id;
+
+ /**
+ * @brief This member provides the object referenced by the ``priority``
+ * parameter.
+ */
+ rtems_task_priority priority_obj;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_scheduler_get_maximum_priority() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``scheduler_id`` parameter value.
+ */
+ rtems_id id;
+
+ /**
+ * @brief This member specifies if the ``priority`` parameter value.
+ */
+ rtems_task_priority *priority;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSchedulerReqGetMaximumPriority_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSchedulerReqGetMaximumPriority_Context;
+
+static RtemsSchedulerReqGetMaximumPriority_Context
+ RtemsSchedulerReqGetMaximumPriority_Instance;
+
+static const char * const RtemsSchedulerReqGetMaximumPriority_PreDesc_Id[] = {
+ "Invalid",
+ "Scheduler",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqGetMaximumPriority_PreDesc_Prio[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsSchedulerReqGetMaximumPriority_PreDesc[] = {
+ RtemsSchedulerReqGetMaximumPriority_PreDesc_Id,
+ RtemsSchedulerReqGetMaximumPriority_PreDesc_Prio,
+ NULL
+};
+
+static void RtemsSchedulerReqGetMaximumPriority_Pre_Id_Prepare(
+ RtemsSchedulerReqGetMaximumPriority_Context *ctx,
+ RtemsSchedulerReqGetMaximumPriority_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqGetMaximumPriority_Pre_Id_Invalid: {
+ /*
+ * While the ``scheduler_id`` parameter is not associated with a
+ * scheduler.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsSchedulerReqGetMaximumPriority_Pre_Id_Scheduler: {
+ /*
+ * While the ``scheduler_id`` parameter is associated with a scheduler.
+ */
+ ctx->id = ctx->scheduler_id;
+ break;
+ }
+
+ case RtemsSchedulerReqGetMaximumPriority_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqGetMaximumPriority_Pre_Prio_Prepare(
+ RtemsSchedulerReqGetMaximumPriority_Context *ctx,
+ RtemsSchedulerReqGetMaximumPriority_Pre_Prio state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqGetMaximumPriority_Pre_Prio_Valid: {
+ /*
+ * While the ``priority`` parameter references an object of type
+ * rtems_task_priority.
+ */
+ ctx->priority = &ctx->priority_obj;
+ break;
+ }
+
+ case RtemsSchedulerReqGetMaximumPriority_Pre_Prio_Null: {
+ /*
+ * While the ``priority`` parameter is equal to NULL.
+ */
+ ctx->priority = NULL;
+ break;
+ }
+
+ case RtemsSchedulerReqGetMaximumPriority_Pre_Prio_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqGetMaximumPriority_Post_Status_Check(
+ RtemsSchedulerReqGetMaximumPriority_Context *ctx,
+ RtemsSchedulerReqGetMaximumPriority_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqGetMaximumPriority_Post_Status_Ok: {
+ /*
+ * The return status of rtems_scheduler_get_maximum_priority() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsSchedulerReqGetMaximumPriority_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_scheduler_get_maximum_priority() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsSchedulerReqGetMaximumPriority_Post_Status_InvId: {
+ /*
+ * The return status of rtems_scheduler_get_maximum_priority() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsSchedulerReqGetMaximumPriority_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqGetMaximumPriority_Post_PrioObj_Check(
+ RtemsSchedulerReqGetMaximumPriority_Context *ctx,
+ RtemsSchedulerReqGetMaximumPriority_Post_PrioObj state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqGetMaximumPriority_Post_PrioObj_Set: {
+ /*
+ * The value of the object referenced by the ``priority`` parameter shall
+ * be set to the maximum priority value of the scheduler specified by the
+ * ``scheduler_id`` parameter after the return of the
+ * rtems_scheduler_get_maximum_priority() call.
+ */
+ #if defined(RTEMS_SMP)
+ T_eq_u32( ctx->priority_obj, INT_MAX );
+ #else
+ T_eq_u32( ctx->priority_obj, 127 );
+ #endif
+ break;
+ }
+
+ case RtemsSchedulerReqGetMaximumPriority_Post_PrioObj_Nop: {
+ /*
+ * Objects referenced by the ``priority`` parameter in past calls to
+ * rtems_scheduler_get_maximum_priority() shall not be accessed by the
+ * rtems_scheduler_get_maximum_priority() call.
+ */
+ T_eq_u32( ctx->priority_obj, PRIO_INVALID );
+ break;
+ }
+
+ case RtemsSchedulerReqGetMaximumPriority_Post_PrioObj_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqGetMaximumPriority_Setup(
+ RtemsSchedulerReqGetMaximumPriority_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_scheduler_ident(
+ TEST_SCHEDULER_A_NAME,
+ &ctx->scheduler_id
+ );
+ T_rsc_success( sc );
+}
+
+static void RtemsSchedulerReqGetMaximumPriority_Setup_Wrap( void *arg )
+{
+ RtemsSchedulerReqGetMaximumPriority_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSchedulerReqGetMaximumPriority_Setup( ctx );
+}
+
+static void RtemsSchedulerReqGetMaximumPriority_Prepare(
+ RtemsSchedulerReqGetMaximumPriority_Context *ctx
+)
+{
+ ctx->priority_obj = PRIO_INVALID;
+}
+
+static void RtemsSchedulerReqGetMaximumPriority_Action(
+ RtemsSchedulerReqGetMaximumPriority_Context *ctx
+)
+{
+ ctx->status = rtems_scheduler_get_maximum_priority( ctx->id, ctx->priority );
+}
+
+static const RtemsSchedulerReqGetMaximumPriority_Entry
+RtemsSchedulerReqGetMaximumPriority_Entries[] = {
+ { 0, 0, 0, RtemsSchedulerReqGetMaximumPriority_Post_Status_InvAddr,
+ RtemsSchedulerReqGetMaximumPriority_Post_PrioObj_Nop },
+ { 0, 0, 0, RtemsSchedulerReqGetMaximumPriority_Post_Status_InvId,
+ RtemsSchedulerReqGetMaximumPriority_Post_PrioObj_Nop },
+ { 0, 0, 0, RtemsSchedulerReqGetMaximumPriority_Post_Status_Ok,
+ RtemsSchedulerReqGetMaximumPriority_Post_PrioObj_Set }
+};
+
+static const uint8_t
+RtemsSchedulerReqGetMaximumPriority_Map[] = {
+ 1, 0, 2, 0
+};
+
+static size_t RtemsSchedulerReqGetMaximumPriority_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ RtemsSchedulerReqGetMaximumPriority_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsSchedulerReqGetMaximumPriority_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSchedulerReqGetMaximumPriority_Fixture = {
+ .setup = RtemsSchedulerReqGetMaximumPriority_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsSchedulerReqGetMaximumPriority_Scope,
+ .initial_context = &RtemsSchedulerReqGetMaximumPriority_Instance
+};
+
+static inline RtemsSchedulerReqGetMaximumPriority_Entry
+RtemsSchedulerReqGetMaximumPriority_PopEntry(
+ RtemsSchedulerReqGetMaximumPriority_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSchedulerReqGetMaximumPriority_Entries[
+ RtemsSchedulerReqGetMaximumPriority_Map[ index ]
+ ];
+}
+
+static void RtemsSchedulerReqGetMaximumPriority_TestVariant(
+ RtemsSchedulerReqGetMaximumPriority_Context *ctx
+)
+{
+ RtemsSchedulerReqGetMaximumPriority_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSchedulerReqGetMaximumPriority_Pre_Prio_Prepare(
+ ctx,
+ ctx->Map.pcs[ 1 ]
+ );
+ RtemsSchedulerReqGetMaximumPriority_Action( ctx );
+ RtemsSchedulerReqGetMaximumPriority_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsSchedulerReqGetMaximumPriority_Post_PrioObj_Check(
+ ctx,
+ ctx->Map.entry.Post_PrioObj
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsSchedulerReqGetMaximumPriority( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsSchedulerReqGetMaximumPriority,
+ &RtemsSchedulerReqGetMaximumPriority_Fixture
+)
+{
+ RtemsSchedulerReqGetMaximumPriority_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsSchedulerReqGetMaximumPriority_Pre_Id_Invalid;
+ ctx->Map.pcs[ 0 ] < RtemsSchedulerReqGetMaximumPriority_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsSchedulerReqGetMaximumPriority_Pre_Prio_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsSchedulerReqGetMaximumPriority_Pre_Prio_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsSchedulerReqGetMaximumPriority_PopEntry( ctx );
+ RtemsSchedulerReqGetMaximumPriority_Prepare( ctx );
+ RtemsSchedulerReqGetMaximumPriority_TestVariant( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-scheduler-get-processor-set.c b/testsuites/validation/tc-scheduler-get-processor-set.c
new file mode 100644
index 0000000000..ecc0254106
--- /dev/null
+++ b/testsuites/validation/tc-scheduler-get-processor-set.c
@@ -0,0 +1,550 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSchedulerReqGetProcessorSet
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSchedulerReqGetProcessorSet \
+ * spec:/rtems/scheduler/req/get-processor-set
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSchedulerReqGetProcessorSet_Pre_Id_Invalid,
+ RtemsSchedulerReqGetProcessorSet_Pre_Id_Scheduler,
+ RtemsSchedulerReqGetProcessorSet_Pre_Id_NA
+} RtemsSchedulerReqGetProcessorSet_Pre_Id;
+
+typedef enum {
+ RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize_Valid,
+ RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize_TooSmall,
+ RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize_Askew,
+ RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize_NA
+} RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize;
+
+typedef enum {
+ RtemsSchedulerReqGetProcessorSet_Pre_CPUSet_Valid,
+ RtemsSchedulerReqGetProcessorSet_Pre_CPUSet_Null,
+ RtemsSchedulerReqGetProcessorSet_Pre_CPUSet_NA
+} RtemsSchedulerReqGetProcessorSet_Pre_CPUSet;
+
+typedef enum {
+ RtemsSchedulerReqGetProcessorSet_Post_Status_Ok,
+ RtemsSchedulerReqGetProcessorSet_Post_Status_InvAddr,
+ RtemsSchedulerReqGetProcessorSet_Post_Status_InvId,
+ RtemsSchedulerReqGetProcessorSet_Post_Status_InvSize,
+ RtemsSchedulerReqGetProcessorSet_Post_Status_NA
+} RtemsSchedulerReqGetProcessorSet_Post_Status;
+
+typedef enum {
+ RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar_Set,
+ RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar_Nop,
+ RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar_NA
+} RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_CPUSetSize_NA : 1;
+ uint16_t Pre_CPUSet_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_CPUSetVar : 2;
+} RtemsSchedulerReqGetProcessorSet_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/scheduler/req/get-processor-set test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the identifier of a scheduler.
+ */
+ rtems_id scheduler_id;
+
+ /**
+ * @brief This member provides the object referenced by the ``cpusetsize``
+ * parameter.
+ */
+ cpu_set_t cpuset_value;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_scheduler_get_processor_set() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``scheduler_id`` parameter value.
+ */
+ rtems_id id;
+
+ /**
+ * @brief This member specifies if the ``cpusetsize`` parameter value.
+ */
+ size_t cpusetsize;
+
+ /**
+ * @brief This member specifies if the ``cpuset`` parameter value.
+ */
+ cpu_set_t *cpuset;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSchedulerReqGetProcessorSet_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSchedulerReqGetProcessorSet_Context;
+
+static RtemsSchedulerReqGetProcessorSet_Context
+ RtemsSchedulerReqGetProcessorSet_Instance;
+
+static const char * const RtemsSchedulerReqGetProcessorSet_PreDesc_Id[] = {
+ "Invalid",
+ "Scheduler",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqGetProcessorSet_PreDesc_CPUSetSize[] = {
+ "Valid",
+ "TooSmall",
+ "Askew",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqGetProcessorSet_PreDesc_CPUSet[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsSchedulerReqGetProcessorSet_PreDesc[] = {
+ RtemsSchedulerReqGetProcessorSet_PreDesc_Id,
+ RtemsSchedulerReqGetProcessorSet_PreDesc_CPUSetSize,
+ RtemsSchedulerReqGetProcessorSet_PreDesc_CPUSet,
+ NULL
+};
+
+static void RtemsSchedulerReqGetProcessorSet_Pre_Id_Prepare(
+ RtemsSchedulerReqGetProcessorSet_Context *ctx,
+ RtemsSchedulerReqGetProcessorSet_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqGetProcessorSet_Pre_Id_Invalid: {
+ /*
+ * While the ``scheduler_id`` parameter is not associated with a
+ * scheduler.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsSchedulerReqGetProcessorSet_Pre_Id_Scheduler: {
+ /*
+ * While the ``scheduler_id`` parameter is associated with a scheduler.
+ */
+ ctx->id = ctx->scheduler_id;
+ break;
+ }
+
+ case RtemsSchedulerReqGetProcessorSet_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize_Prepare(
+ RtemsSchedulerReqGetProcessorSet_Context *ctx,
+ RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize_Valid: {
+ /*
+ * While the ``cpusetsize`` parameter is an integral multiple of the size
+ * of long, while the ``cpusetsize`` parameter specifies a processor set
+ * which is large enough to contain the processor set of the scheduler.
+ */
+ ctx->cpusetsize = sizeof( ctx->cpuset_value );
+ break;
+ }
+
+ case RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize_TooSmall: {
+ /*
+ * While the ``cpusetsize`` parameter is an integral multiple of the size
+ * of long, while the ``cpusetsize`` parameter specifies a processor set
+ * which is not large enough to contain the processor set of the
+ * scheduler.
+ */
+ ctx->cpusetsize = 0;
+ break;
+ }
+
+ case RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize_Askew: {
+ /*
+ * While the ``cpusetsize`` parameter is not an integral multiple of the
+ * size of long.
+ */
+ ctx->cpusetsize = SIZE_MAX;
+ break;
+ }
+
+ case RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqGetProcessorSet_Pre_CPUSet_Prepare(
+ RtemsSchedulerReqGetProcessorSet_Context *ctx,
+ RtemsSchedulerReqGetProcessorSet_Pre_CPUSet state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqGetProcessorSet_Pre_CPUSet_Valid: {
+ /*
+ * While the ``cpuset`` parameter references an object of type cpu_set_t.
+ */
+ ctx->cpuset = &ctx->cpuset_value;
+ break;
+ }
+
+ case RtemsSchedulerReqGetProcessorSet_Pre_CPUSet_Null: {
+ /*
+ * While the ``cpuset`` parameter is equal to NULL.
+ */
+ ctx->cpuset = NULL;
+ break;
+ }
+
+ case RtemsSchedulerReqGetProcessorSet_Pre_CPUSet_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqGetProcessorSet_Post_Status_Check(
+ RtemsSchedulerReqGetProcessorSet_Context *ctx,
+ RtemsSchedulerReqGetProcessorSet_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqGetProcessorSet_Post_Status_Ok: {
+ /*
+ * The return status of rtems_scheduler_get_processor_set() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsSchedulerReqGetProcessorSet_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_scheduler_get_processor_set() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsSchedulerReqGetProcessorSet_Post_Status_InvId: {
+ /*
+ * The return status of rtems_scheduler_get_processor_set() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsSchedulerReqGetProcessorSet_Post_Status_InvSize: {
+ /*
+ * The return status of rtems_scheduler_get_processor_set() shall be
+ * RTEMS_INVALID_SIZE.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_SIZE );
+ break;
+ }
+
+ case RtemsSchedulerReqGetProcessorSet_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar_Check(
+ RtemsSchedulerReqGetProcessorSet_Context *ctx,
+ RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar state
+)
+{
+ cpu_set_t set;
+
+ switch ( state ) {
+ case RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar_Set: {
+ /*
+ * The value of the object referenced by the ``cpuset`` parameter shall
+ * be set to the processor set owned by the scheduler specified by the
+ * ``scheduler_id`` parameter at some point during the call after the
+ * return of the rtems_scheduler_get_processor_set() call.
+ */
+ CPU_ZERO( &set );
+ CPU_SET( 0, &set );
+ T_eq_int( CPU_CMP( &ctx->cpuset_value, &set ), 0 );
+ break;
+ }
+
+ case RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar_Nop: {
+ /*
+ * Objects referenced by the ``cpuset`` parameter in past calls to
+ * rtems_scheduler_get_processor_set() shall not be accessed by the
+ * rtems_scheduler_get_processor_set() call.
+ */
+ CPU_FILL( &set );
+ T_eq_int( CPU_CMP( &ctx->cpuset_value, &set ), 0 );
+ break;
+ }
+
+ case RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqGetProcessorSet_Setup(
+ RtemsSchedulerReqGetProcessorSet_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_scheduler_ident(
+ TEST_SCHEDULER_A_NAME,
+ &ctx->scheduler_id
+ );
+ T_rsc_success( sc );
+}
+
+static void RtemsSchedulerReqGetProcessorSet_Setup_Wrap( void *arg )
+{
+ RtemsSchedulerReqGetProcessorSet_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSchedulerReqGetProcessorSet_Setup( ctx );
+}
+
+static void RtemsSchedulerReqGetProcessorSet_Prepare(
+ RtemsSchedulerReqGetProcessorSet_Context *ctx
+)
+{
+ CPU_FILL( &ctx->cpuset_value );
+}
+
+static void RtemsSchedulerReqGetProcessorSet_Action(
+ RtemsSchedulerReqGetProcessorSet_Context *ctx
+)
+{
+ ctx->status = rtems_scheduler_get_processor_set(
+ ctx->id,
+ ctx->cpusetsize,
+ ctx->cpuset
+ );
+}
+
+static const RtemsSchedulerReqGetProcessorSet_Entry
+RtemsSchedulerReqGetProcessorSet_Entries[] = {
+ { 0, 0, 0, 0, RtemsSchedulerReqGetProcessorSet_Post_Status_InvAddr,
+ RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar_Nop },
+ { 0, 0, 0, 0, RtemsSchedulerReqGetProcessorSet_Post_Status_InvId,
+ RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar_Nop },
+ { 0, 0, 0, 0, RtemsSchedulerReqGetProcessorSet_Post_Status_InvSize,
+ RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar_Nop },
+ { 0, 0, 0, 0, RtemsSchedulerReqGetProcessorSet_Post_Status_Ok,
+ RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar_Set }
+};
+
+static const uint8_t
+RtemsSchedulerReqGetProcessorSet_Map[] = {
+ 1, 0, 1, 0, 1, 0, 3, 0, 2, 0, 2, 0
+};
+
+static size_t RtemsSchedulerReqGetProcessorSet_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ RtemsSchedulerReqGetProcessorSet_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsSchedulerReqGetProcessorSet_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSchedulerReqGetProcessorSet_Fixture = {
+ .setup = RtemsSchedulerReqGetProcessorSet_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsSchedulerReqGetProcessorSet_Scope,
+ .initial_context = &RtemsSchedulerReqGetProcessorSet_Instance
+};
+
+static inline RtemsSchedulerReqGetProcessorSet_Entry
+RtemsSchedulerReqGetProcessorSet_PopEntry(
+ RtemsSchedulerReqGetProcessorSet_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSchedulerReqGetProcessorSet_Entries[
+ RtemsSchedulerReqGetProcessorSet_Map[ index ]
+ ];
+}
+
+static void RtemsSchedulerReqGetProcessorSet_TestVariant(
+ RtemsSchedulerReqGetProcessorSet_Context *ctx
+)
+{
+ RtemsSchedulerReqGetProcessorSet_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize_Prepare(
+ ctx,
+ ctx->Map.pcs[ 1 ]
+ );
+ RtemsSchedulerReqGetProcessorSet_Pre_CPUSet_Prepare(
+ ctx,
+ ctx->Map.pcs[ 2 ]
+ );
+ RtemsSchedulerReqGetProcessorSet_Action( ctx );
+ RtemsSchedulerReqGetProcessorSet_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsSchedulerReqGetProcessorSet_Post_CPUSetVar_Check(
+ ctx,
+ ctx->Map.entry.Post_CPUSetVar
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsSchedulerReqGetProcessorSet( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsSchedulerReqGetProcessorSet,
+ &RtemsSchedulerReqGetProcessorSet_Fixture
+)
+{
+ RtemsSchedulerReqGetProcessorSet_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsSchedulerReqGetProcessorSet_Pre_Id_Invalid;
+ ctx->Map.pcs[ 0 ] < RtemsSchedulerReqGetProcessorSet_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsSchedulerReqGetProcessorSet_Pre_CPUSetSize_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsSchedulerReqGetProcessorSet_Pre_CPUSet_Valid;
+ ctx->Map.pcs[ 2 ] < RtemsSchedulerReqGetProcessorSet_Pre_CPUSet_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ ctx->Map.entry = RtemsSchedulerReqGetProcessorSet_PopEntry( ctx );
+ RtemsSchedulerReqGetProcessorSet_Prepare( ctx );
+ RtemsSchedulerReqGetProcessorSet_TestVariant( ctx );
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-scheduler-ident-by-processor-set.c b/testsuites/validation/tc-scheduler-ident-by-processor-set.c
new file mode 100644
index 0000000000..43c3b660a7
--- /dev/null
+++ b/testsuites/validation/tc-scheduler-ident-by-processor-set.c
@@ -0,0 +1,743 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSchedulerReqIdentByProcessorSet
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSchedulerReqIdentByProcessorSet \
+ * spec:/rtems/scheduler/req/ident-by-processor-set
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUOwnedByScheduler_Yes,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUOwnedByScheduler_No,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUOwnedByScheduler_NA
+} RtemsSchedulerReqIdentByProcessorSet_Pre_CPUOwnedByScheduler;
+
+typedef enum {
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetObj_Invalid,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetObj_Valid,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetObj_NA
+} RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetObj;
+
+typedef enum {
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetSize_Valid,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetSize_Invalid,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetSize_NA
+} RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetSize;
+
+typedef enum {
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSet_Valid,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSet_Null,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSet_NA
+} RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSet;
+
+typedef enum {
+ RtemsSchedulerReqIdentByProcessorSet_Pre_Id_Valid,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_Id_Null,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_Id_NA
+} RtemsSchedulerReqIdentByProcessorSet_Pre_Id;
+
+typedef enum {
+ RtemsSchedulerReqIdentByProcessorSet_Post_Status_Ok,
+ RtemsSchedulerReqIdentByProcessorSet_Post_Status_InvAddr,
+ RtemsSchedulerReqIdentByProcessorSet_Post_Status_InvSize,
+ RtemsSchedulerReqIdentByProcessorSet_Post_Status_InvName,
+ RtemsSchedulerReqIdentByProcessorSet_Post_Status_IncStat,
+ RtemsSchedulerReqIdentByProcessorSet_Post_Status_NA
+} RtemsSchedulerReqIdentByProcessorSet_Post_Status;
+
+typedef enum {
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Set,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Nop,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_NA
+} RtemsSchedulerReqIdentByProcessorSet_Post_IdVar;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_CPUOwnedByScheduler_NA : 1;
+ uint16_t Pre_CPUSetObj_NA : 1;
+ uint16_t Pre_CPUSetSize_NA : 1;
+ uint16_t Pre_CPUSet_NA : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_IdVar : 2;
+} RtemsSchedulerReqIdentByProcessorSet_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/scheduler/req/ident-by-processor-set
+ * test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the identifier of a second scheduler.
+ */
+ rtems_id second_scheduler_id;
+
+ /**
+ * @brief This member provides the object referenced by the ``cpuset``
+ * parameter.
+ */
+ cpu_set_t cpuset_value;
+
+ /**
+ * @brief This member provides the object referenced by the ``id`` parameter.
+ */
+ rtems_id id_value;
+
+ /**
+ * @brief If this member is true, then the processor specified by the
+ * ``cpusetsize`` parameter shall be owned by a scheduler.
+ */
+ bool cpu_has_scheduler;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_scheduler_ident_by_processor_set() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``cpusetsize`` parameter value.
+ */
+ size_t cpusetsize;
+
+ /**
+ * @brief This member specifies if the ``cpuset`` parameter value.
+ */
+ const cpu_set_t *cpuset;
+
+ /**
+ * @brief This member specifies if the ``id`` parameter value.
+ */
+ rtems_id *id;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 5 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 5 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSchedulerReqIdentByProcessorSet_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSchedulerReqIdentByProcessorSet_Context;
+
+static RtemsSchedulerReqIdentByProcessorSet_Context
+ RtemsSchedulerReqIdentByProcessorSet_Instance;
+
+static const char * const RtemsSchedulerReqIdentByProcessorSet_PreDesc_CPUOwnedByScheduler[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqIdentByProcessorSet_PreDesc_CPUSetObj[] = {
+ "Invalid",
+ "Valid",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqIdentByProcessorSet_PreDesc_CPUSetSize[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqIdentByProcessorSet_PreDesc_CPUSet[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqIdentByProcessorSet_PreDesc_Id[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsSchedulerReqIdentByProcessorSet_PreDesc[] = {
+ RtemsSchedulerReqIdentByProcessorSet_PreDesc_CPUOwnedByScheduler,
+ RtemsSchedulerReqIdentByProcessorSet_PreDesc_CPUSetObj,
+ RtemsSchedulerReqIdentByProcessorSet_PreDesc_CPUSetSize,
+ RtemsSchedulerReqIdentByProcessorSet_PreDesc_CPUSet,
+ RtemsSchedulerReqIdentByProcessorSet_PreDesc_Id,
+ NULL
+};
+
+static void
+RtemsSchedulerReqIdentByProcessorSet_Pre_CPUOwnedByScheduler_Prepare(
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUOwnedByScheduler state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_CPUOwnedByScheduler_Yes: {
+ /*
+ * While the highest numbered online processor specified by the processor
+ * set is owned by a scheduler.
+ */
+ ctx->cpu_has_scheduler = true;
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_CPUOwnedByScheduler_No: {
+ /*
+ * While the highest numbered online processor specified by the processor
+ * set is not owned by a scheduler.
+ */
+ ctx->cpu_has_scheduler = false;
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_CPUOwnedByScheduler_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetObj_Prepare(
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetObj state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetObj_Invalid: {
+ /*
+ * While the processor set contains no online processor.
+ */
+ CPU_ZERO( &ctx->cpuset_value );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetObj_Valid: {
+ /*
+ * While the processor set contains at least one online processor.
+ */
+ CPU_ZERO( &ctx->cpuset_value );
+
+ if ( ctx->cpu_has_scheduler ) {
+ CPU_SET( 0, &ctx->cpuset_value );
+ } else {
+ CPU_SET( 1, &ctx->cpuset_value );
+ }
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetObj_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetSize_Prepare(
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetSize state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetSize_Valid: {
+ /*
+ * While the ``cpusetsize`` parameter is an integral multiple of the size
+ * of long.
+ */
+ ctx->cpusetsize = sizeof( ctx->cpuset_value );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetSize_Invalid: {
+ /*
+ * While the ``cpusetsize`` parameter is not an integral multiple of the
+ * size of long.
+ */
+ ctx->cpusetsize = 1;
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetSize_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSet_Prepare(
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSet state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSet_Valid: {
+ /*
+ * While the ``cpuset`` parameter references an object of type cpu_set_t.
+ */
+ ctx->cpuset = &ctx->cpuset_value;
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSet_Null: {
+ /*
+ * While the ``cpuset`` parameter is equal to NULL.
+ */
+ ctx->cpuset = NULL;
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSet_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdentByProcessorSet_Pre_Id_Prepare(
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx,
+ RtemsSchedulerReqIdentByProcessorSet_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter references an object of type rtems_id.
+ */
+ ctx->id_value = INVALID_ID;
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_Id_Null: {
+ /*
+ * While the ``id`` parameter is equal to NULL.
+ */
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdentByProcessorSet_Post_Status_Check(
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx,
+ RtemsSchedulerReqIdentByProcessorSet_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdentByProcessorSet_Post_Status_Ok: {
+ /*
+ * The return status of rtems_scheduler_ident_by_processor_set() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_scheduler_ident_by_processor_set() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Post_Status_InvSize: {
+ /*
+ * The return status of rtems_scheduler_ident_by_processor_set() shall be
+ * RTEMS_INVALID_SIZE.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_SIZE );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Post_Status_InvName: {
+ /*
+ * The return status of rtems_scheduler_ident_by_processor_set() shall be
+ * RTEMS_INVALID_NAME.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Post_Status_IncStat: {
+ /*
+ * The return status of rtems_scheduler_ident_by_processor_set() shall be
+ * RTEMS_INVALID_NAME.
+ */
+ T_rsc( ctx->status, RTEMS_INCORRECT_STATE );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Check(
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Set: {
+ /*
+ * The value of the object referenced by the ``id`` parameter shall be
+ * set to the identifier of the scheduler which owned the highest
+ * numbered online processor specified by the ``cpusetsize`` ``cpuset``
+ * parameters at some point during the call after the return of the
+ * rtems_scheduler_ident_by_processor_set() call.
+ */
+ T_eq_u32( ctx->id_value, 0x0f010001 );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_scheduler_ident_by_processor_set() shall not be accessed by the
+ * rtems_scheduler_ident_by_processor_set() call.
+ */
+ T_eq_u32( ctx->id_value, INVALID_ID );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdentByProcessorSet_Setup(
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx
+)
+{
+ #if defined(RTEMS_SMP)
+ rtems_status_code sc;
+
+ sc = rtems_scheduler_ident(
+ TEST_SCHEDULER_B_NAME,
+ &ctx->second_scheduler_id
+ );
+ T_rsc_success( sc );
+ #else
+ ctx->second_scheduler_id = INVALID_ID;
+ #endif
+}
+
+static void RtemsSchedulerReqIdentByProcessorSet_Setup_Wrap( void *arg )
+{
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSchedulerReqIdentByProcessorSet_Setup( ctx );
+}
+
+static void RtemsSchedulerReqIdentByProcessorSet_Prepare(
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx
+)
+{
+ ctx->id_value = INVALID_ID;
+}
+
+static void RtemsSchedulerReqIdentByProcessorSet_Action(
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx
+)
+{
+ #if defined(RTEMS_SMP)
+ rtems_status_code sc;
+
+ if ( !ctx->cpu_has_scheduler ) {
+ sc = rtems_scheduler_remove_processor( ctx->second_scheduler_id, 1 );
+ T_rsc_success( sc );
+ }
+ #endif
+
+ ctx->status = rtems_scheduler_ident_by_processor_set(
+ ctx->cpusetsize,
+ ctx->cpuset,
+ ctx->id
+ );
+
+ #if defined(RTEMS_SMP)
+ if ( !ctx->cpu_has_scheduler ) {
+ sc = rtems_scheduler_add_processor( ctx->second_scheduler_id, 1 );
+ T_rsc_success( sc );
+ }
+ #endif
+}
+
+static const RtemsSchedulerReqIdentByProcessorSet_Entry
+RtemsSchedulerReqIdentByProcessorSet_Entries[] = {
+ { 0, 1, 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessorSet_Post_Status_InvAddr,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Nop },
+ { 0, 0, 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessorSet_Post_Status_InvAddr,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Nop },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessorSet_Post_Status_InvAddr,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Nop },
+#else
+ { 1, 0, 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessorSet_Post_Status_NA,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_NA },
+#endif
+ { 0, 1, 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessorSet_Post_Status_InvName,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Nop },
+ { 0, 1, 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessorSet_Post_Status_InvSize,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Nop },
+ { 0, 0, 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessorSet_Post_Status_Ok,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Set },
+ { 0, 0, 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessorSet_Post_Status_InvSize,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Nop },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessorSet_Post_Status_IncStat,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Nop },
+#else
+ { 1, 0, 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessorSet_Post_Status_NA,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessorSet_Post_Status_InvSize,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Nop }
+#else
+ { 1, 0, 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessorSet_Post_Status_NA,
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_NA }
+#endif
+};
+
+static const uint8_t
+RtemsSchedulerReqIdentByProcessorSet_Map[] = {
+ 3, 0, 0, 0, 4, 0, 0, 0, 5, 1, 1, 1, 6, 1, 1, 1, 3, 0, 0, 0, 4, 0, 0, 0, 7, 2,
+ 2, 2, 8, 2, 2, 2
+};
+
+static size_t RtemsSchedulerReqIdentByProcessorSet_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsSchedulerReqIdentByProcessorSet_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSchedulerReqIdentByProcessorSet_Fixture = {
+ .setup = RtemsSchedulerReqIdentByProcessorSet_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsSchedulerReqIdentByProcessorSet_Scope,
+ .initial_context = &RtemsSchedulerReqIdentByProcessorSet_Instance
+};
+
+static inline RtemsSchedulerReqIdentByProcessorSet_Entry
+RtemsSchedulerReqIdentByProcessorSet_PopEntry(
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSchedulerReqIdentByProcessorSet_Entries[
+ RtemsSchedulerReqIdentByProcessorSet_Map[ index ]
+ ];
+}
+
+static void RtemsSchedulerReqIdentByProcessorSet_SetPreConditionStates(
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx
+)
+{
+ if ( ctx->Map.entry.Pre_CPUOwnedByScheduler_NA ) {
+ ctx->Map.pcs[ 0 ] = RtemsSchedulerReqIdentByProcessorSet_Pre_CPUOwnedByScheduler_NA;
+ } else {
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ }
+
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+}
+
+static void RtemsSchedulerReqIdentByProcessorSet_TestVariant(
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx
+)
+{
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUOwnedByScheduler_Prepare(
+ ctx,
+ ctx->Map.pcs[ 0 ]
+ );
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetObj_Prepare(
+ ctx,
+ ctx->Map.pcs[ 1 ]
+ );
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetSize_Prepare(
+ ctx,
+ ctx->Map.pcs[ 2 ]
+ );
+ RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSet_Prepare(
+ ctx,
+ ctx->Map.pcs[ 3 ]
+ );
+ RtemsSchedulerReqIdentByProcessorSet_Pre_Id_Prepare(
+ ctx,
+ ctx->Map.pcs[ 4 ]
+ );
+ RtemsSchedulerReqIdentByProcessorSet_Action( ctx );
+ RtemsSchedulerReqIdentByProcessorSet_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsSchedulerReqIdentByProcessorSet_Post_IdVar_Check(
+ ctx,
+ ctx->Map.entry.Post_IdVar
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsSchedulerReqIdentByProcessorSet( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsSchedulerReqIdentByProcessorSet,
+ &RtemsSchedulerReqIdentByProcessorSet_Fixture
+)
+{
+ RtemsSchedulerReqIdentByProcessorSet_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsSchedulerReqIdentByProcessorSet_Pre_CPUOwnedByScheduler_Yes;
+ ctx->Map.pci[ 0 ] < RtemsSchedulerReqIdentByProcessorSet_Pre_CPUOwnedByScheduler_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetObj_Invalid;
+ ctx->Map.pci[ 1 ] < RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetObj_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetSize_Valid;
+ ctx->Map.pci[ 2 ] < RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSetSize_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSet_Valid;
+ ctx->Map.pci[ 3 ] < RtemsSchedulerReqIdentByProcessorSet_Pre_CPUSet_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = RtemsSchedulerReqIdentByProcessorSet_Pre_Id_Valid;
+ ctx->Map.pci[ 4 ] < RtemsSchedulerReqIdentByProcessorSet_Pre_Id_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ ctx->Map.entry = RtemsSchedulerReqIdentByProcessorSet_PopEntry(
+ ctx
+ );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsSchedulerReqIdentByProcessorSet_SetPreConditionStates( ctx );
+ RtemsSchedulerReqIdentByProcessorSet_Prepare( ctx );
+ RtemsSchedulerReqIdentByProcessorSet_TestVariant( ctx );
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-scheduler-ident-by-processor.c b/testsuites/validation/tc-scheduler-ident-by-processor.c
new file mode 100644
index 0000000000..8cfe25a70e
--- /dev/null
+++ b/testsuites/validation/tc-scheduler-ident-by-processor.c
@@ -0,0 +1,593 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSchedulerReqIdentByProcessor
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSchedulerReqIdentByProcessor \
+ * spec:/rtems/scheduler/req/ident-by-processor
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSchedulerReqIdentByProcessor_Pre_CPUOwnedByScheduler_Yes,
+ RtemsSchedulerReqIdentByProcessor_Pre_CPUOwnedByScheduler_No,
+ RtemsSchedulerReqIdentByProcessor_Pre_CPUOwnedByScheduler_NA
+} RtemsSchedulerReqIdentByProcessor_Pre_CPUOwnedByScheduler;
+
+typedef enum {
+ RtemsSchedulerReqIdentByProcessor_Pre_CPUIndex_Invalid,
+ RtemsSchedulerReqIdentByProcessor_Pre_CPUIndex_Valid,
+ RtemsSchedulerReqIdentByProcessor_Pre_CPUIndex_NA
+} RtemsSchedulerReqIdentByProcessor_Pre_CPUIndex;
+
+typedef enum {
+ RtemsSchedulerReqIdentByProcessor_Pre_Id_Valid,
+ RtemsSchedulerReqIdentByProcessor_Pre_Id_Null,
+ RtemsSchedulerReqIdentByProcessor_Pre_Id_NA
+} RtemsSchedulerReqIdentByProcessor_Pre_Id;
+
+typedef enum {
+ RtemsSchedulerReqIdentByProcessor_Post_Status_Ok,
+ RtemsSchedulerReqIdentByProcessor_Post_Status_InvAddr,
+ RtemsSchedulerReqIdentByProcessor_Post_Status_InvName,
+ RtemsSchedulerReqIdentByProcessor_Post_Status_IncStat,
+ RtemsSchedulerReqIdentByProcessor_Post_Status_NA
+} RtemsSchedulerReqIdentByProcessor_Post_Status;
+
+typedef enum {
+ RtemsSchedulerReqIdentByProcessor_Post_IdVar_Set,
+ RtemsSchedulerReqIdentByProcessor_Post_IdVar_Nop,
+ RtemsSchedulerReqIdentByProcessor_Post_IdVar_NA
+} RtemsSchedulerReqIdentByProcessor_Post_IdVar;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_CPUOwnedByScheduler_NA : 1;
+ uint16_t Pre_CPUIndex_NA : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_IdVar : 2;
+} RtemsSchedulerReqIdentByProcessor_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/scheduler/req/ident-by-processor test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the identifier of a second scheduler.
+ */
+ rtems_id second_scheduler_id;
+
+ /**
+ * @brief This member provides the object referenced by the ``id`` parameter.
+ */
+ rtems_id id_value;
+
+ /**
+ * @brief If this member is true, then the processor specified by the
+ * ``cpu_index`` parameter shall be owned by a scheduler.
+ */
+ bool cpu_has_scheduler;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_scheduler_ident_by_processor() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``cpu_index`` parameter value.
+ */
+ uint32_t cpu_index;
+
+ /**
+ * @brief This member specifies if the ``id`` parameter value.
+ */
+ rtems_id *id;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 3 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSchedulerReqIdentByProcessor_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSchedulerReqIdentByProcessor_Context;
+
+static RtemsSchedulerReqIdentByProcessor_Context
+ RtemsSchedulerReqIdentByProcessor_Instance;
+
+static const char * const RtemsSchedulerReqIdentByProcessor_PreDesc_CPUOwnedByScheduler[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqIdentByProcessor_PreDesc_CPUIndex[] = {
+ "Invalid",
+ "Valid",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqIdentByProcessor_PreDesc_Id[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsSchedulerReqIdentByProcessor_PreDesc[] = {
+ RtemsSchedulerReqIdentByProcessor_PreDesc_CPUOwnedByScheduler,
+ RtemsSchedulerReqIdentByProcessor_PreDesc_CPUIndex,
+ RtemsSchedulerReqIdentByProcessor_PreDesc_Id,
+ NULL
+};
+
+static void RtemsSchedulerReqIdentByProcessor_Pre_CPUOwnedByScheduler_Prepare(
+ RtemsSchedulerReqIdentByProcessor_Context *ctx,
+ RtemsSchedulerReqIdentByProcessor_Pre_CPUOwnedByScheduler state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdentByProcessor_Pre_CPUOwnedByScheduler_Yes: {
+ /*
+ * While the processor specified by the ``cpu_index`` parameter is owned
+ * by a scheduler.
+ */
+ ctx->cpu_has_scheduler = true;
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessor_Pre_CPUOwnedByScheduler_No: {
+ /*
+ * While the processor specified by the ``cpu_index`` parameter is not
+ * owned by a scheduler.
+ */
+ ctx->cpu_has_scheduler = false;
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessor_Pre_CPUOwnedByScheduler_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdentByProcessor_Pre_CPUIndex_Prepare(
+ RtemsSchedulerReqIdentByProcessor_Context *ctx,
+ RtemsSchedulerReqIdentByProcessor_Pre_CPUIndex state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdentByProcessor_Pre_CPUIndex_Invalid: {
+ /*
+ * While the ``cpu_index`` parameter is greater than or equal to the
+ * processor maximum.
+ */
+ ctx->cpu_index = rtems_scheduler_get_processor_maximum();
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessor_Pre_CPUIndex_Valid: {
+ /*
+ * While the ``cpu_index`` parameter is less than the processor maximum.
+ */
+ if ( ctx->cpu_has_scheduler ) {
+ ctx->cpu_index = 0;
+ } else {
+ ctx->cpu_index = 1;
+ }
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessor_Pre_CPUIndex_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdentByProcessor_Pre_Id_Prepare(
+ RtemsSchedulerReqIdentByProcessor_Context *ctx,
+ RtemsSchedulerReqIdentByProcessor_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdentByProcessor_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter references an object of type rtems_id.
+ */
+ ctx->id_value = INVALID_ID;
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessor_Pre_Id_Null: {
+ /*
+ * While the ``id`` parameter is equal to NULL.
+ */
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessor_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdentByProcessor_Post_Status_Check(
+ RtemsSchedulerReqIdentByProcessor_Context *ctx,
+ RtemsSchedulerReqIdentByProcessor_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdentByProcessor_Post_Status_Ok: {
+ /*
+ * The return status of rtems_scheduler_ident_by_processor() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessor_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_scheduler_ident_by_processor() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessor_Post_Status_InvName: {
+ /*
+ * The return status of rtems_scheduler_ident_by_processor() shall be
+ * RTEMS_INVALID_NAME.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessor_Post_Status_IncStat: {
+ /*
+ * The return status of rtems_scheduler_ident_by_processor() shall be
+ * RTEMS_INVALID_NAME.
+ */
+ T_rsc( ctx->status, RTEMS_INCORRECT_STATE );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessor_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdentByProcessor_Post_IdVar_Check(
+ RtemsSchedulerReqIdentByProcessor_Context *ctx,
+ RtemsSchedulerReqIdentByProcessor_Post_IdVar state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdentByProcessor_Post_IdVar_Set: {
+ /*
+ * The value of the object referenced by the ``id`` parameter shall be
+ * set to the identifier of the scheduler which owned the processor
+ * specified by the ``cpu_index`` parameter at some point during the call
+ * after the return of the rtems_scheduler_ident_by_processor() call.
+ */
+ T_eq_ptr( ctx->id, &ctx->id_value );
+ T_eq_u32( ctx->id_value, 0x0f010001 );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessor_Post_IdVar_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_scheduler_ident_by_processor() shall not be accessed by the
+ * rtems_scheduler_ident_by_processor() call.
+ */
+ T_eq_u32( ctx->id_value, INVALID_ID );
+ break;
+ }
+
+ case RtemsSchedulerReqIdentByProcessor_Post_IdVar_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdentByProcessor_Setup(
+ RtemsSchedulerReqIdentByProcessor_Context *ctx
+)
+{
+ #if defined(RTEMS_SMP)
+ rtems_status_code sc;
+
+ sc = rtems_scheduler_ident(
+ TEST_SCHEDULER_B_NAME,
+ &ctx->second_scheduler_id
+ );
+ T_rsc_success( sc );
+ #else
+ ctx->second_scheduler_id = INVALID_ID;
+ #endif
+}
+
+static void RtemsSchedulerReqIdentByProcessor_Setup_Wrap( void *arg )
+{
+ RtemsSchedulerReqIdentByProcessor_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSchedulerReqIdentByProcessor_Setup( ctx );
+}
+
+static void RtemsSchedulerReqIdentByProcessor_Prepare(
+ RtemsSchedulerReqIdentByProcessor_Context *ctx
+)
+{
+ ctx->id_value = INVALID_ID;
+}
+
+static void RtemsSchedulerReqIdentByProcessor_Action(
+ RtemsSchedulerReqIdentByProcessor_Context *ctx
+)
+{
+ #if defined(RTEMS_SMP)
+ rtems_status_code sc;
+
+ if ( !ctx->cpu_has_scheduler ) {
+ sc = rtems_scheduler_remove_processor( ctx->second_scheduler_id, 1 );
+ T_rsc_success( sc );
+ }
+ #endif
+
+ ctx->status = rtems_scheduler_ident_by_processor( ctx->cpu_index, ctx->id );
+
+ #if defined(RTEMS_SMP)
+ if ( !ctx->cpu_has_scheduler ) {
+ sc = rtems_scheduler_add_processor( ctx->second_scheduler_id, 1 );
+ T_rsc_success( sc );
+ }
+ #endif
+}
+
+static const RtemsSchedulerReqIdentByProcessor_Entry
+RtemsSchedulerReqIdentByProcessor_Entries[] = {
+ { 0, 1, 0, 0, RtemsSchedulerReqIdentByProcessor_Post_Status_InvName,
+ RtemsSchedulerReqIdentByProcessor_Post_IdVar_Nop },
+ { 0, 1, 0, 0, RtemsSchedulerReqIdentByProcessor_Post_Status_InvAddr,
+ RtemsSchedulerReqIdentByProcessor_Post_IdVar_Nop },
+ { 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessor_Post_Status_Ok,
+ RtemsSchedulerReqIdentByProcessor_Post_IdVar_Set },
+ { 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessor_Post_Status_InvAddr,
+ RtemsSchedulerReqIdentByProcessor_Post_IdVar_Nop },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessor_Post_Status_IncStat,
+ RtemsSchedulerReqIdentByProcessor_Post_IdVar_Nop },
+#else
+ { 1, 0, 0, 0, RtemsSchedulerReqIdentByProcessor_Post_Status_NA,
+ RtemsSchedulerReqIdentByProcessor_Post_IdVar_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, RtemsSchedulerReqIdentByProcessor_Post_Status_InvAddr,
+ RtemsSchedulerReqIdentByProcessor_Post_IdVar_Nop }
+#else
+ { 1, 0, 0, 0, RtemsSchedulerReqIdentByProcessor_Post_Status_NA,
+ RtemsSchedulerReqIdentByProcessor_Post_IdVar_NA }
+#endif
+};
+
+static const uint8_t
+RtemsSchedulerReqIdentByProcessor_Map[] = {
+ 0, 1, 2, 3, 0, 1, 4, 5
+};
+
+static size_t RtemsSchedulerReqIdentByProcessor_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ RtemsSchedulerReqIdentByProcessor_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsSchedulerReqIdentByProcessor_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSchedulerReqIdentByProcessor_Fixture = {
+ .setup = RtemsSchedulerReqIdentByProcessor_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsSchedulerReqIdentByProcessor_Scope,
+ .initial_context = &RtemsSchedulerReqIdentByProcessor_Instance
+};
+
+static inline RtemsSchedulerReqIdentByProcessor_Entry
+RtemsSchedulerReqIdentByProcessor_PopEntry(
+ RtemsSchedulerReqIdentByProcessor_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSchedulerReqIdentByProcessor_Entries[
+ RtemsSchedulerReqIdentByProcessor_Map[ index ]
+ ];
+}
+
+static void RtemsSchedulerReqIdentByProcessor_SetPreConditionStates(
+ RtemsSchedulerReqIdentByProcessor_Context *ctx
+)
+{
+ if ( ctx->Map.entry.Pre_CPUOwnedByScheduler_NA ) {
+ ctx->Map.pcs[ 0 ] = RtemsSchedulerReqIdentByProcessor_Pre_CPUOwnedByScheduler_NA;
+ } else {
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ }
+
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+}
+
+static void RtemsSchedulerReqIdentByProcessor_TestVariant(
+ RtemsSchedulerReqIdentByProcessor_Context *ctx
+)
+{
+ RtemsSchedulerReqIdentByProcessor_Pre_CPUOwnedByScheduler_Prepare(
+ ctx,
+ ctx->Map.pcs[ 0 ]
+ );
+ RtemsSchedulerReqIdentByProcessor_Pre_CPUIndex_Prepare(
+ ctx,
+ ctx->Map.pcs[ 1 ]
+ );
+ RtemsSchedulerReqIdentByProcessor_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsSchedulerReqIdentByProcessor_Action( ctx );
+ RtemsSchedulerReqIdentByProcessor_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsSchedulerReqIdentByProcessor_Post_IdVar_Check(
+ ctx,
+ ctx->Map.entry.Post_IdVar
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsSchedulerReqIdentByProcessor( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsSchedulerReqIdentByProcessor,
+ &RtemsSchedulerReqIdentByProcessor_Fixture
+)
+{
+ RtemsSchedulerReqIdentByProcessor_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsSchedulerReqIdentByProcessor_Pre_CPUOwnedByScheduler_Yes;
+ ctx->Map.pci[ 0 ] < RtemsSchedulerReqIdentByProcessor_Pre_CPUOwnedByScheduler_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsSchedulerReqIdentByProcessor_Pre_CPUIndex_Invalid;
+ ctx->Map.pci[ 1 ] < RtemsSchedulerReqIdentByProcessor_Pre_CPUIndex_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsSchedulerReqIdentByProcessor_Pre_Id_Valid;
+ ctx->Map.pci[ 2 ] < RtemsSchedulerReqIdentByProcessor_Pre_Id_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ ctx->Map.entry = RtemsSchedulerReqIdentByProcessor_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsSchedulerReqIdentByProcessor_SetPreConditionStates( ctx );
+ RtemsSchedulerReqIdentByProcessor_Prepare( ctx );
+ RtemsSchedulerReqIdentByProcessor_TestVariant( ctx );
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-scheduler-ident.c b/testsuites/validation/tc-scheduler-ident.c
new file mode 100644
index 0000000000..7b19f4a08e
--- /dev/null
+++ b/testsuites/validation/tc-scheduler-ident.c
@@ -0,0 +1,405 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSchedulerReqIdent
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSchedulerReqIdent spec:/rtems/scheduler/req/ident
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSchedulerReqIdent_Pre_Name_Invalid,
+ RtemsSchedulerReqIdent_Pre_Name_Valid,
+ RtemsSchedulerReqIdent_Pre_Name_NA
+} RtemsSchedulerReqIdent_Pre_Name;
+
+typedef enum {
+ RtemsSchedulerReqIdent_Pre_Id_Valid,
+ RtemsSchedulerReqIdent_Pre_Id_Null,
+ RtemsSchedulerReqIdent_Pre_Id_NA
+} RtemsSchedulerReqIdent_Pre_Id;
+
+typedef enum {
+ RtemsSchedulerReqIdent_Post_Status_Ok,
+ RtemsSchedulerReqIdent_Post_Status_InvAddr,
+ RtemsSchedulerReqIdent_Post_Status_InvName,
+ RtemsSchedulerReqIdent_Post_Status_NA
+} RtemsSchedulerReqIdent_Post_Status;
+
+typedef enum {
+ RtemsSchedulerReqIdent_Post_IdVar_Set,
+ RtemsSchedulerReqIdent_Post_IdVar_Nop,
+ RtemsSchedulerReqIdent_Post_IdVar_NA
+} RtemsSchedulerReqIdent_Post_IdVar;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Name_NA : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_IdVar : 2;
+} RtemsSchedulerReqIdent_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/scheduler/req/ident test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides the object referenced by the ``id`` parameter.
+ */
+ rtems_id id_value;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_scheduler_ident() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``name`` parameter value.
+ */
+ rtems_name name;
+
+ /**
+ * @brief This member specifies if the ``id`` parameter value.
+ */
+ rtems_id *id;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSchedulerReqIdent_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSchedulerReqIdent_Context;
+
+static RtemsSchedulerReqIdent_Context
+ RtemsSchedulerReqIdent_Instance;
+
+static const char * const RtemsSchedulerReqIdent_PreDesc_Name[] = {
+ "Invalid",
+ "Valid",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqIdent_PreDesc_Id[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsSchedulerReqIdent_PreDesc[] = {
+ RtemsSchedulerReqIdent_PreDesc_Name,
+ RtemsSchedulerReqIdent_PreDesc_Id,
+ NULL
+};
+
+static void RtemsSchedulerReqIdent_Pre_Name_Prepare(
+ RtemsSchedulerReqIdent_Context *ctx,
+ RtemsSchedulerReqIdent_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdent_Pre_Name_Invalid: {
+ /*
+ * While the ``name`` parameter is not associated with a scheduler.
+ */
+ ctx->name = 0;
+ break;
+ }
+
+ case RtemsSchedulerReqIdent_Pre_Name_Valid: {
+ /*
+ * While the ``name`` parameter is associated with a scheduler.
+ */
+ ctx->name = TEST_SCHEDULER_A_NAME;
+ break;
+ }
+
+ case RtemsSchedulerReqIdent_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdent_Pre_Id_Prepare(
+ RtemsSchedulerReqIdent_Context *ctx,
+ RtemsSchedulerReqIdent_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdent_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter references an object of type rtems_id.
+ */
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsSchedulerReqIdent_Pre_Id_Null: {
+ /*
+ * While the ``id`` parameter is equal to NULL.
+ */
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsSchedulerReqIdent_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdent_Post_Status_Check(
+ RtemsSchedulerReqIdent_Context *ctx,
+ RtemsSchedulerReqIdent_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdent_Post_Status_Ok: {
+ /*
+ * The return status of rtems_scheduler_ident() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsSchedulerReqIdent_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_scheduler_ident() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsSchedulerReqIdent_Post_Status_InvName: {
+ /*
+ * The return status of rtems_scheduler_ident() shall be
+ * RTEMS_INVALID_NAME.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsSchedulerReqIdent_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdent_Post_IdVar_Check(
+ RtemsSchedulerReqIdent_Context *ctx,
+ RtemsSchedulerReqIdent_Post_IdVar state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqIdent_Post_IdVar_Set: {
+ /*
+ * The value of the object referenced by the ``id`` parameter shall be
+ * set to the identifier of the scheduler with the lowest scheduler index
+ * and a name equal to the ``name`` parameter after the return of the
+ * rtems_scheduler_ident() call.
+ */
+ T_eq_ptr( ctx->id, &ctx->id_value );
+ T_eq_u32( ctx->id_value, 0x0f010001 );
+ break;
+ }
+
+ case RtemsSchedulerReqIdent_Post_IdVar_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_scheduler_ident() shall not be accessed by the
+ * rtems_scheduler_ident() call.
+ */
+ T_eq_u32( ctx->id_value, INVALID_ID );
+ break;
+ }
+
+ case RtemsSchedulerReqIdent_Post_IdVar_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqIdent_Prepare(
+ RtemsSchedulerReqIdent_Context *ctx
+)
+{
+ ctx->id_value = INVALID_ID;
+}
+
+static void RtemsSchedulerReqIdent_Action(
+ RtemsSchedulerReqIdent_Context *ctx
+)
+{
+ ctx->status = rtems_scheduler_ident( ctx->name, ctx->id );
+}
+
+static const RtemsSchedulerReqIdent_Entry
+RtemsSchedulerReqIdent_Entries[] = {
+ { 0, 0, 0, RtemsSchedulerReqIdent_Post_Status_InvAddr,
+ RtemsSchedulerReqIdent_Post_IdVar_Nop },
+ { 0, 0, 0, RtemsSchedulerReqIdent_Post_Status_InvName,
+ RtemsSchedulerReqIdent_Post_IdVar_Nop },
+ { 0, 0, 0, RtemsSchedulerReqIdent_Post_Status_Ok,
+ RtemsSchedulerReqIdent_Post_IdVar_Set }
+};
+
+static const uint8_t
+RtemsSchedulerReqIdent_Map[] = {
+ 1, 0, 2, 0
+};
+
+static size_t RtemsSchedulerReqIdent_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsSchedulerReqIdent_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsSchedulerReqIdent_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSchedulerReqIdent_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsSchedulerReqIdent_Scope,
+ .initial_context = &RtemsSchedulerReqIdent_Instance
+};
+
+static inline RtemsSchedulerReqIdent_Entry RtemsSchedulerReqIdent_PopEntry(
+ RtemsSchedulerReqIdent_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSchedulerReqIdent_Entries[
+ RtemsSchedulerReqIdent_Map[ index ]
+ ];
+}
+
+static void RtemsSchedulerReqIdent_TestVariant(
+ RtemsSchedulerReqIdent_Context *ctx
+)
+{
+ RtemsSchedulerReqIdent_Pre_Name_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSchedulerReqIdent_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsSchedulerReqIdent_Action( ctx );
+ RtemsSchedulerReqIdent_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsSchedulerReqIdent_Post_IdVar_Check( ctx, ctx->Map.entry.Post_IdVar );
+}
+
+/**
+ * @fn void T_case_body_RtemsSchedulerReqIdent( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsSchedulerReqIdent, &RtemsSchedulerReqIdent_Fixture )
+{
+ RtemsSchedulerReqIdent_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsSchedulerReqIdent_Pre_Name_Invalid;
+ ctx->Map.pcs[ 0 ] < RtemsSchedulerReqIdent_Pre_Name_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsSchedulerReqIdent_Pre_Id_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsSchedulerReqIdent_Pre_Id_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsSchedulerReqIdent_PopEntry( ctx );
+ RtemsSchedulerReqIdent_Prepare( ctx );
+ RtemsSchedulerReqIdent_TestVariant( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-scheduler-non-smp.c b/testsuites/validation/tc-scheduler-non-smp.c
new file mode 100644
index 0000000000..4e805769a0
--- /dev/null
+++ b/testsuites/validation/tc-scheduler-non-smp.c
@@ -0,0 +1,131 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSchedulerValNonSmp
+ */
+
+/*
+ * Copyright (C) 2021, 2023 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSchedulerValNonSmp spec:/rtems/scheduler/val/non-smp
+ *
+ * @ingroup TestsuitesValidationNonSmp
+ *
+ * @brief This test case collection provides validation test cases for non-SMP
+ * requirements of the @ref RTEMSAPIClassicScheduler.
+ *
+ * This test case performs the following actions:
+ *
+ * - Assert that rtems_scheduler_get_processor() is a constant expression which
+ * evaluates to zero.
+ *
+ * - Check that calling rtems_scheduler_get_processor() returns zero.
+ *
+ * - Assert that rtems_scheduler_get_processor_maximum() is a constant
+ * expression which evaluates to zero.
+ *
+ * - Check that calling rtems_scheduler_get_processor_maximum() returns one.
+ *
+ * @{
+ */
+
+/**
+ * @brief Assert that rtems_scheduler_get_processor() is a constant expression
+ * which evaluates to zero.
+ */
+static void RtemsSchedulerValNonSmp_Action_0( void )
+{
+ RTEMS_STATIC_ASSERT( rtems_scheduler_get_processor() == 0, GET_PROCESSOR );
+}
+
+/**
+ * @brief Check that calling rtems_scheduler_get_processor() returns zero.
+ */
+static void RtemsSchedulerValNonSmp_Action_1( void )
+{
+ T_eq_u32( rtems_scheduler_get_processor(), 0 );
+}
+
+/**
+ * @brief Assert that rtems_scheduler_get_processor_maximum() is a constant
+ * expression which evaluates to zero.
+ */
+static void RtemsSchedulerValNonSmp_Action_2( void )
+{
+ RTEMS_STATIC_ASSERT(
+ rtems_scheduler_get_processor_maximum() == 1,
+ GET_PROCESSOR_MAXIMUM
+ );
+}
+
+/**
+ * @brief Check that calling rtems_scheduler_get_processor_maximum() returns
+ * one.
+ */
+static void RtemsSchedulerValNonSmp_Action_3( void )
+{
+ T_eq_u32( rtems_scheduler_get_processor_maximum(), 1 );
+}
+
+/**
+ * @fn void T_case_body_RtemsSchedulerValNonSmp( void )
+ */
+T_TEST_CASE( RtemsSchedulerValNonSmp )
+{
+ RtemsSchedulerValNonSmp_Action_0();
+ RtemsSchedulerValNonSmp_Action_1();
+ RtemsSchedulerValNonSmp_Action_2();
+ RtemsSchedulerValNonSmp_Action_3();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-scheduler-remove-processor.c b/testsuites/validation/tc-scheduler-remove-processor.c
new file mode 100644
index 0000000000..f199389a33
--- /dev/null
+++ b/testsuites/validation/tc-scheduler-remove-processor.c
@@ -0,0 +1,1485 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSchedulerReqRemoveProcessor
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/test-scheduler.h>
+#include <rtems/score/percpu.h>
+#include <rtems/score/smpbarrier.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSchedulerReqRemoveProcessor \
+ * spec:/rtems/scheduler/req/remove-processor
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSchedulerReqRemoveProcessor_Pre_Id_Invalid,
+ RtemsSchedulerReqRemoveProcessor_Pre_Id_Scheduler,
+ RtemsSchedulerReqRemoveProcessor_Pre_Id_NA
+} RtemsSchedulerReqRemoveProcessor_Pre_Id;
+
+typedef enum {
+ RtemsSchedulerReqRemoveProcessor_Pre_CPUIndex_Valid,
+ RtemsSchedulerReqRemoveProcessor_Pre_CPUIndex_Invalid,
+ RtemsSchedulerReqRemoveProcessor_Pre_CPUIndex_NA
+} RtemsSchedulerReqRemoveProcessor_Pre_CPUIndex;
+
+typedef enum {
+ RtemsSchedulerReqRemoveProcessor_Pre_Owned_Yes,
+ RtemsSchedulerReqRemoveProcessor_Pre_Owned_No,
+ RtemsSchedulerReqRemoveProcessor_Pre_Owned_NA
+} RtemsSchedulerReqRemoveProcessor_Pre_Owned;
+
+typedef enum {
+ RtemsSchedulerReqRemoveProcessor_Pre_Last_Yes,
+ RtemsSchedulerReqRemoveProcessor_Pre_Last_No,
+ RtemsSchedulerReqRemoveProcessor_Pre_Last_NA
+} RtemsSchedulerReqRemoveProcessor_Pre_Last;
+
+typedef enum {
+ RtemsSchedulerReqRemoveProcessor_Pre_Home_Yes,
+ RtemsSchedulerReqRemoveProcessor_Pre_Home_No,
+ RtemsSchedulerReqRemoveProcessor_Pre_Home_NA
+} RtemsSchedulerReqRemoveProcessor_Pre_Home;
+
+typedef enum {
+ RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity_Yes,
+ RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity_No,
+ RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity_NA
+} RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity;
+
+typedef enum {
+ RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_Idle,
+ RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_Task,
+ RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_TaskIdle,
+ RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_Helping,
+ RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_NA
+} RtemsSchedulerReqRemoveProcessor_Pre_UsedBy;
+
+typedef enum {
+ RtemsSchedulerReqRemoveProcessor_Post_Status_Ok,
+ RtemsSchedulerReqRemoveProcessor_Post_Status_InvId,
+ RtemsSchedulerReqRemoveProcessor_Post_Status_InvNum,
+ RtemsSchedulerReqRemoveProcessor_Post_Status_InUse,
+ RtemsSchedulerReqRemoveProcessor_Post_Status_NA
+} RtemsSchedulerReqRemoveProcessor_Post_Status;
+
+typedef enum {
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_Yes,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_Nop,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_NA
+} RtemsSchedulerReqRemoveProcessor_Post_Removed;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_CPUIndex_NA : 1;
+ uint16_t Pre_Owned_NA : 1;
+ uint16_t Pre_Last_NA : 1;
+ uint16_t Pre_Home_NA : 1;
+ uint16_t Pre_RequiredByAffinity_NA : 1;
+ uint16_t Pre_UsedBy_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_Removed : 2;
+} RtemsSchedulerReqRemoveProcessor_Entry;
+
+typedef enum {
+ WORKER_A,
+ WORKER_B,
+ WORKER_C,
+ WORKER_COUNT
+} WorkerIndex;
+
+/**
+ * @brief Test context for spec:/rtems/scheduler/req/remove-processor test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the runner identifier.
+ */
+ rtems_id runner_id;
+
+ /**
+ * @brief This member contains the worker identifiers.
+ */
+ rtems_id worker_id[ WORKER_COUNT ];
+
+ /**
+ * @brief This member contains the mutex identifier.
+ */
+ rtems_id mutex_id;
+
+ /**
+ * @brief This member contains the sticky mutex identifier.
+ */
+ rtems_id sticky_id;
+
+ /**
+ * @brief This member contains the worker busy status.
+ */
+ volatile bool busy[ WORKER_COUNT ];
+
+ /**
+ * @brief This member contains the worker busy status.
+ */
+ volatile uint32_t busy_counter[ WORKER_COUNT ];
+
+ /**
+ * @brief This member contains the barrier to synchronize the runner and the
+ * workers.
+ */
+ SMP_barrier_Control barrier;
+
+ /**
+ * @brief This member contains the call within ISR request.
+ */
+ CallWithinISRRequest request;
+
+ /**
+ * @brief This member provides the context to wrap thread queue operations.
+ */
+ WrapThreadQueueContext wrap_tq_ctx;
+
+ /**
+ * @brief If this member is true, then the processor to remove shall be owned
+ * by the scheduler.
+ */
+ bool owned;
+
+ /**
+ * @brief If this member is true, then the processor to remove shall be the
+ * last processor of the scheduler.
+ */
+ bool last;
+
+ /**
+ * @brief If this member is true, then at least one non-idle task shall use
+ * the scheduler as its home scheduler.
+ */
+ bool home;
+
+ /**
+ * @brief If this member is true, then at least one non-idle task shall
+ * required the processor to remove due to its affinity set.
+ */
+ bool required_by_affinity;
+
+ /**
+ * @brief If this member is true, then the processor to remove shall be used
+ * by an idle task.
+ */
+ bool idle;
+
+ /**
+ * @brief If this member is true, then the processor to remove shall be used
+ * by a task or on behalf of a task which uses the scheduler as its home
+ * scheduler.
+ */
+ bool task;
+
+ /**
+ * @brief If this member is true, then the processor to remove shall be used
+ * by a task which uses the scheduler as a helping scheduler.
+ */
+ bool helping;
+
+ /**
+ * @brief This member provides the scheduler operation records.
+ */
+ T_scheduler_log_4 scheduler_log;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_scheduler_remove_processor() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies the ``scheduler_id`` parameter value.
+ */
+ rtems_id id;
+
+ /**
+ * @brief This member specifies the ``cpu_index`` parameter value.
+ */
+ uint32_t cpu_index;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 7 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 7 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSchedulerReqRemoveProcessor_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSchedulerReqRemoveProcessor_Context;
+
+static RtemsSchedulerReqRemoveProcessor_Context
+ RtemsSchedulerReqRemoveProcessor_Instance;
+
+static const char * const RtemsSchedulerReqRemoveProcessor_PreDesc_Id[] = {
+ "Invalid",
+ "Scheduler",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqRemoveProcessor_PreDesc_CPUIndex[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqRemoveProcessor_PreDesc_Owned[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqRemoveProcessor_PreDesc_Last[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqRemoveProcessor_PreDesc_Home[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqRemoveProcessor_PreDesc_RequiredByAffinity[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsSchedulerReqRemoveProcessor_PreDesc_UsedBy[] = {
+ "Idle",
+ "Task",
+ "TaskIdle",
+ "Helping",
+ "NA"
+};
+
+static const char * const * const RtemsSchedulerReqRemoveProcessor_PreDesc[] = {
+ RtemsSchedulerReqRemoveProcessor_PreDesc_Id,
+ RtemsSchedulerReqRemoveProcessor_PreDesc_CPUIndex,
+ RtemsSchedulerReqRemoveProcessor_PreDesc_Owned,
+ RtemsSchedulerReqRemoveProcessor_PreDesc_Last,
+ RtemsSchedulerReqRemoveProcessor_PreDesc_Home,
+ RtemsSchedulerReqRemoveProcessor_PreDesc_RequiredByAffinity,
+ RtemsSchedulerReqRemoveProcessor_PreDesc_UsedBy,
+ NULL
+};
+
+typedef RtemsSchedulerReqRemoveProcessor_Context Context;
+
+static void DoRemoveProcessor( Context *ctx )
+{
+ T_scheduler_log *log;
+
+ log = T_scheduler_record_4( &ctx->scheduler_log );
+ T_null( log );
+
+ ctx->status = rtems_scheduler_remove_processor( ctx->id, ctx->cpu_index );
+
+ log = T_scheduler_record( NULL );
+ T_eq_ptr( &log->header, &ctx->scheduler_log.header );
+
+ if ( ctx->status == RTEMS_SUCCESSFUL ) {
+ AddProcessor( ctx->id, ctx->cpu_index );
+ }
+}
+
+#if defined(RTEMS_SMP)
+
+#define EVENT_SYNC_RUNNER RTEMS_EVENT_0
+
+#define EVENT_OBTAIN RTEMS_EVENT_1
+
+#define EVENT_RELEASE RTEMS_EVENT_2
+
+#define EVENT_STICKY_OBTAIN RTEMS_EVENT_3
+
+#define EVENT_STICKY_RELEASE RTEMS_EVENT_4
+
+#define EVENT_RESTART RTEMS_EVENT_5
+
+#define EVENT_BUSY RTEMS_EVENT_6
+
+#define EVENT_SYNC_RUNNER_LATE RTEMS_EVENT_7
+
+static void Barriers( void *arg )
+{
+ Context *ctx;
+ SMP_barrier_State barrier_state;
+
+ ctx = arg;
+ _SMP_barrier_State_initialize( &barrier_state );
+
+ /* A */
+ _SMP_barrier_Wait( &ctx->barrier, &barrier_state, 2 );
+
+ /* B */
+ _SMP_barrier_Wait( &ctx->barrier, &barrier_state, 2 );
+}
+
+static void RequestISR( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ ctx->request.handler = Barriers;
+ ctx->request.arg = ctx;
+ CallWithinISRSubmit( &ctx->request );
+}
+
+static void SendAndSync(
+ Context *ctx,
+ WorkerIndex worker,
+ rtems_event_set event
+)
+{
+ SendEvents( ctx->worker_id[ worker ], EVENT_SYNC_RUNNER | event );
+ ReceiveAllEvents( EVENT_SYNC_RUNNER );
+ WaitForExecutionStop( ctx->worker_id[ worker ] );
+}
+
+static void MakeBusy( Context *ctx, WorkerIndex worker )
+{
+ ctx->busy_counter[ worker ] = 0;
+ ctx->busy[ worker ] = true;
+ SendEvents( ctx->worker_id[ worker ], EVENT_BUSY );
+}
+
+static void MakeBusyAndSync( Context *ctx, WorkerIndex worker )
+{
+ ctx->busy_counter[ worker ] = 0;
+ ctx->busy[ worker ] = true;
+ SendEvents( ctx->worker_id[ worker ], EVENT_SYNC_RUNNER | EVENT_BUSY );
+ ReceiveAllEvents( EVENT_SYNC_RUNNER );
+}
+
+static void StopBusy( Context *ctx, WorkerIndex worker )
+{
+ ctx->busy[ worker ] = false;
+}
+
+static void StopBusyAndWait( Context *ctx, WorkerIndex worker )
+{
+ StopBusy( ctx, worker );
+ WaitForExecutionStop( ctx->worker_id[ worker ] );
+}
+
+static void WaitForBusy( Context *ctx, WorkerIndex worker )
+{
+ while ( ctx->busy_counter[ worker ] == 0 ) {
+ /* Wait */
+ }
+}
+
+static void RemoveWithHelpingOnly( Context *ctx )
+{
+ SMP_barrier_State barrier_state;
+
+ /*
+ * Use the mutex and the worker to construct the removal of the last
+ * processor of a scheduler while a thread is scheduled.
+ */
+
+ _SMP_barrier_Control_initialize( &ctx->barrier );
+ _SMP_barrier_State_initialize( &barrier_state );
+
+ SetScheduler( ctx->worker_id[ WORKER_B ], SCHEDULER_B_ID, PRIO_NORMAL );
+
+ /* Let worker B help worker A */
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_OBTAIN );
+ SendAndSync( ctx, WORKER_B, EVENT_OBTAIN );
+
+ /*
+ * Restart the worker B to withdraw the help offer and wait on barriers.
+ * Move worker B to scheduler A. Remove the processor while worker A is
+ * scheduled.
+ */
+
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_RESTART );
+
+ /* A */
+ _SMP_barrier_Wait( &ctx->barrier, &barrier_state, 2 );
+
+ SetScheduler( ctx->worker_id[ WORKER_B ], SCHEDULER_A_ID, PRIO_HIGH );
+
+ ctx->id = SCHEDULER_B_ID;
+ ctx->cpu_index = 1;
+ DoRemoveProcessor( ctx );
+
+ /* B */
+ _SMP_barrier_Wait( &ctx->barrier, &barrier_state, 2 );
+
+ /* Clean up all used resources */
+ SetSelfPriority( PRIO_NORMAL );
+ SendEvents( ctx->worker_id[ WORKER_A ], EVENT_RELEASE );
+ T_busy(100000);
+}
+
+static void Worker( rtems_task_argument arg, WorkerIndex worker )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ rtems_event_set events;
+
+ events = ReceiveAnyEvents();
+
+ if ( ( events & EVENT_SYNC_RUNNER ) != 0 ) {
+ SendEvents( ctx->runner_id, EVENT_SYNC_RUNNER );
+ }
+
+ if ( ( events & EVENT_OBTAIN ) != 0 ) {
+ ObtainMutex( ctx->mutex_id );
+ }
+
+ if ( ( events & EVENT_RELEASE ) != 0 ) {
+ ReleaseMutex( ctx->mutex_id );
+ }
+
+ if ( ( events & EVENT_STICKY_OBTAIN ) != 0 ) {
+ ObtainMutex( ctx->sticky_id );
+ }
+
+ if ( ( events & EVENT_STICKY_RELEASE ) != 0 ) {
+ ReleaseMutex( ctx->sticky_id );
+ }
+
+ if ( ( events & EVENT_RESTART ) != 0 ) {
+ rtems_status_code sc;
+
+ T_eq_u32( rtems_scheduler_get_processor(), 0 );
+ SetPriority( ctx->runner_id, PRIO_VERY_HIGH );
+ T_eq_u32( rtems_scheduler_get_processor(), 1 );
+
+ if ( !ctx->last ) {
+ SetScheduler( ctx->worker_id[ WORKER_C ], SCHEDULER_A_ID, PRIO_LOW );
+ RemoveProcessor( SCHEDULER_C_ID, 2 );
+ AddProcessor( SCHEDULER_B_ID, 2 );
+ }
+
+ WrapThreadQueueExtract(
+ &ctx->wrap_tq_ctx,
+ GetThread( ctx->worker_id[ WORKER_B ] )
+ );
+
+ sc = rtems_task_restart(
+ ctx->worker_id[ WORKER_B ],
+ (rtems_task_argument) ctx
+ );
+ T_rsc_success( sc );
+
+ T_eq_u32( rtems_scheduler_get_processor(), 0 );
+
+ if ( !ctx->last ) {
+ RemoveProcessor( SCHEDULER_B_ID, 2 );
+ AddProcessor( SCHEDULER_C_ID, 2 );
+ SetScheduler( ctx->worker_id[ WORKER_C ], SCHEDULER_C_ID, PRIO_NORMAL );
+ }
+ }
+
+ if ( ( events & EVENT_BUSY ) != 0 ) {
+ while ( ctx->busy[ worker ] ) {
+ ++ctx->busy_counter[ worker ];
+ }
+ }
+
+ if ( ( events & EVENT_SYNC_RUNNER_LATE ) != 0 ) {
+ SendEvents( ctx->runner_id, EVENT_SYNC_RUNNER );
+ }
+ }
+}
+
+static void WorkerA( rtems_task_argument arg )
+{
+ Worker( arg, WORKER_A );
+}
+
+static void WorkerB( rtems_task_argument arg )
+{
+ Worker( arg, WORKER_B );
+}
+
+static void WorkerC( rtems_task_argument arg )
+{
+ Worker( arg, WORKER_C );
+}
+#endif
+
+static void RtemsSchedulerReqRemoveProcessor_Pre_Id_Prepare(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx,
+ RtemsSchedulerReqRemoveProcessor_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqRemoveProcessor_Pre_Id_Invalid: {
+ /*
+ * While the ``scheduler_id`` parameter is not associated with a
+ * scheduler.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_Id_Scheduler: {
+ /*
+ * While the ``scheduler_id`` parameter is associated with a scheduler.
+ */
+ ctx->id = SCHEDULER_A_ID;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Pre_CPUIndex_Prepare(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx,
+ RtemsSchedulerReqRemoveProcessor_Pre_CPUIndex state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqRemoveProcessor_Pre_CPUIndex_Valid: {
+ /*
+ * While the ``cpu_index`` parameter is less than the configured
+ * processor maximum.
+ */
+ ctx->cpu_index = 0;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_CPUIndex_Invalid: {
+ /*
+ * While the ``cpu_index`` parameter is greater than or equal to the
+ * configured processor maximum.
+ */
+ ctx->cpu_index = rtems_configuration_get_maximum_processors();
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_CPUIndex_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Pre_Owned_Prepare(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx,
+ RtemsSchedulerReqRemoveProcessor_Pre_Owned state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqRemoveProcessor_Pre_Owned_Yes: {
+ /*
+ * While the processor specified by the ``cpu_index`` parameter is owned
+ * by the scheduler specified by the ``scheduler_id`` parameter.
+ */
+ ctx->owned = true;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_Owned_No: {
+ /*
+ * While the processor specified by the ``cpu_index`` parameter is not
+ * owned by the scheduler specified by the ``scheduler_id`` parameter.
+ */
+ ctx->owned = false;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_Owned_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Pre_Last_Prepare(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx,
+ RtemsSchedulerReqRemoveProcessor_Pre_Last state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqRemoveProcessor_Pre_Last_Yes: {
+ /*
+ * While the processor specified by the ``cpu_index`` parameter is the
+ * last processor owned by the scheduler specified by the
+ * ``scheduler_id`` parameter.
+ */
+ ctx->last = true;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_Last_No: {
+ /*
+ * While the processor specified by the ``cpu_index`` parameter is not
+ * the last processor owned by the scheduler specified by the
+ * ``scheduler_id`` parameter.
+ */
+ ctx->last = false;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_Last_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Pre_Home_Prepare(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx,
+ RtemsSchedulerReqRemoveProcessor_Pre_Home state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqRemoveProcessor_Pre_Home_Yes: {
+ /*
+ * While at least one non-idle task exists which uses the scheduler
+ * specified by the ``scheduler_id`` parameter as its home scheduler.
+ */
+ ctx->home = true;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_Home_No: {
+ /*
+ * While no non-idle task exists which uses the scheduler specified by
+ * the ``scheduler_id`` parameter as its home scheduler.
+ */
+ ctx->home = false;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_Home_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity_Prepare(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx,
+ RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity_Yes: {
+ /*
+ * While at least one non-idle task which uses the scheduler specified by
+ * the ``scheduler_id`` parameter as its home scheduler exists those
+ * processor affinity set requires the processor specified by the
+ * ``cpu_index`` parameter.
+ */
+ ctx->required_by_affinity = true;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity_No: {
+ /*
+ * While no non-idle task which uses the scheduler specified by the
+ * ``scheduler_id`` parameter as its home scheduler exists those
+ * processor affinity set requires the processor specified by the
+ * ``cpu_index`` parameter.
+ */
+ ctx->required_by_affinity = false;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_Prepare(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx,
+ RtemsSchedulerReqRemoveProcessor_Pre_UsedBy state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_Idle: {
+ /*
+ * While the processor specified by the ``cpu_index`` parameter is used
+ * by an idle task.
+ */
+ ctx->idle = true;
+ ctx->task = false;
+ ctx->helping = false;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_Task: {
+ /*
+ * While the processor specified by the ``cpu_index`` parameter is used
+ * by a task task which uses the scheduler specified by the
+ * ``scheduler_id`` parameter as its home scheduler.
+ */
+ ctx->idle = false;
+ ctx->task = true;
+ ctx->helping = false;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_TaskIdle: {
+ /*
+ * While the processor specified by the ``cpu_index`` parameter is used
+ * by an idle task on behalf of a task task which uses the scheduler
+ * specified by the ``scheduler_id`` parameter as its home scheduler.
+ */
+ ctx->idle = true;
+ ctx->task = true;
+ ctx->helping = false;
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_Helping: {
+ /*
+ * While the processor specified by the ``cpu_index`` parameter is used
+ * by a task task which uses the scheduler specified by the
+ * ``scheduler_id`` parameter as a helping scheduler.
+ */
+ if ( !ctx->last && rtems_scheduler_get_processor_maximum() < 3 ) {
+ ctx->Map.skip = true;
+ } else {
+ ctx->idle = false;
+ ctx->task = false;
+ ctx->helping = true;
+ }
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Post_Status_Check(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx,
+ RtemsSchedulerReqRemoveProcessor_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqRemoveProcessor_Post_Status_Ok: {
+ /*
+ * The return status of rtems_scheduler_remove_processor() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Post_Status_InvId: {
+ /*
+ * The return status of rtems_scheduler_remove_processor() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Post_Status_InvNum: {
+ /*
+ * The return status of rtems_scheduler_remove_processor() shall be
+ * RTEMS_INVALID_NUMBER.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NUMBER );
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Post_Status_InUse: {
+ /*
+ * The return status of rtems_scheduler_remove_processor() shall be
+ * RTEMS_RESOURCE_IN_USE.
+ */
+ T_rsc( ctx->status, RTEMS_RESOURCE_IN_USE );
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Post_Removed_Check(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed state
+)
+{
+ switch ( state ) {
+ case RtemsSchedulerReqRemoveProcessor_Post_Removed_Yes: {
+ /*
+ * The processor specified by the ``cpu_index`` parameter shall be
+ * removed from the scheduler specified by the ``scheduler_id`` by the
+ * rtems_scheduler_remove_processor() call.
+ */
+ if ( ctx->home && ctx->helping ) {
+ /*
+ * For these test scenarios we use scheduler A in which the runner
+ * remains scheduled. So, an ask for help request is issued, when the
+ * processor allocated to a task which uses the scheduler as a helping
+ * scheduler is removed.
+ */
+ T_eq_u32( ctx->id, SCHEDULER_A_ID );
+ T_eq_sz( ctx->scheduler_log.header.recorded, 3 );
+ T_eq_int(
+ ctx->scheduler_log.events[ 0 ].operation,
+ T_SCHEDULER_REMOVE_PROCESSOR
+ );
+ T_eq_int(
+ ctx->scheduler_log.events[ 1 ].operation,
+ T_SCHEDULER_ASK_FOR_HELP
+ );
+ T_eq_int(
+ ctx->scheduler_log.events[ 2 ].operation,
+ T_SCHEDULER_ASK_FOR_HELP
+ );
+ } else {
+ T_eq_sz( ctx->scheduler_log.header.recorded, 1 );
+ T_eq_int(
+ ctx->scheduler_log.events[ 0 ].operation,
+ T_SCHEDULER_REMOVE_PROCESSOR
+ );
+ }
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Post_Removed_Nop: {
+ /*
+ * No processor shall be removed from a scheduler by the
+ * rtems_scheduler_remove_processor() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 0 );
+ break;
+ }
+
+ case RtemsSchedulerReqRemoveProcessor_Post_Removed_NA:
+ break;
+ }
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Setup(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx
+)
+{
+ #if defined(RTEMS_SMP)
+ rtems_status_code sc;
+ rtems_task_priority priority;
+
+ ctx->runner_id = rtems_task_self();
+ ctx->mutex_id = CreateMutex();
+
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'S', 'T', 'K', 'Y' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
+ PRIO_NORMAL,
+ &ctx->sticky_id
+ );
+ T_rsc_success( sc );
+
+ sc = rtems_semaphore_set_priority(
+ ctx->sticky_id,
+ SCHEDULER_B_ID,
+ PRIO_NORMAL,
+ &priority
+ );
+ T_rsc_success( sc );
+
+ if ( rtems_scheduler_get_processor_maximum() >= 3 ) {
+ sc = rtems_semaphore_set_priority(
+ ctx->sticky_id,
+ SCHEDULER_C_ID,
+ PRIO_LOW,
+ &priority
+ );
+ T_rsc_success( sc );
+
+ ctx->worker_id[ WORKER_C ] = CreateTask( "WRKC", PRIO_NORMAL );
+ SetScheduler( ctx->worker_id[ WORKER_C ], SCHEDULER_C_ID, PRIO_NORMAL );
+ StartTask( ctx->worker_id[ WORKER_C ], WorkerC, ctx );
+
+ if ( rtems_scheduler_get_processor_maximum() >= 4 ) {
+ RemoveProcessor( SCHEDULER_C_ID, 3 );
+ }
+ }
+
+ SetSelfPriority( PRIO_NORMAL );
+ SetSelfAffinityOne( 0 );
+
+ ctx->worker_id[ WORKER_A ] = CreateTask( "WRKA", PRIO_HIGH );
+ StartTask( ctx->worker_id[ WORKER_A ], WorkerA, ctx );
+
+ ctx->worker_id[ WORKER_B ] = CreateTask( "WRKB", PRIO_HIGH );
+ StartTask( ctx->worker_id[ WORKER_B ], WorkerB, ctx );
+
+ WrapThreadQueueInitialize( &ctx->wrap_tq_ctx, RequestISR, ctx );
+ #endif
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Setup_Wrap( void *arg )
+{
+ RtemsSchedulerReqRemoveProcessor_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSchedulerReqRemoveProcessor_Setup( ctx );
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Teardown(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx
+)
+{
+ #if defined(RTEMS_SMP)
+ DeleteTask( ctx->worker_id[ WORKER_A ] );
+ DeleteTask( ctx->worker_id[ WORKER_B ] );
+ DeleteTask( ctx->worker_id[ WORKER_C ] );
+ DeleteMutex( ctx->mutex_id );
+ DeleteMutex( ctx->sticky_id );
+ WrapThreadQueueDestroy( &ctx->wrap_tq_ctx );
+
+ if ( rtems_scheduler_get_processor_maximum() >= 4 ) {
+ AddProcessor( SCHEDULER_C_ID, 3 );
+ }
+
+ RestoreRunnerPriority();
+ SetSelfAffinityAll();
+ #endif
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Teardown_Wrap( void *arg )
+{
+ RtemsSchedulerReqRemoveProcessor_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSchedulerReqRemoveProcessor_Teardown( ctx );
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Prepare(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx
+)
+{
+ ctx->status = RTEMS_NOT_IMPLEMENTED;
+}
+
+static void RtemsSchedulerReqRemoveProcessor_Action(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx
+)
+{
+ if (
+ ctx->id == INVALID_ID ||
+ ctx->cpu_index == rtems_configuration_get_maximum_processors() ||
+ ( ctx->owned && ctx->last && ctx->home && ctx->required_by_affinity &&
+ ( ctx->task || ctx->idle ) )
+ ) {
+ DoRemoveProcessor( ctx );
+ } else {
+ #if defined(RTEMS_SMP)
+ if ( ctx->owned && !ctx->home && ctx->helping ) {
+ RemoveWithHelpingOnly( ctx );
+ } else {
+ if ( ctx->owned ) {
+ rtems_id worker_a;
+ rtems_id worker_b;
+
+ worker_a = ctx->worker_id[ WORKER_A ];
+ worker_b = ctx->worker_id[ WORKER_B ];
+
+ ctx->cpu_index = 1;
+
+ if ( ctx->last ) {
+ ctx->id = SCHEDULER_B_ID;
+ } else {
+ RemoveProcessor( SCHEDULER_B_ID, 1 );
+ AddProcessor( SCHEDULER_A_ID, 1 );
+ }
+
+ if ( ctx->home ) {
+ SetScheduler( worker_a, ctx->id, PRIO_LOW );
+
+ if ( ctx->required_by_affinity ) {
+ SetAffinityOne( worker_a, 1 );
+ } else {
+ SetAffinityAll( worker_a );
+ }
+ }
+
+ if ( ctx->idle ) {
+ if ( ctx->task ) {
+ SendAndSync( ctx, WORKER_A, EVENT_STICKY_OBTAIN );
+ SuspendTask( worker_a );
+ }
+ } else if ( ctx->task ) {
+ MakeBusy( ctx, WORKER_A );
+ } else if ( ctx->helping ) {
+ T_true( ctx->home );
+
+ if ( ctx->last ) {
+ SendEvents( worker_b, EVENT_OBTAIN );
+ SetPriority( worker_b, PRIO_LOW );
+ } else {
+ SetScheduler( worker_b, SCHEDULER_C_ID, PRIO_LOW );
+ SendAndSync( ctx, WORKER_B, EVENT_OBTAIN );
+ MakeBusyAndSync( ctx, WORKER_C );
+ }
+
+ SendAndSync( ctx, WORKER_A, EVENT_OBTAIN );
+ MakeBusy( ctx, WORKER_B );
+ WaitForBusy( ctx, WORKER_B );
+ }
+
+ DoRemoveProcessor( ctx );
+
+ if ( ctx->idle ) {
+ if ( ctx->task ) {
+ ResumeTask( worker_a );
+ SendAndSync( ctx, WORKER_A, EVENT_STICKY_RELEASE );
+ }
+ } else if ( ctx->task ) {
+ StopBusyAndWait( ctx, WORKER_A );
+ } else if ( ctx->helping ) {
+ StopBusy( ctx, WORKER_B );
+
+ if ( ctx->last ) {
+ SetPriority( worker_b, PRIO_HIGH );
+ SendEvents( worker_b, EVENT_RELEASE );
+ } else {
+ StopBusyAndWait( ctx, WORKER_C );
+ SendAndSync( ctx, WORKER_B, EVENT_RELEASE );
+ SetScheduler( worker_b, SCHEDULER_A_ID, PRIO_HIGH );
+ }
+
+ WaitForExecutionStop( worker_b );
+ SendAndSync( ctx, WORKER_A, EVENT_RELEASE );
+ }
+
+ SetAffinityAll( worker_a );
+ SetScheduler( worker_a, SCHEDULER_A_ID, PRIO_HIGH );
+
+ if ( !ctx->last ) {
+ RemoveProcessor( SCHEDULER_A_ID, 1 );
+ AddProcessor( SCHEDULER_B_ID, 1 );
+ }
+ } else {
+ ctx->id = SCHEDULER_B_ID;
+ DoRemoveProcessor( ctx );
+ }
+ }
+ #else
+ T_unreachable();
+ #endif
+ }
+}
+
+static const RtemsSchedulerReqRemoveProcessor_Entry
+RtemsSchedulerReqRemoveProcessor_Entries[] = {
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_NA,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_NA },
+#else
+ { 0, 0, 0, 1, 1, 1, 1, 1, RtemsSchedulerReqRemoveProcessor_Post_Status_InvId,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_Nop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_NA,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_NA },
+#else
+ { 0, 0, 0, 1, 1, 1, 1, 1,
+ RtemsSchedulerReqRemoveProcessor_Post_Status_InvNum,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_Nop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_NA,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_NA },
+#else
+ { 0, 0, 0, 0, 1, 1, 1, 1,
+ RtemsSchedulerReqRemoveProcessor_Post_Status_InvNum,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_Nop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_NA,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 1, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_NA,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_NA,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_InUse,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_Nop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_NA,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 1, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_Ok,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_Yes },
+#endif
+ { 0, 0, 0, 1, 1, 1, 1, 1, RtemsSchedulerReqRemoveProcessor_Post_Status_InvId,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_Nop },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_NA,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_NA,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_NA,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_Ok,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_InUse,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_Nop },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_NA,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 1, 0, RtemsSchedulerReqRemoveProcessor_Post_Status_InUse,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_Nop },
+#endif
+ { 0, 0, 0, 1, 1, 1, 1, 1,
+ RtemsSchedulerReqRemoveProcessor_Post_Status_InvNum,
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_Nop }
+};
+
+static const uint8_t
+RtemsSchedulerReqRemoveProcessor_Map[] = {
+ 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9,
+ 4, 4, 7, 7, 7, 7, 5, 3, 3, 10, 5, 3, 3, 10, 4, 4, 4, 4, 8, 8, 8, 8, 5, 3, 3,
+ 5, 5, 3, 3, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 11, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+};
+
+static size_t RtemsSchedulerReqRemoveProcessor_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ RtemsSchedulerReqRemoveProcessor_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsSchedulerReqRemoveProcessor_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSchedulerReqRemoveProcessor_Fixture = {
+ .setup = RtemsSchedulerReqRemoveProcessor_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsSchedulerReqRemoveProcessor_Teardown_Wrap,
+ .scope = RtemsSchedulerReqRemoveProcessor_Scope,
+ .initial_context = &RtemsSchedulerReqRemoveProcessor_Instance
+};
+
+static const uint8_t RtemsSchedulerReqRemoveProcessor_Weights[] = {
+ 128, 64, 32, 16, 8, 4, 1
+};
+
+static void RtemsSchedulerReqRemoveProcessor_Skip(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx,
+ size_t index
+)
+{
+ switch ( index + 1 ) {
+ case 1:
+ ctx->Map.pci[ 1 ] = RtemsSchedulerReqRemoveProcessor_Pre_CPUIndex_NA - 1;
+ /* Fall through */
+ case 2:
+ ctx->Map.pci[ 2 ] = RtemsSchedulerReqRemoveProcessor_Pre_Owned_NA - 1;
+ /* Fall through */
+ case 3:
+ ctx->Map.pci[ 3 ] = RtemsSchedulerReqRemoveProcessor_Pre_Last_NA - 1;
+ /* Fall through */
+ case 4:
+ ctx->Map.pci[ 4 ] = RtemsSchedulerReqRemoveProcessor_Pre_Home_NA - 1;
+ /* Fall through */
+ case 5:
+ ctx->Map.pci[ 5 ] = RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity_NA - 1;
+ /* Fall through */
+ case 6:
+ ctx->Map.pci[ 6 ] = RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_NA - 1;
+ break;
+ }
+}
+
+static inline RtemsSchedulerReqRemoveProcessor_Entry
+RtemsSchedulerReqRemoveProcessor_PopEntry(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx
+)
+{
+ size_t index;
+
+ if ( ctx->Map.skip ) {
+ size_t i;
+
+ ctx->Map.skip = false;
+ index = 0;
+
+ for ( i = 0; i < 7; ++i ) {
+ index += RtemsSchedulerReqRemoveProcessor_Weights[ i ] * ctx->Map.pci[ i ];
+ }
+ } else {
+ index = ctx->Map.index;
+ }
+
+ ctx->Map.index = index + 1;
+
+ return RtemsSchedulerReqRemoveProcessor_Entries[
+ RtemsSchedulerReqRemoveProcessor_Map[ index ]
+ ];
+}
+
+static void RtemsSchedulerReqRemoveProcessor_SetPreConditionStates(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+
+ if ( ctx->Map.entry.Pre_Owned_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsSchedulerReqRemoveProcessor_Pre_Owned_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Last_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsSchedulerReqRemoveProcessor_Pre_Last_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Home_NA ) {
+ ctx->Map.pcs[ 4 ] = RtemsSchedulerReqRemoveProcessor_Pre_Home_NA;
+ } else {
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+ }
+
+ if ( ctx->Map.entry.Pre_RequiredByAffinity_NA ) {
+ ctx->Map.pcs[ 5 ] = RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity_NA;
+ } else {
+ ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
+ }
+
+ if ( ctx->Map.entry.Pre_UsedBy_NA ) {
+ ctx->Map.pcs[ 6 ] = RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_NA;
+ } else {
+ ctx->Map.pcs[ 6 ] = ctx->Map.pci[ 6 ];
+ }
+}
+
+static void RtemsSchedulerReqRemoveProcessor_TestVariant(
+ RtemsSchedulerReqRemoveProcessor_Context *ctx
+)
+{
+ RtemsSchedulerReqRemoveProcessor_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSchedulerReqRemoveProcessor_Pre_CPUIndex_Prepare(
+ ctx,
+ ctx->Map.pcs[ 1 ]
+ );
+ RtemsSchedulerReqRemoveProcessor_Pre_Owned_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsSchedulerReqRemoveProcessor_Pre_Last_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsSchedulerReqRemoveProcessor_Pre_Home_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity_Prepare(
+ ctx,
+ ctx->Map.pcs[ 5 ]
+ );
+ RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_Prepare(
+ ctx,
+ ctx->Map.pcs[ 6 ]
+ );
+
+ if ( ctx->Map.skip ) {
+ RtemsSchedulerReqRemoveProcessor_Skip( ctx, 6 );
+ return;
+ }
+
+ RtemsSchedulerReqRemoveProcessor_Action( ctx );
+ RtemsSchedulerReqRemoveProcessor_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsSchedulerReqRemoveProcessor_Post_Removed_Check(
+ ctx,
+ ctx->Map.entry.Post_Removed
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsSchedulerReqRemoveProcessor( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsSchedulerReqRemoveProcessor,
+ &RtemsSchedulerReqRemoveProcessor_Fixture
+)
+{
+ RtemsSchedulerReqRemoveProcessor_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+ ctx->Map.skip = false;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsSchedulerReqRemoveProcessor_Pre_Id_Invalid;
+ ctx->Map.pci[ 0 ] < RtemsSchedulerReqRemoveProcessor_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsSchedulerReqRemoveProcessor_Pre_CPUIndex_Valid;
+ ctx->Map.pci[ 1 ] < RtemsSchedulerReqRemoveProcessor_Pre_CPUIndex_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsSchedulerReqRemoveProcessor_Pre_Owned_Yes;
+ ctx->Map.pci[ 2 ] < RtemsSchedulerReqRemoveProcessor_Pre_Owned_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsSchedulerReqRemoveProcessor_Pre_Last_Yes;
+ ctx->Map.pci[ 3 ] < RtemsSchedulerReqRemoveProcessor_Pre_Last_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = RtemsSchedulerReqRemoveProcessor_Pre_Home_Yes;
+ ctx->Map.pci[ 4 ] < RtemsSchedulerReqRemoveProcessor_Pre_Home_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ for (
+ ctx->Map.pci[ 5 ] = RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity_Yes;
+ ctx->Map.pci[ 5 ] < RtemsSchedulerReqRemoveProcessor_Pre_RequiredByAffinity_NA;
+ ++ctx->Map.pci[ 5 ]
+ ) {
+ for (
+ ctx->Map.pci[ 6 ] = RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_Idle;
+ ctx->Map.pci[ 6 ] < RtemsSchedulerReqRemoveProcessor_Pre_UsedBy_NA;
+ ++ctx->Map.pci[ 6 ]
+ ) {
+ ctx->Map.entry = RtemsSchedulerReqRemoveProcessor_PopEntry(
+ ctx
+ );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsSchedulerReqRemoveProcessor_SetPreConditionStates( ctx );
+ RtemsSchedulerReqRemoveProcessor_Prepare( ctx );
+ RtemsSchedulerReqRemoveProcessor_TestVariant( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-scheduler-smp-only.c b/testsuites/validation/tc-scheduler-smp-only.c
new file mode 100644
index 0000000000..0455567aee
--- /dev/null
+++ b/testsuites/validation/tc-scheduler-smp-only.c
@@ -0,0 +1,255 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSchedulerValSmpOnly
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <limits.h>
+#include <rtems.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSchedulerValSmpOnly spec:/rtems/scheduler/val/smp-only
+ *
+ * @ingroup TestsuitesValidationSmpOnly0
+ *
+ * @brief This test case collection provides validation test cases for SMP-only
+ * requirements of the @ref RTEMSAPIClassicScheduler.
+ *
+ * This test case performs the following actions:
+ *
+ * - Call rtems_scheduler_get_processor() on all online processors and check
+ * the returned value.
+ *
+ * - Call rtems_scheduler_get_processor_maximum() and check the returned value.
+ *
+ * - Check that the returned value is greater than or equal to one.
+ *
+ * - Check that the returned value is less than or equal to
+ * rtems_configuration_get_maximum_processors().
+ *
+ * - Call rtems_scheduler_ident() for each configured scheduler.
+ *
+ * - Check that the object index of scheduler A has the expected value.
+ *
+ * - Check that the object index of scheduler B has the expected value.
+ *
+ * - Check that the object index of scheduler C has the expected value.
+ *
+ * - Check that the object index of scheduler D has the expected value.
+ *
+ * - Check that processor 0 has scheduler A assigned.
+ *
+ * - Check that processor 1 has scheduler B assigned.
+ *
+ * - Check that scheduler B has the maximum priority of the EDF SMP
+ * scheduler.
+ *
+ * - Check that processor 2 has scheduler C assigned if it is present.
+ *
+ * - Check that processor 3 has scheduler C assigned if it is present.
+ *
+ * @{
+ */
+
+/**
+ * @brief Call rtems_scheduler_get_processor() on all online processors and
+ * check the returned value.
+ */
+static void RtemsSchedulerValSmpOnly_Action_0( void )
+{
+ rtems_id scheduler_id;
+ rtems_task_priority priority;
+ uint32_t cpu_index;
+ uint32_t cpu_max;
+
+ scheduler_id = GetSelfScheduler();
+ priority = GetSelfPriority();
+ cpu_max = rtems_scheduler_get_processor_maximum();
+ T_step_ge_u32( 0, cpu_max, 1 );
+
+ for ( cpu_index = 0; cpu_index < cpu_max; ++cpu_index ) {
+ rtems_status_code sc;
+ rtems_id id;
+
+ sc = rtems_scheduler_ident_by_processor( cpu_index, &id );
+ T_quiet_rsc_success( sc );
+
+ SetSelfScheduler( id, priority );
+ SetSelfAffinityOne( cpu_index );
+
+ T_quiet_eq_u32( rtems_scheduler_get_processor(), cpu_index );
+
+ SetSelfAffinityAll();
+ }
+
+ SetSelfScheduler( scheduler_id, priority );
+}
+
+/**
+ * @brief Call rtems_scheduler_get_processor_maximum() and check the returned
+ * value.
+ */
+static void RtemsSchedulerValSmpOnly_Action_1( void )
+{
+ uint32_t cpu_max;
+
+ cpu_max = rtems_scheduler_get_processor_maximum();
+
+ /*
+ * Check that the returned value is greater than or equal to one.
+ */
+ T_step_ge_u32( 1, cpu_max, 1 );
+
+ /*
+ * Check that the returned value is less than or equal to
+ * rtems_configuration_get_maximum_processors().
+ */
+ T_step_le_u32(
+ 2,
+ cpu_max,
+ rtems_configuration_get_maximum_processors()
+ );
+}
+
+/**
+ * @brief Call rtems_scheduler_ident() for each configured scheduler.
+ */
+static void RtemsSchedulerValSmpOnly_Action_2( void )
+{
+ rtems_status_code sc;
+ rtems_id id[ 4 ];
+ rtems_id id_by_cpu;
+ rtems_task_priority priority;
+
+ sc = rtems_scheduler_ident( TEST_SCHEDULER_A_NAME, &id[ 0 ]);
+ T_step_rsc_success( 3, sc );
+
+ sc = rtems_scheduler_ident( TEST_SCHEDULER_B_NAME, &id[ 1 ]);
+ T_step_rsc_success( 4, sc );
+
+ sc = rtems_scheduler_ident( TEST_SCHEDULER_C_NAME, &id[ 2 ]);
+ T_step_rsc_success( 5, sc );
+
+ sc = rtems_scheduler_ident( TEST_SCHEDULER_D_NAME, &id[ 3 ]);
+ T_step_rsc_success( 6, sc );
+
+ /*
+ * Check that the object index of scheduler A has the expected value.
+ */
+ T_step_eq_u16( 7, rtems_object_id_get_index( id[ 0 ] ), 1 );
+
+ /*
+ * Check that the object index of scheduler B has the expected value.
+ */
+ T_step_eq_u16( 8, rtems_object_id_get_index( id[ 1 ] ), 2 );
+
+ /*
+ * Check that the object index of scheduler C has the expected value.
+ */
+ T_step_eq_u16( 9, rtems_object_id_get_index( id[ 2 ] ), 3 );
+
+ /*
+ * Check that the object index of scheduler D has the expected value.
+ */
+ T_step_eq_u16( 10, rtems_object_id_get_index( id[ 3 ] ), 4 );
+
+ /*
+ * Check that processor 0 has scheduler A assigned.
+ */
+ sc = rtems_scheduler_ident_by_processor( 0, &id_by_cpu );
+ T_step_rsc_success( 11, sc );
+ T_step_eq_u32( 12, id[ 0 ], id_by_cpu );
+
+ /*
+ * Check that processor 1 has scheduler B assigned.
+ */
+ sc = rtems_scheduler_ident_by_processor( 1, &id_by_cpu );
+ T_step_rsc_success( 13, sc );
+ T_step_eq_u32( 14, id[ 1 ], id_by_cpu );
+
+ /*
+ * Check that scheduler B has the maximum priority of the EDF SMP scheduler.
+ */
+ sc = rtems_scheduler_get_maximum_priority( id_by_cpu, &priority );
+ T_step_rsc_success( 15, sc );
+ T_step_eq_u32( 16, priority, (uint32_t) INT_MAX );
+
+ /*
+ * Check that processor 2 has scheduler C assigned if it is present.
+ */
+ sc = rtems_scheduler_ident_by_processor( 2, &id_by_cpu );
+ T_step_true( 17, sc == RTEMS_INVALID_NAME || id[ 2 ] == id_by_cpu );
+
+ /*
+ * Check that processor 3 has scheduler C assigned if it is present.
+ */
+ sc = rtems_scheduler_ident_by_processor( 3, &id_by_cpu );
+ T_step_true( 18, sc == RTEMS_INVALID_NAME || id[ 2 ] == id_by_cpu );
+}
+
+/**
+ * @fn void T_case_body_RtemsSchedulerValSmpOnly( void )
+ */
+T_TEST_CASE( RtemsSchedulerValSmpOnly )
+{
+ T_plan( 19 );
+
+ RtemsSchedulerValSmpOnly_Action_0();
+ RtemsSchedulerValSmpOnly_Action_1();
+ RtemsSchedulerValSmpOnly_Action_2();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-scheduler.c b/testsuites/validation/tc-scheduler.c
new file mode 100644
index 0000000000..2f5b70fc1a
--- /dev/null
+++ b/testsuites/validation/tc-scheduler.c
@@ -0,0 +1,156 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSchedulerValScheduler
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSchedulerValScheduler spec:/rtems/scheduler/val/scheduler
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief This test case collection provides validation test cases for general
+ * requirements of the @ref RTEMSAPIClassicScheduler.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate rtems_scheduler_get_processor().
+ *
+ * - Check that the values returned by rtems_scheduler_get_processor() and
+ * rtems_scheduler_get_processor() are equal.
+ *
+ * - Validate rtems_scheduler_get_processor_maximum().
+ *
+ * - Check that the values returned by
+ * rtems_scheduler_get_processor_maximum() and
+ * rtems_scheduler_get_processor_maximum() are equal.
+ *
+ * @{
+ */
+
+static uint32_t GetProcessorMaximumMacro( void )
+{
+ return rtems_scheduler_get_processor_maximum();
+}
+
+#undef rtems_scheduler_get_processor_maximum
+
+static uint32_t GetProcessorMaximum( void )
+{
+ return rtems_scheduler_get_processor_maximum();
+}
+
+static uint32_t GetProcessorMacro( void )
+{
+ return rtems_scheduler_get_processor();
+}
+
+#undef rtems_scheduler_get_processor
+
+static uint32_t GetProcessor( void )
+{
+ return rtems_scheduler_get_processor();
+}
+
+/**
+ * @brief Validate rtems_scheduler_get_processor().
+ */
+static void RtemsSchedulerValScheduler_Action_0( void )
+{
+ uint32_t cpu_index;
+ uint32_t cpu_index_macro;
+
+ cpu_index = GetProcessor();
+ cpu_index_macro = GetProcessorMacro();
+
+ /*
+ * Check that the values returned by rtems_scheduler_get_processor() and
+ * rtems_scheduler_get_processor() are equal.
+ */
+ T_step_eq_u32( 0, cpu_index, cpu_index_macro );
+}
+
+/**
+ * @brief Validate rtems_scheduler_get_processor_maximum().
+ */
+static void RtemsSchedulerValScheduler_Action_1( void )
+{
+ uint32_t cpu_max;
+ uint32_t cpu_max_macro;
+
+ cpu_max = GetProcessorMaximum();
+ cpu_max_macro = GetProcessorMaximumMacro();
+
+ /*
+ * Check that the values returned by rtems_scheduler_get_processor_maximum()
+ * and rtems_scheduler_get_processor_maximum() are equal.
+ */
+ T_step_eq_u32( 1, cpu_max, cpu_max_macro );
+}
+
+/**
+ * @fn void T_case_body_RtemsSchedulerValScheduler( void )
+ */
+T_TEST_CASE( RtemsSchedulerValScheduler )
+{
+ T_plan( 2 );
+
+ RtemsSchedulerValScheduler_Action_0();
+ RtemsSchedulerValScheduler_Action_1();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-score-fatal.c b/testsuites/validation/tc-score-fatal.c
new file mode 100644
index 0000000000..b0a55f4664
--- /dev/null
+++ b/testsuites/validation/tc-score-fatal.c
@@ -0,0 +1,462 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreValFatal
+ */
+
+/*
+ * Copyright (C) 2021, 2024 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <setjmp.h>
+#include <string.h>
+#include <rtems/score/atomic.h>
+#include <rtems/score/isrlevel.h>
+#include <rtems/score/threaddispatch.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreValFatal spec:/score/val/fatal
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationOneCpu0
+ *
+ * @brief Tests some fatal errors.
+ *
+ * This test case performs the following actions:
+ *
+ * - Construct a task with a task body which returns. Check that the right
+ * fatal error occurred.
+ *
+ * - Construct a task which performs a direct thread dispatch with maskable
+ * interrupts disabled. Where robust thread dispatching is required, check
+ * that the right fatal error occurred, otherwise check that no fatal error
+ * occurred.
+ *
+ * - Construct a task which performs an on demand thread dispatch with maskable
+ * interrupts disabled. Where robust thread dispatching is required, check
+ * that the right fatal error occurred, otherwise check that no fatal error
+ * occurred.
+ *
+ * - Construct a task which performs a direct thread dispatch with a thread
+ * dispatch level not equal to one. Check that the right fatal error
+ * occurred.
+ *
+ * - Create a mutex and construct a task which produces a deadlock which
+ * involves the allocator mutex.
+ *
+ * - Check that rtems_fatal() terminates the system. Since SetFatalHandler()
+ * requires an initial extension this validates CONFIGURE_INITIAL_EXTENSIONS.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/score/val/fatal test case.
+ */
+typedef struct {
+ /**
+ * @brief This member is a fatal extension invocation counter.
+ */
+ Atomic_Uint counter;
+
+ /**
+ * @brief This member contains the last fatal source.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains the last fatal code.
+ */
+ rtems_fatal_code code;
+} ScoreValFatal_Context;
+
+static ScoreValFatal_Context
+ ScoreValFatal_Instance;
+
+typedef ScoreValFatal_Context Context;
+
+static unsigned int GetFatalCounter( const Context *ctx )
+{
+ return _Atomic_Load_uint( &ctx->counter, ATOMIC_ORDER_RELAXED );
+}
+
+static unsigned int ResetFatalInfo( Context *ctx )
+{
+ ctx->source = RTEMS_FATAL_SOURCE_APPLICATION;
+ ctx->code = INTERNAL_ERROR_NO_MPCI;
+
+ return GetFatalCounter( ctx );
+}
+
+static void Fatal(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ Context *ctx
+)
+{
+ ctx->source = source;
+ ctx->code = code;
+ _Atomic_Fetch_add_uint( &ctx->counter, 1, ATOMIC_ORDER_RELAXED );
+}
+
+static void FatalTaskExit(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ Fatal( source, code, arg );
+ rtems_task_exit();
+}
+
+static void ExitTask( rtems_task_argument arg )
+{
+ (void) arg;
+}
+
+static void FatalBadThreadDispatchEnvironment(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ Fatal( source, code, arg );
+ _ISR_Set_level( 0 );
+ _Thread_Dispatch_unnest( _Per_CPU_Get() );
+ rtems_task_exit();
+}
+
+static void ISRDisabledDirectThreadDispatchTask( rtems_task_argument arg )
+{
+ rtems_interrupt_level level;
+
+ (void) arg;
+ rtems_interrupt_local_disable( level );
+ (void) level;
+ rtems_task_exit();
+}
+
+static void ISRDisabledOnDemandThreadDispatchTask( rtems_task_argument arg )
+{
+ rtems_interrupt_level level;
+
+ (void) arg;
+ rtems_interrupt_local_disable( level );
+ (void) level;
+ SetSelfPriority( PRIO_VERY_HIGH );
+}
+
+static void FatalBadThreadDispatchDisableLevel(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ Per_CPU_Control *cpu_self;
+
+ Fatal( source, code, arg );
+ cpu_self = _Per_CPU_Get();
+ _Thread_Dispatch_unnest( cpu_self );
+ _Thread_Dispatch_direct_no_return( cpu_self );
+}
+
+static void BadLevelThreadDispatchTask( rtems_task_argument arg )
+{
+ (void) arg;
+ _Thread_Dispatch_disable();
+ rtems_task_exit();
+}
+
+static jmp_buf before_fatal;
+
+static rtems_id deadlock_mutex;
+
+static bool ThreadCreateDeadlock( rtems_tcb *executing, rtems_tcb *created )
+{
+ (void) executing;
+ (void) created;
+
+ ObtainMutex( deadlock_mutex );
+ ReleaseMutex( deadlock_mutex );
+
+ return true;
+}
+
+static void FatalJumpBack(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ SetFatalHandler( NULL, NULL );
+ Fatal( source, code, arg );
+ longjmp( before_fatal, 1 );
+}
+
+static void ThreadQueueDeadlockTask( rtems_task_argument arg )
+{
+ rtems_id id;
+
+ (void) arg;
+ id = CreateTask( "DORM", PRIO_NORMAL );
+ DeleteTask( id );
+
+ rtems_task_exit();
+}
+
+static T_fixture ScoreValFatal_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &ScoreValFatal_Instance
+};
+
+/**
+ * @brief Construct a task with a task body which returns. Check that the
+ * right fatal error occurred.
+ */
+static void ScoreValFatal_Action_0( ScoreValFatal_Context *ctx )
+{
+ rtems_id id;
+ unsigned int counter;
+
+ SetFatalHandler( FatalTaskExit, ctx );
+ SetSelfPriority( PRIO_NORMAL );
+ counter = ResetFatalInfo( ctx );
+ id = CreateTask( "EXIT", PRIO_HIGH );
+ StartTask( id, ExitTask, NULL );
+ T_eq_uint( GetFatalCounter( ctx ), counter + 1 );
+ T_eq_int( ctx->source, INTERNAL_ERROR_CORE );
+ T_eq_ulong( ctx->code, INTERNAL_ERROR_THREAD_EXITTED );
+ RestoreRunnerPriority();
+ SetFatalHandler( NULL, NULL );
+}
+
+/**
+ * @brief Construct a task which performs a direct thread dispatch with
+ * maskable interrupts disabled. Where robust thread dispatching is
+ * required, check that the right fatal error occurred, otherwise check that
+ * no fatal error occurred.
+ */
+static void ScoreValFatal_Action_1( ScoreValFatal_Context *ctx )
+{
+ rtems_id id;
+ unsigned int counter;
+
+ SetFatalHandler( FatalBadThreadDispatchEnvironment, ctx );
+ SetSelfPriority( PRIO_NORMAL );
+ counter = ResetFatalInfo( ctx );
+ id = CreateTask( "BENV", PRIO_HIGH );
+ StartTask( id, ISRDisabledDirectThreadDispatchTask, NULL );
+
+ #if CPU_ENABLE_ROBUST_THREAD_DISPATCH == FALSE
+ if ( rtems_configuration_get_maximum_processors() > 1 ) {
+ #endif
+ T_eq_uint( GetFatalCounter( ctx ), counter + 1 );
+ T_eq_int( ctx->source, INTERNAL_ERROR_CORE );
+ T_eq_ulong( ctx->code, INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT );
+ #if CPU_ENABLE_ROBUST_THREAD_DISPATCH == FALSE
+ } else {
+ T_eq_uint( GetFatalCounter( ctx ), counter );
+ }
+ #endif
+
+ RestoreRunnerPriority();
+ SetFatalHandler( NULL, NULL );
+}
+
+/**
+ * @brief Construct a task which performs an on demand thread dispatch with
+ * maskable interrupts disabled. Where robust thread dispatching is
+ * required, check that the right fatal error occurred, otherwise check that
+ * no fatal error occurred.
+ */
+static void ScoreValFatal_Action_2( ScoreValFatal_Context *ctx )
+{
+ rtems_id id;
+ unsigned int counter;
+
+ SetFatalHandler( FatalBadThreadDispatchEnvironment, ctx );
+ SetSelfPriority( PRIO_NORMAL );
+ counter = ResetFatalInfo( ctx );
+ id = CreateTask( "BENV", PRIO_HIGH );
+ StartTask( id, ISRDisabledOnDemandThreadDispatchTask, NULL );
+
+ #if CPU_ENABLE_ROBUST_THREAD_DISPATCH == FALSE
+ if ( rtems_configuration_get_maximum_processors() > 1 ) {
+ #endif
+ T_eq_uint( GetFatalCounter( ctx ), counter + 1 );
+ T_eq_int( ctx->source, INTERNAL_ERROR_CORE );
+ T_eq_ulong( ctx->code, INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT );
+ #if CPU_ENABLE_ROBUST_THREAD_DISPATCH == FALSE
+ } else {
+ T_eq_uint( GetFatalCounter( ctx ), counter );
+ }
+ #endif
+
+ RestoreRunnerPriority();
+ SetFatalHandler( NULL, NULL );
+}
+
+/**
+ * @brief Construct a task which performs a direct thread dispatch with a
+ * thread dispatch level not equal to one. Check that the right fatal error
+ * occurred.
+ */
+static void ScoreValFatal_Action_3( ScoreValFatal_Context *ctx )
+{
+ rtems_id id;
+ unsigned int counter;
+
+ SetFatalHandler( FatalBadThreadDispatchDisableLevel, ctx );
+ SetSelfPriority( PRIO_NORMAL );
+ counter = ResetFatalInfo( ctx );
+ id = CreateTask( "BLVL", PRIO_HIGH );
+ StartTask( id, BadLevelThreadDispatchTask, NULL );
+ T_eq_uint( GetFatalCounter( ctx ), counter + 1 );
+ T_eq_int( ctx->source, INTERNAL_ERROR_CORE );
+ T_eq_ulong( ctx->code, INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL );
+ RestoreRunnerPriority();
+ SetFatalHandler( NULL, NULL );
+}
+
+/**
+ * @brief Create a mutex and construct a task which produces a deadlock which
+ * involves the allocator mutex.
+ */
+static void ScoreValFatal_Action_4( ScoreValFatal_Context *ctx )
+{
+ rtems_extensions_table extensions;
+ rtems_status_code sc;
+ rtems_id extension_id;
+ rtems_id task_id;
+ unsigned int counter;
+
+ memset( &extensions, 0, sizeof( extensions ) );
+ extensions.thread_create = ThreadCreateDeadlock;
+
+ sc = rtems_extension_create(
+ rtems_build_name( 'T', 'E', 'X', 'T' ),
+ &extensions,
+ &extension_id
+ );
+ T_rsc_success( sc );
+
+ deadlock_mutex = CreateMutex();
+
+ SetFatalHandler( FatalJumpBack, ctx );
+ SetSelfPriority( PRIO_NORMAL );
+ counter = ResetFatalInfo( ctx );
+
+ ObtainMutex( deadlock_mutex );
+
+ task_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( task_id, ThreadQueueDeadlockTask, NULL );
+
+ if ( setjmp( before_fatal ) == 0 ) {
+ (void) CreateTask( "DLCK", PRIO_NORMAL );
+ }
+
+ ReleaseMutex( deadlock_mutex );
+
+ T_eq_uint( GetFatalCounter( ctx ), counter + 1 );
+ T_eq_int( ctx->source, INTERNAL_ERROR_CORE );
+ T_eq_ulong( ctx->code, INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK );
+
+ RestoreRunnerPriority();
+
+ sc = rtems_extension_delete( extension_id );
+ T_rsc_success( sc );
+
+ DeleteMutex( deadlock_mutex );
+}
+
+/**
+ * @brief Check that rtems_fatal() terminates the system. Since
+ * SetFatalHandler() requires an initial extension this validates
+ * CONFIGURE_INITIAL_EXTENSIONS.
+ */
+static void ScoreValFatal_Action_5( ScoreValFatal_Context *ctx )
+{
+ unsigned int counter;
+
+ SetFatalHandler( FatalJumpBack, ctx );
+ counter = ResetFatalInfo( ctx );
+
+ if ( setjmp( before_fatal ) == 0 ) {
+ rtems_fatal( 123, 4567890 );
+ }
+
+ T_eq_uint( GetFatalCounter( ctx ), counter + 1 );
+ T_eq_int( ctx->source, 123 );
+ T_eq_ulong( ctx->code, 4567890 );
+}
+
+/**
+ * @fn void T_case_body_ScoreValFatal( void )
+ */
+T_TEST_CASE_FIXTURE( ScoreValFatal, &ScoreValFatal_Fixture )
+{
+ ScoreValFatal_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ScoreValFatal_Action_0( ctx );
+ ScoreValFatal_Action_1( ctx );
+ ScoreValFatal_Action_2( ctx );
+ ScoreValFatal_Action_3( ctx );
+ ScoreValFatal_Action_4( ctx );
+ ScoreValFatal_Action_5( ctx );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-score-isr.c b/testsuites/validation/tc-score-isr.c
new file mode 100644
index 0000000000..b178541e72
--- /dev/null
+++ b/testsuites/validation/tc-score-isr.c
@@ -0,0 +1,285 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreIsrValIsr
+ */
+
+/*
+ * Copyright (C) 2023 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/sysinit.h>
+#include <rtems/score/percpu.h>
+#include <rtems/score/thread.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreIsrValIsr spec:/score/isr/val/isr
+ *
+ * @ingroup TestsuitesValidationIntr
+ *
+ * @brief Tests general interrupt support behaviour.
+ *
+ * This test case performs the following actions:
+ *
+ * - Submit an ISR request during system initialization. Check the stack of
+ * the interrupted context while the ISR request is serviced. Store the
+ * result of the check in interrupted_stack_at_multitasking_start_is_valid.
+ *
+ * - Check that stack of the interrupted context was valid when an interrupt
+ * was serviced during the multitasking start.
+ *
+ * @{
+ */
+
+static uintptr_t interrupted_stack_at_multitasking_start;
+
+static bool interrupted_stack_at_multitasking_start_is_valid;
+
+#if defined(__aarch64__)
+void __real_bsp_interrupt_dispatch( void );
+
+void __wrap_bsp_interrupt_dispatch( void );
+
+void __wrap_bsp_interrupt_dispatch( void )
+{
+ if ( interrupted_stack_at_multitasking_start == 0 ) {
+ uintptr_t sp;
+ rtems_interrupt_level level;
+
+ rtems_interrupt_local_disable( level );
+ __asm__ volatile (
+ "msr spsel, #1\n"
+ "mov %0, sp\n"
+ "msr spsel, #0"
+ : "=r" ( sp )
+ );
+ rtems_interrupt_local_enable( level );
+
+ interrupted_stack_at_multitasking_start = sp;
+ }
+
+ __real_bsp_interrupt_dispatch();
+}
+#endif
+
+#if defined(ARM_MULTILIB_ARCH_V4)
+void __real_bsp_interrupt_dispatch( void );
+
+void __wrap_bsp_interrupt_dispatch( void );
+
+void __wrap_bsp_interrupt_dispatch( void )
+{
+ register uintptr_t sp __asm__( "9" );
+
+ if ( interrupted_stack_at_multitasking_start == 0 ) {
+ interrupted_stack_at_multitasking_start = sp;
+ }
+
+ __real_bsp_interrupt_dispatch();
+}
+#endif
+
+#if defined(__microblaze__)
+void __real_bsp_interrupt_dispatch( uint32_t source );
+
+void __wrap_bsp_interrupt_dispatch( uint32_t source );
+
+void __wrap_bsp_interrupt_dispatch( uint32_t source )
+{
+ register uintptr_t sp __asm__( "1" );
+
+ if ( interrupted_stack_at_multitasking_start == 0 ) {
+ interrupted_stack_at_multitasking_start = sp;
+ }
+
+ __real_bsp_interrupt_dispatch( source );
+}
+#endif
+
+#if defined(__PPC__) || defined(__powerpc64__)
+void __real_bsp_interrupt_dispatch( void );
+
+void __wrap_bsp_interrupt_dispatch( void );
+
+void __wrap_bsp_interrupt_dispatch( void )
+{
+ register uintptr_t sp __asm__( "14" );
+
+ if ( interrupted_stack_at_multitasking_start == 0 ) {
+ interrupted_stack_at_multitasking_start = sp;
+ }
+
+ __real_bsp_interrupt_dispatch();
+}
+#endif
+
+#if defined(__riscv)
+void __real__RISCV_Interrupt_dispatch(
+ uintptr_t mcause,
+ Per_CPU_Control *cpu_self
+);
+
+void __wrap__RISCV_Interrupt_dispatch(
+ uintptr_t mcause,
+ Per_CPU_Control *cpu_self
+);
+
+void __wrap__RISCV_Interrupt_dispatch(
+ uintptr_t mcause,
+ Per_CPU_Control *cpu_self
+)
+{
+ register uintptr_t sp __asm__( "s1" );
+
+ if ( interrupted_stack_at_multitasking_start == 0 ) {
+ interrupted_stack_at_multitasking_start = sp;
+ }
+
+ __real__RISCV_Interrupt_dispatch( mcause, cpu_self );
+}
+#endif
+
+#if defined(__sparc__)
+void __real__SPARC_Interrupt_dispatch( uint32_t irq );
+
+static RTEMS_USED void InterruptDispatch( uint32_t irq, uintptr_t sp )
+{
+ if ( interrupted_stack_at_multitasking_start == 0 ) {
+ interrupted_stack_at_multitasking_start = sp;
+ }
+
+ __real__SPARC_Interrupt_dispatch( irq );
+}
+
+__asm__ (
+ "\t.section\t\".text\"\n"
+ "\t.align\t4\n"
+ "\t.globl\t__wrap__SPARC_Interrupt_dispatch\n"
+ "\t.type\t__wrap__SPARC_Interrupt_dispatch, #function\n"
+ "__wrap__SPARC_Interrupt_dispatch:\n"
+ "\tmov\t%fp, %o1\n"
+ "\tor\t%o7, %g0, %g1\n"
+ "\tcall\tInterruptDispatch, 0\n"
+ "\t or\t%g1, %g0, %o7\n"
+ "\t.previous\n"
+);
+#endif
+
+static void ISRHandler( void *arg )
+{
+ uintptr_t begin;
+ uintptr_t end;
+
+ (void) arg;
+
+#if defined(RTEMS_SMP) && !(defined(__PPC__) || (__powerpc64__))
+ Per_CPU_Control *cpu_self;
+
+ cpu_self = _Per_CPU_Get();
+ begin = (uintptr_t) &cpu_self->Interrupt_frame;
+ end = begin + sizeof( cpu_self->Interrupt_frame );
+#else
+ Thread_Control *executing;
+
+ executing = GetExecuting();
+ begin = (uintptr_t) executing->Start.Initial_stack.area;
+ end = begin + executing->Start.Initial_stack.size;
+#endif
+
+ interrupted_stack_at_multitasking_start_is_valid =
+ ( begin <= interrupted_stack_at_multitasking_start &&
+ interrupted_stack_at_multitasking_start < end );
+}
+
+static CallWithinISRRequest isr_request = {
+ .handler = ISRHandler
+};
+
+static void SubmitISRRequest( void )
+{
+ CallWithinISRSubmit( &isr_request );
+}
+
+RTEMS_SYSINIT_ITEM(
+ SubmitISRRequest,
+ RTEMS_SYSINIT_DEVICE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_LAST
+);
+
+/**
+ * @brief Submit an ISR request during system initialization. Check the stack
+ * of the interrupted context while the ISR request is serviced. Store the
+ * result of the check in interrupted_stack_at_multitasking_start_is_valid.
+ */
+static void ScoreIsrValIsr_Action_0( void )
+{
+ /*
+ * The actions are performed during system initialization and the
+ * multitasking start.
+ */
+
+ /*
+ * Check that stack of the interrupted context was valid when an interrupt
+ * was serviced during the multitasking start.
+ */
+ T_true( interrupted_stack_at_multitasking_start_is_valid );
+}
+
+/**
+ * @fn void T_case_body_ScoreIsrValIsr( void )
+ */
+T_TEST_CASE( ScoreIsrValIsr )
+{
+ ScoreIsrValIsr_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-score-smp-per-cpu-jobs.c b/testsuites/validation/tc-score-smp-per-cpu-jobs.c
new file mode 100644
index 0000000000..62812279cb
--- /dev/null
+++ b/testsuites/validation/tc-score-smp-per-cpu-jobs.c
@@ -0,0 +1,151 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValPerCpuJobs
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/atomic.h>
+#include <rtems/score/percpu.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSmpValPerCpuJobs spec:/score/smp/val/per-cpu-jobs
+ *
+ * @ingroup TestsuitesValidationSmpOnly0
+ *
+ * @brief Tests the processing order of per-processor jobs.
+ *
+ * This test case performs the following actions:
+ *
+ * - Issue two jobs on the current processor with interrupts disabled. Wait
+ * for completion of the second job.
+ *
+ * - Check that the first job was processed firstly.
+ *
+ * - Check that the second job was processed secondly.
+ *
+ * @{
+ */
+
+static Atomic_Uint job_counter;
+
+static void Increment( void *arg )
+{
+ unsigned int *value;
+
+ value = (unsigned int *) arg;
+ *value =
+ _Atomic_Fetch_add_uint( &job_counter, 1, ATOMIC_ORDER_RELAXED ) + 1;
+}
+
+static unsigned int counter_0;
+
+static const Per_CPU_Job_context job_context_0 = {
+ .handler = Increment,
+ .arg = &counter_0
+};
+
+Per_CPU_Job job_0 = {
+ .context = &job_context_0
+};
+
+static unsigned int counter_1;
+
+static const Per_CPU_Job_context job_context_1 = {
+ .handler = Increment,
+ .arg = &counter_1
+};
+
+Per_CPU_Job job_1 = {
+ .context = &job_context_1,
+};
+
+/**
+ * @brief Issue two jobs on the current processor with interrupts disabled.
+ * Wait for completion of the second job.
+ */
+static void ScoreSmpValPerCpuJobs_Action_0( void )
+{
+ rtems_interrupt_level level;
+ Per_CPU_Control *cpu;
+
+ rtems_interrupt_local_disable(level);
+ cpu = _Per_CPU_Get();
+ _Per_CPU_Add_job( cpu, &job_0 );
+ _Per_CPU_Submit_job( cpu, &job_1 );
+ rtems_interrupt_local_enable(level);
+
+ _Per_CPU_Wait_for_job( cpu, &job_1 );
+
+ /*
+ * Check that the first job was processed firstly.
+ */
+ T_step_eq_int( 0, counter_0, 1 );
+
+ /*
+ * Check that the second job was processed secondly.
+ */
+ T_step_eq_int( 1, counter_1, 2 );
+}
+
+/**
+ * @fn void T_case_body_ScoreSmpValPerCpuJobs( void )
+ */
+T_TEST_CASE( ScoreSmpValPerCpuJobs )
+{
+ T_plan( 2 );
+
+ ScoreSmpValPerCpuJobs_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-score-smp-thread.c b/testsuites/validation/tc-score-smp-thread.c
new file mode 100644
index 0000000000..38d2b26e29
--- /dev/null
+++ b/testsuites/validation/tc-score-smp-thread.c
@@ -0,0 +1,554 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreThreadValSmp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/test-scheduler.h>
+#include <rtems/score/smpbarrier.h>
+#include <rtems/score/threadimpl.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreThreadValSmp spec:/score/thread/val/smp
+ *
+ * @ingroup TestsuitesValidationSmpOnly0
+ *
+ * @brief Tests SMP-specific thread behaviour.
+ *
+ * This test case performs the following actions:
+ *
+ * - Create three worker threads and a mutex. Use the mutex and the worker to
+ * move to a helping scheduler.
+ *
+ * - Pin the runner thread while it executes on a processor owned by a
+ * helping scheduler.
+ *
+ * - Pin and unpin the runner thread. This is a nested operation.
+ *
+ * - Preempt the pinned runner thread. Worker B and C execute at the same
+ * time on processor 0 and 1 respectively for some point in time. This
+ * shows that the pinning of the runner thread is maintained.
+ *
+ * - Unpin the runner thread. The runner moves back to its home scheduler.
+ *
+ * - Release the mutex.
+ *
+ * - Pin the runner thread. Unpin the runner thread while it is suspended.
+ *
+ * - Make sure the worker released the mutex.
+ *
+ * - Clean up all used resources.
+ *
+ * - Create three worker threads and a mutex. Use the mutex and the worker to
+ * check that a suspended thread does not reconsider help requests.
+ *
+ * - Let worker B help worker A through the mutex. Preempt worker A. Delay
+ * the thread switch to worker A.
+ *
+ * - Suspend worker A and let it wait on its thread state lock. Check that
+ * worker A did not reconsider help requests.
+ *
+ * - Resume worker A. Check that worker A did reconsider help requests after
+ * the thread dispatch.
+ *
+ * - Clean up all used resources.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/score/thread/val/smp test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the worker A identifier.
+ */
+ rtems_id worker_a_id;
+
+ /**
+ * @brief This member contains the worker B identifier.
+ */
+ rtems_id worker_b_id;
+
+ /**
+ * @brief This member contains the worker C identifier.
+ */
+ rtems_id worker_c_id;
+
+ /**
+ * @brief This member contains the mutex identifier.
+ */
+ rtems_id mutex_id;
+
+ /**
+ * @brief If this member is true, then the worker shall busy wait.
+ */
+ volatile bool busy;
+
+ /**
+ * @brief This member contains a counter for EVENT_COUNT.
+ */
+ volatile uint32_t counter;
+
+ /**
+ * @brief This member contains the barrier to synchronize the runner and the
+ * workers.
+ */
+ SMP_barrier_Control barrier;
+
+ /**
+ * @brief This member contains the barrier state for the runner processor.
+ */
+ SMP_barrier_State barrier_state;
+} ScoreThreadValSmp_Context;
+
+static ScoreThreadValSmp_Context
+ ScoreThreadValSmp_Instance;
+
+#define EVENT_OBTAIN RTEMS_EVENT_0
+
+#define EVENT_RELEASE RTEMS_EVENT_1
+
+#define EVENT_COUNT_EARLY RTEMS_EVENT_2
+
+#define EVENT_BUSY RTEMS_EVENT_3
+
+#define EVENT_COUNT RTEMS_EVENT_4
+
+#define EVENT_LET_WORKER_C_COUNT RTEMS_EVENT_5
+
+#define EVENT_SET_TASK_SWITCH_EXTENSION RTEMS_EVENT_6
+
+typedef ScoreThreadValSmp_Context Context;
+
+static void TaskSwitchExtension( rtems_tcb *executing, rtems_tcb *heir )
+{
+ Context *ctx;
+ Thread_Control *thread;
+
+ (void) executing;
+ (void) heir;
+
+ ctx = T_fixture_context();
+ thread = GetThread( ctx->worker_a_id );
+
+ if ( thread == heir ) {
+ SMP_barrier_State state;
+
+ _SMP_barrier_State_initialize( &state );
+
+ /* B0 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+
+ /* B1 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+ }
+}
+
+static void WorkerTask( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ rtems_event_set events;
+
+ events = ReceiveAnyEvents();
+
+ if ( ( events & EVENT_OBTAIN ) != 0 ) {
+ ObtainMutex( ctx->mutex_id );
+ }
+
+ if ( ( events & EVENT_RELEASE ) != 0 ) {
+ ReleaseMutex( ctx->mutex_id );
+ }
+
+ if ( ( events & EVENT_COUNT_EARLY ) != 0 ) {
+ ++ctx->counter;
+ }
+
+ if ( ( events & EVENT_BUSY ) != 0 ) {
+ while ( ctx->busy ) {
+ /* Do nothing */
+ }
+ }
+
+ if ( ( events & EVENT_COUNT ) != 0 ) {
+ ++ctx->counter;
+ }
+
+ if ( ( events & EVENT_LET_WORKER_C_COUNT ) != 0 ) {
+ uint32_t counter;
+
+ counter = ctx->counter;
+ SendEvents( ctx->worker_c_id, EVENT_COUNT );
+
+ while ( ctx->counter == counter ) {
+ /* Wait */
+ }
+ }
+
+ if ( ( events & EVENT_SET_TASK_SWITCH_EXTENSION ) != 0 ) {
+ SetTaskSwitchExtension( TaskSwitchExtension );
+ }
+ }
+}
+
+static void SchedulerBlock(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_BEFORE &&
+ event->operation == T_SCHEDULER_BLOCK
+ ) {
+ Thread_Control *thread;
+
+ T_scheduler_set_event_handler( NULL, NULL );
+
+ /* B1 */
+ _SMP_barrier_Wait( &ctx->barrier, &ctx->barrier_state, 2 );
+
+ thread = GetThread( ctx->worker_a_id );
+ TicketLockWaitForOthers( &thread->Join_queue.Queue.Lock, 1 );
+ }
+}
+
+static void Suspend( void *arg )
+{
+ Thread_Control *thread;
+
+ thread = arg;
+ SuspendTask( thread->Object.id );
+}
+
+static void Resume( void *arg )
+{
+ Thread_Control *thread;
+
+ thread = arg;
+ ResumeTask( thread->Object.id );
+}
+
+static void WaitForCounter( const Context *ctx, uint32_t expected )
+{
+ while ( ctx->counter != expected ) {
+ /* Wait */
+ }
+}
+
+static void ScoreThreadValSmp_Setup( ScoreThreadValSmp_Context *ctx )
+{
+ SetSelfPriority( PRIO_NORMAL );
+}
+
+static void ScoreThreadValSmp_Setup_Wrap( void *arg )
+{
+ ScoreThreadValSmp_Context *ctx;
+
+ ctx = arg;
+ ScoreThreadValSmp_Setup( ctx );
+}
+
+static void ScoreThreadValSmp_Teardown( ScoreThreadValSmp_Context *ctx )
+{
+ RestoreRunnerPriority();
+}
+
+static void ScoreThreadValSmp_Teardown_Wrap( void *arg )
+{
+ ScoreThreadValSmp_Context *ctx;
+
+ ctx = arg;
+ ScoreThreadValSmp_Teardown( ctx );
+}
+
+static T_fixture ScoreThreadValSmp_Fixture = {
+ .setup = ScoreThreadValSmp_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreThreadValSmp_Teardown_Wrap,
+ .scope = NULL,
+ .initial_context = &ScoreThreadValSmp_Instance
+};
+
+/**
+ * @brief Create three worker threads and a mutex. Use the mutex and the
+ * worker to move to a helping scheduler.
+ */
+static void ScoreThreadValSmp_Action_0( ScoreThreadValSmp_Context *ctx )
+{
+ Per_CPU_Control*cpu_self;
+ Thread_Control *executing;
+
+ executing = _Thread_Get_executing();
+ ctx->counter = 0;
+
+ ctx->mutex_id = CreateMutex();
+
+ ctx->worker_a_id = CreateTask( "WRKA", PRIO_NORMAL );
+ SetScheduler( ctx->worker_a_id, SCHEDULER_B_ID, PRIO_NORMAL );
+ StartTask( ctx->worker_a_id, WorkerTask, ctx );
+
+ ctx->worker_b_id = CreateTask( "WRKB", PRIO_HIGH );
+ StartTask( ctx->worker_b_id, WorkerTask, ctx );
+
+ ctx->worker_c_id = CreateTask( "WRKC", PRIO_LOW );
+ StartTask( ctx->worker_c_id, WorkerTask, ctx );
+
+ ObtainMutex( ctx->mutex_id );
+ SendEvents( ctx->worker_a_id, EVENT_OBTAIN | EVENT_RELEASE );
+
+ ctx->busy = true;
+ SendEvents( ctx->worker_b_id, EVENT_BUSY );
+
+ /*
+ * Pin the runner thread while it executes on a processor owned by a helping
+ * scheduler.
+ */
+ T_eq_u32( rtems_scheduler_get_processor(), 1 );
+ _Thread_Pin( executing );
+
+ /*
+ * Pin and unpin the runner thread. This is a nested operation.
+ */
+ T_eq_u32( rtems_scheduler_get_processor(), 1 );
+ _Thread_Pin( executing );
+ _Thread_Unpin( executing, _Per_CPU_Get_snapshot() );
+
+ /*
+ * Preempt the pinned runner thread. Worker B and C execute at the same time
+ * on processor 0 and 1 respectively for some point in time. This shows that
+ * the pinning of the runner thread is maintained.
+ */
+ ctx->busy = false;
+ SetScheduler( ctx->worker_b_id, SCHEDULER_B_ID, PRIO_HIGH );
+ SendEvents( ctx->worker_b_id, EVENT_LET_WORKER_C_COUNT );
+
+ T_eq_u32( rtems_scheduler_get_processor(), 1 );
+ T_eq_u32( ctx->counter, 1 );
+
+ /*
+ * Unpin the runner thread. The runner moves back to its home scheduler.
+ */
+ cpu_self = _Thread_Dispatch_disable();
+ _Thread_Unpin( executing, cpu_self );
+ _Thread_Dispatch_direct( cpu_self );
+
+ T_eq_u32( rtems_scheduler_get_processor(), 0 );
+
+ /*
+ * Release the mutex.
+ */
+ ReleaseMutex( ctx->mutex_id);
+ T_eq_u32( rtems_scheduler_get_processor(), 0 );
+
+ /*
+ * Pin the runner thread. Unpin the runner thread while it is suspended.
+ */
+ _Thread_Pin( executing );
+
+ /* We have to preempt the runner to end up in _Thread_Do_unpin() */
+ SetPriority( ctx->worker_c_id, PRIO_HIGH );
+ SendEvents( ctx->worker_c_id, EVENT_COUNT );
+ T_eq_u32( ctx->counter, 2 );
+
+ cpu_self = _Thread_Dispatch_disable();
+ CallWithinISR( Suspend, executing );
+ _Thread_Unpin( executing, cpu_self );
+ CallWithinISR( Resume, executing );
+ _Thread_Dispatch_direct( cpu_self );
+
+ /*
+ * Make sure the worker released the mutex.
+ */
+ SetSelfScheduler( SCHEDULER_B_ID, PRIO_LOW );
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_NORMAL );
+
+ /*
+ * Clean up all used resources.
+ */
+ DeleteTask( ctx->worker_a_id );
+ DeleteTask( ctx->worker_b_id );
+ DeleteTask( ctx->worker_c_id );
+ DeleteMutex( ctx->mutex_id );
+}
+
+/**
+ * @brief Create three worker threads and a mutex. Use the mutex and the
+ * worker to check that a suspended thread does not reconsider help requests.
+ */
+static void ScoreThreadValSmp_Action_1( ScoreThreadValSmp_Context *ctx )
+{
+ T_scheduler_log_10 scheduler_log;
+ size_t index;
+ const T_scheduler_event *event;
+
+ _SMP_barrier_Control_initialize( &ctx->barrier );
+ _SMP_barrier_State_initialize( &ctx->barrier_state );
+
+ ctx->counter = 0;
+ ctx->mutex_id = CreateMutex();
+
+ ctx->worker_a_id = CreateTask( "WRKA", PRIO_NORMAL );
+ SetScheduler( ctx->worker_a_id, SCHEDULER_B_ID, PRIO_NORMAL );
+ StartTask( ctx->worker_a_id, WorkerTask, ctx );
+
+ ctx->worker_b_id = CreateTask( "WRKB", PRIO_HIGH );
+ StartTask( ctx->worker_b_id, WorkerTask, ctx );
+
+ ctx->worker_c_id = CreateTask( "WRKC", PRIO_NORMAL );
+ SetScheduler( ctx->worker_c_id, SCHEDULER_B_ID, PRIO_HIGH );
+ StartTask( ctx->worker_c_id, WorkerTask, ctx );
+
+ /*
+ * Let worker B help worker A through the mutex. Preempt worker A. Delay
+ * the thread switch to worker A.
+ */
+ ctx->busy = true;
+ SendEvents(
+ ctx->worker_a_id,
+ EVENT_OBTAIN | EVENT_COUNT_EARLY | EVENT_BUSY | EVENT_COUNT
+ );
+ WaitForCounter( ctx, 1 );
+
+ SendEvents( ctx->worker_b_id, EVENT_OBTAIN );
+ SetPriority( ctx->worker_b_id, PRIO_LOW );
+ SendEvents( ctx->worker_c_id, EVENT_SET_TASK_SWITCH_EXTENSION );
+
+ /* B0 */
+ _SMP_barrier_Wait( &ctx->barrier, &ctx->barrier_state, 2 );
+
+ /*
+ * Suspend worker A and let it wait on its thread state lock. Check that
+ * worker A did not reconsider help requests.
+ */
+ T_scheduler_record_10( &scheduler_log );
+ T_scheduler_set_event_handler( SchedulerBlock, ctx );
+ SuspendTask( ctx->worker_a_id );
+ WaitForExecutionStop( ctx->worker_a_id );
+ T_scheduler_record( NULL );
+ T_eq_sz( scheduler_log.header.recorded, 2 );
+ index = 0;
+ event = T_scheduler_next_any( &scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_BLOCK );
+ event = T_scheduler_next_any( &scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_WITHDRAW_NODE );
+ event = T_scheduler_next_any( &scheduler_log.header, &index );
+ T_eq_ptr( event, &T_scheduler_event_null );
+ SetTaskSwitchExtension( NULL );
+
+ /*
+ * Resume worker A. Check that worker A did reconsider help requests after
+ * the thread dispatch.
+ */
+ T_scheduler_record_10( &scheduler_log );
+ ResumeTask( ctx->worker_a_id );
+ ctx->busy = false;
+ WaitForCounter( ctx, 2 );
+ WaitForExecutionStop( ctx->worker_a_id );
+ T_scheduler_record( NULL );
+ T_eq_sz( scheduler_log.header.recorded, 5 );
+ index = 0;
+ event = T_scheduler_next_any( &scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UNBLOCK );
+ event = T_scheduler_next_any( &scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_RECONSIDER_HELP_REQUEST );
+ event = T_scheduler_next_any( &scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_RECONSIDER_HELP_REQUEST );
+ event = T_scheduler_next_any( &scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_BLOCK );
+ event = T_scheduler_next_any( &scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_WITHDRAW_NODE );
+ event = T_scheduler_next_any( &scheduler_log.header, &index );
+ T_eq_ptr( event, &T_scheduler_event_null );
+
+ /*
+ * Clean up all used resources.
+ */
+ SendEvents( ctx->worker_a_id, EVENT_RELEASE | EVENT_COUNT );
+ WaitForCounter( ctx, 3 );
+
+ SetPriority( ctx->worker_b_id, PRIO_HIGH );
+ SendEvents( ctx->worker_b_id, EVENT_RELEASE );
+
+ DeleteTask( ctx->worker_a_id );
+ DeleteTask( ctx->worker_b_id );
+ DeleteTask( ctx->worker_c_id );
+ DeleteMutex( ctx->mutex_id );
+}
+
+/**
+ * @fn void T_case_body_ScoreThreadValSmp( void )
+ */
+T_TEST_CASE_FIXTURE( ScoreThreadValSmp, &ScoreThreadValSmp_Fixture )
+{
+ ScoreThreadValSmp_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ScoreThreadValSmp_Action_0( ctx );
+ ScoreThreadValSmp_Action_1( ctx );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-score-thread-smp-one-cpu.c b/testsuites/validation/tc-score-thread-smp-one-cpu.c
new file mode 100644
index 0000000000..b3564d574e
--- /dev/null
+++ b/testsuites/validation/tc-score-thread-smp-one-cpu.c
@@ -0,0 +1,183 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreThreadValSmpOneCpu
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/threadimpl.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreThreadValSmpOneCpu spec:/score/thread/val/smp-one-cpu
+ *
+ * @ingroup TestsuitesValidationSmpOneCpu0
+ *
+ * @brief Tests SMP-specific thread behaviour using only one processor and a
+ * uniprocessor scheduler.
+ *
+ * This test case performs the following actions:
+ *
+ * - Create one worker thread to validate the thread pinning on only one
+ * processor using a uniprocessor scheduler.
+ *
+ * - Pin the runner thread. Preempt the runner thread. Unpin the runner
+ * thread.
+ *
+ * - Clean up all used resources.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/score/thread/val/smp-one-cpu test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the worker thread identifier.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member contains a counter for EVENT_COUNT.
+ */
+ volatile uint32_t counter;
+} ScoreThreadValSmpOneCpu_Context;
+
+static ScoreThreadValSmpOneCpu_Context
+ ScoreThreadValSmpOneCpu_Instance;
+
+#define EVENT_COUNT RTEMS_EVENT_0
+
+typedef ScoreThreadValSmpOneCpu_Context Context;
+
+static void WorkerTask( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ rtems_event_set events;
+
+ events = ReceiveAnyEvents();
+
+ if ( ( events & EVENT_COUNT ) != 0 ) {
+ ++ctx->counter;
+ }
+ }
+}
+
+static T_fixture ScoreThreadValSmpOneCpu_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &ScoreThreadValSmpOneCpu_Instance
+};
+
+/**
+ * @brief Create one worker thread to validate the thread pinning on only one
+ * processor using a uniprocessor scheduler.
+ */
+static void ScoreThreadValSmpOneCpu_Action_0(
+ ScoreThreadValSmpOneCpu_Context *ctx
+)
+{
+ Per_CPU_Control *cpu_self;
+ Thread_Control *executing;
+
+ executing = _Thread_Get_executing();
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->counter = 0;
+
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, WorkerTask, ctx );
+
+ /*
+ * Pin the runner thread. Preempt the runner thread. Unpin the runner
+ * thread.
+ */
+ _Thread_Pin( executing );
+
+ /* We have to preempt the runner to end up in _Thread_Do_unpin() */
+ SendEvents( ctx->worker_id, EVENT_COUNT );
+ T_eq_u32( ctx->counter, 1 );
+
+ cpu_self = _Thread_Dispatch_disable();
+ _Thread_Unpin( executing, cpu_self );
+ _Thread_Dispatch_direct( cpu_self );
+
+ /*
+ * Clean up all used resources.
+ */
+ DeleteTask( ctx->worker_id );
+ RestoreRunnerPriority();
+}
+
+/**
+ * @fn void T_case_body_ScoreThreadValSmpOneCpu( void )
+ */
+T_TEST_CASE_FIXTURE(
+ ScoreThreadValSmpOneCpu,
+ &ScoreThreadValSmpOneCpu_Fixture
+)
+{
+ ScoreThreadValSmpOneCpu_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ScoreThreadValSmpOneCpu_Action_0( ctx );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-score-thread-tls-max-zero.c b/testsuites/validation/tc-score-thread-tls-max-zero.c
new file mode 100644
index 0000000000..6205147865
--- /dev/null
+++ b/testsuites/validation/tc-score-thread-tls-max-zero.c
@@ -0,0 +1,109 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreThreadValTlsMaxZero
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/thread.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreThreadValTlsMaxZero spec:/score/thread/val/tls-max-zero
+ *
+ * @ingroup TestsuitesValidationTls1
+ *
+ * @brief Tests properties of thread-local objects.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by the thread-local objects definition and
+ * the application configuration.
+ *
+ * - Check that the CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE application
+ * configuration option resulted in the expected system setting. Since at
+ * least one thread-local objects is available, the referenced requirement
+ * is validated.
+ *
+ * @{
+ */
+
+static _Thread_local int volatile tls_object;
+
+/**
+ * @brief The test action is carried out by the thread-local objects definition
+ * and the application configuration.
+ */
+static void ScoreThreadValTlsMaxZero_Action_0( void )
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE application
+ * configuration option resulted in the expected system setting. Since at
+ * least one thread-local objects is available, the referenced requirement is
+ * validated.
+ */
+ T_step_eq_int( 0, tls_object, 0 );
+ T_step_eq_sz( 1, _Thread_Maximum_TLS_size, 0 );
+}
+
+/**
+ * @fn void T_case_body_ScoreThreadValTlsMaxZero( void )
+ */
+T_TEST_CASE( ScoreThreadValTlsMaxZero )
+{
+ T_plan( 2 );
+
+ ScoreThreadValTlsMaxZero_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-score-thread-tls.c b/testsuites/validation/tc-score-thread-tls.c
new file mode 100644
index 0000000000..54d930d111
--- /dev/null
+++ b/testsuites/validation/tc-score-thread-tls.c
@@ -0,0 +1,135 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreThreadValTls
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreThreadValTls spec:/score/thread/val/tls
+ *
+ * @ingroup TestsuitesValidationTls0
+ * @ingroup TestsuitesValidationTls1
+ *
+ * @brief Tests properties of thread-local objects.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by the thread-local objects definition.
+ *
+ * - Check that the initial value of the zero initialized thread-local object
+ * has the expected value.
+ *
+ * - Check that the alignment of the zero initialized thread-local object has
+ * the expected value.
+ *
+ * - Check that the initial value of the non-zero initialized thread-local
+ * object has the expected value.
+ *
+ * - Check that the alignment of the non-zero initialized thread-local object
+ * has the expected value.
+ *
+ * @{
+ */
+
+static RTEMS_ALIGNED( 256 ) _Thread_local int volatile tls_object_0;
+
+static RTEMS_ALIGNED( 256 ) _Thread_local int volatile tls_object_1 = 123;
+
+/**
+ * @brief The test action is carried out by the thread-local objects
+ * definition.
+ */
+static void ScoreThreadValTls_Action_0( void )
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the initial value of the zero initialized thread-local object
+ * has the expected value.
+ */
+ T_step_eq_int( 0, tls_object_0, 0 );
+
+ /*
+ * Check that the alignment of the zero initialized thread-local object has
+ * the expected value.
+ */
+ T_step_eq_uptr( 1, ( (uintptr_t) &tls_object_0 ) % 256, 0 );
+
+ /*
+ * Check that the initial value of the non-zero initialized thread-local
+ * object has the expected value.
+ */
+ T_step_eq_int( 2, tls_object_1, 123 );
+
+ /*
+ * Check that the alignment of the non-zero initialized thread-local object
+ * has the expected value.
+ */
+ T_step_eq_uptr( 3, ( (uintptr_t) &tls_object_1 ) % 256, 0 );
+}
+
+/**
+ * @fn void T_case_body_ScoreThreadValTls( void )
+ */
+T_TEST_CASE( ScoreThreadValTls )
+{
+ T_plan( 4 );
+
+ ScoreThreadValTls_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-score-thread.c b/testsuites/validation/tc-score-thread.c
new file mode 100644
index 0000000000..e065905641
--- /dev/null
+++ b/testsuites/validation/tc-score-thread.c
@@ -0,0 +1,446 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreThreadValThread
+ */
+
+/*
+ * Copyright (C) 2021, 2023 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/statesimpl.h>
+#include <rtems/score/threadimpl.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreThreadValThread spec:/score/thread/val/thread
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests general thread behaviour.
+ *
+ * This test case performs the following actions:
+ *
+ * - Create an extension set with a thread terminate extension which deletes
+ * the killer task if it is invoked for the worker task. Create and start
+ * the worker task. Create and start the killer task. The killer task
+ * deletes the worker task.
+ *
+ * - Check that the killer task was deleted.
+ *
+ * - Check that the worker task still exists.
+ *
+ * - Check that the life of the worker task is protected and terminating.
+ *
+ * - Check that the worker task is waiting for a joining thread.
+ *
+ * - Delete the worker task using brute force.
+ *
+ * - Clean up all used resources.
+ *
+ * - Delete a thread which least recently used the floating point coprocessor.
+ *
+ * - Start the worker thread. Let it use the floating point coprocessor.
+ *
+ * - Delete the worker thread and free the thread resources.
+ *
+ * - Clean up all used resources.
+ *
+ * - Validate the global construction. Mark that the test case executed.
+ *
+ * - Check that the global constructor was called exactly once.
+ *
+ * - Check that the global construction was done by the Classic API user
+ * initialization task.
+ *
+ * - Check that the global constructor was called before the task entry.
+ *
+ * - Validate that thread dispatching does not recurse. Issue a couple of
+ * thread context switches during a thread dispatch. Record the stack
+ * pointers of the heir threads.
+ *
+ * - Check that the thread dispatching did not recurse through the recorded
+ * stack pointers.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/score/thread/val/thread test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the worker task identifier.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member contains the killer task identifier.
+ */
+ rtems_id killer_id;
+
+ /**
+ * @brief This member contains a floating-point object.
+ */
+ volatile double fp_obj;
+
+ /**
+ * @brief This member indicates the thread switch state.
+ */
+ int thread_switch_state;
+
+ /**
+ * @brief This member contain the runner stack pointer at the context switch.
+ */
+ uintptr_t runner_stack[ 2 ];
+
+ /**
+ * @brief This member contain the worker stack pointer at the context switch.
+ */
+ uintptr_t worker_stack[ 2 ];
+} ScoreThreadValThread_Context;
+
+static ScoreThreadValThread_Context
+ ScoreThreadValThread_Instance;
+
+typedef ScoreThreadValThread_Context Context;
+
+static bool test_case_executed;
+
+static bool constructor_test_case_executed;
+
+static uint32_t constructor_calls;
+
+static rtems_id constructor_id;
+
+static __attribute__(( __constructor__ )) void Constructor( void )
+{
+ constructor_test_case_executed = test_case_executed;
+ ++constructor_calls;
+ constructor_id = rtems_task_self();
+}
+
+static void TaskTerminate( rtems_tcb *executing )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+
+ if ( ctx->worker_id == executing->Object.id ) {
+ DeleteTask( ctx->killer_id );
+ }
+}
+
+static void WorkerTask( rtems_task_argument arg )
+{
+ (void) arg;
+ SuspendSelf();
+}
+
+static void GoBackToRunner( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ SetPriority( ctx->worker_id, PRIO_LOW );
+}
+
+static void FloatingPointTask( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+ ctx->fp_obj *= 1.23;
+
+ /*
+ * We use an interrupt to go back to the runner since on some
+ * architectures, the floating-point context is only saved during interrupt
+ * processing and not for synchronous thread switches.
+ */
+ CallWithinISR( GoBackToRunner, ctx );
+}
+
+static void KillerTask( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+ DeleteTask( ctx->worker_id );
+}
+
+static void TaskSwitch( rtems_tcb *executing, rtems_tcb *heir )
+{
+ Context *ctx;
+ rtems_id worker_id;
+ int state;
+ uintptr_t heir_stack;
+
+ ctx = T_fixture_context();
+ worker_id = ctx->worker_id;
+ state = ctx->thread_switch_state;
+ ctx->thread_switch_state = state + 1;
+ heir_stack = _CPU_Context_Get_SP( &heir->Registers );
+
+ switch ( state ) {
+ case 0:
+ T_eq_u32( heir->Object.id, worker_id );
+ SuspendTask( worker_id );
+ ctx->worker_stack[ 0 ] = heir_stack;
+ break;
+ case 1:
+ T_eq_u32( executing->Object.id, worker_id );
+ ResumeTask( worker_id );
+ ctx->runner_stack[ 0 ] = heir_stack;
+ break;
+ case 2:
+ T_eq_u32( heir->Object.id, worker_id );
+ SuspendTask( worker_id );
+ ctx->worker_stack[ 1 ] = heir_stack;
+ break;
+ case 3:
+ T_eq_u32( executing->Object.id, worker_id );
+ ctx->runner_stack[ 1 ] = heir_stack;
+ break;
+ default:
+ T_unreachable();
+ }
+}
+
+static T_fixture ScoreThreadValThread_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &ScoreThreadValThread_Instance
+};
+
+/**
+ * @brief Create an extension set with a thread terminate extension which
+ * deletes the killer task if it is invoked for the worker task. Create and
+ * start the worker task. Create and start the killer task. The killer task
+ * deletes the worker task.
+ */
+static void ScoreThreadValThread_Action_0( ScoreThreadValThread_Context *ctx )
+{
+ rtems_extensions_table table = {
+ .thread_terminate = TaskTerminate
+ };
+ rtems_status_code sc;
+ rtems_id id;
+ rtems_tcb *worker_tcb;
+
+ sc = rtems_extension_create(
+ rtems_build_name( 'T', 'E', 'S', 'T' ),
+ &table,
+ &id
+ );
+ T_rsc_success( sc );
+
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ worker_tcb = GetThread( ctx->worker_id );
+ StartTask( ctx->worker_id, WorkerTask, NULL );
+ ctx->killer_id = CreateTask( "KILL", PRIO_HIGH );
+ StartTask( ctx->killer_id, KillerTask, ctx );
+
+ /*
+ * Check that the killer task was deleted.
+ */
+ sc = rtems_event_send( ctx->killer_id, RTEMS_EVENT_0 );
+ T_rsc( sc, RTEMS_INVALID_ID );
+
+ /*
+ * Check that the worker task still exists.
+ */
+ sc = rtems_event_send( ctx->worker_id, RTEMS_EVENT_0 );
+ T_rsc_success( sc );
+
+ /*
+ * Check that the life of the worker task is protected and terminating.
+ */
+ T_eq_int(
+ worker_tcb->Life.state,
+ THREAD_LIFE_PROTECTED | THREAD_LIFE_TERMINATING
+ );
+
+ /*
+ * Check that the worker task is waiting for a joining thread.
+ */
+ T_eq_u32(
+ worker_tcb->current_state,
+ STATES_WAITING_FOR_JOIN_AT_EXIT
+ );
+
+ /*
+ * Delete the worker task using brute force.
+ */
+ worker_tcb->Life.state = THREAD_LIFE_DETACHED |
+ THREAD_LIFE_PROTECTED | THREAD_LIFE_TERMINATING;
+ _Thread_Clear_state( worker_tcb, STATES_WAITING_FOR_JOIN_AT_EXIT );
+
+ /*
+ * Clean up all used resources.
+ */
+ KillZombies();
+ RestoreRunnerPriority();
+
+ sc = rtems_extension_delete( id );
+ T_rsc_success( sc );
+}
+
+/**
+ * @brief Delete a thread which least recently used the floating point
+ * coprocessor.
+ */
+static void ScoreThreadValThread_Action_1( ScoreThreadValThread_Context *ctx )
+{
+ rtems_status_code sc;
+
+ SetSelfPriority( PRIO_NORMAL );
+ sc = rtems_task_create(
+ rtems_build_name( 'W', 'O', 'R', 'K'),
+ PRIO_HIGH,
+ TEST_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_FLOATING_POINT,
+ &ctx->worker_id
+ );
+ T_rsc_success( sc );
+
+ /*
+ * Start the worker thread. Let it use the floating point coprocessor.
+ */
+ StartTask( ctx->worker_id, FloatingPointTask, ctx );
+
+ /*
+ * Delete the worker thread and free the thread resources.
+ */
+ DeleteTask( ctx->worker_id );
+ KillZombies();
+
+ /*
+ * Clean up all used resources.
+ */
+ RestoreRunnerPriority();
+}
+
+/**
+ * @brief Validate the global construction. Mark that the test case executed.
+ */
+static void ScoreThreadValThread_Action_2( ScoreThreadValThread_Context *ctx )
+{
+ test_case_executed = true;
+
+ /*
+ * Check that the global constructor was called exactly once.
+ */
+ T_eq_u32( constructor_calls, 1 );
+
+ /*
+ * Check that the global construction was done by the Classic API user
+ * initialization task.
+ */
+ T_eq_u32( constructor_id, rtems_task_self() );
+
+ /*
+ * Check that the global constructor was called before the task entry.
+ */
+ T_false( constructor_test_case_executed );
+}
+
+/**
+ * @brief Validate that thread dispatching does not recurse. Issue a couple of
+ * thread context switches during a thread dispatch. Record the stack
+ * pointers of the heir threads.
+ */
+static void ScoreThreadValThread_Action_3( ScoreThreadValThread_Context *ctx )
+{
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, WorkerTask, NULL );
+
+ ctx->thread_switch_state = 0;
+ ctx->runner_stack[ 0 ] = 0;
+ ctx->runner_stack[ 1 ] = 1;
+ ctx->worker_stack[ 0 ] = 0;
+ ctx->worker_stack[ 1 ] = 1;
+ SetTaskSwitchExtension( TaskSwitch );
+ ResumeTask( ctx->worker_id );
+
+ SetTaskSwitchExtension( NULL );
+ DeleteTask( ctx->worker_id );
+ RestoreRunnerPriority();
+
+ /*
+ * Check that the thread dispatching did not recurse through the recorded
+ * stack pointers.
+ */
+ T_eq_uptr( ctx->runner_stack[ 0 ], ctx->runner_stack[ 1 ] );
+ T_eq_uptr( ctx->worker_stack[ 0 ], ctx->worker_stack[ 1 ] );
+}
+
+/**
+ * @fn void T_case_body_ScoreThreadValThread( void )
+ */
+T_TEST_CASE_FIXTURE( ScoreThreadValThread, &ScoreThreadValThread_Fixture )
+{
+ ScoreThreadValThread_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ScoreThreadValThread_Action_0( ctx );
+ ScoreThreadValThread_Action_1( ctx );
+ ScoreThreadValThread_Action_2( ctx );
+ ScoreThreadValThread_Action_3( ctx );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-score-tq-smp.c b/testsuites/validation/tc-score-tq-smp.c
new file mode 100644
index 0000000000..624ad0e7b6
--- /dev/null
+++ b/testsuites/validation/tc-score-tq-smp.c
@@ -0,0 +1,571 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqValSmp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/smpbarrier.h>
+#include <rtems/score/threadimpl.h>
+#include <rtems/score/threadqimpl.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqValSmp spec:/score/tq/val/smp
+ *
+ * @ingroup TestsuitesValidationSmpOnly0
+ *
+ * @brief Tests SMP-specific thread queue behaviour.
+ *
+ * This test case performs the following actions:
+ *
+ * - Create two or three worker threads and a mutex. Use the mutex and the
+ * worker to do a thread priority change in parallel with a thread queue
+ * extraction.
+ *
+ * - Create a mutex and let the runner obtain it.
+ *
+ * - Create and start worker A on a second processor. mutex. Let it wait on
+ * the barrier.
+ *
+ * - If there are more than two processors, then create and start also worker
+ * C. Let it wait on the barrier.
+ *
+ * - Create and start worker B. Let it try to obtain the mutex which is
+ * owned by the runner. Delete worker B to extract it from the thread
+ * queue. Wrap the thread queue extract operation to do a parallel thread
+ * priority change carried out by worker A (and maybe C).
+ *
+ * - Clean up all used resources.
+ *
+ * - Build a cyclic dependency graph using several worker threads and mutexes.
+ * Use the mutexes and the worker to construct a thread queue deadlock which
+ * is detected on one processor while it uses thread queue links inserted by
+ * another processor. The runner thread controls the test scenario via the
+ * two thread queue locks. This is an important test scenario which shows
+ * why the thread queue implementation is a bit more complicated in SMP
+ * configurations.
+ *
+ * - Let worker D wait for mutex A. Let worker C wait for mutex D. Let
+ * worker B wait for mutex C.
+ *
+ * - Let worker A attempt to obtain mutex B. Let worker A wait on the lock
+ * of mutex C. Worker A will insert two thread queue links.
+ *
+ * - Let worker E try to obtain mutex D. Worker E will add a thread queue
+ * link which is later used by worker A to detect the deadlock.
+ *
+ * - Let worker A continue the obtain sequence. It will detect a deadlock.
+ *
+ * - Clean up all used resources.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/score/tq/val/smp test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the runner identifier.
+ */
+ rtems_id runner_id;
+
+ /**
+ * @brief This member contains the worker A identifier.
+ */
+ rtems_id worker_a_id;
+
+ /**
+ * @brief This member contains the worker B identifier.
+ */
+ rtems_id worker_b_id;
+
+ /**
+ * @brief This member contains the worker C identifier.
+ */
+ rtems_id worker_c_id;
+
+ /**
+ * @brief This member contains the worker D identifier.
+ */
+ rtems_id worker_d_id;
+
+ /**
+ * @brief This member contains the worker E identifier.
+ */
+ rtems_id worker_e_id;
+
+ /**
+ * @brief This member contains the mutex A identifier.
+ */
+ rtems_id mutex_a_id;
+
+ /**
+ * @brief This member contains the mutex B identifier.
+ */
+ rtems_id mutex_b_id;
+
+ /**
+ * @brief This member contains the mutex C identifier.
+ */
+ rtems_id mutex_c_id;
+
+ /**
+ * @brief This member contains the mutex D identifier.
+ */
+ rtems_id mutex_d_id;
+
+ /**
+ * @brief This member contains the count of processors used by the test.
+ */
+ uint32_t used_cpus;
+
+ /**
+ * @brief This member contains the thread queue of the mutex.
+ */
+ Thread_queue_Queue *thread_queue;
+
+ /**
+ * @brief This member contains the context to wrap the thread queue extract.
+ */
+ WrapThreadQueueContext wrap;
+
+ /**
+ * @brief This member contains the barrier to synchronize the runner and the
+ * workers.
+ */
+ SMP_barrier_Control barrier;
+
+ /**
+ * @brief This member contains the barrier state for the runner processor.
+ */
+ SMP_barrier_State barrier_state;
+} ScoreTqValSmp_Context;
+
+static ScoreTqValSmp_Context
+ ScoreTqValSmp_Instance;
+
+typedef ScoreTqValSmp_Context Context;
+
+static void Extract( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ /* PC0 */
+ _SMP_barrier_Wait( &ctx->barrier, &ctx->barrier_state, ctx->used_cpus );
+
+ /*
+ * Ensure that worker A (and maybe C) acquired the thread wait lock of
+ * worker B.
+ */
+ TicketLockWaitForOthers( &ctx->thread_queue->Lock, ctx->used_cpus - 1 );
+
+ /*
+ * Continue with the thread queue extraction. The thread wait lock of
+ * worker B will be changed back to the default thread wait lock. This
+ * will cause worker A (and maybe C) to release the thread queue lock and
+ * acquire the default thread wait lock of worker B instead to carry out
+ * the priority change.
+ *
+ * See also _Thread_Wait_acquire_critical().
+ */
+}
+
+static void PriorityChangeWorker( rtems_task_argument arg )
+{
+ Context *ctx;
+ SMP_barrier_State state;
+
+ ctx = (Context *) arg;
+ _SMP_barrier_State_initialize( &state );
+
+ /* PC0 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, ctx->used_cpus );
+
+ SetPriority( ctx->worker_b_id, PRIO_VERY_HIGH );
+
+ /* PC1 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, ctx->used_cpus );
+
+ (void) ReceiveAnyEvents();
+}
+
+static void MutexObtainWorker( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ ObtainMutex( ctx->mutex_a_id );
+}
+
+static void DeadlockWorkerA( rtems_task_argument arg )
+{
+ Context *ctx;
+ SMP_barrier_State state;
+
+ ctx = (Context *) arg;
+ _SMP_barrier_State_initialize( &state );
+
+ ObtainMutex( ctx->mutex_a_id );
+
+ /* D0 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+
+ /* D1 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+
+ ObtainMutexDeadlock( ctx->mutex_b_id );
+
+ ReleaseMutex( ctx->mutex_a_id );
+ SendEvents( ctx->runner_id, RTEMS_EVENT_0 );
+ (void) ReceiveAnyEvents();
+}
+
+static void DeadlockWorkerB( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ ObtainMutex( ctx->mutex_b_id );
+ SendEvents( ctx->runner_id, RTEMS_EVENT_5 );
+ ObtainMutex( ctx->mutex_c_id );
+ ReleaseMutex( ctx->mutex_c_id );
+ ReleaseMutex( ctx->mutex_b_id );
+ SendEvents( ctx->runner_id, RTEMS_EVENT_1 );
+ (void) ReceiveAnyEvents();
+}
+
+static void DeadlockWorkerC( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ ObtainMutex( ctx->mutex_c_id );
+ ObtainMutex( ctx->mutex_d_id );
+ ReleaseMutex( ctx->mutex_d_id );
+ ReleaseMutex( ctx->mutex_c_id );
+ SendEvents( ctx->runner_id, RTEMS_EVENT_2 );
+ (void) ReceiveAnyEvents();
+}
+
+static void DeadlockWorkerD( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ ObtainMutex( ctx->mutex_d_id );
+ ObtainMutex( ctx->mutex_a_id );
+ ReleaseMutex( ctx->mutex_a_id );
+ ReleaseMutex( ctx->mutex_d_id );
+ SendEvents( ctx->runner_id, RTEMS_EVENT_3 );
+ (void) ReceiveAnyEvents();
+}
+
+static void DeadlockWorkerE( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ ObtainMutex( ctx->mutex_d_id );
+ ReleaseMutex( ctx->mutex_d_id );
+ SendEvents( ctx->runner_id, RTEMS_EVENT_4 );
+ (void) ReceiveAnyEvents();
+}
+
+static void ScoreTqValSmp_Setup( ScoreTqValSmp_Context *ctx )
+{
+ SetSelfPriority( PRIO_NORMAL );
+}
+
+static void ScoreTqValSmp_Setup_Wrap( void *arg )
+{
+ ScoreTqValSmp_Context *ctx;
+
+ ctx = arg;
+ ScoreTqValSmp_Setup( ctx );
+}
+
+static void ScoreTqValSmp_Teardown( ScoreTqValSmp_Context *ctx )
+{
+ RestoreRunnerPriority();
+}
+
+static void ScoreTqValSmp_Teardown_Wrap( void *arg )
+{
+ ScoreTqValSmp_Context *ctx;
+
+ ctx = arg;
+ ScoreTqValSmp_Teardown( ctx );
+}
+
+static T_fixture ScoreTqValSmp_Fixture = {
+ .setup = ScoreTqValSmp_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqValSmp_Teardown_Wrap,
+ .scope = NULL,
+ .initial_context = &ScoreTqValSmp_Instance
+};
+
+/**
+ * @brief Create two or three worker threads and a mutex. Use the mutex and
+ * the worker to do a thread priority change in parallel with a thread queue
+ * extraction.
+ */
+static void ScoreTqValSmp_Action_0( ScoreTqValSmp_Context *ctx )
+{
+ _SMP_barrier_Control_initialize( &ctx->barrier );
+ _SMP_barrier_State_initialize( &ctx->barrier_state );
+ WrapThreadQueueInitialize( &ctx->wrap, Extract, ctx );
+
+ if ( rtems_scheduler_get_processor_maximum() > 2 ) {
+ ctx->used_cpus = 3;
+ } else {
+ ctx->used_cpus = 2;
+ }
+
+ /*
+ * Create a mutex and let the runner obtain it.
+ */
+ ctx->mutex_a_id = CreateMutexNoProtocol();
+ ctx->thread_queue = GetMutexThreadQueue( ctx->mutex_a_id );
+ ObtainMutex( ctx->mutex_a_id );
+
+ /*
+ * Create and start worker A on a second processor. mutex. Let it wait on
+ * the barrier.
+ */
+ ctx->worker_a_id = CreateTask( "WRKA", PRIO_NORMAL );
+ SetScheduler( ctx->worker_a_id, SCHEDULER_B_ID, PRIO_NORMAL );
+ StartTask( ctx->worker_a_id, PriorityChangeWorker, ctx );
+
+ /*
+ * If there are more than two processors, then create and start also worker
+ * C. Let it wait on the barrier.
+ */
+ if ( ctx->used_cpus > 2 ) {
+ ctx->worker_c_id = CreateTask( "WRKC", PRIO_NORMAL );
+ SetScheduler( ctx->worker_c_id, SCHEDULER_C_ID, PRIO_NORMAL );
+ StartTask( ctx->worker_c_id, PriorityChangeWorker, ctx );
+ }
+
+ /*
+ * Create and start worker B. Let it try to obtain the mutex which is owned
+ * by the runner. Delete worker B to extract it from the thread queue. Wrap
+ * the thread queue extract operation to do a parallel thread priority change
+ * carried out by worker A (and maybe C).
+ */
+ ctx->worker_b_id = CreateTask( "WRKB", PRIO_HIGH );
+ StartTask( ctx->worker_b_id, MutexObtainWorker, ctx );
+ WrapThreadQueueExtractDirect( &ctx->wrap, GetThread( ctx->worker_b_id ) );
+ DeleteTask( ctx->worker_b_id );
+
+ /*
+ * Clean up all used resources.
+ */
+ /* PC1 */
+ _SMP_barrier_Wait( &ctx->barrier, &ctx->barrier_state, ctx->used_cpus );
+
+ WaitForExecutionStop( ctx->worker_a_id );
+ DeleteTask( ctx->worker_a_id );
+
+ if ( ctx->used_cpus > 2 ) {
+ WaitForExecutionStop( ctx->worker_c_id );
+ DeleteTask( ctx->worker_c_id );
+ }
+
+ ReleaseMutex( ctx->mutex_a_id );
+ DeleteMutex( ctx->mutex_a_id );
+ WrapThreadQueueDestroy( &ctx->wrap );
+}
+
+/**
+ * @brief Build a cyclic dependency graph using several worker threads and
+ * mutexes. Use the mutexes and the worker to construct a thread queue
+ * deadlock which is detected on one processor while it uses thread queue
+ * links inserted by another processor. The runner thread controls the test
+ * scenario via the two thread queue locks. This is an important test
+ * scenario which shows why the thread queue implementation is a bit more
+ * complicated in SMP configurations.
+ */
+static void ScoreTqValSmp_Action_1( ScoreTqValSmp_Context *ctx )
+{
+ Thread_queue_Queue *queue_b;
+ Thread_queue_Queue *queue_c;
+ ISR_lock_Context lock_context;
+ SMP_barrier_State state;
+
+ if ( rtems_scheduler_get_processor_maximum() <= 2 ) {
+ /*
+ * We can only run this validation test on systems with three or more
+ * processors. The sequence under test can happen on systems with only two
+ * processors, however, we need a third processor to control the other two
+ * processors via ISR locks to get a deterministic test scenario.
+ */
+ return;
+ }
+
+ ctx->runner_id = rtems_task_self();
+
+ _SMP_barrier_Control_initialize( &ctx->barrier );
+ _SMP_barrier_State_initialize( &state );
+
+ ctx->mutex_a_id = CreateMutexNoProtocol();
+ ctx->mutex_b_id = CreateMutexNoProtocol();
+ ctx->mutex_c_id = CreateMutexNoProtocol();
+ ctx->mutex_d_id = CreateMutexNoProtocol();
+
+ queue_b = GetMutexThreadQueue( ctx->mutex_b_id );
+ queue_c = GetMutexThreadQueue( ctx->mutex_c_id );
+
+ ctx->worker_a_id = CreateTask( "WRKA", PRIO_NORMAL );
+ ctx->worker_b_id = CreateTask( "WRKB", PRIO_NORMAL );
+ ctx->worker_c_id = CreateTask( "WRKC", PRIO_NORMAL );
+ ctx->worker_d_id = CreateTask( "WRKD", PRIO_NORMAL );
+ ctx->worker_e_id = CreateTask( "WRKE", PRIO_NORMAL );
+
+ SetScheduler( ctx->worker_a_id, SCHEDULER_B_ID, PRIO_NORMAL );
+ SetScheduler( ctx->worker_b_id, SCHEDULER_B_ID, PRIO_HIGH );
+ SetScheduler( ctx->worker_c_id, SCHEDULER_B_ID, PRIO_HIGH );
+ SetScheduler( ctx->worker_d_id, SCHEDULER_B_ID, PRIO_HIGH );
+ SetScheduler( ctx->worker_e_id, SCHEDULER_C_ID, PRIO_NORMAL );
+
+ /*
+ * Let worker D wait for mutex A. Let worker C wait for mutex D. Let worker
+ * B wait for mutex C.
+ */
+ StartTask( ctx->worker_a_id, DeadlockWorkerA, ctx );
+
+ /* D0 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+
+ StartTask( ctx->worker_d_id, DeadlockWorkerD, ctx );
+ StartTask( ctx->worker_c_id, DeadlockWorkerC, ctx );
+ StartTask( ctx->worker_b_id, DeadlockWorkerB, ctx );
+ ReceiveAllEvents( RTEMS_EVENT_5 );
+ WaitForExecutionStop( ctx->worker_b_id );
+
+ /*
+ * Let worker A attempt to obtain mutex B. Let worker A wait on the lock of
+ * mutex C. Worker A will insert two thread queue links.
+ */
+ _ISR_lock_ISR_disable( &lock_context );
+ _Thread_queue_Queue_acquire_critical(
+ queue_c,
+ &_Thread_Executing->Potpourri_stats,
+ &lock_context
+ );
+ _ISR_lock_ISR_enable( &lock_context );
+
+ /* D1 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+
+ TicketLockWaitForOthers( &queue_c->Lock, 1 );
+
+ /*
+ * Let worker E try to obtain mutex D. Worker E will add a thread queue link
+ * which is later used by worker A to detect the deadlock.
+ */
+ StartTask( ctx->worker_e_id, DeadlockWorkerE, ctx );
+ TicketLockWaitForOthers( &queue_b->Lock, 1 );
+
+ /*
+ * Let worker A continue the obtain sequence. It will detect a deadlock.
+ */
+ _ISR_lock_ISR_disable( &lock_context );
+ _Thread_queue_Queue_release( queue_c, &lock_context );
+
+ /*
+ * Clean up all used resources.
+ */
+ ReceiveAllEvents(
+ RTEMS_EVENT_0 | RTEMS_EVENT_1 | RTEMS_EVENT_2 | RTEMS_EVENT_3 |
+ RTEMS_EVENT_4
+ );
+ WaitForExecutionStop( ctx->worker_a_id );
+ WaitForExecutionStop( ctx->worker_b_id );
+ WaitForExecutionStop( ctx->worker_c_id );
+ WaitForExecutionStop( ctx->worker_d_id );
+ WaitForExecutionStop( ctx->worker_e_id );
+ DeleteTask( ctx->worker_a_id );
+ DeleteTask( ctx->worker_b_id );
+ DeleteTask( ctx->worker_c_id );
+ DeleteTask( ctx->worker_d_id );
+ DeleteTask( ctx->worker_e_id );
+ DeleteMutex( ctx->mutex_a_id );
+ DeleteMutex( ctx->mutex_b_id );
+ DeleteMutex( ctx->mutex_c_id );
+ DeleteMutex( ctx->mutex_d_id );
+}
+
+/**
+ * @fn void T_case_body_ScoreTqValSmp( void )
+ */
+T_TEST_CASE_FIXTURE( ScoreTqValSmp, &ScoreTqValSmp_Fixture )
+{
+ ScoreTqValSmp_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ScoreTqValSmp_Action_0( ctx );
+ ScoreTqValSmp_Action_1( ctx );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-score-tq.c b/testsuites/validation/tc-score-tq.c
new file mode 100644
index 0000000000..5439d910f5
--- /dev/null
+++ b/testsuites/validation/tc-score-tq.c
@@ -0,0 +1,190 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqValTq
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tx-support.h"
+#include "tx-thread-queue.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqValTq spec:/score/tq/val/tq
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests special thread queue behaviour.
+ *
+ * This test case performs the following actions:
+ *
+ * - Use two worker threads to provoke a deadlock detection involving a thread
+ * queue with no owner.
+ *
+ * - Let blocker A obtain mutex A.
+ *
+ * - Let blocker A block on a counting semaphore.
+ *
+ * - Let blocker B block on mutex A. The deadlock detection will stop since
+ * blocker A blocks on the counting semaphore which has no owner.
+ *
+ * - Clean up all used resources.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/score/tq/val/tq test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the thread queue test context.
+ */
+ TQContext tq_ctx;
+} ScoreTqValTq_Context;
+
+static ScoreTqValTq_Context
+ ScoreTqValTq_Instance;
+
+static void ScoreTqValTq_Setup( ScoreTqValTq_Context *ctx )
+{
+ rtems_status_code sc;
+
+ SetSelfPriority( PRIO_NORMAL );
+ TQInitialize( &ctx->tq_ctx );
+
+ /* Replace mutex D with a counting semaphore */
+ DeleteMutex( ctx->tq_ctx.mutex_id[ TQ_MUTEX_D ] );
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'C', 'S', 'E', 'M' ),
+ 0,
+ RTEMS_COUNTING_SEMAPHORE | RTEMS_PRIORITY,
+ 0,
+ &ctx->tq_ctx.mutex_id[ TQ_MUTEX_D ]
+ );
+ T_rsc_success( sc );
+}
+
+static void ScoreTqValTq_Setup_Wrap( void *arg )
+{
+ ScoreTqValTq_Context *ctx;
+
+ ctx = arg;
+ ScoreTqValTq_Setup( ctx );
+}
+
+static void ScoreTqValTq_Teardown( ScoreTqValTq_Context *ctx )
+{
+ TQDestroy( &ctx->tq_ctx );
+ RestoreRunnerPriority();
+}
+
+static void ScoreTqValTq_Teardown_Wrap( void *arg )
+{
+ ScoreTqValTq_Context *ctx;
+
+ ctx = arg;
+ ScoreTqValTq_Teardown( ctx );
+}
+
+static T_fixture ScoreTqValTq_Fixture = {
+ .setup = ScoreTqValTq_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqValTq_Teardown_Wrap,
+ .scope = NULL,
+ .initial_context = &ScoreTqValTq_Instance
+};
+
+/**
+ * @brief Use two worker threads to provoke a deadlock detection involving a
+ * thread queue with no owner.
+ */
+static void ScoreTqValTq_Action_0( ScoreTqValTq_Context *ctx )
+{
+ TQReset( &ctx->tq_ctx );
+
+ /*
+ * Let blocker A obtain mutex A.
+ */
+ TQSend( &ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_MUTEX_A_OBTAIN );
+
+ /*
+ * Let blocker A block on a counting semaphore.
+ */
+ TQSend( &ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_MUTEX_D_OBTAIN );
+
+ /*
+ * Let blocker B block on mutex A. The deadlock detection will stop since
+ * blocker A blocks on the counting semaphore which has no owner.
+ */
+ TQSend( &ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_MUTEX_A_OBTAIN );
+
+ /*
+ * Clean up all used resources.
+ */
+ TQMutexRelease( &ctx->tq_ctx, TQ_MUTEX_D );
+ TQSend( &ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_MUTEX_A_RELEASE );
+ TQSend( &ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_MUTEX_A_RELEASE );
+}
+
+/**
+ * @fn void T_case_body_ScoreTqValTq( void )
+ */
+T_TEST_CASE_FIXTURE( ScoreTqValTq, &ScoreTqValTq_Fixture )
+{
+ ScoreTqValTq_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ScoreTqValTq_Action_0( ctx );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sem-create.c b/testsuites/validation/tc-sem-create.c
new file mode 100644
index 0000000000..9975cb0778
--- /dev/null
+++ b/testsuites/validation/tc-sem-create.c
@@ -0,0 +1,1559 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSemReqCreate
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <limits.h>
+#include <rtems.h>
+#include <string.h>
+#include <rtems/rtems/semimpl.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSemReqCreate spec:/rtems/sem/req/create
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSemReqCreate_Pre_Name_Valid,
+ RtemsSemReqCreate_Pre_Name_Invalid,
+ RtemsSemReqCreate_Pre_Name_NA
+} RtemsSemReqCreate_Pre_Name;
+
+typedef enum {
+ RtemsSemReqCreate_Pre_Id_Valid,
+ RtemsSemReqCreate_Pre_Id_Null,
+ RtemsSemReqCreate_Pre_Id_NA
+} RtemsSemReqCreate_Pre_Id;
+
+typedef enum {
+ RtemsSemReqCreate_Pre_Count_Zero,
+ RtemsSemReqCreate_Pre_Count_One,
+ RtemsSemReqCreate_Pre_Count_GtOne,
+ RtemsSemReqCreate_Pre_Count_NA
+} RtemsSemReqCreate_Pre_Count;
+
+typedef enum {
+ RtemsSemReqCreate_Pre_Binary_Yes,
+ RtemsSemReqCreate_Pre_Binary_No,
+ RtemsSemReqCreate_Pre_Binary_NA
+} RtemsSemReqCreate_Pre_Binary;
+
+typedef enum {
+ RtemsSemReqCreate_Pre_Simple_Yes,
+ RtemsSemReqCreate_Pre_Simple_No,
+ RtemsSemReqCreate_Pre_Simple_NA
+} RtemsSemReqCreate_Pre_Simple;
+
+typedef enum {
+ RtemsSemReqCreate_Pre_Inherit_Yes,
+ RtemsSemReqCreate_Pre_Inherit_No,
+ RtemsSemReqCreate_Pre_Inherit_NA
+} RtemsSemReqCreate_Pre_Inherit;
+
+typedef enum {
+ RtemsSemReqCreate_Pre_Ceiling_Yes,
+ RtemsSemReqCreate_Pre_Ceiling_No,
+ RtemsSemReqCreate_Pre_Ceiling_NA
+} RtemsSemReqCreate_Pre_Ceiling;
+
+typedef enum {
+ RtemsSemReqCreate_Pre_MrsP_Yes,
+ RtemsSemReqCreate_Pre_MrsP_No,
+ RtemsSemReqCreate_Pre_MrsP_NA
+} RtemsSemReqCreate_Pre_MrsP;
+
+typedef enum {
+ RtemsSemReqCreate_Pre_Disc_FIFO,
+ RtemsSemReqCreate_Pre_Disc_Prio,
+ RtemsSemReqCreate_Pre_Disc_NA
+} RtemsSemReqCreate_Pre_Disc;
+
+typedef enum {
+ RtemsSemReqCreate_Pre_Prio_LeCur,
+ RtemsSemReqCreate_Pre_Prio_GtCur,
+ RtemsSemReqCreate_Pre_Prio_Invalid,
+ RtemsSemReqCreate_Pre_Prio_NA
+} RtemsSemReqCreate_Pre_Prio;
+
+typedef enum {
+ RtemsSemReqCreate_Pre_Free_Yes,
+ RtemsSemReqCreate_Pre_Free_No,
+ RtemsSemReqCreate_Pre_Free_NA
+} RtemsSemReqCreate_Pre_Free;
+
+typedef enum {
+ RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Status_InvName,
+ RtemsSemReqCreate_Post_Status_InvAddr,
+ RtemsSemReqCreate_Post_Status_InvNum,
+ RtemsSemReqCreate_Post_Status_InvPrio,
+ RtemsSemReqCreate_Post_Status_NotDef,
+ RtemsSemReqCreate_Post_Status_TooMany,
+ RtemsSemReqCreate_Post_Status_NA
+} RtemsSemReqCreate_Post_Status;
+
+typedef enum {
+ RtemsSemReqCreate_Post_Name_Valid,
+ RtemsSemReqCreate_Post_Name_Invalid,
+ RtemsSemReqCreate_Post_Name_NA
+} RtemsSemReqCreate_Post_Name;
+
+typedef enum {
+ RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_IdVar_Nop,
+ RtemsSemReqCreate_Post_IdVar_NA
+} RtemsSemReqCreate_Post_IdVar;
+
+typedef enum {
+ RtemsSemReqCreate_Post_Variant_Cnt,
+ RtemsSemReqCreate_Post_Variant_Bin,
+ RtemsSemReqCreate_Post_Variant_PI,
+ RtemsSemReqCreate_Post_Variant_PC,
+ RtemsSemReqCreate_Post_Variant_SB,
+ RtemsSemReqCreate_Post_Variant_MrsP,
+ RtemsSemReqCreate_Post_Variant_NA
+} RtemsSemReqCreate_Post_Variant;
+
+typedef enum {
+ RtemsSemReqCreate_Post_Disc_FIFO,
+ RtemsSemReqCreate_Post_Disc_Prio,
+ RtemsSemReqCreate_Post_Disc_NA
+} RtemsSemReqCreate_Post_Disc;
+
+typedef enum {
+ RtemsSemReqCreate_Post_Count_Initial,
+ RtemsSemReqCreate_Post_Count_NA
+} RtemsSemReqCreate_Post_Count;
+
+typedef enum {
+ RtemsSemReqCreate_Post_Owner_Caller,
+ RtemsSemReqCreate_Post_Owner_No,
+ RtemsSemReqCreate_Post_Owner_NA
+} RtemsSemReqCreate_Post_Owner;
+
+typedef enum {
+ RtemsSemReqCreate_Post_Prio_Ceiling,
+ RtemsSemReqCreate_Post_Prio_Nop,
+ RtemsSemReqCreate_Post_Prio_NA
+} RtemsSemReqCreate_Post_Prio;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Name_NA : 1;
+ uint32_t Pre_Id_NA : 1;
+ uint32_t Pre_Count_NA : 1;
+ uint32_t Pre_Binary_NA : 1;
+ uint32_t Pre_Simple_NA : 1;
+ uint32_t Pre_Inherit_NA : 1;
+ uint32_t Pre_Ceiling_NA : 1;
+ uint32_t Pre_MrsP_NA : 1;
+ uint32_t Pre_Disc_NA : 1;
+ uint32_t Pre_Prio_NA : 1;
+ uint32_t Pre_Free_NA : 1;
+ uint32_t Post_Status : 3;
+ uint32_t Post_Name : 2;
+ uint32_t Post_IdVar : 2;
+ uint32_t Post_Variant : 3;
+ uint32_t Post_Disc : 2;
+ uint32_t Post_Count : 1;
+ uint32_t Post_Owner : 2;
+ uint32_t Post_Prio : 2;
+} RtemsSemReqCreate_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/sem/req/create test case.
+ */
+typedef struct {
+ void *seized_objects;
+
+ rtems_status_code status;
+
+ Semaphore_Variant variant;
+
+ Semaphore_Discipline discipline;
+
+ uint32_t sem_count;
+
+ Thread_Control *executing;
+
+ Thread_Control *owner;
+
+ rtems_name name;
+
+ uint32_t count;
+
+ rtems_attribute attribute_set;
+
+ rtems_task_priority priority_ceiling;
+
+ rtems_id *id;
+
+ rtems_id id_value;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 11 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSemReqCreate_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSemReqCreate_Context;
+
+static RtemsSemReqCreate_Context
+ RtemsSemReqCreate_Instance;
+
+static const char * const RtemsSemReqCreate_PreDesc_Name[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsSemReqCreate_PreDesc_Id[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsSemReqCreate_PreDesc_Count[] = {
+ "Zero",
+ "One",
+ "GtOne",
+ "NA"
+};
+
+static const char * const RtemsSemReqCreate_PreDesc_Binary[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsSemReqCreate_PreDesc_Simple[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsSemReqCreate_PreDesc_Inherit[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsSemReqCreate_PreDesc_Ceiling[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsSemReqCreate_PreDesc_MrsP[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsSemReqCreate_PreDesc_Disc[] = {
+ "FIFO",
+ "Prio",
+ "NA"
+};
+
+static const char * const RtemsSemReqCreate_PreDesc_Prio[] = {
+ "LeCur",
+ "GtCur",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsSemReqCreate_PreDesc_Free[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsSemReqCreate_PreDesc[] = {
+ RtemsSemReqCreate_PreDesc_Name,
+ RtemsSemReqCreate_PreDesc_Id,
+ RtemsSemReqCreate_PreDesc_Count,
+ RtemsSemReqCreate_PreDesc_Binary,
+ RtemsSemReqCreate_PreDesc_Simple,
+ RtemsSemReqCreate_PreDesc_Inherit,
+ RtemsSemReqCreate_PreDesc_Ceiling,
+ RtemsSemReqCreate_PreDesc_MrsP,
+ RtemsSemReqCreate_PreDesc_Disc,
+ RtemsSemReqCreate_PreDesc_Prio,
+ RtemsSemReqCreate_PreDesc_Free,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+typedef RtemsSemReqCreate_Context Context;
+
+static rtems_status_code Create( void *arg, uint32_t *id )
+{
+ (void) arg;
+
+ return rtems_semaphore_create(
+ rtems_build_name( 'S', 'I', 'Z', 'E' ),
+ 1,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ 0,
+ id
+ );
+}
+
+static void GetSemAttributes( Context *ctx )
+{
+ if ( ctx->id_value != INVALID_ID ) {
+ Semaphore_Control *semaphore;
+ Thread_queue_Context queue_context;
+ uintptr_t flags;
+
+ semaphore = _Semaphore_Get( ctx->id_value, &queue_context );
+ T_assert_not_null( semaphore );
+ ctx->sem_count = semaphore->Core_control.Semaphore.count;
+ ctx->owner = semaphore->Core_control.Wait_queue.Queue.owner;
+ flags = _Semaphore_Get_flags( semaphore );
+ _ISR_lock_ISR_enable( &queue_context.Lock_context.Lock_context );
+ ctx->variant = _Semaphore_Get_variant( flags );
+ ctx->discipline = _Semaphore_Get_discipline( flags );
+ } else {
+ ctx->sem_count = 123;
+ ctx->owner = (void *)(uintptr_t) 1;
+ ctx->variant = INT_MAX;
+ ctx->discipline = INT_MAX;
+ }
+}
+
+static void RtemsSemReqCreate_Pre_Name_Prepare(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Pre_Name_Valid: {
+ /*
+ * While the ``name`` parameter is valid.
+ */
+ ctx->name = NAME;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Name_Invalid: {
+ /*
+ * While the ``name`` parameter is invalid.
+ */
+ ctx->name = 0;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Pre_Id_Prepare(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter references an object of type rtems_id.
+ */
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Id_Null: {
+ /*
+ * While the ``id`` parameter is NULL.
+ */
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Pre_Count_Prepare(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Pre_Count state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Pre_Count_Zero: {
+ /*
+ * While the ``count`` parameter is zero.
+ */
+ ctx->count = 0;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Count_One: {
+ /*
+ * While the ``count`` parameter is one.
+ */
+ ctx->count = 1;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Count_GtOne: {
+ /*
+ * While the ``count`` parameter is greater than one.
+ */
+ ctx->count = UINT32_MAX;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Count_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Pre_Binary_Prepare(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Pre_Binary state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Pre_Binary_Yes: {
+ /*
+ * While the ``attribute_set`` parameter specifies the binary semaphore
+ * class.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Binary_No: {
+ /*
+ * While the ``attribute_set`` parameter does not specify the binary
+ * semaphore class.
+ */
+ /* Use default */
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Binary_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Pre_Simple_Prepare(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Pre_Simple state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Pre_Simple_Yes: {
+ /*
+ * While the ``attribute_set`` parameter specifies the simple binary
+ * semaphore class.
+ */
+ ctx->attribute_set |= RTEMS_SIMPLE_BINARY_SEMAPHORE;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Simple_No: {
+ /*
+ * While the ``attribute_set`` parameter does not specify the simple
+ * binary semaphore class.
+ */
+ /* Use default */
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Simple_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Pre_Inherit_Prepare(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Pre_Inherit state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Pre_Inherit_Yes: {
+ /*
+ * While the ``attribute_set`` parameter specifies the priority
+ * inheritance locking protocol.
+ */
+ ctx->attribute_set |= RTEMS_INHERIT_PRIORITY;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Inherit_No: {
+ /*
+ * While the ``attribute_set`` parameter does not specify the priority
+ * inheritance locking protocol.
+ */
+ ctx->attribute_set |= RTEMS_NO_INHERIT_PRIORITY;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Inherit_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Pre_Ceiling_Prepare(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Pre_Ceiling state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Pre_Ceiling_Yes: {
+ /*
+ * While the ``attribute_set`` parameter specifies the priority ceiling
+ * locking protocol.
+ */
+ ctx->attribute_set |= RTEMS_PRIORITY_CEILING;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Ceiling_No: {
+ /*
+ * While the ``attribute_set`` parameter does not specify the priority
+ * ceiling locking protocol.
+ */
+ ctx->attribute_set |= RTEMS_NO_PRIORITY_CEILING;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Ceiling_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Pre_MrsP_Prepare(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Pre_MrsP state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Pre_MrsP_Yes: {
+ /*
+ * While the ``attribute_set`` parameter specifies the MrsP locking
+ * protocol.
+ */
+ ctx->attribute_set |= RTEMS_MULTIPROCESSOR_RESOURCE_SHARING;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_MrsP_No: {
+ /*
+ * While the ``attribute_set`` parameter does not specify the MrsP
+ * locking protocol.
+ */
+ ctx->attribute_set |= RTEMS_NO_MULTIPROCESSOR_RESOURCE_SHARING;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_MrsP_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Pre_Disc_Prepare(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Pre_Disc state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Pre_Disc_FIFO: {
+ /*
+ * While the ``attribute_set`` parameter specifies the FIFO task wait
+ * queue discipline or the default task wait queue discipline.
+ */
+ RTEMS_STATIC_ASSERT( RTEMS_DEFAULT_ATTRIBUTES == RTEMS_FIFO, RTEMS_FIFO );
+ ctx->attribute_set |= RTEMS_FIFO;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Disc_Prio: {
+ /*
+ * While the ``attribute_set`` parameter specifies the priority task wait
+ * queue discipline.
+ */
+ ctx->attribute_set |= RTEMS_PRIORITY;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Disc_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Pre_Prio_Prepare(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Pre_Prio state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Pre_Prio_LeCur: {
+ /*
+ * While the ``priority_ceiling`` parameter is a valid task priority less
+ * than or equal to the current priority of the calling task with respect
+ * to the scheduler of the calling task at some point during the
+ * directive call.
+ */
+ ctx->priority_ceiling = 0;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Prio_GtCur: {
+ /*
+ * While the ``priority_ceiling`` parameter is a valid task priority
+ * greater than the current priority of the calling task with respect to
+ * the scheduler of the calling task at some point during the directive
+ * call.
+ */
+ ctx->priority_ceiling = 2;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Prio_Invalid: {
+ /*
+ * The ``priority_ceiling`` parameter shall not be a valid task priority
+ * with respect to the scheduler of the calling task at some point during
+ * the directive call.
+ */
+ ctx->priority_ceiling = UINT32_MAX;
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Prio_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Pre_Free_Prepare(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Pre_Free state
+)
+{
+ size_t i;
+
+ switch ( state ) {
+ case RtemsSemReqCreate_Pre_Free_Yes: {
+ /*
+ * While the system has at least one inactive semaphore object available.
+ */
+ /* Nothing to do */
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Free_No: {
+ /*
+ * While the system has no inactive semaphore object available.
+ */
+ i = 0;
+ ctx->seized_objects = T_seize_objects( Create, &i );
+ break;
+ }
+
+ case RtemsSemReqCreate_Pre_Free_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Post_Status_Check(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Post_Status_Ok: {
+ /*
+ * The return status of rtems_semaphore_create() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Status_InvName: {
+ /*
+ * The return status of rtems_semaphore_create() shall be
+ * RTEMS_INVALID_NAME.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_semaphore_create() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Status_InvNum: {
+ /*
+ * The return status of rtems_semaphore_create() shall be
+ * RTEMS_INVALID_NUMBER.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NUMBER );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Status_InvPrio: {
+ /*
+ * The return status of rtems_semaphore_create() shall be
+ * RTEMS_INVALID_PRIORITY.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_PRIORITY );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Status_NotDef: {
+ /*
+ * The return status of rtems_semaphore_create() shall be
+ * RTEMS_NOT_DEFINED.
+ */
+ T_rsc( ctx->status, RTEMS_NOT_DEFINED );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Status_TooMany: {
+ /*
+ * The return status of rtems_semaphore_create() shall be RTEMS_TOO_MANY.
+ */
+ T_rsc( ctx->status, RTEMS_TOO_MANY );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Post_Name_Check(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Post_Name state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ switch ( state ) {
+ case RtemsSemReqCreate_Post_Name_Valid: {
+ /*
+ * The unique object name shall identify the semaphore created by the
+ * rtems_semaphore_create() call.
+ */
+ id = 0;
+ sc = rtems_semaphore_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc_success( sc );
+ T_eq_u32( id, ctx->id_value );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Name_Invalid: {
+ /*
+ * The unique object name shall not identify a semaphore.
+ */
+ sc = rtems_semaphore_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Name_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Post_IdVar_Check(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Post_IdVar state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Post_IdVar_Set: {
+ /*
+ * The value of the object referenced by the ``id`` parameter shall be
+ * set to the object identifier of the created semaphore after the return
+ * of the rtems_semaphore_create() call.
+ */
+ T_eq_ptr( ctx->id, &ctx->id_value );
+ T_ne_u32( ctx->id_value, INVALID_ID );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_IdVar_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_semaphore_create() shall not be accessed by the
+ * rtems_semaphore_create() call.
+ */
+ T_eq_u32( ctx->id_value, INVALID_ID );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_IdVar_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Post_Variant_Check(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Post_Variant state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Post_Variant_Cnt: {
+ /*
+ * The semaphore created by the rtems_semaphore_create() call shall be a
+ * counting semaphore.
+ */
+ T_eq_int( ctx->variant, SEMAPHORE_VARIANT_COUNTING );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Variant_Bin: {
+ /*
+ * The semaphore created by the rtems_semaphore_create() call shall be a
+ * binary semaphore not using a locking protocol.
+ */
+ T_eq_int( ctx->variant, SEMAPHORE_VARIANT_MUTEX_NO_PROTOCOL );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Variant_PI: {
+ /*
+ * The semaphore created by the rtems_semaphore_create() call shall be a
+ * binary semaphore using the priority inheritance locking protocol.
+ */
+ T_eq_int( ctx->variant, SEMAPHORE_VARIANT_MUTEX_INHERIT_PRIORITY );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Variant_PC: {
+ /*
+ * The semaphore created by the rtems_semaphore_create() call shall be a
+ * binary semaphore using the priority ceiling locking protocol.
+ */
+ T_eq_int( ctx->variant, SEMAPHORE_VARIANT_MUTEX_PRIORITY_CEILING );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Variant_SB: {
+ /*
+ * The semaphore created by the rtems_semaphore_create() call shall be a
+ * simple binary semaphore.
+ */
+ T_eq_int( ctx->variant, SEMAPHORE_VARIANT_SIMPLE_BINARY );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Variant_MrsP: {
+ /*
+ * The semaphore created by the rtems_semaphore_create() call shall be a
+ * binary semaphore using the MrsP locking protocol.
+ */
+ #if defined(RTEMS_SMP)
+ T_eq_int( ctx->variant, SEMAPHORE_VARIANT_MRSP );
+ #else
+ T_true( false );
+ #endif
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Variant_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Post_Disc_Check(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Post_Disc state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Post_Disc_FIFO: {
+ /*
+ * The semaphore created by the rtems_semaphore_create() call shall use
+ * the FIFO task wait queue discipline.
+ */
+ T_eq_int( ctx->discipline, SEMAPHORE_DISCIPLINE_FIFO );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Disc_Prio: {
+ /*
+ * The semaphore created by the rtems_semaphore_create() call shall use
+ * the priority task wait queue discipline.
+ */
+ T_eq_int( ctx->discipline, SEMAPHORE_DISCIPLINE_PRIORITY );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Disc_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Post_Count_Check(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Post_Count state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Post_Count_Initial: {
+ /*
+ * The semaphore created by the rtems_semaphore_create() call shall have
+ * an initial count equal to the value of the ``count`` parameter.
+ */
+ T_eq_u32( ctx->sem_count, ctx->count );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Count_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Post_Owner_Check(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Post_Owner state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Post_Owner_Caller: {
+ /*
+ * The semaphore created by the rtems_semaphore_create() call shall be
+ * initially owned by the calling task.
+ */
+ T_eq_ptr( ctx->owner, ctx->executing );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Owner_No: {
+ /*
+ * The semaphore created by the rtems_semaphore_create() call shall not
+ * initially have an owner.
+ */
+ T_null( ctx->owner );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Owner_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Post_Prio_Check(
+ RtemsSemReqCreate_Context *ctx,
+ RtemsSemReqCreate_Post_Prio state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqCreate_Post_Prio_Ceiling: {
+ /*
+ * The current priority of the task which called rtems_semaphore_create()
+ * shall be equal to the value of the ``priority_ceiling`` parameter.
+ */
+ T_eq_u32( GetSelfPriority(), ctx->priority_ceiling );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Prio_Nop: {
+ /*
+ * The current priority of the task which called rtems_semaphore_create()
+ * shall not be modified by the rtems_semaphore_create() call.
+ */
+ T_eq_u32( GetSelfPriority(), 1 );
+ break;
+ }
+
+ case RtemsSemReqCreate_Post_Prio_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqCreate_Setup( RtemsSemReqCreate_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->executing = _Thread_Get_executing();
+}
+
+static void RtemsSemReqCreate_Setup_Wrap( void *arg )
+{
+ RtemsSemReqCreate_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqCreate_Setup( ctx );
+}
+
+static void RtemsSemReqCreate_Prepare( RtemsSemReqCreate_Context *ctx )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ ctx->id_value = INVALID_ID;
+ ctx->attribute_set = RTEMS_DEFAULT_ATTRIBUTES;
+
+ id = INVALID_ID;
+ sc = rtems_semaphore_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ T_eq_u32( id, INVALID_ID );
+}
+
+static void RtemsSemReqCreate_Action( RtemsSemReqCreate_Context *ctx )
+{
+ ctx->status = rtems_semaphore_create(
+ ctx->name,
+ ctx->count,
+ ctx->attribute_set,
+ ctx->priority_ceiling,
+ ctx->id
+ );
+
+ GetSemAttributes( ctx );
+}
+
+static void RtemsSemReqCreate_Cleanup( RtemsSemReqCreate_Context *ctx )
+{
+ rtems_status_code sc;
+
+ if ( ctx->id_value != INVALID_ID ) {
+ if ( ctx->count == 0 ) {
+ sc = rtems_semaphore_release( ctx->id_value );
+ T_rsc_success( sc );
+ }
+
+ sc = rtems_semaphore_delete( ctx->id_value );
+ T_rsc_success( sc );
+ }
+
+ T_surrender_objects( &ctx->seized_objects, rtems_semaphore_delete );
+}
+
+static const RtemsSemReqCreate_Entry
+RtemsSemReqCreate_Entries[] = {
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_InvName,
+ RtemsSemReqCreate_Post_Name_Invalid, RtemsSemReqCreate_Post_IdVar_Nop,
+ RtemsSemReqCreate_Post_Variant_NA, RtemsSemReqCreate_Post_Disc_NA,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_NA,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_InvAddr,
+ RtemsSemReqCreate_Post_Name_Invalid, RtemsSemReqCreate_Post_IdVar_Nop,
+ RtemsSemReqCreate_Post_Variant_NA, RtemsSemReqCreate_Post_Disc_NA,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_NA,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_NotDef,
+ RtemsSemReqCreate_Post_Name_Invalid, RtemsSemReqCreate_Post_IdVar_Nop,
+ RtemsSemReqCreate_Post_Variant_NA, RtemsSemReqCreate_Post_Disc_NA,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_NA,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_TooMany,
+ RtemsSemReqCreate_Post_Name_Invalid, RtemsSemReqCreate_Post_IdVar_Nop,
+ RtemsSemReqCreate_Post_Variant_NA, RtemsSemReqCreate_Post_Disc_NA,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_NA,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_InvNum,
+ RtemsSemReqCreate_Post_Name_Invalid, RtemsSemReqCreate_Post_IdVar_Nop,
+ RtemsSemReqCreate_Post_Variant_NA, RtemsSemReqCreate_Post_Disc_NA,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_NA,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_Cnt, RtemsSemReqCreate_Post_Disc_FIFO,
+ RtemsSemReqCreate_Post_Count_Initial, RtemsSemReqCreate_Post_Owner_No,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_Cnt, RtemsSemReqCreate_Post_Disc_Prio,
+ RtemsSemReqCreate_Post_Count_Initial, RtemsSemReqCreate_Post_Owner_No,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_InvPrio,
+ RtemsSemReqCreate_Post_Name_Invalid, RtemsSemReqCreate_Post_IdVar_Nop,
+ RtemsSemReqCreate_Post_Variant_NA, RtemsSemReqCreate_Post_Disc_NA,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_NA,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_SB, RtemsSemReqCreate_Post_Disc_FIFO,
+ RtemsSemReqCreate_Post_Count_Initial, RtemsSemReqCreate_Post_Owner_No,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_SB, RtemsSemReqCreate_Post_Disc_Prio,
+ RtemsSemReqCreate_Post_Count_Initial, RtemsSemReqCreate_Post_Owner_No,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_PI, RtemsSemReqCreate_Post_Disc_Prio,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_Caller,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_Bin, RtemsSemReqCreate_Post_Disc_FIFO,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_Caller,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_Bin, RtemsSemReqCreate_Post_Disc_Prio,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_Caller,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_PI, RtemsSemReqCreate_Post_Disc_Prio,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_No,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_Bin, RtemsSemReqCreate_Post_Disc_FIFO,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_No,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_Bin, RtemsSemReqCreate_Post_Disc_Prio,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_No,
+ RtemsSemReqCreate_Post_Prio_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_PC, RtemsSemReqCreate_Post_Disc_Prio,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_No,
+ RtemsSemReqCreate_Post_Prio_Nop },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_MrsP, RtemsSemReqCreate_Post_Disc_Prio,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_No,
+ RtemsSemReqCreate_Post_Prio_Nop },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_PC, RtemsSemReqCreate_Post_Disc_Prio,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_No,
+ RtemsSemReqCreate_Post_Prio_Nop },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_PC, RtemsSemReqCreate_Post_Disc_Prio,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_Caller,
+ RtemsSemReqCreate_Post_Prio_Ceiling },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_MrsP, RtemsSemReqCreate_Post_Disc_Prio,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_Caller,
+ RtemsSemReqCreate_Post_Prio_Ceiling }
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsSemReqCreate_Post_Status_Ok,
+ RtemsSemReqCreate_Post_Name_Valid, RtemsSemReqCreate_Post_IdVar_Set,
+ RtemsSemReqCreate_Post_Variant_PC, RtemsSemReqCreate_Post_Disc_Prio,
+ RtemsSemReqCreate_Post_Count_NA, RtemsSemReqCreate_Post_Owner_Caller,
+ RtemsSemReqCreate_Post_Prio_Ceiling }
+#endif
+};
+
+static const uint8_t
+RtemsSemReqCreate_Map[] = {
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 10, 3, 10, 3, 10, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 18, 3, 7, 3, 7, 3, 2, 2, 2, 2, 2, 2, 19, 3, 7, 3, 7, 3,
+ 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 3, 8, 3, 8, 3,
+ 9, 3, 9, 3, 9, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 13, 3, 13, 3, 13, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 16, 3, 16, 3, 7, 3, 2, 2, 2, 2, 2, 2, 17, 3, 17, 3, 7, 3, 14,
+ 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 3, 8, 3, 8, 3, 9,
+ 3, 9, 3, 9, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static size_t RtemsSemReqCreate_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsSemReqCreate_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsSemReqCreate_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSemReqCreate_Fixture = {
+ .setup = RtemsSemReqCreate_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsSemReqCreate_Scope,
+ .initial_context = &RtemsSemReqCreate_Instance
+};
+
+static inline RtemsSemReqCreate_Entry RtemsSemReqCreate_PopEntry(
+ RtemsSemReqCreate_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSemReqCreate_Entries[
+ RtemsSemReqCreate_Map[ index ]
+ ];
+}
+
+static void RtemsSemReqCreate_TestVariant( RtemsSemReqCreate_Context *ctx )
+{
+ RtemsSemReqCreate_Pre_Name_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSemReqCreate_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsSemReqCreate_Pre_Count_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsSemReqCreate_Pre_Binary_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsSemReqCreate_Pre_Simple_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsSemReqCreate_Pre_Inherit_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsSemReqCreate_Pre_Ceiling_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsSemReqCreate_Pre_MrsP_Prepare( ctx, ctx->Map.pcs[ 7 ] );
+ RtemsSemReqCreate_Pre_Disc_Prepare( ctx, ctx->Map.pcs[ 8 ] );
+ RtemsSemReqCreate_Pre_Prio_Prepare( ctx, ctx->Map.pcs[ 9 ] );
+ RtemsSemReqCreate_Pre_Free_Prepare( ctx, ctx->Map.pcs[ 10 ] );
+ RtemsSemReqCreate_Action( ctx );
+ RtemsSemReqCreate_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsSemReqCreate_Post_Name_Check( ctx, ctx->Map.entry.Post_Name );
+ RtemsSemReqCreate_Post_IdVar_Check( ctx, ctx->Map.entry.Post_IdVar );
+ RtemsSemReqCreate_Post_Variant_Check( ctx, ctx->Map.entry.Post_Variant );
+ RtemsSemReqCreate_Post_Disc_Check( ctx, ctx->Map.entry.Post_Disc );
+ RtemsSemReqCreate_Post_Count_Check( ctx, ctx->Map.entry.Post_Count );
+ RtemsSemReqCreate_Post_Owner_Check( ctx, ctx->Map.entry.Post_Owner );
+ RtemsSemReqCreate_Post_Prio_Check( ctx, ctx->Map.entry.Post_Prio );
+}
+
+/**
+ * @fn void T_case_body_RtemsSemReqCreate( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsSemReqCreate, &RtemsSemReqCreate_Fixture )
+{
+ RtemsSemReqCreate_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsSemReqCreate_Pre_Name_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsSemReqCreate_Pre_Name_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsSemReqCreate_Pre_Id_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsSemReqCreate_Pre_Id_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsSemReqCreate_Pre_Count_Zero;
+ ctx->Map.pcs[ 2 ] < RtemsSemReqCreate_Pre_Count_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsSemReqCreate_Pre_Binary_Yes;
+ ctx->Map.pcs[ 3 ] < RtemsSemReqCreate_Pre_Binary_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsSemReqCreate_Pre_Simple_Yes;
+ ctx->Map.pcs[ 4 ] < RtemsSemReqCreate_Pre_Simple_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = RtemsSemReqCreate_Pre_Inherit_Yes;
+ ctx->Map.pcs[ 5 ] < RtemsSemReqCreate_Pre_Inherit_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 6 ] = RtemsSemReqCreate_Pre_Ceiling_Yes;
+ ctx->Map.pcs[ 6 ] < RtemsSemReqCreate_Pre_Ceiling_NA;
+ ++ctx->Map.pcs[ 6 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 7 ] = RtemsSemReqCreate_Pre_MrsP_Yes;
+ ctx->Map.pcs[ 7 ] < RtemsSemReqCreate_Pre_MrsP_NA;
+ ++ctx->Map.pcs[ 7 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 8 ] = RtemsSemReqCreate_Pre_Disc_FIFO;
+ ctx->Map.pcs[ 8 ] < RtemsSemReqCreate_Pre_Disc_NA;
+ ++ctx->Map.pcs[ 8 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 9 ] = RtemsSemReqCreate_Pre_Prio_LeCur;
+ ctx->Map.pcs[ 9 ] < RtemsSemReqCreate_Pre_Prio_NA;
+ ++ctx->Map.pcs[ 9 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 10 ] = RtemsSemReqCreate_Pre_Free_Yes;
+ ctx->Map.pcs[ 10 ] < RtemsSemReqCreate_Pre_Free_NA;
+ ++ctx->Map.pcs[ 10 ]
+ ) {
+ ctx->Map.entry = RtemsSemReqCreate_PopEntry( ctx );
+ RtemsSemReqCreate_Prepare( ctx );
+ RtemsSemReqCreate_TestVariant( ctx );
+ RtemsSemReqCreate_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sem-delete.c b/testsuites/validation/tc-sem-delete.c
new file mode 100644
index 0000000000..188b532870
--- /dev/null
+++ b/testsuites/validation/tc-sem-delete.c
@@ -0,0 +1,759 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSemReqDelete
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSemReqDelete spec:/rtems/sem/req/delete
+ *
+ * @ingroup TestsuitesValidationOneCpu0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSemReqDelete_Pre_Id_NoObj,
+ RtemsSemReqDelete_Pre_Id_Counting,
+ RtemsSemReqDelete_Pre_Id_Simple,
+ RtemsSemReqDelete_Pre_Id_Binary,
+ RtemsSemReqDelete_Pre_Id_PrioCeiling,
+ RtemsSemReqDelete_Pre_Id_PrioInherit,
+ RtemsSemReqDelete_Pre_Id_MrsP,
+ RtemsSemReqDelete_Pre_Id_NA
+} RtemsSemReqDelete_Pre_Id;
+
+typedef enum {
+ RtemsSemReqDelete_Pre_Discipline_FIFO,
+ RtemsSemReqDelete_Pre_Discipline_Priority,
+ RtemsSemReqDelete_Pre_Discipline_NA
+} RtemsSemReqDelete_Pre_Discipline;
+
+typedef enum {
+ RtemsSemReqDelete_Pre_State_GtZeroOrNoOwner,
+ RtemsSemReqDelete_Pre_State_Zero,
+ RtemsSemReqDelete_Pre_State_Blocked,
+ RtemsSemReqDelete_Pre_State_NA
+} RtemsSemReqDelete_Pre_State;
+
+typedef enum {
+ RtemsSemReqDelete_Post_Status_Ok,
+ RtemsSemReqDelete_Post_Status_InvId,
+ RtemsSemReqDelete_Post_Status_InUse,
+ RtemsSemReqDelete_Post_Status_NA
+} RtemsSemReqDelete_Post_Status;
+
+typedef enum {
+ RtemsSemReqDelete_Post_Name_Valid,
+ RtemsSemReqDelete_Post_Name_Invalid,
+ RtemsSemReqDelete_Post_Name_NA
+} RtemsSemReqDelete_Post_Name;
+
+typedef enum {
+ RtemsSemReqDelete_Post_Flush_FIFO,
+ RtemsSemReqDelete_Post_Flush_Priority,
+ RtemsSemReqDelete_Post_Flush_No,
+ RtemsSemReqDelete_Post_Flush_NA
+} RtemsSemReqDelete_Post_Flush;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_Discipline_NA : 1;
+ uint16_t Pre_State_NA : 1;
+ uint16_t Post_Status : 2;
+ uint16_t Post_Name : 2;
+ uint16_t Post_Flush : 2;
+} RtemsSemReqDelete_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/sem/req/delete test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the worker task identifiers.
+ */
+ rtems_id worker_id[ 2 ];
+
+ /**
+ * @brief This member contains the worker activity counter.
+ */
+ uint32_t counter;
+
+ /**
+ * @brief This member contains the worker activity counter of a specific
+ * worker.
+ */
+ uint32_t worker_counter[ 2 ];
+
+ /**
+ * @brief This member specifies the expected rtems_semaphore_obtain() status.
+ */
+ rtems_status_code obtain_status;
+
+ /**
+ * @brief This member specifies if the initial count of the semaphore.
+ */
+ uint32_t count;
+
+ /**
+ * @brief This member specifies if the attribute set of the semaphore.
+ */
+ rtems_attribute attribute_set;
+
+ /**
+ * @brief This member contains the semaphore identifier.
+ */
+ rtems_id semaphore_id;
+
+ /**
+ * @brief If this member is true, then the ``name`` parameter shall be valid,
+ * otherwise it should be NULL.
+ */
+ bool valid_id;
+
+ /**
+ * @brief If this member is true, then tasks shall be blocked on the
+ * semaphore, otherwise no tasks shall be blocked on the semaphore.
+ */
+ bool blocked;
+
+ /**
+ * @brief This member specifies the ``name`` parameter for the
+ * rtems_semaphore_delete() call.
+ */
+ rtems_id id;
+
+ /**
+ * @brief This member specifies the expected rtems_semaphore_delete() status.
+ */
+ rtems_status_code delete_status;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSemReqDelete_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSemReqDelete_Context;
+
+static RtemsSemReqDelete_Context
+ RtemsSemReqDelete_Instance;
+
+static const char * const RtemsSemReqDelete_PreDesc_Id[] = {
+ "NoObj",
+ "Counting",
+ "Simple",
+ "Binary",
+ "PrioCeiling",
+ "PrioInherit",
+ "MrsP",
+ "NA"
+};
+
+static const char * const RtemsSemReqDelete_PreDesc_Discipline[] = {
+ "FIFO",
+ "Priority",
+ "NA"
+};
+
+static const char * const RtemsSemReqDelete_PreDesc_State[] = {
+ "GtZeroOrNoOwner",
+ "Zero",
+ "Blocked",
+ "NA"
+};
+
+static const char * const * const RtemsSemReqDelete_PreDesc[] = {
+ RtemsSemReqDelete_PreDesc_Id,
+ RtemsSemReqDelete_PreDesc_Discipline,
+ RtemsSemReqDelete_PreDesc_State,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+#define EVENT_OBTAIN RTEMS_EVENT_0
+
+typedef RtemsSemReqDelete_Context Context;
+
+static void WakeUp( Context *ctx, size_t index )
+{
+ SendEvents( ctx->worker_id[ index ], RTEMS_EVENT_0 );
+}
+
+static void Worker( rtems_task_argument arg, size_t index )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ /*
+ * In order to test the flush in FIFO order, we have to use the no-preempt
+ * mode.
+ */
+ SetMode( RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK );
+
+ while ( true ) {
+ rtems_status_code sc;
+ rtems_event_set events;
+ uint32_t counter;
+
+ events = ReceiveAnyEvents();
+ T_eq_u32( events, RTEMS_EVENT_0 );
+
+ sc = rtems_semaphore_obtain(
+ ctx->semaphore_id,
+ RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+ T_rsc( sc, ctx->obtain_status );
+
+ counter = ctx->counter;
+ ++counter;
+ ctx->counter = counter;
+ ctx->worker_counter[ index ] = counter;
+
+ if ( sc == RTEMS_SUCCESSFUL ) {
+ sc = rtems_semaphore_release( ctx->semaphore_id );
+ T_rsc_success( sc );
+ }
+ }
+}
+
+static void WorkerZero( rtems_task_argument arg )
+{
+ Worker( arg, 0 );
+}
+
+static void WorkerOne( rtems_task_argument arg )
+{
+ Worker( arg, 1 );
+}
+
+static void RtemsSemReqDelete_Pre_Id_Prepare(
+ RtemsSemReqDelete_Context *ctx,
+ RtemsSemReqDelete_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqDelete_Pre_Id_NoObj: {
+ /*
+ * While the ``id`` parameter is not associated with a semaphore.
+ */
+ ctx->valid_id = false;
+ break;
+ }
+
+ case RtemsSemReqDelete_Pre_Id_Counting: {
+ /*
+ * While the ``id`` parameter is associated with a counting semaphore.
+ */
+ ctx->attribute_set |= RTEMS_COUNTING_SEMAPHORE;
+ ctx->obtain_status = RTEMS_OBJECT_WAS_DELETED;
+ break;
+ }
+
+ case RtemsSemReqDelete_Pre_Id_Simple: {
+ /*
+ * While the ``id`` parameter is associated with a simple binary
+ * semaphore.
+ */
+ ctx->attribute_set |= RTEMS_SIMPLE_BINARY_SEMAPHORE;
+ ctx->obtain_status = RTEMS_OBJECT_WAS_DELETED;
+ break;
+ }
+
+ case RtemsSemReqDelete_Pre_Id_Binary: {
+ /*
+ * While the ``id`` parameter is associated with a binary semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE;
+ break;
+ }
+
+ case RtemsSemReqDelete_Pre_Id_PrioCeiling: {
+ /*
+ * While the ``id`` parameter is associated with a priority ceiling
+ * semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY_CEILING;
+ break;
+ }
+
+ case RtemsSemReqDelete_Pre_Id_PrioInherit: {
+ /*
+ * While the ``id`` parameter is associated with a priority inheritance
+ * semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY;
+ break;
+ }
+
+ case RtemsSemReqDelete_Pre_Id_MrsP: {
+ /*
+ * While the ``id`` parameter is associated with a MrsP semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING;
+ break;
+ }
+
+ case RtemsSemReqDelete_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqDelete_Pre_Discipline_Prepare(
+ RtemsSemReqDelete_Context *ctx,
+ RtemsSemReqDelete_Pre_Discipline state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqDelete_Pre_Discipline_FIFO: {
+ /*
+ * While the semaphore uses the FIFO task wait queue discipline.
+ */
+ ctx->attribute_set |= RTEMS_FIFO;
+ break;
+ }
+
+ case RtemsSemReqDelete_Pre_Discipline_Priority: {
+ /*
+ * While the semaphore uses the priority task wait queue discipline.
+ */
+ ctx->attribute_set |= RTEMS_PRIORITY;
+ break;
+ }
+
+ case RtemsSemReqDelete_Pre_Discipline_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqDelete_Pre_State_Prepare(
+ RtemsSemReqDelete_Context *ctx,
+ RtemsSemReqDelete_Pre_State state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqDelete_Pre_State_GtZeroOrNoOwner: {
+ /*
+ * While the semaphore has a count greater than zero or no owner.
+ */
+ ctx->blocked = false;
+ ctx->count = 1;
+ break;
+ }
+
+ case RtemsSemReqDelete_Pre_State_Zero: {
+ /*
+ * While the semaphore has a count of zero or an owner.
+ */
+ ctx->blocked = false;
+ ctx->count = 0;
+ break;
+ }
+
+ case RtemsSemReqDelete_Pre_State_Blocked: {
+ /*
+ * While the semaphore has tasks blocked on the semaphore.
+ */
+ ctx->blocked = true;
+ ctx->count = 0;
+ break;
+ }
+
+ case RtemsSemReqDelete_Pre_State_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqDelete_Post_Status_Check(
+ RtemsSemReqDelete_Context *ctx,
+ RtemsSemReqDelete_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqDelete_Post_Status_Ok: {
+ /*
+ * The return status of rtems_semaphore_delete() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ ctx->semaphore_id = 0;
+ T_rsc_success( ctx->delete_status );
+ break;
+ }
+
+ case RtemsSemReqDelete_Post_Status_InvId: {
+ /*
+ * The return status of rtems_semaphore_delete() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->delete_status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsSemReqDelete_Post_Status_InUse: {
+ /*
+ * The return status of rtems_semaphore_delete() shall be
+ * RTEMS_RESOURCE_IN_USE.
+ */
+ T_rsc( ctx->delete_status, RTEMS_RESOURCE_IN_USE );
+ break;
+ }
+
+ case RtemsSemReqDelete_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqDelete_Post_Name_Check(
+ RtemsSemReqDelete_Context *ctx,
+ RtemsSemReqDelete_Post_Name state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ switch ( state ) {
+ case RtemsSemReqDelete_Post_Name_Valid: {
+ /*
+ * The unique object name shall identify a semaphore.
+ */
+ id = 0;
+ sc = rtems_semaphore_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc_success( sc );
+ T_eq_u32( id, ctx->semaphore_id );
+ break;
+ }
+
+ case RtemsSemReqDelete_Post_Name_Invalid: {
+ /*
+ * The unique object name shall not identify a semaphore.
+ */
+ sc = rtems_semaphore_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsSemReqDelete_Post_Name_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqDelete_Post_Flush_Check(
+ RtemsSemReqDelete_Context *ctx,
+ RtemsSemReqDelete_Post_Flush state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqDelete_Post_Flush_FIFO: {
+ /*
+ * Tasks waiting at the semaphore shall be unblocked in FIFO order.
+ */
+ T_eq_u32( ctx->worker_counter[ 0 ], 1 );
+ T_eq_u32( ctx->worker_counter[ 1 ], 2 );
+ break;
+ }
+
+ case RtemsSemReqDelete_Post_Flush_Priority: {
+ /*
+ * Tasks waiting at the semaphore shall be unblocked in priority order.
+ */
+ T_eq_u32( ctx->worker_counter[ 0 ], 2 );
+ T_eq_u32( ctx->worker_counter[ 1 ], 1 );
+ break;
+ }
+
+ case RtemsSemReqDelete_Post_Flush_No: {
+ /*
+ * Tasks waiting at the semaphore shall remain blocked.
+ */
+ T_eq_u32( ctx->worker_counter[ 0 ], 0 );
+ T_eq_u32( ctx->worker_counter[ 1 ], 0 );
+ break;
+ }
+
+ case RtemsSemReqDelete_Post_Flush_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqDelete_Setup( RtemsSemReqDelete_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->worker_id[ 0 ] = CreateTask( "WRK0", PRIO_HIGH );
+ StartTask( ctx->worker_id[ 0 ], WorkerZero, ctx );
+ ctx->worker_id[ 1 ] = CreateTask( "WRK1", PRIO_VERY_HIGH );
+ StartTask( ctx->worker_id[ 1 ], WorkerOne, ctx );
+}
+
+static void RtemsSemReqDelete_Setup_Wrap( void *arg )
+{
+ RtemsSemReqDelete_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqDelete_Setup( ctx );
+}
+
+static void RtemsSemReqDelete_Teardown( RtemsSemReqDelete_Context *ctx )
+{
+ size_t i;
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( ctx->worker_id ); ++i ) {
+ DeleteTask( ctx->worker_id[ i ] );
+ }
+
+ RestoreRunnerPriority();
+}
+
+static void RtemsSemReqDelete_Teardown_Wrap( void *arg )
+{
+ RtemsSemReqDelete_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqDelete_Teardown( ctx );
+}
+
+static void RtemsSemReqDelete_Prepare( RtemsSemReqDelete_Context *ctx )
+{
+ ctx->counter = 0;
+ ctx->worker_counter[ 0 ] = 0;
+ ctx->worker_counter[ 1 ] = 0;
+ ctx->attribute_set = RTEMS_DEFAULT_ATTRIBUTES;
+ ctx->valid_id = true;
+ ctx->obtain_status = RTEMS_SUCCESSFUL;
+}
+
+static void RtemsSemReqDelete_Action( RtemsSemReqDelete_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_create(
+ NAME,
+ ctx->count,
+ ctx->attribute_set,
+ PRIO_ULTRA_HIGH,
+ &ctx->semaphore_id
+ );
+ T_rsc_success( sc );
+
+ if ( ctx->blocked ) {
+ WakeUp( ctx, 0 );
+ WakeUp( ctx, 1 );
+ }
+
+ if ( ctx->valid_id ) {
+ ctx->id = ctx->semaphore_id;
+ } else {
+ ctx->id = 0;
+ }
+
+ ctx->delete_status = rtems_semaphore_delete( ctx->id );
+}
+
+static void RtemsSemReqDelete_Cleanup( RtemsSemReqDelete_Context *ctx )
+{
+ if ( ctx->semaphore_id != 0 ) {
+ rtems_status_code sc;
+
+ if ( ctx->count == 0 ) {
+ sc = rtems_semaphore_release( ctx->semaphore_id );
+ T_rsc_success( sc );
+ }
+
+ sc = rtems_semaphore_delete( ctx->semaphore_id );
+ T_rsc_success( sc );
+
+ ctx->semaphore_id = 0;
+ }
+}
+
+static const RtemsSemReqDelete_Entry
+RtemsSemReqDelete_Entries[] = {
+ { 0, 0, 0, 0, RtemsSemReqDelete_Post_Status_Ok,
+ RtemsSemReqDelete_Post_Name_Invalid, RtemsSemReqDelete_Post_Flush_No },
+ { 0, 0, 0, 0, RtemsSemReqDelete_Post_Status_InUse,
+ RtemsSemReqDelete_Post_Name_Valid, RtemsSemReqDelete_Post_Flush_No },
+ { 1, 0, 0, 0, RtemsSemReqDelete_Post_Status_NA,
+ RtemsSemReqDelete_Post_Name_NA, RtemsSemReqDelete_Post_Flush_NA },
+ { 0, 0, 0, 0, RtemsSemReqDelete_Post_Status_InvId,
+ RtemsSemReqDelete_Post_Name_Valid, RtemsSemReqDelete_Post_Flush_No },
+ { 0, 0, 0, 0, RtemsSemReqDelete_Post_Status_Ok,
+ RtemsSemReqDelete_Post_Name_Invalid, RtemsSemReqDelete_Post_Flush_FIFO },
+ { 0, 0, 0, 0, RtemsSemReqDelete_Post_Status_Ok,
+ RtemsSemReqDelete_Post_Name_Invalid, RtemsSemReqDelete_Post_Flush_Priority }
+};
+
+static const uint8_t
+RtemsSemReqDelete_Map[] = {
+ 3, 3, 3, 3, 3, 3, 0, 0, 4, 0, 0, 5, 0, 0, 4, 0, 0, 5, 0, 1, 1, 0, 1, 1, 2, 2,
+ 2, 0, 1, 1, 2, 2, 2, 0, 1, 1, 2, 2, 2, 0, 1, 1
+};
+
+static size_t RtemsSemReqDelete_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsSemReqDelete_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsSemReqDelete_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSemReqDelete_Fixture = {
+ .setup = RtemsSemReqDelete_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsSemReqDelete_Teardown_Wrap,
+ .scope = RtemsSemReqDelete_Scope,
+ .initial_context = &RtemsSemReqDelete_Instance
+};
+
+static inline RtemsSemReqDelete_Entry RtemsSemReqDelete_PopEntry(
+ RtemsSemReqDelete_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSemReqDelete_Entries[
+ RtemsSemReqDelete_Map[ index ]
+ ];
+}
+
+static void RtemsSemReqDelete_TestVariant( RtemsSemReqDelete_Context *ctx )
+{
+ RtemsSemReqDelete_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSemReqDelete_Pre_Discipline_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsSemReqDelete_Pre_State_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsSemReqDelete_Action( ctx );
+ RtemsSemReqDelete_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsSemReqDelete_Post_Name_Check( ctx, ctx->Map.entry.Post_Name );
+ RtemsSemReqDelete_Post_Flush_Check( ctx, ctx->Map.entry.Post_Flush );
+}
+
+/**
+ * @fn void T_case_body_RtemsSemReqDelete( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsSemReqDelete, &RtemsSemReqDelete_Fixture )
+{
+ RtemsSemReqDelete_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsSemReqDelete_Pre_Id_NoObj;
+ ctx->Map.pcs[ 0 ] < RtemsSemReqDelete_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsSemReqDelete_Pre_Discipline_FIFO;
+ ctx->Map.pcs[ 1 ] < RtemsSemReqDelete_Pre_Discipline_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsSemReqDelete_Pre_State_GtZeroOrNoOwner;
+ ctx->Map.pcs[ 2 ] < RtemsSemReqDelete_Pre_State_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ ctx->Map.entry = RtemsSemReqDelete_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsSemReqDelete_Prepare( ctx );
+ RtemsSemReqDelete_TestVariant( ctx );
+ RtemsSemReqDelete_Cleanup( ctx );
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sem-flush.c b/testsuites/validation/tc-sem-flush.c
new file mode 100644
index 0000000000..4fb2027354
--- /dev/null
+++ b/testsuites/validation/tc-sem-flush.c
@@ -0,0 +1,629 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSemReqFlush
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include "tr-tq-flush-fifo.h"
+#include "tr-tq-flush-priority-inherit.h"
+#include "tr-tq-flush-priority.h"
+#include "tx-support.h"
+#include "tx-thread-queue.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSemReqFlush spec:/rtems/sem/req/flush
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSemReqFlush_Pre_Class_Counting,
+ RtemsSemReqFlush_Pre_Class_Simple,
+ RtemsSemReqFlush_Pre_Class_Binary,
+ RtemsSemReqFlush_Pre_Class_PrioCeiling,
+ RtemsSemReqFlush_Pre_Class_PrioInherit,
+ RtemsSemReqFlush_Pre_Class_MrsP,
+ RtemsSemReqFlush_Pre_Class_NA
+} RtemsSemReqFlush_Pre_Class;
+
+typedef enum {
+ RtemsSemReqFlush_Pre_Discipline_FIFO,
+ RtemsSemReqFlush_Pre_Discipline_Priority,
+ RtemsSemReqFlush_Pre_Discipline_NA
+} RtemsSemReqFlush_Pre_Discipline;
+
+typedef enum {
+ RtemsSemReqFlush_Pre_Id_Valid,
+ RtemsSemReqFlush_Pre_Id_Invalid,
+ RtemsSemReqFlush_Pre_Id_NA
+} RtemsSemReqFlush_Pre_Id;
+
+typedef enum {
+ RtemsSemReqFlush_Post_Action_InvId,
+ RtemsSemReqFlush_Post_Action_NotDef,
+ RtemsSemReqFlush_Post_Action_FlushFIFO,
+ RtemsSemReqFlush_Post_Action_FlushPriority,
+ RtemsSemReqFlush_Post_Action_FlushPriorityCeiling,
+ RtemsSemReqFlush_Post_Action_FlushPriorityInherit,
+ RtemsSemReqFlush_Post_Action_NA
+} RtemsSemReqFlush_Post_Action;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Class_NA : 1;
+ uint8_t Pre_Discipline_NA : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Post_Action : 3;
+} RtemsSemReqFlush_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/sem/req/flush test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the thread queue test context.
+ */
+ TQContext tq_ctx;
+
+ /**
+ * @brief This member specifies if the attribute set of the semaphore.
+ */
+ rtems_attribute attribute_set;
+
+ /**
+ * @brief This member specifies if the initial count of the semaphore.
+ */
+ uint32_t initial_count;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 3 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSemReqFlush_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSemReqFlush_Context;
+
+static RtemsSemReqFlush_Context
+ RtemsSemReqFlush_Instance;
+
+static const char * const RtemsSemReqFlush_PreDesc_Class[] = {
+ "Counting",
+ "Simple",
+ "Binary",
+ "PrioCeiling",
+ "PrioInherit",
+ "MrsP",
+ "NA"
+};
+
+static const char * const RtemsSemReqFlush_PreDesc_Discipline[] = {
+ "FIFO",
+ "Priority",
+ "NA"
+};
+
+static const char * const RtemsSemReqFlush_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const * const RtemsSemReqFlush_PreDesc[] = {
+ RtemsSemReqFlush_PreDesc_Class,
+ RtemsSemReqFlush_PreDesc_Discipline,
+ RtemsSemReqFlush_PreDesc_Id,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+typedef RtemsSemReqFlush_Context Context;
+
+static void EnqueuePrepare( TQContext *tq_ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_obtain(
+ tq_ctx->thread_queue_id,
+ RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+ T_rsc_success( sc );
+}
+
+static Status_Control Enqueue( TQContext *tq_ctx, TQWait wait )
+{
+ rtems_status_code sc;
+
+ (void) wait;
+ sc = rtems_semaphore_obtain(
+ tq_ctx->thread_queue_id,
+ RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+ T_rsc( sc, RTEMS_UNSATISFIED );
+
+ return STATUS_BUILD( STATUS_SUCCESSFUL, 0 );
+}
+
+static uint32_t Flush( TQContext *tq_ctx, uint32_t thread_count, bool all )
+{
+ rtems_status_code sc;
+
+ (void) all;
+
+ sc = rtems_semaphore_flush( tq_ctx->thread_queue_id );
+ T_rsc_success( sc );
+
+ return thread_count;
+}
+
+static void RtemsSemReqFlush_Pre_Class_Prepare(
+ RtemsSemReqFlush_Context *ctx,
+ RtemsSemReqFlush_Pre_Class state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqFlush_Pre_Class_Counting: {
+ /*
+ * While the semaphore object is a counting semaphore.
+ */
+ ctx->attribute_set |= RTEMS_COUNTING_SEMAPHORE;
+ ctx->initial_count = 0;
+ ctx->tq_ctx.enqueue_prepare = TQDoNothing;
+ ctx->tq_ctx.enqueue_done = TQDoNothing;
+ break;
+ }
+
+ case RtemsSemReqFlush_Pre_Class_Simple: {
+ /*
+ * While the semaphore object is a simple binary semaphore.
+ */
+ ctx->attribute_set |= RTEMS_SIMPLE_BINARY_SEMAPHORE;
+ ctx->initial_count = 0;
+ ctx->tq_ctx.enqueue_prepare = TQDoNothing;
+ ctx->tq_ctx.enqueue_done = TQDoNothing;
+ break;
+ }
+
+ case RtemsSemReqFlush_Pre_Class_Binary: {
+ /*
+ * While the semaphore object is a binary semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE;
+ ctx->initial_count = 1;
+ ctx->tq_ctx.enqueue_prepare = EnqueuePrepare;
+ ctx->tq_ctx.enqueue_done = TQEnqueueDoneDefault;
+ break;
+ }
+
+ case RtemsSemReqFlush_Pre_Class_PrioCeiling: {
+ /*
+ * While the semaphore object is a priority ceiling semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY_CEILING;
+ ctx->initial_count = 1;
+ ctx->tq_ctx.enqueue_prepare = EnqueuePrepare;
+ ctx->tq_ctx.enqueue_done = TQEnqueueDoneDefault;
+ break;
+ }
+
+ case RtemsSemReqFlush_Pre_Class_PrioInherit: {
+ /*
+ * While the semaphore object is a priority inheritance semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY;
+ ctx->initial_count = 1;
+ ctx->tq_ctx.enqueue_prepare = EnqueuePrepare;
+ ctx->tq_ctx.enqueue_done = TQEnqueueDoneDefault;
+ break;
+ }
+
+ case RtemsSemReqFlush_Pre_Class_MrsP: {
+ /*
+ * While the semaphore object is a MrsP semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING;
+ ctx->initial_count = 1;
+ ctx->tq_ctx.enqueue_prepare = EnqueuePrepare;
+ ctx->tq_ctx.enqueue_done = TQEnqueueDoneDefault;
+ break;
+ }
+
+ case RtemsSemReqFlush_Pre_Class_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqFlush_Pre_Discipline_Prepare(
+ RtemsSemReqFlush_Context *ctx,
+ RtemsSemReqFlush_Pre_Discipline state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqFlush_Pre_Discipline_FIFO: {
+ /*
+ * While the semaphore uses the FIFO task wait queue discipline.
+ */
+ ctx->attribute_set |= RTEMS_FIFO;
+ ctx->tq_ctx.discipline = TQ_FIFO;
+ break;
+ }
+
+ case RtemsSemReqFlush_Pre_Discipline_Priority: {
+ /*
+ * While the semaphore uses the priority task wait queue discipline.
+ */
+ ctx->attribute_set |= RTEMS_PRIORITY;
+ ctx->tq_ctx.discipline = TQ_PRIORITY;
+ break;
+ }
+
+ case RtemsSemReqFlush_Pre_Discipline_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqFlush_Pre_Id_Prepare(
+ RtemsSemReqFlush_Context *ctx,
+ RtemsSemReqFlush_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqFlush_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is associated with the semaphore.
+ */
+ /* Nothing to prepare */
+ break;
+ }
+
+ case RtemsSemReqFlush_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is not associated with a semaphore.
+ */
+ /* Nothing to prepare */
+ break;
+ }
+
+ case RtemsSemReqFlush_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqFlush_Post_Action_Check(
+ RtemsSemReqFlush_Context *ctx,
+ RtemsSemReqFlush_Post_Action state
+)
+{
+ rtems_status_code sc;
+
+ switch ( state ) {
+ case RtemsSemReqFlush_Post_Action_InvId: {
+ /*
+ * The return status of rtems_semaphore_flush() shall be
+ * RTEMS_INVALID_ID.
+ */
+ sc = rtems_semaphore_flush( 0xffffffff );
+ T_rsc( sc, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsSemReqFlush_Post_Action_NotDef: {
+ /*
+ * The return status of rtems_semaphore_flush() shall be
+ * RTEMS_NOT_DEFINED.
+ */
+ sc = rtems_semaphore_flush( ctx->tq_ctx.thread_queue_id );
+ T_rsc( sc, RTEMS_NOT_DEFINED );
+ break;
+ }
+
+ case RtemsSemReqFlush_Post_Action_FlushFIFO: {
+ /*
+ * The calling task shall flush the semaphore as specified by
+ * spec:/score/tq/req/flush-fifo.
+ */
+ ScoreTqReqFlushFifo_Run( &ctx->tq_ctx, false );
+ break;
+ }
+
+ case RtemsSemReqFlush_Post_Action_FlushPriority: {
+ /*
+ * The calling task shall flush the semaphore as specified by
+ * spec:/score/tq/req/flush-priority.
+ */
+ ScoreTqReqFlushPriority_Run( &ctx->tq_ctx, true );
+ break;
+ }
+
+ case RtemsSemReqFlush_Post_Action_FlushPriorityCeiling: {
+ /*
+ * The calling task shall flush the semaphore as specified by
+ * spec:/score/tq/req/flush-priority.
+ */
+ ScoreTqReqFlushPriority_Run( &ctx->tq_ctx, false );
+ break;
+ }
+
+ case RtemsSemReqFlush_Post_Action_FlushPriorityInherit: {
+ /*
+ * The calling task shall flush the semaphore as specified by
+ * spec:/score/tq/req/flush-priority-inherit.
+ */
+ ScoreTqReqFlushPriorityInherit_Run( &ctx->tq_ctx );
+ break;
+ }
+
+ case RtemsSemReqFlush_Post_Action_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqFlush_Setup( RtemsSemReqFlush_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->tq_ctx.enqueue = Enqueue;
+ ctx->tq_ctx.flush = Flush;
+ ctx->tq_ctx.surrender = TQSurrenderClassicSem;
+ ctx->tq_ctx.convert_status = TQConvertStatusClassic;
+ TQInitialize( &ctx->tq_ctx );
+}
+
+static void RtemsSemReqFlush_Setup_Wrap( void *arg )
+{
+ RtemsSemReqFlush_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqFlush_Setup( ctx );
+}
+
+static void RtemsSemReqFlush_Teardown( RtemsSemReqFlush_Context *ctx )
+{
+ TQDestroy( &ctx->tq_ctx );
+}
+
+static void RtemsSemReqFlush_Teardown_Wrap( void *arg )
+{
+ RtemsSemReqFlush_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqFlush_Teardown( ctx );
+}
+
+static void RtemsSemReqFlush_Prepare( RtemsSemReqFlush_Context *ctx )
+{
+ ctx->attribute_set = RTEMS_DEFAULT_ATTRIBUTES;
+}
+
+static void RtemsSemReqFlush_Action( RtemsSemReqFlush_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_create(
+ NAME,
+ ctx->initial_count,
+ ctx->attribute_set,
+ PRIO_ULTRA_HIGH,
+ &ctx->tq_ctx.thread_queue_id
+ );
+ T_rsc_success( sc );
+}
+
+static void RtemsSemReqFlush_Cleanup( RtemsSemReqFlush_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_delete( ctx->tq_ctx.thread_queue_id );
+ T_rsc_success( sc );
+}
+
+static const RtemsSemReqFlush_Entry
+RtemsSemReqFlush_Entries[] = {
+ { 0, 1, 1, 0, RtemsSemReqFlush_Post_Action_InvId },
+ { 0, 0, 0, 0, RtemsSemReqFlush_Post_Action_FlushFIFO },
+ { 0, 0, 0, 0, RtemsSemReqFlush_Post_Action_FlushPriority },
+ { 1, 0, 0, 0, RtemsSemReqFlush_Post_Action_NA },
+ { 0, 0, 0, 0, RtemsSemReqFlush_Post_Action_FlushPriorityCeiling },
+ { 0, 0, 0, 0, RtemsSemReqFlush_Post_Action_FlushPriorityInherit },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, RtemsSemReqFlush_Post_Action_NotDef }
+#else
+ { 1, 0, 0, 0, RtemsSemReqFlush_Post_Action_NA }
+#endif
+};
+
+static const uint8_t
+RtemsSemReqFlush_Map[] = {
+ 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 3, 0, 4, 0, 3, 0, 5, 0, 3, 0, 6, 0
+};
+
+static size_t RtemsSemReqFlush_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsSemReqFlush_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsSemReqFlush_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSemReqFlush_Fixture = {
+ .setup = RtemsSemReqFlush_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsSemReqFlush_Teardown_Wrap,
+ .scope = RtemsSemReqFlush_Scope,
+ .initial_context = &RtemsSemReqFlush_Instance
+};
+
+static inline RtemsSemReqFlush_Entry RtemsSemReqFlush_PopEntry(
+ RtemsSemReqFlush_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSemReqFlush_Entries[
+ RtemsSemReqFlush_Map[ index ]
+ ];
+}
+
+static void RtemsSemReqFlush_SetPreConditionStates(
+ RtemsSemReqFlush_Context *ctx
+)
+{
+ if ( ctx->Map.entry.Pre_Class_NA ) {
+ ctx->Map.pcs[ 0 ] = RtemsSemReqFlush_Pre_Class_NA;
+ } else {
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Discipline_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsSemReqFlush_Pre_Discipline_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+}
+
+static void RtemsSemReqFlush_TestVariant( RtemsSemReqFlush_Context *ctx )
+{
+ RtemsSemReqFlush_Pre_Class_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSemReqFlush_Pre_Discipline_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsSemReqFlush_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsSemReqFlush_Action( ctx );
+ RtemsSemReqFlush_Post_Action_Check( ctx, ctx->Map.entry.Post_Action );
+}
+
+/**
+ * @fn void T_case_body_RtemsSemReqFlush( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsSemReqFlush, &RtemsSemReqFlush_Fixture )
+{
+ RtemsSemReqFlush_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsSemReqFlush_Pre_Class_Counting;
+ ctx->Map.pci[ 0 ] < RtemsSemReqFlush_Pre_Class_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsSemReqFlush_Pre_Discipline_FIFO;
+ ctx->Map.pci[ 1 ] < RtemsSemReqFlush_Pre_Discipline_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsSemReqFlush_Pre_Id_Valid;
+ ctx->Map.pci[ 2 ] < RtemsSemReqFlush_Pre_Id_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ ctx->Map.entry = RtemsSemReqFlush_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsSemReqFlush_SetPreConditionStates( ctx );
+ RtemsSemReqFlush_Prepare( ctx );
+ RtemsSemReqFlush_TestVariant( ctx );
+ RtemsSemReqFlush_Cleanup( ctx );
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sem-ident.c b/testsuites/validation/tc-sem-ident.c
new file mode 100644
index 0000000000..abeddfa5e2
--- /dev/null
+++ b/testsuites/validation/tc-sem-ident.c
@@ -0,0 +1,121 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSemValIdent
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSemValIdent spec:/rtems/sem/val/ident
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Test the rtems_semaphore_ident() directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API semaphore
+ * class objects defined by spec:/rtems/req/ident.
+ *
+ * @{
+ */
+
+#define NAME_LOCAL_OBJECT rtems_build_name( 'S', 'E', 'M', 'A' )
+
+static rtems_status_code ClassicSemIdentAction(
+ rtems_name name,
+ uint32_t node,
+ rtems_id *id
+)
+{
+ return rtems_semaphore_ident( name, node, id );
+}
+
+/**
+ * @brief Run the generic object identification tests for Classic API semaphore
+ * class objects defined by spec:/rtems/req/ident.
+ */
+static void RtemsSemValIdent_Action_0( void )
+{
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_semaphore_create(
+ NAME_LOCAL_OBJECT,
+ 0,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ 0,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdent_Run(
+ id_local_object,
+ NAME_LOCAL_OBJECT,
+ ClassicSemIdentAction
+ );
+
+ sc = rtems_semaphore_delete( id_local_object );
+ T_rsc_success( sc );
+}
+
+/**
+ * @fn void T_case_body_RtemsSemValIdent( void )
+ */
+T_TEST_CASE( RtemsSemValIdent )
+{
+ RtemsSemValIdent_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sem-mrsp-obtain.c b/testsuites/validation/tc-sem-mrsp-obtain.c
new file mode 100644
index 0000000000..e7d50c34da
--- /dev/null
+++ b/testsuites/validation/tc-sem-mrsp-obtain.c
@@ -0,0 +1,1202 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSemReqMrspObtain
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+#include <rtems/score/percpu.h>
+#include <rtems/score/threadimpl.h>
+
+#include "tx-support.h"
+#include "tx-thread-queue.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSemReqMrspObtain spec:/rtems/sem/req/mrsp-obtain
+ *
+ * @ingroup TestsuitesValidationSmpOnly0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSemReqMrspObtain_Pre_Home_Idle,
+ RtemsSemReqMrspObtain_Pre_Home_Task,
+ RtemsSemReqMrspObtain_Pre_Home_TaskIdle,
+ RtemsSemReqMrspObtain_Pre_Home_Second,
+ RtemsSemReqMrspObtain_Pre_Home_SecondIdle,
+ RtemsSemReqMrspObtain_Pre_Home_NA
+} RtemsSemReqMrspObtain_Pre_Home;
+
+typedef enum {
+ RtemsSemReqMrspObtain_Pre_Helping_Idle,
+ RtemsSemReqMrspObtain_Pre_Helping_Task,
+ RtemsSemReqMrspObtain_Pre_Helping_Helping,
+ RtemsSemReqMrspObtain_Pre_Helping_HelpingIdle,
+ RtemsSemReqMrspObtain_Pre_Helping_Third,
+ RtemsSemReqMrspObtain_Pre_Helping_ThirdIdle,
+ RtemsSemReqMrspObtain_Pre_Helping_NA
+} RtemsSemReqMrspObtain_Pre_Helping;
+
+typedef enum {
+ RtemsSemReqMrspObtain_Pre_PriorityHome_None,
+ RtemsSemReqMrspObtain_Pre_PriorityHome_NewHigh,
+ RtemsSemReqMrspObtain_Pre_PriorityHome_NewEqual,
+ RtemsSemReqMrspObtain_Pre_PriorityHome_SecondHigh,
+ RtemsSemReqMrspObtain_Pre_PriorityHome_SecondEqual,
+ RtemsSemReqMrspObtain_Pre_PriorityHome_SecondLow,
+ RtemsSemReqMrspObtain_Pre_PriorityHome_NA
+} RtemsSemReqMrspObtain_Pre_PriorityHome;
+
+typedef enum {
+ RtemsSemReqMrspObtain_Pre_PriorityHelping_None,
+ RtemsSemReqMrspObtain_Pre_PriorityHelping_Helping,
+ RtemsSemReqMrspObtain_Pre_PriorityHelping_ThirdHigh,
+ RtemsSemReqMrspObtain_Pre_PriorityHelping_ThirdEqual,
+ RtemsSemReqMrspObtain_Pre_PriorityHelping_ThirdLow,
+ RtemsSemReqMrspObtain_Pre_PriorityHelping_NA
+} RtemsSemReqMrspObtain_Pre_PriorityHelping;
+
+typedef enum {
+ RtemsSemReqMrspObtain_Post_Home_Task,
+ RtemsSemReqMrspObtain_Post_Home_TaskIdle,
+ RtemsSemReqMrspObtain_Post_Home_Second,
+ RtemsSemReqMrspObtain_Post_Home_SecondIdle,
+ RtemsSemReqMrspObtain_Post_Home_NA
+} RtemsSemReqMrspObtain_Post_Home;
+
+typedef enum {
+ RtemsSemReqMrspObtain_Post_Helping_Idle,
+ RtemsSemReqMrspObtain_Post_Helping_Task,
+ RtemsSemReqMrspObtain_Post_Helping_TaskIdle,
+ RtemsSemReqMrspObtain_Post_Helping_Helping,
+ RtemsSemReqMrspObtain_Post_Helping_HelpingIdle,
+ RtemsSemReqMrspObtain_Post_Helping_Third,
+ RtemsSemReqMrspObtain_Post_Helping_ThirdIdle,
+ RtemsSemReqMrspObtain_Post_Helping_NA
+} RtemsSemReqMrspObtain_Post_Helping;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Home_NA : 1;
+ uint16_t Pre_Helping_NA : 1;
+ uint16_t Pre_PriorityHome_NA : 1;
+ uint16_t Pre_PriorityHelping_NA : 1;
+ uint16_t Post_Home : 3;
+ uint16_t Post_Helping : 3;
+} RtemsSemReqMrspObtain_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/sem/req/mrsp-obtain test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the thread queue test context.
+ */
+ TQContext tq_ctx;
+
+ /**
+ * @brief This member contains the MrsP semaphore to obtain.
+ */
+ rtems_id sema_id;
+
+ /**
+ * @brief This member specifies the scheduler on which the task executes.
+ */
+ rtems_id task_scheduler;
+
+ /**
+ * @brief If this member is true, then the task shall already own a MrsP
+ * semaphore.
+ */
+ bool task_owns_mrsp_semaphore;
+
+ /**
+ * @brief If this member is true, then an idle task shall execute on
+ * scheduler A.
+ */
+ bool scheduler_a_idle;
+
+ /**
+ * @brief If this member is true, then an idle task shall execute on
+ * scheduler B.
+ */
+ bool scheduler_b_idle;
+
+ /**
+ * @brief If this member is true, then the second task shall be active.
+ */
+ bool second_active;
+
+ /**
+ * @brief This member specifies the priority of the second task.
+ */
+ rtems_task_priority second_priority;
+
+ /**
+ * @brief If this member is true, then the third task shall be active.
+ */
+ bool third_active;
+
+ /**
+ * @brief This member specifies the priority of the third task.
+ */
+ rtems_task_priority third_priority;
+
+ /**
+ * @brief If this member is true, then the helping task shall be active.
+ */
+ bool helping_active;
+
+ /**
+ * @brief This member specifies the priority of the MrsP semaphore with
+ * respect to scheduler A.
+ */
+ rtems_task_priority sema_priority_scheduler_a;
+
+ /**
+ * @brief This member specifies the priority of the MrsP semaphore with
+ * respect to scheduler B.
+ */
+ rtems_task_priority sema_priority_scheduler_b;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 4 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSemReqMrspObtain_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSemReqMrspObtain_Context;
+
+static RtemsSemReqMrspObtain_Context
+ RtemsSemReqMrspObtain_Instance;
+
+static const char * const RtemsSemReqMrspObtain_PreDesc_Home[] = {
+ "Idle",
+ "Task",
+ "TaskIdle",
+ "Second",
+ "SecondIdle",
+ "NA"
+};
+
+static const char * const RtemsSemReqMrspObtain_PreDesc_Helping[] = {
+ "Idle",
+ "Task",
+ "Helping",
+ "HelpingIdle",
+ "Third",
+ "ThirdIdle",
+ "NA"
+};
+
+static const char * const RtemsSemReqMrspObtain_PreDesc_PriorityHome[] = {
+ "None",
+ "NewHigh",
+ "NewEqual",
+ "SecondHigh",
+ "SecondEqual",
+ "SecondLow",
+ "NA"
+};
+
+static const char * const RtemsSemReqMrspObtain_PreDesc_PriorityHelping[] = {
+ "None",
+ "Helping",
+ "ThirdHigh",
+ "ThirdEqual",
+ "ThirdLow",
+ "NA"
+};
+
+static const char * const * const RtemsSemReqMrspObtain_PreDesc[] = {
+ RtemsSemReqMrspObtain_PreDesc_Home,
+ RtemsSemReqMrspObtain_PreDesc_Helping,
+ RtemsSemReqMrspObtain_PreDesc_PriorityHome,
+ RtemsSemReqMrspObtain_PreDesc_PriorityHelping,
+ NULL
+};
+
+#define HELPING TQ_BLOCKER_A
+
+#define SECOND TQ_BLOCKER_B
+
+#define THIRD TQ_BLOCKER_C
+
+#define ASSISTANT TQ_BLOCKER_D
+
+#define MOVER TQ_BLOCKER_E
+
+typedef RtemsSemReqMrspObtain_Context Context;
+
+static void SetSemaphorePriority(
+ rtems_id id,
+ rtems_task_priority priority_a,
+ rtems_task_priority priority_b
+)
+{
+ rtems_status_code sc;
+ rtems_task_priority priority;
+
+ sc = rtems_semaphore_set_priority(
+ id,
+ SCHEDULER_A_ID,
+ priority_a,
+ &priority
+ );
+ T_rsc_success( sc );
+
+ sc = rtems_semaphore_set_priority(
+ id,
+ SCHEDULER_B_ID,
+ priority_b,
+ &priority
+ );
+ T_rsc_success( sc );
+}
+
+static void MoveToScheduler( Context *ctx, rtems_id scheduler_id )
+{
+ rtems_id other_scheduler_id;
+ uint32_t cpu;
+
+ if ( scheduler_id == SCHEDULER_A_ID ) {
+ other_scheduler_id = SCHEDULER_B_ID;
+ cpu = 0;
+ } else {
+ other_scheduler_id = SCHEDULER_A_ID;
+ cpu = 1;
+ }
+
+ TQSetScheduler( &ctx->tq_ctx, MOVER, other_scheduler_id, PRIO_VERY_HIGH );
+ ctx->tq_ctx.busy_wait[ MOVER ] = true;
+ TQSend( &ctx->tq_ctx, MOVER, TQ_EVENT_BUSY_WAIT );
+ TQWaitForEventsReceived( &ctx->tq_ctx, MOVER );
+ T_eq_u32( rtems_scheduler_get_processor(), cpu );
+ ctx->tq_ctx.busy_wait[ MOVER ] = false;
+ TQWaitForExecutionStop( &ctx->tq_ctx, MOVER );
+}
+
+static void RtemsSemReqMrspObtain_Pre_Home_Prepare(
+ RtemsSemReqMrspObtain_Context *ctx,
+ RtemsSemReqMrspObtain_Pre_Home state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqMrspObtain_Pre_Home_Idle: {
+ /*
+ * While an idle task executes on the processor owned by the home
+ * scheduler of the obtaining task.
+ */
+ ctx->scheduler_a_idle = true;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_Home_Task: {
+ /*
+ * While the obtaining task executes on the processor owned by the home
+ * scheduler of the obtaining task.
+ */
+ ctx->task_scheduler = SCHEDULER_A_ID;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_Home_TaskIdle: {
+ /*
+ * While an idle task on behalf of the obtaining task executes on the
+ * processor owned by the home scheduler of the obtaining task.
+ */
+ ctx->scheduler_a_idle = true;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_Home_Second: {
+ /*
+ * While the second task executes on the processor owned by the home
+ * scheduler of the obtaining task.
+ */
+ ctx->second_active = true;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_Home_SecondIdle: {
+ /*
+ * While an idle task on behalf of the second task executes on the
+ * processor owned by the home scheduler of the obtaining task.
+ */
+ ctx->second_active = true;
+ ctx->scheduler_a_idle = true;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_Home_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqMrspObtain_Pre_Helping_Prepare(
+ RtemsSemReqMrspObtain_Context *ctx,
+ RtemsSemReqMrspObtain_Pre_Helping state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqMrspObtain_Pre_Helping_Idle: {
+ /*
+ * While an idle task executes on the processor owned by the helping
+ * scheduler of the obtaining task.
+ */
+ ctx->scheduler_b_idle = true;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_Helping_Task: {
+ /*
+ * While the obtaining task executes on the processor owned by the
+ * helping scheduler of the obtaining task.
+ */
+ ctx->task_scheduler = SCHEDULER_B_ID;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_Helping_Helping: {
+ /*
+ * While a helping task of the obtaining task executes on the processor
+ * owned by the helping scheduler of the obtaining task.
+ */
+ ctx->task_owns_mrsp_semaphore = true;
+ ctx->helping_active = true;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_Helping_HelpingIdle: {
+ /*
+ * While an idle task on behalf of a helping task of the obtaining task
+ * executes on the processor owned by the helping scheduler of the
+ * obtaining task.
+ */
+ ctx->task_owns_mrsp_semaphore = true;
+ ctx->helping_active = true;
+ ctx->scheduler_b_idle = true;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_Helping_Third: {
+ /*
+ * While the third task executes on the processor owned by the helping
+ * scheduler of the obtaining task.
+ */
+ ctx->third_active = true;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_Helping_ThirdIdle: {
+ /*
+ * While an idle task on behalf of the third task executes on the
+ * processor owned by the helping scheduler of the obtaining task.
+ */
+ ctx->third_active = true;
+ ctx->scheduler_b_idle = true;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_Helping_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqMrspObtain_Pre_PriorityHome_Prepare(
+ RtemsSemReqMrspObtain_Context *ctx,
+ RtemsSemReqMrspObtain_Pre_PriorityHome state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqMrspObtain_Pre_PriorityHome_None: {
+ /*
+ * While no ceiling priority with respect to the home scheduler of the
+ * obtaining task is already available to the task.
+ */
+ ctx->second_priority = PRIO_HIGH;
+ ctx->sema_priority_scheduler_a = PRIO_NORMAL;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_PriorityHome_NewHigh: {
+ /*
+ * While the ceiling priority of the semaphore with respect to the home
+ * scheduler of the obtaining task is higher than the ceiling priorities
+ * already available to the task.
+ */
+ ctx->task_owns_mrsp_semaphore = true;
+ ctx->sema_priority_scheduler_a = PRIO_HIGH;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_PriorityHome_NewEqual: {
+ /*
+ * While the ceiling priority of the semaphore with respect to the home
+ * scheduler of the obtaining task is equal to the ceiling priorities
+ * already available to the task.
+ */
+ ctx->task_owns_mrsp_semaphore = true;
+ ctx->sema_priority_scheduler_a = PRIO_NORMAL;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_PriorityHome_SecondHigh: {
+ /*
+ * While the ceiling priority of the semaphore with respect to the home
+ * scheduler of the obtaining task is higher than the priority of the
+ * second task.
+ */
+ ctx->second_priority = PRIO_HIGH;
+ ctx->sema_priority_scheduler_a = PRIO_VERY_HIGH;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_PriorityHome_SecondEqual: {
+ /*
+ * While the ceiling priority of the semaphore with respect to the home
+ * scheduler of the obtaining task is equal to the priority of the second
+ * task.
+ */
+ ctx->second_priority = PRIO_HIGH;
+ ctx->sema_priority_scheduler_a = PRIO_HIGH;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_PriorityHome_SecondLow: {
+ /*
+ * While the ceiling priority of the semaphore with respect to the home
+ * scheduler of the obtaining task is lower than the priority of the
+ * second task.
+ */
+ ctx->second_priority = PRIO_HIGH;
+ ctx->sema_priority_scheduler_a = PRIO_NORMAL;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_PriorityHome_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqMrspObtain_Pre_PriorityHelping_Prepare(
+ RtemsSemReqMrspObtain_Context *ctx,
+ RtemsSemReqMrspObtain_Pre_PriorityHelping state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqMrspObtain_Pre_PriorityHelping_None: {
+ /*
+ * While no ceiling priority with respect to the helping scheduler of the
+ * obtaining task is already available to the task.
+ */
+ ctx->sema_priority_scheduler_b = PRIO_NORMAL;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_PriorityHelping_Helping: {
+ /*
+ * While ceiling priorities with respect to the helping scheduler of the
+ * obtaining task are already available to the task.
+ */
+ ctx->helping_active = true;
+ ctx->task_owns_mrsp_semaphore = true;
+ ctx->sema_priority_scheduler_b = PRIO_NORMAL;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_PriorityHelping_ThirdHigh: {
+ /*
+ * While the ceiling priority of the semaphore with respect to the
+ * helping scheduler of the obtaining task is higher than the priority of
+ * the third task.
+ */
+ ctx->third_priority = PRIO_LOW;
+ ctx->sema_priority_scheduler_b = PRIO_NORMAL;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_PriorityHelping_ThirdEqual: {
+ /*
+ * While the ceiling priority of the semaphore with respect to the
+ * helping scheduler of the obtaining task is equal to the priority of
+ * the third task.
+ */
+ ctx->third_priority = PRIO_NORMAL;
+ ctx->sema_priority_scheduler_b = PRIO_NORMAL;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_PriorityHelping_ThirdLow: {
+ /*
+ * While the ceiling priority of the semaphore with respect to the
+ * helping scheduler of the obtaining task is lower than the priority of
+ * the third task.
+ */
+ ctx->third_priority = PRIO_HIGH;
+ ctx->sema_priority_scheduler_b = PRIO_NORMAL;
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Pre_PriorityHelping_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqMrspObtain_Post_Home_Check(
+ RtemsSemReqMrspObtain_Context *ctx,
+ RtemsSemReqMrspObtain_Post_Home state
+)
+{
+ const Per_CPU_Control *cpu;
+ const Thread_Control *scheduled;
+ const Scheduler_Node *scheduler_node;
+ uint32_t task_cpu_index;
+
+ cpu = _Per_CPU_Get_by_index( 0 );
+ scheduled = cpu->heir;
+ task_cpu_index = rtems_scheduler_get_processor();
+
+ switch ( state ) {
+ case RtemsSemReqMrspObtain_Post_Home_Task: {
+ /*
+ * The obtaining task shall execute on the processor owned by the home
+ * scheduler of the obtaining task.
+ */
+ T_eq_u32( task_cpu_index, 0 );
+ T_eq_ptr( scheduled, ctx->tq_ctx.runner_tcb );
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Post_Home_TaskIdle: {
+ /*
+ * An idle task on behalf of the obtaining task shall execute on the
+ * processor owned by the home scheduler of the obtaining task.
+ */
+ T_eq_u32( task_cpu_index, 1 );
+ T_true( scheduled->is_idle );
+ scheduler_node = _Thread_Scheduler_get_node_by_index(
+ ctx->tq_ctx.runner_tcb,
+ 0
+ );
+ T_eq_ptr( scheduler_node->user, scheduled );
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Post_Home_Second: {
+ /*
+ * The second task shall execute on the processor owned by the home
+ * scheduler of the obtaining task.
+ */
+ T_eq_u32( task_cpu_index, 1 );
+ T_eq_ptr( scheduled, ctx->tq_ctx.worker_tcb[ SECOND ] );
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Post_Home_SecondIdle: {
+ /*
+ * An idle task on behalf of the second task shall execute on the
+ * processor owned by the home scheduler of the obtaining task.
+ */
+ T_eq_u32( task_cpu_index, 1 );
+ T_true( scheduled->is_idle );
+ scheduler_node = _Thread_Scheduler_get_node_by_index(
+ ctx->tq_ctx.worker_tcb[ SECOND ],
+ 0
+ );
+ T_eq_ptr( scheduler_node->user, scheduled );
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Post_Home_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqMrspObtain_Post_Helping_Check(
+ RtemsSemReqMrspObtain_Context *ctx,
+ RtemsSemReqMrspObtain_Post_Helping state
+)
+{
+ const Per_CPU_Control *cpu;
+ const Thread_Control *scheduled;
+ const Scheduler_Node *scheduler_node;
+ uint32_t task_cpu_index;
+
+ cpu = _Per_CPU_Get_by_index( 1 );
+ scheduled = cpu->heir;
+ task_cpu_index = rtems_scheduler_get_processor();
+
+ switch ( state ) {
+ case RtemsSemReqMrspObtain_Post_Helping_Idle: {
+ /*
+ * An idle task shall execute on the processor owned by the helping
+ * scheduler of the obtaining task.
+ */
+ T_eq_u32( task_cpu_index, 0 );
+ T_true( scheduled->is_idle );
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Post_Helping_Task: {
+ /*
+ * The obtaining task shall execute on the processor owned by the helping
+ * scheduler of the obtaining task.
+ */
+ T_eq_u32( task_cpu_index, 1 );
+ T_eq_ptr( scheduled, ctx->tq_ctx.runner_tcb );
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Post_Helping_TaskIdle: {
+ /*
+ * An idle task on behalf of the obtaining task shall execute on the
+ * processor owned by the helping scheduler of the obtaining task.
+ */
+ T_eq_u32( task_cpu_index, 0 );
+ T_true( scheduled->is_idle );
+ scheduler_node = _Thread_Scheduler_get_node_by_index(
+ ctx->tq_ctx.runner_tcb,
+ 1
+ );
+ T_eq_ptr( scheduler_node->user, ctx->tq_ctx.runner_tcb );
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Post_Helping_Helping: {
+ /*
+ * The helping task shall execute on the processor owned by the helping
+ * scheduler of the obtaining task.
+ */
+ T_eq_u32( task_cpu_index, 0 );
+ T_eq_ptr( scheduled, ctx->tq_ctx.worker_tcb[ HELPING ] );
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Post_Helping_HelpingIdle: {
+ /*
+ * An idle task on behalf of the helping task shall execute on the
+ * processor owned by the helping scheduler of the obtaining task.
+ */
+ T_eq_u32( task_cpu_index, 0 );
+ T_true( scheduled->is_idle );
+ scheduler_node = _Thread_Scheduler_get_node_by_index(
+ ctx->tq_ctx.worker_tcb[ HELPING ],
+ 1
+ );
+ T_eq_ptr( scheduler_node->user, scheduled );
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Post_Helping_Third: {
+ /*
+ * The third task shall execute on the processor owned by the helping
+ * scheduler of the obtaining task.
+ */
+ T_eq_u32( task_cpu_index, 0 );
+ T_eq_ptr( scheduled, ctx->tq_ctx.worker_tcb[ THIRD ] );
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Post_Helping_ThirdIdle: {
+ /*
+ * An idle task on behalf of the third task shall execute on the
+ * processor owned by the helping scheduler of the obtaining task.
+ */
+ T_eq_u32( task_cpu_index, 0 );
+ scheduler_node = _Thread_Scheduler_get_node_by_index(
+ ctx->tq_ctx.worker_tcb[ THIRD ],
+ 1
+ );
+ T_eq_ptr( scheduler_node->user, scheduled );
+ break;
+ }
+
+ case RtemsSemReqMrspObtain_Post_Helping_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqMrspObtain_Setup( RtemsSemReqMrspObtain_Context *ctx )
+{
+ rtems_status_code sc;
+ rtems_id mutex_b;
+ rtems_id mutex_c;
+
+ memset( ctx, 0, sizeof( *ctx ) );
+
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'S', 'E', 'M', 'A' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
+ PRIO_NORMAL,
+ &ctx->sema_id
+ );
+ T_rsc_success( sc );
+
+ ctx->tq_ctx.deadlock = TQ_DEADLOCK_STATUS;
+ ctx->tq_ctx.enqueue_prepare = TQEnqueuePrepareDefault;
+ ctx->tq_ctx.enqueue_done = TQEnqueueDoneDefault;
+ ctx->tq_ctx.enqueue = TQEnqueueClassicSem;
+ ctx->tq_ctx.surrender = TQSurrenderClassicSem;
+ ctx->tq_ctx.get_owner = TQGetOwnerClassicSem;
+ ctx->tq_ctx.convert_status = TQConvertStatusClassic;
+ TQInitialize( &ctx->tq_ctx );
+
+ DeleteMutex( ctx->tq_ctx.mutex_id[ TQ_MUTEX_B ] );
+ DeleteMutex( ctx->tq_ctx.mutex_id[ TQ_MUTEX_C ] );
+
+ mutex_b = 0;
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'T', 'X', 'B' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
+ PRIO_NORMAL,
+ &mutex_b
+ );
+ T_rsc_success( sc );
+
+ mutex_c = 0;
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'T', 'X', 'C' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
+ PRIO_NORMAL,
+ &mutex_c
+ );
+ T_rsc_success( sc );
+
+ ctx->tq_ctx.mutex_id[ TQ_MUTEX_B ] = mutex_b;
+ ctx->tq_ctx.mutex_id[ TQ_MUTEX_C ] = mutex_c;
+
+ TQSetScheduler( &ctx->tq_ctx, HELPING, SCHEDULER_B_ID, PRIO_VERY_LOW );
+ TQSetScheduler( &ctx->tq_ctx, THIRD, SCHEDULER_B_ID, PRIO_NORMAL );
+
+ TQMutexObtain( &ctx->tq_ctx, TQ_MUTEX_A );
+ TQSetScheduler( &ctx->tq_ctx, ASSISTANT, SCHEDULER_B_ID, PRIO_VERY_LOW );
+ TQSendAndWaitForExecutionStop(
+ &ctx->tq_ctx,
+ ASSISTANT,
+ TQ_EVENT_MUTEX_A_OBTAIN
+ );
+
+ SetSemaphorePriority(
+ ctx->tq_ctx.mutex_id[ TQ_MUTEX_B ],
+ PRIO_NORMAL,
+ PRIO_VERY_LOW
+ );
+}
+
+static void RtemsSemReqMrspObtain_Setup_Wrap( void *arg )
+{
+ RtemsSemReqMrspObtain_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqMrspObtain_Setup( ctx );
+}
+
+static void RtemsSemReqMrspObtain_Teardown(
+ RtemsSemReqMrspObtain_Context *ctx
+)
+{
+ TQMutexRelease( &ctx->tq_ctx, TQ_MUTEX_A );
+ TQSendAndWaitForExecutionStop(
+ &ctx->tq_ctx,
+ ASSISTANT,
+ TQ_EVENT_MUTEX_A_RELEASE
+ );
+ TQDestroy( &ctx->tq_ctx );
+ DeleteMutex( ctx->sema_id );
+}
+
+static void RtemsSemReqMrspObtain_Teardown_Wrap( void *arg )
+{
+ RtemsSemReqMrspObtain_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqMrspObtain_Teardown( ctx );
+}
+
+static void RtemsSemReqMrspObtain_Prepare( RtemsSemReqMrspObtain_Context *ctx )
+{
+ ctx->task_scheduler = INVALID_ID;
+ ctx->task_owns_mrsp_semaphore = false;
+ ctx->scheduler_a_idle = false;
+ ctx->scheduler_b_idle = false;
+ ctx->helping_active = false;
+ ctx->second_active = false;
+ ctx->third_active = false;
+}
+
+static void RtemsSemReqMrspObtain_Action( RtemsSemReqMrspObtain_Context *ctx )
+{
+ if ( ctx->task_owns_mrsp_semaphore ) {
+ TQMutexObtain( &ctx->tq_ctx, TQ_MUTEX_B );
+ }
+
+ if ( ctx->helping_active ) {
+ T_true( ctx->task_owns_mrsp_semaphore );
+
+ TQSendAndWaitForIntendToBlock(
+ &ctx->tq_ctx,
+ HELPING,
+ TQ_EVENT_MUTEX_B_OBTAIN
+ );
+
+ if ( ctx->scheduler_b_idle ) {
+ SuspendTask( ctx->tq_ctx.worker_id[ HELPING ] );
+ }
+ }
+
+ if ( ctx->scheduler_a_idle || ctx->second_active ) {
+ MoveToScheduler( ctx, SCHEDULER_B_ID );
+ }
+
+ if ( ctx->second_active ) {
+ T_false( ctx->third_active );
+
+ TQSetPriority( &ctx->tq_ctx, SECOND, ctx->second_priority );
+
+ if ( ctx->scheduler_a_idle ) {
+ SetSemaphorePriority(
+ ctx->tq_ctx.mutex_id[ TQ_MUTEX_C ],
+ ctx->second_priority,
+ ctx->second_priority
+ );
+ TQSendAndWaitForExecutionStop(
+ &ctx->tq_ctx,
+ SECOND,
+ TQ_EVENT_MUTEX_C_OBTAIN
+ );
+ } else {
+ ctx->tq_ctx.busy_wait[ SECOND ] = true;
+ TQSend( &ctx->tq_ctx, SECOND, TQ_EVENT_BUSY_WAIT );
+ TQWaitForEventsReceived( &ctx->tq_ctx, SECOND );
+ }
+ }
+
+ if ( ctx->third_active ) {
+ T_false( ctx->second_active );
+
+ TQSetPriority( &ctx->tq_ctx, THIRD, ctx->third_priority );
+
+ if ( ctx->scheduler_b_idle ) {
+ SetSemaphorePriority(
+ ctx->tq_ctx.mutex_id[ TQ_MUTEX_C ],
+ ctx->third_priority,
+ ctx->third_priority
+ );
+ TQSendAndWaitForExecutionStop(
+ &ctx->tq_ctx,
+ THIRD,
+ TQ_EVENT_MUTEX_C_OBTAIN
+ );
+ } else {
+ ctx->tq_ctx.busy_wait[ THIRD ] = true;
+ TQSend( &ctx->tq_ctx, THIRD, TQ_EVENT_BUSY_WAIT );
+ TQWaitForEventsReceived( &ctx->tq_ctx, THIRD );
+ }
+ }
+
+ SetSemaphorePriority(
+ ctx->sema_id,
+ ctx->sema_priority_scheduler_a,
+ ctx->sema_priority_scheduler_b
+ );
+ ObtainMutex( ctx->sema_id );
+}
+
+static void RtemsSemReqMrspObtain_Cleanup( RtemsSemReqMrspObtain_Context *ctx )
+{
+ ReleaseMutex( ctx->sema_id );
+
+ if ( ctx->task_owns_mrsp_semaphore ) {
+ TQMutexRelease( &ctx->tq_ctx, TQ_MUTEX_B );
+ }
+
+ if ( ctx->second_active ) {
+ MoveToScheduler( ctx, SCHEDULER_B_ID );
+
+ if ( ctx->scheduler_a_idle ) {
+ TQSendAndWaitForExecutionStop(
+ &ctx->tq_ctx,
+ SECOND,
+ TQ_EVENT_MUTEX_C_RELEASE
+ );
+ } else {
+ ctx->tq_ctx.busy_wait[ SECOND ] = false;
+ TQWaitForExecutionStop( &ctx->tq_ctx, SECOND );
+ }
+ }
+
+ if ( ctx->third_active ) {
+ MoveToScheduler( ctx, SCHEDULER_A_ID );
+
+ if ( ctx->scheduler_b_idle ) {
+ TQSendAndWaitForExecutionStop(
+ &ctx->tq_ctx,
+ THIRD,
+ TQ_EVENT_MUTEX_C_RELEASE
+ );
+ } else {
+ ctx->tq_ctx.busy_wait[ THIRD ] = false;
+ TQWaitForExecutionStop( &ctx->tq_ctx, THIRD );
+ }
+ }
+
+ if ( ctx->helping_active ) {
+ MoveToScheduler( ctx, SCHEDULER_A_ID );
+
+ if ( ctx->scheduler_b_idle ) {
+ ResumeTask( ctx->tq_ctx.worker_id[ HELPING ] );
+ }
+
+ TQSendAndWaitForExecutionStop(
+ &ctx->tq_ctx,
+ HELPING,
+ TQ_EVENT_MUTEX_B_RELEASE
+ );
+ }
+
+ MoveToScheduler( ctx, SCHEDULER_A_ID );
+}
+
+static const RtemsSemReqMrspObtain_Entry
+RtemsSemReqMrspObtain_Entries[] = {
+ { 1, 0, 0, 0, 0, RtemsSemReqMrspObtain_Post_Home_NA,
+ RtemsSemReqMrspObtain_Post_Helping_NA },
+ { 1, 0, 0, 0, 0, RtemsSemReqMrspObtain_Post_Home_NA,
+ RtemsSemReqMrspObtain_Post_Helping_NA },
+ { 1, 0, 0, 0, 0, RtemsSemReqMrspObtain_Post_Home_NA,
+ RtemsSemReqMrspObtain_Post_Helping_NA },
+ { 1, 0, 0, 0, 0, RtemsSemReqMrspObtain_Post_Home_NA,
+ RtemsSemReqMrspObtain_Post_Helping_NA },
+ { 0, 0, 0, 0, 0, RtemsSemReqMrspObtain_Post_Home_Task,
+ RtemsSemReqMrspObtain_Post_Helping_Third },
+ { 0, 0, 0, 0, 0, RtemsSemReqMrspObtain_Post_Home_Task,
+ RtemsSemReqMrspObtain_Post_Helping_ThirdIdle },
+ { 0, 0, 0, 0, 0, RtemsSemReqMrspObtain_Post_Home_TaskIdle,
+ RtemsSemReqMrspObtain_Post_Helping_Task },
+ { 0, 0, 0, 0, 0, RtemsSemReqMrspObtain_Post_Home_Second,
+ RtemsSemReqMrspObtain_Post_Helping_Task },
+ { 0, 0, 0, 0, 0, RtemsSemReqMrspObtain_Post_Home_SecondIdle,
+ RtemsSemReqMrspObtain_Post_Helping_Task },
+ { 0, 0, 0, 0, 0, RtemsSemReqMrspObtain_Post_Home_Task,
+ RtemsSemReqMrspObtain_Post_Helping_Helping },
+ { 0, 0, 0, 0, 0, RtemsSemReqMrspObtain_Post_Home_Task,
+ RtemsSemReqMrspObtain_Post_Helping_HelpingIdle },
+ { 0, 0, 0, 0, 0, RtemsSemReqMrspObtain_Post_Home_Task,
+ RtemsSemReqMrspObtain_Post_Helping_Idle }
+};
+
+static const uint8_t
+RtemsSemReqMrspObtain_Map[] = {
+ 2, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 1, 1, 3, 0, 1, 1, 1, 3,
+ 0, 1, 1, 1, 6, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 1, 1, 1, 3, 3,
+ 1, 1, 1, 3, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 1,
+ 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 1, 1, 1, 0, 3, 1, 1, 1, 0, 3, 1, 1, 1, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 0, 2, 2, 2, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11,
+ 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 1, 1, 3, 0, 1, 1, 1, 3, 0,
+ 1, 1, 1, 2, 0, 1, 1, 1, 0, 2, 1, 1, 1, 0, 2, 1, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1,
+ 1, 1, 3, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 9, 1, 1, 1, 0, 9, 1, 1, 1, 3, 3, 1, 1,
+ 1, 3, 3, 1, 1, 1, 3, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 10, 1, 1, 1, 0, 10, 1, 1,
+ 1, 0, 3, 1, 1, 1, 0, 3, 1, 1, 1, 0, 3, 1, 1, 1, 4, 0, 4, 4, 4, 0, 4, 4, 4, 4,
+ 0, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 0, 5, 5, 5, 0,
+ 5, 5, 5, 5, 0, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1,
+ 1, 1, 0, 0, 0, 0, 0, 0, 6, 1, 1, 1, 0, 6, 1, 1, 1, 0, 3, 1, 1, 1, 0, 3, 1, 1,
+ 1, 0, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 0, 2, 1, 1, 1, 0, 3, 1, 1, 1,
+ 0, 3, 1, 1, 1, 0, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 0, 2, 1, 1, 1, 0,
+ 3, 1, 1, 1, 0, 3, 1, 1, 1, 0, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 2,
+ 2, 2, 2, 0, 3, 3, 3, 3, 0, 3, 3, 3, 3, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 2, 2,
+ 2, 2, 0, 2, 2, 2, 2, 0, 3, 3, 3, 3, 0, 3, 3, 3, 3, 0, 3, 3, 3, 3, 2, 0, 1, 1,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 1, 1, 2, 0, 1, 1, 1, 2, 0, 1, 1, 1,
+ 7, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 1, 1, 1, 7, 7, 1, 1, 1, 7,
+ 7, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 1, 2, 2,
+ 1, 1, 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1,
+ 1, 1, 0, 2, 1, 1, 1, 0, 2, 1, 1, 1, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 1, 1, 2, 0, 1, 1, 1, 2, 0, 1, 1, 1, 8, 0,
+ 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 1, 1, 1, 8, 8, 1, 1, 1, 8, 8, 1,
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 1, 2, 2, 1, 1,
+ 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 1,
+ 0, 2, 1, 1, 1, 0, 2, 1, 1, 1, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static size_t RtemsSemReqMrspObtain_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsSemReqMrspObtain_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsSemReqMrspObtain_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSemReqMrspObtain_Fixture = {
+ .setup = RtemsSemReqMrspObtain_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsSemReqMrspObtain_Teardown_Wrap,
+ .scope = RtemsSemReqMrspObtain_Scope,
+ .initial_context = &RtemsSemReqMrspObtain_Instance
+};
+
+static inline RtemsSemReqMrspObtain_Entry RtemsSemReqMrspObtain_PopEntry(
+ RtemsSemReqMrspObtain_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSemReqMrspObtain_Entries[
+ RtemsSemReqMrspObtain_Map[ index ]
+ ];
+}
+
+static void RtemsSemReqMrspObtain_TestVariant(
+ RtemsSemReqMrspObtain_Context *ctx
+)
+{
+ RtemsSemReqMrspObtain_Pre_Home_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSemReqMrspObtain_Pre_Helping_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsSemReqMrspObtain_Pre_PriorityHome_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsSemReqMrspObtain_Pre_PriorityHelping_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsSemReqMrspObtain_Action( ctx );
+ RtemsSemReqMrspObtain_Post_Home_Check( ctx, ctx->Map.entry.Post_Home );
+ RtemsSemReqMrspObtain_Post_Helping_Check( ctx, ctx->Map.entry.Post_Helping );
+}
+
+/**
+ * @fn void T_case_body_RtemsSemReqMrspObtain( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsSemReqMrspObtain, &RtemsSemReqMrspObtain_Fixture )
+{
+ RtemsSemReqMrspObtain_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsSemReqMrspObtain_Pre_Home_Idle;
+ ctx->Map.pcs[ 0 ] < RtemsSemReqMrspObtain_Pre_Home_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsSemReqMrspObtain_Pre_Helping_Idle;
+ ctx->Map.pcs[ 1 ] < RtemsSemReqMrspObtain_Pre_Helping_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsSemReqMrspObtain_Pre_PriorityHome_None;
+ ctx->Map.pcs[ 2 ] < RtemsSemReqMrspObtain_Pre_PriorityHome_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsSemReqMrspObtain_Pre_PriorityHelping_None;
+ ctx->Map.pcs[ 3 ] < RtemsSemReqMrspObtain_Pre_PriorityHelping_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ ctx->Map.entry = RtemsSemReqMrspObtain_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsSemReqMrspObtain_Prepare( ctx );
+ RtemsSemReqMrspObtain_TestVariant( ctx );
+ RtemsSemReqMrspObtain_Cleanup( ctx );
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sem-obtain.c b/testsuites/validation/tc-sem-obtain.c
new file mode 100644
index 0000000000..10c4475d8c
--- /dev/null
+++ b/testsuites/validation/tc-sem-obtain.c
@@ -0,0 +1,733 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSemReqObtain
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include "tr-mtx-seize-try.h"
+#include "tr-mtx-seize-wait.h"
+#include "tr-sem-seize-try.h"
+#include "tr-sem-seize-wait.h"
+#include "tx-support.h"
+#include "tx-thread-queue.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSemReqObtain spec:/rtems/sem/req/obtain
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSemReqObtain_Pre_Class_Counting,
+ RtemsSemReqObtain_Pre_Class_Simple,
+ RtemsSemReqObtain_Pre_Class_Binary,
+ RtemsSemReqObtain_Pre_Class_PrioCeiling,
+ RtemsSemReqObtain_Pre_Class_PrioInherit,
+ RtemsSemReqObtain_Pre_Class_MrsP,
+ RtemsSemReqObtain_Pre_Class_NA
+} RtemsSemReqObtain_Pre_Class;
+
+typedef enum {
+ RtemsSemReqObtain_Pre_Discipline_FIFO,
+ RtemsSemReqObtain_Pre_Discipline_Priority,
+ RtemsSemReqObtain_Pre_Discipline_NA
+} RtemsSemReqObtain_Pre_Discipline;
+
+typedef enum {
+ RtemsSemReqObtain_Pre_Id_Valid,
+ RtemsSemReqObtain_Pre_Id_Invalid,
+ RtemsSemReqObtain_Pre_Id_NA
+} RtemsSemReqObtain_Pre_Id;
+
+typedef enum {
+ RtemsSemReqObtain_Pre_Wait_No,
+ RtemsSemReqObtain_Pre_Wait_Timeout,
+ RtemsSemReqObtain_Pre_Wait_Forever,
+ RtemsSemReqObtain_Pre_Wait_NA
+} RtemsSemReqObtain_Pre_Wait;
+
+typedef enum {
+ RtemsSemReqObtain_Post_Action_InvId,
+ RtemsSemReqObtain_Post_Action_SemSeizeTry,
+ RtemsSemReqObtain_Post_Action_SemSeizeWait,
+ RtemsSemReqObtain_Post_Action_MtxSeizeTry,
+ RtemsSemReqObtain_Post_Action_MtxSeizeWait,
+ RtemsSemReqObtain_Post_Action_InheritMtxSeizeTry,
+ RtemsSemReqObtain_Post_Action_InheritMtxSeizeWait,
+ RtemsSemReqObtain_Post_Action_CeilingMtxSeizeTry,
+ RtemsSemReqObtain_Post_Action_CeilingMtxSeizeWait,
+ RtemsSemReqObtain_Post_Action_MrsPMtxSeizeTry,
+ RtemsSemReqObtain_Post_Action_MrsPMtxSeizeWait,
+ RtemsSemReqObtain_Post_Action_NA
+} RtemsSemReqObtain_Post_Action;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Class_NA : 1;
+ uint16_t Pre_Discipline_NA : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_Wait_NA : 1;
+ uint16_t Post_Action : 4;
+} RtemsSemReqObtain_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/sem/req/obtain test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the thread queue test context.
+ */
+ union {
+ TQContext tq_ctx;
+ TQMtxContext tq_mtx_ctx;
+ TQSemContext tq_sem_ctx;
+ };
+
+ /**
+ * @brief This member specifies if the attribute set of the semaphore.
+ */
+ rtems_attribute attribute_set;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 4 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSemReqObtain_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSemReqObtain_Context;
+
+static RtemsSemReqObtain_Context
+ RtemsSemReqObtain_Instance;
+
+static const char * const RtemsSemReqObtain_PreDesc_Class[] = {
+ "Counting",
+ "Simple",
+ "Binary",
+ "PrioCeiling",
+ "PrioInherit",
+ "MrsP",
+ "NA"
+};
+
+static const char * const RtemsSemReqObtain_PreDesc_Discipline[] = {
+ "FIFO",
+ "Priority",
+ "NA"
+};
+
+static const char * const RtemsSemReqObtain_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsSemReqObtain_PreDesc_Wait[] = {
+ "No",
+ "Timeout",
+ "Forever",
+ "NA"
+};
+
+static const char * const * const RtemsSemReqObtain_PreDesc[] = {
+ RtemsSemReqObtain_PreDesc_Class,
+ RtemsSemReqObtain_PreDesc_Discipline,
+ RtemsSemReqObtain_PreDesc_Id,
+ RtemsSemReqObtain_PreDesc_Wait,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+typedef RtemsSemReqObtain_Context Context;
+
+static void RtemsSemReqObtain_Pre_Class_Prepare(
+ RtemsSemReqObtain_Context *ctx,
+ RtemsSemReqObtain_Pre_Class state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqObtain_Pre_Class_Counting: {
+ /*
+ * While the semaphore object is a counting semaphore.
+ */
+ ctx->attribute_set |= RTEMS_COUNTING_SEMAPHORE;
+ break;
+ }
+
+ case RtemsSemReqObtain_Pre_Class_Simple: {
+ /*
+ * While the semaphore object is a simple binary semaphore.
+ */
+ ctx->attribute_set |= RTEMS_SIMPLE_BINARY_SEMAPHORE;
+ break;
+ }
+
+ case RtemsSemReqObtain_Pre_Class_Binary: {
+ /*
+ * While the semaphore object is a binary semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE;
+ break;
+ }
+
+ case RtemsSemReqObtain_Pre_Class_PrioCeiling: {
+ /*
+ * While the semaphore object is a priority ceiling semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY_CEILING;
+ break;
+ }
+
+ case RtemsSemReqObtain_Pre_Class_PrioInherit: {
+ /*
+ * While the semaphore object is a priority inheritance semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY;
+ break;
+ }
+
+ case RtemsSemReqObtain_Pre_Class_MrsP: {
+ /*
+ * While the semaphore object is a MrsP semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING;
+ break;
+ }
+
+ case RtemsSemReqObtain_Pre_Class_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqObtain_Pre_Discipline_Prepare(
+ RtemsSemReqObtain_Context *ctx,
+ RtemsSemReqObtain_Pre_Discipline state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqObtain_Pre_Discipline_FIFO: {
+ /*
+ * While the semaphore uses the FIFO task wait queue discipline.
+ */
+ ctx->attribute_set |= RTEMS_FIFO;
+ ctx->tq_ctx.discipline = TQ_FIFO;
+ break;
+ }
+
+ case RtemsSemReqObtain_Pre_Discipline_Priority: {
+ /*
+ * While the semaphore uses the priority task wait queue discipline.
+ */
+ ctx->attribute_set |= RTEMS_PRIORITY;
+ ctx->tq_ctx.discipline = TQ_PRIORITY;
+ break;
+ }
+
+ case RtemsSemReqObtain_Pre_Discipline_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqObtain_Pre_Id_Prepare(
+ RtemsSemReqObtain_Context *ctx,
+ RtemsSemReqObtain_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqObtain_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is associated with the semaphore.
+ */
+ /* Nothing to prepare */
+ break;
+ }
+
+ case RtemsSemReqObtain_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is not associated with a semaphore.
+ */
+ /* Nothing to prepare */
+ break;
+ }
+
+ case RtemsSemReqObtain_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqObtain_Pre_Wait_Prepare(
+ RtemsSemReqObtain_Context *ctx,
+ RtemsSemReqObtain_Pre_Wait state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqObtain_Pre_Wait_No: {
+ /*
+ * While the ``option_set`` parameter indicates the RTEMS_NO_WAIT option.
+ */
+ ctx->tq_ctx.wait = TQ_NO_WAIT;
+ break;
+ }
+
+ case RtemsSemReqObtain_Pre_Wait_Timeout: {
+ /*
+ * While the ``option_set`` parameter indicates the RTEMS_WAIT option,
+ * while the ``timeout`` parameter is not equal to RTEMS_NO_TIMEOUT.
+ */
+ ctx->tq_ctx.wait = TQ_WAIT_TIMED;
+ break;
+ }
+
+ case RtemsSemReqObtain_Pre_Wait_Forever: {
+ /*
+ * While the ``option_set`` parameter indicates the RTEMS_WAIT option,
+ * while the ``timeout`` parameter is equal to RTEMS_NO_TIMEOUT.
+ */
+ ctx->tq_ctx.wait = TQ_WAIT_FOREVER;
+ break;
+ }
+
+ case RtemsSemReqObtain_Pre_Wait_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqObtain_Post_Action_Check(
+ RtemsSemReqObtain_Context *ctx,
+ RtemsSemReqObtain_Post_Action state
+)
+{
+ rtems_status_code sc;
+
+ switch ( state ) {
+ case RtemsSemReqObtain_Post_Action_InvId: {
+ /*
+ * The return status of rtems_semaphore_obtain() shall be
+ * RTEMS_INVALID_ID.
+ */
+ sc = rtems_semaphore_obtain( 0xffffffff, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
+ T_rsc( sc, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsSemReqObtain_Post_Action_SemSeizeTry: {
+ /*
+ * The calling task shall try to seize the semaphore as specified by
+ * spec:/score/sem/req/seize-try.
+ */
+ ctx->tq_sem_ctx.get_count = TQSemGetCountClassic;
+ ctx->tq_sem_ctx.set_count = TQSemSetCountClassic;
+ ScoreSemReqSeizeTry_Run( &ctx->tq_sem_ctx );
+ break;
+ }
+
+ case RtemsSemReqObtain_Post_Action_SemSeizeWait: {
+ /*
+ * The calling task shall wait to seize the semaphore as specified by
+ * spec:/score/sem/req/seize-wait.
+ */
+ ctx->tq_sem_ctx.get_count = TQSemGetCountClassic;
+ ctx->tq_sem_ctx.set_count = TQSemSetCountClassic;
+ ScoreSemReqSeizeWait_Run( &ctx->tq_sem_ctx );
+ break;
+ }
+
+ case RtemsSemReqObtain_Post_Action_MtxSeizeTry: {
+ /*
+ * The calling task shall try to seize the mutex as specified by
+ * spec:/score/mtx/req/seize-try where an enqueue blocks, a recursive
+ * seize is allowed, and no locking protocol is used.
+ */
+ ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ ctx->tq_mtx_ctx.protocol = TQ_MTX_NO_PROTOCOL;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ctx->tq_mtx_ctx.priority_ceiling = PRIO_INVALID;
+ ScoreMtxReqSeizeTry_Run( &ctx->tq_mtx_ctx );
+ break;
+ }
+
+ case RtemsSemReqObtain_Post_Action_MtxSeizeWait: {
+ /*
+ * The calling task shall wait to seize the mutex as specified by
+ * spec:/score/mtx/req/seize-wait where an enqueue blocks, a recursive
+ * seize is allowed, and no locking protocol is used.
+ */
+ ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ ctx->tq_mtx_ctx.protocol = TQ_MTX_NO_PROTOCOL;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ctx->tq_mtx_ctx.priority_ceiling = PRIO_INVALID;
+ ScoreMtxReqSeizeWait_Run( &ctx->tq_mtx_ctx );
+ break;
+ }
+
+ case RtemsSemReqObtain_Post_Action_InheritMtxSeizeTry: {
+ /*
+ * The calling task shall try to seize the mutex as specified by
+ * spec:/score/mtx/req/seize-try where an enqueue blocks, a recursive
+ * seize is allowed, and a priority inheritance protocol is used.
+ */
+ ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ ctx->tq_mtx_ctx.protocol = TQ_MTX_NO_PROTOCOL;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ctx->tq_mtx_ctx.priority_ceiling = PRIO_INVALID;
+ ScoreMtxReqSeizeTry_Run( &ctx->tq_mtx_ctx );
+ break;
+ }
+
+ case RtemsSemReqObtain_Post_Action_InheritMtxSeizeWait: {
+ /*
+ * The calling task shall wait to seize the mutex as specified by
+ * spec:/score/mtx/req/seize-wait where an enqueue blocks, a recursive
+ * seize is allowed, and a priority inheritance protocol is used.
+ */
+ ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ ctx->tq_mtx_ctx.protocol = TQ_MTX_NO_PROTOCOL;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ctx->tq_mtx_ctx.priority_ceiling = PRIO_INVALID;
+ ScoreMtxReqSeizeWait_Run( &ctx->tq_mtx_ctx );
+ break;
+ }
+
+ case RtemsSemReqObtain_Post_Action_CeilingMtxSeizeTry: {
+ /*
+ * The calling task shall try to seize the mutex as specified by
+ * spec:/score/mtx/req/seize-try where an enqueue blocks, a recursive
+ * seize is allowed, and a priority ceiling is used.
+ */
+ ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ ctx->tq_mtx_ctx.protocol = TQ_MTX_PRIORITY_CEILING;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ctx->tq_mtx_ctx.priority_ceiling = PRIO_VERY_HIGH;
+ ScoreMtxReqSeizeTry_Run( &ctx->tq_mtx_ctx );
+ break;
+ }
+
+ case RtemsSemReqObtain_Post_Action_CeilingMtxSeizeWait: {
+ /*
+ * The calling task shall wait to seize the mutex as specified by
+ * spec:/score/mtx/req/seize-wait where an enqueue blocks, a recursive
+ * seize is allowed, and a priority ceiling is used.
+ */
+ ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ ctx->tq_mtx_ctx.protocol = TQ_MTX_PRIORITY_CEILING;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ctx->tq_mtx_ctx.priority_ceiling = PRIO_VERY_HIGH;
+ ScoreMtxReqSeizeWait_Run( &ctx->tq_mtx_ctx );
+ break;
+ }
+
+ case RtemsSemReqObtain_Post_Action_MrsPMtxSeizeTry: {
+ /*
+ * The calling task shall try to seize the mutex as specified by
+ * spec:/score/mtx/req/seize-try where an enqueue is sticky, a recursive
+ * seize returns an error status, and a priority ceiling is used.
+ */
+ #if defined(RTEMS_SMP)
+ ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_STICKY;
+ ctx->tq_mtx_ctx.protocol = TQ_MTX_MRSP;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_DEADLOCK;
+ ctx->tq_mtx_ctx.priority_ceiling = PRIO_VERY_HIGH;
+ ScoreMtxReqSeizeTry_Run( &ctx->tq_mtx_ctx );
+ #else
+ T_unreachable();
+ #endif
+ break;
+ }
+
+ case RtemsSemReqObtain_Post_Action_MrsPMtxSeizeWait: {
+ /*
+ * The calling task shall wait to seize the mutex as specified by
+ * spec:/score/mtx/req/seize-wait where an enqueue is sticky, a recursive
+ * seize returns an error status, and a priority ceiling is used.
+ */
+ #if defined(RTEMS_SMP)
+ ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_STICKY;
+ ctx->tq_mtx_ctx.protocol = TQ_MTX_MRSP;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_DEADLOCK;
+ ctx->tq_mtx_ctx.priority_ceiling = PRIO_VERY_HIGH;
+ ScoreMtxReqSeizeWait_Run( &ctx->tq_mtx_ctx );
+ #else
+ T_unreachable();
+ #endif
+ break;
+ }
+
+ case RtemsSemReqObtain_Post_Action_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqObtain_Setup( RtemsSemReqObtain_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->tq_ctx.deadlock = TQ_DEADLOCK_STATUS;
+ ctx->tq_ctx.enqueue_prepare = TQEnqueuePrepareDefault;
+ ctx->tq_ctx.enqueue_done = TQEnqueueDoneDefault;
+ ctx->tq_ctx.enqueue = TQEnqueueClassicSem;
+ ctx->tq_ctx.surrender = TQSurrenderClassicSem;
+ ctx->tq_ctx.get_owner = TQGetOwnerClassicSem;
+ ctx->tq_ctx.convert_status = TQConvertStatusClassic;
+ TQInitialize( &ctx->tq_ctx );
+}
+
+static void RtemsSemReqObtain_Setup_Wrap( void *arg )
+{
+ RtemsSemReqObtain_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqObtain_Setup( ctx );
+}
+
+static void RtemsSemReqObtain_Teardown( RtemsSemReqObtain_Context *ctx )
+{
+ TQDestroy( &ctx->tq_ctx );
+}
+
+static void RtemsSemReqObtain_Teardown_Wrap( void *arg )
+{
+ RtemsSemReqObtain_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqObtain_Teardown( ctx );
+}
+
+static void RtemsSemReqObtain_Prepare( RtemsSemReqObtain_Context *ctx )
+{
+ ctx->attribute_set = RTEMS_DEFAULT_ATTRIBUTES;
+}
+
+static void RtemsSemReqObtain_Action( RtemsSemReqObtain_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_create(
+ NAME,
+ 1,
+ ctx->attribute_set,
+ PRIO_VERY_HIGH,
+ &ctx->tq_ctx.thread_queue_id
+ );
+ T_rsc_success( sc );
+
+ #if defined(RTEMS_SMP)
+ if ( ( ctx->attribute_set & RTEMS_MULTIPROCESSOR_RESOURCE_SHARING ) != 0 ) {
+ rtems_task_priority prio;
+
+ sc = rtems_semaphore_set_priority(
+ ctx->tq_ctx.thread_queue_id,
+ SCHEDULER_B_ID,
+ PRIO_VERY_HIGH,
+ &prio
+ );
+ T_rsc_success( sc );
+ }
+ #endif
+}
+
+static void RtemsSemReqObtain_Cleanup( RtemsSemReqObtain_Context *ctx )
+{
+ rtems_status_code sc;
+ sc = rtems_semaphore_delete( ctx->tq_ctx.thread_queue_id ); T_rsc_success( sc );
+}
+
+static const RtemsSemReqObtain_Entry
+RtemsSemReqObtain_Entries[] = {
+ { 0, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_InvId },
+ { 1, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_NA },
+ { 0, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_SemSeizeWait },
+ { 0, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_SemSeizeTry },
+ { 0, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_MtxSeizeWait },
+ { 0, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_MtxSeizeTry },
+ { 0, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_CeilingMtxSeizeWait },
+ { 0, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_InheritMtxSeizeWait },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_MrsPMtxSeizeWait },
+#else
+ { 0, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_CeilingMtxSeizeWait },
+#endif
+ { 0, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_CeilingMtxSeizeTry },
+ { 0, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_InheritMtxSeizeTry },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_MrsPMtxSeizeTry }
+#else
+ { 0, 0, 0, 0, 0, RtemsSemReqObtain_Post_Action_CeilingMtxSeizeTry }
+#endif
+};
+
+static const uint8_t
+RtemsSemReqObtain_Map[] = {
+ 3, 2, 2, 0, 0, 0, 3, 2, 2, 0, 0, 0, 3, 2, 2, 0, 0, 0, 3, 2, 2, 0, 0, 0, 5, 4,
+ 4, 0, 0, 0, 5, 4, 4, 0, 0, 0, 1, 1, 1, 1, 1, 1, 9, 6, 6, 0, 0, 0, 1, 1, 1, 1,
+ 1, 1, 10, 7, 7, 0, 0, 0, 1, 1, 1, 1, 1, 1, 11, 8, 8, 0, 0, 0
+};
+
+static size_t RtemsSemReqObtain_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsSemReqObtain_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsSemReqObtain_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSemReqObtain_Fixture = {
+ .setup = RtemsSemReqObtain_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsSemReqObtain_Teardown_Wrap,
+ .scope = RtemsSemReqObtain_Scope,
+ .initial_context = &RtemsSemReqObtain_Instance
+};
+
+static inline RtemsSemReqObtain_Entry RtemsSemReqObtain_PopEntry(
+ RtemsSemReqObtain_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSemReqObtain_Entries[
+ RtemsSemReqObtain_Map[ index ]
+ ];
+}
+
+static void RtemsSemReqObtain_TestVariant( RtemsSemReqObtain_Context *ctx )
+{
+ RtemsSemReqObtain_Pre_Class_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSemReqObtain_Pre_Discipline_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsSemReqObtain_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsSemReqObtain_Pre_Wait_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsSemReqObtain_Action( ctx );
+ RtemsSemReqObtain_Post_Action_Check( ctx, ctx->Map.entry.Post_Action );
+}
+
+/**
+ * @fn void T_case_body_RtemsSemReqObtain( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsSemReqObtain, &RtemsSemReqObtain_Fixture )
+{
+ RtemsSemReqObtain_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsSemReqObtain_Pre_Class_Counting;
+ ctx->Map.pcs[ 0 ] < RtemsSemReqObtain_Pre_Class_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsSemReqObtain_Pre_Discipline_FIFO;
+ ctx->Map.pcs[ 1 ] < RtemsSemReqObtain_Pre_Discipline_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsSemReqObtain_Pre_Id_Valid;
+ ctx->Map.pcs[ 2 ] < RtemsSemReqObtain_Pre_Id_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsSemReqObtain_Pre_Wait_No;
+ ctx->Map.pcs[ 3 ] < RtemsSemReqObtain_Pre_Wait_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ ctx->Map.entry = RtemsSemReqObtain_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsSemReqObtain_Prepare( ctx );
+ RtemsSemReqObtain_TestVariant( ctx );
+ RtemsSemReqObtain_Cleanup( ctx );
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sem-performance.c b/testsuites/validation/tc-sem-performance.c
new file mode 100644
index 0000000000..5861e3ee8e
--- /dev/null
+++ b/testsuites/validation/tc-sem-performance.c
@@ -0,0 +1,968 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSemValPerf
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSemValPerf spec:/rtems/sem/val/perf
+ *
+ * @ingroup TestsuitesPerformanceNoClock0
+ *
+ * @brief This test case provides a context to run @ref RTEMSAPIClassicSem
+ * performance tests.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/rtems/sem/val/perf test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides a mutex identifier.
+ */
+ rtems_id mutex_id;
+
+ /**
+ * @brief This member provides a worker identifier.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member provides a status code.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member references the measure runtime context.
+ */
+ T_measure_runtime_context *context;
+
+ /**
+ * @brief This member provides the measure runtime request.
+ */
+ T_measure_runtime_request request;
+
+ /**
+ * @brief This member provides an optional measurement begin time point.
+ */
+ T_ticks begin;
+
+ /**
+ * @brief This member provides an optional measurement end time point.
+ */
+ T_ticks end;
+} RtemsSemValPerf_Context;
+
+static RtemsSemValPerf_Context
+ RtemsSemValPerf_Instance;
+
+#define EVENT_END RTEMS_EVENT_0
+
+#define EVENT_OBTAIN RTEMS_EVENT_1
+
+#define EVENT_OBTAIN_END RTEMS_EVENT_2
+
+#define EVENT_RELEASE RTEMS_EVENT_3
+
+#define EVENT_RELEASE_END RTEMS_EVENT_4
+
+typedef RtemsSemValPerf_Context Context;
+
+static void Send( const Context *ctx, rtems_event_set events )
+{
+ SendEvents( ctx->worker_id, events );
+}
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ rtems_event_set events;
+ rtems_status_code sc;
+ T_ticks ticks;
+
+ sc = rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_EVENT_ANY | RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT,
+ &events
+ );
+ ticks = T_tick();
+ T_quiet_rsc_success( sc );
+
+ if ( ( events & EVENT_END ) != 0 ) {
+ ctx->end = ticks;
+ }
+
+ if ( ( events & EVENT_OBTAIN ) != 0 ) {
+ sc = rtems_semaphore_obtain(
+ ctx->mutex_id,
+ RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+ ticks = T_tick();
+ T_quiet_rsc_success( sc );
+
+ if ( ( events & EVENT_OBTAIN_END ) != 0 ) {
+ ctx->end = ticks;
+ }
+ }
+
+ if ( ( events & EVENT_RELEASE ) != 0 ) {
+ sc = rtems_semaphore_release( ctx->mutex_id );
+ ticks = T_tick();
+ T_quiet_rsc_success( sc );
+
+ if ( ( events & EVENT_RELEASE_END ) != 0 ) {
+ ctx->end = ticks;
+ }
+ }
+ }
+}
+
+static void RtemsSemValPerf_Setup_Context( RtemsSemValPerf_Context *ctx )
+{
+ T_measure_runtime_config config;
+
+ memset( &config, 0, sizeof( config ) );
+ config.sample_count = 100;
+ ctx->request.arg = ctx;
+ ctx->request.flags = T_MEASURE_RUNTIME_REPORT_SAMPLES;
+ ctx->context = T_measure_runtime_create( &config );
+ T_assert_not_null( ctx->context );
+}
+
+/**
+ * @brief Create a mutex and a worker task.
+ */
+static void RtemsSemValPerf_Setup( RtemsSemValPerf_Context *ctx )
+{
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->mutex_id = CreateMutex();
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+static void RtemsSemValPerf_Setup_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemValPerf_Setup_Context( ctx );
+ RtemsSemValPerf_Setup( ctx );
+}
+
+/**
+ * @brief Delete the worker task and the mutex.
+ */
+static void RtemsSemValPerf_Teardown( RtemsSemValPerf_Context *ctx )
+{
+ DeleteTask( ctx->worker_id );
+ DeleteMutex( ctx->mutex_id );
+ RestoreRunnerPriority();
+}
+
+static void RtemsSemValPerf_Teardown_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemValPerf_Teardown( ctx );
+}
+
+static T_fixture RtemsSemValPerf_Fixture = {
+ .setup = RtemsSemValPerf_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsSemValPerf_Teardown_Wrap,
+ .scope = NULL,
+ .initial_context = &RtemsSemValPerf_Instance
+};
+
+/**
+ * @defgroup RtemsSemReqPerfMtxPiObtain spec:/rtems/sem/req/perf-mtx-pi-obtain
+ *
+ * @{
+ */
+
+/**
+ * @brief Obtain the available mutex.
+ */
+static void RtemsSemReqPerfMtxPiObtain_Body( RtemsSemValPerf_Context *ctx )
+{
+ ctx->status = rtems_semaphore_obtain(
+ ctx->mutex_id,
+ RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+}
+
+static void RtemsSemReqPerfMtxPiObtain_Body_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiObtain_Body( ctx );
+}
+
+/**
+ * @brief Release the mutex. Discard samples interrupted by a clock tick.
+ */
+static bool RtemsSemReqPerfMtxPiObtain_Teardown(
+ RtemsSemValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ ReleaseMutex( ctx->mutex_id );
+
+ return tic == toc;
+}
+
+static bool RtemsSemReqPerfMtxPiObtain_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsSemReqPerfMtxPiObtain_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsSemReqPerfMtxPiRelease \
+ * spec:/rtems/sem/req/perf-mtx-pi-release
+ *
+ * @{
+ */
+
+/**
+ * @brief Obtain the mutex.
+ */
+static void RtemsSemReqPerfMtxPiRelease_Setup( RtemsSemValPerf_Context *ctx )
+{
+ ObtainMutex( ctx->mutex_id );
+}
+
+static void RtemsSemReqPerfMtxPiRelease_Setup_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiRelease_Setup( ctx );
+}
+
+/**
+ * @brief Release the mutex.
+ */
+static void RtemsSemReqPerfMtxPiRelease_Body( RtemsSemValPerf_Context *ctx )
+{
+ ctx->status = rtems_semaphore_release( ctx->mutex_id );
+}
+
+static void RtemsSemReqPerfMtxPiRelease_Body_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiRelease_Body( ctx );
+}
+
+/**
+ * @brief Discard samples interrupted by a clock tick.
+ */
+static bool RtemsSemReqPerfMtxPiRelease_Teardown(
+ RtemsSemValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ return tic == toc;
+}
+
+static bool RtemsSemReqPerfMtxPiRelease_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsSemReqPerfMtxPiRelease_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsSemReqPerfMtxPiReleaseOne \
+ * spec:/rtems/sem/req/perf-mtx-pi-release-one
+ *
+ * @{
+ */
+
+/**
+ * @brief Let one task wait on the mutex.
+ */
+static void RtemsSemReqPerfMtxPiReleaseOne_Setup(
+ RtemsSemValPerf_Context *ctx
+)
+{
+ SetSelfPriority( PRIO_HIGH );
+ ObtainMutex( ctx->mutex_id );
+ Send( ctx, EVENT_OBTAIN );
+ Yield();
+ Send( ctx, EVENT_RELEASE );
+}
+
+static void RtemsSemReqPerfMtxPiReleaseOne_Setup_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiReleaseOne_Setup( ctx );
+}
+
+/**
+ * @brief Release the mutex.
+ */
+static void RtemsSemReqPerfMtxPiReleaseOne_Body( RtemsSemValPerf_Context *ctx )
+{
+ /*
+ * The release will unblock the worker task which has our priority. The
+ * scheduler ensures FIFO ordering for ready threads of the same priority, so
+ * the release will not preempt us.
+ */
+ ctx->status = rtems_semaphore_release( ctx->mutex_id );
+}
+
+static void RtemsSemReqPerfMtxPiReleaseOne_Body_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiReleaseOne_Body( ctx );
+}
+
+/**
+ * @brief Restore the worker priority. Discard samples interrupted by a clock
+ * tick.
+ */
+static bool RtemsSemReqPerfMtxPiReleaseOne_Teardown(
+ RtemsSemValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc( ctx->status, RTEMS_SUCCESSFUL );
+
+ SetSelfPriority( PRIO_NORMAL );
+
+ return tic == toc;
+}
+
+static bool RtemsSemReqPerfMtxPiReleaseOne_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsSemReqPerfMtxPiReleaseOne_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/** @} */
+
+#if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsSemReqPerfMtxPiReleaseOtherCpu \
+ * spec:/rtems/sem/req/perf-mtx-pi-release-other-cpu
+ *
+ * @{
+ */
+
+/**
+ * @brief Move worker to scheduler B.
+ */
+static void RtemsSemReqPerfMtxPiReleaseOtherCpu_Prepare(
+ RtemsSemValPerf_Context *ctx
+)
+{
+ SetScheduler( ctx->worker_id, SCHEDULER_B_ID, PRIO_NORMAL );
+}
+
+/**
+ * @brief Let one task wait on the mutex.
+ */
+static void RtemsSemReqPerfMtxPiReleaseOtherCpu_Setup(
+ RtemsSemValPerf_Context *ctx
+)
+{
+ ObtainMutex( ctx->mutex_id );
+ Send( ctx, EVENT_OBTAIN | EVENT_OBTAIN_END | EVENT_RELEASE );
+ WaitForNextTask( 1, ctx->worker_id );
+}
+
+static void RtemsSemReqPerfMtxPiReleaseOtherCpu_Setup_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiReleaseOtherCpu_Setup( ctx );
+}
+
+/**
+ * @brief Release the mutex.
+ */
+static void RtemsSemReqPerfMtxPiReleaseOtherCpu_Body(
+ RtemsSemValPerf_Context *ctx
+)
+{
+ ctx->begin = T_tick();
+ ctx->status = rtems_semaphore_release( ctx->mutex_id );
+}
+
+static void RtemsSemReqPerfMtxPiReleaseOtherCpu_Body_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiReleaseOtherCpu_Body( ctx );
+}
+
+/**
+ * @brief Make sure the worker waits for the next event. Set the measured
+ * runtime. Discard samples interrupted by a clock tick.
+ */
+static bool RtemsSemReqPerfMtxPiReleaseOtherCpu_Teardown(
+ RtemsSemValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc( ctx->status, RTEMS_SUCCESSFUL );
+
+ WaitForNextTask( 1, ctx->worker_id );
+ *delta = ctx->end - ctx->begin;
+
+ return tic == toc;
+}
+
+static bool RtemsSemReqPerfMtxPiReleaseOtherCpu_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsSemReqPerfMtxPiReleaseOtherCpu_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/**
+ * @brief Move worker to scheduler A.
+ */
+static void RtemsSemReqPerfMtxPiReleaseOtherCpu_Cleanup(
+ RtemsSemValPerf_Context *ctx
+)
+{
+ SetScheduler( ctx->worker_id, SCHEDULER_A_ID, PRIO_HIGH );
+}
+
+/** @} */
+#endif
+
+/**
+ * @defgroup RtemsSemReqPerfMtxPiReleasePreempt \
+ * spec:/rtems/sem/req/perf-mtx-pi-release-preempt
+ *
+ * @{
+ */
+
+/**
+ * @brief Let one task wait on the mutex.
+ */
+static void RtemsSemReqPerfMtxPiReleasePreempt_Setup(
+ RtemsSemValPerf_Context *ctx
+)
+{
+ ObtainMutex( ctx->mutex_id );
+ Send( ctx, EVENT_OBTAIN | EVENT_OBTAIN_END | EVENT_RELEASE );
+}
+
+static void RtemsSemReqPerfMtxPiReleasePreempt_Setup_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiReleasePreempt_Setup( ctx );
+}
+
+/**
+ * @brief Release the mutex.
+ */
+static void RtemsSemReqPerfMtxPiReleasePreempt_Body(
+ RtemsSemValPerf_Context *ctx
+)
+{
+ ctx->begin = T_tick();
+ ctx->status = rtems_semaphore_release( ctx->mutex_id );
+}
+
+static void RtemsSemReqPerfMtxPiReleasePreempt_Body_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiReleasePreempt_Body( ctx );
+}
+
+/**
+ * @brief Set the measured runtime. Discard samples interrupted by a clock
+ * tick.
+ */
+static bool RtemsSemReqPerfMtxPiReleasePreempt_Teardown(
+ RtemsSemValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc( ctx->status, RTEMS_SUCCESSFUL );
+
+ *delta = ctx->end - ctx->begin;
+
+ return tic == toc;
+}
+
+static bool RtemsSemReqPerfMtxPiReleasePreempt_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsSemReqPerfMtxPiReleasePreempt_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsSemReqPerfMtxPiTry spec:/rtems/sem/req/perf-mtx-pi-try
+ *
+ * @{
+ */
+
+/**
+ * @brief Make the mutex unavailable.
+ */
+static void RtemsSemReqPerfMtxPiTry_Prepare( RtemsSemValPerf_Context *ctx )
+{
+ Send( ctx, EVENT_OBTAIN );
+}
+
+/**
+ * @brief Try to obtain the unavailable mutex.
+ */
+static void RtemsSemReqPerfMtxPiTry_Body( RtemsSemValPerf_Context *ctx )
+{
+ ctx->status = rtems_semaphore_obtain( ctx->mutex_id, RTEMS_NO_WAIT, 0 );
+}
+
+static void RtemsSemReqPerfMtxPiTry_Body_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiTry_Body( ctx );
+}
+
+/**
+ * @brief Discard samples interrupted by a clock tick.
+ */
+static bool RtemsSemReqPerfMtxPiTry_Teardown(
+ RtemsSemValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc( ctx->status, RTEMS_UNSATISFIED );
+
+ return tic == toc;
+}
+
+static bool RtemsSemReqPerfMtxPiTry_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsSemReqPerfMtxPiTry_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/**
+ * @brief Make the mutex available.
+ */
+static void RtemsSemReqPerfMtxPiTry_Cleanup( RtemsSemValPerf_Context *ctx )
+{
+ Send( ctx, EVENT_RELEASE );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsSemReqPerfMtxPiWaitForever \
+ * spec:/rtems/sem/req/perf-mtx-pi-wait-forever
+ *
+ * @{
+ */
+
+/**
+ * @brief Make the mutex unavailable.
+ */
+static void RtemsSemReqPerfMtxPiWaitForever_Setup(
+ RtemsSemValPerf_Context *ctx
+)
+{
+ Send( ctx, EVENT_OBTAIN );
+ SetSelfPriority( PRIO_VERY_HIGH );
+ Send( ctx, EVENT_END | EVENT_RELEASE );
+}
+
+static void RtemsSemReqPerfMtxPiWaitForever_Setup_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiWaitForever_Setup( ctx );
+}
+
+/**
+ * @brief Obtain the unavailable mutex and wait forever.
+ */
+static void RtemsSemReqPerfMtxPiWaitForever_Body(
+ RtemsSemValPerf_Context *ctx
+)
+{
+ ctx->begin = T_tick();
+ ctx->status = rtems_semaphore_obtain(
+ ctx->mutex_id,
+ RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+}
+
+static void RtemsSemReqPerfMtxPiWaitForever_Body_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiWaitForever_Body( ctx );
+}
+
+/**
+ * @brief Set the measured runtime. Restore the worker priority. Release the
+ * mutex. Discard samples interrupted by a clock tick.
+ */
+static bool RtemsSemReqPerfMtxPiWaitForever_Teardown(
+ RtemsSemValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc( ctx->status, RTEMS_SUCCESSFUL );
+
+ *delta = ctx->end - ctx->begin;
+ ReleaseMutex( ctx->mutex_id );
+ SetSelfPriority( PRIO_NORMAL );
+
+ return tic == toc;
+}
+
+static bool RtemsSemReqPerfMtxPiWaitForever_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsSemReqPerfMtxPiWaitForever_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsSemReqPerfMtxPiWaitTimed \
+ * spec:/rtems/sem/req/perf-mtx-pi-wait-timed
+ *
+ * @{
+ */
+
+/**
+ * @brief Make the mutex unavailable.
+ */
+static void RtemsSemReqPerfMtxPiWaitTimed_Setup( RtemsSemValPerf_Context *ctx )
+{
+ Send( ctx, EVENT_OBTAIN );
+ SetSelfPriority( PRIO_VERY_HIGH );
+ Send( ctx, EVENT_END | EVENT_RELEASE );
+}
+
+static void RtemsSemReqPerfMtxPiWaitTimed_Setup_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiWaitTimed_Setup( ctx );
+}
+
+/**
+ * @brief Obtain the unavailable mutex and wait forever.
+ */
+static void RtemsSemReqPerfMtxPiWaitTimed_Body( RtemsSemValPerf_Context *ctx )
+{
+ ctx->begin = T_tick();
+ ctx->status = rtems_semaphore_obtain(
+ ctx->mutex_id,
+ RTEMS_WAIT,
+ UINT32_MAX
+ );
+}
+
+static void RtemsSemReqPerfMtxPiWaitTimed_Body_Wrap( void *arg )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsSemReqPerfMtxPiWaitTimed_Body( ctx );
+}
+
+/**
+ * @brief Set the measured runtime. Restore the worker priority. Release the
+ * mutex. Discard samples interrupted by a clock tick.
+ */
+static bool RtemsSemReqPerfMtxPiWaitTimed_Teardown(
+ RtemsSemValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc( ctx->status, RTEMS_SUCCESSFUL );
+
+ *delta = ctx->end - ctx->begin;
+ ReleaseMutex( ctx->mutex_id );
+ SetSelfPriority( PRIO_NORMAL );
+
+ return tic == toc;
+}
+
+static bool RtemsSemReqPerfMtxPiWaitTimed_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsSemReqPerfMtxPiWaitTimed_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+/**
+ * @fn void T_case_body_RtemsSemValPerf( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsSemValPerf, &RtemsSemValPerf_Fixture )
+{
+ RtemsSemValPerf_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ctx->request.name = "RtemsSemReqPerfMtxPiObtain";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsSemReqPerfMtxPiObtain_Body_Wrap;
+ ctx->request.teardown = RtemsSemReqPerfMtxPiObtain_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ ctx->request.name = "RtemsSemReqPerfMtxPiRelease";
+ ctx->request.setup = RtemsSemReqPerfMtxPiRelease_Setup_Wrap;
+ ctx->request.body = RtemsSemReqPerfMtxPiRelease_Body_Wrap;
+ ctx->request.teardown = RtemsSemReqPerfMtxPiRelease_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ ctx->request.name = "RtemsSemReqPerfMtxPiReleaseOne";
+ ctx->request.setup = RtemsSemReqPerfMtxPiReleaseOne_Setup_Wrap;
+ ctx->request.body = RtemsSemReqPerfMtxPiReleaseOne_Body_Wrap;
+ ctx->request.teardown = RtemsSemReqPerfMtxPiReleaseOne_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ #if defined(RTEMS_SMP)
+ RtemsSemReqPerfMtxPiReleaseOtherCpu_Prepare( ctx );
+ ctx->request.name = "RtemsSemReqPerfMtxPiReleaseOtherCpu";
+ ctx->request.setup = RtemsSemReqPerfMtxPiReleaseOtherCpu_Setup_Wrap;
+ ctx->request.body = RtemsSemReqPerfMtxPiReleaseOtherCpu_Body_Wrap;
+ ctx->request.teardown = RtemsSemReqPerfMtxPiReleaseOtherCpu_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsSemReqPerfMtxPiReleaseOtherCpu_Cleanup( ctx );
+ #endif
+
+ ctx->request.name = "RtemsSemReqPerfMtxPiReleasePreempt";
+ ctx->request.setup = RtemsSemReqPerfMtxPiReleasePreempt_Setup_Wrap;
+ ctx->request.body = RtemsSemReqPerfMtxPiReleasePreempt_Body_Wrap;
+ ctx->request.teardown = RtemsSemReqPerfMtxPiReleasePreempt_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ RtemsSemReqPerfMtxPiTry_Prepare( ctx );
+ ctx->request.name = "RtemsSemReqPerfMtxPiTry";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsSemReqPerfMtxPiTry_Body_Wrap;
+ ctx->request.teardown = RtemsSemReqPerfMtxPiTry_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsSemReqPerfMtxPiTry_Cleanup( ctx );
+
+ ctx->request.name = "RtemsSemReqPerfMtxPiWaitForever";
+ ctx->request.setup = RtemsSemReqPerfMtxPiWaitForever_Setup_Wrap;
+ ctx->request.body = RtemsSemReqPerfMtxPiWaitForever_Body_Wrap;
+ ctx->request.teardown = RtemsSemReqPerfMtxPiWaitForever_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ ctx->request.name = "RtemsSemReqPerfMtxPiWaitTimed";
+ ctx->request.setup = RtemsSemReqPerfMtxPiWaitTimed_Setup_Wrap;
+ ctx->request.body = RtemsSemReqPerfMtxPiWaitTimed_Body_Wrap;
+ ctx->request.teardown = RtemsSemReqPerfMtxPiWaitTimed_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sem-release.c b/testsuites/validation/tc-sem-release.c
new file mode 100644
index 0000000000..1e9c2091c0
--- /dev/null
+++ b/testsuites/validation/tc-sem-release.c
@@ -0,0 +1,615 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSemReqRelease
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include "tr-mtx-surrender.h"
+#include "tr-sem-surrender.h"
+#include "tx-support.h"
+#include "tx-thread-queue.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSemReqRelease spec:/rtems/sem/req/release
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSemReqRelease_Pre_Class_Counting,
+ RtemsSemReqRelease_Pre_Class_Simple,
+ RtemsSemReqRelease_Pre_Class_Binary,
+ RtemsSemReqRelease_Pre_Class_PrioCeiling,
+ RtemsSemReqRelease_Pre_Class_PrioInherit,
+ RtemsSemReqRelease_Pre_Class_MrsP,
+ RtemsSemReqRelease_Pre_Class_NA
+} RtemsSemReqRelease_Pre_Class;
+
+typedef enum {
+ RtemsSemReqRelease_Pre_Discipline_FIFO,
+ RtemsSemReqRelease_Pre_Discipline_Priority,
+ RtemsSemReqRelease_Pre_Discipline_NA
+} RtemsSemReqRelease_Pre_Discipline;
+
+typedef enum {
+ RtemsSemReqRelease_Pre_Id_Valid,
+ RtemsSemReqRelease_Pre_Id_Invalid,
+ RtemsSemReqRelease_Pre_Id_NA
+} RtemsSemReqRelease_Pre_Id;
+
+typedef enum {
+ RtemsSemReqRelease_Post_Action_InvId,
+ RtemsSemReqRelease_Post_Action_BinarySurrender,
+ RtemsSemReqRelease_Post_Action_CountingSurrender,
+ RtemsSemReqRelease_Post_Action_MtxSurrender,
+ RtemsSemReqRelease_Post_Action_InheritMtxSurrender,
+ RtemsSemReqRelease_Post_Action_CeilingMtxSurrender,
+ RtemsSemReqRelease_Post_Action_MrsPMtxSurrender,
+ RtemsSemReqRelease_Post_Action_NA
+} RtemsSemReqRelease_Post_Action;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Class_NA : 1;
+ uint8_t Pre_Discipline_NA : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Post_Action : 3;
+} RtemsSemReqRelease_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/sem/req/release test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the thread queue test context.
+ */
+ union {
+ TQContext tq_ctx;
+ TQMtxContext tq_mtx_ctx;
+ TQSemContext tq_sem_ctx;
+ };
+
+ /**
+ * @brief This member specifies if the attribute set of the semaphore.
+ */
+ rtems_attribute attribute_set;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSemReqRelease_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSemReqRelease_Context;
+
+static RtemsSemReqRelease_Context
+ RtemsSemReqRelease_Instance;
+
+static const char * const RtemsSemReqRelease_PreDesc_Class[] = {
+ "Counting",
+ "Simple",
+ "Binary",
+ "PrioCeiling",
+ "PrioInherit",
+ "MrsP",
+ "NA"
+};
+
+static const char * const RtemsSemReqRelease_PreDesc_Discipline[] = {
+ "FIFO",
+ "Priority",
+ "NA"
+};
+
+static const char * const RtemsSemReqRelease_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const * const RtemsSemReqRelease_PreDesc[] = {
+ RtemsSemReqRelease_PreDesc_Class,
+ RtemsSemReqRelease_PreDesc_Discipline,
+ RtemsSemReqRelease_PreDesc_Id,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+typedef RtemsSemReqRelease_Context Context;
+
+static void RtemsSemReqRelease_Pre_Class_Prepare(
+ RtemsSemReqRelease_Context *ctx,
+ RtemsSemReqRelease_Pre_Class state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqRelease_Pre_Class_Counting: {
+ /*
+ * While the semaphore object is a counting semaphore.
+ */
+ ctx->attribute_set |= RTEMS_COUNTING_SEMAPHORE;
+ break;
+ }
+
+ case RtemsSemReqRelease_Pre_Class_Simple: {
+ /*
+ * While the semaphore object is a simple binary semaphore.
+ */
+ ctx->attribute_set |= RTEMS_SIMPLE_BINARY_SEMAPHORE;
+ break;
+ }
+
+ case RtemsSemReqRelease_Pre_Class_Binary: {
+ /*
+ * While the semaphore object is a binary semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE;
+ break;
+ }
+
+ case RtemsSemReqRelease_Pre_Class_PrioCeiling: {
+ /*
+ * While the semaphore object is a priority ceiling semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY_CEILING;
+ break;
+ }
+
+ case RtemsSemReqRelease_Pre_Class_PrioInherit: {
+ /*
+ * While the semaphore object is a priority inheritance semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY;
+ break;
+ }
+
+ case RtemsSemReqRelease_Pre_Class_MrsP: {
+ /*
+ * While the semaphore object is a MrsP semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING;
+ break;
+ }
+
+ case RtemsSemReqRelease_Pre_Class_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqRelease_Pre_Discipline_Prepare(
+ RtemsSemReqRelease_Context *ctx,
+ RtemsSemReqRelease_Pre_Discipline state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqRelease_Pre_Discipline_FIFO: {
+ /*
+ * While the semaphore uses the FIFO task wait queue discipline.
+ */
+ ctx->attribute_set |= RTEMS_FIFO;
+ ctx->tq_ctx.discipline = TQ_FIFO;
+ break;
+ }
+
+ case RtemsSemReqRelease_Pre_Discipline_Priority: {
+ /*
+ * While the semaphore uses the priority task wait queue discipline.
+ */
+ ctx->attribute_set |= RTEMS_PRIORITY;
+ ctx->tq_ctx.discipline = TQ_PRIORITY;
+ break;
+ }
+
+ case RtemsSemReqRelease_Pre_Discipline_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqRelease_Pre_Id_Prepare(
+ RtemsSemReqRelease_Context *ctx,
+ RtemsSemReqRelease_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqRelease_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is associated with the semaphore.
+ */
+ /* Nothing to prepare */
+ break;
+ }
+
+ case RtemsSemReqRelease_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is not associated with a semaphore.
+ */
+ /* Nothing to prepare */
+ break;
+ }
+
+ case RtemsSemReqRelease_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqRelease_Post_Action_Check(
+ RtemsSemReqRelease_Context *ctx,
+ RtemsSemReqRelease_Post_Action state
+)
+{
+ rtems_status_code sc;
+
+ switch ( state ) {
+ case RtemsSemReqRelease_Post_Action_InvId: {
+ /*
+ * The return status of rtems_semaphore_release() shall be
+ * RTEMS_INVALID_ID.
+ */
+ sc = rtems_semaphore_release( 0xffffffff );
+ T_rsc( sc, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsSemReqRelease_Post_Action_BinarySurrender: {
+ /*
+ * The calling task shall surrender the binary semaphore as specified by
+ * spec:/score/sem/req/surrender.
+ */
+ ctx->tq_ctx.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ ctx->tq_ctx.get_owner = NULL;
+ ctx->tq_sem_ctx.variant = TQ_SEM_BINARY;
+ ctx->tq_sem_ctx.get_count = TQSemGetCountClassic;
+ ctx->tq_sem_ctx.set_count = TQSemSetCountClassic;
+ ScoreSemReqSurrender_Run( &ctx->tq_sem_ctx );
+ break;
+ }
+
+ case RtemsSemReqRelease_Post_Action_CountingSurrender: {
+ /*
+ * The calling task shall surrender the counting semaphore as specified
+ * by spec:/score/sem/req/surrender.
+ */
+ ctx->tq_ctx.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ ctx->tq_ctx.get_owner = NULL;
+ ctx->tq_sem_ctx.variant = TQ_SEM_COUNTING;
+ ctx->tq_sem_ctx.get_count = TQSemGetCountClassic;
+ ctx->tq_sem_ctx.set_count = TQSemSetCountClassic;
+ ScoreSemReqSurrender_Run( &ctx->tq_sem_ctx );
+ break;
+ }
+
+ case RtemsSemReqRelease_Post_Action_MtxSurrender: {
+ /*
+ * The calling task shall surrender the mutex as specified by
+ * spec:/score/mtx/req/surrender where an enqueue blocks, a recursive
+ * seize is allowed, the owner is checked, and no locking protocol is
+ * used.
+ */
+ ctx->tq_ctx.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ ctx->tq_ctx.get_owner = TQGetOwnerClassicSem;
+ ctx->tq_mtx_ctx.protocol = TQ_MTX_NO_PROTOCOL;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ctx->tq_mtx_ctx.owner_check = TQ_MTX_CHECKS_OWNER;
+ ctx->tq_mtx_ctx.priority_ceiling = PRIO_INVALID;
+ ScoreMtxReqSurrender_Run( &ctx->tq_mtx_ctx );
+ break;
+ }
+
+ case RtemsSemReqRelease_Post_Action_InheritMtxSurrender: {
+ /*
+ * The calling task shall surrender the mutex as specified by
+ * spec:/score/mtx/req/surrender where an enqueue blocks, a recursive
+ * seize is allowed, the owner is checked, and a priority inheritance
+ * protocol is used.
+ */
+ ctx->tq_ctx.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ ctx->tq_ctx.get_owner = TQGetOwnerClassicSem;
+ ctx->tq_mtx_ctx.protocol = TQ_MTX_PRIORITY_INHERIT;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ctx->tq_mtx_ctx.owner_check = TQ_MTX_CHECKS_OWNER;
+ ctx->tq_mtx_ctx.priority_ceiling = PRIO_INVALID;
+ ScoreMtxReqSurrender_Run( &ctx->tq_mtx_ctx );
+ break;
+ }
+
+ case RtemsSemReqRelease_Post_Action_CeilingMtxSurrender: {
+ /*
+ * The calling task shall surrender the mutex as specified by
+ * spec:/score/mtx/req/surrender where an enqueue blocks, a recursive
+ * seize is allowed, the owner is checked, and a priority ceiling is
+ * used.
+ */
+ ctx->tq_ctx.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ ctx->tq_ctx.get_owner = TQGetOwnerClassicSem;
+ ctx->tq_mtx_ctx.protocol = TQ_MTX_PRIORITY_CEILING;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ctx->tq_mtx_ctx.owner_check = TQ_MTX_CHECKS_OWNER;
+ ctx->tq_mtx_ctx.priority_ceiling = PRIO_VERY_HIGH;
+ ScoreMtxReqSurrender_Run( &ctx->tq_mtx_ctx );
+ break;
+ }
+
+ case RtemsSemReqRelease_Post_Action_MrsPMtxSurrender: {
+ /*
+ * The calling task shall surrender the mutex as specified by
+ * spec:/score/mtx/req/surrender where an enqueue is sticky, a recursive
+ * seize returns an error status, the owner is checked, and a priority
+ * ceiling is used.
+ */
+ ctx->tq_ctx.enqueue_variant = TQ_ENQUEUE_STICKY;
+ ctx->tq_ctx.get_owner = TQGetOwnerClassicSem;
+ ctx->tq_mtx_ctx.protocol = TQ_MTX_MRSP;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_DEADLOCK;
+ ctx->tq_mtx_ctx.owner_check = TQ_MTX_CHECKS_OWNER;
+ ctx->tq_mtx_ctx.priority_ceiling = PRIO_VERY_HIGH;
+ ScoreMtxReqSurrender_Run( &ctx->tq_mtx_ctx );
+ break;
+ }
+
+ case RtemsSemReqRelease_Post_Action_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqRelease_Setup( RtemsSemReqRelease_Context *ctx )
+{
+ SetSelfPriority( PRIO_NORMAL );
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->tq_ctx.deadlock = TQ_DEADLOCK_STATUS;
+ ctx->tq_ctx.enqueue_prepare = TQEnqueuePrepareDefault;
+ ctx->tq_ctx.enqueue_done = TQEnqueueDoneDefault;
+ ctx->tq_ctx.enqueue = TQEnqueueClassicSem;
+ ctx->tq_ctx.surrender = TQSurrenderClassicSem;
+ ctx->tq_ctx.convert_status = TQConvertStatusClassic;
+ TQInitialize( &ctx->tq_ctx );
+}
+
+static void RtemsSemReqRelease_Setup_Wrap( void *arg )
+{
+ RtemsSemReqRelease_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqRelease_Setup( ctx );
+}
+
+static void RtemsSemReqRelease_Teardown( RtemsSemReqRelease_Context *ctx )
+{
+ TQDestroy( &ctx->tq_ctx );
+ RestoreRunnerPriority();
+}
+
+static void RtemsSemReqRelease_Teardown_Wrap( void *arg )
+{
+ RtemsSemReqRelease_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqRelease_Teardown( ctx );
+}
+
+static void RtemsSemReqRelease_Prepare( RtemsSemReqRelease_Context *ctx )
+{
+ ctx->attribute_set = RTEMS_DEFAULT_ATTRIBUTES;
+}
+
+static void RtemsSemReqRelease_Action( RtemsSemReqRelease_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_create(
+ NAME,
+ 1,
+ ctx->attribute_set,
+ PRIO_VERY_HIGH,
+ &ctx->tq_ctx.thread_queue_id
+ );
+ T_rsc_success( sc );
+
+ if ( ( ctx->attribute_set & RTEMS_MULTIPROCESSOR_RESOURCE_SHARING ) != 0 ) {
+ rtems_task_priority prio;
+
+ sc = rtems_semaphore_set_priority(
+ ctx->tq_ctx.thread_queue_id,
+ SCHEDULER_B_ID,
+ PRIO_VERY_HIGH,
+ &prio
+ );
+ T_rsc_success( sc );
+ }
+}
+
+static void RtemsSemReqRelease_Cleanup( RtemsSemReqRelease_Context *ctx )
+{
+ rtems_status_code sc;
+ sc = rtems_semaphore_delete( ctx->tq_ctx.thread_queue_id ); T_rsc_success( sc );
+}
+
+static const RtemsSemReqRelease_Entry
+RtemsSemReqRelease_Entries[] = {
+ { 0, 0, 0, 0, RtemsSemReqRelease_Post_Action_InvId },
+ { 1, 0, 0, 0, RtemsSemReqRelease_Post_Action_NA },
+ { 0, 0, 0, 0, RtemsSemReqRelease_Post_Action_CountingSurrender },
+ { 0, 0, 0, 0, RtemsSemReqRelease_Post_Action_BinarySurrender },
+ { 0, 0, 0, 0, RtemsSemReqRelease_Post_Action_MtxSurrender },
+ { 0, 0, 0, 0, RtemsSemReqRelease_Post_Action_CeilingMtxSurrender },
+ { 0, 0, 0, 0, RtemsSemReqRelease_Post_Action_InheritMtxSurrender },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, RtemsSemReqRelease_Post_Action_MrsPMtxSurrender },
+#else
+ { 1, 0, 0, 0, RtemsSemReqRelease_Post_Action_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, RtemsSemReqRelease_Post_Action_InvId }
+#else
+ { 1, 0, 0, 0, RtemsSemReqRelease_Post_Action_NA }
+#endif
+};
+
+static const uint8_t
+RtemsSemReqRelease_Map[] = {
+ 2, 0, 2, 0, 3, 0, 3, 0, 4, 0, 4, 0, 1, 1, 5, 0, 1, 1, 6, 0, 1, 1, 7, 8
+};
+
+static size_t RtemsSemReqRelease_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsSemReqRelease_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsSemReqRelease_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSemReqRelease_Fixture = {
+ .setup = RtemsSemReqRelease_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsSemReqRelease_Teardown_Wrap,
+ .scope = RtemsSemReqRelease_Scope,
+ .initial_context = &RtemsSemReqRelease_Instance
+};
+
+static inline RtemsSemReqRelease_Entry RtemsSemReqRelease_PopEntry(
+ RtemsSemReqRelease_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSemReqRelease_Entries[
+ RtemsSemReqRelease_Map[ index ]
+ ];
+}
+
+static void RtemsSemReqRelease_TestVariant( RtemsSemReqRelease_Context *ctx )
+{
+ RtemsSemReqRelease_Pre_Class_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSemReqRelease_Pre_Discipline_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsSemReqRelease_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsSemReqRelease_Action( ctx );
+ RtemsSemReqRelease_Post_Action_Check( ctx, ctx->Map.entry.Post_Action );
+}
+
+/**
+ * @fn void T_case_body_RtemsSemReqRelease( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsSemReqRelease, &RtemsSemReqRelease_Fixture )
+{
+ RtemsSemReqRelease_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsSemReqRelease_Pre_Class_Counting;
+ ctx->Map.pcs[ 0 ] < RtemsSemReqRelease_Pre_Class_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsSemReqRelease_Pre_Discipline_FIFO;
+ ctx->Map.pcs[ 1 ] < RtemsSemReqRelease_Pre_Discipline_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsSemReqRelease_Pre_Id_Valid;
+ ctx->Map.pcs[ 2 ] < RtemsSemReqRelease_Pre_Id_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ ctx->Map.entry = RtemsSemReqRelease_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsSemReqRelease_Prepare( ctx );
+ RtemsSemReqRelease_TestVariant( ctx );
+ RtemsSemReqRelease_Cleanup( ctx );
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sem-set-priority.c b/testsuites/validation/tc-sem-set-priority.c
new file mode 100644
index 0000000000..fc4501b6fa
--- /dev/null
+++ b/testsuites/validation/tc-sem-set-priority.c
@@ -0,0 +1,1136 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSemReqSetPriority
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSemReqSetPriority spec:/rtems/sem/req/set-priority
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSemReqSetPriority_Pre_Class_Counting,
+ RtemsSemReqSetPriority_Pre_Class_Simple,
+ RtemsSemReqSetPriority_Pre_Class_Binary,
+ RtemsSemReqSetPriority_Pre_Class_PrioCeilingNoOwner,
+ RtemsSemReqSetPriority_Pre_Class_PrioCeilingOwner,
+ RtemsSemReqSetPriority_Pre_Class_PrioInherit,
+ RtemsSemReqSetPriority_Pre_Class_MrsP,
+ RtemsSemReqSetPriority_Pre_Class_NA
+} RtemsSemReqSetPriority_Pre_Class;
+
+typedef enum {
+ RtemsSemReqSetPriority_Pre_SemId_Valid,
+ RtemsSemReqSetPriority_Pre_SemId_Invalid,
+ RtemsSemReqSetPriority_Pre_SemId_NA
+} RtemsSemReqSetPriority_Pre_SemId;
+
+typedef enum {
+ RtemsSemReqSetPriority_Pre_SchedId_Invalid,
+ RtemsSemReqSetPriority_Pre_SchedId_Create,
+ RtemsSemReqSetPriority_Pre_SchedId_Other,
+ RtemsSemReqSetPriority_Pre_SchedId_NA
+} RtemsSemReqSetPriority_Pre_SchedId;
+
+typedef enum {
+ RtemsSemReqSetPriority_Pre_NewPrio_Current,
+ RtemsSemReqSetPriority_Pre_NewPrio_Valid,
+ RtemsSemReqSetPriority_Pre_NewPrio_Invalid,
+ RtemsSemReqSetPriority_Pre_NewPrio_NA
+} RtemsSemReqSetPriority_Pre_NewPrio;
+
+typedef enum {
+ RtemsSemReqSetPriority_Pre_OldPrio_Valid,
+ RtemsSemReqSetPriority_Pre_OldPrio_Null,
+ RtemsSemReqSetPriority_Pre_OldPrio_NA
+} RtemsSemReqSetPriority_Pre_OldPrio;
+
+typedef enum {
+ RtemsSemReqSetPriority_Post_Status_Ok,
+ RtemsSemReqSetPriority_Post_Status_InvAddr,
+ RtemsSemReqSetPriority_Post_Status_InvId,
+ RtemsSemReqSetPriority_Post_Status_InvPrio,
+ RtemsSemReqSetPriority_Post_Status_NotDef,
+ RtemsSemReqSetPriority_Post_Status_NA
+} RtemsSemReqSetPriority_Post_Status;
+
+typedef enum {
+ RtemsSemReqSetPriority_Post_OwnerPrio_Nop,
+ RtemsSemReqSetPriority_Post_OwnerPrio_New,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA
+} RtemsSemReqSetPriority_Post_OwnerPrio;
+
+typedef enum {
+ RtemsSemReqSetPriority_Post_SemPrio_Set,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_SemPrio_NA
+} RtemsSemReqSetPriority_Post_SemPrio;
+
+typedef enum {
+ RtemsSemReqSetPriority_Post_OldPrioVar_Set,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_NA
+} RtemsSemReqSetPriority_Post_OldPrioVar;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Class_NA : 1;
+ uint16_t Pre_SemId_NA : 1;
+ uint16_t Pre_SchedId_NA : 1;
+ uint16_t Pre_NewPrio_NA : 1;
+ uint16_t Pre_OldPrio_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_OwnerPrio : 2;
+ uint16_t Post_SemPrio : 2;
+ uint16_t Post_OldPrioVar : 2;
+} RtemsSemReqSetPriority_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/sem/req/set-priority test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the scheduler identifier of the runner task.
+ */
+ rtems_id runner_scheduler_id;
+
+ /**
+ * @brief This member contains the scheduler identifier of a scheduler not
+ * used by the runner task.
+ */
+ rtems_id other_scheduler_id;
+
+ /**
+ * @brief This member specifies the initial count of the semaphore.
+ */
+ uint32_t count;
+
+ /**
+ * @brief This member specifies the attribute set of the semaphore.
+ */
+ rtems_attribute attribute_set;
+
+ /**
+ * @brief This member contains the semaphore identifier.
+ */
+ rtems_id the_semaphore_id;
+
+ /**
+ * @brief If this member is true, then the ``semaphore_id`` parameter value
+ * shall be associated with the semaphore, otherwise it shall be not
+ * associated with a semaphore.
+ */
+ bool valid_id;
+
+ /**
+ * @brief This member may contain the task priority returned by
+ * rtems_semaphore_set_priority().
+ */
+ rtems_task_priority old_priority_value;
+
+ /**
+ * @brief This member specifies the ``semaphore_id`` parameter for the
+ * rtems_semaphore_set_priority() call.
+ */
+ rtems_id semaphore_id;
+
+ /**
+ * @brief This member specifies the ``scheduler_id`` parameter for the
+ * rtems_semaphore_set_priority() call.
+ */
+ rtems_id scheduler_id;
+
+ /**
+ * @brief This member specifies the ``new_priority`` parameter for the
+ * rtems_semaphore_set_priority() call.
+ */
+ rtems_task_priority new_priority;
+
+ /**
+ * @brief This member specifies the ``old_priority`` parameter for the
+ * rtems_semaphore_set_priority() call.
+ */
+ rtems_task_priority *old_priority;
+
+ /**
+ * @brief This member contains the status of the
+ * rtems_semaphore_set_priority() call.
+ */
+ rtems_status_code status;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 5 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSemReqSetPriority_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSemReqSetPriority_Context;
+
+static RtemsSemReqSetPriority_Context
+ RtemsSemReqSetPriority_Instance;
+
+static const char * const RtemsSemReqSetPriority_PreDesc_Class[] = {
+ "Counting",
+ "Simple",
+ "Binary",
+ "PrioCeilingNoOwner",
+ "PrioCeilingOwner",
+ "PrioInherit",
+ "MrsP",
+ "NA"
+};
+
+static const char * const RtemsSemReqSetPriority_PreDesc_SemId[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsSemReqSetPriority_PreDesc_SchedId[] = {
+ "Invalid",
+ "Create",
+ "Other",
+ "NA"
+};
+
+static const char * const RtemsSemReqSetPriority_PreDesc_NewPrio[] = {
+ "Current",
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsSemReqSetPriority_PreDesc_OldPrio[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsSemReqSetPriority_PreDesc[] = {
+ RtemsSemReqSetPriority_PreDesc_Class,
+ RtemsSemReqSetPriority_PreDesc_SemId,
+ RtemsSemReqSetPriority_PreDesc_SchedId,
+ RtemsSemReqSetPriority_PreDesc_NewPrio,
+ RtemsSemReqSetPriority_PreDesc_OldPrio,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+typedef RtemsSemReqSetPriority_Context Context;
+
+static void ReleaseSemaphore( const Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_release( ctx->the_semaphore_id );
+ T_rsc_success( sc );
+}
+
+static void ChangeScheduler( rtems_id scheduler_id )
+{
+#if defined(RTEMS_SMP)
+ rtems_status_code sc;
+
+ sc = rtems_task_set_scheduler( RTEMS_SELF, scheduler_id, PRIO_NORMAL );
+ T_rsc_success( sc );
+#else
+ (void) scheduler_id;
+#endif
+}
+
+static void CheckPriority(
+ const Context *ctx,
+ rtems_id scheduler_id,
+ rtems_task_priority priority
+)
+{
+ rtems_status_code sc;
+
+ ChangeScheduler( scheduler_id );
+
+ sc = rtems_semaphore_obtain(
+ ctx->the_semaphore_id,
+ RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+ T_rsc_success( sc );
+
+ T_eq_u32( GetSelfPriority(), priority );
+
+ ReleaseSemaphore( ctx );
+ ChangeScheduler( ctx->runner_scheduler_id );
+}
+
+static void CheckNotDefined(
+ const Context *ctx,
+ rtems_id scheduler_id
+)
+{
+#if defined(RTEMS_SMP)
+ rtems_status_code sc;
+
+ ChangeScheduler( scheduler_id );
+
+ sc = rtems_semaphore_obtain(
+ ctx->the_semaphore_id,
+ RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+ T_rsc( sc, RTEMS_NOT_DEFINED );
+
+ ChangeScheduler( ctx->runner_scheduler_id );
+#else
+ (void) ctx;
+ (void) scheduler_id;
+#endif
+}
+
+static void RtemsSemReqSetPriority_Pre_Class_Prepare(
+ RtemsSemReqSetPriority_Context *ctx,
+ RtemsSemReqSetPriority_Pre_Class state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqSetPriority_Pre_Class_Counting: {
+ /*
+ * While the semaphore object is a counting semaphore.
+ */
+ ctx->attribute_set |= RTEMS_COUNTING_SEMAPHORE;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_Class_Simple: {
+ /*
+ * While the semaphore object is a simple binary semaphore.
+ */
+ ctx->attribute_set |= RTEMS_SIMPLE_BINARY_SEMAPHORE;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_Class_Binary: {
+ /*
+ * While the semaphore object is a binary semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_Class_PrioCeilingNoOwner: {
+ /*
+ * While the semaphore object is a priority ceiling semaphore, while the
+ * semaphore has no owner.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY_CEILING;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_Class_PrioCeilingOwner: {
+ /*
+ * While the semaphore object is a priority ceiling semaphore, while the
+ * semaphore has an owner.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY_CEILING;
+ ctx->count = 0;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_Class_PrioInherit: {
+ /*
+ * While the semaphore object is a priority inheritance semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_Class_MrsP: {
+ /*
+ * While the semaphore object is a MrsP semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_Class_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqSetPriority_Pre_SemId_Prepare(
+ RtemsSemReqSetPriority_Context *ctx,
+ RtemsSemReqSetPriority_Pre_SemId state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqSetPriority_Pre_SemId_Valid: {
+ /*
+ * While the ``semaphore_id`` parameter is associated with the semaphore.
+ */
+ ctx->valid_id = true;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_SemId_Invalid: {
+ /*
+ * While the ``semaphore_id`` parameter is not associated with a
+ * semaphore.
+ */
+ ctx->valid_id = false;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_SemId_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqSetPriority_Pre_SchedId_Prepare(
+ RtemsSemReqSetPriority_Context *ctx,
+ RtemsSemReqSetPriority_Pre_SchedId state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqSetPriority_Pre_SchedId_Invalid: {
+ /*
+ * While the ``scheduler_id`` parameter is not associated with a
+ * scheduler.
+ */
+ ctx->scheduler_id = INVALID_ID;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_SchedId_Create: {
+ /*
+ * While the ``scheduler_id`` parameter is associated with the scheduler
+ * used to create the semaphore.
+ */
+ ctx->scheduler_id = ctx->runner_scheduler_id;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_SchedId_Other: {
+ /*
+ * While the ``scheduler_id`` parameter is associated with a scheduler
+ * other than the one used to create the semaphore.
+ */
+ ctx->scheduler_id = ctx->other_scheduler_id;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_SchedId_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqSetPriority_Pre_NewPrio_Prepare(
+ RtemsSemReqSetPriority_Context *ctx,
+ RtemsSemReqSetPriority_Pre_NewPrio state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqSetPriority_Pre_NewPrio_Current: {
+ /*
+ * While the ``new_priority`` parameter is equal to
+ * RTEMS_CURRENT_PRIORITY.
+ */
+ ctx->new_priority = RTEMS_CURRENT_PRIORITY;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_NewPrio_Valid: {
+ /*
+ * While the ``new_priority`` parameter is not equal to
+ * RTEMS_CURRENT_PRIORITY and valid with respect to the scheduler
+ * specified by the ``scheduler_id`` parameter.
+ */
+ ctx->new_priority = PRIO_VERY_HIGH;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_NewPrio_Invalid: {
+ /*
+ * While the ``new_priority`` parameter is invalid with respect to the
+ * scheduler specified by the ``scheduler_id`` parameter.
+ */
+ ctx->new_priority = PRIO_INVALID;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_NewPrio_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqSetPriority_Pre_OldPrio_Prepare(
+ RtemsSemReqSetPriority_Context *ctx,
+ RtemsSemReqSetPriority_Pre_OldPrio state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqSetPriority_Pre_OldPrio_Valid: {
+ /*
+ * While the ``old_priority`` parameter references an object of type
+ * rtems_task_priority.
+ */
+ ctx->old_priority = &ctx->old_priority_value;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_OldPrio_Null: {
+ /*
+ * While the ``old_priority`` parameter is NULL.
+ */
+ ctx->old_priority = NULL;
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Pre_OldPrio_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqSetPriority_Post_Status_Check(
+ RtemsSemReqSetPriority_Context *ctx,
+ RtemsSemReqSetPriority_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqSetPriority_Post_Status_Ok: {
+ /*
+ * The return status of rtems_semaphore_set_priority() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_semaphore_set_priority() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Post_Status_InvId: {
+ /*
+ * The return status of rtems_semaphore_set_priority() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Post_Status_InvPrio: {
+ /*
+ * The return status of rtems_semaphore_set_priority() shall be
+ * RTEMS_INVALID_PRIORITY.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_PRIORITY );
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Post_Status_NotDef: {
+ /*
+ * The return status of rtems_semaphore_set_priority() shall be
+ * RTEMS_NOT_DEFINED.
+ */
+ T_rsc( ctx->status, RTEMS_NOT_DEFINED );
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqSetPriority_Post_OwnerPrio_Check(
+ RtemsSemReqSetPriority_Context *ctx,
+ RtemsSemReqSetPriority_Post_OwnerPrio state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqSetPriority_Post_OwnerPrio_Nop: {
+ /*
+ * The current priority of the owner task of the semaphore for the
+ * scheduler specified by the ``scheduler_id`` parameter shall not be
+ * modified by the rtems_semaphore_set_priority() call.
+ */
+ T_eq_u32( GetSelfPriority(), PRIO_HIGH );
+ ReleaseSemaphore( ctx );
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Post_OwnerPrio_New: {
+ /*
+ * The current priority of the owner task of the semaphore for the
+ * scheduler specified by the ``scheduler_id`` parameter shall be less
+ * than or equal to the value of the ``new_priority`` parameter.
+ */
+ T_eq_u32( GetSelfPriority(), PRIO_VERY_HIGH );
+ ReleaseSemaphore( ctx );
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Post_OwnerPrio_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqSetPriority_Post_SemPrio_Check(
+ RtemsSemReqSetPriority_Context *ctx,
+ RtemsSemReqSetPriority_Post_SemPrio state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqSetPriority_Post_SemPrio_Set: {
+ /*
+ * The priority used for the scheduler specified by the ``scheduler_id``
+ * parameter of the semaphore associated with the identifier specified by
+ * the ``semaphore_id`` parameter shall be set to the prioriy specified
+ * by the ``new_priority`` parameter during the
+ * rtems_semaphore_set_priority() call.
+ */
+ if ( ( ctx->attribute_set & RTEMS_MULTIPROCESSOR_RESOURCE_SHARING ) != 0 ) {
+ if ( ctx->scheduler_id == ctx->other_scheduler_id ) {
+ CheckPriority( ctx, ctx->runner_scheduler_id, PRIO_HIGH );
+ CheckPriority( ctx, ctx->other_scheduler_id, PRIO_VERY_HIGH );
+ } else {
+ CheckPriority( ctx, ctx->runner_scheduler_id, PRIO_VERY_HIGH );
+ #if defined(RTEMS_SMP)
+ CheckPriority( ctx, ctx->other_scheduler_id, 0 );
+ #endif
+ }
+ } else if ( ( ctx->attribute_set & RTEMS_PRIORITY_CEILING ) != 0 ) {
+ CheckPriority( ctx, ctx->runner_scheduler_id, PRIO_VERY_HIGH );
+ CheckNotDefined( ctx, ctx->other_scheduler_id );
+ }
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Post_SemPrio_Nop: {
+ /*
+ * Priorities used by semaphores shall not be modified by the
+ * rtems_semaphore_set_priority() call.
+ */
+ if ( ( ctx->attribute_set & RTEMS_MULTIPROCESSOR_RESOURCE_SHARING ) != 0 ) {
+ CheckPriority( ctx, ctx->runner_scheduler_id, PRIO_HIGH );
+ #if defined(RTEMS_SMP)
+ CheckPriority( ctx, ctx->other_scheduler_id, 0 );
+ #endif
+ } else if ( ( ctx->attribute_set & RTEMS_PRIORITY_CEILING ) != 0 ) {
+ CheckPriority( ctx, ctx->runner_scheduler_id, PRIO_HIGH );
+ CheckNotDefined( ctx, ctx->other_scheduler_id );
+ }
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Post_SemPrio_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqSetPriority_Post_OldPrioVar_Check(
+ RtemsSemReqSetPriority_Context *ctx,
+ RtemsSemReqSetPriority_Post_OldPrioVar state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqSetPriority_Post_OldPrioVar_Set: {
+ /*
+ * The value of the object referenced by the ``old_priority`` parameter
+ * shall be set to the priority used for the scheduler specified by the
+ * ``scheduler_id`` parameter of the semaphore associated with the
+ * identifier specified by the ``semaphore_id`` parameter right before
+ * the priority is set by the rtems_semaphore_set_priority() call.
+ */
+ T_eq_ptr( ctx->old_priority, &ctx->old_priority_value );
+
+ if ( ctx->scheduler_id == ctx->other_scheduler_id ) {
+ T_eq_u32( ctx->old_priority_value, 0 );
+ } else {
+ T_eq_u32( ctx->old_priority_value, PRIO_HIGH );
+ }
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Post_OldPrioVar_Nop: {
+ /*
+ * Objects referenced by the ``old_priority`` parameter in past calls to
+ * rtems_semaphore_set_priority() shall not be accessed by the
+ * rtems_semaphore_set_priority() call.
+ */
+ T_eq_u32( ctx->old_priority_value, PRIO_INVALID );
+ break;
+ }
+
+ case RtemsSemReqSetPriority_Post_OldPrioVar_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqSetPriority_Setup( RtemsSemReqSetPriority_Context *ctx )
+{
+ rtems_status_code sc;
+
+ memset( ctx, 0, sizeof( *ctx ) );
+ SetSelfPriority( PRIO_NORMAL );
+
+ sc = rtems_task_get_scheduler( RTEMS_SELF, &ctx->runner_scheduler_id );
+ T_rsc_success( sc );
+
+ #if defined(RTEMS_SMP)
+ sc = rtems_scheduler_ident(
+ TEST_SCHEDULER_B_NAME,
+ &ctx->other_scheduler_id
+ );
+ T_rsc_success( sc );
+ #else
+ ctx->other_scheduler_id = INVALID_ID;
+ #endif
+}
+
+static void RtemsSemReqSetPriority_Setup_Wrap( void *arg )
+{
+ RtemsSemReqSetPriority_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqSetPriority_Setup( ctx );
+}
+
+static void RtemsSemReqSetPriority_Teardown(
+ RtemsSemReqSetPriority_Context *ctx
+)
+{
+ RestoreRunnerPriority();
+}
+
+static void RtemsSemReqSetPriority_Teardown_Wrap( void *arg )
+{
+ RtemsSemReqSetPriority_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqSetPriority_Teardown( ctx );
+}
+
+static void RtemsSemReqSetPriority_Prepare(
+ RtemsSemReqSetPriority_Context *ctx
+)
+{
+ ctx->old_priority_value = PRIO_INVALID;
+ ctx->count = 1;
+ ctx->attribute_set = RTEMS_PRIORITY;
+ ctx->valid_id = true;
+}
+
+static void RtemsSemReqSetPriority_Action(
+ RtemsSemReqSetPriority_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_create(
+ NAME,
+ ctx->count,
+ ctx->attribute_set,
+ PRIO_HIGH,
+ &ctx->the_semaphore_id
+ );
+ T_rsc_success( sc );
+
+ if ( ctx->valid_id ) {
+ ctx->semaphore_id = ctx->the_semaphore_id;
+ } else {
+ ctx->semaphore_id = INVALID_ID;
+ }
+
+ ctx->status = rtems_semaphore_set_priority(
+ ctx->semaphore_id,
+ ctx->scheduler_id,
+ ctx->new_priority,
+ ctx->old_priority
+ );
+}
+
+static void RtemsSemReqSetPriority_Cleanup(
+ RtemsSemReqSetPriority_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ T_eq_u32( GetSelfPriority(), PRIO_NORMAL );
+
+ sc = rtems_semaphore_delete( ctx->the_semaphore_id );
+ T_rsc_success( sc );
+}
+
+static const RtemsSemReqSetPriority_Entry
+RtemsSemReqSetPriority_Entries[] = {
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_InvAddr,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_InvId,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_InvAddr,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+#else
+ { 1, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_NA,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_NA,
+ RtemsSemReqSetPriority_Post_OldPrioVar_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_InvId,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+#else
+ { 1, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_NA,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_NA,
+ RtemsSemReqSetPriority_Post_OldPrioVar_NA },
+#endif
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_InvAddr,
+ RtemsSemReqSetPriority_Post_OwnerPrio_Nop,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_NotDef,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+#else
+ { 1, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_NA,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_NA,
+ RtemsSemReqSetPriority_Post_OldPrioVar_NA },
+#endif
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_InvId,
+ RtemsSemReqSetPriority_Post_OwnerPrio_Nop,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_NotDef,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_InvPrio,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_InvPrio,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+#else
+ { 1, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_NA,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_NA,
+ RtemsSemReqSetPriority_Post_OldPrioVar_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_InvAddr,
+ RtemsSemReqSetPriority_Post_OwnerPrio_Nop,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+#else
+ { 1, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_NA,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_NA,
+ RtemsSemReqSetPriority_Post_OldPrioVar_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_InvId,
+ RtemsSemReqSetPriority_Post_OwnerPrio_Nop,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+#else
+ { 1, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_NA,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_NA,
+ RtemsSemReqSetPriority_Post_OldPrioVar_NA },
+#endif
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_Ok,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Set },
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_Ok,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_Set,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Set },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_NotDef,
+ RtemsSemReqSetPriority_Post_OwnerPrio_Nop,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+#else
+ { 1, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_NA,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_NA,
+ RtemsSemReqSetPriority_Post_OldPrioVar_NA },
+#endif
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_Ok,
+ RtemsSemReqSetPriority_Post_OwnerPrio_Nop,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Set },
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_Ok,
+ RtemsSemReqSetPriority_Post_OwnerPrio_New,
+ RtemsSemReqSetPriority_Post_SemPrio_Set,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Set },
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_InvPrio,
+ RtemsSemReqSetPriority_Post_OwnerPrio_Nop,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_InvPrio,
+ RtemsSemReqSetPriority_Post_OwnerPrio_Nop,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Nop },
+#else
+ { 1, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_NA,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_NA,
+ RtemsSemReqSetPriority_Post_OldPrioVar_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_Ok,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_Nop,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Set },
+#else
+ { 1, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_NA,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_NA,
+ RtemsSemReqSetPriority_Post_OldPrioVar_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_Ok,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_Set,
+ RtemsSemReqSetPriority_Post_OldPrioVar_Set }
+#else
+ { 1, 0, 0, 0, 0, 0, RtemsSemReqSetPriority_Post_Status_NA,
+ RtemsSemReqSetPriority_Post_OwnerPrio_NA,
+ RtemsSemReqSetPriority_Post_SemPrio_NA,
+ RtemsSemReqSetPriority_Post_OldPrioVar_NA }
+#endif
+};
+
+static const uint8_t
+RtemsSemReqSetPriority_Map[] = {
+ 1, 0, 1, 0, 1, 0, 7, 0, 7, 0, 8, 0, 5, 2, 5, 2, 9, 2, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 3, 2, 3, 2, 3, 2, 1, 0, 1, 0, 1, 0, 7, 0, 7, 0, 8, 0, 5, 2, 5, 2,
+ 9, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 2, 3, 2, 3, 2, 1, 0, 1, 0, 1, 0,
+ 7, 0, 7, 0, 8, 0, 5, 2, 5, 2, 9, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 2,
+ 3, 2, 3, 2, 1, 0, 1, 0, 1, 0, 12, 0, 13, 0, 8, 0, 5, 2, 5, 2, 9, 2, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 2, 3, 2, 3, 2, 6, 4, 6, 4, 6, 4, 15, 4, 16, 4,
+ 17, 4, 14, 10, 14, 10, 18, 10, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 11, 10,
+ 11, 10, 11, 10, 1, 0, 1, 0, 1, 0, 7, 0, 7, 0, 8, 0, 5, 2, 5, 2, 9, 2, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 2, 3, 2, 3, 2, 1, 0, 1, 0, 1, 0, 12, 0, 13,
+ 0, 8, 0, 19, 2, 20, 2, 9, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 2, 3, 2,
+ 3, 2
+};
+
+static size_t RtemsSemReqSetPriority_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsSemReqSetPriority_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsSemReqSetPriority_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSemReqSetPriority_Fixture = {
+ .setup = RtemsSemReqSetPriority_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsSemReqSetPriority_Teardown_Wrap,
+ .scope = RtemsSemReqSetPriority_Scope,
+ .initial_context = &RtemsSemReqSetPriority_Instance
+};
+
+static inline RtemsSemReqSetPriority_Entry RtemsSemReqSetPriority_PopEntry(
+ RtemsSemReqSetPriority_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSemReqSetPriority_Entries[
+ RtemsSemReqSetPriority_Map[ index ]
+ ];
+}
+
+static void RtemsSemReqSetPriority_TestVariant(
+ RtemsSemReqSetPriority_Context *ctx
+)
+{
+ RtemsSemReqSetPriority_Pre_Class_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSemReqSetPriority_Pre_SemId_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsSemReqSetPriority_Pre_SchedId_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsSemReqSetPriority_Pre_NewPrio_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsSemReqSetPriority_Pre_OldPrio_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsSemReqSetPriority_Action( ctx );
+ RtemsSemReqSetPriority_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsSemReqSetPriority_Post_OwnerPrio_Check(
+ ctx,
+ ctx->Map.entry.Post_OwnerPrio
+ );
+ RtemsSemReqSetPriority_Post_SemPrio_Check(
+ ctx,
+ ctx->Map.entry.Post_SemPrio
+ );
+ RtemsSemReqSetPriority_Post_OldPrioVar_Check(
+ ctx,
+ ctx->Map.entry.Post_OldPrioVar
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsSemReqSetPriority( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsSemReqSetPriority, &RtemsSemReqSetPriority_Fixture )
+{
+ RtemsSemReqSetPriority_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsSemReqSetPriority_Pre_Class_Counting;
+ ctx->Map.pcs[ 0 ] < RtemsSemReqSetPriority_Pre_Class_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsSemReqSetPriority_Pre_SemId_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsSemReqSetPriority_Pre_SemId_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsSemReqSetPriority_Pre_SchedId_Invalid;
+ ctx->Map.pcs[ 2 ] < RtemsSemReqSetPriority_Pre_SchedId_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsSemReqSetPriority_Pre_NewPrio_Current;
+ ctx->Map.pcs[ 3 ] < RtemsSemReqSetPriority_Pre_NewPrio_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsSemReqSetPriority_Pre_OldPrio_Valid;
+ ctx->Map.pcs[ 4 ] < RtemsSemReqSetPriority_Pre_OldPrio_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ ctx->Map.entry = RtemsSemReqSetPriority_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsSemReqSetPriority_Prepare( ctx );
+ RtemsSemReqSetPriority_TestVariant( ctx );
+ RtemsSemReqSetPriority_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sem-smp.c b/testsuites/validation/tc-sem-smp.c
new file mode 100644
index 0000000000..5dc3f437a1
--- /dev/null
+++ b/testsuites/validation/tc-sem-smp.c
@@ -0,0 +1,478 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSemValSmp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/threaddispatch.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSemValSmp spec:/rtems/sem/val/smp
+ *
+ * @ingroup TestsuitesValidationSmpOnly0
+ *
+ * @brief Tests SMP-specific semaphore behaviour.
+ *
+ * This test case performs the following actions:
+ *
+ * - Create a worker thread and a MrsP mutex. Use the mutex and the worker to
+ * perform a bad sticky thread queue enqueue.
+ *
+ * - Create two worker threads, a MrsP mutex, and a priority inheritance mutex.
+ * Use the mutexes and the workers to raise the current priority to a higher
+ * priority than the ceiling priority of the mutex while one of the workers
+ * waits on the mutex.
+ *
+ * - Let the first worker try to obtain the MrsP mutex. Check that it
+ * acquired the ceiling priority.
+ *
+ * - Let the second worker try to obtain the priority inheritance mutex.
+ * Check that the first worker inherited the priority from the second
+ * worker.
+ *
+ * - Set the real priority of the first worker. Check that it defines the
+ * current priority.
+ *
+ * - Release the MrsP mutex so that the first worker can to obtain it. It
+ * will replace a temporary priority node which is the maximum priority
+ * node. This is the first scenario we want to test.
+ *
+ * - Obtain the MrsP mutex for the runner thread to start the second scenario
+ * we would like to test.
+ *
+ * - Let the first worker try to obtain the MrsP mutex. Check that it
+ * acquired the ceiling priority.
+ *
+ * - Let the second worker try to obtain the priority inheritance mutex.
+ * Check that the first worker inherited the priority from the second
+ * worker.
+ *
+ * - Lower the priority of the second worker. Check that the inherited
+ * priority of the first worker reflects this priority change.
+ *
+ * - Change the real priority of the first worker so that it defines its
+ * current priority.
+ *
+ * - Release the MrsP mutex so that the first worker can to obtain it. It
+ * will replace a temporary priority node which is between the minimum and
+ * maximum priority node. This is the second scenario we want to test.
+ *
+ * - Clean up all used resources.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/rtems/sem/val/smp test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the mutex identifier.
+ */
+ rtems_id mutex_id;
+
+ /**
+ * @brief This member contains the second mutex identifier.
+ */
+ rtems_id mutex_2_id;
+
+ /**
+ * @brief If this member is true, then the worker is done.
+ */
+ volatile bool done;
+
+ /**
+ * @brief If this member is true, then the second worker is done.
+ */
+ volatile bool done_2;
+} RtemsSemValSmp_Context;
+
+static RtemsSemValSmp_Context
+ RtemsSemValSmp_Instance;
+
+typedef RtemsSemValSmp_Context Context;
+
+static void BadEnqueueFatal(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ Per_CPU_Control *cpu_self;
+ Context *ctx;
+
+ T_eq_int( source, INTERNAL_ERROR_CORE );
+ T_eq_ulong(
+ code,
+ INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_STICKY_FROM_BAD_STATE
+ );
+
+ SetFatalHandler( NULL, NULL );
+
+ cpu_self = _Per_CPU_Get();
+ _Thread_Dispatch_unnest( cpu_self );
+ _Thread_Dispatch_unnest( cpu_self );
+
+ ctx = arg;
+ ctx->done = true;
+ SuspendSelf();
+}
+
+static void BadEnqueueTask( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+ (void) _Thread_Dispatch_disable();
+ ObtainMutex( ctx->mutex_id );
+}
+
+static void ObtainReleaseMrsPTask( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+ ObtainMutex( ctx->mutex_2_id );
+ ctx->done = true;
+ ObtainMutex( ctx->mutex_id );
+ ReleaseMutex( ctx->mutex_id );
+ ReleaseMutex( ctx->mutex_2_id );
+ ctx->done = true;
+ SuspendSelf();
+}
+
+static void ObtainRelease2Task( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+ ctx->done_2 = true;
+ ObtainMutex( ctx->mutex_2_id );
+ ReleaseMutex( ctx->mutex_2_id );
+ ctx->done_2 = true;
+ SuspendSelf();
+}
+
+static void RtemsSemValSmp_Setup( RtemsSemValSmp_Context *ctx )
+{
+ SetSelfPriority( PRIO_NORMAL );
+}
+
+static void RtemsSemValSmp_Setup_Wrap( void *arg )
+{
+ RtemsSemValSmp_Context *ctx;
+
+ ctx = arg;
+ RtemsSemValSmp_Setup( ctx );
+}
+
+static void RtemsSemValSmp_Teardown( RtemsSemValSmp_Context *ctx )
+{
+ RestoreRunnerPriority();
+}
+
+static void RtemsSemValSmp_Teardown_Wrap( void *arg )
+{
+ RtemsSemValSmp_Context *ctx;
+
+ ctx = arg;
+ RtemsSemValSmp_Teardown( ctx );
+}
+
+static T_fixture RtemsSemValSmp_Fixture = {
+ .setup = RtemsSemValSmp_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsSemValSmp_Teardown_Wrap,
+ .scope = NULL,
+ .initial_context = &RtemsSemValSmp_Instance
+};
+
+/**
+ * @brief Create a worker thread and a MrsP mutex. Use the mutex and the
+ * worker to perform a bad sticky thread queue enqueue.
+ */
+static void RtemsSemValSmp_Action_0( RtemsSemValSmp_Context *ctx )
+{
+ rtems_status_code sc;
+ rtems_id worker_id;
+ rtems_id scheduler_b_id;
+
+ ctx->done = false;
+
+ sc = rtems_scheduler_ident( TEST_SCHEDULER_B_NAME, &scheduler_b_id );
+ T_rsc_success( sc );
+
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'U', 'T', 'X' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
+ PRIO_HIGH,
+ &ctx->mutex_id
+ );
+ T_rsc_success( sc );
+
+ worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ SetScheduler( worker_id, scheduler_b_id, PRIO_NORMAL );
+
+ ObtainMutex( ctx->mutex_id );
+ SetFatalHandler( BadEnqueueFatal, ctx );
+ StartTask( worker_id, BadEnqueueTask, ctx );
+
+ while ( !ctx->done ) {
+ /* Wait */
+ }
+
+ DeleteTask( worker_id );
+ ReleaseMutex( ctx->mutex_id );
+ DeleteMutex( ctx->mutex_id );
+}
+
+/**
+ * @brief Create two worker threads, a MrsP mutex, and a priority inheritance
+ * mutex. Use the mutexes and the workers to raise the current priority to a
+ * higher priority than the ceiling priority of the mutex while one of the
+ * workers waits on the mutex.
+ */
+static void RtemsSemValSmp_Action_1( RtemsSemValSmp_Context *ctx )
+{
+ rtems_status_code sc;
+ rtems_id worker_id;
+ rtems_id worker_2_id;
+ rtems_id scheduler_b_id;
+ rtems_task_priority prio;
+
+ sc = rtems_scheduler_ident( TEST_SCHEDULER_B_NAME, &scheduler_b_id );
+ T_rsc_success( sc );
+
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'U', 'T', 'X' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
+ PRIO_HIGH,
+ &ctx->mutex_id
+ );
+ T_rsc_success( sc );
+
+ sc = rtems_semaphore_set_priority(
+ ctx->mutex_id,
+ scheduler_b_id,
+ PRIO_HIGH,
+ &prio
+ );
+ T_rsc_success( sc );
+
+ ctx->mutex_2_id = CreateMutex();
+
+ worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ SetScheduler( worker_id, scheduler_b_id, PRIO_NORMAL );
+
+ worker_2_id = CreateTask( "WRK2", PRIO_NORMAL );
+ SetScheduler( worker_2_id, scheduler_b_id, PRIO_VERY_HIGH );
+
+ /*
+ * Let the first worker try to obtain the MrsP mutex. Check that it acquired
+ * the ceiling priority.
+ */
+ ObtainMutex( ctx->mutex_id );
+ ctx->done = false;
+ StartTask( worker_id, ObtainReleaseMrsPTask, ctx );
+
+ while ( !ctx->done ) {
+ /* Wait */
+ }
+
+ ctx->done = false;
+ WaitForIntendToBlock( worker_id );
+ prio = GetPriorityByScheduler( worker_id, scheduler_b_id );
+ T_eq_u32( prio, PRIO_HIGH );
+
+ /*
+ * Let the second worker try to obtain the priority inheritance mutex. Check
+ * that the first worker inherited the priority from the second worker.
+ */
+ ctx->done_2 = false;
+ StartTask( worker_2_id, ObtainRelease2Task, ctx );
+
+ while ( !ctx->done_2 ) {
+ /* Wait */
+ }
+
+ ctx->done_2 = false;
+ WaitForExecutionStop( worker_2_id );
+ prio = GetPriorityByScheduler( worker_id, scheduler_b_id );
+ T_eq_u32( prio, PRIO_VERY_HIGH );
+
+ /*
+ * Set the real priority of the first worker. Check that it defines the
+ * current priority.
+ */
+ SetPriority( worker_id, PRIO_ULTRA_HIGH );
+
+ prio = GetPriorityByScheduler( worker_id, scheduler_b_id );
+ T_eq_u32( prio, PRIO_ULTRA_HIGH );
+
+ /*
+ * Release the MrsP mutex so that the first worker can to obtain it. It will
+ * replace a temporary priority node which is the maximum priority node.
+ * This is the first scenario we want to test.
+ */
+ ReleaseMutex( ctx->mutex_id );
+
+ while ( !ctx->done || !ctx->done_2 ) {
+ /* Wait */
+ }
+
+ prio = GetPriorityByScheduler( worker_id, scheduler_b_id );
+ T_eq_u32( prio, PRIO_ULTRA_HIGH );
+
+ /*
+ * Obtain the MrsP mutex for the runner thread to start the second scenario
+ * we would like to test.
+ */
+ ObtainMutex( ctx->mutex_id );
+
+ /*
+ * Let the first worker try to obtain the MrsP mutex. Check that it acquired
+ * the ceiling priority.
+ */
+ ctx->done = false;
+ sc = rtems_task_restart( worker_id, (rtems_task_argument) ctx );
+ T_rsc_success( sc );
+
+ while ( !ctx->done ) {
+ /* Wait */
+ }
+
+ ctx->done = false;
+ WaitForIntendToBlock( worker_id );
+ prio = GetPriorityByScheduler( worker_id, scheduler_b_id );
+ T_eq_u32( prio, PRIO_HIGH );
+
+ /*
+ * Let the second worker try to obtain the priority inheritance mutex. Check
+ * that the first worker inherited the priority from the second worker.
+ */
+ ctx->done_2 = false;
+ sc = rtems_task_restart( worker_2_id, (rtems_task_argument) ctx );
+ T_rsc_success( sc );
+
+ while ( !ctx->done_2 ) {
+ /* Wait */
+ }
+
+ ctx->done_2 = false;
+ WaitForExecutionStop( worker_2_id );
+ prio = GetPriorityByScheduler( worker_id, scheduler_b_id );
+ T_eq_u32( prio, PRIO_VERY_HIGH );
+
+ /*
+ * Lower the priority of the second worker. Check that the inherited
+ * priority of the first worker reflects this priority change.
+ */
+ SetPriority( worker_2_id, PRIO_LOW );
+
+ prio = GetPriorityByScheduler( worker_id, scheduler_b_id );
+ T_eq_u32( prio, PRIO_HIGH );
+
+ /*
+ * Change the real priority of the first worker so that it defines its
+ * current priority.
+ */
+ SetPriority( worker_id, PRIO_ULTRA_HIGH );
+
+ prio = GetPriorityByScheduler( worker_id, scheduler_b_id );
+ T_eq_u32( prio, PRIO_ULTRA_HIGH );
+
+ /*
+ * Release the MrsP mutex so that the first worker can to obtain it. It will
+ * replace a temporary priority node which is between the minimum and maximum
+ * priority node. This is the second scenario we want to test.
+ */
+ ReleaseMutex( ctx->mutex_id );
+
+ while ( !ctx->done || !ctx->done_2 ) {
+ /* Wait */
+ }
+
+ prio = GetPriorityByScheduler( worker_id, scheduler_b_id );
+ T_eq_u32( prio, PRIO_ULTRA_HIGH );
+
+ /*
+ * Clean up all used resources.
+ */
+ DeleteTask( worker_id );
+ DeleteTask( worker_2_id );
+ DeleteMutex( ctx->mutex_id );
+ DeleteMutex( ctx->mutex_2_id );
+}
+
+/**
+ * @fn void T_case_body_RtemsSemValSmp( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsSemValSmp, &RtemsSemValSmp_Fixture )
+{
+ RtemsSemValSmp_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ RtemsSemValSmp_Action_0( ctx );
+ RtemsSemValSmp_Action_1( ctx );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sem-timeout.c b/testsuites/validation/tc-sem-timeout.c
new file mode 100644
index 0000000000..a150d067d2
--- /dev/null
+++ b/testsuites/validation/tc-sem-timeout.c
@@ -0,0 +1,476 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSemReqTimeout
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include "tr-tq-timeout-priority-inherit.h"
+#include "tr-tq-timeout.h"
+#include "tx-support.h"
+#include "tx-thread-queue.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSemReqTimeout spec:/rtems/sem/req/timeout
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSemReqTimeout_Pre_Class_Counting,
+ RtemsSemReqTimeout_Pre_Class_Simple,
+ RtemsSemReqTimeout_Pre_Class_Binary,
+ RtemsSemReqTimeout_Pre_Class_PrioCeiling,
+ RtemsSemReqTimeout_Pre_Class_PrioInherit,
+ RtemsSemReqTimeout_Pre_Class_MrsP,
+ RtemsSemReqTimeout_Pre_Class_NA
+} RtemsSemReqTimeout_Pre_Class;
+
+typedef enum {
+ RtemsSemReqTimeout_Pre_Discipline_FIFO,
+ RtemsSemReqTimeout_Pre_Discipline_Priority,
+ RtemsSemReqTimeout_Pre_Discipline_NA
+} RtemsSemReqTimeout_Pre_Discipline;
+
+typedef enum {
+ RtemsSemReqTimeout_Post_Action_Timeout,
+ RtemsSemReqTimeout_Post_Action_TimeoutMrsP,
+ RtemsSemReqTimeout_Post_Action_TimeoutPriorityInherit,
+ RtemsSemReqTimeout_Post_Action_NA
+} RtemsSemReqTimeout_Post_Action;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Class_NA : 1;
+ uint8_t Pre_Discipline_NA : 1;
+ uint8_t Post_Action : 2;
+} RtemsSemReqTimeout_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/sem/req/timeout test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the thread queue test context.
+ */
+ TQContext tq_ctx;
+
+ /**
+ * @brief This member specifies if the attribute set of the semaphore.
+ */
+ rtems_attribute attribute_set;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSemReqTimeout_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSemReqTimeout_Context;
+
+static RtemsSemReqTimeout_Context
+ RtemsSemReqTimeout_Instance;
+
+static const char * const RtemsSemReqTimeout_PreDesc_Class[] = {
+ "Counting",
+ "Simple",
+ "Binary",
+ "PrioCeiling",
+ "PrioInherit",
+ "MrsP",
+ "NA"
+};
+
+static const char * const RtemsSemReqTimeout_PreDesc_Discipline[] = {
+ "FIFO",
+ "Priority",
+ "NA"
+};
+
+static const char * const * const RtemsSemReqTimeout_PreDesc[] = {
+ RtemsSemReqTimeout_PreDesc_Class,
+ RtemsSemReqTimeout_PreDesc_Discipline,
+ NULL
+};
+
+#if defined(RTEMS_SMP)
+#include "tr-tq-timeout-mrsp.h"
+#endif
+
+static void RtemsSemReqTimeout_Pre_Class_Prepare(
+ RtemsSemReqTimeout_Context *ctx,
+ RtemsSemReqTimeout_Pre_Class state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqTimeout_Pre_Class_Counting: {
+ /*
+ * While the semaphore object is a counting semaphore.
+ */
+ ctx->attribute_set |= RTEMS_COUNTING_SEMAPHORE;
+ ctx->tq_ctx.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ break;
+ }
+
+ case RtemsSemReqTimeout_Pre_Class_Simple: {
+ /*
+ * While the semaphore object is a simple binary semaphore.
+ */
+ ctx->attribute_set |= RTEMS_SIMPLE_BINARY_SEMAPHORE;
+ ctx->tq_ctx.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ break;
+ }
+
+ case RtemsSemReqTimeout_Pre_Class_Binary: {
+ /*
+ * While the semaphore object is a binary semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE;
+ ctx->tq_ctx.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ break;
+ }
+
+ case RtemsSemReqTimeout_Pre_Class_PrioCeiling: {
+ /*
+ * While the semaphore object is a priority ceiling semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY_CEILING;
+ ctx->tq_ctx.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ break;
+ }
+
+ case RtemsSemReqTimeout_Pre_Class_PrioInherit: {
+ /*
+ * While the semaphore object is a priority inheritance semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY;
+ ctx->tq_ctx.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ break;
+ }
+
+ case RtemsSemReqTimeout_Pre_Class_MrsP: {
+ /*
+ * While the semaphore object is a MrsP semaphore.
+ */
+ ctx->attribute_set |= RTEMS_BINARY_SEMAPHORE |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING;
+ #if defined(RTEMS_SMP)
+ ctx->tq_ctx.enqueue_variant = TQ_ENQUEUE_STICKY;
+ #else
+ ctx->tq_ctx.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ #endif
+ break;
+ }
+
+ case RtemsSemReqTimeout_Pre_Class_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqTimeout_Pre_Discipline_Prepare(
+ RtemsSemReqTimeout_Context *ctx,
+ RtemsSemReqTimeout_Pre_Discipline state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqTimeout_Pre_Discipline_FIFO: {
+ /*
+ * While the semaphore uses the FIFO task wait queue discipline.
+ */
+ ctx->attribute_set |= RTEMS_FIFO;
+ ctx->tq_ctx.discipline = TQ_FIFO;
+ break;
+ }
+
+ case RtemsSemReqTimeout_Pre_Discipline_Priority: {
+ /*
+ * While the semaphore uses the priority task wait queue discipline.
+ */
+ ctx->attribute_set |= RTEMS_PRIORITY;
+ ctx->tq_ctx.discipline = TQ_PRIORITY;
+ break;
+ }
+
+ case RtemsSemReqTimeout_Pre_Discipline_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqTimeout_Post_Action_Check(
+ RtemsSemReqTimeout_Context *ctx,
+ RtemsSemReqTimeout_Post_Action state
+)
+{
+ switch ( state ) {
+ case RtemsSemReqTimeout_Post_Action_Timeout: {
+ /*
+ * The semaphore obtain timeout actions shall be done as specified by
+ * spec:/score/tq/req/timeout.
+ */
+ ctx->tq_ctx.wait = TQ_WAIT_TIMED;
+ ScoreTqReqTimeout_Run( &ctx->tq_ctx );
+ break;
+ }
+
+ case RtemsSemReqTimeout_Post_Action_TimeoutMrsP: {
+ /*
+ * The semaphore obtain timeout actions shall be done as specified by
+ * spec:/score/tq/req/timeout-mrsp.
+ */
+ #if defined(RTEMS_SMP)
+ ctx->tq_ctx.wait = TQ_WAIT_TIMED;
+ ScoreTqReqTimeoutMrsp_Run( &ctx->tq_ctx );
+ #else
+ T_unreachable();
+ #endif
+ break;
+ }
+
+ case RtemsSemReqTimeout_Post_Action_TimeoutPriorityInherit: {
+ /*
+ * The semaphore obtain timeout actions shall be done as specified by
+ * spec:/score/tq/req/timeout-priority-inherit.
+ */
+ ctx->tq_ctx.wait = TQ_WAIT_FOREVER;
+ ScoreTqReqTimeoutPriorityInherit_Run( &ctx->tq_ctx );
+ break;
+ }
+
+ case RtemsSemReqTimeout_Post_Action_NA:
+ break;
+ }
+}
+
+static void RtemsSemReqTimeout_Setup( RtemsSemReqTimeout_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->tq_ctx.enqueue_prepare = TQEnqueuePrepareDefault;
+ ctx->tq_ctx.enqueue_done = TQEnqueueDoneDefault;
+ ctx->tq_ctx.enqueue = TQEnqueueClassicSem;
+ ctx->tq_ctx.surrender = TQSurrenderClassicSem;
+ ctx->tq_ctx.convert_status = TQConvertStatusClassic;
+ TQInitialize( &ctx->tq_ctx );
+}
+
+static void RtemsSemReqTimeout_Setup_Wrap( void *arg )
+{
+ RtemsSemReqTimeout_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqTimeout_Setup( ctx );
+}
+
+static void RtemsSemReqTimeout_Teardown( RtemsSemReqTimeout_Context *ctx )
+{
+ TQDestroy( &ctx->tq_ctx );
+}
+
+static void RtemsSemReqTimeout_Teardown_Wrap( void *arg )
+{
+ RtemsSemReqTimeout_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsSemReqTimeout_Teardown( ctx );
+}
+
+static void RtemsSemReqTimeout_Prepare( RtemsSemReqTimeout_Context *ctx )
+{
+ ctx->attribute_set = RTEMS_DEFAULT_ATTRIBUTES;
+ ctx->tq_ctx.thread_queue_id = 0;
+}
+
+static void RtemsSemReqTimeout_Action( RtemsSemReqTimeout_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_create(
+ OBJECT_NAME,
+ 1,
+ ctx->attribute_set,
+ PRIO_HIGH,
+ &ctx->tq_ctx.thread_queue_id
+ );
+ T_rsc_success( sc );
+}
+
+static void RtemsSemReqTimeout_Cleanup( RtemsSemReqTimeout_Context *ctx )
+{
+ if ( ctx->tq_ctx.thread_queue_id != 0 ) {
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_delete( ctx->tq_ctx.thread_queue_id );
+ T_rsc_success( sc );
+ }
+}
+
+static const RtemsSemReqTimeout_Entry
+RtemsSemReqTimeout_Entries[] = {
+ { 0, 0, 0, RtemsSemReqTimeout_Post_Action_Timeout },
+ { 1, 0, 0, RtemsSemReqTimeout_Post_Action_NA },
+ { 0, 0, 0, RtemsSemReqTimeout_Post_Action_TimeoutPriorityInherit },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, RtemsSemReqTimeout_Post_Action_TimeoutMrsP }
+#else
+ { 0, 0, 0, RtemsSemReqTimeout_Post_Action_Timeout }
+#endif
+};
+
+static const uint8_t
+RtemsSemReqTimeout_Map[] = {
+ 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 1, 3
+};
+
+static size_t RtemsSemReqTimeout_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsSemReqTimeout_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsSemReqTimeout_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSemReqTimeout_Fixture = {
+ .setup = RtemsSemReqTimeout_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsSemReqTimeout_Teardown_Wrap,
+ .scope = RtemsSemReqTimeout_Scope,
+ .initial_context = &RtemsSemReqTimeout_Instance
+};
+
+static inline RtemsSemReqTimeout_Entry RtemsSemReqTimeout_PopEntry(
+ RtemsSemReqTimeout_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSemReqTimeout_Entries[
+ RtemsSemReqTimeout_Map[ index ]
+ ];
+}
+
+static void RtemsSemReqTimeout_TestVariant( RtemsSemReqTimeout_Context *ctx )
+{
+ RtemsSemReqTimeout_Pre_Class_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSemReqTimeout_Pre_Discipline_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsSemReqTimeout_Action( ctx );
+ RtemsSemReqTimeout_Post_Action_Check( ctx, ctx->Map.entry.Post_Action );
+}
+
+/**
+ * @fn void T_case_body_RtemsSemReqTimeout( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsSemReqTimeout, &RtemsSemReqTimeout_Fixture )
+{
+ RtemsSemReqTimeout_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsSemReqTimeout_Pre_Class_Counting;
+ ctx->Map.pcs[ 0 ] < RtemsSemReqTimeout_Pre_Class_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsSemReqTimeout_Pre_Discipline_FIFO;
+ ctx->Map.pcs[ 1 ] < RtemsSemReqTimeout_Pre_Discipline_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsSemReqTimeout_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsSemReqTimeout_Prepare( ctx );
+ RtemsSemReqTimeout_TestVariant( ctx );
+ RtemsSemReqTimeout_Cleanup( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sem-uni.c b/testsuites/validation/tc-sem-uni.c
new file mode 100644
index 0000000000..04fec2009c
--- /dev/null
+++ b/testsuites/validation/tc-sem-uni.c
@@ -0,0 +1,226 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSemValUni
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSemValUni spec:/rtems/sem/val/uni
+ *
+ * @ingroup TestsuitesValidationOneCpu0
+ *
+ * @brief Tests uniprocessor-specific semaphore behaviour.
+ *
+ * This test case performs the following actions:
+ *
+ * - Create a worker thread and two MrsP mutexes. Obtain the Mrsp mutexes and
+ * check that a task yield works (owner is not sticky). We need two mutexes
+ * since the uniprocessor schedulers do not increment the stick level in the
+ * scheduler unblock operation.
+ *
+ * - Yield and let the worker obtain the MrsP mutexes.
+ *
+ * - Yield and let the worker release the MrsP mutexes.
+ *
+ * - Clean up all used resources.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/rtems/sem/val/uni test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the mutex identifier.
+ */
+ rtems_id mutex_id;
+
+ /**
+ * @brief This member contains the second mutex identifier.
+ */
+ rtems_id mutex_2_id;
+
+ /**
+ * @brief This member contains a progress counter.
+ */
+ uint32_t counter;
+} RtemsSemValUni_Context;
+
+static RtemsSemValUni_Context
+ RtemsSemValUni_Instance;
+
+typedef RtemsSemValUni_Context Context;
+
+static void ObtainReleaseMrsPTask( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+ ObtainMutex( ctx->mutex_id );
+ ObtainMutex( ctx->mutex_2_id );
+ ctx->counter = 1;
+ Yield();
+ ReleaseMutex( ctx->mutex_2_id );
+ ReleaseMutex( ctx->mutex_id );
+ ctx->counter = 2;
+ (void) ReceiveAnyEvents();
+}
+
+static void RtemsSemValUni_Setup( RtemsSemValUni_Context *ctx )
+{
+ SetSelfPriority( PRIO_NORMAL );
+}
+
+static void RtemsSemValUni_Setup_Wrap( void *arg )
+{
+ RtemsSemValUni_Context *ctx;
+
+ ctx = arg;
+ RtemsSemValUni_Setup( ctx );
+}
+
+static void RtemsSemValUni_Teardown( RtemsSemValUni_Context *ctx )
+{
+ RestoreRunnerPriority();
+}
+
+static void RtemsSemValUni_Teardown_Wrap( void *arg )
+{
+ RtemsSemValUni_Context *ctx;
+
+ ctx = arg;
+ RtemsSemValUni_Teardown( ctx );
+}
+
+static T_fixture RtemsSemValUni_Fixture = {
+ .setup = RtemsSemValUni_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsSemValUni_Teardown_Wrap,
+ .scope = NULL,
+ .initial_context = &RtemsSemValUni_Instance
+};
+
+/**
+ * @brief Create a worker thread and two MrsP mutexes. Obtain the Mrsp mutexes
+ * and check that a task yield works (owner is not sticky). We need two
+ * mutexes since the uniprocessor schedulers do not increment the stick level
+ * in the scheduler unblock operation.
+ */
+static void RtemsSemValUni_Action_0( RtemsSemValUni_Context *ctx )
+{
+ rtems_status_code sc;
+ rtems_id worker_id;
+
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'T', 'X', '1' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
+ PRIO_NORMAL,
+ &ctx->mutex_id
+ );
+ T_rsc_success( sc );
+
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'T', 'X', '2' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY |
+ RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
+ PRIO_NORMAL,
+ &ctx->mutex_2_id
+ );
+ T_rsc_success( sc );
+
+ ctx->counter = 0;
+
+ worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ StartTask( worker_id, ObtainReleaseMrsPTask, ctx );
+
+ /*
+ * Yield and let the worker obtain the MrsP mutexes.
+ */
+ Yield();
+ T_eq_u32( ctx->counter, 1 );
+
+ /*
+ * Yield and let the worker release the MrsP mutexes.
+ */
+ Yield();
+ T_eq_u32( ctx->counter, 2 );
+
+ /*
+ * Clean up all used resources.
+ */
+ DeleteTask( worker_id );
+ DeleteMutex( ctx->mutex_2_id );
+ DeleteMutex( ctx->mutex_id );
+}
+
+/**
+ * @fn void T_case_body_RtemsSemValUni( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsSemValUni, &RtemsSemValUni_Fixture )
+{
+ RtemsSemValUni_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ RtemsSemValUni_Action_0( ctx );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-signal-catch.c b/testsuites/validation/tc-signal-catch.c
index 45482fc5a5..7a6439a60f 100644
--- a/testsuites/validation/tc-signal-catch.c
+++ b/testsuites/validation/tc-signal-catch.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsSignalReqCatch
+ * @ingroup RtemsSignalReqCatch
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,10 +61,10 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsSignalReqCatch spec:/rtems/signal/req/catch
+ * @defgroup RtemsSignalReqCatch spec:/rtems/signal/req/catch
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
- * @ingroup RTEMSTestSuiteTestsuitesValidation1
+ * @ingroup TestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationOneCpu0
*
* @{
*/
diff --git a/testsuites/validation/tc-signal-send.c b/testsuites/validation/tc-signal-send.c
index d884cdf230..aedcec5e47 100644
--- a/testsuites/validation/tc-signal-send.c
+++ b/testsuites/validation/tc-signal-send.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsSignalReqSend
+ * @ingroup RtemsSignalReqSend
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -59,10 +59,10 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsSignalReqSend spec:/rtems/signal/req/send
+ * @defgroup RtemsSignalReqSend spec:/rtems/signal/req/send
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
- * @ingroup RTEMSTestSuiteTestsuitesValidation1
+ * @ingroup TestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationOneCpu0
*
* @{
*/
@@ -154,9 +154,9 @@ typedef struct {
rtems_signal_set processed_signal_sets[ 2 ];
- uintptr_t stack_pointers[ 2 ];;
+ uintptr_t stack_pointers[ 2 ];
- rtems_mode mode;;
+ rtems_mode mode;
rtems_status_code status;
@@ -723,8 +723,10 @@ static void RtemsSignalReqSend_Action( RtemsSignalReqSend_Context *ctx )
if ( ctx->id == ctx->worker_id ) {
SendEventsToWorker( ctx, EVENT_START );
+ StartDelayThreadDispatch( 1 );
ctx->status = rtems_signal_send( ctx->id, ctx->signal_set );
ctx->calls_after_send = ctx->handler_calls;
+ StopDelayThreadDispatch( 1 );
SendEventsToWorker( ctx, EVENT_SEND_DONE );
ctx->calls_after_dispatch = ctx->handler_calls;
diff --git a/testsuites/validation/tc-signals.c b/testsuites/validation/tc-signals.c
new file mode 100644
index 0000000000..dc452ecbc0
--- /dev/null
+++ b/testsuites/validation/tc-signals.c
@@ -0,0 +1,134 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSignalValSignals
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tr-signal-constant.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSignalValSignals spec:/rtems/signal/val/signals
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief This test case collection provides validation test cases for the @ref
+ * RTEMSAPIClassicSignal.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the signal test for all 32 signal constants.
+ *
+ * @{
+ */
+
+static const rtems_signal_set signals[] = {
+ RTEMS_SIGNAL_0,
+ RTEMS_SIGNAL_1,
+ RTEMS_SIGNAL_2,
+ RTEMS_SIGNAL_3,
+ RTEMS_SIGNAL_4,
+ RTEMS_SIGNAL_5,
+ RTEMS_SIGNAL_6,
+ RTEMS_SIGNAL_7,
+ RTEMS_SIGNAL_8,
+ RTEMS_SIGNAL_9,
+ RTEMS_SIGNAL_10,
+ RTEMS_SIGNAL_11,
+ RTEMS_SIGNAL_12,
+ RTEMS_SIGNAL_13,
+ RTEMS_SIGNAL_14,
+ RTEMS_SIGNAL_15,
+ RTEMS_SIGNAL_16,
+ RTEMS_SIGNAL_17,
+ RTEMS_SIGNAL_18,
+ RTEMS_SIGNAL_19,
+ RTEMS_SIGNAL_20,
+ RTEMS_SIGNAL_21,
+ RTEMS_SIGNAL_22,
+ RTEMS_SIGNAL_23,
+ RTEMS_SIGNAL_24,
+ RTEMS_SIGNAL_25,
+ RTEMS_SIGNAL_26,
+ RTEMS_SIGNAL_27,
+ RTEMS_SIGNAL_28,
+ RTEMS_SIGNAL_29,
+ RTEMS_SIGNAL_30,
+ RTEMS_SIGNAL_31
+};
+
+/**
+ * @brief Run the signal test for all 32 signal constants.
+ */
+static void RtemsSignalValSignals_Action_0( void )
+{
+ unsigned int i;
+
+ for ( i = 0; i < 32; ++i ) {
+ RtemsSignalValSignalConstant_Run( signals[ i ], i );
+ T_step( i ); /* Accounts for 32 test plan steps */
+ }
+}
+
+/**
+ * @fn void T_case_body_RtemsSignalValSignals( void )
+ */
+T_TEST_CASE( RtemsSignalValSignals )
+{
+ T_plan( 32 );
+
+ RtemsSignalValSignals_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-start-of-optional-processor-failed.c b/testsuites/validation/tc-start-of-optional-processor-failed.c
new file mode 100644
index 0000000000..826ff3848d
--- /dev/null
+++ b/testsuites/validation/tc-start-of-optional-processor-failed.c
@@ -0,0 +1,116 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValStartOfOptionalProcessorFailed
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/percpu.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSmpValStartOfOptionalProcessorFailed \
+ * spec:/score/smp/val/start-of-optional-processor-failed
+ *
+ * @ingroup TestsuitesValidationSmpOnly2
+ *
+ * @brief Tests the state of an optional processor which failed to start.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action was carried by the system initialization. If we execute
+ * this test case, then the failed start of an optional processor did not
+ * abort the system initialization.
+ *
+ * - Check that the boot processor is online.
+ *
+ * - Check that the optional processor which failed to start is not online.
+ *
+ * @{
+ */
+
+/**
+ * @brief The test action was carried by the system initialization. If we
+ * execute this test case, then the failed start of an optional processor did
+ * not abort the system initialization.
+ */
+static void ScoreSmpValStartOfOptionalProcessorFailed_Action_0( void )
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the boot processor is online.
+ */
+ T_step_true(
+ 0,
+ _Per_CPU_Is_processor_online( _Per_CPU_Get_by_index( 0 ) )
+ );
+
+ /*
+ * Check that the optional processor which failed to start is not online.
+ */
+ T_step_false(
+ 1,
+ _Per_CPU_Is_processor_online( _Per_CPU_Get_by_index( 1 ) )
+ );
+}
+
+/**
+ * @fn void T_case_body_ScoreSmpValStartOfOptionalProcessorFailed( void )
+ */
+T_TEST_CASE( ScoreSmpValStartOfOptionalProcessorFailed )
+{
+ T_plan( 2 );
+
+ ScoreSmpValStartOfOptionalProcessorFailed_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-status-is-equal.c b/testsuites/validation/tc-status-is-equal.c
new file mode 100644
index 0000000000..6981ef84d1
--- /dev/null
+++ b/testsuites/validation/tc-status-is-equal.c
@@ -0,0 +1,286 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsStatusReqIsEqual
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsStatusReqIsEqual spec:/rtems/status/req/is-equal
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsStatusReqIsEqual_Pre_Status_Equal,
+ RtemsStatusReqIsEqual_Pre_Status_NotEqual,
+ RtemsStatusReqIsEqual_Pre_Status_NA
+} RtemsStatusReqIsEqual_Pre_Status;
+
+typedef enum {
+ RtemsStatusReqIsEqual_Post_Result_True,
+ RtemsStatusReqIsEqual_Post_Result_False,
+ RtemsStatusReqIsEqual_Post_Result_NA
+} RtemsStatusReqIsEqual_Post_Result;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Status_NA : 1;
+ uint8_t Post_Result : 2;
+} RtemsStatusReqIsEqual_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/status/req/is-equal test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the return value of the
+ * rtems_are_statuses_equal() call.
+ */
+ bool result;
+
+ /**
+ * @brief This member specifies if the ``left_status_code`` parameter value.
+ */
+ rtems_status_code status_0;
+
+ /**
+ * @brief This member specifies if the ``right_status_code`` parameter value.
+ */
+ rtems_status_code status_1;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsStatusReqIsEqual_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsStatusReqIsEqual_Context;
+
+static RtemsStatusReqIsEqual_Context
+ RtemsStatusReqIsEqual_Instance;
+
+static const char * const RtemsStatusReqIsEqual_PreDesc_Status[] = {
+ "Equal",
+ "NotEqual",
+ "NA"
+};
+
+static const char * const * const RtemsStatusReqIsEqual_PreDesc[] = {
+ RtemsStatusReqIsEqual_PreDesc_Status,
+ NULL
+};
+
+static void RtemsStatusReqIsEqual_Pre_Status_Prepare(
+ RtemsStatusReqIsEqual_Context *ctx,
+ RtemsStatusReqIsEqual_Pre_Status state
+)
+{
+ switch ( state ) {
+ case RtemsStatusReqIsEqual_Pre_Status_Equal: {
+ /*
+ * While the ``left_status_code`` parameter is equal to the
+ * ``right_status_code`` parameter.
+ */
+ ctx->status_0 = RTEMS_INVALID_NAME;
+ ctx->status_1 = RTEMS_INVALID_NAME;
+ break;
+ }
+
+ case RtemsStatusReqIsEqual_Pre_Status_NotEqual: {
+ /*
+ * While the ``left_status_code`` parameter is not equal to the
+ * ``right_status_code`` parameter.
+ */
+ ctx->status_0 = RTEMS_SUCCESSFUL;
+ ctx->status_1 = RTEMS_INVALID_ID;
+ break;
+ }
+
+ case RtemsStatusReqIsEqual_Pre_Status_NA:
+ break;
+ }
+}
+
+static void RtemsStatusReqIsEqual_Post_Result_Check(
+ RtemsStatusReqIsEqual_Context *ctx,
+ RtemsStatusReqIsEqual_Post_Result state
+)
+{
+ switch ( state ) {
+ case RtemsStatusReqIsEqual_Post_Result_True: {
+ /*
+ * The return value of rtems_are_statuses_equal() shall be true.
+ */
+ T_true( ctx->result );
+ break;
+ }
+
+ case RtemsStatusReqIsEqual_Post_Result_False: {
+ /*
+ * The return value of rtems_are_statuses_equal() shall be false.
+ */
+ T_false( ctx->result );
+ break;
+ }
+
+ case RtemsStatusReqIsEqual_Post_Result_NA:
+ break;
+ }
+}
+
+static void RtemsStatusReqIsEqual_Action( RtemsStatusReqIsEqual_Context *ctx )
+{
+ ctx->result = rtems_are_statuses_equal( ctx->status_0, ctx->status_1 );
+}
+
+static const RtemsStatusReqIsEqual_Entry
+RtemsStatusReqIsEqual_Entries[] = {
+ { 0, 0, RtemsStatusReqIsEqual_Post_Result_True },
+ { 0, 0, RtemsStatusReqIsEqual_Post_Result_False }
+};
+
+static const uint8_t
+RtemsStatusReqIsEqual_Map[] = {
+ 0, 1
+};
+
+static size_t RtemsStatusReqIsEqual_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsStatusReqIsEqual_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsStatusReqIsEqual_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsStatusReqIsEqual_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsStatusReqIsEqual_Scope,
+ .initial_context = &RtemsStatusReqIsEqual_Instance
+};
+
+static inline RtemsStatusReqIsEqual_Entry RtemsStatusReqIsEqual_PopEntry(
+ RtemsStatusReqIsEqual_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsStatusReqIsEqual_Entries[
+ RtemsStatusReqIsEqual_Map[ index ]
+ ];
+}
+
+static void RtemsStatusReqIsEqual_TestVariant(
+ RtemsStatusReqIsEqual_Context *ctx
+)
+{
+ RtemsStatusReqIsEqual_Pre_Status_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsStatusReqIsEqual_Action( ctx );
+ RtemsStatusReqIsEqual_Post_Result_Check( ctx, ctx->Map.entry.Post_Result );
+}
+
+/**
+ * @fn void T_case_body_RtemsStatusReqIsEqual( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsStatusReqIsEqual, &RtemsStatusReqIsEqual_Fixture )
+{
+ RtemsStatusReqIsEqual_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsStatusReqIsEqual_Pre_Status_Equal;
+ ctx->Map.pcs[ 0 ] < RtemsStatusReqIsEqual_Pre_Status_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = RtemsStatusReqIsEqual_PopEntry( ctx );
+ RtemsStatusReqIsEqual_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-status-is-successful.c b/testsuites/validation/tc-status-is-successful.c
new file mode 100644
index 0000000000..a04a9b4a7f
--- /dev/null
+++ b/testsuites/validation/tc-status-is-successful.c
@@ -0,0 +1,293 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsStatusReqIsSuccessful
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsStatusReqIsSuccessful spec:/rtems/status/req/is-successful
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsStatusReqIsSuccessful_Pre_Status_Successful,
+ RtemsStatusReqIsSuccessful_Pre_Status_Other,
+ RtemsStatusReqIsSuccessful_Pre_Status_NA
+} RtemsStatusReqIsSuccessful_Pre_Status;
+
+typedef enum {
+ RtemsStatusReqIsSuccessful_Post_Result_True,
+ RtemsStatusReqIsSuccessful_Post_Result_False,
+ RtemsStatusReqIsSuccessful_Post_Result_NA
+} RtemsStatusReqIsSuccessful_Post_Result;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Status_NA : 1;
+ uint8_t Post_Result : 2;
+} RtemsStatusReqIsSuccessful_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/status/req/is-successful test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the return value of the
+ * rtems_is_status_successful() call.
+ */
+ bool result;
+
+ /**
+ * @brief This member specifies if the ``status_code`` parameter value.
+ */
+ rtems_status_code status;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsStatusReqIsSuccessful_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsStatusReqIsSuccessful_Context;
+
+static RtemsStatusReqIsSuccessful_Context
+ RtemsStatusReqIsSuccessful_Instance;
+
+static const char * const RtemsStatusReqIsSuccessful_PreDesc_Status[] = {
+ "Successful",
+ "Other",
+ "NA"
+};
+
+static const char * const * const RtemsStatusReqIsSuccessful_PreDesc[] = {
+ RtemsStatusReqIsSuccessful_PreDesc_Status,
+ NULL
+};
+
+static void RtemsStatusReqIsSuccessful_Pre_Status_Prepare(
+ RtemsStatusReqIsSuccessful_Context *ctx,
+ RtemsStatusReqIsSuccessful_Pre_Status state
+)
+{
+ switch ( state ) {
+ case RtemsStatusReqIsSuccessful_Pre_Status_Successful: {
+ /*
+ * While the ``status_code`` parameter is equal to RTEMS_SUCCESSFUL.
+ */
+ ctx->status = RTEMS_SUCCESSFUL;
+ break;
+ }
+
+ case RtemsStatusReqIsSuccessful_Pre_Status_Other: {
+ /*
+ * While the ``status_code`` parameter is not equal to RTEMS_SUCCESSFUL.
+ */
+ ctx->status = RTEMS_INVALID_ID;
+ break;
+ }
+
+ case RtemsStatusReqIsSuccessful_Pre_Status_NA:
+ break;
+ }
+}
+
+static void RtemsStatusReqIsSuccessful_Post_Result_Check(
+ RtemsStatusReqIsSuccessful_Context *ctx,
+ RtemsStatusReqIsSuccessful_Post_Result state
+)
+{
+ switch ( state ) {
+ case RtemsStatusReqIsSuccessful_Post_Result_True: {
+ /*
+ * The return value of rtems_is_status_successful() shall be true.
+ */
+ T_true( ctx->result );
+ break;
+ }
+
+ case RtemsStatusReqIsSuccessful_Post_Result_False: {
+ /*
+ * The return value of rtems_is_status_successful() shall be false.
+ */
+ T_false( ctx->result );
+ break;
+ }
+
+ case RtemsStatusReqIsSuccessful_Post_Result_NA:
+ break;
+ }
+}
+
+static void RtemsStatusReqIsSuccessful_Action(
+ RtemsStatusReqIsSuccessful_Context *ctx
+)
+{
+ ctx->result = rtems_is_status_successful( ctx->status );
+}
+
+static const RtemsStatusReqIsSuccessful_Entry
+RtemsStatusReqIsSuccessful_Entries[] = {
+ { 0, 0, RtemsStatusReqIsSuccessful_Post_Result_True },
+ { 0, 0, RtemsStatusReqIsSuccessful_Post_Result_False }
+};
+
+static const uint8_t
+RtemsStatusReqIsSuccessful_Map[] = {
+ 0, 1
+};
+
+static size_t RtemsStatusReqIsSuccessful_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ RtemsStatusReqIsSuccessful_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsStatusReqIsSuccessful_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsStatusReqIsSuccessful_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsStatusReqIsSuccessful_Scope,
+ .initial_context = &RtemsStatusReqIsSuccessful_Instance
+};
+
+static inline RtemsStatusReqIsSuccessful_Entry
+RtemsStatusReqIsSuccessful_PopEntry( RtemsStatusReqIsSuccessful_Context *ctx )
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsStatusReqIsSuccessful_Entries[
+ RtemsStatusReqIsSuccessful_Map[ index ]
+ ];
+}
+
+static void RtemsStatusReqIsSuccessful_TestVariant(
+ RtemsStatusReqIsSuccessful_Context *ctx
+)
+{
+ RtemsStatusReqIsSuccessful_Pre_Status_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsStatusReqIsSuccessful_Action( ctx );
+ RtemsStatusReqIsSuccessful_Post_Result_Check(
+ ctx,
+ ctx->Map.entry.Post_Result
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsStatusReqIsSuccessful( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsStatusReqIsSuccessful,
+ &RtemsStatusReqIsSuccessful_Fixture
+)
+{
+ RtemsStatusReqIsSuccessful_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsStatusReqIsSuccessful_Pre_Status_Successful;
+ ctx->Map.pcs[ 0 ] < RtemsStatusReqIsSuccessful_Pre_Status_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = RtemsStatusReqIsSuccessful_PopEntry( ctx );
+ RtemsStatusReqIsSuccessful_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-status-text.c b/testsuites/validation/tc-status-text.c
new file mode 100644
index 0000000000..a877519dd2
--- /dev/null
+++ b/testsuites/validation/tc-status-text.c
@@ -0,0 +1,914 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsStatusReqText
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsStatusReqText spec:/rtems/status/req/text
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsStatusReqText_Pre_Code_AlreadySuspended,
+ RtemsStatusReqText_Pre_Code_CalledFromIsr,
+ RtemsStatusReqText_Pre_Code_IllegalOnRemoteObject,
+ RtemsStatusReqText_Pre_Code_IllegalOnSelf,
+ RtemsStatusReqText_Pre_Code_IncorrectState,
+ RtemsStatusReqText_Pre_Code_InternalError,
+ RtemsStatusReqText_Pre_Code_Interrupted,
+ RtemsStatusReqText_Pre_Code_InvalidAddress,
+ RtemsStatusReqText_Pre_Code_InvalidClock,
+ RtemsStatusReqText_Pre_Code_InvalidId,
+ RtemsStatusReqText_Pre_Code_InvalidName,
+ RtemsStatusReqText_Pre_Code_InvalidNode,
+ RtemsStatusReqText_Pre_Code_InvalidNumber,
+ RtemsStatusReqText_Pre_Code_InvalidPriority,
+ RtemsStatusReqText_Pre_Code_InvalidSize,
+ RtemsStatusReqText_Pre_Code_IoError,
+ RtemsStatusReqText_Pre_Code_MpNotConfigured,
+ RtemsStatusReqText_Pre_Code_NoMemory,
+ RtemsStatusReqText_Pre_Code_NotConfigured,
+ RtemsStatusReqText_Pre_Code_NotDefined,
+ RtemsStatusReqText_Pre_Code_NotImplemented,
+ RtemsStatusReqText_Pre_Code_NotOwnerOfResource,
+ RtemsStatusReqText_Pre_Code_ObjectWasDeleted,
+ RtemsStatusReqText_Pre_Code_ProxyBlocking,
+ RtemsStatusReqText_Pre_Code_ResourceInUse,
+ RtemsStatusReqText_Pre_Code_Successful,
+ RtemsStatusReqText_Pre_Code_TaskExitted,
+ RtemsStatusReqText_Pre_Code_Timeout,
+ RtemsStatusReqText_Pre_Code_TooMany,
+ RtemsStatusReqText_Pre_Code_Unsatisfied,
+ RtemsStatusReqText_Pre_Code_NotAStatusCode,
+ RtemsStatusReqText_Pre_Code_NA
+} RtemsStatusReqText_Pre_Code;
+
+typedef enum {
+ RtemsStatusReqText_Post_Result_AlreadySuspended,
+ RtemsStatusReqText_Post_Result_CalledFromIsr,
+ RtemsStatusReqText_Post_Result_IllegalOnRemoteObject,
+ RtemsStatusReqText_Post_Result_IllegalOnSelf,
+ RtemsStatusReqText_Post_Result_IncorrectState,
+ RtemsStatusReqText_Post_Result_InternalError,
+ RtemsStatusReqText_Post_Result_Interrupted,
+ RtemsStatusReqText_Post_Result_InvalidAddress,
+ RtemsStatusReqText_Post_Result_InvalidClock,
+ RtemsStatusReqText_Post_Result_InvalidId,
+ RtemsStatusReqText_Post_Result_InvalidName,
+ RtemsStatusReqText_Post_Result_InvalidNode,
+ RtemsStatusReqText_Post_Result_InvalidNumber,
+ RtemsStatusReqText_Post_Result_InvalidPriority,
+ RtemsStatusReqText_Post_Result_InvalidSize,
+ RtemsStatusReqText_Post_Result_IoError,
+ RtemsStatusReqText_Post_Result_MpNotConfigured,
+ RtemsStatusReqText_Post_Result_NoMemory,
+ RtemsStatusReqText_Post_Result_NotConfigured,
+ RtemsStatusReqText_Post_Result_NotDefined,
+ RtemsStatusReqText_Post_Result_NotImplemented,
+ RtemsStatusReqText_Post_Result_NotOwnerOfResource,
+ RtemsStatusReqText_Post_Result_ObjectWasDeleted,
+ RtemsStatusReqText_Post_Result_ProxyBlocking,
+ RtemsStatusReqText_Post_Result_ResourceInUse,
+ RtemsStatusReqText_Post_Result_Successful,
+ RtemsStatusReqText_Post_Result_TaskExitted,
+ RtemsStatusReqText_Post_Result_Timeout,
+ RtemsStatusReqText_Post_Result_TooMany,
+ RtemsStatusReqText_Post_Result_Unsatisfied,
+ RtemsStatusReqText_Post_Result_NotAStatusCode,
+ RtemsStatusReqText_Post_Result_NA
+} RtemsStatusReqText_Post_Result;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Code_NA : 1;
+ uint8_t Post_Result : 5;
+} RtemsStatusReqText_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/status/req/text test case.
+ */
+typedef struct {
+ /**
+ * @brief This member specifies the ``status_code`` parameter value.
+ */
+ rtems_status_code code;
+
+ /**
+ * @brief This member contains the return value of the rtems_status_text()
+ * call.
+ */
+ const char *result;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsStatusReqText_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsStatusReqText_Context;
+
+static RtemsStatusReqText_Context
+ RtemsStatusReqText_Instance;
+
+static const char * const RtemsStatusReqText_PreDesc_Code[] = {
+ "AlreadySuspended",
+ "CalledFromIsr",
+ "IllegalOnRemoteObject",
+ "IllegalOnSelf",
+ "IncorrectState",
+ "InternalError",
+ "Interrupted",
+ "InvalidAddress",
+ "InvalidClock",
+ "InvalidId",
+ "InvalidName",
+ "InvalidNode",
+ "InvalidNumber",
+ "InvalidPriority",
+ "InvalidSize",
+ "IoError",
+ "MpNotConfigured",
+ "NoMemory",
+ "NotConfigured",
+ "NotDefined",
+ "NotImplemented",
+ "NotOwnerOfResource",
+ "ObjectWasDeleted",
+ "ProxyBlocking",
+ "ResourceInUse",
+ "Successful",
+ "TaskExitted",
+ "Timeout",
+ "TooMany",
+ "Unsatisfied",
+ "NotAStatusCode",
+ "NA"
+};
+
+static const char * const * const RtemsStatusReqText_PreDesc[] = {
+ RtemsStatusReqText_PreDesc_Code,
+ NULL
+};
+
+static void RtemsStatusReqText_Pre_Code_Prepare(
+ RtemsStatusReqText_Context *ctx,
+ RtemsStatusReqText_Pre_Code state
+)
+{
+ switch ( state ) {
+ case RtemsStatusReqText_Pre_Code_AlreadySuspended: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_ALREADY_SUSPENDED.
+ */
+ ctx->code = RTEMS_ALREADY_SUSPENDED;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_CalledFromIsr: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_CALLED_FROM_ISR.
+ */
+ ctx->code = RTEMS_CALLED_FROM_ISR;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_IllegalOnRemoteObject: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_ILLEGAL_ON_REMOTE_OBJECT.
+ */
+
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_IllegalOnSelf: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_ILLEGAL_ON_SELF.
+ */
+ ctx->code = RTEMS_ILLEGAL_ON_SELF;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_IncorrectState: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_INCORRECT_STATE.
+ */
+ ctx->code = RTEMS_INCORRECT_STATE;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_InternalError: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_INTERNAL_ERROR.
+ */
+ ctx->code = RTEMS_INTERNAL_ERROR;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_Interrupted: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_INTERRUPTED.
+ */
+ ctx->code = RTEMS_INTERRUPTED;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_InvalidAddress: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_INVALID_ADDRESS.
+ */
+ ctx->code = RTEMS_INVALID_ADDRESS;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_InvalidClock: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_INVALID_CLOCK.
+ */
+ ctx->code = RTEMS_INVALID_CLOCK;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_InvalidId: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_INVALID_ID.
+ */
+ ctx->code = RTEMS_INVALID_ID;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_InvalidName: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_INVALID_NAME.
+ */
+ ctx->code = RTEMS_INVALID_NAME;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_InvalidNode: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_INVALID_NODE.
+ */
+ ctx->code = RTEMS_INVALID_NODE;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_InvalidNumber: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_INVALID_NUMBER.
+ */
+ ctx->code = RTEMS_INVALID_NUMBER;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_InvalidPriority: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_INVALID_PRIORITY.
+ */
+ ctx->code = RTEMS_INVALID_PRIORITY;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_InvalidSize: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_INVALID_SIZE.
+ */
+ ctx->code = RTEMS_INVALID_SIZE;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_IoError: {
+ /*
+ * While the ``status_code`` parameter value is equal to RTEMS_IO_ERROR.
+ */
+ ctx->code = RTEMS_IO_ERROR;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_MpNotConfigured: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_MP_NOT_CONFIGURED.
+ */
+ ctx->code = RTEMS_MP_NOT_CONFIGURED;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_NoMemory: {
+ /*
+ * While the ``status_code`` parameter value is equal to RTEMS_NO_MEMORY.
+ */
+ ctx->code = RTEMS_NO_MEMORY;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_NotConfigured: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_NOT_CONFIGURED.
+ */
+ ctx->code = RTEMS_NOT_CONFIGURED;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_NotDefined: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_NOT_DEFINED.
+ */
+ ctx->code = RTEMS_NOT_DEFINED;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_NotImplemented: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_NOT_IMPLEMENTED.
+ */
+ ctx->code = RTEMS_NOT_IMPLEMENTED;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_NotOwnerOfResource: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_NOT_OWNER_OF_RESOURCE.
+ */
+ ctx->code = RTEMS_NOT_OWNER_OF_RESOURCE;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_ObjectWasDeleted: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_OBJECT_WAS_DELETED.
+ */
+ ctx->code = RTEMS_OBJECT_WAS_DELETED;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_ProxyBlocking: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_PROXY_BLOCKING.
+ */
+ ctx->code = RTEMS_PROXY_BLOCKING;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_ResourceInUse: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_RESOURCE_IN_USE.
+ */
+ ctx->code = RTEMS_RESOURCE_IN_USE;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_Successful: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_SUCCESSFUL.
+ */
+ ctx->code = RTEMS_SUCCESSFUL;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_TaskExitted: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_TASK_EXITTED.
+ */
+ ctx->code = RTEMS_TASK_EXITTED;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_Timeout: {
+ /*
+ * While the ``status_code`` parameter value is equal to RTEMS_TIMEOUT.
+ */
+ ctx->code = RTEMS_TIMEOUT;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_TooMany: {
+ /*
+ * While the ``status_code`` parameter value is equal to RTEMS_TOO_MANY.
+ */
+ ctx->code = RTEMS_TOO_MANY;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_Unsatisfied: {
+ /*
+ * While the ``status_code`` parameter value is equal to
+ * RTEMS_UNSATISFIED.
+ */
+ ctx->code = RTEMS_UNSATISFIED;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_NotAStatusCode: {
+ /*
+ * While the ``status_code`` parameter is not equal to an enumerator of
+ * rtems_status_code.
+ */
+ ctx->code = (rtems_status_code) 123;
+ break;
+ }
+
+ case RtemsStatusReqText_Pre_Code_NA:
+ break;
+ }
+}
+
+static void RtemsStatusReqText_Post_Result_Check(
+ RtemsStatusReqText_Context *ctx,
+ RtemsStatusReqText_Post_Result state
+)
+{
+ switch ( state ) {
+ case RtemsStatusReqText_Post_Result_AlreadySuspended: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_ALREADY_SUSPENDED".
+ */
+ T_eq_str( ctx->result, "RTEMS_ALREADY_SUSPENDED" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_CalledFromIsr: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_CALLED_FROM_ISR".
+ */
+ T_eq_str( ctx->result, "RTEMS_CALLED_FROM_ISR" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_IllegalOnRemoteObject: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_ILLEGAL_ON_REMOTE_OBJECT".
+ */
+
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_IllegalOnSelf: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_ILLEGAL_ON_SELF".
+ */
+ T_eq_str( ctx->result, "RTEMS_ILLEGAL_ON_SELF" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_IncorrectState: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_INCORRECT_STATE".
+ */
+ T_eq_str( ctx->result, "RTEMS_INCORRECT_STATE" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_InternalError: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_INTERNAL_ERROR".
+ */
+ T_eq_str( ctx->result, "RTEMS_INTERNAL_ERROR" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_Interrupted: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_INTERRUPTED".
+ */
+ T_eq_str( ctx->result, "RTEMS_INTERRUPTED" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_InvalidAddress: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_INVALID_ADDRESS".
+ */
+ T_eq_str( ctx->result, "RTEMS_INVALID_ADDRESS" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_InvalidClock: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_INVALID_CLOCK".
+ */
+ T_eq_str( ctx->result, "RTEMS_INVALID_CLOCK" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_InvalidId: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_INVALID_ID".
+ */
+ T_eq_str( ctx->result, "RTEMS_INVALID_ID" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_InvalidName: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_INVALID_NAME".
+ */
+ T_eq_str( ctx->result, "RTEMS_INVALID_NAME" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_InvalidNode: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_INVALID_NODE".
+ */
+ T_eq_str( ctx->result, "RTEMS_INVALID_NODE" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_InvalidNumber: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_INVALID_NUMBER".
+ */
+ T_eq_str( ctx->result, "RTEMS_INVALID_NUMBER" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_InvalidPriority: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_INVALID_PRIORITY".
+ */
+ T_eq_str( ctx->result, "RTEMS_INVALID_PRIORITY" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_InvalidSize: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_INVALID_SIZE".
+ */
+ T_eq_str( ctx->result, "RTEMS_INVALID_SIZE" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_IoError: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_IO_ERROR".
+ */
+ T_eq_str( ctx->result, "RTEMS_IO_ERROR" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_MpNotConfigured: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_MP_NOT_CONFIGURED".
+ */
+ T_eq_str( ctx->result, "RTEMS_MP_NOT_CONFIGURED" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_NoMemory: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_NO_MEMORY".
+ */
+ T_eq_str( ctx->result, "RTEMS_NO_MEMORY" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_NotConfigured: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_NOT_CONFIGURED".
+ */
+ T_eq_str( ctx->result, "RTEMS_NOT_CONFIGURED" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_NotDefined: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_NOT_DEFINED".
+ */
+ T_eq_str( ctx->result, "RTEMS_NOT_DEFINED" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_NotImplemented: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_NOT_IMPLEMENTED".
+ */
+ T_eq_str( ctx->result, "RTEMS_NOT_IMPLEMENTED" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_NotOwnerOfResource: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_NOT_OWNER_OF_RESOURCE".
+ */
+ T_eq_str( ctx->result, "RTEMS_NOT_OWNER_OF_RESOURCE" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_ObjectWasDeleted: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_OBJECT_WAS_DELETED".
+ */
+ T_eq_str( ctx->result, "RTEMS_OBJECT_WAS_DELETED" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_ProxyBlocking: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_PROXY_BLOCKING".
+ */
+ T_eq_str( ctx->result, "RTEMS_PROXY_BLOCKING" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_ResourceInUse: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_RESOURCE_IN_USE".
+ */
+ T_eq_str( ctx->result, "RTEMS_RESOURCE_IN_USE" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_Successful: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_SUCCESSFUL".
+ */
+ T_eq_str( ctx->result, "RTEMS_SUCCESSFUL" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_TaskExitted: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_TASK_EXITTED".
+ */
+ T_eq_str( ctx->result, "RTEMS_TASK_EXITTED" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_Timeout: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_TIMEOUT".
+ */
+ T_eq_str( ctx->result, "RTEMS_TIMEOUT" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_TooMany: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_TOO_MANY".
+ */
+ T_eq_str( ctx->result, "RTEMS_TOO_MANY" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_Unsatisfied: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "RTEMS_UNSATISFIED".
+ */
+ T_eq_str( ctx->result, "RTEMS_UNSATISFIED" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_NotAStatusCode: {
+ /*
+ * The return value of rtems_status_text() shall reference a string which
+ * is equal to "?".
+ */
+ T_eq_str( ctx->result, "?" );
+ break;
+ }
+
+ case RtemsStatusReqText_Post_Result_NA:
+ break;
+ }
+}
+
+static void RtemsStatusReqText_Action( RtemsStatusReqText_Context *ctx )
+{
+ ctx->result = rtems_status_text( ctx->code );
+}
+
+static const RtemsStatusReqText_Entry
+RtemsStatusReqText_Entries[] = {
+ { 0, 0, RtemsStatusReqText_Post_Result_AlreadySuspended },
+ { 0, 0, RtemsStatusReqText_Post_Result_CalledFromIsr },
+ { 0, 0, RtemsStatusReqText_Post_Result_IllegalOnRemoteObject },
+ { 0, 0, RtemsStatusReqText_Post_Result_IllegalOnSelf },
+ { 0, 0, RtemsStatusReqText_Post_Result_IncorrectState },
+ { 0, 0, RtemsStatusReqText_Post_Result_InternalError },
+ { 0, 0, RtemsStatusReqText_Post_Result_Interrupted },
+ { 0, 0, RtemsStatusReqText_Post_Result_InvalidAddress },
+ { 0, 0, RtemsStatusReqText_Post_Result_InvalidClock },
+ { 0, 0, RtemsStatusReqText_Post_Result_InvalidId },
+ { 0, 0, RtemsStatusReqText_Post_Result_InvalidName },
+ { 0, 0, RtemsStatusReqText_Post_Result_InvalidNode },
+ { 0, 0, RtemsStatusReqText_Post_Result_InvalidNumber },
+ { 0, 0, RtemsStatusReqText_Post_Result_InvalidPriority },
+ { 0, 0, RtemsStatusReqText_Post_Result_InvalidSize },
+ { 0, 0, RtemsStatusReqText_Post_Result_IoError },
+ { 0, 0, RtemsStatusReqText_Post_Result_MpNotConfigured },
+ { 0, 0, RtemsStatusReqText_Post_Result_NoMemory },
+ { 0, 0, RtemsStatusReqText_Post_Result_NotConfigured },
+ { 0, 0, RtemsStatusReqText_Post_Result_NotDefined },
+ { 0, 0, RtemsStatusReqText_Post_Result_NotImplemented },
+ { 0, 0, RtemsStatusReqText_Post_Result_NotOwnerOfResource },
+ { 0, 0, RtemsStatusReqText_Post_Result_ObjectWasDeleted },
+ { 0, 0, RtemsStatusReqText_Post_Result_ProxyBlocking },
+ { 0, 0, RtemsStatusReqText_Post_Result_ResourceInUse },
+ { 0, 0, RtemsStatusReqText_Post_Result_Successful },
+ { 0, 0, RtemsStatusReqText_Post_Result_TaskExitted },
+ { 0, 0, RtemsStatusReqText_Post_Result_Timeout },
+ { 0, 0, RtemsStatusReqText_Post_Result_TooMany },
+ { 0, 0, RtemsStatusReqText_Post_Result_Unsatisfied },
+ { 0, 0, RtemsStatusReqText_Post_Result_NotAStatusCode }
+};
+
+static const uint8_t
+RtemsStatusReqText_Map[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30
+};
+
+static size_t RtemsStatusReqText_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsStatusReqText_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsStatusReqText_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsStatusReqText_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsStatusReqText_Scope,
+ .initial_context = &RtemsStatusReqText_Instance
+};
+
+static inline RtemsStatusReqText_Entry RtemsStatusReqText_PopEntry(
+ RtemsStatusReqText_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsStatusReqText_Entries[
+ RtemsStatusReqText_Map[ index ]
+ ];
+}
+
+static void RtemsStatusReqText_TestVariant( RtemsStatusReqText_Context *ctx )
+{
+ RtemsStatusReqText_Pre_Code_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsStatusReqText_Action( ctx );
+ RtemsStatusReqText_Post_Result_Check( ctx, ctx->Map.entry.Post_Result );
+}
+
+/**
+ * @fn void T_case_body_RtemsStatusReqText( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsStatusReqText, &RtemsStatusReqText_Fixture )
+{
+ RtemsStatusReqText_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsStatusReqText_Pre_Code_AlreadySuspended;
+ ctx->Map.pcs[ 0 ] < RtemsStatusReqText_Pre_Code_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = RtemsStatusReqText_PopEntry( ctx );
+ RtemsStatusReqText_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-status.c b/testsuites/validation/tc-status.c
new file mode 100644
index 0000000000..41752a7f7d
--- /dev/null
+++ b/testsuites/validation/tc-status.c
@@ -0,0 +1,121 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsStatusValStatus
+ */
+
+/*
+ * Copyright (C) 2021, 2023 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsStatusValStatus spec:/rtems/status/val/status
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests some @ref RTEMSAPIClassicStatus interfaces.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate the status code constants.
+ *
+ * - Assert that RTEMS_STATUS_CODES_FIRST has the expected value and is a
+ * constant expression.
+ *
+ * - Check that RTEMS_STATUS_CODES_FIRST has the expected value.
+ *
+ * - Assert that RTEMS_STATUS_CODES_LAST has the expected value and is a
+ * constant expression.
+ *
+ * - Check that RTEMS_STATUS_CODES_LAST has the expected value.
+ *
+ * @{
+ */
+
+/**
+ * @brief Validate the status code constants.
+ */
+static void RtemsStatusValStatus_Action_0( void )
+{
+ /* Nothing to do */
+
+ /*
+ * Assert that RTEMS_STATUS_CODES_FIRST has the expected value and is a
+ * constant expression.
+ */
+ RTEMS_STATIC_ASSERT( RTEMS_STATUS_CODES_FIRST == 0, FIRST );
+
+ /*
+ * Check that RTEMS_STATUS_CODES_FIRST has the expected value.
+ */
+ T_eq_int( RTEMS_STATUS_CODES_FIRST, 0 );
+
+ /*
+ * Assert that RTEMS_STATUS_CODES_LAST has the expected value and is a
+ * constant expression.
+ */
+ RTEMS_STATIC_ASSERT( RTEMS_STATUS_CODES_LAST == 29, LAST );
+
+ /*
+ * Check that RTEMS_STATUS_CODES_LAST has the expected value.
+ */
+ T_eq_int( RTEMS_STATUS_CODES_LAST, 29 );
+}
+
+/**
+ * @fn void T_case_body_RtemsStatusValStatus( void )
+ */
+T_TEST_CASE( RtemsStatusValStatus )
+{
+ RtemsStatusValStatus_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-support-is-name-valid.c b/testsuites/validation/tc-support-is-name-valid.c
new file mode 100644
index 0000000000..2a47d27cd5
--- /dev/null
+++ b/testsuites/validation/tc-support-is-name-valid.c
@@ -0,0 +1,293 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSupportReqIsNameValid
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSupportReqIsNameValid spec:/rtems/support/req/is-name-valid
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsSupportReqIsNameValid_Pre_Name_Valid,
+ RtemsSupportReqIsNameValid_Pre_Name_Invalid,
+ RtemsSupportReqIsNameValid_Pre_Name_NA
+} RtemsSupportReqIsNameValid_Pre_Name;
+
+typedef enum {
+ RtemsSupportReqIsNameValid_Post_Result_True,
+ RtemsSupportReqIsNameValid_Post_Result_False,
+ RtemsSupportReqIsNameValid_Post_Result_NA
+} RtemsSupportReqIsNameValid_Post_Result;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Name_NA : 1;
+ uint8_t Post_Result : 2;
+} RtemsSupportReqIsNameValid_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/support/req/is-name-valid test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the return value of the rtems_is_name_valid()
+ * call.
+ */
+ bool result;
+
+ /**
+ * @brief This member specifies if the ``name`` parameter value.
+ */
+ rtems_name name;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsSupportReqIsNameValid_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsSupportReqIsNameValid_Context;
+
+static RtemsSupportReqIsNameValid_Context
+ RtemsSupportReqIsNameValid_Instance;
+
+static const char * const RtemsSupportReqIsNameValid_PreDesc_Name[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const * const RtemsSupportReqIsNameValid_PreDesc[] = {
+ RtemsSupportReqIsNameValid_PreDesc_Name,
+ NULL
+};
+
+static void RtemsSupportReqIsNameValid_Pre_Name_Prepare(
+ RtemsSupportReqIsNameValid_Context *ctx,
+ RtemsSupportReqIsNameValid_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsSupportReqIsNameValid_Pre_Name_Valid: {
+ /*
+ * While the ``name`` parameter is not equal to zero.
+ */
+ ctx->name = 1;
+ break;
+ }
+
+ case RtemsSupportReqIsNameValid_Pre_Name_Invalid: {
+ /*
+ * While the ``name`` parameter is equal to zero.
+ */
+ ctx->name = 0;
+ break;
+ }
+
+ case RtemsSupportReqIsNameValid_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsSupportReqIsNameValid_Post_Result_Check(
+ RtemsSupportReqIsNameValid_Context *ctx,
+ RtemsSupportReqIsNameValid_Post_Result state
+)
+{
+ switch ( state ) {
+ case RtemsSupportReqIsNameValid_Post_Result_True: {
+ /*
+ * The return value of rtems_is_name_valid() shall be true.
+ */
+ T_true( ctx->result );
+ break;
+ }
+
+ case RtemsSupportReqIsNameValid_Post_Result_False: {
+ /*
+ * The return value of rtems_is_name_valid() shall be false.
+ */
+ T_false( ctx->result );
+ break;
+ }
+
+ case RtemsSupportReqIsNameValid_Post_Result_NA:
+ break;
+ }
+}
+
+static void RtemsSupportReqIsNameValid_Action(
+ RtemsSupportReqIsNameValid_Context *ctx
+)
+{
+ ctx->result = rtems_is_name_valid( ctx->name );
+}
+
+static const RtemsSupportReqIsNameValid_Entry
+RtemsSupportReqIsNameValid_Entries[] = {
+ { 0, 0, RtemsSupportReqIsNameValid_Post_Result_True },
+ { 0, 0, RtemsSupportReqIsNameValid_Post_Result_False }
+};
+
+static const uint8_t
+RtemsSupportReqIsNameValid_Map[] = {
+ 0, 1
+};
+
+static size_t RtemsSupportReqIsNameValid_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ RtemsSupportReqIsNameValid_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsSupportReqIsNameValid_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsSupportReqIsNameValid_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsSupportReqIsNameValid_Scope,
+ .initial_context = &RtemsSupportReqIsNameValid_Instance
+};
+
+static inline RtemsSupportReqIsNameValid_Entry
+RtemsSupportReqIsNameValid_PopEntry( RtemsSupportReqIsNameValid_Context *ctx )
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsSupportReqIsNameValid_Entries[
+ RtemsSupportReqIsNameValid_Map[ index ]
+ ];
+}
+
+static void RtemsSupportReqIsNameValid_TestVariant(
+ RtemsSupportReqIsNameValid_Context *ctx
+)
+{
+ RtemsSupportReqIsNameValid_Pre_Name_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsSupportReqIsNameValid_Action( ctx );
+ RtemsSupportReqIsNameValid_Post_Result_Check(
+ ctx,
+ ctx->Map.entry.Post_Result
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsSupportReqIsNameValid( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsSupportReqIsNameValid,
+ &RtemsSupportReqIsNameValid_Fixture
+)
+{
+ RtemsSupportReqIsNameValid_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsSupportReqIsNameValid_Pre_Name_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsSupportReqIsNameValid_Pre_Name_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = RtemsSupportReqIsNameValid_PopEntry( ctx );
+ RtemsSupportReqIsNameValid_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-support.c b/testsuites/validation/tc-support.c
new file mode 100644
index 0000000000..3e886c6027
--- /dev/null
+++ b/testsuites/validation/tc-support.c
@@ -0,0 +1,126 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSupportValSupport
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSupportValSupport spec:/rtems/support/val/support
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests some @ref RTEMSAPIClassicSupport directives.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validates the characters returned by the rtems_name_to_characters()
+ * directive.
+ *
+ * - Check that the first character is equal to 0x01.
+ *
+ * - Check that the second character is equal to 0x02.
+ *
+ * - Check that the third character is equal to 0x03.
+ *
+ * - Check that the fourth character is equal to 0x04.
+ *
+ * @{
+ */
+
+/**
+ * @brief Validates the characters returned by the rtems_name_to_characters()
+ * directive.
+ */
+static void RtemsSupportValSupport_Action_0( void )
+{
+ char c1;
+ char c2;
+ char c3;
+ char c4;
+
+ rtems_name_to_characters( 0x01020304, &c1, &c2, &c3, &c4 );
+
+ /*
+ * Check that the first character is equal to 0x01.
+ */
+ T_step_eq_char( 0, c1, 0x01 );
+
+ /*
+ * Check that the second character is equal to 0x02.
+ */
+ T_step_eq_char( 1, c2, 0x02 );
+
+ /*
+ * Check that the third character is equal to 0x03.
+ */
+ T_step_eq_char( 2, c3, 0x03 );
+
+ /*
+ * Check that the fourth character is equal to 0x04.
+ */
+ T_step_eq_char( 3, c4, 0x04 );
+}
+
+/**
+ * @fn void T_case_body_RtemsSupportValSupport( void )
+ */
+T_TEST_CASE( RtemsSupportValSupport )
+{
+ T_plan( 4 );
+
+ RtemsSupportValSupport_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sys-lock.c b/testsuites/validation/tc-sys-lock.c
new file mode 100644
index 0000000000..56939a3dba
--- /dev/null
+++ b/testsuites/validation/tc-sys-lock.c
@@ -0,0 +1,433 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup NewlibValSysLock
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <errno.h>
+#include <string.h>
+#include <sys/lock.h>
+
+#include "tr-mtx-seize-try.h"
+#include "tr-mtx-seize-wait.h"
+#include "tr-mtx-surrender.h"
+#include "tr-tq-timeout-priority-inherit.h"
+#include "tx-thread-queue.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup NewlibValSysLock spec:/newlib/val/sys-lock
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests the <sys/lock.h> mutex directives.
+ *
+ * This test case performs the following actions:
+ *
+ * - Create a mutex and validate the mutex directives.
+ *
+ * - Validate the _Mutex_Try_acquire() directive.
+ *
+ * - Validate the _Mutex_Acquire_timed() directive for valid timeout
+ * parameters.
+ *
+ * - Validate the _Mutex_Acquire_timed() directive for an invalid timeout
+ * parameter.
+ *
+ * - Validate the _Mutex_Acquire_timed() timeout behaviour.
+ *
+ * - Validate the _Mutex_Acquire() directive.
+ *
+ * - Validate the _Mutex_Try_acquire() directive.
+ *
+ * - Destroy the mutex.
+ *
+ * - Create a recursive mutex and validate the mutex directives.
+ *
+ * - Validate the _Mutex_recursive_Try_acquire() directive.
+ *
+ * - Validate the _Mutex_recursive_Acquire_timed() directive for valid
+ * timeout parameters.
+ *
+ * - Validate the _Mutex_recursive_Acquire_timed() directive for an invalid
+ * timeout parameter.
+ *
+ * - Validate the _Mutex_recursive_Acquire_timed() timeout behaviour.
+ *
+ * - Validate the _Mutex_recursive_Acquire() directive.
+ *
+ * - Validate the _Mutex_recursive_Try_acquire() directive.
+ *
+ * - Destroy the mutex.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/newlib/val/sys-lock test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the thread queue test context.
+ */
+ TQMtxContext tq_mtx_ctx;
+} NewlibValSysLock_Context;
+
+static NewlibValSysLock_Context
+ NewlibValSysLock_Instance;
+
+static Status_Control Enqueue( TQContext *ctx, TQWait wait )
+{
+ const struct timespec abstime = {
+ .tv_sec = INT64_MAX,
+ .tv_nsec = 0
+ };
+ int eno;
+
+ switch ( wait ) {
+ case TQ_NO_WAIT:
+ eno = _Mutex_Try_acquire( ctx->thread_queue_object );
+ break;
+ case TQ_WAIT_FOREVER:
+ _Mutex_Acquire( ctx->thread_queue_object );
+ eno = 0;
+ break;
+ case TQ_WAIT_TIMED:
+ eno = _Mutex_Acquire_timed( ctx->thread_queue_object, &abstime );
+ break;
+ default:
+ T_unreachable();
+ break;
+ }
+
+ return STATUS_BUILD( 0, eno );
+}
+
+static Status_Control Surrender( TQContext *ctx )
+{
+ _Mutex_Release( ctx->thread_queue_object );
+
+ return STATUS_SUCCESSFUL;
+}
+
+static rtems_tcb *GetOwner( TQContext *ctx )
+{
+ const struct _Mutex_Control *mutex;
+
+ mutex = ctx->thread_queue_object;
+
+ return mutex->_Queue._owner;
+}
+
+static Status_Control RecursiveEnqueue( TQContext *ctx, TQWait wait )
+{
+ const struct timespec abstime = {
+ .tv_sec = INT64_MAX,
+ .tv_nsec = 0
+ };
+ int eno;
+
+ switch ( wait ) {
+ case TQ_NO_WAIT:
+ eno = _Mutex_recursive_Try_acquire( ctx->thread_queue_object );
+ break;
+ case TQ_WAIT_FOREVER:
+ _Mutex_recursive_Acquire( ctx->thread_queue_object );
+ eno = 0;
+ break;
+ case TQ_WAIT_TIMED:
+ eno = _Mutex_recursive_Acquire_timed(
+ ctx->thread_queue_object,
+ &abstime
+ );
+ break;
+ default:
+ T_unreachable();
+ break;
+ }
+
+ return STATUS_BUILD( 0, eno );
+}
+
+static Status_Control RecursiveSurrender( TQContext *ctx )
+{
+ _Mutex_recursive_Release( ctx->thread_queue_object );
+
+ return STATUS_SUCCESSFUL;
+}
+
+static rtems_tcb *RecursiveGetOwner( TQContext *ctx )
+{
+ const struct _Mutex_recursive_Control *mutex;
+
+ mutex = ctx->thread_queue_object;
+
+ return mutex->_Mutex._Queue._owner;
+}
+
+static void NewlibValSysLock_Setup( NewlibValSysLock_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->tq_mtx_ctx.base.enqueue_variant = TQ_ENQUEUE_BLOCKS;
+ ctx->tq_mtx_ctx.base.discipline = TQ_PRIORITY;
+ ctx->tq_mtx_ctx.base.deadlock = TQ_DEADLOCK_FATAL;
+ ctx->tq_mtx_ctx.base.convert_status = TQConvertStatusPOSIX;
+ ctx->tq_mtx_ctx.protocol = TQ_MTX_PRIORITY_INHERIT;
+ ctx->tq_mtx_ctx.owner_check = TQ_MTX_NO_OWNER_CHECK;
+ ctx->tq_mtx_ctx.priority_ceiling = PRIO_INVALID;
+ TQInitialize( &ctx->tq_mtx_ctx.base );
+}
+
+static void NewlibValSysLock_Setup_Wrap( void *arg )
+{
+ NewlibValSysLock_Context *ctx;
+
+ ctx = arg;
+ NewlibValSysLock_Setup( ctx );
+}
+
+static void NewlibValSysLock_Teardown( NewlibValSysLock_Context *ctx )
+{
+ TQDestroy( &ctx->tq_mtx_ctx.base );
+ RestoreRunnerPriority();
+}
+
+static void NewlibValSysLock_Teardown_Wrap( void *arg )
+{
+ NewlibValSysLock_Context *ctx;
+
+ ctx = arg;
+ NewlibValSysLock_Teardown( ctx );
+}
+
+static T_fixture NewlibValSysLock_Fixture = {
+ .setup = NewlibValSysLock_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NewlibValSysLock_Teardown_Wrap,
+ .scope = NULL,
+ .initial_context = &NewlibValSysLock_Instance
+};
+
+/**
+ * @brief Create a mutex and validate the mutex directives.
+ */
+static void NewlibValSysLock_Action_0( NewlibValSysLock_Context *ctx )
+{
+ const struct timespec invalid_abstime = {
+ .tv_sec = -1,
+ .tv_nsec = -1
+ };
+ int eno;
+ struct _Mutex_Control mutex;
+
+ _Mutex_Initialize( &mutex );
+
+ ctx->tq_mtx_ctx.base.thread_queue_object = &mutex;
+ ctx->tq_mtx_ctx.base.enqueue_prepare = TQEnqueuePrepareDefault;
+ ctx->tq_mtx_ctx.base.enqueue_done = TQEnqueueDoneDefault;
+ ctx->tq_mtx_ctx.base.enqueue = Enqueue;
+ ctx->tq_mtx_ctx.base.surrender = Surrender;
+ ctx->tq_mtx_ctx.base.get_owner = GetOwner;
+
+ /*
+ * Validate the _Mutex_Try_acquire() directive.
+ */
+ ctx->tq_mtx_ctx.base.wait = TQ_NO_WAIT;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_UNAVAILABLE;
+ ScoreMtxReqSeizeTry_Run( &ctx->tq_mtx_ctx );
+
+ /*
+ * Validate the _Mutex_Acquire_timed() directive for valid timeout
+ * parameters.
+ */
+ ctx->tq_mtx_ctx.base.wait = TQ_WAIT_TIMED;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_DEADLOCK;
+ ScoreMtxReqSeizeWait_Run( &ctx->tq_mtx_ctx );
+
+ /*
+ * Validate the _Mutex_Acquire_timed() directive for an invalid timeout
+ * parameter.
+ */
+ TQSetScheduler(
+ &ctx->tq_mtx_ctx.base,
+ TQ_HELPER_A,
+ SCHEDULER_A_ID,
+ PRIO_HIGH
+ );
+ TQSend( &ctx->tq_mtx_ctx.base, TQ_HELPER_A, TQ_EVENT_ENQUEUE );
+ eno = _Mutex_Acquire_timed( &mutex, &invalid_abstime );
+ T_eq_int( eno, EINVAL );
+ TQSend( &ctx->tq_mtx_ctx.base, TQ_HELPER_A, TQ_EVENT_SURRENDER );
+
+ /*
+ * Validate the _Mutex_Acquire_timed() timeout behaviour.
+ */
+ ctx->tq_mtx_ctx.base.wait = TQ_WAIT_FOREVER;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_DEADLOCK;
+ ScoreTqReqTimeoutPriorityInherit_Run(
+ &ctx->tq_mtx_ctx.base
+ );
+
+ /*
+ * Validate the _Mutex_Acquire() directive.
+ */
+ ctx->tq_mtx_ctx.base.wait = TQ_WAIT_FOREVER;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_DEADLOCK;
+ ScoreMtxReqSeizeWait_Run( &ctx->tq_mtx_ctx );
+
+ /*
+ * Validate the _Mutex_Try_acquire() directive.
+ */
+ ctx->tq_mtx_ctx.base.wait = TQ_WAIT_FOREVER;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_DEADLOCK;
+ ScoreMtxReqSurrender_Run( &ctx->tq_mtx_ctx );
+
+ /*
+ * Destroy the mutex.
+ */
+ _Mutex_Destroy( &mutex );
+}
+
+/**
+ * @brief Create a recursive mutex and validate the mutex directives.
+ */
+static void NewlibValSysLock_Action_1( NewlibValSysLock_Context *ctx )
+{
+ const struct timespec invalid_abstime = {
+ .tv_sec = -1,
+ .tv_nsec = -1
+ };
+ int eno;
+ struct _Mutex_recursive_Control mutex;
+
+ _Mutex_recursive_Initialize( &mutex );
+
+ ctx->tq_mtx_ctx.base.thread_queue_object = &mutex;
+ ctx->tq_mtx_ctx.base.enqueue_prepare = TQEnqueuePrepareDefault;
+ ctx->tq_mtx_ctx.base.enqueue_done = TQEnqueueDoneDefault;
+ ctx->tq_mtx_ctx.base.enqueue = RecursiveEnqueue;
+ ctx->tq_mtx_ctx.base.surrender = RecursiveSurrender;
+ ctx->tq_mtx_ctx.base.get_owner = RecursiveGetOwner;
+
+ /*
+ * Validate the _Mutex_recursive_Try_acquire() directive.
+ */
+ ctx->tq_mtx_ctx.base.wait = TQ_NO_WAIT;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ScoreMtxReqSeizeTry_Run( &ctx->tq_mtx_ctx );
+
+ /*
+ * Validate the _Mutex_recursive_Acquire_timed() directive for valid timeout
+ * parameters.
+ */
+ ctx->tq_mtx_ctx.base.wait = TQ_WAIT_TIMED;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ScoreMtxReqSeizeWait_Run( &ctx->tq_mtx_ctx );
+
+ /*
+ * Validate the _Mutex_recursive_Acquire_timed() directive for an invalid
+ * timeout parameter.
+ */
+ TQSetScheduler(
+ &ctx->tq_mtx_ctx.base,
+ TQ_HELPER_A,
+ SCHEDULER_A_ID,
+ PRIO_HIGH
+ );
+ TQSend( &ctx->tq_mtx_ctx.base, TQ_HELPER_A, TQ_EVENT_ENQUEUE );
+ eno = _Mutex_recursive_Acquire_timed( &mutex, &invalid_abstime );
+ T_eq_int( eno, EINVAL );
+ TQSend( &ctx->tq_mtx_ctx.base, TQ_HELPER_A, TQ_EVENT_SURRENDER );
+
+ /*
+ * Validate the _Mutex_recursive_Acquire_timed() timeout behaviour.
+ */
+ ctx->tq_mtx_ctx.base.wait = TQ_WAIT_FOREVER;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ScoreTqReqTimeoutPriorityInherit_Run(
+ &ctx->tq_mtx_ctx.base
+ );
+
+ /*
+ * Validate the _Mutex_recursive_Acquire() directive.
+ */
+ ctx->tq_mtx_ctx.base.wait = TQ_WAIT_FOREVER;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ScoreMtxReqSeizeWait_Run( &ctx->tq_mtx_ctx );
+
+ /*
+ * Validate the _Mutex_recursive_Try_acquire() directive.
+ */
+ ctx->tq_mtx_ctx.base.wait = TQ_WAIT_FOREVER;
+ ctx->tq_mtx_ctx.recursive = TQ_MTX_RECURSIVE_ALLOWED;
+ ScoreMtxReqSurrender_Run( &ctx->tq_mtx_ctx );
+
+ /*
+ * Destroy the mutex.
+ */
+ _Mutex_recursive_Destroy( &mutex );
+}
+
+/**
+ * @fn void T_case_body_NewlibValSysLock( void )
+ */
+T_TEST_CASE_FIXTURE( NewlibValSysLock, &NewlibValSysLock_Fixture )
+{
+ NewlibValSysLock_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ NewlibValSysLock_Action_0( ctx );
+ NewlibValSysLock_Action_1( ctx );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-construct-errors.c b/testsuites/validation/tc-task-construct-errors.c
deleted file mode 100644
index e6f8c5faa5..0000000000
--- a/testsuites/validation/tc-task-construct-errors.c
+++ /dev/null
@@ -1,1207 +0,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSTestCaseRtemsTaskReqConstructErrors
- */
-
-/*
- * Copyright (C) 2020, 2021 embedded brains GmbH (http://www.embedded-brains.de)
- *
- * 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 OWNER 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.
- */
-
-/*
- * This file is part of the RTEMS quality process and was automatically
- * generated. If you find something that needs to be fixed or
- * worded better please post a report or patch to an RTEMS mailing list
- * or raise a bug report:
- *
- * https://www.rtems.org/bugs.html
- *
- * For information on updating and regenerating please refer to the How-To
- * section in the Software Requirements Engineering chapter of the
- * RTEMS Software Engineering manual. The manual is provided as a part of
- * a release. For development sources please refer to the online
- * documentation at:
- *
- * https://docs.rtems.org
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems.h>
-#include <string.h>
-#include <rtems/score/apimutex.h>
-#include <rtems/score/threadimpl.h>
-
-#include <rtems/test.h>
-
-/**
- * @defgroup RTEMSTestCaseRtemsTaskReqConstructErrors \
- * spec:/rtems/task/req/construct-errors
- *
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
- * @ingroup RTEMSTestSuiteTestsuitesValidation1
- *
- * @{
- */
-
-typedef enum {
- RtemsTaskReqConstructErrors_Pre_Config_Valid,
- RtemsTaskReqConstructErrors_Pre_Config_Null,
- RtemsTaskReqConstructErrors_Pre_Config_NA
-} RtemsTaskReqConstructErrors_Pre_Config;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Pre_Name_Valid,
- RtemsTaskReqConstructErrors_Pre_Name_Inv,
- RtemsTaskReqConstructErrors_Pre_Name_NA
-} RtemsTaskReqConstructErrors_Pre_Name;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Pre_Id_Valid,
- RtemsTaskReqConstructErrors_Pre_Id_Null,
- RtemsTaskReqConstructErrors_Pre_Id_NA
-} RtemsTaskReqConstructErrors_Pre_Id;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Pre_SysTsk_Yes,
- RtemsTaskReqConstructErrors_Pre_SysTsk_No,
- RtemsTaskReqConstructErrors_Pre_SysTsk_NA
-} RtemsTaskReqConstructErrors_Pre_SysTsk;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Pre_Prio_Valid,
- RtemsTaskReqConstructErrors_Pre_Prio_Zero,
- RtemsTaskReqConstructErrors_Pre_Prio_Inv,
- RtemsTaskReqConstructErrors_Pre_Prio_NA
-} RtemsTaskReqConstructErrors_Pre_Prio;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Pre_Free_Yes,
- RtemsTaskReqConstructErrors_Pre_Free_No,
- RtemsTaskReqConstructErrors_Pre_Free_NA
-} RtemsTaskReqConstructErrors_Pre_Free;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Pre_TLS_Enough,
- RtemsTaskReqConstructErrors_Pre_TLS_Small,
- RtemsTaskReqConstructErrors_Pre_TLS_NA
-} RtemsTaskReqConstructErrors_Pre_TLS;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Pre_Stack_Enough,
- RtemsTaskReqConstructErrors_Pre_Stack_Small,
- RtemsTaskReqConstructErrors_Pre_Stack_NA
-} RtemsTaskReqConstructErrors_Pre_Stack;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Pre_Ext_Ok,
- RtemsTaskReqConstructErrors_Pre_Ext_Err,
- RtemsTaskReqConstructErrors_Pre_Ext_NA
-} RtemsTaskReqConstructErrors_Pre_Ext;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Post_Status_Ok,
- RtemsTaskReqConstructErrors_Post_Status_InvAddr,
- RtemsTaskReqConstructErrors_Post_Status_InvName,
- RtemsTaskReqConstructErrors_Post_Status_InvPrio,
- RtemsTaskReqConstructErrors_Post_Status_InvSize,
- RtemsTaskReqConstructErrors_Post_Status_TooMany,
- RtemsTaskReqConstructErrors_Post_Status_Unsat,
- RtemsTaskReqConstructErrors_Post_Status_NA
-} RtemsTaskReqConstructErrors_Post_Status;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Post_Name_Valid,
- RtemsTaskReqConstructErrors_Post_Name_Invalid,
- RtemsTaskReqConstructErrors_Post_Name_NA
-} RtemsTaskReqConstructErrors_Post_Name;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Post_IdVar_Set,
- RtemsTaskReqConstructErrors_Post_IdVar_Nop,
- RtemsTaskReqConstructErrors_Post_IdVar_NA
-} RtemsTaskReqConstructErrors_Post_IdVar;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Post_CreateExt_Yes,
- RtemsTaskReqConstructErrors_Post_CreateExt_No,
- RtemsTaskReqConstructErrors_Post_CreateExt_NA
-} RtemsTaskReqConstructErrors_Post_CreateExt;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Post_DelExt_Yes,
- RtemsTaskReqConstructErrors_Post_DelExt_No,
- RtemsTaskReqConstructErrors_Post_DelExt_NA
-} RtemsTaskReqConstructErrors_Post_DelExt;
-
-typedef enum {
- RtemsTaskReqConstructErrors_Post_StoFree_Yes,
- RtemsTaskReqConstructErrors_Post_StoFree_No,
- RtemsTaskReqConstructErrors_Post_StoFree_NA
-} RtemsTaskReqConstructErrors_Post_StoFree;
-
-/**
- * @brief Test context for spec:/rtems/task/req/construct-errors test case.
- */
-typedef struct {
- rtems_status_code status;
-
- const rtems_task_config *config;
-
- rtems_task_config config_value;
-
- rtems_id *id;
-
- rtems_id id_value;
-
- bool create_extension_status;
-
- uint32_t create_extension_calls;
-
- uint32_t delete_extension_calls;
-
- uint32_t storage_free_calls;
-
- size_t stack_size;
-
- rtems_id extension_id;
-
- void *seized_objects;
-
- /**
- * @brief This member defines the pre-condition states for the next action.
- */
- size_t pcs[ 9 ];
-
- /**
- * @brief This member indicates if the test action loop is currently
- * executed.
- */
- bool in_action_loop;
-} RtemsTaskReqConstructErrors_Context;
-
-static RtemsTaskReqConstructErrors_Context
- RtemsTaskReqConstructErrors_Instance;
-
-static const char * const RtemsTaskReqConstructErrors_PreDesc_Config[] = {
- "Valid",
- "Null",
- "NA"
-};
-
-static const char * const RtemsTaskReqConstructErrors_PreDesc_Name[] = {
- "Valid",
- "Inv",
- "NA"
-};
-
-static const char * const RtemsTaskReqConstructErrors_PreDesc_Id[] = {
- "Valid",
- "Null",
- "NA"
-};
-
-static const char * const RtemsTaskReqConstructErrors_PreDesc_SysTsk[] = {
- "Yes",
- "No",
- "NA"
-};
-
-static const char * const RtemsTaskReqConstructErrors_PreDesc_Prio[] = {
- "Valid",
- "Zero",
- "Inv",
- "NA"
-};
-
-static const char * const RtemsTaskReqConstructErrors_PreDesc_Free[] = {
- "Yes",
- "No",
- "NA"
-};
-
-static const char * const RtemsTaskReqConstructErrors_PreDesc_TLS[] = {
- "Enough",
- "Small",
- "NA"
-};
-
-static const char * const RtemsTaskReqConstructErrors_PreDesc_Stack[] = {
- "Enough",
- "Small",
- "NA"
-};
-
-static const char * const RtemsTaskReqConstructErrors_PreDesc_Ext[] = {
- "Ok",
- "Err",
- "NA"
-};
-
-static const char * const * const RtemsTaskReqConstructErrors_PreDesc[] = {
- RtemsTaskReqConstructErrors_PreDesc_Config,
- RtemsTaskReqConstructErrors_PreDesc_Name,
- RtemsTaskReqConstructErrors_PreDesc_Id,
- RtemsTaskReqConstructErrors_PreDesc_SysTsk,
- RtemsTaskReqConstructErrors_PreDesc_Prio,
- RtemsTaskReqConstructErrors_PreDesc_Free,
- RtemsTaskReqConstructErrors_PreDesc_TLS,
- RtemsTaskReqConstructErrors_PreDesc_Stack,
- RtemsTaskReqConstructErrors_PreDesc_Ext,
- NULL
-};
-
-#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
-
-#define INVALID_ID 0xffffffff
-
-typedef RtemsTaskReqConstructErrors_Context Context;
-
-static _Thread_local int tls_variable;
-
-#define MAX_TLS_SIZE RTEMS_ALIGN_UP( 128, RTEMS_TASK_STORAGE_ALIGNMENT )
-
-RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT ) static char task_storage[
- RTEMS_TASK_STORAGE_SIZE(
- MAX_TLS_SIZE + RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_FLOATING_POINT
- )
-];
-
-static const rtems_task_config seize_task_config = {
- .name = rtems_build_name( 'S', 'I', 'Z', 'E' ),
- .initial_priority = 1,
- .storage_area = task_storage,
- .storage_size = sizeof( task_storage ),
- .maximum_thread_local_storage_size = MAX_TLS_SIZE,
- .initial_modes = RTEMS_DEFAULT_MODES,
- .attributes = RTEMS_DEFAULT_MODES
-};
-
-static void StorageFree( void *ptr )
-{
- T_eq_ptr( ptr, task_storage );
- ++RtemsTaskReqConstructErrors_Instance.storage_free_calls;
-}
-
-static rtems_status_code Create( void *arg, uint32_t *id )
-{
- Context *ctx;
- bool create_extension_status;
- rtems_status_code sc;
-
- ctx = arg;
- create_extension_status = ctx->create_extension_status;
- ctx->create_extension_status = true;
- sc = rtems_task_construct( &seize_task_config, id );
- ctx->create_extension_status = create_extension_status;
-
- return sc;
-}
-
-static bool ThreadCreate( rtems_tcb *executing, rtems_tcb *created )
-{
- (void) executing;
- (void) created;
-
- ++RtemsTaskReqConstructErrors_Instance.create_extension_calls;
- return RtemsTaskReqConstructErrors_Instance.create_extension_status;
-}
-
-static void ThreadDelete( rtems_tcb *executing, rtems_tcb *deleted )
-{
- (void) executing;
- (void) deleted;
-
- ++RtemsTaskReqConstructErrors_Instance.delete_extension_calls;
-}
-
-static const rtems_extensions_table extensions = {
- .thread_create = ThreadCreate,
- .thread_delete = ThreadDelete
-};
-
-static void RtemsTaskReqConstructErrors_Pre_Config_Prepare(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Pre_Config state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Pre_Config_Valid: {
- /*
- * While the ``config`` parameter references an object of type
- * rtems_task_config.
- */
- ctx->config = &ctx->config_value;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Config_Null: {
- /*
- * While the ``config`` parameter is NULL.
- */
- ctx->config = NULL;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Config_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Pre_Name_Prepare(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Pre_Name state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Pre_Name_Valid: {
- /*
- * While the name of the task configuration is valid.
- */
- ctx->config_value.name = NAME;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Name_Inv: {
- /*
- * While the name of the task configuration is invalid.
- */
- ctx->config_value.name = 0;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Name_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Pre_Id_Prepare(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Pre_Id state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Pre_Id_Valid: {
- /*
- * While the ``id`` parameter references an object of type rtems_id.
- */
- ctx->id = &ctx->id_value;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Id_Null: {
- /*
- * While the ``id`` parameter is NULL.
- */
- ctx->id = NULL;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Id_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Pre_SysTsk_Prepare(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Pre_SysTsk state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Pre_SysTsk_Yes: {
- /*
- * While the attributes of the task configuration specifies a system
- * task.
- */
- ctx->config_value.attributes |= RTEMS_SYSTEM_TASK;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_SysTsk_No: {
- /*
- * While the attributes of the task configuration specifies an
- * application task.
- */
- /* Nothing to do */
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_SysTsk_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Pre_Prio_Prepare(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Pre_Prio state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Pre_Prio_Valid: {
- /*
- * While the initial priority of the task configuration is valid and
- * non-zero.
- */
- ctx->config_value.initial_priority = 254;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Prio_Zero: {
- /*
- * While the initial priority of the task configuration is zero.
- */
- ctx->config_value.initial_priority = 0;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Prio_Inv: {
- /*
- * While the initial priority of the task configuration is invalid.
- */
- ctx->config_value.initial_priority = 0xffffffff;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Prio_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Pre_Free_Prepare(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Pre_Free state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Pre_Free_Yes: {
- /*
- * While the system has at least one inactive task object available.
- */
- /* Nothing to do */
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Free_No: {
- /*
- * While the system has no inactive task object available.
- */
- ctx->seized_objects = T_seize_objects( Create, ctx );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Free_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Pre_TLS_Prepare(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Pre_TLS state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Pre_TLS_Enough: {
- /*
- * While the maximum thread-local storage size of the task configuration
- * is greater than or equal to the thread-local storage size.
- */
- ctx->config_value.maximum_thread_local_storage_size = MAX_TLS_SIZE;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_TLS_Small: {
- /*
- * While the maximum thread-local storage size of the task configuration
- * is less than the thread-local storage size.
- */
- ctx->config_value.maximum_thread_local_storage_size = 0;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_TLS_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Pre_Stack_Prepare(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Pre_Stack state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Pre_Stack_Enough: {
- /*
- * While the task stack size of the task configuration is greater than or
- * equal to the configured minimum size.
- */
- ctx->stack_size = RTEMS_MINIMUM_STACK_SIZE;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Stack_Small: {
- /*
- * While the task stack size of the task configuration is less than the
- * configured minimum size.
- */
- ctx->stack_size = 0;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Stack_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Pre_Ext_Prepare(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Pre_Ext state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Pre_Ext_Ok: {
- /*
- * While none of the task create extensions fails.
- */
- ctx->create_extension_status = true;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Ext_Err: {
- /*
- * While at least one of the task create extensions fails.
- */
- ctx->create_extension_status = false;
- break;
- }
-
- case RtemsTaskReqConstructErrors_Pre_Ext_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Post_Status_Check(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Post_Status state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Post_Status_Ok: {
- /*
- * The return status of rtems_task_construct() shall be RTEMS_SUCCESSFUL.
- */
- T_rsc_success( ctx->status );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_Status_InvAddr: {
- /*
- * The return status of rtems_task_construct() shall be
- * RTEMS_INVALID_ADDRESS.
- */
- T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_Status_InvName: {
- /*
- * The return status of rtems_task_construct() shall be
- * RTEMS_INVALID_NAME.
- */
- T_rsc( ctx->status, RTEMS_INVALID_NAME );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_Status_InvPrio: {
- /*
- * The return status of rtems_task_construct() shall be
- * RTEMS_INVALID_PRIORITY.
- */
- T_rsc( ctx->status, RTEMS_INVALID_PRIORITY );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_Status_InvSize: {
- /*
- * The return status of rtems_task_construct() shall be
- * RTEMS_INVALID_SIZE.
- */
- T_rsc( ctx->status, RTEMS_INVALID_SIZE );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_Status_TooMany: {
- /*
- * The return status of rtems_task_construct() shall be RTEMS_TOO_MANY.
- */
- T_rsc( ctx->status, RTEMS_TOO_MANY );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_Status_Unsat: {
- /*
- * The return status of rtems_task_construct() shall be
- * RTEMS_UNSATISFIED.
- */
- T_rsc( ctx->status, RTEMS_UNSATISFIED );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_Status_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Post_Name_Check(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Post_Name state
-)
-{
- rtems_status_code sc;
- rtems_id id;
-
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Post_Name_Valid: {
- /*
- * The unique object name shall identify the task constructed by the
- * rtems_task_construct() call.
- */
- id = 0;
- sc = rtems_task_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
- T_rsc_success( sc );
- T_eq_u32( id, ctx->id_value );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_Name_Invalid: {
- /*
- * The unique object name shall not identify a task.
- */
- sc = rtems_task_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
- T_rsc( sc, RTEMS_INVALID_NAME );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_Name_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Post_IdVar_Check(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Post_IdVar state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Post_IdVar_Set: {
- /*
- * The value of the object referenced by the ``id`` parameter shall be
- * set to the object identifier of the constructed task after the return
- * of the rtems_task_construct() call.
- */
- T_eq_ptr( ctx->id, &ctx->id_value );
- T_ne_u32( ctx->id_value, INVALID_ID );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_IdVar_Nop: {
- /*
- * Objects referenced by the ``id`` parameter in past calls to
- * rtems_task_construct() shall not be accessed by the
- * rtems_task_construct() call.
- */
- T_eq_u32( ctx->id_value, INVALID_ID );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_IdVar_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Post_CreateExt_Check(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Post_CreateExt state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Post_CreateExt_Yes: {
- /*
- * The create user extensions shall be invoked during the
- * rtems_task_construct() call.
- */
- T_eq_u32( ctx->create_extension_calls, 1 );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_CreateExt_No: {
- /*
- * The create user extensions shall not be invoked during the
- * rtems_task_construct() call.
- */
- T_eq_u32( ctx->create_extension_calls, 0 );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_CreateExt_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Post_DelExt_Check(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Post_DelExt state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Post_DelExt_Yes: {
- /*
- * The delete user extensions shall be invoked during the
- * rtems_task_construct() call.
- */
- T_eq_u32( ctx->delete_extension_calls, 1 );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_DelExt_No: {
- /*
- * The delete user extensions shall not be invoked during the
- * rtems_task_construct() call.
- */
- T_eq_u32( ctx->delete_extension_calls, 0 );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_DelExt_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Post_StoFree_Check(
- RtemsTaskReqConstructErrors_Context *ctx,
- RtemsTaskReqConstructErrors_Post_StoFree state
-)
-{
- switch ( state ) {
- case RtemsTaskReqConstructErrors_Post_StoFree_Yes: {
- /*
- * The storage free handler of the task configuration shall be invoked
- * during the rtems_task_construct() call.
- */
- T_eq_u32( ctx->storage_free_calls, 1 );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_StoFree_No: {
- /*
- * The storage free handler of the task configuration shall not be
- * invoked during the rtems_task_construct() call.
- */
- T_eq_u32( ctx->storage_free_calls, 0 );
- break;
- }
-
- case RtemsTaskReqConstructErrors_Post_StoFree_NA:
- break;
- }
-}
-
-static void RtemsTaskReqConstructErrors_Setup(
- RtemsTaskReqConstructErrors_Context *ctx
-)
-{
- rtems_status_code sc;
- int var;
-
- var = tls_variable;
- RTEMS_OBFUSCATE_VARIABLE( var );
- tls_variable = var;
-
- sc = rtems_extension_create(
- rtems_build_name( 'T', 'E', 'X', 'T' ),
- &extensions,
- &ctx->extension_id
- );
- T_rsc_success( sc );
-}
-
-static void RtemsTaskReqConstructErrors_Setup_Wrap( void *arg )
-{
- RtemsTaskReqConstructErrors_Context *ctx;
-
- ctx = arg;
- ctx->in_action_loop = false;
- RtemsTaskReqConstructErrors_Setup( ctx );
-}
-
-static void RtemsTaskReqConstructErrors_Teardown(
- RtemsTaskReqConstructErrors_Context *ctx
-)
-{
- rtems_status_code sc;
-
- sc = rtems_extension_delete( ctx->extension_id );
- T_rsc_success( sc );
-}
-
-static void RtemsTaskReqConstructErrors_Teardown_Wrap( void *arg )
-{
- RtemsTaskReqConstructErrors_Context *ctx;
-
- ctx = arg;
- ctx->in_action_loop = false;
- RtemsTaskReqConstructErrors_Teardown( ctx );
-}
-
-static void RtemsTaskReqConstructErrors_Prepare(
- RtemsTaskReqConstructErrors_Context *ctx
-)
-{
- _RTEMS_Lock_allocator();
- _Thread_Kill_zombies();
- _RTEMS_Unlock_allocator();
-
- ctx->id_value = INVALID_ID;
- memset( &ctx->config_value, 0, sizeof( ctx->config_value ) );
- ctx->config_value.storage_area = task_storage,
- ctx->config_value.storage_free = StorageFree;
-}
-
-static void RtemsTaskReqConstructErrors_Action(
- RtemsTaskReqConstructErrors_Context *ctx
-)
-{
- ctx->create_extension_calls = 0;
- ctx->delete_extension_calls = 0;
- ctx->storage_free_calls = 0;
- ctx->config_value.storage_size = RTEMS_TASK_STORAGE_SIZE(
- ctx->config_value.maximum_thread_local_storage_size + ctx->stack_size,
- ctx->config_value.attributes
- );
- ctx->status = rtems_task_construct( ctx->config, ctx->id );
-}
-
-static void RtemsTaskReqConstructErrors_Cleanup(
- RtemsTaskReqConstructErrors_Context *ctx
-)
-{
- if ( ctx->id_value != INVALID_ID ) {
- rtems_status_code sc;
-
- sc = rtems_task_delete( ctx->id_value );
- T_rsc_success( sc );
-
- ctx->id_value = INVALID_ID;
- }
-
- T_surrender_objects( &ctx->seized_objects, rtems_task_delete );
-}
-
-typedef struct {
- uint32_t Skip : 1;
- uint32_t Pre_Config_NA : 1;
- uint32_t Pre_Name_NA : 1;
- uint32_t Pre_Id_NA : 1;
- uint32_t Pre_SysTsk_NA : 1;
- uint32_t Pre_Prio_NA : 1;
- uint32_t Pre_Free_NA : 1;
- uint32_t Pre_TLS_NA : 1;
- uint32_t Pre_Stack_NA : 1;
- uint32_t Pre_Ext_NA : 1;
- uint32_t Post_Status : 3;
- uint32_t Post_Name : 2;
- uint32_t Post_IdVar : 2;
- uint32_t Post_CreateExt : 2;
- uint32_t Post_DelExt : 2;
- uint32_t Post_StoFree : 2;
-} RtemsTaskReqConstructErrors_Entry;
-
-static const RtemsTaskReqConstructErrors_Entry
-RtemsTaskReqConstructErrors_Entries[] = {
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- RtemsTaskReqConstructErrors_Post_Status_InvAddr,
- RtemsTaskReqConstructErrors_Post_Name_Invalid,
- RtemsTaskReqConstructErrors_Post_IdVar_Nop,
- RtemsTaskReqConstructErrors_Post_CreateExt_No,
- RtemsTaskReqConstructErrors_Post_DelExt_No,
- RtemsTaskReqConstructErrors_Post_StoFree_No },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- RtemsTaskReqConstructErrors_Post_Status_InvName,
- RtemsTaskReqConstructErrors_Post_Name_Invalid,
- RtemsTaskReqConstructErrors_Post_IdVar_Nop,
- RtemsTaskReqConstructErrors_Post_CreateExt_No,
- RtemsTaskReqConstructErrors_Post_DelExt_No,
- RtemsTaskReqConstructErrors_Post_StoFree_No },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- RtemsTaskReqConstructErrors_Post_Status_InvPrio,
- RtemsTaskReqConstructErrors_Post_Name_Invalid,
- RtemsTaskReqConstructErrors_Post_IdVar_Nop,
- RtemsTaskReqConstructErrors_Post_CreateExt_No,
- RtemsTaskReqConstructErrors_Post_DelExt_No,
- RtemsTaskReqConstructErrors_Post_StoFree_No },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- RtemsTaskReqConstructErrors_Post_Status_TooMany,
- RtemsTaskReqConstructErrors_Post_Name_Invalid,
- RtemsTaskReqConstructErrors_Post_IdVar_Nop,
- RtemsTaskReqConstructErrors_Post_CreateExt_No,
- RtemsTaskReqConstructErrors_Post_DelExt_No,
- RtemsTaskReqConstructErrors_Post_StoFree_No },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- RtemsTaskReqConstructErrors_Post_Status_InvSize,
- RtemsTaskReqConstructErrors_Post_Name_Invalid,
- RtemsTaskReqConstructErrors_Post_IdVar_Nop,
- RtemsTaskReqConstructErrors_Post_CreateExt_No,
- RtemsTaskReqConstructErrors_Post_DelExt_No,
- RtemsTaskReqConstructErrors_Post_StoFree_No },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqConstructErrors_Post_Status_Ok,
- RtemsTaskReqConstructErrors_Post_Name_Valid,
- RtemsTaskReqConstructErrors_Post_IdVar_Set,
- RtemsTaskReqConstructErrors_Post_CreateExt_Yes,
- RtemsTaskReqConstructErrors_Post_DelExt_No,
- RtemsTaskReqConstructErrors_Post_StoFree_No },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- RtemsTaskReqConstructErrors_Post_Status_Unsat,
- RtemsTaskReqConstructErrors_Post_Name_Invalid,
- RtemsTaskReqConstructErrors_Post_IdVar_Nop,
- RtemsTaskReqConstructErrors_Post_CreateExt_Yes,
- RtemsTaskReqConstructErrors_Post_DelExt_Yes,
- RtemsTaskReqConstructErrors_Post_StoFree_Yes }
-};
-
-static const uint8_t
-RtemsTaskReqConstructErrors_Map[] = {
- 5, 6, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 5, 6, 4, 4, 4, 4, 4, 4, 3, 3,
- 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 6, 4, 4,
- 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-static size_t RtemsTaskReqConstructErrors_Scope(
- void *arg,
- char *buf,
- size_t n
-)
-{
- RtemsTaskReqConstructErrors_Context *ctx;
-
- ctx = arg;
-
- if ( ctx->in_action_loop ) {
- return T_get_scope(
- RtemsTaskReqConstructErrors_PreDesc,
- buf,
- n,
- ctx->pcs
- );
- }
-
- return 0;
-}
-
-static T_fixture RtemsTaskReqConstructErrors_Fixture = {
- .setup = RtemsTaskReqConstructErrors_Setup_Wrap,
- .stop = NULL,
- .teardown = RtemsTaskReqConstructErrors_Teardown_Wrap,
- .scope = RtemsTaskReqConstructErrors_Scope,
- .initial_context = &RtemsTaskReqConstructErrors_Instance
-};
-
-static inline RtemsTaskReqConstructErrors_Entry
-RtemsTaskReqConstructErrors_GetEntry( size_t index )
-{
- return RtemsTaskReqConstructErrors_Entries[
- RtemsTaskReqConstructErrors_Map[ index ]
- ];
-}
-
-/**
- * @fn void T_case_body_RtemsTaskReqConstructErrors( void )
- */
-T_TEST_CASE_FIXTURE(
- RtemsTaskReqConstructErrors,
- &RtemsTaskReqConstructErrors_Fixture
-)
-{
- RtemsTaskReqConstructErrors_Context *ctx;
- size_t index;
-
- ctx = T_fixture_context();
- ctx->in_action_loop = true;
- index = 0;
-
- for (
- ctx->pcs[ 0 ] = RtemsTaskReqConstructErrors_Pre_Config_Valid;
- ctx->pcs[ 0 ] < RtemsTaskReqConstructErrors_Pre_Config_NA;
- ++ctx->pcs[ 0 ]
- ) {
- for (
- ctx->pcs[ 1 ] = RtemsTaskReqConstructErrors_Pre_Name_Valid;
- ctx->pcs[ 1 ] < RtemsTaskReqConstructErrors_Pre_Name_NA;
- ++ctx->pcs[ 1 ]
- ) {
- for (
- ctx->pcs[ 2 ] = RtemsTaskReqConstructErrors_Pre_Id_Valid;
- ctx->pcs[ 2 ] < RtemsTaskReqConstructErrors_Pre_Id_NA;
- ++ctx->pcs[ 2 ]
- ) {
- for (
- ctx->pcs[ 3 ] = RtemsTaskReqConstructErrors_Pre_SysTsk_Yes;
- ctx->pcs[ 3 ] < RtemsTaskReqConstructErrors_Pre_SysTsk_NA;
- ++ctx->pcs[ 3 ]
- ) {
- for (
- ctx->pcs[ 4 ] = RtemsTaskReqConstructErrors_Pre_Prio_Valid;
- ctx->pcs[ 4 ] < RtemsTaskReqConstructErrors_Pre_Prio_NA;
- ++ctx->pcs[ 4 ]
- ) {
- for (
- ctx->pcs[ 5 ] = RtemsTaskReqConstructErrors_Pre_Free_Yes;
- ctx->pcs[ 5 ] < RtemsTaskReqConstructErrors_Pre_Free_NA;
- ++ctx->pcs[ 5 ]
- ) {
- for (
- ctx->pcs[ 6 ] = RtemsTaskReqConstructErrors_Pre_TLS_Enough;
- ctx->pcs[ 6 ] < RtemsTaskReqConstructErrors_Pre_TLS_NA;
- ++ctx->pcs[ 6 ]
- ) {
- for (
- ctx->pcs[ 7 ] = RtemsTaskReqConstructErrors_Pre_Stack_Enough;
- ctx->pcs[ 7 ] < RtemsTaskReqConstructErrors_Pre_Stack_NA;
- ++ctx->pcs[ 7 ]
- ) {
- for (
- ctx->pcs[ 8 ] = RtemsTaskReqConstructErrors_Pre_Ext_Ok;
- ctx->pcs[ 8 ] < RtemsTaskReqConstructErrors_Pre_Ext_NA;
- ++ctx->pcs[ 8 ]
- ) {
- RtemsTaskReqConstructErrors_Entry entry;
-
- entry = RtemsTaskReqConstructErrors_GetEntry( index );
- ++index;
-
- RtemsTaskReqConstructErrors_Prepare( ctx );
- RtemsTaskReqConstructErrors_Pre_Config_Prepare(
- ctx,
- ctx->pcs[ 0 ]
- );
- RtemsTaskReqConstructErrors_Pre_Name_Prepare(
- ctx,
- ctx->pcs[ 1 ]
- );
- RtemsTaskReqConstructErrors_Pre_Id_Prepare(
- ctx,
- ctx->pcs[ 2 ]
- );
- RtemsTaskReqConstructErrors_Pre_SysTsk_Prepare(
- ctx,
- ctx->pcs[ 3 ]
- );
- RtemsTaskReqConstructErrors_Pre_Prio_Prepare(
- ctx,
- ctx->pcs[ 4 ]
- );
- RtemsTaskReqConstructErrors_Pre_Free_Prepare(
- ctx,
- ctx->pcs[ 5 ]
- );
- RtemsTaskReqConstructErrors_Pre_TLS_Prepare(
- ctx,
- ctx->pcs[ 6 ]
- );
- RtemsTaskReqConstructErrors_Pre_Stack_Prepare(
- ctx,
- ctx->pcs[ 7 ]
- );
- RtemsTaskReqConstructErrors_Pre_Ext_Prepare(
- ctx,
- ctx->pcs[ 8 ]
- );
- RtemsTaskReqConstructErrors_Action( ctx );
- RtemsTaskReqConstructErrors_Post_Status_Check(
- ctx,
- entry.Post_Status
- );
- RtemsTaskReqConstructErrors_Post_Name_Check(
- ctx,
- entry.Post_Name
- );
- RtemsTaskReqConstructErrors_Post_IdVar_Check(
- ctx,
- entry.Post_IdVar
- );
- RtemsTaskReqConstructErrors_Post_CreateExt_Check(
- ctx,
- entry.Post_CreateExt
- );
- RtemsTaskReqConstructErrors_Post_DelExt_Check(
- ctx,
- entry.Post_DelExt
- );
- RtemsTaskReqConstructErrors_Post_StoFree_Check(
- ctx,
- entry.Post_StoFree
- );
- RtemsTaskReqConstructErrors_Cleanup( ctx );
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-
-/** @} */
diff --git a/testsuites/validation/tc-task-construct.c b/testsuites/validation/tc-task-construct.c
new file mode 100644
index 0000000000..5a7ca4f497
--- /dev/null
+++ b/testsuites/validation/tc-task-construct.c
@@ -0,0 +1,4950 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqConstruct
+ */
+
+/*
+ * Copyright (C) 2020, 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+#include <rtems/score/atomic.h>
+#include <rtems/score/percpu.h>
+#include <rtems/score/threadimpl.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqConstruct spec:/rtems/task/req/construct
+ *
+ * @ingroup TestsuitesValidation1
+ * @ingroup TestsuitesValidationOneCpu1
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_CPUs_One,
+ RtemsTaskReqConstruct_Pre_CPUs_More,
+ RtemsTaskReqConstruct_Pre_CPUs_NA
+} RtemsTaskReqConstruct_Pre_CPUs;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_Config_Valid,
+ RtemsTaskReqConstruct_Pre_Config_Null,
+ RtemsTaskReqConstruct_Pre_Config_NA
+} RtemsTaskReqConstruct_Pre_Config;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_Name_Valid,
+ RtemsTaskReqConstruct_Pre_Name_Invalid,
+ RtemsTaskReqConstruct_Pre_Name_NA
+} RtemsTaskReqConstruct_Pre_Name;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_Id_Valid,
+ RtemsTaskReqConstruct_Pre_Id_Null,
+ RtemsTaskReqConstruct_Pre_Id_NA
+} RtemsTaskReqConstruct_Pre_Id;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_SystemTask_Yes,
+ RtemsTaskReqConstruct_Pre_SystemTask_No,
+ RtemsTaskReqConstruct_Pre_SystemTask_NA
+} RtemsTaskReqConstruct_Pre_SystemTask;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_Priority_Valid,
+ RtemsTaskReqConstruct_Pre_Priority_Zero,
+ RtemsTaskReqConstruct_Pre_Priority_Invalid,
+ RtemsTaskReqConstruct_Pre_Priority_NA
+} RtemsTaskReqConstruct_Pre_Priority;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_Free_Yes,
+ RtemsTaskReqConstruct_Pre_Free_No,
+ RtemsTaskReqConstruct_Pre_Free_NA
+} RtemsTaskReqConstruct_Pre_Free;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_TLS_Enough,
+ RtemsTaskReqConstruct_Pre_TLS_TooSmall,
+ RtemsTaskReqConstruct_Pre_TLS_NA
+} RtemsTaskReqConstruct_Pre_TLS;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_Stack_Enough,
+ RtemsTaskReqConstruct_Pre_Stack_TooSmall,
+ RtemsTaskReqConstruct_Pre_Stack_NA
+} RtemsTaskReqConstruct_Pre_Stack;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_Create_Ok,
+ RtemsTaskReqConstruct_Pre_Create_Error,
+ RtemsTaskReqConstruct_Pre_Create_NA
+} RtemsTaskReqConstruct_Pre_Create;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Pre_FloatingPoint_No,
+ RtemsTaskReqConstruct_Pre_FloatingPoint_NA
+} RtemsTaskReqConstruct_Pre_FloatingPoint;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_Preempt_Yes,
+ RtemsTaskReqConstruct_Pre_Preempt_No,
+ RtemsTaskReqConstruct_Pre_Preempt_NA
+} RtemsTaskReqConstruct_Pre_Preempt;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_Timeslice_Yes,
+ RtemsTaskReqConstruct_Pre_Timeslice_No,
+ RtemsTaskReqConstruct_Pre_Timeslice_NA
+} RtemsTaskReqConstruct_Pre_Timeslice;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_ASR_Yes,
+ RtemsTaskReqConstruct_Pre_ASR_No,
+ RtemsTaskReqConstruct_Pre_ASR_NA
+} RtemsTaskReqConstruct_Pre_ASR;
+
+typedef enum {
+ RtemsTaskReqConstruct_Pre_IntLvl_Zero,
+ RtemsTaskReqConstruct_Pre_IntLvl_Positive,
+ RtemsTaskReqConstruct_Pre_IntLvl_NA
+} RtemsTaskReqConstruct_Pre_IntLvl;
+
+typedef enum {
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Status_InvAddr,
+ RtemsTaskReqConstruct_Post_Status_InvName,
+ RtemsTaskReqConstruct_Post_Status_InvPrio,
+ RtemsTaskReqConstruct_Post_Status_InvSize,
+ RtemsTaskReqConstruct_Post_Status_TooMany,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Status_NA
+} RtemsTaskReqConstruct_Post_Status;
+
+typedef enum {
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_Name_NA
+} RtemsTaskReqConstruct_Post_Name;
+
+typedef enum {
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_IdObj_NA
+} RtemsTaskReqConstruct_Post_IdObj;
+
+typedef enum {
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_CreateNew_UpToFailing,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_NA
+} RtemsTaskReqConstruct_Post_CreateNew;
+
+typedef enum {
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA
+} RtemsTaskReqConstruct_Post_DeleteNew;
+
+typedef enum {
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_KillZombies_No,
+ RtemsTaskReqConstruct_Post_KillZombies_NA
+} RtemsTaskReqConstruct_Post_KillZombies;
+
+typedef enum {
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_StorageFree_NA
+} RtemsTaskReqConstruct_Post_StorageFree;
+
+typedef enum {
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA
+} RtemsTaskReqConstruct_Post_FloatingPoint;
+
+typedef enum {
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Preempt_NA
+} RtemsTaskReqConstruct_Post_Preempt;
+
+typedef enum {
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_No,
+ RtemsTaskReqConstruct_Post_Timeslice_NA
+} RtemsTaskReqConstruct_Post_Timeslice;
+
+typedef enum {
+ RtemsTaskReqConstruct_Post_ASR_Yes,
+ RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_ASR_NA
+} RtemsTaskReqConstruct_Post_ASR;
+
+typedef enum {
+ RtemsTaskReqConstruct_Post_IntLvl_Zero,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive,
+ RtemsTaskReqConstruct_Post_IntLvl_NA
+} RtemsTaskReqConstruct_Post_IntLvl;
+
+typedef struct {
+ uint64_t Skip : 1;
+ uint64_t Pre_CPUs_NA : 1;
+ uint64_t Pre_Config_NA : 1;
+ uint64_t Pre_Name_NA : 1;
+ uint64_t Pre_Id_NA : 1;
+ uint64_t Pre_SystemTask_NA : 1;
+ uint64_t Pre_Priority_NA : 1;
+ uint64_t Pre_Free_NA : 1;
+ uint64_t Pre_TLS_NA : 1;
+ uint64_t Pre_Stack_NA : 1;
+ uint64_t Pre_Create_NA : 1;
+ uint64_t Pre_FloatingPoint_NA : 1;
+ uint64_t Pre_Preempt_NA : 1;
+ uint64_t Pre_Timeslice_NA : 1;
+ uint64_t Pre_ASR_NA : 1;
+ uint64_t Pre_IntLvl_NA : 1;
+ uint64_t Post_Status : 3;
+ uint64_t Post_Name : 2;
+ uint64_t Post_IdObj : 2;
+ uint64_t Post_CreateNew : 2;
+ uint64_t Post_DeleteNew : 2;
+ uint64_t Post_KillZombies : 2;
+ uint64_t Post_StorageFree : 2;
+ uint64_t Post_FloatingPoint : 2;
+ uint64_t Post_Preempt : 2;
+ uint64_t Post_Timeslice : 2;
+ uint64_t Post_ASR : 2;
+ uint64_t Post_IntLvl : 2;
+} RtemsTaskReqConstruct_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/construct test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the scheduler B identifier.
+ */
+ rtems_id scheduler_b_id;
+
+ /**
+ * @brief This member contains the thread zombie registry ticket right before
+ * the task exit of the zombie task.
+ */
+ unsigned int thread_zombie_ticket;
+
+ /**
+ * @brief If this member is true, then the zombie thread is ready to get
+ * killed.
+ */
+ volatile bool zombie_ready;
+
+ /**
+ * @brief This member contains the actual modes of the constructed task.
+ */
+ rtems_mode actual_modes;
+
+ rtems_status_code status;
+
+ const rtems_task_config *config;
+
+ rtems_task_config config_obj;
+
+ rtems_id zombie_id;
+
+ rtems_id *id;
+
+ rtems_id id_obj;
+
+ bool create_extension_status;
+
+ uint32_t create_extension_calls;
+
+ uint32_t delete_extension_calls;
+
+ uint32_t delete_zombie_extension_calls;
+
+ uint32_t storage_free_calls;
+
+ size_t stack_size;
+
+ rtems_id extension_ids[ 2 ];
+
+ void *seized_objects;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 15 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqConstruct_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqConstruct_Context;
+
+static RtemsTaskReqConstruct_Context
+ RtemsTaskReqConstruct_Instance;
+
+static const char * const RtemsTaskReqConstruct_PreDesc_CPUs[] = {
+ "One",
+ "More",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_Config[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_Name[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_Id[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_SystemTask[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_Priority[] = {
+ "Valid",
+ "Zero",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_Free[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_TLS[] = {
+ "Enough",
+ "TooSmall",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_Stack[] = {
+ "Enough",
+ "TooSmall",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_Create[] = {
+ "Ok",
+ "Error",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_FloatingPoint[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_Preempt[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_Timeslice[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_ASR[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqConstruct_PreDesc_IntLvl[] = {
+ "Zero",
+ "Positive",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqConstruct_PreDesc[] = {
+ RtemsTaskReqConstruct_PreDesc_CPUs,
+ RtemsTaskReqConstruct_PreDesc_Config,
+ RtemsTaskReqConstruct_PreDesc_Name,
+ RtemsTaskReqConstruct_PreDesc_Id,
+ RtemsTaskReqConstruct_PreDesc_SystemTask,
+ RtemsTaskReqConstruct_PreDesc_Priority,
+ RtemsTaskReqConstruct_PreDesc_Free,
+ RtemsTaskReqConstruct_PreDesc_TLS,
+ RtemsTaskReqConstruct_PreDesc_Stack,
+ RtemsTaskReqConstruct_PreDesc_Create,
+ RtemsTaskReqConstruct_PreDesc_FloatingPoint,
+ RtemsTaskReqConstruct_PreDesc_Preempt,
+ RtemsTaskReqConstruct_PreDesc_Timeslice,
+ RtemsTaskReqConstruct_PreDesc_ASR,
+ RtemsTaskReqConstruct_PreDesc_IntLvl,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+typedef RtemsTaskReqConstruct_Context Context;
+
+static volatile _Thread_local int tls_object;
+
+#define MAX_TLS_SIZE RTEMS_ALIGN_UP( 128, RTEMS_TASK_STORAGE_ALIGNMENT )
+
+RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT ) static char task_storage[
+ RTEMS_TASK_STORAGE_SIZE(
+ MAX_TLS_SIZE + TEST_MINIMUM_STACK_SIZE,
+ RTEMS_FLOATING_POINT
+ )
+];
+
+static const rtems_task_config seize_task_config = {
+ .name = rtems_build_name( 'S', 'I', 'Z', 'E' ),
+ .initial_priority = 1,
+ .storage_area = task_storage,
+ .storage_size = sizeof( task_storage ),
+ .maximum_thread_local_storage_size = MAX_TLS_SIZE,
+ .initial_modes = RTEMS_DEFAULT_MODES,
+ .attributes = RTEMS_DEFAULT_MODES
+};
+
+static void StorageFree( void *ptr )
+{
+ T_eq_ptr( ptr, task_storage );
+ ++RtemsTaskReqConstruct_Instance.storage_free_calls;
+}
+
+static rtems_status_code Create( void *arg, uint32_t *id )
+{
+ Context *ctx;
+ bool create_extension_status;
+ rtems_status_code sc;
+
+ ctx = arg;
+ create_extension_status = ctx->create_extension_status;
+ ctx->create_extension_status = true;
+ sc = rtems_task_construct( &seize_task_config, id );
+ ctx->create_extension_status = create_extension_status;
+
+ return sc;
+}
+
+static bool ThreadCreate( rtems_tcb *executing, rtems_tcb *created )
+{
+ (void) executing;
+ (void) created;
+
+ ++RtemsTaskReqConstruct_Instance.create_extension_calls;
+ return RtemsTaskReqConstruct_Instance.create_extension_status;
+}
+
+static bool SecondThreadCreate( rtems_tcb *executing, rtems_tcb *created )
+{
+ (void) executing;
+ (void) created;
+
+ ++RtemsTaskReqConstruct_Instance.create_extension_calls;
+ return true;
+}
+
+static void ThreadDelete( rtems_tcb *executing, rtems_tcb *deleted )
+{
+ Context *ctx;
+
+ (void) executing;
+
+ ctx = &RtemsTaskReqConstruct_Instance;
+
+ if ( deleted->Object.id == ctx->zombie_id ) {
+ ++ctx->delete_zombie_extension_calls;
+ } else {
+ ++ctx->delete_extension_calls;
+ }
+}
+
+#if defined(RTEMS_SMP)
+static void PreemptionIntervention( void *arg )
+{
+ Context *ctx;
+ unsigned int ticket;
+
+ ctx = arg;
+ T_false( ctx->zombie_ready );
+ ctx->zombie_ready = true;
+
+ do {
+ ticket = _Atomic_Load_uint(
+ &_Thread_Zombies.Lock.Lock.Ticket_lock.now_serving,
+ ATOMIC_ORDER_RELAXED
+ );
+ } while ( ( ticket - ctx->thread_zombie_ticket ) < 2 );
+
+ T_busy( 100 );
+}
+
+static void ThreadTerminate( rtems_tcb *executing )
+{
+ Context *ctx;
+
+ ctx = &RtemsTaskReqConstruct_Instance;
+
+ if (
+ ctx->scheduler_b_id != INVALID_ID &&
+ ctx->zombie_id == executing->Object.id
+ ) {
+ /*
+ * We use the ticket lock of the thread zombie registry to delay the thread
+ * dispatch and provoke an executing thread in
+ * _Thread_Kill_zombies(). The first acquire is done in the
+ * rtems_task_exit() below. The second acquire is done in
+ * _Thread_Kill_zombies().
+ */
+ ctx->thread_zombie_ticket = _Atomic_Fetch_add_uint(
+ &_Thread_Zombies.Lock.Lock.Ticket_lock.now_serving,
+ 0,
+ ATOMIC_ORDER_RELAXED
+ );
+ SetPreemptionIntervention(
+ _Per_CPU_Get_snapshot(),
+ PreemptionIntervention,
+ ctx
+ );
+ }
+}
+#endif
+
+static const rtems_extensions_table extensions[] = {
+ {
+#if defined(RTEMS_SMP)
+ .thread_terminate = ThreadTerminate,
+#endif
+ .thread_create = ThreadCreate,
+ .thread_delete = ThreadDelete
+ }, {
+ .thread_create = SecondThreadCreate,
+ .thread_delete = ThreadDelete
+ }
+};
+
+static void ZombieTask( rtems_task_argument arg )
+{
+ (void) arg;
+ rtems_task_exit();
+}
+
+static void PrepareZombie( Context *ctx )
+{
+ bool create_extension_status;
+
+ create_extension_status = ctx->create_extension_status;
+ ctx->create_extension_status = true;
+ ctx->zombie_id = CreateTask( "ZOMB", PRIO_HIGH );
+ ctx->create_extension_status = create_extension_status;
+#if defined(RTEMS_SMP)
+ if ( ctx->scheduler_b_id != INVALID_ID ) {
+ ctx->zombie_ready = false;
+ SetScheduler( ctx->zombie_id, ctx->scheduler_b_id, PRIO_NORMAL );
+ }
+#endif
+ StartTask( ctx->zombie_id, ZombieTask, ctx );
+#if defined(RTEMS_SMP)
+ while ( !ctx->zombie_ready ) {
+ /* Wait */
+ }
+#endif
+}
+
+static volatile double double_object;
+
+static RTEMS_NO_INLINE void UseFloatingPointUnit( void )
+{
+ double_object = ( 123.0 * double_object + double_object / 123.0 ) / 2.0;
+}
+
+static void WorkerTask( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+ ctx->actual_modes = GetMode();
+
+ /*
+ * We don't validate here that we cannot use the floating-point unit if the
+ * RTEMS_FLOATING_POINT attribute is not set. This is done elsewhere.
+ * Using the floating-point unit if the RTEMS_FLOATING_POINT attribute is
+ * not set may result in unrecoverable fatal errors.
+ */
+ if ( ( ctx->config_obj.attributes & RTEMS_FLOATING_POINT ) != 0 ) {
+ UseFloatingPointUnit();
+ }
+
+ SuspendSelf();
+}
+
+static void RtemsTaskReqConstruct_Pre_CPUs_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_CPUs state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_CPUs_One: {
+ /*
+ * Where the system does not need inter-processor interrupts, where the
+ * scheduler does support the no-preempt mode.
+ */
+ if ( rtems_scheduler_get_processor_maximum() != 1 ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_CPUs_More: {
+ /*
+ * Where the system needs inter-processor interrupts, where the scheduler
+ * does not support the no-preempt mode.
+ */
+ if ( rtems_scheduler_get_processor_maximum() == 1 ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_CPUs_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_Config_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_Config state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_Config_Valid: {
+ /*
+ * While the ``config`` parameter references an object of type
+ * rtems_task_config.
+ */
+ ctx->config = &ctx->config_obj;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Config_Null: {
+ /*
+ * While the ``config`` parameter is NULL.
+ */
+ ctx->config = NULL;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Config_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_Name_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_Name_Valid: {
+ /*
+ * While the name of the task configuration is valid.
+ */
+ ctx->config_obj.name = NAME;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Name_Invalid: {
+ /*
+ * While the name of the task configuration is invalid.
+ */
+ ctx->config_obj.name = 0;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_Id_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter references an object of type rtems_id.
+ */
+ ctx->id = &ctx->id_obj;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Id_Null: {
+ /*
+ * While the ``id`` parameter is NULL.
+ */
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_SystemTask_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_SystemTask state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_SystemTask_Yes: {
+ /*
+ * While the attributes of the task configuration specifies a system
+ * task.
+ */
+ ctx->config_obj.attributes |= RTEMS_SYSTEM_TASK;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_SystemTask_No: {
+ /*
+ * While the attributes of the task configuration specifies an
+ * application task.
+ */
+ ctx->config_obj.attributes |= RTEMS_APPLICATION_TASK;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_SystemTask_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_Priority_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_Priority state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_Priority_Valid: {
+ /*
+ * While the initial priority of the task configuration is valid and
+ * non-zero.
+ */
+ ctx->config_obj.initial_priority = PRIO_HIGH;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Priority_Zero: {
+ /*
+ * While the initial priority of the task configuration is zero.
+ */
+ ctx->config_obj.initial_priority = 0;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Priority_Invalid: {
+ /*
+ * While the initial priority of the task configuration is invalid.
+ */
+ ctx->config_obj.initial_priority = 0xffffffff;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Priority_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_Free_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_Free state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_Free_Yes: {
+ /*
+ * While the system has at least one inactive task object available.
+ */
+ /* Nothing to do */
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Free_No: {
+ /*
+ * While the system has no inactive task object available.
+ */
+ ctx->seized_objects = T_seize_objects( Create, ctx );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Free_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_TLS_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_TLS state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_TLS_Enough: {
+ /*
+ * While the maximum thread-local storage size of the task configuration
+ * is greater than or equal to the thread-local storage size.
+ */
+ ctx->config_obj.maximum_thread_local_storage_size = MAX_TLS_SIZE;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_TLS_TooSmall: {
+ /*
+ * While the maximum thread-local storage size of the task configuration
+ * is less than the thread-local storage size.
+ */
+ ctx->config_obj.maximum_thread_local_storage_size = 0;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_TLS_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_Stack_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_Stack state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_Stack_Enough: {
+ /*
+ * While the task stack size of the task configuration is greater than or
+ * equal to the configured minimum size.
+ */
+ ctx->stack_size = TEST_MINIMUM_STACK_SIZE;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Stack_TooSmall: {
+ /*
+ * While the task stack size of the task configuration is less than the
+ * configured minimum size.
+ */
+ ctx->stack_size = 0;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Stack_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_Create_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_Create state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_Create_Ok: {
+ /*
+ * While none of the thread create user extensions fails.
+ */
+ ctx->create_extension_status = true;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Create_Error: {
+ /*
+ * While at least one of the thread create user extensions fails.
+ */
+ ctx->create_extension_status = false;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Create_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_FloatingPoint_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_FloatingPoint state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_FloatingPoint_Yes: {
+ /*
+ * While the attributes of the task configuration specifies a
+ * floating-point task.
+ */
+ ctx->config_obj.attributes |= RTEMS_FLOATING_POINT;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_FloatingPoint_No: {
+ /*
+ * While the attributes of the task configuration specifies a
+ * non-floating-point task.
+ */
+ ctx->config_obj.attributes |= RTEMS_NO_FLOATING_POINT;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_FloatingPoint_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_Preempt_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_Preempt state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_Preempt_Yes: {
+ /*
+ * While the initial modes of the task configuration specify that
+ * preemption is enabled.
+ */
+ ctx->config_obj.initial_modes |= RTEMS_PREEMPT;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Preempt_No: {
+ /*
+ * While the initial modes of the task configuration specify that
+ * preemption is disabled.
+ */
+ ctx->config_obj.initial_modes |= RTEMS_NO_PREEMPT;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Preempt_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_Timeslice_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_Timeslice state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_Timeslice_Yes: {
+ /*
+ * While the initial modes of the task configuration specify that
+ * timeslicing is enabled.
+ */
+ ctx->config_obj.initial_modes |= RTEMS_TIMESLICE;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Timeslice_No: {
+ /*
+ * While the initial modes of the task configuration specify that
+ * timeslicing is disabled.
+ */
+ ctx->config_obj.initial_modes |= RTEMS_NO_TIMESLICE;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_Timeslice_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_ASR_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_ASR state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_ASR_Yes: {
+ /*
+ * While the initial modes of the task configuration specify that ASR
+ * processing is enabled.
+ */
+ ctx->config_obj.initial_modes |= RTEMS_ASR;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_ASR_No: {
+ /*
+ * While the initial modes of the task configuration specify that ASR
+ * processing is disabled.
+ */
+ ctx->config_obj.initial_modes |= RTEMS_NO_ASR;
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_ASR_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Pre_IntLvl_Prepare(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Pre_IntLvl state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Pre_IntLvl_Zero: {
+ /*
+ * While the initial modes of the task configuration specify an interrupt
+ * level of zero.
+ */
+ ctx->config_obj.initial_modes |= RTEMS_INTERRUPT_LEVEL( 0 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_IntLvl_Positive: {
+ /*
+ * While the initial modes of the task configuration specify an interrupt
+ * level greater than zero and less than or equal to
+ * CPU_MODES_INTERRUPT_MASK.
+ */
+ ctx->config_obj.initial_modes |= RTEMS_INTERRUPT_LEVEL( 1 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Pre_IntLvl_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Post_Status_Check(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_construct() shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_task_construct() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_Status_InvName: {
+ /*
+ * The return status of rtems_task_construct() shall be
+ * RTEMS_INVALID_NAME.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_Status_InvPrio: {
+ /*
+ * The return status of rtems_task_construct() shall be
+ * RTEMS_INVALID_PRIORITY.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_PRIORITY );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_Status_InvSize: {
+ /*
+ * The return status of rtems_task_construct() shall be
+ * RTEMS_INVALID_SIZE.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_SIZE );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_Status_TooMany: {
+ /*
+ * The return status of rtems_task_construct() shall be RTEMS_TOO_MANY.
+ */
+ T_rsc( ctx->status, RTEMS_TOO_MANY );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_Status_Unsat: {
+ /*
+ * The return status of rtems_task_construct() shall be
+ * RTEMS_UNSATISFIED.
+ */
+ T_rsc( ctx->status, RTEMS_UNSATISFIED );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Post_Name_Check(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Post_Name state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Post_Name_Valid: {
+ /*
+ * The unique object name shall identify the task constructed by the
+ * rtems_task_construct() call.
+ */
+ id = 0;
+ sc = rtems_task_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc_success( sc );
+ T_eq_u32( id, ctx->id_obj );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_Name_Invalid: {
+ /*
+ * The unique object name shall not identify a task.
+ */
+ sc = rtems_task_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_Name_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Post_IdObj_Check(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Post_IdObj state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Post_IdObj_Set: {
+ /*
+ * The value of the object referenced by the ``id`` parameter shall be
+ * set to the object identifier of the constructed task after the return
+ * of the rtems_task_construct() call.
+ */
+ T_eq_ptr( ctx->id, &ctx->id_obj );
+ T_ne_u32( ctx->id_obj, INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_IdObj_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_task_construct() shall not be accessed by the
+ * rtems_task_construct() call.
+ */
+ T_eq_u32( ctx->id_obj, INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_IdObj_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Post_CreateNew_Check(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Post_CreateNew state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Post_CreateNew_All: {
+ /*
+ * The thread create user extensions shall be invoked for the task under
+ * construction during the rtems_task_construct() call.
+ */
+ T_eq_u32( ctx->create_extension_calls, 2 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_CreateNew_UpToFailing: {
+ /*
+ * The thread create user extensions up to the failing extension shall be
+ * invoked for the task under construction during the
+ * rtems_task_construct() call.
+ */
+ T_eq_u32( ctx->create_extension_calls, 1 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_CreateNew_Nop: {
+ /*
+ * The thread create user extensions shall not be invoked for the task
+ * under construction during the rtems_task_construct() call.
+ */
+ T_eq_u32( ctx->create_extension_calls, 0 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_CreateNew_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Post_DeleteNew_Check(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Post_DeleteNew state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Post_DeleteNew_All: {
+ /*
+ * The thread delete user extensions shall be invoked for the task under
+ * construction during the rtems_task_construct() call.
+ */
+ T_eq_u32( ctx->delete_extension_calls, 2 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_DeleteNew_Nop: {
+ /*
+ * The thread delete user extensions shall not be invoked for the task
+ * under construction during the rtems_task_construct() call.
+ */
+ T_eq_u32( ctx->delete_extension_calls, 0 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_DeleteNew_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Post_KillZombies_Check(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Post_KillZombies state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Post_KillZombies_Yes: {
+ /*
+ * The registered zombie threads shall be killed before an attempt to
+ * allocate a TCB is made by the rtems_task_construct() call.
+ */
+ /*
+ * We cannot check the zombie delete extension calls if we should call
+ * rtems_task_construct() without an inactive TCB available. Killing
+ * a zombie would make one inactive TCB available.
+ */
+ if ( ctx->seized_objects == NULL ) {
+ T_eq_u32( ctx->delete_zombie_extension_calls, 2 );
+ }
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_KillZombies_No: {
+ /*
+ * The registered zombie threads shall not be killed by the
+ * rtems_task_construct() call.
+ */
+ T_eq_u32( ctx->delete_zombie_extension_calls, 0 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_KillZombies_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Post_StorageFree_Check(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Post_StorageFree state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Post_StorageFree_Yes: {
+ /*
+ * The storage free handler of the task configuration shall be invoked
+ * during the rtems_task_construct() call.
+ */
+ T_eq_u32( ctx->storage_free_calls, 1 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_StorageFree_No: {
+ /*
+ * The storage free handler of the task configuration shall not be
+ * invoked during the rtems_task_construct() call.
+ */
+ T_eq_u32( ctx->storage_free_calls, 0 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_StorageFree_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Post_FloatingPoint_Check(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Post_FloatingPoint state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Post_FloatingPoint_Yes: {
+ /*
+ * Where threads have a dedicated floating-point context, the task
+ * constructed by the rtems_task_construct() call shall be able to use
+ * the floating-point unit.
+ */
+ /* Validated by WorkerTask() */
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_FloatingPoint_No: {
+ /*
+ * Where threads have a dedicated floating-point context, the task
+ * constructed by the rtems_task_construct() call shall not be able to
+ * use the floating-point unit.
+ */
+ /* Validated by WorkerTask() */
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_FloatingPoint_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Post_Preempt_Check(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Post_Preempt state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Post_Preempt_Yes: {
+ /*
+ * Task preemption in the initial modes of the task constructed by the
+ * rtems_task_construct() call shall be enabled.
+ */
+ T_eq_u32( ctx->actual_modes & RTEMS_PREEMPT, RTEMS_PREEMPT );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_Preempt_No: {
+ /*
+ * Task preemption in the initial modes of the task constructed by the
+ * rtems_task_construct() call shall be disabled.
+ */
+ T_eq_u32( ctx->actual_modes & RTEMS_PREEMPT, 0 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_Preempt_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Post_Timeslice_Check(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Post_Timeslice state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Post_Timeslice_Yes: {
+ /*
+ * Timeslicing in the initial modes of the task constructed by the
+ * rtems_task_construct() call shall be enabled.
+ */
+ T_eq_u32( ctx->actual_modes & RTEMS_TIMESLICE, RTEMS_TIMESLICE );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_Timeslice_No: {
+ /*
+ * Timeslicing in the initial modes of the task constructed by the
+ * rtems_task_construct() call shall be disabled.
+ */
+ T_eq_u32( ctx->actual_modes & RTEMS_TIMESLICE, 0 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_Timeslice_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Post_ASR_Check(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Post_ASR state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Post_ASR_Yes: {
+ /*
+ * ASR processing in the initial modes of the task constructed by the
+ * rtems_task_construct() call shall be enabled.
+ */
+ T_eq_u32( ctx->actual_modes & RTEMS_ASR, RTEMS_ASR );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_ASR_No: {
+ /*
+ * ASR processing in the initial modes of the task constructed by the
+ * rtems_task_construct() call shall be disabled.
+ */
+ T_eq_u32( ctx->actual_modes & RTEMS_ASR, 0 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_ASR_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Post_IntLvl_Check(
+ RtemsTaskReqConstruct_Context *ctx,
+ RtemsTaskReqConstruct_Post_IntLvl state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqConstruct_Post_IntLvl_Zero: {
+ /*
+ * The interrupt level in the initial modes of the task constructed by
+ * the rtems_task_construct() call shall be zero.
+ */
+ T_eq_u32( ctx->actual_modes & RTEMS_INTERRUPT_MASK, 0 );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_IntLvl_Positive: {
+ /*
+ * The interrupt level in the initial modes of the task constructed by
+ * the rtems_task_construct() call shall be the interrupt level specified
+ * by the initial modes of the task configuration mapped to an target
+ * architecture-specific positive value.
+ */
+ T_eq_u32(
+ ctx->actual_modes & RTEMS_INTERRUPT_MASK,
+ ctx->config_obj.initial_modes & RTEMS_INTERRUPT_MASK
+ );
+ break;
+ }
+
+ case RtemsTaskReqConstruct_Post_IntLvl_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqConstruct_Setup( RtemsTaskReqConstruct_Context *ctx )
+{
+ rtems_status_code sc;
+ int var;
+
+ var = tls_object;
+ RTEMS_OBFUSCATE_VARIABLE( var );
+ tls_object = var;
+
+ ctx->scheduler_b_id = INVALID_ID;
+ #if defined(RTEMS_SMP)
+ ctx->zombie_ready = true;
+ if ( rtems_scheduler_get_processor_maximum() > 1 ) {
+ sc = rtems_scheduler_ident(
+ TEST_SCHEDULER_B_NAME,
+ &ctx->scheduler_b_id
+ );
+ T_rsc_success( sc );
+ }
+ #endif
+
+ sc = rtems_extension_create(
+ rtems_build_name( 'E', 'X', 'T', '1' ),
+ &extensions[ 0 ],
+ &ctx->extension_ids[ 0 ]
+ );
+ T_rsc_success( sc );
+
+ sc = rtems_extension_create(
+ rtems_build_name( 'E', 'X', 'T', '2' ),
+ &extensions[ 1 ],
+ &ctx->extension_ids[ 1 ]
+ );
+ T_rsc_success( sc );
+
+ SetSelfPriority( PRIO_NORMAL );
+}
+
+static void RtemsTaskReqConstruct_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqConstruct_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqConstruct_Setup( ctx );
+}
+
+static void RtemsTaskReqConstruct_Teardown(
+ RtemsTaskReqConstruct_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_extension_delete( ctx->extension_ids[ 0 ] );
+ T_rsc_success( sc );
+
+ sc = rtems_extension_delete( ctx->extension_ids[ 1 ] );
+ T_rsc_success( sc );
+
+ RestoreRunnerPriority();
+}
+
+static void RtemsTaskReqConstruct_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqConstruct_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqConstruct_Teardown( ctx );
+}
+
+static void RtemsTaskReqConstruct_Prepare( RtemsTaskReqConstruct_Context *ctx )
+{
+ KillZombies();
+ ctx->id_obj = INVALID_ID;
+ memset( &ctx->config_obj, 0, sizeof( ctx->config_obj ) );
+ ctx->config_obj.storage_area = task_storage,
+ ctx->config_obj.storage_free = StorageFree;
+}
+
+static void RtemsTaskReqConstruct_Action( RtemsTaskReqConstruct_Context *ctx )
+{
+ if ( ctx->seized_objects == NULL ) {
+ PrepareZombie( ctx );
+ }
+
+ ctx->actual_modes = UINT32_MAX;
+ ctx->create_extension_calls = 0;
+ ctx->delete_extension_calls = 0;
+ ctx->delete_zombie_extension_calls = 0;
+ ctx->storage_free_calls = 0;
+ ctx->config_obj.storage_size = RTEMS_TASK_STORAGE_SIZE(
+ ctx->config_obj.maximum_thread_local_storage_size + ctx->stack_size,
+ ctx->config_obj.attributes
+ );
+ ctx->status = rtems_task_construct( ctx->config, ctx->id );
+
+ if ( ctx->status == RTEMS_SUCCESSFUL ) {
+ StartTask( ctx->id_obj, WorkerTask, ctx );
+ }
+}
+
+static void RtemsTaskReqConstruct_Cleanup( RtemsTaskReqConstruct_Context *ctx )
+{
+ if ( ctx->id_obj != INVALID_ID ) {
+ rtems_status_code sc;
+
+ sc = rtems_task_delete( ctx->id_obj );
+ T_rsc_success( sc );
+
+ ctx->id_obj = INVALID_ID;
+ }
+
+ T_surrender_objects( &ctx->seized_objects, rtems_task_delete );
+}
+
+static const RtemsTaskReqConstruct_Entry
+RtemsTaskReqConstruct_Entries[] = {
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_InvAddr,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_No,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_InvAddr,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_No,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_InvName,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_No,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_InvName,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_No,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_InvPrio,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_No,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_InvPrio,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_No,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_TooMany,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_TooMany,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_InvSize,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_InvSize,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_UpToFailing,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_UpToFailing,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_UpToFailing,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_Yes, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_Yes,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_No, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_No,
+ RtemsTaskReqConstruct_Post_ASR_Yes, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_No,
+ RtemsTaskReqConstruct_Post_ASR_Yes,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_No, RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_No, RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_Yes, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_Yes,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_No, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_No,
+ RtemsTaskReqConstruct_Post_ASR_Yes, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_No,
+ RtemsTaskReqConstruct_Post_ASR_Yes,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_No, RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_No, RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_Yes, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_Yes,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_No, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_No,
+ RtemsTaskReqConstruct_Post_ASR_Yes, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_No,
+ RtemsTaskReqConstruct_Post_ASR_Yes,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_No, RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_No, RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_Yes, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_Yes,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_No, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_No,
+ RtemsTaskReqConstruct_Post_ASR_Yes, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_No,
+ RtemsTaskReqConstruct_Post_ASR_Yes,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_No, RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Unsat,
+ RtemsTaskReqConstruct_Post_Name_Invalid,
+ RtemsTaskReqConstruct_Post_IdObj_Nop,
+ RtemsTaskReqConstruct_Post_CreateNew_Nop,
+ RtemsTaskReqConstruct_Post_DeleteNew_All,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_Yes,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_No,
+ RtemsTaskReqConstruct_Post_Timeslice_No, RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Positive },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_Yes, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_No, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_No,
+ RtemsTaskReqConstruct_Post_ASR_Yes, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_Yes,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_No, RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_Yes, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_Yes,
+ RtemsTaskReqConstruct_Post_ASR_No, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_No,
+ RtemsTaskReqConstruct_Post_ASR_Yes, RtemsTaskReqConstruct_Post_IntLvl_Zero },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_Ok,
+ RtemsTaskReqConstruct_Post_Name_Valid,
+ RtemsTaskReqConstruct_Post_IdObj_Set,
+ RtemsTaskReqConstruct_Post_CreateNew_All,
+ RtemsTaskReqConstruct_Post_DeleteNew_Nop,
+ RtemsTaskReqConstruct_Post_KillZombies_Yes,
+ RtemsTaskReqConstruct_Post_StorageFree_No,
+ RtemsTaskReqConstruct_Post_FloatingPoint_No,
+ RtemsTaskReqConstruct_Post_Preempt_Yes,
+ RtemsTaskReqConstruct_Post_Timeslice_No, RtemsTaskReqConstruct_Post_ASR_No,
+ RtemsTaskReqConstruct_Post_IntLvl_Zero }
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqConstruct_Post_Status_NA, RtemsTaskReqConstruct_Post_Name_NA,
+ RtemsTaskReqConstruct_Post_IdObj_NA,
+ RtemsTaskReqConstruct_Post_CreateNew_NA,
+ RtemsTaskReqConstruct_Post_DeleteNew_NA,
+ RtemsTaskReqConstruct_Post_KillZombies_NA,
+ RtemsTaskReqConstruct_Post_StorageFree_NA,
+ RtemsTaskReqConstruct_Post_FloatingPoint_NA,
+ RtemsTaskReqConstruct_Post_Preempt_NA,
+ RtemsTaskReqConstruct_Post_Timeslice_NA, RtemsTaskReqConstruct_Post_ASR_NA,
+ RtemsTaskReqConstruct_Post_IntLvl_NA }
+#endif
+};
+
+static const uint8_t
+RtemsTaskReqConstruct_Map[] = {
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 11, 12, 11, 12, 11, 12,
+ 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11,
+ 12, 11, 12, 11, 12, 11, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11,
+ 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 11, 12, 11, 12, 11, 12, 11,
+ 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12,
+ 11, 12, 11, 12, 11, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 46, 10, 47, 10, 48, 10, 49, 10, 10, 10, 10, 10, 10, 10, 10, 10, 50, 10, 51,
+ 10, 52, 10, 53, 10, 10, 10, 10, 10, 10, 10, 10, 10, 13, 10, 13, 10, 13, 10,
+ 13, 10, 10, 10, 10, 10, 10, 10, 10, 10, 13, 10, 13, 10, 13, 10, 13, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 46, 10, 47, 10, 48, 10, 49,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 50, 10, 51, 10, 52, 10, 53, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 13, 10, 13, 10, 13, 10, 13, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 13, 10, 13, 10, 13, 10, 13, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 46,
+ 10, 47, 10, 48, 10, 49, 10, 10, 10, 10, 10, 10, 10, 10, 10, 50, 10, 51, 10,
+ 52, 10, 53, 10, 10, 10, 10, 10, 10, 10, 10, 10, 13, 10, 13, 10, 13, 10, 13,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 13, 10, 13, 10, 13, 10, 13, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+};
+
+static size_t RtemsTaskReqConstruct_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqConstruct_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTaskReqConstruct_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqConstruct_Fixture = {
+ .setup = RtemsTaskReqConstruct_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqConstruct_Teardown_Wrap,
+ .scope = RtemsTaskReqConstruct_Scope,
+ .initial_context = &RtemsTaskReqConstruct_Instance
+};
+
+static const uint16_t RtemsTaskReqConstruct_Weights[] = {
+ 24576, 12288, 6144, 3072, 1536, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1
+};
+
+static void RtemsTaskReqConstruct_Skip(
+ RtemsTaskReqConstruct_Context *ctx,
+ size_t index
+)
+{
+ switch ( index + 1 ) {
+ case 1:
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqConstruct_Pre_Config_NA - 1;
+ /* Fall through */
+ case 2:
+ ctx->Map.pcs[ 2 ] = RtemsTaskReqConstruct_Pre_Name_NA - 1;
+ /* Fall through */
+ case 3:
+ ctx->Map.pcs[ 3 ] = RtemsTaskReqConstruct_Pre_Id_NA - 1;
+ /* Fall through */
+ case 4:
+ ctx->Map.pcs[ 4 ] = RtemsTaskReqConstruct_Pre_SystemTask_NA - 1;
+ /* Fall through */
+ case 5:
+ ctx->Map.pcs[ 5 ] = RtemsTaskReqConstruct_Pre_Priority_NA - 1;
+ /* Fall through */
+ case 6:
+ ctx->Map.pcs[ 6 ] = RtemsTaskReqConstruct_Pre_Free_NA - 1;
+ /* Fall through */
+ case 7:
+ ctx->Map.pcs[ 7 ] = RtemsTaskReqConstruct_Pre_TLS_NA - 1;
+ /* Fall through */
+ case 8:
+ ctx->Map.pcs[ 8 ] = RtemsTaskReqConstruct_Pre_Stack_NA - 1;
+ /* Fall through */
+ case 9:
+ ctx->Map.pcs[ 9 ] = RtemsTaskReqConstruct_Pre_Create_NA - 1;
+ /* Fall through */
+ case 10:
+ ctx->Map.pcs[ 10 ] = RtemsTaskReqConstruct_Pre_FloatingPoint_NA - 1;
+ /* Fall through */
+ case 11:
+ ctx->Map.pcs[ 11 ] = RtemsTaskReqConstruct_Pre_Preempt_NA - 1;
+ /* Fall through */
+ case 12:
+ ctx->Map.pcs[ 12 ] = RtemsTaskReqConstruct_Pre_Timeslice_NA - 1;
+ /* Fall through */
+ case 13:
+ ctx->Map.pcs[ 13 ] = RtemsTaskReqConstruct_Pre_ASR_NA - 1;
+ /* Fall through */
+ case 14:
+ ctx->Map.pcs[ 14 ] = RtemsTaskReqConstruct_Pre_IntLvl_NA - 1;
+ break;
+ }
+}
+
+static inline RtemsTaskReqConstruct_Entry RtemsTaskReqConstruct_PopEntry(
+ RtemsTaskReqConstruct_Context *ctx
+)
+{
+ size_t index;
+
+ if ( ctx->Map.skip ) {
+ size_t i;
+
+ ctx->Map.skip = false;
+ index = 0;
+
+ for ( i = 0; i < 15; ++i ) {
+ index += RtemsTaskReqConstruct_Weights[ i ] * ctx->Map.pcs[ i ];
+ }
+ } else {
+ index = ctx->Map.index;
+ }
+
+ ctx->Map.index = index + 1;
+
+ return RtemsTaskReqConstruct_Entries[
+ RtemsTaskReqConstruct_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqConstruct_TestVariant(
+ RtemsTaskReqConstruct_Context *ctx
+)
+{
+ RtemsTaskReqConstruct_Pre_CPUs_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+
+ if ( ctx->Map.skip ) {
+ RtemsTaskReqConstruct_Skip( ctx, 0 );
+ return;
+ }
+
+ RtemsTaskReqConstruct_Pre_Config_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqConstruct_Pre_Name_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTaskReqConstruct_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTaskReqConstruct_Pre_SystemTask_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsTaskReqConstruct_Pre_Priority_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsTaskReqConstruct_Pre_Free_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsTaskReqConstruct_Pre_TLS_Prepare( ctx, ctx->Map.pcs[ 7 ] );
+ RtemsTaskReqConstruct_Pre_Stack_Prepare( ctx, ctx->Map.pcs[ 8 ] );
+ RtemsTaskReqConstruct_Pre_Create_Prepare( ctx, ctx->Map.pcs[ 9 ] );
+ RtemsTaskReqConstruct_Pre_FloatingPoint_Prepare( ctx, ctx->Map.pcs[ 10 ] );
+ RtemsTaskReqConstruct_Pre_Preempt_Prepare( ctx, ctx->Map.pcs[ 11 ] );
+ RtemsTaskReqConstruct_Pre_Timeslice_Prepare( ctx, ctx->Map.pcs[ 12 ] );
+ RtemsTaskReqConstruct_Pre_ASR_Prepare( ctx, ctx->Map.pcs[ 13 ] );
+ RtemsTaskReqConstruct_Pre_IntLvl_Prepare( ctx, ctx->Map.pcs[ 14 ] );
+ RtemsTaskReqConstruct_Action( ctx );
+ RtemsTaskReqConstruct_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTaskReqConstruct_Post_Name_Check( ctx, ctx->Map.entry.Post_Name );
+ RtemsTaskReqConstruct_Post_IdObj_Check( ctx, ctx->Map.entry.Post_IdObj );
+ RtemsTaskReqConstruct_Post_CreateNew_Check(
+ ctx,
+ ctx->Map.entry.Post_CreateNew
+ );
+ RtemsTaskReqConstruct_Post_DeleteNew_Check(
+ ctx,
+ ctx->Map.entry.Post_DeleteNew
+ );
+ RtemsTaskReqConstruct_Post_KillZombies_Check(
+ ctx,
+ ctx->Map.entry.Post_KillZombies
+ );
+ RtemsTaskReqConstruct_Post_StorageFree_Check(
+ ctx,
+ ctx->Map.entry.Post_StorageFree
+ );
+ RtemsTaskReqConstruct_Post_FloatingPoint_Check(
+ ctx,
+ ctx->Map.entry.Post_FloatingPoint
+ );
+ RtemsTaskReqConstruct_Post_Preempt_Check( ctx, ctx->Map.entry.Post_Preempt );
+ RtemsTaskReqConstruct_Post_Timeslice_Check(
+ ctx,
+ ctx->Map.entry.Post_Timeslice
+ );
+ RtemsTaskReqConstruct_Post_ASR_Check( ctx, ctx->Map.entry.Post_ASR );
+ RtemsTaskReqConstruct_Post_IntLvl_Check( ctx, ctx->Map.entry.Post_IntLvl );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqConstruct( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTaskReqConstruct, &RtemsTaskReqConstruct_Fixture )
+{
+ RtemsTaskReqConstruct_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+ ctx->Map.skip = false;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTaskReqConstruct_Pre_CPUs_One;
+ ctx->Map.pcs[ 0 ] < RtemsTaskReqConstruct_Pre_CPUs_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqConstruct_Pre_Config_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsTaskReqConstruct_Pre_Config_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsTaskReqConstruct_Pre_Name_Valid;
+ ctx->Map.pcs[ 2 ] < RtemsTaskReqConstruct_Pre_Name_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsTaskReqConstruct_Pre_Id_Valid;
+ ctx->Map.pcs[ 3 ] < RtemsTaskReqConstruct_Pre_Id_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsTaskReqConstruct_Pre_SystemTask_Yes;
+ ctx->Map.pcs[ 4 ] < RtemsTaskReqConstruct_Pre_SystemTask_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = RtemsTaskReqConstruct_Pre_Priority_Valid;
+ ctx->Map.pcs[ 5 ] < RtemsTaskReqConstruct_Pre_Priority_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 6 ] = RtemsTaskReqConstruct_Pre_Free_Yes;
+ ctx->Map.pcs[ 6 ] < RtemsTaskReqConstruct_Pre_Free_NA;
+ ++ctx->Map.pcs[ 6 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 7 ] = RtemsTaskReqConstruct_Pre_TLS_Enough;
+ ctx->Map.pcs[ 7 ] < RtemsTaskReqConstruct_Pre_TLS_NA;
+ ++ctx->Map.pcs[ 7 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 8 ] = RtemsTaskReqConstruct_Pre_Stack_Enough;
+ ctx->Map.pcs[ 8 ] < RtemsTaskReqConstruct_Pre_Stack_NA;
+ ++ctx->Map.pcs[ 8 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 9 ] = RtemsTaskReqConstruct_Pre_Create_Ok;
+ ctx->Map.pcs[ 9 ] < RtemsTaskReqConstruct_Pre_Create_NA;
+ ++ctx->Map.pcs[ 9 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 10 ] = RtemsTaskReqConstruct_Pre_FloatingPoint_Yes;
+ ctx->Map.pcs[ 10 ] < RtemsTaskReqConstruct_Pre_FloatingPoint_NA;
+ ++ctx->Map.pcs[ 10 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 11 ] = RtemsTaskReqConstruct_Pre_Preempt_Yes;
+ ctx->Map.pcs[ 11 ] < RtemsTaskReqConstruct_Pre_Preempt_NA;
+ ++ctx->Map.pcs[ 11 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 12 ] = RtemsTaskReqConstruct_Pre_Timeslice_Yes;
+ ctx->Map.pcs[ 12 ] < RtemsTaskReqConstruct_Pre_Timeslice_NA;
+ ++ctx->Map.pcs[ 12 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 13 ] = RtemsTaskReqConstruct_Pre_ASR_Yes;
+ ctx->Map.pcs[ 13 ] < RtemsTaskReqConstruct_Pre_ASR_NA;
+ ++ctx->Map.pcs[ 13 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 14 ] = RtemsTaskReqConstruct_Pre_IntLvl_Zero;
+ ctx->Map.pcs[ 14 ] < RtemsTaskReqConstruct_Pre_IntLvl_NA;
+ ++ctx->Map.pcs[ 14 ]
+ ) {
+ ctx->Map.entry =
+ RtemsTaskReqConstruct_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsTaskReqConstruct_Prepare( ctx );
+ RtemsTaskReqConstruct_TestVariant( ctx );
+ RtemsTaskReqConstruct_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-create-errors.c b/testsuites/validation/tc-task-create-errors.c
index 1159773eed..2378e55020 100644
--- a/testsuites/validation/tc-task-create-errors.c
+++ b/testsuites/validation/tc-task-create-errors.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseRtemsTaskReqCreateErrors
+ * @ingroup RtemsTaskReqCreateErrors
*/
/*
- * Copyright (C) 2020, 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020, 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -57,14 +57,15 @@
#include <rtems/score/apimutex.h>
#include <rtems/score/threadimpl.h>
+#include "tx-support.h"
+
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseRtemsTaskReqCreateErrors \
- * spec:/rtems/task/req/create-errors
+ * @defgroup RtemsTaskReqCreateErrors spec:/rtems/task/req/create-errors
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
- * @ingroup RTEMSTestSuiteTestsuitesValidation1
+ * @ingroup TestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationOneCpu0
*
* @{
*/
@@ -280,8 +281,6 @@ static const char * const * const RtemsTaskReqCreateErrors_PreDesc[] = {
#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
-#define INVALID_ID 0xffffffff
-
typedef RtemsTaskReqCreateErrors_Context Context;
static rtems_status_code Create( void *arg, uint32_t *id )
@@ -419,7 +418,7 @@ static void RtemsTaskReqCreateErrors_Pre_Prio_Prepare(
/*
* While the ``initial_priority`` parameter is valid and non-zero.
*/
- ctx->initial_priority = 254;
+ ctx->initial_priority = RTEMS_MAXIMUM_PRIORITY - 1;
break;
}
diff --git a/testsuites/validation/tc-task-delete.c b/testsuites/validation/tc-task-delete.c
new file mode 100644
index 0000000000..d917062d0d
--- /dev/null
+++ b/testsuites/validation/tc-task-delete.c
@@ -0,0 +1,4844 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqDelete
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <limits.h>
+#include <rtems.h>
+#include <setjmp.h>
+#include <rtems/bspIo.h>
+#include <rtems/test-scheduler.h>
+#include <rtems/score/statesimpl.h>
+#include <rtems/score/threaddispatch.h>
+#include <rtems/score/threadimpl.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqDelete spec:/rtems/task/req/delete
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqDelete_Pre_Id_Executing,
+ RtemsTaskReqDelete_Pre_Id_Other,
+ RtemsTaskReqDelete_Pre_Id_Invalid,
+ RtemsTaskReqDelete_Pre_Id_NA
+} RtemsTaskReqDelete_Pre_Id;
+
+typedef enum {
+ RtemsTaskReqDelete_Pre_Context_Task,
+ RtemsTaskReqDelete_Pre_Context_Interrupt,
+ RtemsTaskReqDelete_Pre_Context_NA
+} RtemsTaskReqDelete_Pre_Context;
+
+typedef enum {
+ RtemsTaskReqDelete_Pre_ThreadDispatch_Disabled,
+ RtemsTaskReqDelete_Pre_ThreadDispatch_Enabled,
+ RtemsTaskReqDelete_Pre_ThreadDispatch_NA
+} RtemsTaskReqDelete_Pre_ThreadDispatch;
+
+typedef enum {
+ RtemsTaskReqDelete_Pre_CallerPriority_Vital,
+ RtemsTaskReqDelete_Pre_CallerPriority_Dispensable,
+ RtemsTaskReqDelete_Pre_CallerPriority_NA
+} RtemsTaskReqDelete_Pre_CallerPriority;
+
+typedef enum {
+ RtemsTaskReqDelete_Pre_Dormant_No,
+ RtemsTaskReqDelete_Pre_Dormant_Yes,
+ RtemsTaskReqDelete_Pre_Dormant_NA
+} RtemsTaskReqDelete_Pre_Dormant;
+
+typedef enum {
+ RtemsTaskReqDelete_Pre_Suspended_Yes,
+ RtemsTaskReqDelete_Pre_Suspended_No,
+ RtemsTaskReqDelete_Pre_Suspended_NA
+} RtemsTaskReqDelete_Pre_Suspended;
+
+typedef enum {
+ RtemsTaskReqDelete_Pre_Restarting_No,
+ RtemsTaskReqDelete_Pre_Restarting_Yes,
+ RtemsTaskReqDelete_Pre_Restarting_NA
+} RtemsTaskReqDelete_Pre_Restarting;
+
+typedef enum {
+ RtemsTaskReqDelete_Pre_Terminating_No,
+ RtemsTaskReqDelete_Pre_Terminating_Yes,
+ RtemsTaskReqDelete_Pre_Terminating_NA
+} RtemsTaskReqDelete_Pre_Terminating;
+
+typedef enum {
+ RtemsTaskReqDelete_Pre_Protected_Yes,
+ RtemsTaskReqDelete_Pre_Protected_No,
+ RtemsTaskReqDelete_Pre_Protected_NA
+} RtemsTaskReqDelete_Pre_Protected;
+
+typedef enum {
+ RtemsTaskReqDelete_Pre_State_Enqueued,
+ RtemsTaskReqDelete_Pre_State_Ready,
+ RtemsTaskReqDelete_Pre_State_Blocked,
+ RtemsTaskReqDelete_Pre_State_NA
+} RtemsTaskReqDelete_Pre_State;
+
+typedef enum {
+ RtemsTaskReqDelete_Pre_Timer_Inactive,
+ RtemsTaskReqDelete_Pre_Timer_Active,
+ RtemsTaskReqDelete_Pre_Timer_NA
+} RtemsTaskReqDelete_Pre_Timer;
+
+typedef enum {
+ RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_Status_InvId,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_Status_NA
+} RtemsTaskReqDelete_Post_Status;
+
+typedef enum {
+ RtemsTaskReqDelete_Post_FatalError_Yes,
+ RtemsTaskReqDelete_Post_FatalError_Nop,
+ RtemsTaskReqDelete_Post_FatalError_NA
+} RtemsTaskReqDelete_Post_FatalError;
+
+typedef enum {
+ RtemsTaskReqDelete_Post_Zombie_Yes,
+ RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_Zombie_NA
+} RtemsTaskReqDelete_Post_Zombie;
+
+typedef enum {
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_TaskPriority_NA
+} RtemsTaskReqDelete_Post_TaskPriority;
+
+typedef enum {
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_NA
+} RtemsTaskReqDelete_Post_RestartExtensions;
+
+typedef enum {
+ RtemsTaskReqDelete_Post_TerminateExtensions_Yes,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_NA
+} RtemsTaskReqDelete_Post_TerminateExtensions;
+
+typedef enum {
+ RtemsTaskReqDelete_Post_Dormant_Yes,
+ RtemsTaskReqDelete_Post_Dormant_No,
+ RtemsTaskReqDelete_Post_Dormant_NA
+} RtemsTaskReqDelete_Post_Dormant;
+
+typedef enum {
+ RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Suspended_NA
+} RtemsTaskReqDelete_Post_Suspended;
+
+typedef enum {
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Restarting_NA
+} RtemsTaskReqDelete_Post_Restarting;
+
+typedef enum {
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Terminating_NA
+} RtemsTaskReqDelete_Post_Terminating;
+
+typedef enum {
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_Protected_NA
+} RtemsTaskReqDelete_Post_Protected;
+
+typedef enum {
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_State_NA
+} RtemsTaskReqDelete_Post_State;
+
+typedef enum {
+ RtemsTaskReqDelete_Post_Timer_Active,
+ RtemsTaskReqDelete_Post_Timer_Inactive,
+ RtemsTaskReqDelete_Post_Timer_NA
+} RtemsTaskReqDelete_Post_Timer;
+
+typedef struct {
+ uint64_t Skip : 1;
+ uint64_t Pre_Id_NA : 1;
+ uint64_t Pre_Context_NA : 1;
+ uint64_t Pre_ThreadDispatch_NA : 1;
+ uint64_t Pre_CallerPriority_NA : 1;
+ uint64_t Pre_Dormant_NA : 1;
+ uint64_t Pre_Suspended_NA : 1;
+ uint64_t Pre_Restarting_NA : 1;
+ uint64_t Pre_Terminating_NA : 1;
+ uint64_t Pre_Protected_NA : 1;
+ uint64_t Pre_State_NA : 1;
+ uint64_t Pre_Timer_NA : 1;
+ uint64_t Post_Status : 3;
+ uint64_t Post_FatalError : 2;
+ uint64_t Post_Zombie : 2;
+ uint64_t Post_TaskPriority : 2;
+ uint64_t Post_RestartExtensions : 1;
+ uint64_t Post_TerminateExtensions : 2;
+ uint64_t Post_Dormant : 2;
+ uint64_t Post_Suspended : 2;
+ uint64_t Post_Restarting : 2;
+ uint64_t Post_Terminating : 2;
+ uint64_t Post_Protected : 2;
+ uint64_t Post_State : 2;
+ uint64_t Post_Timer : 2;
+} RtemsTaskReqDelete_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/delete test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides the scheduler operation records.
+ */
+ T_scheduler_log_10 scheduler_log;
+
+ /**
+ * @brief This member provides a jump context to resume a thread dispatch.
+ */
+ jmp_buf thread_dispatch_context;
+
+ /**
+ * @brief This member contains the identifier of the runner scheduler.
+ */
+ rtems_id scheduler_id;
+
+ /**
+ * @brief This member contains the identifier of the runner task.
+ */
+ rtems_id runner_id;
+
+ /**
+ * @brief This member references the TCB of the runner task.
+ */
+ rtems_tcb *runner_tcb;
+
+ /**
+ * @brief This member contains the identifier of the mutex.
+ */
+ rtems_id mutex_id;
+
+ /**
+ * @brief This member provides an event set used to set up the blocking
+ * conditions of the task to delete.
+ */
+ rtems_event_set events;
+
+ /**
+ * @brief This member contains the identifier of the worker task.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member references the TCB of the worker task.
+ */
+ rtems_tcb *worker_tcb;
+
+ /**
+ * @brief This member contains the worker state at the end of the
+ * rtems_task_delete() call.
+ */
+ States_Control worker_state;
+
+ /**
+ * @brief This member contains the worker timer info at the end of the
+ * rtems_task_delete() call.
+ */
+ TaskTimerInfo worker_timer_info;
+
+ /**
+ * @brief This member contains the worker thread queue at the end of the
+ * rtems_task_delete() call.
+ */
+ const Thread_queue_Queue *worker_wait_queue;
+
+ /**
+ * @brief This member contains the worker thread life state at the end of the
+ * rtems_task_delete() call.
+ */
+ Thread_Life_state worker_life_state;
+
+ /**
+ * @brief This member contains the worker priority at the end of the
+ * rtems_task_delete() call.
+ */
+ rtems_task_priority worker_priority;
+
+ /**
+ * @brief This member contains the identifier of the deleter task.
+ */
+ rtems_id deleter_id;
+
+ /**
+ * @brief This member references the TCB of the deleter task.
+ */
+ rtems_tcb *deleter_tcb;
+
+ /**
+ * @brief This member contains the identifier of the second deleter task.
+ */
+ rtems_id deleter_2_id;
+
+ /**
+ * @brief This member references the TCB of the second deleter task.
+ */
+ rtems_tcb *deleter_2_tcb;
+
+ /**
+ * @brief This member contains the identifier of the test user extensions.
+ */
+ rtems_id extension_id;
+
+ /**
+ * @brief This member contains extension calls.
+ */
+ ExtensionCalls calls;
+
+ /**
+ * @brief This member contains extension calls after the rtems_task_delete()
+ * call.
+ */
+ ExtensionCalls calls_after_restart;
+
+ /**
+ * @brief This member contains the delete counter.
+ */
+ uint32_t restart_counter;
+
+ /**
+ * @brief If this member is true, then the worker shall be dormant before the
+ * rtems_task_delete() call.
+ */
+ bool dormant;
+
+ /**
+ * @brief If this member is true, then the worker shall be suspended before
+ * the rtems_task_delete() call.
+ */
+ bool suspended;
+
+ /**
+ * @brief If this member is true, then the thread life of the worker shall be
+ * protected before the rtems_task_delete() call.
+ */
+ bool protected;
+
+ /**
+ * @brief If this member is true, then the worker shall be restarting before
+ * the rtems_task_delete() call.
+ */
+ bool restarting;
+
+ /**
+ * @brief If this member is true, then the worker shall be terminating before
+ * the rtems_task_delete() call.
+ */
+ bool terminating;
+
+ /**
+ * @brief If this member is true, then the rtems_task_delete() shall be
+ * called from within interrupt context.
+ */
+ bool interrupt;
+
+ /**
+ * @brief If this member is true, then the worker shall be blocked before the
+ * rtems_task_delete() call.
+ */
+ bool blocked;
+
+ /**
+ * @brief If this member is true, then the worker shall be enqueued on a wait
+ * queue before the rtems_task_delete() call.
+ */
+ bool enqueued;
+
+ /**
+ * @brief If this member is true, then the worker obtained a mutex.
+ */
+ bool worker_is_mutex_owner;
+
+ /**
+ * @brief If this member is true, then the timer of the worker shall be
+ * active before the rtems_task_delete() call.
+ */
+ bool timer_active;
+
+ /**
+ * @brief If this member is true, then the deleter shall have a vital
+ * priority for the worker.
+ */
+ bool vital_deleter_priority;
+
+ /**
+ * @brief If this member is true, then thread dispatching is disabled by the
+ * worker task before the rtems_task_delete() call.
+ */
+ bool dispatch_disabled;
+
+ /**
+ * @brief If this member is true, then it is expected to delete the worker.
+ */
+ bool delete_worker_expected;
+
+ /**
+ * @brief This member contains the return value of the rtems_task_delete()
+ * call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``id`` parameter value.
+ */
+ rtems_id id;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 11 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 11 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqDelete_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqDelete_Context;
+
+static RtemsTaskReqDelete_Context
+ RtemsTaskReqDelete_Instance;
+
+static const char * const RtemsTaskReqDelete_PreDesc_Id[] = {
+ "Executing",
+ "Other",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTaskReqDelete_PreDesc_Context[] = {
+ "Task",
+ "Interrupt",
+ "NA"
+};
+
+static const char * const RtemsTaskReqDelete_PreDesc_ThreadDispatch[] = {
+ "Disabled",
+ "Enabled",
+ "NA"
+};
+
+static const char * const RtemsTaskReqDelete_PreDesc_CallerPriority[] = {
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const RtemsTaskReqDelete_PreDesc_Dormant[] = {
+ "No",
+ "Yes",
+ "NA"
+};
+
+static const char * const RtemsTaskReqDelete_PreDesc_Suspended[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqDelete_PreDesc_Restarting[] = {
+ "No",
+ "Yes",
+ "NA"
+};
+
+static const char * const RtemsTaskReqDelete_PreDesc_Terminating[] = {
+ "No",
+ "Yes",
+ "NA"
+};
+
+static const char * const RtemsTaskReqDelete_PreDesc_Protected[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqDelete_PreDesc_State[] = {
+ "Enqueued",
+ "Ready",
+ "Blocked",
+ "NA"
+};
+
+static const char * const RtemsTaskReqDelete_PreDesc_Timer[] = {
+ "Inactive",
+ "Active",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqDelete_PreDesc[] = {
+ RtemsTaskReqDelete_PreDesc_Id,
+ RtemsTaskReqDelete_PreDesc_Context,
+ RtemsTaskReqDelete_PreDesc_ThreadDispatch,
+ RtemsTaskReqDelete_PreDesc_CallerPriority,
+ RtemsTaskReqDelete_PreDesc_Dormant,
+ RtemsTaskReqDelete_PreDesc_Suspended,
+ RtemsTaskReqDelete_PreDesc_Restarting,
+ RtemsTaskReqDelete_PreDesc_Terminating,
+ RtemsTaskReqDelete_PreDesc_Protected,
+ RtemsTaskReqDelete_PreDesc_State,
+ RtemsTaskReqDelete_PreDesc_Timer,
+ NULL
+};
+
+typedef RtemsTaskReqDelete_Context Context;
+
+static void CaptureWorkerState( Context *ctx )
+{
+ T_scheduler_log *log;
+
+ log = T_scheduler_record( NULL );
+
+ if ( log != NULL ) {
+ T_eq_ptr( &log->header, &ctx->scheduler_log.header );
+
+ ctx->worker_wait_queue = ctx->worker_tcb->Wait.queue;
+ ctx->worker_state = ctx->worker_tcb->current_state;
+ ctx->worker_life_state = ctx->worker_tcb->Life.state;
+ ctx->worker_priority =
+ SCHEDULER_PRIORITY_UNMAP( _Thread_Get_priority( ctx->worker_tcb ) );
+ CopyExtensionCalls( &ctx->calls, &ctx->calls_after_restart );
+ GetTaskTimerInfoByThread( ctx->worker_tcb, &ctx->worker_timer_info );
+ }
+}
+
+static void TaskSwitch( rtems_tcb *executing, rtems_tcb *heir )
+{
+ (void) executing;
+ (void) heir;
+ CaptureWorkerState( T_fixture_context() );
+}
+
+static void VerifyTaskPreparation( const Context *ctx )
+{
+ if ( ctx->id != INVALID_ID ) {
+ States_Control state;
+ Thread_Life_state life_state;
+
+ state = STATES_READY;
+ life_state = ctx->worker_tcb->Life.state;
+
+ if ( ctx->suspended ) {
+ state |= STATES_SUSPENDED;
+ }
+
+ if ( ctx->dormant ) {
+ T_eq_int( life_state, 0 );
+ state |= STATES_DORMANT;
+ } else {
+ T_eq( ctx->protected, ( life_state & THREAD_LIFE_PROTECTED ) != 0 );
+ T_eq( ctx->restarting, ( life_state & THREAD_LIFE_RESTARTING ) != 0 );
+ T_eq( ctx->terminating, ( life_state & THREAD_LIFE_TERMINATING ) != 0 );
+
+ if ( ctx->blocked ) {
+ if ( ctx->enqueued ) {
+ state |= STATES_WAITING_FOR_MUTEX;
+ } else {
+ state |= STATES_WAITING_FOR_EVENT;
+ }
+ }
+ }
+
+ T_eq_u32( ctx->worker_tcb->current_state, state );
+ }
+}
+
+static void Fatal(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ Context *ctx;
+
+ T_eq_int( source, INTERNAL_ERROR_CORE );
+ T_eq_ulong( code, INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL );
+
+ ctx = arg;
+ ++ctx->calls.fatal;
+ T_assert_eq_int( ctx->calls.fatal, 1 );
+ longjmp( ctx->thread_dispatch_context, 1 );
+}
+
+static void ResumeThreadDispatch(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ Context *ctx;
+
+ T_eq_int( source, INTERNAL_ERROR_CORE );
+ T_eq_ulong( code, INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL );
+
+ ctx = arg;
+ SetFatalHandler( Fatal, ctx );
+ longjmp( ctx->thread_dispatch_context, 1 );
+}
+
+static void Delete( void *arg )
+{
+ Context *ctx;
+ T_scheduler_log *log;
+
+ ctx = arg;
+
+ if ( ctx->suspended && ctx->id != INVALID_ID ) {
+ if ( ctx->id != RTEMS_SELF || ctx->interrupt ) {
+ SuspendTask( ctx->worker_id );
+ } else {
+ Per_CPU_Control *cpu_self;
+
+ /*
+ * Where the system was built with SMP support enabled, a suspended
+ * executing thread during the rtems_task_delete() call can happen
+ * if the thread was suspended by another processor and the
+ * inter-processor interrupt did not yet arrive. Where the system was
+ * built with SMP support disabled, this state cannot happen with the
+ * current implementation. However, we still specify and validate this
+ * behaviour unconditionally since there exist alternative
+ * implementations which would lead to such a state if the executing
+ * thread is suspended by an ISR.
+ */
+ cpu_self = _Thread_Dispatch_disable();
+ SuspendSelf();
+ cpu_self->dispatch_necessary = false;
+ _Thread_Dispatch_enable( cpu_self );
+ }
+ }
+
+ if ( ctx->dispatch_disabled ) {
+ _Thread_Dispatch_disable();
+ }
+
+ VerifyTaskPreparation( ctx );
+ ClearExtensionCalls( &ctx->calls );
+
+ log = T_scheduler_record_10( &ctx->scheduler_log );
+ T_null( log );
+
+ if ( setjmp( ctx->thread_dispatch_context ) == 0 ) {
+ ctx->status = rtems_task_delete( ctx->id );
+ } else {
+ _Thread_Dispatch_unnest( _Per_CPU_Get() );
+ }
+
+ CaptureWorkerState( ctx );
+
+ if ( ctx->dispatch_disabled ) {
+ _Thread_Dispatch_enable( _Per_CPU_Get() );
+ }
+}
+
+static void Block( Context *ctx )
+{
+ rtems_interval ticks;
+
+ if ( ctx->timer_active ) {
+ ticks = UINT32_MAX;
+ } else {
+ ticks = RTEMS_NO_TIMEOUT;
+ }
+
+ if ( ctx->enqueued ) {
+ ObtainMutexTimed( ctx->mutex_id, ticks );
+ ctx->worker_is_mutex_owner = true;
+ } else {
+ /*
+ * Do not use a stack variable for the event set, since we may jump out
+ * of the directive call.
+ */
+ (void) rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_EVENT_ANY | RTEMS_WAIT,
+ ticks,
+ &ctx->events
+ );
+ }
+}
+
+static void BlockDone( Context *ctx )
+{
+ if ( ctx->enqueued ) {
+ ReleaseMutex( ctx->mutex_id );
+ }
+}
+
+static void Signal( rtems_signal_set signals )
+{
+ Context *ctx;
+
+ (void) signals;
+ ctx = T_fixture_context();
+
+ if ( ctx->id == RTEMS_SELF ) {
+ SetPriority( ctx->runner_id, PRIO_LOW );
+
+ if ( ctx->interrupt ) {
+ if ( ctx->blocked ) {
+ Per_CPU_Control *cpu_self;
+
+ SetFatalHandler( ResumeThreadDispatch, ctx );
+ cpu_self = _Thread_Dispatch_disable();
+
+ if ( setjmp( ctx->thread_dispatch_context ) == 0 ) {
+ Block( ctx );
+ } else {
+ _Thread_Dispatch_unnest( cpu_self );
+ }
+
+ CallWithinISR( Delete, ctx );
+
+ _Thread_Dispatch_direct( cpu_self );
+ BlockDone( ctx );
+ } else {
+ CallWithinISR( Delete, ctx );
+ }
+ } else {
+ Delete( ctx );
+ }
+ } else {
+ if ( ctx->blocked ) {
+ Block( ctx );
+ BlockDone( ctx );
+ } else {
+ SetPriority( ctx->runner_id, PRIO_HIGH );
+ }
+ }
+
+ if ( ctx->protected ) {
+ _Thread_Set_life_protection( 0 );
+ }
+}
+
+static void Deleter( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ if ( ctx != NULL ) {
+ /* We have to prevent the priority boost in the task delete below */
+ SetPriority( ctx->runner_id, PRIO_LOW );
+ SetSelfPriorityNoYield( PRIO_NORMAL );
+
+ DeleteTask( ctx->worker_id );
+ }
+
+ SuspendSelf();
+}
+
+static void SecondDeleter( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ if ( ctx != NULL ) {
+ if ( !ctx->vital_deleter_priority ) {
+ SetPriority( ctx->runner_id, PRIO_LOW );
+ SetSelfPriorityNoYield( PRIO_NORMAL );
+ }
+
+ Delete( ctx );
+ }
+
+ SuspendSelf();
+}
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+
+ if ( arg != 0 ) {
+ rtems_status_code sc;
+
+ sc = rtems_signal_catch( Signal, RTEMS_NO_ASR );
+ T_rsc_success( sc );
+
+ if ( ctx->protected ) {
+ _Thread_Set_life_protection( THREAD_LIFE_PROTECTED );
+ }
+
+ Yield();
+ }
+
+ if ( IsMutexOwner( ctx->mutex_id ) ) {
+ ReleaseMutex( ctx->mutex_id );
+ }
+
+ rtems_task_exit();
+}
+
+static void ThreadDelete( rtems_tcb *executing, rtems_tcb *deleted )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ ++ctx->calls.thread_delete;
+
+ T_eq_u32( executing->Object.id, ctx->runner_id );
+
+ if ( ctx->delete_worker_expected ) {
+ T_eq_u32( deleted->Object.id, ctx->worker_id );
+ }
+}
+
+static void ThreadRestart( rtems_tcb *executing, rtems_tcb *restarted )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ ++ctx->calls.thread_restart;
+}
+
+static void ThreadTerminate( rtems_tcb *executing )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ ++ctx->calls.thread_terminate;
+
+ T_eq_u32( executing->Object.id, ctx->worker_id );
+
+ if ( IsMutexOwner( ctx->mutex_id ) ) {
+ ReleaseMutex( ctx->mutex_id );
+ }
+}
+
+static void Cleanup( Context *ctx )
+{
+ SetSelfPriority( PRIO_VERY_LOW );
+
+ if ( ( ctx->id == RTEMS_SELF || ctx->interrupt ) && ctx->suspended ) {
+ ResumeTask( ctx->worker_id );
+ }
+
+ if ( ctx->protected && ctx->blocked ) {
+ if ( ctx->enqueued ) {
+ ReleaseMutex( ctx->mutex_id );
+ ObtainMutex( ctx->mutex_id );
+ } else {
+ SendEvents( ctx->worker_id, RTEMS_EVENT_0 );
+ }
+ }
+
+ if (
+ ctx->id == INVALID_ID ||
+ ( ctx->calls.thread_terminate == 0 &&
+ !( ctx->dormant && ctx->status != RTEMS_CALLED_FROM_ISR ) )
+ ) {
+ DeleteTask( ctx->worker_id );
+ }
+
+ SetSelfPriority( PRIO_NORMAL );
+}
+
+static const rtems_extensions_table extensions = {
+ .thread_delete = ThreadDelete,
+ .thread_restart = ThreadRestart,
+ .thread_terminate = ThreadTerminate
+};
+
+static void RtemsTaskReqDelete_Pre_Id_Prepare(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Pre_Id_Executing: {
+ /*
+ * While the ``id`` parameter is associated with the calling task.
+ */
+ ctx->id = RTEMS_SELF;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Id_Other: {
+ /*
+ * While the ``id`` parameter is associated with a task other than the
+ * calling task.
+ */
+ ctx->id = ctx->worker_id;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is not associated with a task.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Pre_Context_Prepare(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Pre_Context state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Pre_Context_Task: {
+ /*
+ * While the rtems_task_delete() directive is called from within task
+ * context.
+ */
+ ctx->interrupt = false;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Context_Interrupt: {
+ /*
+ * While the rtems_task_delete() directive is called from within
+ * interrupt context.
+ */
+ ctx->interrupt = true;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Pre_ThreadDispatch_Prepare(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Pre_ThreadDispatch state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Pre_ThreadDispatch_Disabled: {
+ /*
+ * While thread dispatching is disabled for the calling task.
+ */
+ ctx->dispatch_disabled = true;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_ThreadDispatch_Enabled: {
+ /*
+ * While thread dispatching is enabled for the calling task.
+ */
+ ctx->dispatch_disabled = false;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_ThreadDispatch_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Pre_CallerPriority_Prepare(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Pre_CallerPriority state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Pre_CallerPriority_Vital: {
+ /*
+ * While at least one priority of the calling task is higher than the
+ * highest priority of the task specified by the ``id`` parameter.
+ */
+ ctx->vital_deleter_priority = true;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_CallerPriority_Dispensable: {
+ /*
+ * While all priorities of the calling task are lower than or equal to
+ * the highest priority of the task specified by the ``id`` parameter.
+ */
+ ctx->vital_deleter_priority = false;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_CallerPriority_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Pre_Dormant_Prepare(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Pre_Dormant state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Pre_Dormant_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not dormant.
+ */
+ ctx->dormant = false;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Dormant_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is dormant.
+ */
+ ctx->dormant = true;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Dormant_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Pre_Suspended_Prepare(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Pre_Suspended state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Pre_Suspended_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is suspended.
+ */
+ ctx->suspended = true;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Suspended_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not suspended.
+ */
+ ctx->suspended = false;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Suspended_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Pre_Restarting_Prepare(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Pre_Restarting state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Pre_Restarting_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not restarting.
+ */
+ ctx->restarting = false;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Restarting_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is restarting.
+ */
+ ctx->restarting = true;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Restarting_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Pre_Terminating_Prepare(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Pre_Terminating state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Pre_Terminating_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not terminating.
+ */
+ ctx->terminating = false;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Terminating_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is terminating.
+ */
+ ctx->terminating = true;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Terminating_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Pre_Protected_Prepare(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Pre_Protected state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Pre_Protected_Yes: {
+ /*
+ * While thread life of the task specified by the ``id`` parameter is
+ * protected.
+ */
+ ctx->protected = true;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Protected_No: {
+ /*
+ * While thread life of the task specified by the ``id`` parameter is not
+ * protected.
+ */
+ ctx->protected = false;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Protected_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Pre_State_Prepare(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Pre_State state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Pre_State_Enqueued: {
+ /*
+ * While the task specified by the ``id`` parameter is enqueued on a wait
+ * queue.
+ */
+ ctx->blocked = true;
+ ctx->enqueued = true;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_State_Ready: {
+ /*
+ * While the task specified by the ``id`` parameter is a ready task or a
+ * scheduled task.
+ */
+ ctx->blocked = false;
+ ctx->enqueued = false;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_State_Blocked: {
+ /*
+ * While the task specified by the ``id`` parameter is blocked.
+ */
+ ctx->blocked = true;
+ ctx->enqueued = false;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_State_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Pre_Timer_Prepare(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Pre_Timer state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Pre_Timer_Inactive: {
+ /*
+ * While timer of the task specified by the ``id`` parameter is inactive.
+ */
+ ctx->timer_active = false;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Timer_Active: {
+ /*
+ * While timer of the task specified by the ``id`` parameter is active.
+ */
+ ctx->timer_active = true;
+ break;
+ }
+
+ case RtemsTaskReqDelete_Pre_Timer_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Post_Status_Check(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_delete() shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Status_InvId: {
+ /*
+ * The return status of rtems_task_delete() shall be RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Status_CalledFromISR: {
+ /*
+ * The return status of rtems_task_delete() shall be
+ * RTEMS_CALLED_FROM_ISR.
+ */
+ T_rsc( ctx->status, RTEMS_CALLED_FROM_ISR );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Status_NoReturn: {
+ /*
+ * The rtems_task_delete() call shall not return.
+ */
+ T_rsc( ctx->status, RTEMS_NOT_IMPLEMENTED );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Post_FatalError_Check(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Post_FatalError state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Post_FatalError_Yes: {
+ /*
+ * The fatal error with a fatal source of INTERNAL_ERROR_CORE and a fatal
+ * code of INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL shall occur
+ * through the rtems_task_delete() call.
+ */
+ T_eq_u32( ctx->calls.fatal, 1 );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_FatalError_Nop: {
+ /*
+ * No fatal error shall occur through the rtems_task_delete() call.
+ */
+ T_eq_u32( ctx->calls.fatal, 0 );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_FatalError_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Post_Zombie_Check(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Post_Zombie state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Post_Zombie_Yes: {
+ /*
+ * The task specified by the ``id`` parameter shall be in the zombie
+ * state after the rtems_task_delete() call.
+ */
+ T_eq_u32( ctx->worker_state & STATES_ZOMBIE, STATES_ZOMBIE )
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Zombie_No: {
+ /*
+ * The task specified by the ``id`` parameter shall not be in the zombie
+ * state after the rtems_task_delete() call.
+ */
+ T_eq_u32( ctx->worker_state & STATES_ZOMBIE, 0 )
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Zombie_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Post_TaskPriority_Check(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Post_TaskPriority state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Post_TaskPriority_Raise: {
+ /*
+ * Each priority of the calling task which is higher than the highest
+ * priority of the task specified by the ``id`` parameter shall be made
+ * the highest priority of the task.
+ */
+ T_eq_u32( ctx->worker_priority, PRIO_ULTRA_HIGH );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_TaskPriority_Nop: {
+ /*
+ * The priorities of the task specified by the ``id`` parameter shall not
+ * be changed by the rtems_task_delete() call.
+ */
+ T_eq_u32( ctx->worker_priority, PRIO_NORMAL );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_TaskPriority_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Post_RestartExtensions_Check(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Post_RestartExtensions state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Post_RestartExtensions_Nop: {
+ /*
+ * The thread delete user extensions shall not be invoked by the
+ * rtems_task_delete() call.
+ */
+ T_eq_u32( ctx->calls_after_restart.thread_restart, 0 );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_RestartExtensions_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Post_TerminateExtensions_Check(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Post_TerminateExtensions state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Post_TerminateExtensions_Yes: {
+ /*
+ * The thread terminate user extensions shall be invoked by the
+ * rtems_task_delete() call.
+ */
+ T_eq_u32( ctx->calls_after_restart.thread_terminate, 1 );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_TerminateExtensions_Nop: {
+ /*
+ * The thread terminate user extensions shall not be invoked by the
+ * rtems_task_delete() call.
+ */
+ T_eq_u32( ctx->calls_after_restart.thread_terminate, 0 );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_TerminateExtensions_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Post_Dormant_Check(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Post_Dormant state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Post_Dormant_Yes: {
+ /*
+ * The task specified by the ``id`` parameter shall be dormant after the
+ * rtems_task_delete() call.
+ */
+ T_eq_u32( ctx->worker_state & STATES_DORMANT, STATES_DORMANT )
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Dormant_No: {
+ /*
+ * The task specified by the ``id`` parameter shall not be dormant after
+ * the rtems_task_delete() call.
+ */
+ T_eq_u32( ctx->worker_state & STATES_DORMANT, 0 )
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Dormant_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Post_Suspended_Check(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Post_Suspended state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Post_Suspended_Yes: {
+ /*
+ * The task specified by the ``id`` parameter shall be suspended after
+ * the rtems_task_delete() call.
+ */
+ T_eq_u32( ctx->worker_state & STATES_SUSPENDED, STATES_SUSPENDED )
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Suspended_No: {
+ /*
+ * The task specified by the ``id`` parameter shall not be suspended
+ * after the rtems_task_delete() call.
+ */
+ T_eq_u32( ctx->worker_state & STATES_SUSPENDED, 0 )
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Suspended_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Post_Restarting_Check(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Post_Restarting state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Post_Restarting_Yes: {
+ /*
+ * The task specified by the ``id`` parameter shall be restarting after
+ * the rtems_task_delete() call.
+ */
+ T_ne_int( ctx->worker_life_state & THREAD_LIFE_RESTARTING, 0 );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Restarting_No: {
+ /*
+ * The task specified by the ``id`` parameter shall not be restarting
+ * after the rtems_task_delete() call.
+ */
+ T_eq_int( ctx->worker_life_state & THREAD_LIFE_RESTARTING, 0 );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Restarting_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Post_Terminating_Check(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Post_Terminating state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Post_Terminating_Yes: {
+ /*
+ * The task specified by the ``id`` parameter shall be terminating after
+ * the rtems_task_delete() call.
+ */
+ T_ne_int( ctx->worker_life_state & THREAD_LIFE_TERMINATING, 0 );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Terminating_No: {
+ /*
+ * The task specified by the ``id`` parameter shall not be terminating
+ * after the rtems_task_delete() call.
+ */
+ T_eq_int( ctx->worker_life_state & THREAD_LIFE_TERMINATING, 0 );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Terminating_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Post_Protected_Check(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Post_Protected state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Post_Protected_Yes: {
+ /*
+ * The thread life of the task specified by the ``id`` parameter be
+ * protected after the rtems_task_delete() call.
+ */
+ T_ne_int( ctx->worker_life_state & THREAD_LIFE_PROTECTED, 0 );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Protected_No: {
+ /*
+ * The thread life of the task specified by the ``id`` parameter shall
+ * not be protected after the rtems_task_delete() call.
+ */
+ T_eq_int( ctx->worker_life_state & THREAD_LIFE_PROTECTED, 0 );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Protected_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Post_State_Check(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Post_State state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Post_State_Enqueued: {
+ /*
+ * The task specified by the ``id`` parameter shall be enqueued on a wait
+ * queue and blocked.
+ */
+ T_ne_u32( ctx->worker_state & STATES_BLOCKED, 0 )
+ T_not_null( ctx->worker_wait_queue );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_State_Ready: {
+ /*
+ * The task specified by the ``id`` parameter shall not be enqueued on a
+ * wait queue and not blocked.
+ */
+ T_eq_u32( ctx->worker_state & STATES_BLOCKED, 0 )
+ T_null( ctx->worker_wait_queue );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_State_Blocked: {
+ /*
+ * The task specified by the ``id`` parameter shall be not enqueued on a
+ * wait queue and blocked.
+ */
+ T_ne_u32( ctx->worker_state & STATES_BLOCKED, 0 )
+ T_null( ctx->worker_wait_queue );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_State_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Post_Timer_Check(
+ RtemsTaskReqDelete_Context *ctx,
+ RtemsTaskReqDelete_Post_Timer state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqDelete_Post_Timer_Active: {
+ /*
+ * The timer of the task specified by the ``id`` parameter shall be
+ * active after the rtems_task_delete() call.
+ */
+ T_eq_int( ctx->worker_timer_info.state, TASK_TIMER_TICKS );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Timer_Inactive: {
+ /*
+ * The timer of the task specified by the ``id`` parameter shall be
+ * inactive after the rtems_task_delete() call.
+ */
+ T_eq_int( ctx->worker_timer_info.state, TASK_TIMER_INACTIVE );
+ break;
+ }
+
+ case RtemsTaskReqDelete_Post_Timer_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqDelete_Setup( RtemsTaskReqDelete_Context *ctx )
+{
+ rtems_status_code sc;
+
+ ctx->runner_id = rtems_task_self();
+ ctx->runner_tcb = GetThread( ctx->runner_id );
+ ctx->scheduler_id = GetSelfScheduler();
+ ctx->mutex_id = CreateMutexNoProtocol();
+ ObtainMutex( ctx->mutex_id );
+
+ sc = rtems_extension_create(
+ rtems_build_name( 'T', 'E', 'S', 'T' ),
+ &extensions,
+ &ctx->extension_id
+ );
+ T_rsc_success( sc );
+
+ SetFatalHandler( Fatal, ctx );
+ SetTaskSwitchExtension( TaskSwitch );
+ SetSelfPriority( PRIO_NORMAL );
+
+ ctx->deleter_id = CreateTask( "DELE", PRIO_HIGH );
+ ctx->deleter_tcb = GetThread( ctx->deleter_id );
+ StartTask( ctx->deleter_id, Deleter, NULL );
+
+ ctx->deleter_2_id = CreateTask( "DEL2", PRIO_ULTRA_HIGH );
+ ctx->deleter_2_tcb = GetThread( ctx->deleter_2_id );
+ StartTask( ctx->deleter_2_id, SecondDeleter, NULL );
+}
+
+static void RtemsTaskReqDelete_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqDelete_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqDelete_Setup( ctx );
+}
+
+static void RtemsTaskReqDelete_Teardown( RtemsTaskReqDelete_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_extension_delete( ctx->extension_id );
+ T_rsc_success( sc );
+
+ SetFatalHandler( NULL, NULL );
+ SetTaskSwitchExtension( NULL );
+ DeleteTask( ctx->deleter_id );
+ DeleteTask( ctx->deleter_2_id );
+ ReleaseMutex( ctx->mutex_id );
+ DeleteMutex( ctx->mutex_id );
+ RestoreRunnerASR();
+ RestoreRunnerPriority();
+}
+
+static void RtemsTaskReqDelete_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqDelete_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqDelete_Teardown( ctx );
+}
+
+static void RtemsTaskReqDelete_Prepare( RtemsTaskReqDelete_Context *ctx )
+{
+ ctx->status = RTEMS_NOT_IMPLEMENTED;
+ ctx->restart_counter = 0;
+
+ ctx->delete_worker_expected = false;
+ ctx->worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ ctx->delete_worker_expected = true;
+
+ ctx->worker_tcb = GetThread( ctx->worker_id );
+ ctx->worker_state = UINT32_MAX;
+ ctx->worker_life_state = INT_MAX;
+ ctx->worker_priority = UINT32_MAX;
+}
+
+static void RtemsTaskReqDelete_Action( RtemsTaskReqDelete_Context *ctx )
+{
+ rtems_status_code sc;
+
+ if ( ctx->id != INVALID_ID && !ctx->dormant ) {
+ ctx->worker_is_mutex_owner = false;
+ StartTask( ctx->worker_id, Worker, ctx );
+
+ /* Let the worker catch signals and set the thread life protection state */
+ Yield();
+
+ sc = rtems_signal_send( ctx->worker_id, RTEMS_SIGNAL_0 );
+ T_rsc_success( sc );
+
+ if ( ctx->restarting ) {
+ sc = rtems_task_restart( ctx->worker_id, 0 );
+ T_rsc_success( sc );
+ }
+
+ if ( ctx->terminating ) {
+ sc = rtems_task_restart( ctx->deleter_id, (rtems_task_argument) ctx );
+ T_rsc_success( sc );
+ } else {
+ Yield();
+ }
+ }
+
+ if ( ctx->id != RTEMS_SELF ) {
+ if ( ctx->interrupt ) {
+ CallWithinISR( Delete, ctx );
+ } else {
+ sc = rtems_task_restart( ctx->deleter_2_id, (rtems_task_argument) ctx );
+ T_rsc_success( sc );
+ }
+ }
+
+ Cleanup( ctx );
+}
+
+static const RtemsTaskReqDelete_Entry
+RtemsTaskReqDelete_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_NA,
+ RtemsTaskReqDelete_Post_FatalError_NA, RtemsTaskReqDelete_Post_Zombie_NA,
+ RtemsTaskReqDelete_Post_TaskPriority_NA,
+ RtemsTaskReqDelete_Post_RestartExtensions_NA,
+ RtemsTaskReqDelete_Post_TerminateExtensions_NA,
+ RtemsTaskReqDelete_Post_Dormant_NA, RtemsTaskReqDelete_Post_Suspended_NA,
+ RtemsTaskReqDelete_Post_Restarting_NA,
+ RtemsTaskReqDelete_Post_Terminating_NA,
+ RtemsTaskReqDelete_Post_Protected_NA, RtemsTaskReqDelete_Post_State_NA,
+ RtemsTaskReqDelete_Post_Timer_NA },
+ { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, RtemsTaskReqDelete_Post_Status_InvId,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_NA,
+ RtemsTaskReqDelete_Post_TaskPriority_NA,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_NA, RtemsTaskReqDelete_Post_Suspended_NA,
+ RtemsTaskReqDelete_Post_Restarting_NA,
+ RtemsTaskReqDelete_Post_Terminating_NA,
+ RtemsTaskReqDelete_Post_Protected_NA, RtemsTaskReqDelete_Post_State_NA,
+ RtemsTaskReqDelete_Post_Timer_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_NA,
+ RtemsTaskReqDelete_Post_FatalError_NA, RtemsTaskReqDelete_Post_Zombie_NA,
+ RtemsTaskReqDelete_Post_TaskPriority_NA,
+ RtemsTaskReqDelete_Post_RestartExtensions_NA,
+ RtemsTaskReqDelete_Post_TerminateExtensions_NA,
+ RtemsTaskReqDelete_Post_Dormant_NA, RtemsTaskReqDelete_Post_Suspended_NA,
+ RtemsTaskReqDelete_Post_Restarting_NA,
+ RtemsTaskReqDelete_Post_Terminating_NA,
+ RtemsTaskReqDelete_Post_Protected_NA, RtemsTaskReqDelete_Post_State_NA,
+ RtemsTaskReqDelete_Post_Timer_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_NA,
+ RtemsTaskReqDelete_Post_FatalError_NA, RtemsTaskReqDelete_Post_Zombie_NA,
+ RtemsTaskReqDelete_Post_TaskPriority_NA,
+ RtemsTaskReqDelete_Post_RestartExtensions_NA,
+ RtemsTaskReqDelete_Post_TerminateExtensions_NA,
+ RtemsTaskReqDelete_Post_Dormant_NA, RtemsTaskReqDelete_Post_Suspended_NA,
+ RtemsTaskReqDelete_Post_Restarting_NA,
+ RtemsTaskReqDelete_Post_Terminating_NA,
+ RtemsTaskReqDelete_Post_Protected_NA, RtemsTaskReqDelete_Post_State_NA,
+ RtemsTaskReqDelete_Post_Timer_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_NA,
+ RtemsTaskReqDelete_Post_FatalError_NA, RtemsTaskReqDelete_Post_Zombie_NA,
+ RtemsTaskReqDelete_Post_TaskPriority_NA,
+ RtemsTaskReqDelete_Post_RestartExtensions_NA,
+ RtemsTaskReqDelete_Post_TerminateExtensions_NA,
+ RtemsTaskReqDelete_Post_Dormant_NA, RtemsTaskReqDelete_Post_Suspended_NA,
+ RtemsTaskReqDelete_Post_Restarting_NA,
+ RtemsTaskReqDelete_Post_Terminating_NA,
+ RtemsTaskReqDelete_Post_Protected_NA, RtemsTaskReqDelete_Post_State_NA,
+ RtemsTaskReqDelete_Post_Timer_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_Yes,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_Yes, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_Yes,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_Yes, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_Yes, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_Yes, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_Yes,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Yes,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_Yes,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Yes,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_NoReturn,
+ RtemsTaskReqDelete_Post_FatalError_Yes, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Raise,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqDelete_Post_Status_Ok,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_Yes,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_No,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_No,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_Yes,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Enqueued,
+ RtemsTaskReqDelete_Post_Timer_Active },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No, RtemsTaskReqDelete_Post_State_Ready,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked,
+ RtemsTaskReqDelete_Post_Timer_Inactive },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqDelete_Post_Status_CalledFromISR,
+ RtemsTaskReqDelete_Post_FatalError_Nop, RtemsTaskReqDelete_Post_Zombie_No,
+ RtemsTaskReqDelete_Post_TaskPriority_Nop,
+ RtemsTaskReqDelete_Post_RestartExtensions_Nop,
+ RtemsTaskReqDelete_Post_TerminateExtensions_Nop,
+ RtemsTaskReqDelete_Post_Dormant_No, RtemsTaskReqDelete_Post_Suspended_No,
+ RtemsTaskReqDelete_Post_Restarting_Yes,
+ RtemsTaskReqDelete_Post_Terminating_Yes,
+ RtemsTaskReqDelete_Post_Protected_No,
+ RtemsTaskReqDelete_Post_State_Blocked, RtemsTaskReqDelete_Post_Timer_Active }
+};
+
+static const uint8_t
+RtemsTaskReqDelete_Map[] = {
+ 3, 3, 19, 4, 3, 3, 3, 3, 20, 4, 3, 3, 3, 3, 19, 4, 3, 3, 3, 3, 20, 4, 3, 3,
+ 3, 3, 21, 4, 3, 3, 3, 3, 22, 4, 3, 3, 3, 3, 21, 4, 3, 3, 3, 3, 22, 4, 3, 3,
+ 3, 3, 23, 4, 3, 3, 3, 3, 24, 4, 3, 3, 3, 3, 23, 4, 3, 3, 3, 3, 24, 4, 3, 3,
+ 3, 3, 25, 4, 3, 3, 3, 3, 26, 4, 3, 3, 3, 3, 25, 4, 3, 3, 3, 3, 26, 4, 3, 3,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 19, 4, 3, 3, 3,
+ 3, 20, 4, 3, 3, 3, 3, 19, 4, 3, 3, 3, 3, 20, 4, 3, 3, 3, 3, 21, 4, 3, 3, 3,
+ 3, 22, 4, 3, 3, 3, 3, 21, 4, 3, 3, 3, 3, 22, 4, 3, 3, 3, 3, 23, 4, 3, 3, 3,
+ 3, 24, 4, 3, 3, 3, 3, 23, 4, 3, 3, 3, 3, 24, 4, 3, 3, 3, 3, 25, 4, 3, 3, 3,
+ 3, 26, 4, 3, 3, 3, 3, 25, 4, 3, 3, 3, 3, 26, 4, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 27, 4, 3, 3, 3, 3, 28, 4, 3, 3, 3, 3, 27,
+ 4, 3, 3, 3, 3, 28, 4, 3, 3, 3, 3, 29, 4, 3, 3, 3, 3, 30, 4, 3, 3, 3, 3, 29,
+ 4, 3, 3, 3, 3, 30, 4, 3, 3, 3, 3, 17, 4, 3, 3, 3, 3, 17, 4, 3, 3, 3, 3, 17,
+ 4, 3, 3, 3, 3, 17, 4, 3, 3, 3, 3, 18, 4, 3, 3, 3, 3, 18, 4, 3, 3, 3, 3, 18,
+ 4, 3, 3, 3, 3, 18, 4, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 3, 3, 27, 4, 3, 3, 3, 3, 28, 4, 3, 3, 3, 3, 27, 4, 3, 3, 3, 3, 28, 4,
+ 3, 3, 3, 3, 29, 4, 3, 3, 3, 3, 30, 4, 3, 3, 3, 3, 29, 4, 3, 3, 3, 3, 30, 4,
+ 3, 3, 3, 3, 17, 4, 3, 3, 3, 3, 17, 4, 3, 3, 3, 3, 17, 4, 3, 3, 3, 3, 17, 4,
+ 3, 3, 3, 3, 18, 4, 3, 3, 3, 3, 18, 4, 3, 3, 3, 3, 18, 4, 3, 3, 3, 3, 18, 4,
+ 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 71, 72, 73, 4,
+ 74, 75, 76, 77, 78, 4, 79, 80, 81, 82, 83, 4, 84, 85, 86, 87, 88, 4, 89, 90,
+ 91, 92, 93, 4, 94, 95, 96, 97, 98, 4, 99, 100, 101, 102, 103, 4, 104, 105,
+ 106, 107, 108, 4, 109, 110, 111, 112, 113, 4, 114, 115, 116, 117, 118, 4,
+ 119, 120, 121, 122, 123, 4, 124, 125, 126, 127, 128, 4, 129, 130, 131, 132,
+ 133, 4, 134, 135, 136, 137, 138, 4, 139, 140, 141, 142, 143, 4, 144, 145,
+ 146, 147, 148, 4, 149, 150, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 71, 72, 73, 4, 74, 75, 76, 77, 78, 4, 79, 80, 81, 82, 83, 4, 84, 85,
+ 86, 87, 88, 4, 89, 90, 91, 92, 93, 4, 94, 95, 96, 97, 98, 4, 99, 100, 101,
+ 102, 103, 4, 104, 105, 106, 107, 108, 4, 109, 110, 111, 112, 113, 4, 114,
+ 115, 116, 117, 118, 4, 119, 120, 121, 122, 123, 4, 124, 125, 126, 127, 128,
+ 4, 129, 130, 131, 132, 133, 4, 134, 135, 136, 137, 138, 4, 139, 140, 141,
+ 142, 143, 4, 144, 145, 146, 147, 148, 4, 149, 150, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 31, 32, 33, 4, 34, 35, 9, 9, 9, 4, 9, 9, 31, 32, 33, 4, 34, 35, 9,
+ 9, 9, 4, 9, 9, 36, 37, 38, 4, 39, 40, 10, 10, 10, 4, 10, 10, 36, 37, 38, 4,
+ 39, 40, 10, 10, 10, 4, 10, 10, 31, 32, 33, 4, 34, 35, 9, 9, 9, 4, 9, 9, 31,
+ 32, 33, 4, 34, 35, 9, 9, 9, 4, 9, 9, 36, 37, 38, 4, 39, 40, 10, 10, 10, 4,
+ 10, 10, 36, 37, 38, 4, 39, 40, 10, 10, 10, 4, 10, 10, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 41, 42, 43, 4, 44, 45, 11, 11, 11, 4, 11, 11,
+ 41, 42, 43, 4, 44, 45, 11, 11, 11, 4, 11, 11, 46, 47, 48, 4, 49, 50, 12, 12,
+ 12, 4, 12, 12, 46, 47, 48, 4, 49, 50, 12, 12, 12, 4, 12, 12, 41, 42, 43, 4,
+ 44, 45, 11, 11, 11, 4, 11, 11, 41, 42, 43, 4, 44, 45, 11, 11, 11, 4, 11, 11,
+ 46, 47, 48, 4, 49, 50, 12, 12, 12, 4, 12, 12, 46, 47, 48, 4, 49, 50, 12, 12,
+ 12, 4, 12, 12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 51, 52,
+ 53, 4, 54, 55, 13, 13, 13, 4, 13, 13, 51, 52, 53, 4, 54, 55, 13, 13, 13, 4,
+ 13, 13, 56, 57, 58, 4, 59, 60, 14, 14, 14, 4, 14, 14, 56, 57, 58, 4, 59, 60,
+ 14, 14, 14, 4, 14, 14, 51, 52, 53, 4, 54, 55, 13, 13, 13, 4, 13, 13, 51, 52,
+ 53, 4, 54, 55, 13, 13, 13, 4, 13, 13, 56, 57, 58, 4, 59, 60, 14, 14, 14, 4,
+ 14, 14, 56, 57, 58, 4, 59, 60, 14, 14, 14, 4, 14, 14, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 61, 62, 63, 4, 64, 65, 15, 15, 15, 4, 15, 15,
+ 61, 62, 63, 4, 64, 65, 15, 15, 15, 4, 15, 15, 66, 67, 68, 4, 69, 70, 16, 16,
+ 16, 4, 16, 16, 66, 67, 68, 4, 69, 70, 16, 16, 16, 4, 16, 16, 61, 62, 63, 4,
+ 64, 65, 15, 15, 15, 4, 15, 15, 61, 62, 63, 4, 64, 65, 15, 15, 15, 4, 15, 15,
+ 66, 67, 68, 4, 69, 70, 16, 16, 16, 4, 16, 16, 66, 67, 68, 4, 69, 70, 16, 16,
+ 16, 4, 16, 16, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 151,
+ 152, 153, 4, 154, 155, 156, 157, 158, 4, 159, 160, 161, 162, 163, 4, 164,
+ 165, 166, 167, 168, 4, 169, 170, 171, 172, 173, 4, 174, 175, 176, 177, 178,
+ 4, 179, 180, 181, 182, 183, 4, 184, 185, 186, 187, 188, 4, 189, 190, 191,
+ 192, 193, 4, 194, 195, 196, 197, 198, 4, 199, 200, 201, 202, 203, 4, 204,
+ 205, 206, 207, 208, 4, 209, 210, 211, 212, 213, 4, 214, 215, 216, 217, 218,
+ 4, 219, 220, 221, 222, 223, 4, 224, 225, 226, 227, 228, 4, 229, 230, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 151, 152, 153, 4, 154, 155, 156,
+ 157, 158, 4, 159, 160, 161, 162, 163, 4, 164, 165, 166, 167, 168, 4, 169,
+ 170, 171, 172, 173, 4, 174, 175, 176, 177, 178, 4, 179, 180, 181, 182, 183,
+ 4, 184, 185, 186, 187, 188, 4, 189, 190, 191, 192, 193, 4, 194, 195, 196,
+ 197, 198, 4, 199, 200, 201, 202, 203, 4, 204, 205, 206, 207, 208, 4, 209,
+ 210, 211, 212, 213, 4, 214, 215, 216, 217, 218, 4, 219, 220, 221, 222, 223,
+ 4, 224, 225, 226, 227, 228, 4, 229, 230, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0
+};
+
+static size_t RtemsTaskReqDelete_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqDelete_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTaskReqDelete_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqDelete_Fixture = {
+ .setup = RtemsTaskReqDelete_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqDelete_Teardown_Wrap,
+ .scope = RtemsTaskReqDelete_Scope,
+ .initial_context = &RtemsTaskReqDelete_Instance
+};
+
+static inline RtemsTaskReqDelete_Entry RtemsTaskReqDelete_PopEntry(
+ RtemsTaskReqDelete_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqDelete_Entries[
+ RtemsTaskReqDelete_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqDelete_SetPreConditionStates(
+ RtemsTaskReqDelete_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+
+ if ( ctx->Map.entry.Pre_CallerPriority_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsTaskReqDelete_Pre_CallerPriority_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Dormant_NA ) {
+ ctx->Map.pcs[ 4 ] = RtemsTaskReqDelete_Pre_Dormant_NA;
+ } else {
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Suspended_NA ) {
+ ctx->Map.pcs[ 5 ] = RtemsTaskReqDelete_Pre_Suspended_NA;
+ } else {
+ ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Restarting_NA ) {
+ ctx->Map.pcs[ 6 ] = RtemsTaskReqDelete_Pre_Restarting_NA;
+ } else {
+ ctx->Map.pcs[ 6 ] = ctx->Map.pci[ 6 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Terminating_NA ) {
+ ctx->Map.pcs[ 7 ] = RtemsTaskReqDelete_Pre_Terminating_NA;
+ } else {
+ ctx->Map.pcs[ 7 ] = ctx->Map.pci[ 7 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Protected_NA ) {
+ ctx->Map.pcs[ 8 ] = RtemsTaskReqDelete_Pre_Protected_NA;
+ } else {
+ ctx->Map.pcs[ 8 ] = ctx->Map.pci[ 8 ];
+ }
+
+ if ( ctx->Map.entry.Pre_State_NA ) {
+ ctx->Map.pcs[ 9 ] = RtemsTaskReqDelete_Pre_State_NA;
+ } else {
+ ctx->Map.pcs[ 9 ] = ctx->Map.pci[ 9 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Timer_NA ) {
+ ctx->Map.pcs[ 10 ] = RtemsTaskReqDelete_Pre_Timer_NA;
+ } else {
+ ctx->Map.pcs[ 10 ] = ctx->Map.pci[ 10 ];
+ }
+}
+
+static void RtemsTaskReqDelete_TestVariant( RtemsTaskReqDelete_Context *ctx )
+{
+ RtemsTaskReqDelete_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqDelete_Pre_Context_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqDelete_Pre_ThreadDispatch_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTaskReqDelete_Pre_CallerPriority_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTaskReqDelete_Pre_Dormant_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsTaskReqDelete_Pre_Suspended_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsTaskReqDelete_Pre_Restarting_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsTaskReqDelete_Pre_Terminating_Prepare( ctx, ctx->Map.pcs[ 7 ] );
+ RtemsTaskReqDelete_Pre_Protected_Prepare( ctx, ctx->Map.pcs[ 8 ] );
+ RtemsTaskReqDelete_Pre_State_Prepare( ctx, ctx->Map.pcs[ 9 ] );
+ RtemsTaskReqDelete_Pre_Timer_Prepare( ctx, ctx->Map.pcs[ 10 ] );
+ RtemsTaskReqDelete_Action( ctx );
+ RtemsTaskReqDelete_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTaskReqDelete_Post_FatalError_Check(
+ ctx,
+ ctx->Map.entry.Post_FatalError
+ );
+ RtemsTaskReqDelete_Post_Zombie_Check( ctx, ctx->Map.entry.Post_Zombie );
+ RtemsTaskReqDelete_Post_TaskPriority_Check(
+ ctx,
+ ctx->Map.entry.Post_TaskPriority
+ );
+ RtemsTaskReqDelete_Post_RestartExtensions_Check(
+ ctx,
+ ctx->Map.entry.Post_RestartExtensions
+ );
+ RtemsTaskReqDelete_Post_TerminateExtensions_Check(
+ ctx,
+ ctx->Map.entry.Post_TerminateExtensions
+ );
+ RtemsTaskReqDelete_Post_Dormant_Check( ctx, ctx->Map.entry.Post_Dormant );
+ RtemsTaskReqDelete_Post_Suspended_Check(
+ ctx,
+ ctx->Map.entry.Post_Suspended
+ );
+ RtemsTaskReqDelete_Post_Restarting_Check(
+ ctx,
+ ctx->Map.entry.Post_Restarting
+ );
+ RtemsTaskReqDelete_Post_Terminating_Check(
+ ctx,
+ ctx->Map.entry.Post_Terminating
+ );
+ RtemsTaskReqDelete_Post_Protected_Check(
+ ctx,
+ ctx->Map.entry.Post_Protected
+ );
+ RtemsTaskReqDelete_Post_State_Check( ctx, ctx->Map.entry.Post_State );
+ RtemsTaskReqDelete_Post_Timer_Check( ctx, ctx->Map.entry.Post_Timer );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqDelete( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTaskReqDelete, &RtemsTaskReqDelete_Fixture )
+{
+ RtemsTaskReqDelete_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsTaskReqDelete_Pre_Id_Executing;
+ ctx->Map.pci[ 0 ] < RtemsTaskReqDelete_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsTaskReqDelete_Pre_Context_Task;
+ ctx->Map.pci[ 1 ] < RtemsTaskReqDelete_Pre_Context_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsTaskReqDelete_Pre_ThreadDispatch_Disabled;
+ ctx->Map.pci[ 2 ] < RtemsTaskReqDelete_Pre_ThreadDispatch_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsTaskReqDelete_Pre_CallerPriority_Vital;
+ ctx->Map.pci[ 3 ] < RtemsTaskReqDelete_Pre_CallerPriority_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = RtemsTaskReqDelete_Pre_Dormant_No;
+ ctx->Map.pci[ 4 ] < RtemsTaskReqDelete_Pre_Dormant_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ for (
+ ctx->Map.pci[ 5 ] = RtemsTaskReqDelete_Pre_Suspended_Yes;
+ ctx->Map.pci[ 5 ] < RtemsTaskReqDelete_Pre_Suspended_NA;
+ ++ctx->Map.pci[ 5 ]
+ ) {
+ for (
+ ctx->Map.pci[ 6 ] = RtemsTaskReqDelete_Pre_Restarting_No;
+ ctx->Map.pci[ 6 ] < RtemsTaskReqDelete_Pre_Restarting_NA;
+ ++ctx->Map.pci[ 6 ]
+ ) {
+ for (
+ ctx->Map.pci[ 7 ] = RtemsTaskReqDelete_Pre_Terminating_No;
+ ctx->Map.pci[ 7 ] < RtemsTaskReqDelete_Pre_Terminating_NA;
+ ++ctx->Map.pci[ 7 ]
+ ) {
+ for (
+ ctx->Map.pci[ 8 ] = RtemsTaskReqDelete_Pre_Protected_Yes;
+ ctx->Map.pci[ 8 ] < RtemsTaskReqDelete_Pre_Protected_NA;
+ ++ctx->Map.pci[ 8 ]
+ ) {
+ for (
+ ctx->Map.pci[ 9 ] = RtemsTaskReqDelete_Pre_State_Enqueued;
+ ctx->Map.pci[ 9 ] < RtemsTaskReqDelete_Pre_State_NA;
+ ++ctx->Map.pci[ 9 ]
+ ) {
+ for (
+ ctx->Map.pci[ 10 ] = RtemsTaskReqDelete_Pre_Timer_Inactive;
+ ctx->Map.pci[ 10 ] < RtemsTaskReqDelete_Pre_Timer_NA;
+ ++ctx->Map.pci[ 10 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqDelete_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsTaskReqDelete_SetPreConditionStates( ctx );
+ RtemsTaskReqDelete_Prepare( ctx );
+ RtemsTaskReqDelete_TestVariant( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-exit.c b/testsuites/validation/tc-task-exit.c
new file mode 100644
index 0000000000..24373f6c47
--- /dev/null
+++ b/testsuites/validation/tc-task-exit.c
@@ -0,0 +1,989 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqExit
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/test-scheduler.h>
+#include <rtems/score/apimutex.h>
+#include <rtems/score/statesimpl.h>
+#include <rtems/score/threaddispatch.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqExit spec:/rtems/task/req/exit
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqExit_Pre_Restarting_Yes,
+ RtemsTaskReqExit_Pre_Restarting_No,
+ RtemsTaskReqExit_Pre_Restarting_NA
+} RtemsTaskReqExit_Pre_Restarting;
+
+typedef enum {
+ RtemsTaskReqExit_Pre_Terminating_Yes,
+ RtemsTaskReqExit_Pre_Terminating_No,
+ RtemsTaskReqExit_Pre_Terminating_NA
+} RtemsTaskReqExit_Pre_Terminating;
+
+typedef enum {
+ RtemsTaskReqExit_Pre_Protected_Yes,
+ RtemsTaskReqExit_Pre_Protected_No,
+ RtemsTaskReqExit_Pre_Protected_NA
+} RtemsTaskReqExit_Pre_Protected;
+
+typedef enum {
+ RtemsTaskReqExit_Pre_ThreadDispatch_Enabled,
+ RtemsTaskReqExit_Pre_ThreadDispatch_Disabled,
+ RtemsTaskReqExit_Pre_ThreadDispatch_NA
+} RtemsTaskReqExit_Pre_ThreadDispatch;
+
+typedef enum {
+ RtemsTaskReqExit_Post_FatalError_Yes,
+ RtemsTaskReqExit_Post_FatalError_Nop,
+ RtemsTaskReqExit_Post_FatalError_NA
+} RtemsTaskReqExit_Post_FatalError;
+
+typedef enum {
+ RtemsTaskReqExit_Post_DeleteExtensions_Nop,
+ RtemsTaskReqExit_Post_DeleteExtensions_NA
+} RtemsTaskReqExit_Post_DeleteExtensions;
+
+typedef enum {
+ RtemsTaskReqExit_Post_RestartExtensions_Nop,
+ RtemsTaskReqExit_Post_RestartExtensions_NA
+} RtemsTaskReqExit_Post_RestartExtensions;
+
+typedef enum {
+ RtemsTaskReqExit_Post_TerminateExtensions_Yes,
+ RtemsTaskReqExit_Post_TerminateExtensions_Nop,
+ RtemsTaskReqExit_Post_TerminateExtensions_NA
+} RtemsTaskReqExit_Post_TerminateExtensions;
+
+typedef enum {
+ RtemsTaskReqExit_Post_Zombie_Yes,
+ RtemsTaskReqExit_Post_Zombie_No,
+ RtemsTaskReqExit_Post_Zombie_NA
+} RtemsTaskReqExit_Post_Zombie;
+
+typedef enum {
+ RtemsTaskReqExit_Post_ID_Valid,
+ RtemsTaskReqExit_Post_ID_Invalid,
+ RtemsTaskReqExit_Post_ID_NA
+} RtemsTaskReqExit_Post_ID;
+
+typedef enum {
+ RtemsTaskReqExit_Post_Delete_NextAllocate,
+ RtemsTaskReqExit_Post_Delete_Nop,
+ RtemsTaskReqExit_Post_Delete_NA
+} RtemsTaskReqExit_Post_Delete;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Restarting_NA : 1;
+ uint32_t Pre_Terminating_NA : 1;
+ uint32_t Pre_Protected_NA : 1;
+ uint32_t Pre_ThreadDispatch_NA : 1;
+ uint32_t Post_FatalError : 2;
+ uint32_t Post_DeleteExtensions : 1;
+ uint32_t Post_RestartExtensions : 1;
+ uint32_t Post_TerminateExtensions : 2;
+ uint32_t Post_Zombie : 2;
+ uint32_t Post_ID : 2;
+ uint32_t Post_Delete : 2;
+} RtemsTaskReqExit_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/exit test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides the scheduler operation records.
+ */
+ T_scheduler_log_4 scheduler_log;
+
+ /**
+ * @brief This member contains the identifier of the runner task.
+ */
+ rtems_id runner_id;
+
+ /**
+ * @brief This member contains the identifier of the worker task.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member contains the identifier of the deleter task.
+ */
+ rtems_id deleter_id;
+
+ /**
+ * @brief This member contains the identifier of the test user extensions.
+ */
+ rtems_id extension_id;
+
+ /**
+ * @brief This member contains the count of fatal extension calls.
+ */
+ uint32_t fatal_extension_calls;
+
+ /**
+ * @brief This member contains the count of thread delete extension calls.
+ */
+ uint32_t delete_extension_calls;
+
+ /**
+ * @brief This member contains the count of thread restart extension calls.
+ */
+ uint32_t restart_extension_calls;
+
+ /**
+ * @brief This member contains the count of thread terminate extension calls.
+ */
+ uint32_t terminate_extension_calls;
+
+ /**
+ * @brief If this member is true, then the thread life of the worker is
+ * protected before the rtems_task_exit() call.
+ */
+ bool protected;
+
+ /**
+ * @brief If this member is true, then the worker locked the allocator.
+ */
+ bool allocator_locked;
+
+ /**
+ * @brief If this member is true, then the worker is restarting before the
+ * rtems_task_exit() call.
+ */
+ bool restarting;
+
+ /**
+ * @brief If this member is true, then the worker is terminating before the
+ * rtems_task_exit() call.
+ */
+ bool terminating;
+
+ /**
+ * @brief If this member is true, then thread dispatching is disabled by the
+ * worker task before the rtems_task_exit() call.
+ */
+ bool dispatch_disabled;
+
+ /**
+ * @brief If this member is true, then it is expected to delete the worker.
+ */
+ bool delete_worker_expected;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 4 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqExit_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqExit_Context;
+
+static RtemsTaskReqExit_Context
+ RtemsTaskReqExit_Instance;
+
+static const char * const RtemsTaskReqExit_PreDesc_Restarting[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqExit_PreDesc_Terminating[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqExit_PreDesc_Protected[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqExit_PreDesc_ThreadDispatch[] = {
+ "Enabled",
+ "Disabled",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqExit_PreDesc[] = {
+ RtemsTaskReqExit_PreDesc_Restarting,
+ RtemsTaskReqExit_PreDesc_Terminating,
+ RtemsTaskReqExit_PreDesc_Protected,
+ RtemsTaskReqExit_PreDesc_ThreadDispatch,
+ NULL
+};
+
+typedef RtemsTaskReqExit_Context Context;
+
+static void Signal( rtems_signal_set signals )
+{
+ Context *ctx;
+ T_scheduler_log *log;
+ Thread_Life_state life_state;
+
+ (void) signals;
+ ctx = T_fixture_context();
+
+ if ( ctx->dispatch_disabled ) {
+ _Thread_Dispatch_disable();
+ }
+
+ /* Check that the thread life state was prepared correctly */
+ life_state = GetExecuting()->Life.state;
+ T_eq( ctx->protected, ( life_state & THREAD_LIFE_PROTECTED ) != 0 );
+ T_eq( ctx->restarting, ( life_state & THREAD_LIFE_RESTARTING ) != 0 );
+ T_eq( ctx->terminating, ( life_state & THREAD_LIFE_TERMINATING ) != 0 );
+
+ log = T_scheduler_record_4( &ctx->scheduler_log );
+ T_null( log );
+
+ ctx->delete_extension_calls = 0;
+ ctx->fatal_extension_calls = 0;
+ ctx->restart_extension_calls = 0;
+ ctx->terminate_extension_calls = 0;
+
+ rtems_task_exit();
+}
+
+static void Deleter( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ if ( ctx != NULL ) {
+ DeleteTask( ctx->worker_id );
+ }
+
+ SuspendSelf();
+}
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+ rtems_status_code sc;
+
+ ctx = (Context *) arg;
+
+ sc = rtems_signal_catch( Signal, RTEMS_NO_ASR );
+ T_rsc_success( sc );
+
+ if ( ctx->protected ) {
+ _RTEMS_Lock_allocator();
+ ctx->allocator_locked = true;
+ }
+
+ Yield();
+}
+
+static void UnlockAllocator( Context *ctx )
+{
+ if ( ctx->allocator_locked ) {
+ ctx->allocator_locked = false;
+ _RTEMS_Unlock_allocator();
+ }
+}
+
+static void Fatal(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ Context *ctx;
+ T_scheduler_log *log;
+ Per_CPU_Control *cpu_self;
+
+ ctx = arg;
+ ++ctx->fatal_extension_calls;
+
+ T_eq_int( source, INTERNAL_ERROR_CORE );
+ T_eq_ulong( code, INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL );
+ T_assert_eq_int( ctx->fatal_extension_calls, 1 );
+
+ log = T_scheduler_record( NULL );
+ T_eq_ptr( &log->header, &ctx->scheduler_log.header );
+
+ UnlockAllocator( ctx );
+ SuspendSelf();
+
+ cpu_self = _Per_CPU_Get();
+ _Thread_Dispatch_unnest( cpu_self );
+ _Thread_Dispatch_direct_no_return( cpu_self );
+}
+
+static void ThreadDelete( rtems_tcb *executing, rtems_tcb *deleted )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ ++ctx->delete_extension_calls;
+
+ T_eq_u32( executing->Object.id, ctx->runner_id );
+
+ if ( ctx->delete_worker_expected ) {
+ T_eq_u32( deleted->Object.id, ctx->worker_id );
+ }
+}
+
+static void ThreadRestart( rtems_tcb *executing, rtems_tcb *restarted )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ ++ctx->restart_extension_calls;
+}
+
+static void ThreadTerminate( rtems_tcb *executing )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ ++ctx->terminate_extension_calls;
+
+ T_eq_u32( executing->Object.id, ctx->worker_id );
+
+ UnlockAllocator( ctx );
+}
+
+static const rtems_extensions_table extensions = {
+ .thread_delete = ThreadDelete,
+ .thread_restart = ThreadRestart,
+ .thread_terminate = ThreadTerminate
+};
+
+static void RtemsTaskReqExit_Pre_Restarting_Prepare(
+ RtemsTaskReqExit_Context *ctx,
+ RtemsTaskReqExit_Pre_Restarting state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqExit_Pre_Restarting_Yes: {
+ /*
+ * While the calling task is restarting.
+ */
+ ctx->restarting = true;
+ break;
+ }
+
+ case RtemsTaskReqExit_Pre_Restarting_No: {
+ /*
+ * While the calling task is not restarting.
+ */
+ ctx->restarting = false;
+ break;
+ }
+
+ case RtemsTaskReqExit_Pre_Restarting_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqExit_Pre_Terminating_Prepare(
+ RtemsTaskReqExit_Context *ctx,
+ RtemsTaskReqExit_Pre_Terminating state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqExit_Pre_Terminating_Yes: {
+ /*
+ * While the calling task is terminating.
+ */
+ ctx->terminating = true;
+ break;
+ }
+
+ case RtemsTaskReqExit_Pre_Terminating_No: {
+ /*
+ * While the calling task is not terminating.
+ */
+ ctx->terminating = false;
+ break;
+ }
+
+ case RtemsTaskReqExit_Pre_Terminating_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqExit_Pre_Protected_Prepare(
+ RtemsTaskReqExit_Context *ctx,
+ RtemsTaskReqExit_Pre_Protected state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqExit_Pre_Protected_Yes: {
+ /*
+ * While the thread life of the calling task is protected.
+ */
+ ctx->protected = true;
+ break;
+ }
+
+ case RtemsTaskReqExit_Pre_Protected_No: {
+ /*
+ * While the thread life of the calling task is not protected.
+ */
+ ctx->protected = false;
+ break;
+ }
+
+ case RtemsTaskReqExit_Pre_Protected_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqExit_Pre_ThreadDispatch_Prepare(
+ RtemsTaskReqExit_Context *ctx,
+ RtemsTaskReqExit_Pre_ThreadDispatch state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqExit_Pre_ThreadDispatch_Enabled: {
+ /*
+ * While thread dispatching is enabled for the calling task.
+ */
+ ctx->dispatch_disabled = false;
+ break;
+ }
+
+ case RtemsTaskReqExit_Pre_ThreadDispatch_Disabled: {
+ /*
+ * While thread dispatching is disabled for the calling task.
+ */
+ ctx->dispatch_disabled = true;
+ break;
+ }
+
+ case RtemsTaskReqExit_Pre_ThreadDispatch_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqExit_Post_FatalError_Check(
+ RtemsTaskReqExit_Context *ctx,
+ RtemsTaskReqExit_Post_FatalError state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqExit_Post_FatalError_Yes: {
+ /*
+ * The fatal error with a fatal source of INTERNAL_ERROR_CORE and a fatal
+ * code of INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL shall occur
+ * by the rtems_task_exit() call.
+ */
+ T_eq_u32( ctx->fatal_extension_calls, 1 );
+ break;
+ }
+
+ case RtemsTaskReqExit_Post_FatalError_Nop: {
+ /*
+ * No fatal error shall occur by the rtems_task_exit() call.
+ */
+ T_eq_u32( ctx->fatal_extension_calls, 0 );
+ break;
+ }
+
+ case RtemsTaskReqExit_Post_FatalError_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqExit_Post_DeleteExtensions_Check(
+ RtemsTaskReqExit_Context *ctx,
+ RtemsTaskReqExit_Post_DeleteExtensions state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqExit_Post_DeleteExtensions_Nop: {
+ /*
+ * The thread delete user extensions shall not be invoked by the
+ * rtems_task_exit() call.
+ */
+ T_eq_u32( ctx->delete_extension_calls, 0 );
+ break;
+ }
+
+ case RtemsTaskReqExit_Post_DeleteExtensions_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqExit_Post_RestartExtensions_Check(
+ RtemsTaskReqExit_Context *ctx,
+ RtemsTaskReqExit_Post_RestartExtensions state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqExit_Post_RestartExtensions_Nop: {
+ /*
+ * The thread restart user extensions shall not be invoked by the
+ * rtems_task_exit() call.
+ */
+ T_eq_u32( ctx->restart_extension_calls, 0 );
+ break;
+ }
+
+ case RtemsTaskReqExit_Post_RestartExtensions_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqExit_Post_TerminateExtensions_Check(
+ RtemsTaskReqExit_Context *ctx,
+ RtemsTaskReqExit_Post_TerminateExtensions state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqExit_Post_TerminateExtensions_Yes: {
+ /*
+ * The thread terminate user extensions shall be invoked by the
+ * rtems_task_exit() call.
+ */
+ if ( ctx->protected ) {
+ T_eq_u32( ctx->terminate_extension_calls, 2 );
+ } else {
+ T_eq_u32( ctx->terminate_extension_calls, 1 );
+ }
+ break;
+ }
+
+ case RtemsTaskReqExit_Post_TerminateExtensions_Nop: {
+ /*
+ * The thread terminate user extensions shall not be invoked by the
+ * rtems_task_exit() call.
+ */
+ T_eq_u32( ctx->terminate_extension_calls, 0 );
+ break;
+ }
+
+ case RtemsTaskReqExit_Post_TerminateExtensions_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqExit_Post_Zombie_Check(
+ RtemsTaskReqExit_Context *ctx,
+ RtemsTaskReqExit_Post_Zombie state
+)
+{
+ const T_scheduler_event *event;
+ size_t index;
+
+ index = 0;
+
+ switch ( state ) {
+ case RtemsTaskReqExit_Post_Zombie_Yes: {
+ /*
+ * The thread state of the calling task shall be set to the zombie state
+ * by the rtems_task_exit() call.
+ */
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_BLOCK );
+ T_eq_u32( event->thread->Object.id, ctx->worker_id );
+ T_eq_u32( event->thread->current_state, STATES_ZOMBIE );
+
+ if ( ctx->terminating ) {
+ /* The thread waiting for the worker exit was unblocked */
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UNBLOCK );
+ T_eq_u32( event->thread->Object.id, ctx->deleter_id );
+
+ /* Inherited priority was removed */
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UPDATE_PRIORITY );
+ T_eq_u32( event->thread->Object.id, ctx->worker_id );
+
+ /* The deleter task suspended itself */
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_BLOCK );
+ T_eq_u32( event->thread->Object.id, ctx->deleter_id );
+ }
+
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_NOP );
+ break;
+ }
+
+ case RtemsTaskReqExit_Post_Zombie_No: {
+ /*
+ * The thread state of the calling task shall be not modified by the
+ * rtems_task_exit() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 0 );
+ break;
+ }
+
+ case RtemsTaskReqExit_Post_Zombie_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqExit_Post_ID_Check(
+ RtemsTaskReqExit_Context *ctx,
+ RtemsTaskReqExit_Post_ID state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ sc = rtems_task_get_scheduler( ctx->worker_id, &id );
+
+ switch ( state ) {
+ case RtemsTaskReqExit_Post_ID_Valid: {
+ /*
+ * The object identifier of the calling task shall be valid.
+ */
+ T_rsc_success( sc );
+ break;
+ }
+
+ case RtemsTaskReqExit_Post_ID_Invalid: {
+ /*
+ * The object identifier of the calling task shall be invalid.
+ */
+ T_rsc( sc, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqExit_Post_ID_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqExit_Post_Delete_Check(
+ RtemsTaskReqExit_Context *ctx,
+ RtemsTaskReqExit_Post_Delete state
+)
+{
+ rtems_id id;
+
+ id = CreateTask( "TEMP", PRIO_LOW );
+
+ switch ( state ) {
+ case RtemsTaskReqExit_Post_Delete_NextAllocate: {
+ /*
+ * The calling task shall be deleted by the next directive which
+ * allocates a task.
+ */
+ T_eq_u32( ctx->delete_extension_calls, 1 );
+ break;
+ }
+
+ case RtemsTaskReqExit_Post_Delete_Nop: {
+ /*
+ * The calling task shall not be deleted by the next directive which
+ * allocates a task.
+ */
+ T_eq_u32( ctx->delete_extension_calls, 0 );
+ break;
+ }
+
+ case RtemsTaskReqExit_Post_Delete_NA:
+ break;
+ }
+
+ DeleteTask( id );
+}
+
+static void RtemsTaskReqExit_Setup( RtemsTaskReqExit_Context *ctx )
+{
+ rtems_status_code sc;
+
+ ctx->runner_id = rtems_task_self();
+
+ sc = rtems_extension_create(
+ rtems_build_name( 'T', 'E', 'S', 'T' ),
+ &extensions,
+ &ctx->extension_id
+ );
+ T_rsc_success( sc );
+
+ SetFatalHandler( Fatal, ctx );
+ SetSelfPriority( PRIO_NORMAL );
+
+ ctx->deleter_id = CreateTask( "DELE", PRIO_HIGH );
+ StartTask( ctx->deleter_id, Deleter, NULL );
+}
+
+static void RtemsTaskReqExit_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqExit_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqExit_Setup( ctx );
+}
+
+static void RtemsTaskReqExit_Teardown( RtemsTaskReqExit_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_extension_delete( ctx->extension_id );
+ T_rsc_success( sc );
+
+ SetFatalHandler( NULL, NULL );
+ DeleteTask( ctx->deleter_id );
+ RestoreRunnerASR();
+ RestoreRunnerPriority();
+}
+
+static void RtemsTaskReqExit_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqExit_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqExit_Teardown( ctx );
+}
+
+static void RtemsTaskReqExit_Action( RtemsTaskReqExit_Context *ctx )
+{
+ rtems_status_code sc;
+
+ ctx->delete_worker_expected = false;
+ ctx->worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ ctx->delete_worker_expected = true;
+
+ StartTask( ctx->worker_id, Worker, ctx );
+
+ /* Let the worker catch signals and set the thread life protection state */
+ Yield();
+
+ sc = rtems_signal_send( ctx->worker_id, RTEMS_SIGNAL_0 );
+ T_rsc_success( sc );
+
+ if ( ctx->restarting ) {
+ sc = rtems_task_restart( ctx->worker_id, (rtems_task_argument) ctx );
+ T_rsc_success( sc );
+ }
+
+ if ( ctx->terminating ) {
+ sc = rtems_task_restart( ctx->deleter_id, (rtems_task_argument) ctx );
+ T_rsc_success( sc );
+ } else {
+ Yield();
+ }
+
+ if ( !ctx->dispatch_disabled ) {
+ T_scheduler_log *log;
+
+ log = T_scheduler_record( NULL );
+ T_eq_ptr( &log->header, &ctx->scheduler_log.header );
+ }
+}
+
+static void RtemsTaskReqExit_Cleanup( RtemsTaskReqExit_Context *ctx )
+{
+ if ( ctx->dispatch_disabled ) {
+ DeleteTask( ctx->worker_id );
+ }
+}
+
+static const RtemsTaskReqExit_Entry
+RtemsTaskReqExit_Entries[] = {
+ { 0, 0, 0, 0, 0, RtemsTaskReqExit_Post_FatalError_Nop,
+ RtemsTaskReqExit_Post_DeleteExtensions_Nop,
+ RtemsTaskReqExit_Post_RestartExtensions_Nop,
+ RtemsTaskReqExit_Post_TerminateExtensions_Yes,
+ RtemsTaskReqExit_Post_Zombie_Yes, RtemsTaskReqExit_Post_ID_Invalid,
+ RtemsTaskReqExit_Post_Delete_NextAllocate },
+ { 0, 0, 0, 0, 0, RtemsTaskReqExit_Post_FatalError_Yes,
+ RtemsTaskReqExit_Post_DeleteExtensions_Nop,
+ RtemsTaskReqExit_Post_RestartExtensions_Nop,
+ RtemsTaskReqExit_Post_TerminateExtensions_Nop,
+ RtemsTaskReqExit_Post_Zombie_No, RtemsTaskReqExit_Post_ID_Valid,
+ RtemsTaskReqExit_Post_Delete_Nop }
+};
+
+static const uint8_t
+RtemsTaskReqExit_Map[] = {
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
+};
+
+static size_t RtemsTaskReqExit_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqExit_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTaskReqExit_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqExit_Fixture = {
+ .setup = RtemsTaskReqExit_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqExit_Teardown_Wrap,
+ .scope = RtemsTaskReqExit_Scope,
+ .initial_context = &RtemsTaskReqExit_Instance
+};
+
+static inline RtemsTaskReqExit_Entry RtemsTaskReqExit_PopEntry(
+ RtemsTaskReqExit_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqExit_Entries[
+ RtemsTaskReqExit_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqExit_TestVariant( RtemsTaskReqExit_Context *ctx )
+{
+ RtemsTaskReqExit_Pre_Restarting_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqExit_Pre_Terminating_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqExit_Pre_Protected_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTaskReqExit_Pre_ThreadDispatch_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTaskReqExit_Action( ctx );
+ RtemsTaskReqExit_Post_FatalError_Check(
+ ctx,
+ ctx->Map.entry.Post_FatalError
+ );
+ RtemsTaskReqExit_Post_DeleteExtensions_Check(
+ ctx,
+ ctx->Map.entry.Post_DeleteExtensions
+ );
+ RtemsTaskReqExit_Post_RestartExtensions_Check(
+ ctx,
+ ctx->Map.entry.Post_RestartExtensions
+ );
+ RtemsTaskReqExit_Post_TerminateExtensions_Check(
+ ctx,
+ ctx->Map.entry.Post_TerminateExtensions
+ );
+ RtemsTaskReqExit_Post_Zombie_Check( ctx, ctx->Map.entry.Post_Zombie );
+ RtemsTaskReqExit_Post_ID_Check( ctx, ctx->Map.entry.Post_ID );
+ RtemsTaskReqExit_Post_Delete_Check( ctx, ctx->Map.entry.Post_Delete );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqExit( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTaskReqExit, &RtemsTaskReqExit_Fixture )
+{
+ RtemsTaskReqExit_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTaskReqExit_Pre_Restarting_Yes;
+ ctx->Map.pcs[ 0 ] < RtemsTaskReqExit_Pre_Restarting_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqExit_Pre_Terminating_Yes;
+ ctx->Map.pcs[ 1 ] < RtemsTaskReqExit_Pre_Terminating_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsTaskReqExit_Pre_Protected_Yes;
+ ctx->Map.pcs[ 2 ] < RtemsTaskReqExit_Pre_Protected_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsTaskReqExit_Pre_ThreadDispatch_Enabled;
+ ctx->Map.pcs[ 3 ] < RtemsTaskReqExit_Pre_ThreadDispatch_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqExit_PopEntry( ctx );
+ RtemsTaskReqExit_TestVariant( ctx );
+ RtemsTaskReqExit_Cleanup( ctx );
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-get-affinity.c b/testsuites/validation/tc-task-get-affinity.c
new file mode 100644
index 0000000000..54244560df
--- /dev/null
+++ b/testsuites/validation/tc-task-get-affinity.c
@@ -0,0 +1,519 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqGetAffinity
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqGetAffinity spec:/rtems/task/req/get-affinity
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqGetAffinity_Pre_Id_Invalid,
+ RtemsTaskReqGetAffinity_Pre_Id_Task,
+ RtemsTaskReqGetAffinity_Pre_Id_NA
+} RtemsTaskReqGetAffinity_Pre_Id;
+
+typedef enum {
+ RtemsTaskReqGetAffinity_Pre_CPUSetSize_Valid,
+ RtemsTaskReqGetAffinity_Pre_CPUSetSize_TooSmall,
+ RtemsTaskReqGetAffinity_Pre_CPUSetSize_Askew,
+ RtemsTaskReqGetAffinity_Pre_CPUSetSize_NA
+} RtemsTaskReqGetAffinity_Pre_CPUSetSize;
+
+typedef enum {
+ RtemsTaskReqGetAffinity_Pre_CPUSet_Valid,
+ RtemsTaskReqGetAffinity_Pre_CPUSet_Null,
+ RtemsTaskReqGetAffinity_Pre_CPUSet_NA
+} RtemsTaskReqGetAffinity_Pre_CPUSet;
+
+typedef enum {
+ RtemsTaskReqGetAffinity_Post_Status_Ok,
+ RtemsTaskReqGetAffinity_Post_Status_InvAddr,
+ RtemsTaskReqGetAffinity_Post_Status_InvId,
+ RtemsTaskReqGetAffinity_Post_Status_InvSize,
+ RtemsTaskReqGetAffinity_Post_Status_NA
+} RtemsTaskReqGetAffinity_Post_Status;
+
+typedef enum {
+ RtemsTaskReqGetAffinity_Post_CPUSetObj_Set,
+ RtemsTaskReqGetAffinity_Post_CPUSetObj_Nop,
+ RtemsTaskReqGetAffinity_Post_CPUSetObj_NA
+} RtemsTaskReqGetAffinity_Post_CPUSetObj;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_CPUSetSize_NA : 1;
+ uint16_t Pre_CPUSet_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_CPUSetObj : 2;
+} RtemsTaskReqGetAffinity_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/get-affinity test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides the object referenced by the ``cpuset``
+ * parameter.
+ */
+ cpu_set_t cpuset_obj;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_task_get_affinity() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``id`` parameter value.
+ */
+ rtems_id id;
+
+ /**
+ * @brief This member specifies if the ``cpusetsize`` parameter value.
+ */
+ size_t cpusetsize;
+
+ /**
+ * @brief This member specifies if the ``cpuset`` parameter value.
+ */
+ cpu_set_t *cpuset;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqGetAffinity_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqGetAffinity_Context;
+
+static RtemsTaskReqGetAffinity_Context
+ RtemsTaskReqGetAffinity_Instance;
+
+static const char * const RtemsTaskReqGetAffinity_PreDesc_Id[] = {
+ "Invalid",
+ "Task",
+ "NA"
+};
+
+static const char * const RtemsTaskReqGetAffinity_PreDesc_CPUSetSize[] = {
+ "Valid",
+ "TooSmall",
+ "Askew",
+ "NA"
+};
+
+static const char * const RtemsTaskReqGetAffinity_PreDesc_CPUSet[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqGetAffinity_PreDesc[] = {
+ RtemsTaskReqGetAffinity_PreDesc_Id,
+ RtemsTaskReqGetAffinity_PreDesc_CPUSetSize,
+ RtemsTaskReqGetAffinity_PreDesc_CPUSet,
+ NULL
+};
+
+static void RtemsTaskReqGetAffinity_Pre_Id_Prepare(
+ RtemsTaskReqGetAffinity_Context *ctx,
+ RtemsTaskReqGetAffinity_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetAffinity_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is not associated with a task.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqGetAffinity_Pre_Id_Task: {
+ /*
+ * While the ``id`` parameter is associated with a task.
+ */
+ ctx->id = RTEMS_SELF;
+ break;
+ }
+
+ case RtemsTaskReqGetAffinity_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetAffinity_Pre_CPUSetSize_Prepare(
+ RtemsTaskReqGetAffinity_Context *ctx,
+ RtemsTaskReqGetAffinity_Pre_CPUSetSize state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetAffinity_Pre_CPUSetSize_Valid: {
+ /*
+ * While the ``cpusetsize`` parameter is an integral multiple of the size
+ * of long, while the ``cpusetsize`` parameter specifies a processor set
+ * which is large enough to contain the processor affinity set of the
+ * task.
+ */
+ ctx->cpusetsize = sizeof( ctx->cpuset_obj );
+ break;
+ }
+
+ case RtemsTaskReqGetAffinity_Pre_CPUSetSize_TooSmall: {
+ /*
+ * While the ``cpusetsize`` parameter is an integral multiple of the size
+ * of long, while the ``cpusetsize`` parameter specifies a processor set
+ * which is not large enough to contain the processor affinity set of the
+ * task.
+ */
+ ctx->cpusetsize = 0;
+ break;
+ }
+
+ case RtemsTaskReqGetAffinity_Pre_CPUSetSize_Askew: {
+ /*
+ * While the ``cpusetsize`` parameter is not an integral multiple of the
+ * size of long.
+ */
+ ctx->cpusetsize = SIZE_MAX;
+ break;
+ }
+
+ case RtemsTaskReqGetAffinity_Pre_CPUSetSize_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetAffinity_Pre_CPUSet_Prepare(
+ RtemsTaskReqGetAffinity_Context *ctx,
+ RtemsTaskReqGetAffinity_Pre_CPUSet state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetAffinity_Pre_CPUSet_Valid: {
+ /*
+ * While the ``cpuset`` parameter references an object of type cpu_set_t.
+ */
+ ctx->cpuset = &ctx->cpuset_obj;
+ break;
+ }
+
+ case RtemsTaskReqGetAffinity_Pre_CPUSet_Null: {
+ /*
+ * While the ``cpuset`` parameter is equal to NULL.
+ */
+ ctx->cpuset = NULL;
+ break;
+ }
+
+ case RtemsTaskReqGetAffinity_Pre_CPUSet_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetAffinity_Post_Status_Check(
+ RtemsTaskReqGetAffinity_Context *ctx,
+ RtemsTaskReqGetAffinity_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetAffinity_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_get_affinity() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqGetAffinity_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_task_get_affinity() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTaskReqGetAffinity_Post_Status_InvId: {
+ /*
+ * The return status of rtems_task_get_affinity() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqGetAffinity_Post_Status_InvSize: {
+ /*
+ * The return status of rtems_task_get_affinity() shall be
+ * RTEMS_INVALID_SIZE.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_SIZE );
+ break;
+ }
+
+ case RtemsTaskReqGetAffinity_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetAffinity_Post_CPUSetObj_Check(
+ RtemsTaskReqGetAffinity_Context *ctx,
+ RtemsTaskReqGetAffinity_Post_CPUSetObj state
+)
+{
+ cpu_set_t set;
+ uint32_t cpu_index;
+ uint32_t cpu_max;
+
+ switch ( state ) {
+ case RtemsTaskReqGetAffinity_Post_CPUSetObj_Set: {
+ /*
+ * The value of the object referenced by the ``cpuset`` parameter shall
+ * be set to the processor affinity set of the task specified by the
+ * ``id`` parameter at some point during the call after the return of the
+ * rtems_task_get_affinity() call.
+ */
+ CPU_ZERO( &set );
+
+ cpu_max = rtems_scheduler_get_processor_maximum();
+
+ /* We need the online processors */
+ if ( cpu_max > 4 ) {
+ cpu_max = 4;
+ }
+
+ for ( cpu_index = 0; cpu_index < cpu_max; ++cpu_index ) {
+ CPU_SET( (int) cpu_index, &set );
+ }
+
+ T_eq_int( CPU_CMP( &ctx->cpuset_obj, &set ), 0 );
+ break;
+ }
+
+ case RtemsTaskReqGetAffinity_Post_CPUSetObj_Nop: {
+ /*
+ * Objects referenced by the ``cpuset`` parameter in past calls to
+ * rtems_task_get_affinity() shall not be accessed by the
+ * rtems_task_get_affinity() call.
+ */
+ CPU_ZERO( &set );
+ T_eq_int( CPU_CMP( &ctx->cpuset_obj, &set ), 0 );
+ break;
+ }
+
+ case RtemsTaskReqGetAffinity_Post_CPUSetObj_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetAffinity_Prepare(
+ RtemsTaskReqGetAffinity_Context *ctx
+)
+{
+ CPU_ZERO( &ctx->cpuset_obj );
+}
+
+static void RtemsTaskReqGetAffinity_Action(
+ RtemsTaskReqGetAffinity_Context *ctx
+)
+{
+ ctx->status = rtems_task_get_affinity(
+ ctx->id,
+ ctx->cpusetsize,
+ ctx->cpuset
+ );
+}
+
+static const RtemsTaskReqGetAffinity_Entry
+RtemsTaskReqGetAffinity_Entries[] = {
+ { 0, 0, 0, 0, RtemsTaskReqGetAffinity_Post_Status_InvAddr,
+ RtemsTaskReqGetAffinity_Post_CPUSetObj_Nop },
+ { 0, 0, 0, 0, RtemsTaskReqGetAffinity_Post_Status_InvId,
+ RtemsTaskReqGetAffinity_Post_CPUSetObj_Nop },
+ { 0, 0, 0, 0, RtemsTaskReqGetAffinity_Post_Status_InvSize,
+ RtemsTaskReqGetAffinity_Post_CPUSetObj_Nop },
+ { 0, 0, 0, 0, RtemsTaskReqGetAffinity_Post_Status_Ok,
+ RtemsTaskReqGetAffinity_Post_CPUSetObj_Set }
+};
+
+static const uint8_t
+RtemsTaskReqGetAffinity_Map[] = {
+ 1, 0, 1, 0, 1, 0, 3, 0, 2, 0, 2, 0
+};
+
+static size_t RtemsTaskReqGetAffinity_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqGetAffinity_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsTaskReqGetAffinity_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqGetAffinity_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsTaskReqGetAffinity_Scope,
+ .initial_context = &RtemsTaskReqGetAffinity_Instance
+};
+
+static inline RtemsTaskReqGetAffinity_Entry RtemsTaskReqGetAffinity_PopEntry(
+ RtemsTaskReqGetAffinity_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqGetAffinity_Entries[
+ RtemsTaskReqGetAffinity_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqGetAffinity_TestVariant(
+ RtemsTaskReqGetAffinity_Context *ctx
+)
+{
+ RtemsTaskReqGetAffinity_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqGetAffinity_Pre_CPUSetSize_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqGetAffinity_Pre_CPUSet_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTaskReqGetAffinity_Action( ctx );
+ RtemsTaskReqGetAffinity_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTaskReqGetAffinity_Post_CPUSetObj_Check(
+ ctx,
+ ctx->Map.entry.Post_CPUSetObj
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqGetAffinity( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsTaskReqGetAffinity,
+ &RtemsTaskReqGetAffinity_Fixture
+)
+{
+ RtemsTaskReqGetAffinity_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTaskReqGetAffinity_Pre_Id_Invalid;
+ ctx->Map.pcs[ 0 ] < RtemsTaskReqGetAffinity_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqGetAffinity_Pre_CPUSetSize_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsTaskReqGetAffinity_Pre_CPUSetSize_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsTaskReqGetAffinity_Pre_CPUSet_Valid;
+ ctx->Map.pcs[ 2 ] < RtemsTaskReqGetAffinity_Pre_CPUSet_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqGetAffinity_PopEntry( ctx );
+ RtemsTaskReqGetAffinity_Prepare( ctx );
+ RtemsTaskReqGetAffinity_TestVariant( ctx );
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-get-priority.c b/testsuites/validation/tc-task-get-priority.c
new file mode 100644
index 0000000000..83170e8353
--- /dev/null
+++ b/testsuites/validation/tc-task-get-priority.c
@@ -0,0 +1,619 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqGetPriority
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqGetPriority spec:/rtems/task/req/get-priority
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqGetPriority_Pre_TaskId_Invalid,
+ RtemsTaskReqGetPriority_Pre_TaskId_Task,
+ RtemsTaskReqGetPriority_Pre_TaskId_NA
+} RtemsTaskReqGetPriority_Pre_TaskId;
+
+typedef enum {
+ RtemsTaskReqGetPriority_Pre_SchedulerId_Invalid,
+ RtemsTaskReqGetPriority_Pre_SchedulerId_Scheduler,
+ RtemsTaskReqGetPriority_Pre_SchedulerId_NA
+} RtemsTaskReqGetPriority_Pre_SchedulerId;
+
+typedef enum {
+ RtemsTaskReqGetPriority_Pre_Scheduler_Eligible,
+ RtemsTaskReqGetPriority_Pre_Scheduler_Ineligible,
+ RtemsTaskReqGetPriority_Pre_Scheduler_NA
+} RtemsTaskReqGetPriority_Pre_Scheduler;
+
+typedef enum {
+ RtemsTaskReqGetPriority_Pre_Priority_Valid,
+ RtemsTaskReqGetPriority_Pre_Priority_Null,
+ RtemsTaskReqGetPriority_Pre_Priority_NA
+} RtemsTaskReqGetPriority_Pre_Priority;
+
+typedef enum {
+ RtemsTaskReqGetPriority_Post_Status_Ok,
+ RtemsTaskReqGetPriority_Post_Status_InvAddr,
+ RtemsTaskReqGetPriority_Post_Status_InvId,
+ RtemsTaskReqGetPriority_Post_Status_NotDef,
+ RtemsTaskReqGetPriority_Post_Status_NA
+} RtemsTaskReqGetPriority_Post_Status;
+
+typedef enum {
+ RtemsTaskReqGetPriority_Post_PriorityObj_Set,
+ RtemsTaskReqGetPriority_Post_PriorityObj_Nop,
+ RtemsTaskReqGetPriority_Post_PriorityObj_NA
+} RtemsTaskReqGetPriority_Post_PriorityObj;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_TaskId_NA : 1;
+ uint16_t Pre_SchedulerId_NA : 1;
+ uint16_t Pre_Scheduler_NA : 1;
+ uint16_t Pre_Priority_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_PriorityObj : 2;
+} RtemsTaskReqGetPriority_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/get-priority test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the scheduler A identifier.
+ */
+ rtems_id scheduler_a_id;
+
+ /**
+ * @brief This member contains the scheduler B identifier.
+ */
+ rtems_id scheduler_b_id;
+
+ /**
+ * @brief This member provides the object referenced by the ``priority``
+ * parameter.
+ */
+ rtems_task_priority priority_obj;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_task_get_priority() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``task_id`` parameter value.
+ */
+ rtems_id task_id;
+
+ /**
+ * @brief This member specifies if the ``scheduler_id`` parameter value.
+ */
+ rtems_id scheduler_id;
+
+ /**
+ * @brief This member specifies if the ``priority`` parameter value.
+ */
+ rtems_id *priority;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 4 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 4 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqGetPriority_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqGetPriority_Context;
+
+static RtemsTaskReqGetPriority_Context
+ RtemsTaskReqGetPriority_Instance;
+
+static const char * const RtemsTaskReqGetPriority_PreDesc_TaskId[] = {
+ "Invalid",
+ "Task",
+ "NA"
+};
+
+static const char * const RtemsTaskReqGetPriority_PreDesc_SchedulerId[] = {
+ "Invalid",
+ "Scheduler",
+ "NA"
+};
+
+static const char * const RtemsTaskReqGetPriority_PreDesc_Scheduler[] = {
+ "Eligible",
+ "Ineligible",
+ "NA"
+};
+
+static const char * const RtemsTaskReqGetPriority_PreDesc_Priority[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqGetPriority_PreDesc[] = {
+ RtemsTaskReqGetPriority_PreDesc_TaskId,
+ RtemsTaskReqGetPriority_PreDesc_SchedulerId,
+ RtemsTaskReqGetPriority_PreDesc_Scheduler,
+ RtemsTaskReqGetPriority_PreDesc_Priority,
+ NULL
+};
+
+static void RtemsTaskReqGetPriority_Pre_TaskId_Prepare(
+ RtemsTaskReqGetPriority_Context *ctx,
+ RtemsTaskReqGetPriority_Pre_TaskId state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetPriority_Pre_TaskId_Invalid: {
+ /*
+ * While the ``task_id`` parameter is not associated with a task.
+ */
+ ctx->task_id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Pre_TaskId_Task: {
+ /*
+ * While the ``task_id`` parameter is associated with a task.
+ */
+ ctx->task_id = RTEMS_SELF;
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Pre_TaskId_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetPriority_Pre_SchedulerId_Prepare(
+ RtemsTaskReqGetPriority_Context *ctx,
+ RtemsTaskReqGetPriority_Pre_SchedulerId state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetPriority_Pre_SchedulerId_Invalid: {
+ /*
+ * While the ``scheduler_id`` parameter is not associated with a
+ * scheduler.
+ */
+ ctx->scheduler_id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Pre_SchedulerId_Scheduler: {
+ /*
+ * While the ``scheduler_id`` parameter is associated with a scheduler.
+ */
+ ctx->scheduler_id = ctx->scheduler_a_id;
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Pre_SchedulerId_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetPriority_Pre_Scheduler_Prepare(
+ RtemsTaskReqGetPriority_Context *ctx,
+ RtemsTaskReqGetPriority_Pre_Scheduler state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetPriority_Pre_Scheduler_Eligible: {
+ /*
+ * While the ``scheduler_id`` parameter is associated with an eligible
+ * scheduler of the task specified by ``task_id``.
+ */
+ ctx->scheduler_id = ctx->scheduler_a_id;
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Pre_Scheduler_Ineligible: {
+ /*
+ * While the ``scheduler_id`` parameter is associated with an ineligible
+ * scheduler of the task specified by ``task_id``.
+ */
+ ctx->scheduler_id = ctx->scheduler_b_id;
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Pre_Scheduler_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetPriority_Pre_Priority_Prepare(
+ RtemsTaskReqGetPriority_Context *ctx,
+ RtemsTaskReqGetPriority_Pre_Priority state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetPriority_Pre_Priority_Valid: {
+ /*
+ * While the ``priority`` parameter references an object of type
+ * rtems_task_priority.
+ */
+ ctx->priority = &ctx->priority_obj;
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Pre_Priority_Null: {
+ /*
+ * While the ``priority`` parameter is equal to NULL.
+ */
+ ctx->priority = NULL;
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Pre_Priority_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetPriority_Post_Status_Check(
+ RtemsTaskReqGetPriority_Context *ctx,
+ RtemsTaskReqGetPriority_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetPriority_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_get_priority() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_task_get_priority() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Post_Status_InvId: {
+ /*
+ * The return status of rtems_task_get_priority() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Post_Status_NotDef: {
+ /*
+ * The return status of rtems_task_get_priority() shall be
+ * RTEMS_NOT_DEFINED.
+ */
+ T_rsc( ctx->status, RTEMS_NOT_DEFINED );
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetPriority_Post_PriorityObj_Check(
+ RtemsTaskReqGetPriority_Context *ctx,
+ RtemsTaskReqGetPriority_Post_PriorityObj state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetPriority_Post_PriorityObj_Set: {
+ /*
+ * The value of the object referenced by the ``scheduler_id`` parameter
+ * shall be set to the object identifier of the home scheduler of the
+ * task specified by the ``task_id`` parameter at some point during the
+ * call after the return of the rtems_task_get_priority() call.
+ */
+ T_eq_u32( ctx->priority_obj, PRIO_DEFAULT );
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Post_PriorityObj_Nop: {
+ /*
+ * Objects referenced by the ``scheduler_id`` parameter in past calls to
+ * rtems_task_get_priority() shall not be accessed by the
+ * rtems_task_get_priority() call.
+ */
+ T_eq_u32( ctx->priority_obj, PRIO_INVALID );
+ break;
+ }
+
+ case RtemsTaskReqGetPriority_Post_PriorityObj_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetPriority_Setup(
+ RtemsTaskReqGetPriority_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_scheduler_ident(
+ TEST_SCHEDULER_A_NAME,
+ &ctx->scheduler_a_id
+ );
+ T_rsc_success( sc );
+
+ #if defined(RTEMS_SMP)
+ sc = rtems_scheduler_ident(
+ TEST_SCHEDULER_B_NAME,
+ &ctx->scheduler_b_id
+ );
+ T_rsc_success( sc );
+ #endif
+}
+
+static void RtemsTaskReqGetPriority_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqGetPriority_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqGetPriority_Setup( ctx );
+}
+
+static void RtemsTaskReqGetPriority_Prepare(
+ RtemsTaskReqGetPriority_Context *ctx
+)
+{
+ ctx->priority_obj = PRIO_INVALID;
+}
+
+static void RtemsTaskReqGetPriority_Action(
+ RtemsTaskReqGetPriority_Context *ctx
+)
+{
+ ctx->status = rtems_task_get_priority(
+ ctx->task_id,
+ ctx->scheduler_id,
+ ctx->priority
+ );
+}
+
+static const RtemsTaskReqGetPriority_Entry
+RtemsTaskReqGetPriority_Entries[] = {
+ { 0, 0, 0, 1, 0, RtemsTaskReqGetPriority_Post_Status_InvId,
+ RtemsTaskReqGetPriority_Post_PriorityObj_Nop },
+ { 0, 0, 0, 1, 0, RtemsTaskReqGetPriority_Post_Status_InvAddr,
+ RtemsTaskReqGetPriority_Post_PriorityObj_Nop },
+ { 0, 0, 0, 0, 0, RtemsTaskReqGetPriority_Post_Status_Ok,
+ RtemsTaskReqGetPriority_Post_PriorityObj_Set },
+ { 0, 0, 0, 0, 0, RtemsTaskReqGetPriority_Post_Status_InvAddr,
+ RtemsTaskReqGetPriority_Post_PriorityObj_Nop },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, RtemsTaskReqGetPriority_Post_Status_NotDef,
+ RtemsTaskReqGetPriority_Post_PriorityObj_Nop },
+#else
+ { 1, 0, 0, 0, 0, RtemsTaskReqGetPriority_Post_Status_NA,
+ RtemsTaskReqGetPriority_Post_PriorityObj_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, RtemsTaskReqGetPriority_Post_Status_InvAddr,
+ RtemsTaskReqGetPriority_Post_PriorityObj_Nop }
+#else
+ { 1, 0, 0, 0, 0, RtemsTaskReqGetPriority_Post_Status_NA,
+ RtemsTaskReqGetPriority_Post_PriorityObj_NA }
+#endif
+};
+
+static const uint8_t
+RtemsTaskReqGetPriority_Map[] = {
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 4, 5
+};
+
+static size_t RtemsTaskReqGetPriority_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqGetPriority_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsTaskReqGetPriority_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqGetPriority_Fixture = {
+ .setup = RtemsTaskReqGetPriority_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsTaskReqGetPriority_Scope,
+ .initial_context = &RtemsTaskReqGetPriority_Instance
+};
+
+static inline RtemsTaskReqGetPriority_Entry RtemsTaskReqGetPriority_PopEntry(
+ RtemsTaskReqGetPriority_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqGetPriority_Entries[
+ RtemsTaskReqGetPriority_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqGetPriority_SetPreConditionStates(
+ RtemsTaskReqGetPriority_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+
+ if ( ctx->Map.entry.Pre_Scheduler_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsTaskReqGetPriority_Pre_Scheduler_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+}
+
+static void RtemsTaskReqGetPriority_TestVariant(
+ RtemsTaskReqGetPriority_Context *ctx
+)
+{
+ RtemsTaskReqGetPriority_Pre_TaskId_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqGetPriority_Pre_SchedulerId_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqGetPriority_Pre_Scheduler_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTaskReqGetPriority_Pre_Priority_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTaskReqGetPriority_Action( ctx );
+ RtemsTaskReqGetPriority_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTaskReqGetPriority_Post_PriorityObj_Check(
+ ctx,
+ ctx->Map.entry.Post_PriorityObj
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqGetPriority( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsTaskReqGetPriority,
+ &RtemsTaskReqGetPriority_Fixture
+)
+{
+ RtemsTaskReqGetPriority_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsTaskReqGetPriority_Pre_TaskId_Invalid;
+ ctx->Map.pci[ 0 ] < RtemsTaskReqGetPriority_Pre_TaskId_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsTaskReqGetPriority_Pre_SchedulerId_Invalid;
+ ctx->Map.pci[ 1 ] < RtemsTaskReqGetPriority_Pre_SchedulerId_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsTaskReqGetPriority_Pre_Scheduler_Eligible;
+ ctx->Map.pci[ 2 ] < RtemsTaskReqGetPriority_Pre_Scheduler_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsTaskReqGetPriority_Pre_Priority_Valid;
+ ctx->Map.pci[ 3 ] < RtemsTaskReqGetPriority_Pre_Priority_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqGetPriority_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsTaskReqGetPriority_SetPreConditionStates( ctx );
+ RtemsTaskReqGetPriority_Prepare( ctx );
+ RtemsTaskReqGetPriority_TestVariant( ctx );
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-get-scheduler.c b/testsuites/validation/tc-task-get-scheduler.c
new file mode 100644
index 0000000000..41e0063b53
--- /dev/null
+++ b/testsuites/validation/tc-task-get-scheduler.c
@@ -0,0 +1,419 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqGetScheduler
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqGetScheduler spec:/rtems/task/req/get-scheduler
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqGetScheduler_Pre_Id_Invalid,
+ RtemsTaskReqGetScheduler_Pre_Id_Task,
+ RtemsTaskReqGetScheduler_Pre_Id_NA
+} RtemsTaskReqGetScheduler_Pre_Id;
+
+typedef enum {
+ RtemsTaskReqGetScheduler_Pre_SchedulerID_Valid,
+ RtemsTaskReqGetScheduler_Pre_SchedulerID_Null,
+ RtemsTaskReqGetScheduler_Pre_SchedulerID_NA
+} RtemsTaskReqGetScheduler_Pre_SchedulerID;
+
+typedef enum {
+ RtemsTaskReqGetScheduler_Post_Status_Ok,
+ RtemsTaskReqGetScheduler_Post_Status_InvAddr,
+ RtemsTaskReqGetScheduler_Post_Status_InvId,
+ RtemsTaskReqGetScheduler_Post_Status_NA
+} RtemsTaskReqGetScheduler_Post_Status;
+
+typedef enum {
+ RtemsTaskReqGetScheduler_Post_SchedulerIDObj_Set,
+ RtemsTaskReqGetScheduler_Post_SchedulerIDObj_Nop,
+ RtemsTaskReqGetScheduler_Post_SchedulerIDObj_NA
+} RtemsTaskReqGetScheduler_Post_SchedulerIDObj;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Pre_SchedulerID_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_SchedulerIDObj : 2;
+} RtemsTaskReqGetScheduler_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/get-scheduler test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides the object referenced by the ``scheduler_id``
+ * parameter.
+ */
+ rtems_id scheduler_id_obj;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_task_get_scheduler() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``task_id`` parameter value.
+ */
+ rtems_id id;
+
+ /**
+ * @brief This member specifies if the ``scheduler_id`` parameter value.
+ */
+ rtems_id *scheduler_id;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqGetScheduler_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqGetScheduler_Context;
+
+static RtemsTaskReqGetScheduler_Context
+ RtemsTaskReqGetScheduler_Instance;
+
+static const char * const RtemsTaskReqGetScheduler_PreDesc_Id[] = {
+ "Invalid",
+ "Task",
+ "NA"
+};
+
+static const char * const RtemsTaskReqGetScheduler_PreDesc_SchedulerID[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqGetScheduler_PreDesc[] = {
+ RtemsTaskReqGetScheduler_PreDesc_Id,
+ RtemsTaskReqGetScheduler_PreDesc_SchedulerID,
+ NULL
+};
+
+static void RtemsTaskReqGetScheduler_Pre_Id_Prepare(
+ RtemsTaskReqGetScheduler_Context *ctx,
+ RtemsTaskReqGetScheduler_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetScheduler_Pre_Id_Invalid: {
+ /*
+ * While the ``task_id`` parameter is not associated with a task.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqGetScheduler_Pre_Id_Task: {
+ /*
+ * While the ``task_id`` parameter is associated with a task.
+ */
+ ctx->id = RTEMS_SELF;
+ break;
+ }
+
+ case RtemsTaskReqGetScheduler_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetScheduler_Pre_SchedulerID_Prepare(
+ RtemsTaskReqGetScheduler_Context *ctx,
+ RtemsTaskReqGetScheduler_Pre_SchedulerID state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetScheduler_Pre_SchedulerID_Valid: {
+ /*
+ * While the ``scheduler_id`` parameter references an object of type
+ * rtems_id.
+ */
+ ctx->scheduler_id = &ctx->scheduler_id_obj;
+ break;
+ }
+
+ case RtemsTaskReqGetScheduler_Pre_SchedulerID_Null: {
+ /*
+ * While the ``scheduler_id`` parameter is equal to NULL.
+ */
+ ctx->scheduler_id = NULL;
+ break;
+ }
+
+ case RtemsTaskReqGetScheduler_Pre_SchedulerID_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetScheduler_Post_Status_Check(
+ RtemsTaskReqGetScheduler_Context *ctx,
+ RtemsTaskReqGetScheduler_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetScheduler_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_get_scheduler() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqGetScheduler_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_task_get_scheduler() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTaskReqGetScheduler_Post_Status_InvId: {
+ /*
+ * The return status of rtems_task_get_scheduler() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqGetScheduler_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetScheduler_Post_SchedulerIDObj_Check(
+ RtemsTaskReqGetScheduler_Context *ctx,
+ RtemsTaskReqGetScheduler_Post_SchedulerIDObj state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqGetScheduler_Post_SchedulerIDObj_Set: {
+ /*
+ * The value of the object referenced by the ``scheduler_id`` parameter
+ * shall be set to the object identifier of the home scheduler of the
+ * task specified by the ``task_id`` parameter at some point during the
+ * call after the return of the rtems_task_get_scheduler() call.
+ */
+ T_eq_u32( ctx->scheduler_id_obj, 0x0f010001 );
+ break;
+ }
+
+ case RtemsTaskReqGetScheduler_Post_SchedulerIDObj_Nop: {
+ /*
+ * Objects referenced by the ``scheduler_id`` parameter in past calls to
+ * rtems_task_get_scheduler() shall not be accessed by the
+ * rtems_task_get_scheduler() call.
+ */
+ T_eq_u32( ctx->scheduler_id_obj, INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqGetScheduler_Post_SchedulerIDObj_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqGetScheduler_Prepare(
+ RtemsTaskReqGetScheduler_Context *ctx
+)
+{
+ ctx->scheduler_id_obj = INVALID_ID;
+}
+
+static void RtemsTaskReqGetScheduler_Action(
+ RtemsTaskReqGetScheduler_Context *ctx
+)
+{
+ ctx->status = rtems_task_get_scheduler( ctx->id, ctx->scheduler_id );
+}
+
+static const RtemsTaskReqGetScheduler_Entry
+RtemsTaskReqGetScheduler_Entries[] = {
+ { 0, 0, 0, RtemsTaskReqGetScheduler_Post_Status_InvAddr,
+ RtemsTaskReqGetScheduler_Post_SchedulerIDObj_Nop },
+ { 0, 0, 0, RtemsTaskReqGetScheduler_Post_Status_InvId,
+ RtemsTaskReqGetScheduler_Post_SchedulerIDObj_Nop },
+ { 0, 0, 0, RtemsTaskReqGetScheduler_Post_Status_Ok,
+ RtemsTaskReqGetScheduler_Post_SchedulerIDObj_Set }
+};
+
+static const uint8_t
+RtemsTaskReqGetScheduler_Map[] = {
+ 1, 0, 2, 0
+};
+
+static size_t RtemsTaskReqGetScheduler_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqGetScheduler_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsTaskReqGetScheduler_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqGetScheduler_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsTaskReqGetScheduler_Scope,
+ .initial_context = &RtemsTaskReqGetScheduler_Instance
+};
+
+static inline RtemsTaskReqGetScheduler_Entry RtemsTaskReqGetScheduler_PopEntry(
+ RtemsTaskReqGetScheduler_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqGetScheduler_Entries[
+ RtemsTaskReqGetScheduler_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqGetScheduler_TestVariant(
+ RtemsTaskReqGetScheduler_Context *ctx
+)
+{
+ RtemsTaskReqGetScheduler_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqGetScheduler_Pre_SchedulerID_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqGetScheduler_Action( ctx );
+ RtemsTaskReqGetScheduler_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsTaskReqGetScheduler_Post_SchedulerIDObj_Check(
+ ctx,
+ ctx->Map.entry.Post_SchedulerIDObj
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqGetScheduler( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsTaskReqGetScheduler,
+ &RtemsTaskReqGetScheduler_Fixture
+)
+{
+ RtemsTaskReqGetScheduler_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTaskReqGetScheduler_Pre_Id_Invalid;
+ ctx->Map.pcs[ 0 ] < RtemsTaskReqGetScheduler_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqGetScheduler_Pre_SchedulerID_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsTaskReqGetScheduler_Pre_SchedulerID_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqGetScheduler_PopEntry( ctx );
+ RtemsTaskReqGetScheduler_Prepare( ctx );
+ RtemsTaskReqGetScheduler_TestVariant( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-ident.c b/testsuites/validation/tc-task-ident.c
new file mode 100644
index 0000000000..214e6e99c5
--- /dev/null
+++ b/testsuites/validation/tc-task-ident.c
@@ -0,0 +1,338 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqIdent
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqIdent spec:/rtems/task/req/ident
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqIdent_Pre_Name_WhoAmI,
+ RtemsTaskReqIdent_Pre_Name_NotWhoAmI,
+ RtemsTaskReqIdent_Pre_Name_NA
+} RtemsTaskReqIdent_Pre_Name;
+
+typedef enum {
+ RtemsTaskReqIdent_Post_Status_OkAndWhoAmI,
+ RtemsTaskReqIdent_Post_Status_Skip,
+ RtemsTaskReqIdent_Post_Status_NA
+} RtemsTaskReqIdent_Post_Status;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Name_NA : 1;
+ uint8_t Post_Status : 2;
+} RtemsTaskReqIdent_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/ident test case.
+ */
+typedef struct {
+ rtems_status_code status;
+
+ rtems_id *id;
+
+ rtems_id id_value;
+
+ rtems_id id_local_object;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqIdent_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqIdent_Context;
+
+static RtemsTaskReqIdent_Context
+ RtemsTaskReqIdent_Instance;
+
+static const char * const RtemsTaskReqIdent_PreDesc_Name[] = {
+ "WhoAmI",
+ "NotWhoAmI",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqIdent_PreDesc[] = {
+ RtemsTaskReqIdent_PreDesc_Name,
+ NULL
+};
+
+static rtems_status_code ClassicTaskIdentAction(
+ rtems_name name,
+ uint32_t node,
+ rtems_id *id
+)
+{
+ return rtems_task_ident( name, node, id );
+}
+
+static void RtemsTaskReqIdent_Pre_Name_Prepare(
+ RtemsTaskReqIdent_Context *ctx,
+ RtemsTaskReqIdent_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqIdent_Pre_Name_WhoAmI: {
+ /*
+ * While the ``name`` parameter is equal to RTEMS_WHO_AM_I, while ``id``
+ * parameter is not equal to NULL.
+ */
+ ctx->id_value = 0xffffffff;
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsTaskReqIdent_Pre_Name_NotWhoAmI: {
+ /*
+ * While the ``name`` is not equal to RTEMS_WHO_AM_I or ``id`` parameter
+ * is equal to NULL, the behaviour of rtems_task_ident() shall be
+ * specified by spec:/rtems/req/ident.
+ */
+ ctx->id = NULL;
+ /* Preparation performed by RtemsReqIdent_Run() */
+ break;
+ }
+
+ case RtemsTaskReqIdent_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqIdent_Post_Status_Check(
+ RtemsTaskReqIdent_Context *ctx,
+ RtemsTaskReqIdent_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqIdent_Post_Status_OkAndWhoAmI: {
+ /*
+ * The return status of rtems_task_ident() shall be RTEMS_SUCCESSFUL.
+ * The value of the object identifier referenced by the ``name``
+ * parameter shall be the identifier of the executing thread.
+ */
+ T_rsc( ctx->status, RTEMS_SUCCESSFUL );
+ T_eq_ptr( ctx->id, &ctx->id_value );
+ T_eq_u32( ctx->id_value, rtems_task_self() );
+ break;
+ }
+
+ case RtemsTaskReqIdent_Post_Status_Skip: {
+ /*
+ * There is no status to validate.
+ */
+ /* Checks performed by RtemsReqIdent_Run() */
+ break;
+ }
+
+ case RtemsTaskReqIdent_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqIdent_Setup( RtemsTaskReqIdent_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_task_construct(
+ &DefaultTaskConfig,
+ &ctx->id_local_object
+ );
+ T_assert_rsc_success( sc );
+}
+
+static void RtemsTaskReqIdent_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqIdent_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqIdent_Setup( ctx );
+}
+
+static void RtemsTaskReqIdent_Teardown( RtemsTaskReqIdent_Context *ctx )
+{
+ if ( ctx->id_local_object != 0 ) {
+ rtems_status_code sc;
+
+ sc = rtems_task_delete( ctx->id_local_object );
+ T_rsc_success( sc );
+ }
+}
+
+static void RtemsTaskReqIdent_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqIdent_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqIdent_Teardown( ctx );
+}
+
+static void RtemsTaskReqIdent_Action( RtemsTaskReqIdent_Context *ctx )
+{
+ if ( ctx->id != NULL ) {
+ ctx->status = rtems_task_ident( RTEMS_SELF, 0xdeadbeef, ctx->id );
+ } else {
+ RtemsReqIdent_Run(
+ ctx->id_local_object,
+ DefaultTaskConfig.name,
+ ClassicTaskIdentAction
+ );
+ }
+}
+
+static const RtemsTaskReqIdent_Entry
+RtemsTaskReqIdent_Entries[] = {
+ { 0, 0, RtemsTaskReqIdent_Post_Status_OkAndWhoAmI },
+ { 0, 0, RtemsTaskReqIdent_Post_Status_Skip }
+};
+
+static const uint8_t
+RtemsTaskReqIdent_Map[] = {
+ 0, 1
+};
+
+static size_t RtemsTaskReqIdent_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqIdent_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTaskReqIdent_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqIdent_Fixture = {
+ .setup = RtemsTaskReqIdent_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqIdent_Teardown_Wrap,
+ .scope = RtemsTaskReqIdent_Scope,
+ .initial_context = &RtemsTaskReqIdent_Instance
+};
+
+static inline RtemsTaskReqIdent_Entry RtemsTaskReqIdent_PopEntry(
+ RtemsTaskReqIdent_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqIdent_Entries[
+ RtemsTaskReqIdent_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqIdent_TestVariant( RtemsTaskReqIdent_Context *ctx )
+{
+ RtemsTaskReqIdent_Pre_Name_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqIdent_Action( ctx );
+ RtemsTaskReqIdent_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqIdent( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTaskReqIdent, &RtemsTaskReqIdent_Fixture )
+{
+ RtemsTaskReqIdent_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTaskReqIdent_Pre_Name_WhoAmI;
+ ctx->Map.pcs[ 0 ] < RtemsTaskReqIdent_Pre_Name_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqIdent_PopEntry( ctx );
+ RtemsTaskReqIdent_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-is-suspended.c b/testsuites/validation/tc-task-is-suspended.c
new file mode 100644
index 0000000000..d61c14f560
--- /dev/null
+++ b/testsuites/validation/tc-task-is-suspended.c
@@ -0,0 +1,429 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqIsSuspended
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqIsSuspended spec:/rtems/task/req/is-suspended
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqIsSuspended_Pre_Id_Invalid,
+ RtemsTaskReqIsSuspended_Pre_Id_Task,
+ RtemsTaskReqIsSuspended_Pre_Id_NA
+} RtemsTaskReqIsSuspended_Pre_Id;
+
+typedef enum {
+ RtemsTaskReqIsSuspended_Pre_Suspended_Yes,
+ RtemsTaskReqIsSuspended_Pre_Suspended_No,
+ RtemsTaskReqIsSuspended_Pre_Suspended_NA
+} RtemsTaskReqIsSuspended_Pre_Suspended;
+
+typedef enum {
+ RtemsTaskReqIsSuspended_Post_Status_Ok,
+ RtemsTaskReqIsSuspended_Post_Status_InvId,
+ RtemsTaskReqIsSuspended_Post_Status_AlrdySus,
+ RtemsTaskReqIsSuspended_Post_Status_NA
+} RtemsTaskReqIsSuspended_Post_Status;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Pre_Suspended_NA : 1;
+ uint8_t Post_Status : 2;
+} RtemsTaskReqIsSuspended_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/is-suspended test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the identifier of a task.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief If this member is true, then the worker is suspended before the
+ * rtems_task_is_suspended() call.
+ */
+ bool suspend;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_task_is_suspended() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``id`` parameter value.
+ */
+ rtems_id id;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 2 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqIsSuspended_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqIsSuspended_Context;
+
+static RtemsTaskReqIsSuspended_Context
+ RtemsTaskReqIsSuspended_Instance;
+
+static const char * const RtemsTaskReqIsSuspended_PreDesc_Id[] = {
+ "Invalid",
+ "Task",
+ "NA"
+};
+
+static const char * const RtemsTaskReqIsSuspended_PreDesc_Suspended[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqIsSuspended_PreDesc[] = {
+ RtemsTaskReqIsSuspended_PreDesc_Id,
+ RtemsTaskReqIsSuspended_PreDesc_Suspended,
+ NULL
+};
+
+static void Worker( rtems_task_argument arg )
+{
+ while ( true ) {
+ /* Do nothing */
+ }
+}
+
+static void RtemsTaskReqIsSuspended_Pre_Id_Prepare(
+ RtemsTaskReqIsSuspended_Context *ctx,
+ RtemsTaskReqIsSuspended_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqIsSuspended_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is not associated with a task.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqIsSuspended_Pre_Id_Task: {
+ /*
+ * While the ``id`` parameter is associated with a task.
+ */
+ ctx->id = ctx->worker_id;
+ break;
+ }
+
+ case RtemsTaskReqIsSuspended_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqIsSuspended_Pre_Suspended_Prepare(
+ RtemsTaskReqIsSuspended_Context *ctx,
+ RtemsTaskReqIsSuspended_Pre_Suspended state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqIsSuspended_Pre_Suspended_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is suspended.
+ */
+ ctx->suspend = true;
+ break;
+ }
+
+ case RtemsTaskReqIsSuspended_Pre_Suspended_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not suspended.
+ */
+ ctx->suspend = false;
+ break;
+ }
+
+ case RtemsTaskReqIsSuspended_Pre_Suspended_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqIsSuspended_Post_Status_Check(
+ RtemsTaskReqIsSuspended_Context *ctx,
+ RtemsTaskReqIsSuspended_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqIsSuspended_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_is_suspended() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqIsSuspended_Post_Status_InvId: {
+ /*
+ * The return status of rtems_task_is_suspended() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqIsSuspended_Post_Status_AlrdySus: {
+ /*
+ * The return status of rtems_task_is_suspended() shall be
+ * RTEMS_ALREADY_SUSPENDED.
+ */
+ T_rsc( ctx->status, RTEMS_ALREADY_SUSPENDED );
+ break;
+ }
+
+ case RtemsTaskReqIsSuspended_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqIsSuspended_Setup(
+ RtemsTaskReqIsSuspended_Context *ctx
+)
+{
+ ctx->worker_id = CreateTask( "WORK", PRIO_LOW );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+static void RtemsTaskReqIsSuspended_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqIsSuspended_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqIsSuspended_Setup( ctx );
+}
+
+static void RtemsTaskReqIsSuspended_Teardown(
+ RtemsTaskReqIsSuspended_Context *ctx
+)
+{
+ DeleteTask( ctx->worker_id );
+}
+
+static void RtemsTaskReqIsSuspended_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqIsSuspended_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqIsSuspended_Teardown( ctx );
+}
+
+static void RtemsTaskReqIsSuspended_Action(
+ RtemsTaskReqIsSuspended_Context *ctx
+)
+{
+ if ( ctx->suspend ) {
+ SuspendTask( ctx->worker_id );
+ }
+
+ ctx->status = rtems_task_is_suspended( ctx->id );
+
+ if ( ctx->suspend ) {
+ ResumeTask( ctx->worker_id );
+ }
+}
+
+static const RtemsTaskReqIsSuspended_Entry
+RtemsTaskReqIsSuspended_Entries[] = {
+ { 0, 0, 1, RtemsTaskReqIsSuspended_Post_Status_InvId },
+ { 0, 0, 0, RtemsTaskReqIsSuspended_Post_Status_AlrdySus },
+ { 0, 0, 0, RtemsTaskReqIsSuspended_Post_Status_Ok }
+};
+
+static const uint8_t
+RtemsTaskReqIsSuspended_Map[] = {
+ 0, 0, 1, 2
+};
+
+static size_t RtemsTaskReqIsSuspended_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqIsSuspended_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsTaskReqIsSuspended_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqIsSuspended_Fixture = {
+ .setup = RtemsTaskReqIsSuspended_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqIsSuspended_Teardown_Wrap,
+ .scope = RtemsTaskReqIsSuspended_Scope,
+ .initial_context = &RtemsTaskReqIsSuspended_Instance
+};
+
+static inline RtemsTaskReqIsSuspended_Entry RtemsTaskReqIsSuspended_PopEntry(
+ RtemsTaskReqIsSuspended_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqIsSuspended_Entries[
+ RtemsTaskReqIsSuspended_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqIsSuspended_SetPreConditionStates(
+ RtemsTaskReqIsSuspended_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_Suspended_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqIsSuspended_Pre_Suspended_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+}
+
+static void RtemsTaskReqIsSuspended_TestVariant(
+ RtemsTaskReqIsSuspended_Context *ctx
+)
+{
+ RtemsTaskReqIsSuspended_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqIsSuspended_Pre_Suspended_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqIsSuspended_Action( ctx );
+ RtemsTaskReqIsSuspended_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqIsSuspended( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsTaskReqIsSuspended,
+ &RtemsTaskReqIsSuspended_Fixture
+)
+{
+ RtemsTaskReqIsSuspended_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsTaskReqIsSuspended_Pre_Id_Invalid;
+ ctx->Map.pci[ 0 ] < RtemsTaskReqIsSuspended_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsTaskReqIsSuspended_Pre_Suspended_Yes;
+ ctx->Map.pci[ 1 ] < RtemsTaskReqIsSuspended_Pre_Suspended_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqIsSuspended_PopEntry( ctx );
+ RtemsTaskReqIsSuspended_SetPreConditionStates( ctx );
+ RtemsTaskReqIsSuspended_TestVariant( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-mode.c b/testsuites/validation/tc-task-mode.c
new file mode 100644
index 0000000000..ac045e4176
--- /dev/null
+++ b/testsuites/validation/tc-task-mode.c
@@ -0,0 +1,2019 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqMode
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqMode spec:/rtems/task/req/mode
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationOneCpu0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqMode_Pre_PrevMode_Valid,
+ RtemsTaskReqMode_Pre_PrevMode_Null,
+ RtemsTaskReqMode_Pre_PrevMode_NA
+} RtemsTaskReqMode_Pre_PrevMode;
+
+typedef enum {
+ RtemsTaskReqMode_Pre_PreemptCur_Yes,
+ RtemsTaskReqMode_Pre_PreemptCur_No,
+ RtemsTaskReqMode_Pre_PreemptCur_NA
+} RtemsTaskReqMode_Pre_PreemptCur;
+
+typedef enum {
+ RtemsTaskReqMode_Pre_TimesliceCur_Yes,
+ RtemsTaskReqMode_Pre_TimesliceCur_No,
+ RtemsTaskReqMode_Pre_TimesliceCur_NA
+} RtemsTaskReqMode_Pre_TimesliceCur;
+
+typedef enum {
+ RtemsTaskReqMode_Pre_ASRCur_Yes,
+ RtemsTaskReqMode_Pre_ASRCur_No,
+ RtemsTaskReqMode_Pre_ASRCur_NA
+} RtemsTaskReqMode_Pre_ASRCur;
+
+typedef enum {
+ RtemsTaskReqMode_Pre_IntLvlCur_Zero,
+ RtemsTaskReqMode_Pre_IntLvlCur_Positive,
+ RtemsTaskReqMode_Pre_IntLvlCur_NA
+} RtemsTaskReqMode_Pre_IntLvlCur;
+
+typedef enum {
+ RtemsTaskReqMode_Pre_Preempt_Yes,
+ RtemsTaskReqMode_Pre_Preempt_No,
+ RtemsTaskReqMode_Pre_Preempt_NA
+} RtemsTaskReqMode_Pre_Preempt;
+
+typedef enum {
+ RtemsTaskReqMode_Pre_Timeslice_Yes,
+ RtemsTaskReqMode_Pre_Timeslice_No,
+ RtemsTaskReqMode_Pre_Timeslice_NA
+} RtemsTaskReqMode_Pre_Timeslice;
+
+typedef enum {
+ RtemsTaskReqMode_Pre_ASR_Yes,
+ RtemsTaskReqMode_Pre_ASR_No,
+ RtemsTaskReqMode_Pre_ASR_NA
+} RtemsTaskReqMode_Pre_ASR;
+
+typedef enum {
+ RtemsTaskReqMode_Pre_IntLvl_Zero,
+ RtemsTaskReqMode_Pre_IntLvl_Positive,
+ RtemsTaskReqMode_Pre_IntLvl_NA
+} RtemsTaskReqMode_Pre_IntLvl;
+
+typedef enum {
+ RtemsTaskReqMode_Pre_PreemptMsk_Yes,
+ RtemsTaskReqMode_Pre_PreemptMsk_No,
+ RtemsTaskReqMode_Pre_PreemptMsk_NA
+} RtemsTaskReqMode_Pre_PreemptMsk;
+
+typedef enum {
+ RtemsTaskReqMode_Pre_TimesliceMsk_Yes,
+ RtemsTaskReqMode_Pre_TimesliceMsk_No,
+ RtemsTaskReqMode_Pre_TimesliceMsk_NA
+} RtemsTaskReqMode_Pre_TimesliceMsk;
+
+typedef enum {
+ RtemsTaskReqMode_Pre_ASRMsk_Yes,
+ RtemsTaskReqMode_Pre_ASRMsk_No,
+ RtemsTaskReqMode_Pre_ASRMsk_NA
+} RtemsTaskReqMode_Pre_ASRMsk;
+
+typedef enum {
+ RtemsTaskReqMode_Pre_IntLvlMsk_Yes,
+ RtemsTaskReqMode_Pre_IntLvlMsk_No,
+ RtemsTaskReqMode_Pre_IntLvlMsk_NA
+} RtemsTaskReqMode_Pre_IntLvlMsk;
+
+typedef enum {
+ RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Status_InvAddr,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvl,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvlSMP,
+ RtemsTaskReqMode_Post_Status_NotImplNoPreempt,
+ RtemsTaskReqMode_Post_Status_NA
+} RtemsTaskReqMode_Post_Status;
+
+typedef enum {
+ RtemsTaskReqMode_Post_Preempt_Yes,
+ RtemsTaskReqMode_Post_Preempt_No,
+ RtemsTaskReqMode_Post_Preempt_Maybe,
+ RtemsTaskReqMode_Post_Preempt_NA
+} RtemsTaskReqMode_Post_Preempt;
+
+typedef enum {
+ RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_ASR_Maybe,
+ RtemsTaskReqMode_Post_ASR_NA
+} RtemsTaskReqMode_Post_ASR;
+
+typedef enum {
+ RtemsTaskReqMode_Post_PMVar_Set,
+ RtemsTaskReqMode_Post_PMVar_Nop,
+ RtemsTaskReqMode_Post_PMVar_Maybe,
+ RtemsTaskReqMode_Post_PMVar_NA
+} RtemsTaskReqMode_Post_PMVar;
+
+typedef enum {
+ RtemsTaskReqMode_Post_Mode_Set,
+ RtemsTaskReqMode_Post_Mode_Nop,
+ RtemsTaskReqMode_Post_Mode_Maybe,
+ RtemsTaskReqMode_Post_Mode_NA
+} RtemsTaskReqMode_Post_Mode;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_PrevMode_NA : 1;
+ uint32_t Pre_PreemptCur_NA : 1;
+ uint32_t Pre_TimesliceCur_NA : 1;
+ uint32_t Pre_ASRCur_NA : 1;
+ uint32_t Pre_IntLvlCur_NA : 1;
+ uint32_t Pre_Preempt_NA : 1;
+ uint32_t Pre_Timeslice_NA : 1;
+ uint32_t Pre_ASR_NA : 1;
+ uint32_t Pre_IntLvl_NA : 1;
+ uint32_t Pre_PreemptMsk_NA : 1;
+ uint32_t Pre_TimesliceMsk_NA : 1;
+ uint32_t Pre_ASRMsk_NA : 1;
+ uint32_t Pre_IntLvlMsk_NA : 1;
+ uint32_t Post_Status : 3;
+ uint32_t Post_Preempt : 2;
+ uint32_t Post_ASR : 2;
+ uint32_t Post_PMVar : 2;
+ uint32_t Post_Mode : 2;
+} RtemsTaskReqMode_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/mode test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the object identifier of the worker task.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief null If this member is contains the initial mode of the runner.
+ */
+ rtems_mode runner_mode;
+
+ /**
+ * @brief This member provides a value for the previous mode set.
+ */
+ rtems_mode previous_mode_set_value;
+
+ /**
+ * @brief This member specifies the task mode in which rtems_task_mode() is
+ * called.
+ */
+ rtems_mode current_mode;
+
+ /**
+ * @brief This member counts worker activity.
+ */
+ uint32_t worker_counter;
+
+ /**
+ * @brief This member contains worker counter before the rtems_task_mode()
+ * call.
+ */
+ uint32_t worker_counter_before;
+
+ /**
+ * @brief This member contains worker counter after the rtems_task_mode()
+ * call.
+ */
+ uint32_t worker_counter_after;
+
+ /**
+ * @brief This member counts signal handler activity.
+ */
+ uint32_t signal_counter;
+
+ /**
+ * @brief This member contains signal counter before the rtems_task_mode()
+ * call.
+ */
+ uint32_t signal_counter_before;
+
+ /**
+ * @brief This member contains signal counter after the rtems_task_mode()
+ * call.
+ */
+ uint32_t signal_counter_after;
+
+ /**
+ * @brief This member specifies the ``mode_set`` parameter for
+ * rtems_task_mode().
+ */
+ rtems_mode mode_set;
+
+ /**
+ * @brief This member specifies the mode mask ``mask`` parameter for
+ * rtems_task_mode() for the action.
+ */
+ rtems_mode mode_mask;
+
+ /**
+ * @brief This member specifies the previous mode set ``previous_mode_set``
+ * parameter for rtems_task_mode().
+ */
+ rtems_mode *previous_mode_set;
+
+ /**
+ * @brief This member contains the return status of the rtems_task_mode()
+ * call.
+ */
+ rtems_status_code status;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 13 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqMode_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqMode_Context;
+
+static RtemsTaskReqMode_Context
+ RtemsTaskReqMode_Instance;
+
+static const char * const RtemsTaskReqMode_PreDesc_PrevMode[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsTaskReqMode_PreDesc_PreemptCur[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqMode_PreDesc_TimesliceCur[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqMode_PreDesc_ASRCur[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqMode_PreDesc_IntLvlCur[] = {
+ "Zero",
+ "Positive",
+ "NA"
+};
+
+static const char * const RtemsTaskReqMode_PreDesc_Preempt[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqMode_PreDesc_Timeslice[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqMode_PreDesc_ASR[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqMode_PreDesc_IntLvl[] = {
+ "Zero",
+ "Positive",
+ "NA"
+};
+
+static const char * const RtemsTaskReqMode_PreDesc_PreemptMsk[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqMode_PreDesc_TimesliceMsk[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqMode_PreDesc_ASRMsk[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqMode_PreDesc_IntLvlMsk[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqMode_PreDesc[] = {
+ RtemsTaskReqMode_PreDesc_PrevMode,
+ RtemsTaskReqMode_PreDesc_PreemptCur,
+ RtemsTaskReqMode_PreDesc_TimesliceCur,
+ RtemsTaskReqMode_PreDesc_ASRCur,
+ RtemsTaskReqMode_PreDesc_IntLvlCur,
+ RtemsTaskReqMode_PreDesc_Preempt,
+ RtemsTaskReqMode_PreDesc_Timeslice,
+ RtemsTaskReqMode_PreDesc_ASR,
+ RtemsTaskReqMode_PreDesc_IntLvl,
+ RtemsTaskReqMode_PreDesc_PreemptMsk,
+ RtemsTaskReqMode_PreDesc_TimesliceMsk,
+ RtemsTaskReqMode_PreDesc_ASRMsk,
+ RtemsTaskReqMode_PreDesc_IntLvlMsk,
+ NULL
+};
+
+#define INVALID_MODE 0xffffffff
+
+#define EVENT_MAKE_READY RTEMS_EVENT_0
+
+#define EVENT_TIMESLICE RTEMS_EVENT_1
+
+typedef RtemsTaskReqMode_Context Context;
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ rtems_event_set events;
+
+ events = ReceiveAnyEvents();
+
+ if ( ( events & EVENT_TIMESLICE ) != 0 ) {
+ SetSelfPriority( PRIO_NORMAL );
+ SetSelfPriority( PRIO_HIGH );
+ }
+
+ ++ctx->worker_counter;
+ }
+}
+
+static void SignalHandler( rtems_signal_set signal_set )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ ++ctx->signal_counter;
+ T_eq_u32( signal_set, 0xdeadbeef );
+}
+
+static void ExhaustTimeslice( void )
+{
+ uint32_t ticks;
+
+ for (
+ ticks = 0;
+ ticks < rtems_configuration_get_ticks_per_timeslice();
+ ++ticks
+ ) {
+ ClockTick();
+ }
+}
+
+static void CheckMode(
+ Context *ctx,
+ rtems_mode mode,
+ rtems_mode mask,
+ rtems_mode set
+)
+{
+ rtems_status_code sc;
+ uint32_t counter;
+
+ mode &= ~mask;
+ mode |= set & mask;
+
+ counter = ctx->worker_counter;
+ SendEvents( ctx->worker_id, EVENT_MAKE_READY );
+
+ if ( ( mode & RTEMS_PREEMPT_MASK ) == RTEMS_PREEMPT ) {
+ T_eq_u32( ctx->worker_counter, counter + 1 );
+ } else {
+ T_eq_u32( ctx->worker_counter, counter );
+ }
+
+ counter = ctx->worker_counter;
+ SendEvents( ctx->worker_id, EVENT_TIMESLICE );
+ ExhaustTimeslice();
+
+ if ( ( mode & RTEMS_PREEMPT_MASK ) == RTEMS_PREEMPT ) {
+ if ( ( mode & RTEMS_TIMESLICE_MASK ) == RTEMS_TIMESLICE ) {
+ T_eq_u32( ctx->worker_counter, counter + 1 );
+ } else {
+ T_eq_u32( ctx->worker_counter, counter );
+ }
+ } else {
+ T_eq_u32( ctx->worker_counter, counter );
+ }
+
+ counter = ctx->signal_counter;
+ sc = rtems_signal_send( RTEMS_SELF, 0xdeadbeef );
+ T_rsc_success( sc );
+
+ if ( ( mode & RTEMS_ASR_MASK ) == RTEMS_ASR ) {
+ T_eq_u32( ctx->signal_counter, counter + 1 );
+ } else {
+ T_eq_u32( ctx->signal_counter, counter );
+ }
+
+ T_eq_u32( mode & RTEMS_INTERRUPT_MASK, _ISR_Get_level() );
+}
+
+static void RtemsTaskReqMode_Pre_PrevMode_Prepare(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Pre_PrevMode state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Pre_PrevMode_Valid: {
+ /*
+ * While the ``previous_mode_set`` parameter references an object of type
+ * rtems_mode.
+ */
+ ctx->previous_mode_set = &ctx->previous_mode_set_value;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_PrevMode_Null: {
+ /*
+ * While the ``previous_mode_set`` parameter is NULL.
+ */
+ ctx->previous_mode_set = NULL;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_PrevMode_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Pre_PreemptCur_Prepare(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Pre_PreemptCur state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Pre_PreemptCur_Yes: {
+ /*
+ * While the calling task has preemption enabled.
+ */
+ ctx->current_mode |= RTEMS_PREEMPT;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_PreemptCur_No: {
+ /*
+ * Where the scheduler does not support the no-preempt mode, while the
+ * calling task has preemption enabled.
+ *
+ * Where the scheduler does support the no-preempt mode, while the
+ * calling task has preemption disabled.
+ */
+ if ( rtems_configuration_get_maximum_processors() > 1 ) {
+ ctx->current_mode |= RTEMS_PREEMPT;
+ } else {
+ ctx->current_mode |= RTEMS_NO_PREEMPT;
+ }
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_PreemptCur_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Pre_TimesliceCur_Prepare(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Pre_TimesliceCur state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Pre_TimesliceCur_Yes: {
+ /*
+ * While the calling task has timeslicing enabled.
+ */
+ ctx->current_mode |= RTEMS_TIMESLICE;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_TimesliceCur_No: {
+ /*
+ * While the calling task has timeslicing disabled.
+ */
+ ctx->current_mode |= RTEMS_NO_TIMESLICE;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_TimesliceCur_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Pre_ASRCur_Prepare(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Pre_ASRCur state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Pre_ASRCur_Yes: {
+ /*
+ * While the calling task has ASR processing enabled.
+ */
+ ctx->current_mode |= RTEMS_ASR;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_ASRCur_No: {
+ /*
+ * While the calling task has ASR processing disabled.
+ */
+ ctx->current_mode |= RTEMS_NO_ASR;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_ASRCur_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Pre_IntLvlCur_Prepare(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Pre_IntLvlCur state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Pre_IntLvlCur_Zero: {
+ /*
+ * While the calling task executes with an interrupt level of zero.
+ */
+ ctx->current_mode |= RTEMS_INTERRUPT_LEVEL( 0 );
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_IntLvlCur_Positive: {
+ /*
+ * Where the system needs inter-processor interrupts, while the calling
+ * task executes with an interrupt level of zero.
+ *
+ * Where the system does not need inter-processor interrupts, while the
+ * calling task executes with an an interrupt level greater than zero and
+ * less than or equal to CPU_MODES_INTERRUPT_MASK.
+ */
+ if ( rtems_configuration_get_maximum_processors() > 1 ) {
+ ctx->current_mode |= RTEMS_INTERRUPT_LEVEL( 0 );
+ } else {
+ ctx->current_mode |= RTEMS_INTERRUPT_LEVEL( 1 );
+ }
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_IntLvlCur_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Pre_Preempt_Prepare(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Pre_Preempt state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Pre_Preempt_Yes: {
+ /*
+ * While the ``mode_set`` parameter specifies that preemption is enabled.
+ */
+ ctx->mode_set |= RTEMS_PREEMPT;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_Preempt_No: {
+ /*
+ * While the ``mode_set`` parameter specifies that preemption is
+ * disabled.
+ */
+ ctx->mode_set |= RTEMS_NO_PREEMPT;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_Preempt_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Pre_Timeslice_Prepare(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Pre_Timeslice state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Pre_Timeslice_Yes: {
+ /*
+ * While the ``mode_set`` parameter specifies that timeslicing is
+ * enabled.
+ */
+ ctx->mode_set |= RTEMS_TIMESLICE;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_Timeslice_No: {
+ /*
+ * While the ``mode_set`` parameter specifies that timeslicing is
+ * disabled.
+ */
+ ctx->mode_set |= RTEMS_NO_TIMESLICE;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_Timeslice_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Pre_ASR_Prepare(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Pre_ASR state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Pre_ASR_Yes: {
+ /*
+ * While the ``mode_set`` parameter specifies that ASR processing is
+ * enabled.
+ */
+ ctx->mode_set |= RTEMS_ASR;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_ASR_No: {
+ /*
+ * While the ``mode_set`` parameter specifies that ASR processing is
+ * disabled.
+ */
+ ctx->mode_set |= RTEMS_NO_ASR;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_ASR_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Pre_IntLvl_Prepare(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Pre_IntLvl state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Pre_IntLvl_Zero: {
+ /*
+ * While the ``mode_set`` parameter specifies an interrupt level of zero.
+ */
+ ctx->mode_set |= RTEMS_INTERRUPT_LEVEL( 0 );
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_IntLvl_Positive: {
+ /*
+ * While the ``mode_set`` parameter specifies an interrupt level greater
+ * than zero and less than or equal to CPU_MODES_INTERRUPT_MASK.
+ */
+ ctx->mode_set |= RTEMS_INTERRUPT_LEVEL( 1 );
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_IntLvl_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Pre_PreemptMsk_Prepare(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Pre_PreemptMsk state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Pre_PreemptMsk_Yes: {
+ /*
+ * While the ``mask`` parameter specifies that the preemption mode shall
+ * be set.
+ */
+ ctx->mode_mask |= RTEMS_PREEMPT_MASK;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_PreemptMsk_No: {
+ /*
+ * While the ``mask`` parameter specifies that the preemption mode shall
+ * not be set.
+ */
+ /* This is the default mode mask */
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_PreemptMsk_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Pre_TimesliceMsk_Prepare(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Pre_TimesliceMsk state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Pre_TimesliceMsk_Yes: {
+ /*
+ * While the ``mask`` parameter specifies that the timeslicing mode shall
+ * be set.
+ */
+ ctx->mode_mask |= RTEMS_TIMESLICE_MASK;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_TimesliceMsk_No: {
+ /*
+ * While the ``mask`` parameter specifies that the timeslicing mode shall
+ * not be set.
+ */
+ /* This is the default mode mask */
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_TimesliceMsk_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Pre_ASRMsk_Prepare(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Pre_ASRMsk state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Pre_ASRMsk_Yes: {
+ /*
+ * While the ``mask`` parameter specifies that the ASR processing mode
+ * shall be set.
+ */
+ ctx->mode_mask |= RTEMS_ASR_MASK;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_ASRMsk_No: {
+ /*
+ * While the ``mask`` parameter specifies that the ASR processing mode
+ * shall not be set.
+ */
+ /* This is the default mode mask */
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_ASRMsk_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Pre_IntLvlMsk_Prepare(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Pre_IntLvlMsk state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Pre_IntLvlMsk_Yes: {
+ /*
+ * While the ``mask`` parameter specifies that the interrupt level shall
+ * be set.
+ */
+ ctx->mode_mask |= RTEMS_INTERRUPT_MASK;
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_IntLvlMsk_No: {
+ /*
+ * While the ``mask`` parameter specifies that the interrupt level shall
+ * not be set.
+ */
+ /* This is the default mode mask */
+ break;
+ }
+
+ case RtemsTaskReqMode_Pre_IntLvlMsk_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Post_Status_Check(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_mode() shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_task_mode() shall be RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_Status_NotImplIntLvl: {
+ /*
+ * The return status of rtems_task_mode() shall be RTEMS_NOT_IMPLEMENTED.
+ */
+ T_rsc( ctx->status, RTEMS_NOT_IMPLEMENTED );
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_Status_NotImplIntLvlSMP: {
+ /*
+ * Where the system needs inter-processor interrupts, the return status
+ * of rtems_task_mode() shall be RTEMS_NOT_IMPLEMENTED.
+ *
+ * Where the system does not need inter-processor interrupts, the return
+ * status of rtems_task_mode() shall be RTEMS_SUCCESSFUL.
+ */
+ if ( rtems_configuration_get_maximum_processors() > 1 ) {
+ T_rsc( ctx->status, RTEMS_NOT_IMPLEMENTED );
+ } else {
+ T_rsc_success( ctx->status );
+ }
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_Status_NotImplNoPreempt: {
+ /*
+ * Where the scheduler does not support the no-preempt mode, the return
+ * status of rtems_task_mode() shall be RTEMS_NOT_IMPLEMENTED.
+ *
+ * Where the scheduler does support the no-preempt mode, the return
+ * status of rtems_task_mode() shall be RTEMS_SUCCESSFUL.
+ */
+ if ( rtems_configuration_get_maximum_processors() > 1 ) {
+ T_rsc( ctx->status, RTEMS_NOT_IMPLEMENTED );
+ } else {
+ T_rsc_success( ctx->status );
+ }
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Post_Preempt_Check(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Post_Preempt state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Post_Preempt_Yes: {
+ /*
+ * The calling task shall be preempted by a higher priority ready task
+ * during the rtems_task_mode() call.
+ */
+ T_eq_u32( ctx->worker_counter_after, ctx->worker_counter_before + 1 );
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_Preempt_No: {
+ /*
+ * The calling task shall not be preempted during the rtems_task_mode()
+ * call.
+ */
+ T_eq_u32( ctx->worker_counter_after, ctx->worker_counter_before );
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_Preempt_Maybe: {
+ /*
+ * Where the scheduler does not support the no-preempt mode, the calling
+ * task shall not be preempted during the rtems_task_mode() call.
+ *
+ * Where the scheduler does support the no-preempt mode, the calling task
+ * shall be preempted by a higher priority ready task during the
+ * rtems_task_mode() call.
+ */
+ if ( rtems_configuration_get_maximum_processors() > 1 ) {
+ T_eq_u32( ctx->worker_counter_after, ctx->worker_counter_before );
+ } else {
+ T_eq_u32( ctx->worker_counter_after, ctx->worker_counter_before + 1 );
+ }
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_Preempt_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Post_ASR_Check(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Post_ASR state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Post_ASR_Yes: {
+ /*
+ * The calling task shall process pending signals during the
+ * rtems_task_mode() call.
+ */
+ T_eq_u32( ctx->signal_counter_after, ctx->signal_counter_before + 1 );
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_ASR_No: {
+ /*
+ * The calling task shall not process signals during the
+ * rtems_task_mode() call.
+ */
+ T_eq_u32( ctx->signal_counter_after, ctx->signal_counter_before );
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_ASR_Maybe: {
+ /*
+ * Where the scheduler does not support the no-preempt mode, the calling
+ * task shall not process signals during the rtems_task_mode() call.
+ *
+ * Where the scheduler does support the no-preempt mode, the calling task
+ * shall process pending signals during the rtems_task_mode() call.
+ */
+ if ( rtems_configuration_get_maximum_processors() > 1 ) {
+ T_eq_u32( ctx->signal_counter_after, ctx->signal_counter_before );
+ } else {
+ T_eq_u32( ctx->signal_counter_after, ctx->signal_counter_before + 1 );
+ }
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_ASR_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Post_PMVar_Check(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Post_PMVar state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Post_PMVar_Set: {
+ /*
+ * The value of the object referenced by the ``previous_mode_set``
+ * parameter shall be set to the task modes of the calling task on entry
+ * of the call to rtems_task_mode().
+ */
+ T_eq_ptr( ctx->previous_mode_set, &ctx->previous_mode_set_value );
+ T_eq_u32( ctx->previous_mode_set_value, ctx->current_mode );
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_PMVar_Nop: {
+ /*
+ * Objects referenced by the ``stack_size`` parameter in past calls to
+ * rtems_task_mode() shall not be accessed by the rtems_task_mode() call.
+ */
+ T_eq_u32( ctx->previous_mode_set_value, INVALID_MODE );
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_PMVar_Maybe: {
+ /*
+ * Where the scheduler does not support the no-preempt mode, objects
+ * referenced by the ``stack_size`` parameter in past calls to
+ * rtems_task_mode() shall not be accessed by the rtems_task_mode() call.
+ *
+ * Where the scheduler does support the no-preempt mode, the value of the
+ * object referenced by the ``previous_mode_set`` parameter shall be set
+ * to the task modes of the calling task on entry of the call to
+ * rtems_task_mode().
+ */
+ T_eq_ptr( ctx->previous_mode_set, &ctx->previous_mode_set_value );
+
+ if ( rtems_configuration_get_maximum_processors() > 1 ) {
+ T_eq_u32( ctx->previous_mode_set_value, INVALID_MODE );
+ } else {
+ T_eq_u32( ctx->previous_mode_set_value, ctx->current_mode );
+ }
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_PMVar_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Post_Mode_Check(
+ RtemsTaskReqMode_Context *ctx,
+ RtemsTaskReqMode_Post_Mode state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqMode_Post_Mode_Set: {
+ /*
+ * The task modes of the calling task indicated by the ``mask`` parameter
+ * shall be set to the corrsponding modes specified by the ``mode_set``
+ * parameter.
+ */
+ CheckMode( ctx, ctx->current_mode, ctx->mode_mask, ctx->mode_set );
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_Mode_Nop: {
+ /*
+ * The task modes of the calling task shall not be modified by the
+ * rtems_task_mode() call.
+ */
+ CheckMode( ctx, ctx->current_mode, 0, 0 );
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_Mode_Maybe: {
+ /*
+ * Where the scheduler does not support the no-preempt mode, the task
+ * modes of the calling task shall not be modified by the
+ * rtems_task_mode() call.
+ *
+ * Where the scheduler does support the no-preempt mode, the task modes
+ * of the calling task indicated by the ``mask`` parameter shall be set
+ * to the corrsponding modes specified by the ``mode_set`` parameter.
+ */
+ if ( rtems_configuration_get_maximum_processors() > 1 ) {
+ CheckMode( ctx, ctx->current_mode, 0, 0 );
+ } else {
+ CheckMode( ctx, ctx->current_mode, ctx->mode_mask, ctx->mode_set );
+ }
+ break;
+ }
+
+ case RtemsTaskReqMode_Post_Mode_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqMode_Setup( RtemsTaskReqMode_Context *ctx )
+{
+ rtems_status_code sc;
+
+ memset( ctx, 0, sizeof( *ctx ) );
+
+ sc = rtems_task_mode(
+ RTEMS_DEFAULT_MODES,
+ RTEMS_CURRENT_MODE,
+ &ctx->runner_mode
+ );
+ T_rsc_success( sc );
+
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+static void RtemsTaskReqMode_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqMode_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqMode_Setup( ctx );
+}
+
+static void RtemsTaskReqMode_Teardown( RtemsTaskReqMode_Context *ctx )
+{
+ DeleteTask( ctx->worker_id );
+ RestoreRunnerMode();
+ RestoreRunnerPriority();
+}
+
+static void RtemsTaskReqMode_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqMode_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqMode_Teardown( ctx );
+}
+
+static void RtemsTaskReqMode_Prepare( RtemsTaskReqMode_Context *ctx )
+{
+ ctx->current_mode = RTEMS_DEFAULT_MODES;
+ ctx->mode_set = RTEMS_DEFAULT_MODES;
+ ctx->mode_mask = RTEMS_CURRENT_MODE;
+ ctx->previous_mode_set_value = INVALID_MODE;
+}
+
+static void RtemsTaskReqMode_Action( RtemsTaskReqMode_Context *ctx )
+{
+ rtems_status_code sc;
+ rtems_mode mode;
+
+ sc = rtems_task_mode( ctx->current_mode, RTEMS_ALL_MODE_MASKS, &mode );
+ T_rsc_success( sc );
+
+ SendEvents( ctx->worker_id, EVENT_MAKE_READY );
+
+ sc = rtems_signal_catch( SignalHandler, ctx->current_mode | RTEMS_NO_ASR );
+ T_rsc_success( sc );
+
+ sc = rtems_signal_send( RTEMS_SELF, 0xdeadbeef );
+ T_rsc_success( sc );
+
+ ctx->worker_counter_before = ctx->worker_counter;
+ ctx->signal_counter_before = ctx->signal_counter;
+ ctx->status = rtems_task_mode(
+ ctx->mode_set,
+ ctx->mode_mask,
+ ctx->previous_mode_set
+ );
+ ctx->worker_counter_after = ctx->worker_counter;
+ ctx->signal_counter_after = ctx->signal_counter;
+}
+
+static void RtemsTaskReqMode_Cleanup( RtemsTaskReqMode_Context *ctx )
+{
+ rtems_status_code sc;
+ rtems_mode mode;
+
+ sc = rtems_task_mode( RTEMS_DEFAULT_MODES, RTEMS_ALL_MODE_MASKS, &mode );
+ T_rsc_success( sc );
+
+ sc = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+ T_rsc_success( sc );
+
+ sc = rtems_signal_catch( NULL, RTEMS_DEFAULT_MODES );
+ T_rsc_success( sc );
+}
+
+static const RtemsTaskReqMode_Entry
+RtemsTaskReqMode_Entries[] = {
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_InvAddr, RtemsTaskReqMode_Post_Preempt_No,
+ RtemsTaskReqMode_Post_ASR_No, RtemsTaskReqMode_Post_PMVar_Nop,
+ RtemsTaskReqMode_Post_Mode_Nop },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_NA,
+ RtemsTaskReqMode_Post_Preempt_NA, RtemsTaskReqMode_Post_ASR_NA,
+ RtemsTaskReqMode_Post_PMVar_NA, RtemsTaskReqMode_Post_Mode_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_InvAddr, RtemsTaskReqMode_Post_Preempt_No,
+ RtemsTaskReqMode_Post_ASR_No, RtemsTaskReqMode_Post_PMVar_Nop,
+ RtemsTaskReqMode_Post_Mode_Nop },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_NA,
+ RtemsTaskReqMode_Post_Preempt_NA, RtemsTaskReqMode_Post_ASR_NA,
+ RtemsTaskReqMode_Post_PMVar_NA, RtemsTaskReqMode_Post_Mode_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_NA,
+ RtemsTaskReqMode_Post_Preempt_NA, RtemsTaskReqMode_Post_ASR_NA,
+ RtemsTaskReqMode_Post_PMVar_NA, RtemsTaskReqMode_Post_Mode_NA },
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplNoPreempt,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplNoPreempt,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvl,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Nop, RtemsTaskReqMode_Post_Mode_Nop },
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvlSMP,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_NA,
+ RtemsTaskReqMode_Post_Preempt_NA, RtemsTaskReqMode_Post_ASR_NA,
+ RtemsTaskReqMode_Post_PMVar_NA, RtemsTaskReqMode_Post_Mode_NA },
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvlSMP,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_Maybe, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_Yes, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_NA,
+ RtemsTaskReqMode_Post_Preempt_NA, RtemsTaskReqMode_Post_ASR_NA,
+ RtemsTaskReqMode_Post_PMVar_NA, RtemsTaskReqMode_Post_Mode_NA },
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_Maybe, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_Yes, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_NA,
+ RtemsTaskReqMode_Post_Preempt_NA, RtemsTaskReqMode_Post_ASR_NA,
+ RtemsTaskReqMode_Post_PMVar_NA, RtemsTaskReqMode_Post_Mode_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvl,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Nop, RtemsTaskReqMode_Post_Mode_Nop },
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplNoPreempt,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_NA,
+ RtemsTaskReqMode_Post_Preempt_NA, RtemsTaskReqMode_Post_ASR_NA,
+ RtemsTaskReqMode_Post_PMVar_NA, RtemsTaskReqMode_Post_Mode_NA },
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplNoPreempt,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_Maybe,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvl,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Nop, RtemsTaskReqMode_Post_Mode_Nop },
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvlSMP,
+ RtemsTaskReqMode_Post_Preempt_Maybe, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_Yes, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_NA,
+ RtemsTaskReqMode_Post_Preempt_NA, RtemsTaskReqMode_Post_ASR_NA,
+ RtemsTaskReqMode_Post_PMVar_NA, RtemsTaskReqMode_Post_Mode_NA },
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvlSMP,
+ RtemsTaskReqMode_Post_Preempt_Maybe, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_Yes, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplNoPreempt,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_Maybe,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvl,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Nop, RtemsTaskReqMode_Post_Mode_Nop },
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvlSMP,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_Maybe,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_NA,
+ RtemsTaskReqMode_Post_Preempt_NA, RtemsTaskReqMode_Post_ASR_NA,
+ RtemsTaskReqMode_Post_PMVar_NA, RtemsTaskReqMode_Post_Mode_NA },
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvlSMP,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_Maybe,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_Maybe, RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_Yes, RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_NA,
+ RtemsTaskReqMode_Post_Preempt_NA, RtemsTaskReqMode_Post_ASR_NA,
+ RtemsTaskReqMode_Post_PMVar_NA, RtemsTaskReqMode_Post_Mode_NA },
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_Maybe, RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_Yes, RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvl,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Nop, RtemsTaskReqMode_Post_Mode_Nop },
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplNoPreempt,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_Maybe,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvl,
+ RtemsTaskReqMode_Post_Preempt_No, RtemsTaskReqMode_Post_ASR_No,
+ RtemsTaskReqMode_Post_PMVar_Nop, RtemsTaskReqMode_Post_Mode_Nop },
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvlSMP,
+ RtemsTaskReqMode_Post_Preempt_Maybe, RtemsTaskReqMode_Post_ASR_Maybe,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_Yes, RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set },
+#endif
+#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_NA,
+ RtemsTaskReqMode_Post_Preempt_NA, RtemsTaskReqMode_Post_ASR_NA,
+ RtemsTaskReqMode_Post_PMVar_NA, RtemsTaskReqMode_Post_Mode_NA }
+#elif defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqMode_Post_Status_NotImplIntLvlSMP,
+ RtemsTaskReqMode_Post_Preempt_Maybe, RtemsTaskReqMode_Post_ASR_Maybe,
+ RtemsTaskReqMode_Post_PMVar_Maybe, RtemsTaskReqMode_Post_Mode_Maybe }
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqMode_Post_Status_Ok,
+ RtemsTaskReqMode_Post_Preempt_Yes, RtemsTaskReqMode_Post_ASR_Yes,
+ RtemsTaskReqMode_Post_PMVar_Set, RtemsTaskReqMode_Post_Mode_Set }
+#endif
+};
+
+static const uint8_t
+RtemsTaskReqMode_Map[] = {
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2,
+ 6, 2, 6, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 6, 2,
+ 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 5, 5,
+ 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2,
+ 6, 2, 6, 2, 6, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12,
+ 5, 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2,
+ 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6, 2, 5, 5, 5, 5,
+ 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2,
+ 6, 2, 6, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 7, 3, 7, 3,
+ 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3,
+ 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
+ 7, 3, 7, 3, 7, 3, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4,
+ 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3,
+ 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 4, 4, 4, 4, 4, 4,
+ 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3,
+ 10, 10, 2, 2, 10, 10, 2, 2, 10, 10, 2, 2, 10, 10, 2, 2, 17, 10, 6, 2, 17, 10,
+ 6, 2, 17, 10, 6, 2, 17, 10, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 10, 10, 2, 2, 10, 10,
+ 2, 2, 10, 10, 2, 2, 10, 10, 2, 2, 17, 10, 6, 2, 17, 10, 6, 2, 17, 10, 6, 2,
+ 17, 10, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 6, 2, 6,
+ 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 16, 16, 5, 5, 16, 16, 5, 5, 10, 10, 2, 2,
+ 10, 10, 2, 2, 21, 16, 12, 5, 21, 16, 12, 5, 17, 10, 6, 2, 17, 10, 6, 2, 5, 5,
+ 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2,
+ 6, 2, 6, 2, 6, 2, 16, 16, 5, 5, 16, 16, 5, 5, 10, 10, 2, 2, 10, 10, 2, 2, 21,
+ 16, 12, 5, 21, 16, 12, 5, 17, 10, 6, 2, 17, 10, 6, 2, 5, 5, 5, 5, 5, 5, 5, 5,
+ 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6, 2,
+ 11, 11, 3, 3, 11, 11, 3, 3, 11, 11, 3, 3, 11, 11, 3, 3, 18, 11, 7, 3, 18, 11,
+ 7, 3, 18, 11, 7, 3, 18, 11, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 11, 11, 3, 3, 11, 11,
+ 3, 3, 11, 11, 3, 3, 11, 11, 3, 3, 18, 11, 7, 3, 18, 11, 7, 3, 18, 11, 7, 3,
+ 18, 11, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 7, 3, 7,
+ 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 13, 13, 4, 4, 13, 13, 4, 4, 11, 11, 3, 3,
+ 11, 11, 3, 3, 13, 13, 4, 4, 13, 13, 4, 4, 18, 11, 7, 3, 18, 11, 7, 3, 4, 4,
+ 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3,
+ 7, 3, 7, 3, 13, 13, 4, 4, 13, 13, 4, 4, 11, 11, 3, 3, 11, 11, 3, 3, 13, 13,
+ 4, 4, 13, 13, 4, 4, 18, 11, 7, 3, 18, 11, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3,
+ 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2,
+ 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 6, 2, 6, 2, 6, 2,
+ 6, 2, 6, 2, 6, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2,
+ 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 5, 5, 5, 5, 5, 5,
+ 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2, 6, 2,
+ 6, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5, 12, 5,
+ 12, 5, 6, 2, 6, 2, 6, 2, 6, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2,
+ 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6, 2, 5, 5, 5, 5, 5, 5, 5,
+ 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6,
+ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7,
+ 3, 7, 3, 7, 3, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 7,
+ 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 4,
+ 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7,
+ 3, 7, 3, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
+ 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3,
+ 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3,
+ 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 10, 10,
+ 2, 2, 10, 10, 2, 2, 10, 10, 2, 2, 10, 10, 2, 2, 17, 10, 6, 2, 17, 10, 6, 2,
+ 17, 10, 6, 2, 17, 10, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 10, 10, 2, 2, 10, 10, 2, 2,
+ 10, 10, 2, 2, 10, 10, 2, 2, 17, 10, 6, 2, 17, 10, 6, 2, 17, 10, 6, 2, 17, 10,
+ 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 6, 2, 6, 2, 6, 2,
+ 6, 2, 6, 2, 6, 2, 6, 2, 16, 16, 5, 5, 16, 16, 5, 5, 10, 10, 2, 2, 10, 10, 2,
+ 2, 21, 16, 12, 5, 21, 16, 12, 5, 17, 10, 6, 2, 17, 10, 6, 2, 5, 5, 5, 5, 5,
+ 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2, 6,
+ 2, 6, 2, 16, 16, 5, 5, 16, 16, 5, 5, 10, 10, 2, 2, 10, 10, 2, 2, 21, 16, 12,
+ 5, 21, 16, 12, 5, 17, 10, 6, 2, 17, 10, 6, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2,
+ 2, 2, 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6, 2, 11, 11,
+ 3, 3, 11, 11, 3, 3, 11, 11, 3, 3, 11, 11, 3, 3, 18, 11, 7, 3, 18, 11, 7, 3,
+ 18, 11, 7, 3, 18, 11, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 11, 11, 3, 3, 11, 11, 3, 3,
+ 11, 11, 3, 3, 11, 11, 3, 3, 18, 11, 7, 3, 18, 11, 7, 3, 18, 11, 7, 3, 18, 11,
+ 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 7, 3, 7, 3, 7, 3,
+ 7, 3, 7, 3, 7, 3, 7, 3, 13, 13, 4, 4, 13, 13, 4, 4, 11, 11, 3, 3, 11, 11, 3,
+ 3, 13, 13, 4, 4, 13, 13, 4, 4, 18, 11, 7, 3, 18, 11, 7, 3, 4, 4, 4, 4, 4, 4,
+ 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3,
+ 13, 13, 4, 4, 13, 13, 4, 4, 11, 11, 3, 3, 11, 11, 3, 3, 13, 13, 4, 4, 13, 13,
+ 4, 4, 18, 11, 7, 3, 18, 11, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3,
+ 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 8, 8, 8, 8, 8, 8, 8, 8,
+ 2, 2, 2, 2, 2, 2, 2, 2, 14, 8, 14, 8, 14, 8, 14, 8, 6, 2, 6, 2, 6, 2, 6, 2,
+ 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 14, 8, 14, 8, 14, 8, 14, 8,
+ 6, 2, 6, 2, 6, 2, 6, 2, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 14,
+ 8, 14, 8, 14, 8, 14, 8, 6, 2, 6, 2, 6, 2, 6, 2, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2,
+ 2, 2, 2, 2, 2, 2, 14, 8, 14, 8, 14, 8, 14, 8, 6, 2, 6, 2, 6, 2, 6, 2, 5, 5,
+ 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2,
+ 6, 2, 6, 2, 6, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12,
+ 5, 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2,
+ 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6, 2, 5, 5, 5, 5,
+ 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2,
+ 6, 2, 6, 2, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 15, 9, 15, 9, 15,
+ 9, 15, 9, 7, 3, 7, 3, 7, 3, 7, 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3,
+ 3, 3, 15, 9, 15, 9, 15, 9, 15, 9, 7, 3, 7, 3, 7, 3, 7, 3, 9, 9, 9, 9, 9, 9,
+ 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 15, 9, 15, 9, 15, 9, 15, 9, 7, 3, 7, 3, 7, 3,
+ 7, 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 15, 9, 15, 9, 15, 9,
+ 15, 9, 7, 3, 7, 3, 7, 3, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3,
+ 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3,
+ 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 4, 4, 4,
+ 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7,
+ 3, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4,
+ 4, 7, 3, 7, 3, 7, 3, 7, 3, 19, 19, 8, 8, 19, 19, 8, 8, 10, 10, 2, 2, 10, 10,
+ 2, 2, 22, 19, 14, 8, 22, 19, 14, 8, 17, 10, 6, 2, 17, 10, 6, 2, 8, 8, 8, 8,
+ 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 14, 8, 14, 8, 14, 8, 14, 8, 6, 2, 6, 2,
+ 6, 2, 6, 2, 19, 19, 8, 8, 19, 19, 8, 8, 10, 10, 2, 2, 10, 10, 2, 2, 22, 19,
+ 14, 8, 22, 19, 14, 8, 17, 10, 6, 2, 17, 10, 6, 2, 8, 8, 8, 8, 8, 8, 8, 8, 2,
+ 2, 2, 2, 2, 2, 2, 2, 14, 8, 14, 8, 14, 8, 14, 8, 6, 2, 6, 2, 6, 2, 6, 2, 16,
+ 16, 5, 5, 16, 16, 5, 5, 10, 10, 2, 2, 10, 10, 2, 2, 21, 16, 12, 5, 21, 16,
+ 12, 5, 17, 10, 6, 2, 17, 10, 6, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2,
+ 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6, 2, 16, 16, 5, 5, 16,
+ 16, 5, 5, 10, 10, 2, 2, 10, 10, 2, 2, 21, 16, 12, 5, 21, 16, 12, 5, 17, 10,
+ 6, 2, 17, 10, 6, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5,
+ 12, 5, 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6, 2, 20, 20, 9, 9, 20, 20, 9, 9, 11,
+ 11, 3, 3, 11, 11, 3, 3, 23, 20, 15, 9, 23, 20, 15, 9, 18, 11, 7, 3, 18, 11,
+ 7, 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 15, 9, 15, 9, 15, 9,
+ 15, 9, 7, 3, 7, 3, 7, 3, 7, 3, 20, 20, 9, 9, 20, 20, 9, 9, 11, 11, 3, 3, 11,
+ 11, 3, 3, 23, 20, 15, 9, 23, 20, 15, 9, 18, 11, 7, 3, 18, 11, 7, 3, 9, 9, 9,
+ 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 15, 9, 15, 9, 15, 9, 15, 9, 7, 3, 7,
+ 3, 7, 3, 7, 3, 13, 13, 4, 4, 13, 13, 4, 4, 11, 11, 3, 3, 11, 11, 3, 3, 13,
+ 13, 4, 4, 13, 13, 4, 4, 18, 11, 7, 3, 18, 11, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4,
+ 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 13,
+ 13, 4, 4, 13, 13, 4, 4, 11, 11, 3, 3, 11, 11, 3, 3, 13, 13, 4, 4, 13, 13, 4,
+ 4, 18, 11, 7, 3, 18, 11, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3,
+ 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 8, 8, 8, 8, 8, 8, 8, 8, 2,
+ 2, 2, 2, 2, 2, 2, 2, 14, 8, 14, 8, 14, 8, 14, 8, 6, 2, 6, 2, 6, 2, 6, 2, 8,
+ 8, 8, 8, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 14, 8, 14, 8, 14, 8, 14, 8, 6,
+ 2, 6, 2, 6, 2, 6, 2, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 14, 8,
+ 14, 8, 14, 8, 14, 8, 6, 2, 6, 2, 6, 2, 6, 2, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 2,
+ 2, 2, 2, 2, 2, 14, 8, 14, 8, 14, 8, 14, 8, 6, 2, 6, 2, 6, 2, 6, 2, 5, 5, 5,
+ 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6,
+ 2, 6, 2, 6, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5,
+ 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2,
+ 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6, 2, 5, 5, 5, 5, 5,
+ 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2, 6,
+ 2, 6, 2, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 15, 9, 15, 9, 15, 9,
+ 15, 9, 7, 3, 7, 3, 7, 3, 7, 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3,
+ 3, 15, 9, 15, 9, 15, 9, 15, 9, 7, 3, 7, 3, 7, 3, 7, 3, 9, 9, 9, 9, 9, 9, 9,
+ 9, 3, 3, 3, 3, 3, 3, 3, 3, 15, 9, 15, 9, 15, 9, 15, 9, 7, 3, 7, 3, 7, 3, 7,
+ 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 15, 9, 15, 9, 15, 9, 15,
+ 9, 7, 3, 7, 3, 7, 3, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4,
+ 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3,
+ 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 4, 4, 4, 4, 4,
+ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7,
+ 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7,
+ 3, 7, 3, 7, 3, 7, 3, 19, 19, 8, 8, 19, 19, 8, 8, 10, 10, 2, 2, 10, 10, 2, 2,
+ 22, 19, 14, 8, 22, 19, 14, 8, 17, 10, 6, 2, 17, 10, 6, 2, 8, 8, 8, 8, 8, 8,
+ 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 14, 8, 14, 8, 14, 8, 14, 8, 6, 2, 6, 2, 6, 2,
+ 6, 2, 19, 19, 8, 8, 19, 19, 8, 8, 10, 10, 2, 2, 10, 10, 2, 2, 22, 19, 14, 8,
+ 22, 19, 14, 8, 17, 10, 6, 2, 17, 10, 6, 2, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 2,
+ 2, 2, 2, 2, 2, 14, 8, 14, 8, 14, 8, 14, 8, 6, 2, 6, 2, 6, 2, 6, 2, 16, 16, 5,
+ 5, 16, 16, 5, 5, 10, 10, 2, 2, 10, 10, 2, 2, 21, 16, 12, 5, 21, 16, 12, 5,
+ 17, 10, 6, 2, 17, 10, 6, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2,
+ 12, 5, 12, 5, 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6, 2, 16, 16, 5, 5, 16, 16, 5,
+ 5, 10, 10, 2, 2, 10, 10, 2, 2, 21, 16, 12, 5, 21, 16, 12, 5, 17, 10, 6, 2,
+ 17, 10, 6, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 12, 5, 12, 5,
+ 12, 5, 12, 5, 6, 2, 6, 2, 6, 2, 6, 2, 20, 20, 9, 9, 20, 20, 9, 9, 11, 11, 3,
+ 3, 11, 11, 3, 3, 23, 20, 15, 9, 23, 20, 15, 9, 18, 11, 7, 3, 18, 11, 7, 3, 9,
+ 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 15, 9, 15, 9, 15, 9, 15, 9, 7,
+ 3, 7, 3, 7, 3, 7, 3, 20, 20, 9, 9, 20, 20, 9, 9, 11, 11, 3, 3, 11, 11, 3, 3,
+ 23, 20, 15, 9, 23, 20, 15, 9, 18, 11, 7, 3, 18, 11, 7, 3, 9, 9, 9, 9, 9, 9,
+ 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, 15, 9, 15, 9, 15, 9, 15, 9, 7, 3, 7, 3, 7, 3,
+ 7, 3, 13, 13, 4, 4, 13, 13, 4, 4, 11, 11, 3, 3, 11, 11, 3, 3, 13, 13, 4, 4,
+ 13, 13, 4, 4, 18, 11, 7, 3, 18, 11, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3,
+ 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 13, 13, 4, 4, 13,
+ 13, 4, 4, 11, 11, 3, 3, 11, 11, 3, 3, 13, 13, 4, 4, 13, 13, 4, 4, 18, 11, 7,
+ 3, 18, 11, 7, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4,
+ 4, 4, 4, 4, 7, 3, 7, 3, 7, 3, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+};
+
+static size_t RtemsTaskReqMode_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqMode_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTaskReqMode_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqMode_Fixture = {
+ .setup = RtemsTaskReqMode_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqMode_Teardown_Wrap,
+ .scope = RtemsTaskReqMode_Scope,
+ .initial_context = &RtemsTaskReqMode_Instance
+};
+
+static inline RtemsTaskReqMode_Entry RtemsTaskReqMode_PopEntry(
+ RtemsTaskReqMode_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqMode_Entries[
+ RtemsTaskReqMode_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqMode_TestVariant( RtemsTaskReqMode_Context *ctx )
+{
+ RtemsTaskReqMode_Pre_PrevMode_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqMode_Pre_PreemptCur_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqMode_Pre_TimesliceCur_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTaskReqMode_Pre_ASRCur_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTaskReqMode_Pre_IntLvlCur_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsTaskReqMode_Pre_Preempt_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsTaskReqMode_Pre_Timeslice_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsTaskReqMode_Pre_ASR_Prepare( ctx, ctx->Map.pcs[ 7 ] );
+ RtemsTaskReqMode_Pre_IntLvl_Prepare( ctx, ctx->Map.pcs[ 8 ] );
+ RtemsTaskReqMode_Pre_PreemptMsk_Prepare( ctx, ctx->Map.pcs[ 9 ] );
+ RtemsTaskReqMode_Pre_TimesliceMsk_Prepare( ctx, ctx->Map.pcs[ 10 ] );
+ RtemsTaskReqMode_Pre_ASRMsk_Prepare( ctx, ctx->Map.pcs[ 11 ] );
+ RtemsTaskReqMode_Pre_IntLvlMsk_Prepare( ctx, ctx->Map.pcs[ 12 ] );
+ RtemsTaskReqMode_Action( ctx );
+ RtemsTaskReqMode_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTaskReqMode_Post_Preempt_Check( ctx, ctx->Map.entry.Post_Preempt );
+ RtemsTaskReqMode_Post_ASR_Check( ctx, ctx->Map.entry.Post_ASR );
+ RtemsTaskReqMode_Post_PMVar_Check( ctx, ctx->Map.entry.Post_PMVar );
+ RtemsTaskReqMode_Post_Mode_Check( ctx, ctx->Map.entry.Post_Mode );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqMode( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTaskReqMode, &RtemsTaskReqMode_Fixture )
+{
+ RtemsTaskReqMode_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTaskReqMode_Pre_PrevMode_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsTaskReqMode_Pre_PrevMode_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqMode_Pre_PreemptCur_Yes;
+ ctx->Map.pcs[ 1 ] < RtemsTaskReqMode_Pre_PreemptCur_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsTaskReqMode_Pre_TimesliceCur_Yes;
+ ctx->Map.pcs[ 2 ] < RtemsTaskReqMode_Pre_TimesliceCur_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsTaskReqMode_Pre_ASRCur_Yes;
+ ctx->Map.pcs[ 3 ] < RtemsTaskReqMode_Pre_ASRCur_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsTaskReqMode_Pre_IntLvlCur_Zero;
+ ctx->Map.pcs[ 4 ] < RtemsTaskReqMode_Pre_IntLvlCur_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = RtemsTaskReqMode_Pre_Preempt_Yes;
+ ctx->Map.pcs[ 5 ] < RtemsTaskReqMode_Pre_Preempt_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 6 ] = RtemsTaskReqMode_Pre_Timeslice_Yes;
+ ctx->Map.pcs[ 6 ] < RtemsTaskReqMode_Pre_Timeslice_NA;
+ ++ctx->Map.pcs[ 6 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 7 ] = RtemsTaskReqMode_Pre_ASR_Yes;
+ ctx->Map.pcs[ 7 ] < RtemsTaskReqMode_Pre_ASR_NA;
+ ++ctx->Map.pcs[ 7 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 8 ] = RtemsTaskReqMode_Pre_IntLvl_Zero;
+ ctx->Map.pcs[ 8 ] < RtemsTaskReqMode_Pre_IntLvl_NA;
+ ++ctx->Map.pcs[ 8 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 9 ] = RtemsTaskReqMode_Pre_PreemptMsk_Yes;
+ ctx->Map.pcs[ 9 ] < RtemsTaskReqMode_Pre_PreemptMsk_NA;
+ ++ctx->Map.pcs[ 9 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 10 ] = RtemsTaskReqMode_Pre_TimesliceMsk_Yes;
+ ctx->Map.pcs[ 10 ] < RtemsTaskReqMode_Pre_TimesliceMsk_NA;
+ ++ctx->Map.pcs[ 10 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 11 ] = RtemsTaskReqMode_Pre_ASRMsk_Yes;
+ ctx->Map.pcs[ 11 ] < RtemsTaskReqMode_Pre_ASRMsk_NA;
+ ++ctx->Map.pcs[ 11 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 12 ] = RtemsTaskReqMode_Pre_IntLvlMsk_Yes;
+ ctx->Map.pcs[ 12 ] < RtemsTaskReqMode_Pre_IntLvlMsk_NA;
+ ++ctx->Map.pcs[ 12 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqMode_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsTaskReqMode_Prepare( ctx );
+ RtemsTaskReqMode_TestVariant( ctx );
+ RtemsTaskReqMode_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-performance.c b/testsuites/validation/tc-task-performance.c
new file mode 100644
index 0000000000..3fac8f4f4e
--- /dev/null
+++ b/testsuites/validation/tc-task-performance.c
@@ -0,0 +1,1152 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskValPerf
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskValPerf spec:/rtems/task/val/perf
+ *
+ * @ingroup TestsuitesPerformanceNoClock0
+ *
+ * @brief This test case provides a context to run @ref RTEMSAPIClassicTasks
+ * performance tests.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/rtems/task/val/perf test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides a worker identifier.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member provides a second worker identifier.
+ */
+ rtems_id worker_2_id;
+
+ /**
+ * @brief This member provides a status code.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member references the measure runtime context.
+ */
+ T_measure_runtime_context *context;
+
+ /**
+ * @brief This member provides the measure runtime request.
+ */
+ T_measure_runtime_request request;
+
+ /**
+ * @brief This member provides an optional measurement begin time point.
+ */
+ T_ticks begin;
+
+ /**
+ * @brief This member provides an optional measurement end time point.
+ */
+ T_ticks end;
+} RtemsTaskValPerf_Context;
+
+static RtemsTaskValPerf_Context
+ RtemsTaskValPerf_Instance;
+
+#define EVENT_RESTART RTEMS_EVENT_0
+
+#define EVENT_SET_END RTEMS_EVENT_1
+
+#define EVENT_BUSY RTEMS_EVENT_2
+
+typedef RtemsTaskValPerf_Context Context;
+
+RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT ) static char task_storage[
+ RTEMS_TASK_STORAGE_SIZE(
+ TEST_MAXIMUM_TLS_SIZE + TEST_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_ATTRIBUTES
+ )
+];
+
+static const rtems_task_config config = {
+ .name = OBJECT_NAME,
+ .initial_priority = PRIO_NORMAL,
+ .storage_area = task_storage,
+ .storage_size = sizeof( task_storage ),
+ .maximum_thread_local_storage_size = 0,
+ .initial_modes = RTEMS_DEFAULT_MODES,
+ .attributes = RTEMS_DEFAULT_ATTRIBUTES
+};
+
+static void Send( const Context *ctx, rtems_event_set events )
+{
+ SendEvents( ctx->worker_id, events );
+}
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+ ctx->end = T_tick();
+
+ while ( true ) {
+ rtems_event_set events;
+ T_ticks ticks;
+
+ events = ReceiveAnyEvents();
+ ticks = T_tick();
+
+ if ( ( events & EVENT_RESTART ) != 0 ) {
+ ctx->begin = T_tick();
+ (void) rtems_task_restart( RTEMS_SELF, (rtems_task_argument) ctx );
+ }
+
+ if ( ( events & EVENT_SET_END ) != 0 ) {
+ ctx->end = ticks;
+ }
+
+ if ( ( events & EVENT_BUSY ) != 0 ) {
+ (void) _CPU_Thread_Idle_body( 0 );
+ }
+ }
+}
+
+static void RtemsTaskValPerf_Setup_Context( RtemsTaskValPerf_Context *ctx )
+{
+ T_measure_runtime_config config;
+
+ memset( &config, 0, sizeof( config ) );
+ config.sample_count = 100;
+ ctx->request.arg = ctx;
+ ctx->request.flags = T_MEASURE_RUNTIME_REPORT_SAMPLES;
+ ctx->context = T_measure_runtime_create( &config );
+ T_assert_not_null( ctx->context );
+}
+
+/**
+ * @brief Set the runner priority.
+ */
+static void RtemsTaskValPerf_Setup( RtemsTaskValPerf_Context *ctx )
+{
+ SetSelfPriority( PRIO_NORMAL );
+}
+
+static void RtemsTaskValPerf_Setup_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskValPerf_Setup_Context( ctx );
+ RtemsTaskValPerf_Setup( ctx );
+}
+
+/**
+ * @brief Restore the runner priority.
+ */
+static void RtemsTaskValPerf_Teardown( RtemsTaskValPerf_Context *ctx )
+{
+ RestoreRunnerPriority();
+}
+
+static void RtemsTaskValPerf_Teardown_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskValPerf_Teardown( ctx );
+}
+
+static T_fixture RtemsTaskValPerf_Fixture = {
+ .setup = RtemsTaskValPerf_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskValPerf_Teardown_Wrap,
+ .scope = NULL,
+ .initial_context = &RtemsTaskValPerf_Instance
+};
+
+/**
+ * @defgroup RtemsTaskReqPerfConstruct spec:/rtems/task/req/perf-construct
+ *
+ * @{
+ */
+
+/**
+ * @brief Construct a worker task.
+ */
+static void RtemsTaskReqPerfConstruct_Body( RtemsTaskValPerf_Context *ctx )
+{
+ ctx->status = rtems_task_construct( &config, &ctx->worker_id );
+}
+
+static void RtemsTaskReqPerfConstruct_Body_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskReqPerfConstruct_Body( ctx );
+}
+
+/**
+ * @brief Delete the worker. Discard samples interrupted by a clock tick.
+ */
+static bool RtemsTaskReqPerfConstruct_Teardown(
+ RtemsTaskValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ DeleteTask( ctx->worker_id );
+ KillZombies();
+
+ return tic == toc;
+}
+
+static bool RtemsTaskReqPerfConstruct_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsTaskReqPerfConstruct_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsTaskReqPerfRestart spec:/rtems/task/req/perf-restart
+ *
+ * @{
+ */
+
+/**
+ * @brief Create and start a worker task.
+ */
+static void RtemsTaskReqPerfRestart_Prepare( RtemsTaskValPerf_Context *ctx )
+{
+ ctx->worker_id = CreateTask( "WORK", PRIO_LOW );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+/**
+ * @brief Restart the worker task.
+ */
+static void RtemsTaskReqPerfRestart_Body( RtemsTaskValPerf_Context *ctx )
+{
+ ctx->status = rtems_task_restart(
+ ctx->worker_id,
+ (rtems_task_argument) ctx
+ );
+}
+
+static void RtemsTaskReqPerfRestart_Body_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskReqPerfRestart_Body( ctx );
+}
+
+/**
+ * @brief Discard samples interrupted by a clock tick.
+ */
+static bool RtemsTaskReqPerfRestart_Teardown(
+ RtemsTaskValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ return tic == toc;
+}
+
+static bool RtemsTaskReqPerfRestart_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsTaskReqPerfRestart_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/**
+ * @brief Delete the worker task.
+ */
+static void RtemsTaskReqPerfRestart_Cleanup( RtemsTaskValPerf_Context *ctx )
+{
+ DeleteTask( ctx->worker_id );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsTaskReqPerfRestartPreempt \
+ * spec:/rtems/task/req/perf-restart-preempt
+ *
+ * @{
+ */
+
+/**
+ * @brief Create and start a worker task.
+ */
+static void RtemsTaskReqPerfRestartPreempt_Prepare(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+/**
+ * @brief Restart the worker task.
+ */
+static void RtemsTaskReqPerfRestartPreempt_Body(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ ctx->begin = T_tick();
+ ctx->status = rtems_task_restart(
+ ctx->worker_id,
+ (rtems_task_argument) ctx
+ );
+}
+
+static void RtemsTaskReqPerfRestartPreempt_Body_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskReqPerfRestartPreempt_Body( ctx );
+}
+
+/**
+ * @brief Set the measured runtime. Discard samples interrupted by a clock
+ * tick.
+ */
+static bool RtemsTaskReqPerfRestartPreempt_Teardown(
+ RtemsTaskValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ *delta = ctx->end - ctx->begin;
+
+ return tic == toc;
+}
+
+static bool RtemsTaskReqPerfRestartPreempt_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsTaskReqPerfRestartPreempt_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/**
+ * @brief Delete the worker task.
+ */
+static void RtemsTaskReqPerfRestartPreempt_Cleanup(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ DeleteTask( ctx->worker_id );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsTaskReqPerfRestartSelf spec:/rtems/task/req/perf-restart-self
+ *
+ * @{
+ */
+
+/**
+ * @brief Create and start a worker task.
+ */
+static void RtemsTaskReqPerfRestartSelf_Prepare(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+/**
+ * @brief Restart the worker task.
+ */
+static void RtemsTaskReqPerfRestartSelf_Body( RtemsTaskValPerf_Context *ctx )
+{
+ Send( ctx, EVENT_RESTART );
+}
+
+static void RtemsTaskReqPerfRestartSelf_Body_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskReqPerfRestartSelf_Body( ctx );
+}
+
+/**
+ * @brief Set the measured runtime. Discard samples interrupted by a clock
+ * tick.
+ */
+static bool RtemsTaskReqPerfRestartSelf_Teardown(
+ RtemsTaskValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ *delta = ctx->end - ctx->begin;
+
+ return tic == toc;
+}
+
+static bool RtemsTaskReqPerfRestartSelf_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsTaskReqPerfRestartSelf_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/**
+ * @brief Delete the worker task.
+ */
+static void RtemsTaskReqPerfRestartSelf_Cleanup(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ DeleteTask( ctx->worker_id );
+}
+
+/** @} */
+
+#if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsTaskReqPerfSetSchedulerMove \
+ * spec:/rtems/task/req/perf-set-scheduler-move
+ *
+ * @{
+ */
+
+/**
+ * @brief Set the runner affinity.
+ */
+static void RtemsTaskReqPerfSetSchedulerMove_Prepare(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ SetSelfAffinityAll();
+}
+
+/**
+ * @brief Set the scheduler of the runner.
+ */
+static void RtemsTaskReqPerfSetSchedulerMove_Body(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ ctx->status = rtems_task_set_scheduler(
+ RTEMS_SELF,
+ SCHEDULER_B_ID,
+ PRIO_NORMAL
+ );
+}
+
+static void RtemsTaskReqPerfSetSchedulerMove_Body_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskReqPerfSetSchedulerMove_Body( ctx );
+}
+
+/**
+ * @brief Discard samples interrupted by a clock tick.
+ */
+static bool RtemsTaskReqPerfSetSchedulerMove_Teardown(
+ RtemsTaskValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_NORMAL );
+
+ return tic == toc;
+}
+
+static bool RtemsTaskReqPerfSetSchedulerMove_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsTaskReqPerfSetSchedulerMove_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/**
+ * @brief Restore the runner affinity.
+ */
+static void RtemsTaskReqPerfSetSchedulerMove_Cleanup(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ SetSelfAffinityOne( 0 );
+}
+
+/** @} */
+#endif
+
+/**
+ * @defgroup RtemsTaskReqPerfSetSchedulerNop \
+ * spec:/rtems/task/req/perf-set-scheduler-nop
+ *
+ * @{
+ */
+
+/**
+ * @brief Set the scheduler of the runner.
+ */
+static void RtemsTaskReqPerfSetSchedulerNop_Body(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ ctx->status = rtems_task_set_scheduler(
+ RTEMS_SELF,
+ SCHEDULER_A_ID,
+ PRIO_NORMAL
+ );
+}
+
+static void RtemsTaskReqPerfSetSchedulerNop_Body_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskReqPerfSetSchedulerNop_Body( ctx );
+}
+
+/**
+ * @brief Discard samples interrupted by a clock tick.
+ */
+static bool RtemsTaskReqPerfSetSchedulerNop_Teardown(
+ RtemsTaskValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ return tic == toc;
+}
+
+static bool RtemsTaskReqPerfSetSchedulerNop_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsTaskReqPerfSetSchedulerNop_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/** @} */
+
+#if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsTaskReqPerfSetSchedulerOther \
+ * spec:/rtems/task/req/perf-set-scheduler-other
+ *
+ * @{
+ */
+
+/**
+ * @brief Create and start a worker task for scheduler B.
+ */
+static void RtemsTaskReqPerfSetSchedulerOther_Prepare(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ ctx->worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ SetScheduler( ctx->worker_id, SCHEDULER_B_ID, PRIO_NORMAL );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+/**
+ * @brief Move the worker to scheduler A.
+ */
+static void RtemsTaskReqPerfSetSchedulerOther_Body(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ ctx->status = rtems_task_set_scheduler(
+ ctx->worker_id,
+ SCHEDULER_A_ID,
+ PRIO_LOW
+ );
+}
+
+static void RtemsTaskReqPerfSetSchedulerOther_Body_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskReqPerfSetSchedulerOther_Body( ctx );
+}
+
+/**
+ * @brief Move the worker back to scheduler B. Discard samples interrupted by
+ * a clock tick.
+ */
+static bool RtemsTaskReqPerfSetSchedulerOther_Teardown(
+ RtemsTaskValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ SetScheduler( ctx->worker_id, SCHEDULER_B_ID, PRIO_NORMAL );
+
+ return tic == toc;
+}
+
+static bool RtemsTaskReqPerfSetSchedulerOther_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsTaskReqPerfSetSchedulerOther_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/**
+ * @brief Delete the worker task.
+ */
+static void RtemsTaskReqPerfSetSchedulerOther_Cleanup(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ DeleteTask( ctx->worker_id );
+}
+
+/** @} */
+#endif
+
+#if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsTaskReqPerfSetSchedulerPreempt \
+ * spec:/rtems/task/req/perf-set-scheduler-preempt
+ *
+ * @{
+ */
+
+/**
+ * @brief Create and start two worker tasks for scheduler B. Make the second
+ * worker busy.
+ */
+static void RtemsTaskReqPerfSetSchedulerPreempt_Prepare(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ ctx->worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ SetScheduler( ctx->worker_id, SCHEDULER_B_ID, PRIO_NORMAL );
+ StartTask( ctx->worker_id, Worker, ctx );
+ Send( ctx, EVENT_SET_END );
+ WaitForNextTask( 1, ctx->worker_id );
+
+ ctx->worker_2_id = CreateTask( "WRK2", PRIO_NORMAL );
+ SetScheduler( ctx->worker_2_id, SCHEDULER_B_ID, PRIO_HIGH );
+ StartTask( ctx->worker_2_id, Worker, ctx );
+ SendEvents( ctx->worker_2_id, EVENT_BUSY );
+ SuspendTask( ctx->worker_2_id );
+}
+
+/**
+ * @brief Move the worker to scheduler B. Make the worker ready to set the end
+ * time.
+ */
+static void RtemsTaskReqPerfSetSchedulerPreempt_Setup(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ ResumeTask( ctx->worker_2_id );
+ SetScheduler( ctx->worker_id, SCHEDULER_B_ID, PRIO_NORMAL );
+ Send( ctx, EVENT_SET_END );
+}
+
+static void RtemsTaskReqPerfSetSchedulerPreempt_Setup_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskReqPerfSetSchedulerPreempt_Setup( ctx );
+}
+
+/**
+ * @brief Move the worker to scheduler A.
+ */
+static void RtemsTaskReqPerfSetSchedulerPreempt_Body(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ ctx->begin = T_tick();
+ ctx->status = rtems_task_set_scheduler(
+ ctx->worker_id,
+ SCHEDULER_A_ID,
+ PRIO_HIGH
+ );
+}
+
+static void RtemsTaskReqPerfSetSchedulerPreempt_Body_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskReqPerfSetSchedulerPreempt_Body( ctx );
+}
+
+/**
+ * @brief Set the measured runtime. Discard samples interrupted by a clock
+ * tick.
+ */
+static bool RtemsTaskReqPerfSetSchedulerPreempt_Teardown(
+ RtemsTaskValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ *delta = ctx->end - ctx->begin;
+ SuspendTask( ctx->worker_2_id );
+
+ return tic == toc;
+}
+
+static bool RtemsTaskReqPerfSetSchedulerPreempt_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsTaskReqPerfSetSchedulerPreempt_Teardown(
+ ctx,
+ delta,
+ tic,
+ toc,
+ retry
+ );
+}
+
+/**
+ * @brief Delete the worker tasks.
+ */
+static void RtemsTaskReqPerfSetSchedulerPreempt_Cleanup(
+ RtemsTaskValPerf_Context *ctx
+)
+{
+ ResumeTask( ctx->worker_2_id );
+ DeleteTask( ctx->worker_2_id );
+ DeleteTask( ctx->worker_id );
+}
+
+/** @} */
+#endif
+
+/**
+ * @defgroup RtemsTaskReqPerfStart spec:/rtems/task/req/perf-start
+ *
+ * @{
+ */
+
+/**
+ * @brief Create a worker task.
+ */
+static void RtemsTaskReqPerfStart_Setup( RtemsTaskValPerf_Context *ctx )
+{
+ ctx->worker_id = CreateTask( "WORK", PRIO_LOW );
+}
+
+static void RtemsTaskReqPerfStart_Setup_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskReqPerfStart_Setup( ctx );
+}
+
+/**
+ * @brief Start the worker task.
+ */
+static void RtemsTaskReqPerfStart_Body( RtemsTaskValPerf_Context *ctx )
+{
+ ctx->status = rtems_task_start(
+ ctx->worker_id,
+ Worker,
+ (rtems_task_argument) ctx
+ );
+}
+
+static void RtemsTaskReqPerfStart_Body_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskReqPerfStart_Body( ctx );
+}
+
+/**
+ * @brief Delete the worker. Discard samples interrupted by a clock tick.
+ */
+static bool RtemsTaskReqPerfStart_Teardown(
+ RtemsTaskValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ DeleteTask( ctx->worker_id );
+
+ return tic == toc;
+}
+
+static bool RtemsTaskReqPerfStart_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsTaskReqPerfStart_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+/**
+ * @defgroup RtemsTaskReqPerfStartPreempt \
+ * spec:/rtems/task/req/perf-start-preempt
+ *
+ * @{
+ */
+
+/**
+ * @brief Create a worker task.
+ */
+static void RtemsTaskReqPerfStartPreempt_Setup( RtemsTaskValPerf_Context *ctx )
+{
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+}
+
+static void RtemsTaskReqPerfStartPreempt_Setup_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskReqPerfStartPreempt_Setup( ctx );
+}
+
+/**
+ * @brief Start the worker task.
+ */
+static void RtemsTaskReqPerfStartPreempt_Body( RtemsTaskValPerf_Context *ctx )
+{
+ ctx->begin = T_tick();
+ ctx->status = rtems_task_start(
+ ctx->worker_id,
+ Worker,
+ (rtems_task_argument) ctx
+ );
+}
+
+static void RtemsTaskReqPerfStartPreempt_Body_Wrap( void *arg )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ RtemsTaskReqPerfStartPreempt_Body( ctx );
+}
+
+/**
+ * @brief Set the measured runtime. Delete the worker. Discard samples
+ * interrupted by a clock tick.
+ */
+static bool RtemsTaskReqPerfStartPreempt_Teardown(
+ RtemsTaskValPerf_Context *ctx,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ T_quiet_rsc_success( ctx->status );
+
+ *delta = ctx->end - ctx->begin;
+ DeleteTask( ctx->worker_id );
+
+ return tic == toc;
+}
+
+static bool RtemsTaskReqPerfStartPreempt_Teardown_Wrap(
+ void *arg,
+ T_ticks *delta,
+ uint32_t tic,
+ uint32_t toc,
+ unsigned int retry
+)
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = arg;
+ return RtemsTaskReqPerfStartPreempt_Teardown( ctx, delta, tic, toc, retry );
+}
+
+/** @} */
+
+/**
+ * @fn void T_case_body_RtemsTaskValPerf( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTaskValPerf, &RtemsTaskValPerf_Fixture )
+{
+ RtemsTaskValPerf_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ctx->request.name = "RtemsTaskReqPerfConstruct";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsTaskReqPerfConstruct_Body_Wrap;
+ ctx->request.teardown = RtemsTaskReqPerfConstruct_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ RtemsTaskReqPerfRestart_Prepare( ctx );
+ ctx->request.name = "RtemsTaskReqPerfRestart";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsTaskReqPerfRestart_Body_Wrap;
+ ctx->request.teardown = RtemsTaskReqPerfRestart_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsTaskReqPerfRestart_Cleanup( ctx );
+
+ RtemsTaskReqPerfRestartPreempt_Prepare( ctx );
+ ctx->request.name = "RtemsTaskReqPerfRestartPreempt";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsTaskReqPerfRestartPreempt_Body_Wrap;
+ ctx->request.teardown = RtemsTaskReqPerfRestartPreempt_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsTaskReqPerfRestartPreempt_Cleanup( ctx );
+
+ RtemsTaskReqPerfRestartSelf_Prepare( ctx );
+ ctx->request.name = "RtemsTaskReqPerfRestartSelf";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsTaskReqPerfRestartSelf_Body_Wrap;
+ ctx->request.teardown = RtemsTaskReqPerfRestartSelf_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsTaskReqPerfRestartSelf_Cleanup( ctx );
+
+ #if defined(RTEMS_SMP)
+ RtemsTaskReqPerfSetSchedulerMove_Prepare( ctx );
+ ctx->request.name = "RtemsTaskReqPerfSetSchedulerMove";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsTaskReqPerfSetSchedulerMove_Body_Wrap;
+ ctx->request.teardown = RtemsTaskReqPerfSetSchedulerMove_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsTaskReqPerfSetSchedulerMove_Cleanup( ctx );
+ #endif
+
+ ctx->request.name = "RtemsTaskReqPerfSetSchedulerNop";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsTaskReqPerfSetSchedulerNop_Body_Wrap;
+ ctx->request.teardown = RtemsTaskReqPerfSetSchedulerNop_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ #if defined(RTEMS_SMP)
+ RtemsTaskReqPerfSetSchedulerOther_Prepare( ctx );
+ ctx->request.name = "RtemsTaskReqPerfSetSchedulerOther";
+ ctx->request.setup = NULL;
+ ctx->request.body = RtemsTaskReqPerfSetSchedulerOther_Body_Wrap;
+ ctx->request.teardown = RtemsTaskReqPerfSetSchedulerOther_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsTaskReqPerfSetSchedulerOther_Cleanup( ctx );
+ #endif
+
+ #if defined(RTEMS_SMP)
+ RtemsTaskReqPerfSetSchedulerPreempt_Prepare( ctx );
+ ctx->request.name = "RtemsTaskReqPerfSetSchedulerPreempt";
+ ctx->request.setup = RtemsTaskReqPerfSetSchedulerPreempt_Setup_Wrap;
+ ctx->request.body = RtemsTaskReqPerfSetSchedulerPreempt_Body_Wrap;
+ ctx->request.teardown = RtemsTaskReqPerfSetSchedulerPreempt_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+ RtemsTaskReqPerfSetSchedulerPreempt_Cleanup( ctx );
+ #endif
+
+ ctx->request.name = "RtemsTaskReqPerfStart";
+ ctx->request.setup = RtemsTaskReqPerfStart_Setup_Wrap;
+ ctx->request.body = RtemsTaskReqPerfStart_Body_Wrap;
+ ctx->request.teardown = RtemsTaskReqPerfStart_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+
+ ctx->request.name = "RtemsTaskReqPerfStartPreempt";
+ ctx->request.setup = RtemsTaskReqPerfStartPreempt_Setup_Wrap;
+ ctx->request.body = RtemsTaskReqPerfStartPreempt_Body_Wrap;
+ ctx->request.teardown = RtemsTaskReqPerfStartPreempt_Teardown_Wrap;
+ T_measure_runtime( ctx->context, &ctx->request );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-restart.c b/testsuites/validation/tc-task-restart.c
new file mode 100644
index 0000000000..c915f01a49
--- /dev/null
+++ b/testsuites/validation/tc-task-restart.c
@@ -0,0 +1,2760 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqRestart
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <limits.h>
+#include <rtems.h>
+#include <setjmp.h>
+#include <rtems/test-scheduler.h>
+#include <rtems/score/statesimpl.h>
+#include <rtems/score/threaddispatch.h>
+#include <rtems/score/threadimpl.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqRestart spec:/rtems/task/req/restart
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqRestart_Pre_Id_Invalid,
+ RtemsTaskReqRestart_Pre_Id_Executing,
+ RtemsTaskReqRestart_Pre_Id_Other,
+ RtemsTaskReqRestart_Pre_Id_NA
+} RtemsTaskReqRestart_Pre_Id;
+
+typedef enum {
+ RtemsTaskReqRestart_Pre_Dormant_Yes,
+ RtemsTaskReqRestart_Pre_Dormant_No,
+ RtemsTaskReqRestart_Pre_Dormant_NA
+} RtemsTaskReqRestart_Pre_Dormant;
+
+typedef enum {
+ RtemsTaskReqRestart_Pre_Suspended_Yes,
+ RtemsTaskReqRestart_Pre_Suspended_No,
+ RtemsTaskReqRestart_Pre_Suspended_NA
+} RtemsTaskReqRestart_Pre_Suspended;
+
+typedef enum {
+ RtemsTaskReqRestart_Pre_Restarting_Yes,
+ RtemsTaskReqRestart_Pre_Restarting_No,
+ RtemsTaskReqRestart_Pre_Restarting_NA
+} RtemsTaskReqRestart_Pre_Restarting;
+
+typedef enum {
+ RtemsTaskReqRestart_Pre_Terminating_Yes,
+ RtemsTaskReqRestart_Pre_Terminating_No,
+ RtemsTaskReqRestart_Pre_Terminating_NA
+} RtemsTaskReqRestart_Pre_Terminating;
+
+typedef enum {
+ RtemsTaskReqRestart_Pre_Protected_Yes,
+ RtemsTaskReqRestart_Pre_Protected_No,
+ RtemsTaskReqRestart_Pre_Protected_NA
+} RtemsTaskReqRestart_Pre_Protected;
+
+typedef enum {
+ RtemsTaskReqRestart_Pre_Context_Task,
+ RtemsTaskReqRestart_Pre_Context_Interrupt,
+ RtemsTaskReqRestart_Pre_Context_NestedRequest,
+ RtemsTaskReqRestart_Pre_Context_NA
+} RtemsTaskReqRestart_Pre_Context;
+
+typedef enum {
+ RtemsTaskReqRestart_Pre_State_Ready,
+ RtemsTaskReqRestart_Pre_State_Blocked,
+ RtemsTaskReqRestart_Pre_State_Enqueued,
+ RtemsTaskReqRestart_Pre_State_NA
+} RtemsTaskReqRestart_Pre_State;
+
+typedef enum {
+ RtemsTaskReqRestart_Pre_Timer_Inactive,
+ RtemsTaskReqRestart_Pre_Timer_Active,
+ RtemsTaskReqRestart_Pre_Timer_NA
+} RtemsTaskReqRestart_Pre_Timer;
+
+typedef enum {
+ RtemsTaskReqRestart_Pre_RealPriority_Initial,
+ RtemsTaskReqRestart_Pre_RealPriority_Changed,
+ RtemsTaskReqRestart_Pre_RealPriority_NA
+} RtemsTaskReqRestart_Pre_RealPriority;
+
+typedef enum {
+ RtemsTaskReqRestart_Pre_ThreadDispatch_Disabled,
+ RtemsTaskReqRestart_Pre_ThreadDispatch_Enabled,
+ RtemsTaskReqRestart_Pre_ThreadDispatch_NA
+} RtemsTaskReqRestart_Pre_ThreadDispatch;
+
+typedef enum {
+ RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_Status_InvId,
+ RtemsTaskReqRestart_Post_Status_IncStat,
+ RtemsTaskReqRestart_Post_Status_NoReturn,
+ RtemsTaskReqRestart_Post_Status_NA
+} RtemsTaskReqRestart_Post_Status;
+
+typedef enum {
+ RtemsTaskReqRestart_Post_FatalError_Yes,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_FatalError_NA
+} RtemsTaskReqRestart_Post_FatalError;
+
+typedef enum {
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_Argument_Nop,
+ RtemsTaskReqRestart_Post_Argument_NA
+} RtemsTaskReqRestart_Post_Argument;
+
+typedef enum {
+ RtemsTaskReqRestart_Post_State_Dormant,
+ RtemsTaskReqRestart_Post_State_DormantSuspended,
+ RtemsTaskReqRestart_Post_State_Blocked,
+ RtemsTaskReqRestart_Post_State_Ready,
+ RtemsTaskReqRestart_Post_State_Zombie,
+ RtemsTaskReqRestart_Post_State_Nop,
+ RtemsTaskReqRestart_Post_State_NA
+} RtemsTaskReqRestart_Post_State;
+
+typedef enum {
+ RtemsTaskReqRestart_Post_Enqueued_Yes,
+ RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Enqueued_NA
+} RtemsTaskReqRestart_Post_Enqueued;
+
+typedef enum {
+ RtemsTaskReqRestart_Post_Timer_Active,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Timer_NA
+} RtemsTaskReqRestart_Post_Timer;
+
+typedef enum {
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Restarting_No,
+ RtemsTaskReqRestart_Post_Restarting_NA
+} RtemsTaskReqRestart_Post_Restarting;
+
+typedef enum {
+ RtemsTaskReqRestart_Post_Terminating_Yes,
+ RtemsTaskReqRestart_Post_Terminating_No,
+ RtemsTaskReqRestart_Post_Terminating_NA
+} RtemsTaskReqRestart_Post_Terminating;
+
+typedef enum {
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_Protected_No,
+ RtemsTaskReqRestart_Post_Protected_NA
+} RtemsTaskReqRestart_Post_Protected;
+
+typedef enum {
+ RtemsTaskReqRestart_Post_RestartExtensions_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_RestartExtensions_NA
+} RtemsTaskReqRestart_Post_RestartExtensions;
+
+typedef enum {
+ RtemsTaskReqRestart_Post_TerminateExtensions_Yes,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_NA
+} RtemsTaskReqRestart_Post_TerminateExtensions;
+
+typedef struct {
+ uint64_t Skip : 1;
+ uint64_t Pre_Id_NA : 1;
+ uint64_t Pre_Dormant_NA : 1;
+ uint64_t Pre_Suspended_NA : 1;
+ uint64_t Pre_Restarting_NA : 1;
+ uint64_t Pre_Terminating_NA : 1;
+ uint64_t Pre_Protected_NA : 1;
+ uint64_t Pre_Context_NA : 1;
+ uint64_t Pre_State_NA : 1;
+ uint64_t Pre_Timer_NA : 1;
+ uint64_t Pre_RealPriority_NA : 1;
+ uint64_t Pre_ThreadDispatch_NA : 1;
+ uint64_t Post_Status : 3;
+ uint64_t Post_FatalError : 2;
+ uint64_t Post_Argument : 2;
+ uint64_t Post_State : 3;
+ uint64_t Post_Enqueued : 2;
+ uint64_t Post_Timer : 2;
+ uint64_t Post_Restarting : 2;
+ uint64_t Post_Terminating : 2;
+ uint64_t Post_Protected : 2;
+ uint64_t Post_RestartExtensions : 2;
+ uint64_t Post_TerminateExtensions : 2;
+} RtemsTaskReqRestart_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/restart test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides the scheduler operation records.
+ */
+ T_scheduler_log_10 scheduler_log;
+
+ /**
+ * @brief This member provides a jump context to resume a thread dispatch.
+ */
+ jmp_buf thread_dispatch_context;
+
+ /**
+ * @brief This member provides the context to wrap thread queue operations.
+ */
+ WrapThreadQueueContext wrap_tq_ctx;
+
+ /**
+ * @brief This member contains the identifier of the runner scheduler.
+ */
+ rtems_id scheduler_id;
+
+ /**
+ * @brief This member contains the identifier of the runner task.
+ */
+ rtems_id runner_id;
+
+ /**
+ * @brief This member contains the identifier of the mutex.
+ */
+ rtems_id mutex_id;
+
+ /**
+ * @brief This member provides an event set used to set up the blocking
+ * conditions of the task to restart.
+ */
+ rtems_event_set events;
+
+ /**
+ * @brief This member contains the identifier of the worker task.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member references the TCB of the worker task.
+ */
+ rtems_tcb *worker_tcb;
+
+ /**
+ * @brief This member contains the worker state at the end of the
+ * rtems_task_restart() call.
+ */
+ States_Control worker_state;
+
+ /**
+ * @brief This member contains the worker thread life state at the end of the
+ * rtems_task_restart() call.
+ */
+ Thread_Life_state worker_life_state;
+
+ /**
+ * @brief This member contains the identifier of the deleter task.
+ */
+ rtems_id deleter_id;
+
+ /**
+ * @brief This member references the TCB of the deleter task.
+ */
+ rtems_tcb *deleter_tcb;
+
+ /**
+ * @brief This member contains the identifier of the test user extensions.
+ */
+ rtems_id extension_id;
+
+ /**
+ * @brief This member contains extension calls.
+ */
+ ExtensionCalls calls;
+
+ /**
+ * @brief This member contains extension calls after the rtems_task_restart()
+ * call.
+ */
+ ExtensionCalls calls_after_restart;
+
+ /**
+ * @brief This member contains the actual argument passed to the entry point.
+ */
+ rtems_task_argument actual_argument;
+
+ /**
+ * @brief This member contains the restart counter.
+ */
+ uint32_t restart_counter;
+
+ /**
+ * @brief If this member is true, then the worker shall be dormant before the
+ * rtems_task_restart() call.
+ */
+ bool dormant;
+
+ /**
+ * @brief If this member is true, then the worker shall be suspended before
+ * the rtems_task_restart() call.
+ */
+ bool suspended;
+
+ /**
+ * @brief If this member is true, then the thread life of the worker shall be
+ * protected before the rtems_task_restart() call.
+ */
+ bool protected;
+
+ /**
+ * @brief If this member is true, then the worker shall be restarting before
+ * the rtems_task_restart() call.
+ */
+ bool restarting;
+
+ /**
+ * @brief If this member is true, then the worker shall be terminating before
+ * the rtems_task_restart() call.
+ */
+ bool terminating;
+
+ /**
+ * @brief If this member is true, then the rtems_task_restart() shall be
+ * called from within interrupt context.
+ */
+ bool interrupt;
+
+ /**
+ * @brief If this member is true, then the rtems_task_restart() shall be
+ * called during another rtems_task_restart() call with the same task as a
+ * nested request.
+ */
+ bool nested_request;
+
+ /**
+ * @brief If this member is true, then the worker shall be blocked before the
+ * rtems_task_restart() call.
+ */
+ bool blocked;
+
+ /**
+ * @brief If this member is true, then the worker shall be enqueued on a wait
+ * queue before the rtems_task_restart() call.
+ */
+ bool enqueued;
+
+ /**
+ * @brief If this member is true, then the timer of the worker shall be
+ * active before the rtems_task_restart() call.
+ */
+ bool timer_active;
+
+ /**
+ * @brief If this member is true, then the real priority of the worker shall
+ * be equal to its initial priority before the rtems_task_restart() call.
+ */
+ bool real_priority_is_initial;
+
+ /**
+ * @brief If this member is true, then thread dispatching is disabled by the
+ * worker task before the rtems_task_restart() call.
+ */
+ bool dispatch_disabled;
+
+ /**
+ * @brief If this member is true, then it is expected to delete the worker.
+ */
+ bool delete_worker_expected;
+
+ /**
+ * @brief This member contains the return value of the rtems_task_restart()
+ * call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``id`` parameter value.
+ */
+ rtems_id id;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 11 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 11 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqRestart_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqRestart_Context;
+
+static RtemsTaskReqRestart_Context
+ RtemsTaskReqRestart_Instance;
+
+static const char * const RtemsTaskReqRestart_PreDesc_Id[] = {
+ "Invalid",
+ "Executing",
+ "Other",
+ "NA"
+};
+
+static const char * const RtemsTaskReqRestart_PreDesc_Dormant[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqRestart_PreDesc_Suspended[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqRestart_PreDesc_Restarting[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqRestart_PreDesc_Terminating[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqRestart_PreDesc_Protected[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqRestart_PreDesc_Context[] = {
+ "Task",
+ "Interrupt",
+ "NestedRequest",
+ "NA"
+};
+
+static const char * const RtemsTaskReqRestart_PreDesc_State[] = {
+ "Ready",
+ "Blocked",
+ "Enqueued",
+ "NA"
+};
+
+static const char * const RtemsTaskReqRestart_PreDesc_Timer[] = {
+ "Inactive",
+ "Active",
+ "NA"
+};
+
+static const char * const RtemsTaskReqRestart_PreDesc_RealPriority[] = {
+ "Initial",
+ "Changed",
+ "NA"
+};
+
+static const char * const RtemsTaskReqRestart_PreDesc_ThreadDispatch[] = {
+ "Disabled",
+ "Enabled",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqRestart_PreDesc[] = {
+ RtemsTaskReqRestart_PreDesc_Id,
+ RtemsTaskReqRestart_PreDesc_Dormant,
+ RtemsTaskReqRestart_PreDesc_Suspended,
+ RtemsTaskReqRestart_PreDesc_Restarting,
+ RtemsTaskReqRestart_PreDesc_Terminating,
+ RtemsTaskReqRestart_PreDesc_Protected,
+ RtemsTaskReqRestart_PreDesc_Context,
+ RtemsTaskReqRestart_PreDesc_State,
+ RtemsTaskReqRestart_PreDesc_Timer,
+ RtemsTaskReqRestart_PreDesc_RealPriority,
+ RtemsTaskReqRestart_PreDesc_ThreadDispatch,
+ NULL
+};
+
+#if CPU_SIZEOF_POINTER > 4
+#define RESTART_ARGUMENT 0xfedcba0987654321U
+#else
+#define RESTART_ARGUMENT 0x87654321U
+#endif
+
+#define UNSET_ARGUMENT 1
+
+typedef RtemsTaskReqRestart_Context Context;
+
+static void PrepareRealPriority( Context *ctx )
+{
+ if ( !ctx->real_priority_is_initial ) {
+ SetScheduler( ctx->worker_id, ctx->scheduler_id, PRIO_LOW );
+ SetPriority( ctx->worker_id, PRIO_NORMAL );
+ }
+}
+
+static void CaptureWorkerState( Context *ctx )
+{
+ T_scheduler_log *log;
+
+ log = T_scheduler_record( NULL );
+
+ if ( log != NULL ) {
+ T_eq_ptr( &log->header, &ctx->scheduler_log.header );
+
+ ctx->worker_state = ctx->worker_tcb->current_state;
+ ctx->worker_life_state = ctx->worker_tcb->Life.state;
+ CopyExtensionCalls( &ctx->calls, &ctx->calls_after_restart );
+ }
+}
+
+static void VerifyTaskPreparation( const Context *ctx )
+{
+ if ( ctx->id != INVALID_ID ) {
+ States_Control state;
+ Thread_Life_state life_state;
+
+ state = STATES_READY;
+ life_state = ctx->worker_tcb->Life.state;
+
+ if ( ctx->suspended ) {
+ state |= STATES_SUSPENDED;
+ }
+
+ if ( ctx->dormant ) {
+ T_eq_int( life_state, 0 );
+ state |= STATES_DORMANT;
+ } else {
+ T_eq( ctx->protected, ( life_state & THREAD_LIFE_PROTECTED ) != 0 );
+ T_eq( ctx->restarting, ( life_state & THREAD_LIFE_RESTARTING ) != 0 );
+ T_eq( ctx->terminating, ( life_state & THREAD_LIFE_TERMINATING ) != 0 );
+
+ if ( ctx->blocked ) {
+ if ( ctx->enqueued ) {
+ state |= STATES_WAITING_FOR_MUTEX;
+ } else {
+ state |= STATES_WAITING_FOR_EVENT;
+ }
+ }
+
+ if ( ctx->nested_request ) {
+ state |= STATES_LIFE_IS_CHANGING;
+ }
+ }
+
+ T_eq_u32( ctx->worker_tcb->current_state, state );
+ }
+}
+
+static void Restart( void *arg )
+{
+ Context *ctx;
+ T_scheduler_log *log;
+
+ ctx = arg;
+
+ if ( ctx->suspended && ctx->id != INVALID_ID ) {
+ if ( ctx->id != RTEMS_SELF || ctx->interrupt ) {
+ SuspendTask( ctx->worker_id );
+ } else {
+ Per_CPU_Control *cpu_self;
+
+ /*
+ * Where the system was built with SMP support enabled, a suspended
+ * executing thread during the rtems_task_restart() call can happen
+ * if the thread was suspended by another processor and the
+ * inter-processor interrupt did not yet arrive. Where the system was
+ * built with SMP support disabled, this state cannot happen with the
+ * current implementation. However, we still specify and validate this
+ * behaviour unconditionally since there exist alternative
+ * implementations which would lead to such a state if the executing
+ * thread is suspended by an ISR.
+ */
+ cpu_self = _Thread_Dispatch_disable();
+ SuspendSelf();
+ cpu_self->dispatch_necessary = false;
+ _Thread_Dispatch_enable( cpu_self );
+ }
+ }
+
+ if ( ctx->dispatch_disabled ) {
+ _Thread_Dispatch_disable();
+ }
+
+ VerifyTaskPreparation( ctx );
+ ClearExtensionCalls( &ctx->calls );
+
+ log = T_scheduler_record_10( &ctx->scheduler_log );
+ T_null( log );
+
+ ctx->status = rtems_task_restart( ctx->id, RESTART_ARGUMENT );
+
+ CaptureWorkerState( ctx );
+
+ if ( ctx->dispatch_disabled ) {
+ _Thread_Dispatch_enable( _Per_CPU_Get() );
+ }
+}
+
+static void Block( Context *ctx )
+{
+ rtems_interval ticks;
+
+ if ( ctx->timer_active ) {
+ ticks = UINT32_MAX;
+ } else {
+ ticks = RTEMS_NO_TIMEOUT;
+ }
+
+ if ( ctx->enqueued ) {
+ ObtainMutexTimed( ctx->mutex_id, ticks );
+ } else {
+ /*
+ * Do not use a stack variable for the event set, since we may jump out
+ * of the directive call.
+ */
+ (void) rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_EVENT_ANY | RTEMS_WAIT,
+ ticks,
+ &ctx->events
+ );
+ }
+}
+
+static void BlockDone( const Context *ctx )
+{
+ if ( ctx->enqueued ) {
+ ReleaseMutex( ctx->mutex_id );
+ }
+}
+
+static void Fatal(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ Context *ctx;
+ Per_CPU_Control *cpu_self;
+
+ T_eq_int( source, INTERNAL_ERROR_CORE );
+ T_eq_ulong( code, INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL );
+
+ ctx = arg;
+ ++ctx->calls.fatal;
+ T_assert_eq_int( ctx->calls.fatal, 1 );
+
+ CaptureWorkerState( ctx );
+
+ cpu_self = _Per_CPU_Get();
+ _Thread_Dispatch_unnest( cpu_self );
+ _Thread_Dispatch_direct_no_return( cpu_self );
+}
+
+static void ResumeThreadDispatch(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ Context *ctx;
+
+ T_eq_int( source, INTERNAL_ERROR_CORE );
+ T_eq_ulong( code, INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL );
+
+ ctx = arg;
+ SetFatalHandler( Fatal, ctx );
+ longjmp( ctx->thread_dispatch_context, 1 );
+}
+
+static void TriggerNestedRequestViaSelfRestart(
+ Context *ctx,
+ Per_CPU_Control *cpu_self
+)
+{
+ WrapThreadQueueExtract( &ctx->wrap_tq_ctx, ctx->worker_tcb );
+ SetFatalHandler( ResumeThreadDispatch, ctx );
+
+ if ( setjmp( ctx->thread_dispatch_context ) == 0 ) {
+ (void) rtems_task_restart(
+ RTEMS_SELF,
+ (rtems_task_argument) ctx
+ );
+ } else {
+ _Thread_Dispatch_unnest( cpu_self );
+ }
+}
+
+static void Signal( rtems_signal_set signals )
+{
+ Context *ctx;
+
+ (void) signals;
+ ctx = T_fixture_context();
+
+ if ( ctx->id == RTEMS_SELF ) {
+ Per_CPU_Control *cpu_self;
+
+ SetPriority( ctx->runner_id, PRIO_VERY_LOW );
+ SetPriority( ctx->deleter_id, PRIO_VERY_LOW );
+
+ if ( ctx->interrupt || ctx->nested_request ) {
+ if ( ctx->blocked ) {
+ SetFatalHandler( ResumeThreadDispatch, ctx );
+ cpu_self = _Thread_Dispatch_disable();
+
+ if ( setjmp( ctx->thread_dispatch_context ) == 0 ) {
+ Block( ctx );
+ } else {
+ _Thread_Dispatch_unnest( cpu_self );
+ }
+
+ if ( ctx->interrupt ) {
+ CallWithinISR( Restart, ctx );
+ } else {
+ TriggerNestedRequestViaSelfRestart( ctx, cpu_self );
+ }
+
+ _Thread_Dispatch_direct( cpu_self );
+ BlockDone( ctx );
+ } else {
+ if ( ctx->interrupt ) {
+ CallWithinISR( Restart, ctx );
+ } else {
+ cpu_self = _Thread_Dispatch_disable();
+ TriggerNestedRequestViaSelfRestart( ctx, cpu_self );
+ _Thread_Dispatch_direct( cpu_self );
+ }
+ }
+ } else {
+ Restart( ctx );
+ }
+ } else {
+ if ( ctx->blocked ) {
+ Block( ctx );
+ BlockDone( ctx );
+ } else if ( ctx->nested_request ) {
+ Yield();
+ } else {
+ SetPriority( ctx->runner_id, PRIO_VERY_HIGH );
+ }
+ }
+
+ if ( ctx->protected ) {
+ _Thread_Set_life_protection( 0 );
+ }
+}
+
+static void Deleter( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ if ( ctx != NULL ) {
+ if ( ctx->real_priority_is_initial ) {
+ /*
+ * We have to prevent a potential priority boost in the task delete
+ * below.
+ */
+ if ( ctx->nested_request ) {
+ /* Lower the priority to PRIO_NORMAL without an * implicit yield */
+ SetSelfPriorityNoYield( PRIO_NORMAL );
+ } else {
+ SetScheduler( ctx->worker_id, ctx->scheduler_id, PRIO_HIGH );
+ }
+ }
+
+ if ( ctx->nested_request ) {
+ WrapThreadQueueExtract( &ctx->wrap_tq_ctx, ctx->worker_tcb );
+ DeleteTask( ctx->worker_id );
+ } else {
+ DeleteTask( ctx->worker_id );
+ }
+ }
+
+ SuspendSelf();
+}
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+ rtems_status_code sc;
+
+ ctx = T_fixture_context();
+
+ if ( arg == 0 ) {
+ sc = rtems_signal_catch( Signal, RTEMS_NO_ASR );
+ T_rsc_success( sc );
+
+ if ( ctx->protected ) {
+ _Thread_Set_life_protection( THREAD_LIFE_PROTECTED );
+ }
+
+ Yield();
+ } else {
+ ctx->actual_argument = arg;
+ ++ctx->restart_counter;
+
+ CaptureWorkerState( ctx );
+ SuspendSelf();
+ }
+}
+
+static void ThreadDelete( rtems_tcb *executing, rtems_tcb *deleted )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ ++ctx->calls.thread_delete;
+
+ T_eq_u32( executing->Object.id, ctx->runner_id );
+
+ if ( ctx->delete_worker_expected ) {
+ T_eq_u32( deleted->Object.id, ctx->worker_id );
+ }
+}
+
+static void ThreadRestart( rtems_tcb *executing, rtems_tcb *restarted )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ ++ctx->calls.thread_restart;
+}
+
+static void ThreadTerminate( rtems_tcb *executing )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ ++ctx->calls.thread_terminate;
+
+ T_eq_u32( executing->Object.id, ctx->worker_id );
+}
+
+static const rtems_extensions_table extensions = {
+ .thread_delete = ThreadDelete,
+ .thread_restart = ThreadRestart,
+ .thread_terminate = ThreadTerminate
+};
+
+static void RtemsTaskReqRestart_Pre_Id_Prepare(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is not associated with a task.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Id_Executing: {
+ /*
+ * While the ``id`` parameter is associated with the calling task.
+ */
+ ctx->id = RTEMS_SELF;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Id_Other: {
+ /*
+ * While the ``id`` parameter is associated with a task other than the
+ * calling task.
+ */
+ ctx->id = ctx->worker_id;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Pre_Dormant_Prepare(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Pre_Dormant state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Pre_Dormant_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is dormant.
+ */
+ ctx->dormant = true;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Dormant_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not dormant.
+ */
+ ctx->dormant = false;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Dormant_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Pre_Suspended_Prepare(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Pre_Suspended state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Pre_Suspended_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is suspended.
+ */
+ ctx->suspended = true;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Suspended_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not suspended.
+ */
+ ctx->suspended = false;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Suspended_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Pre_Restarting_Prepare(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Pre_Restarting state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Pre_Restarting_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is restarting.
+ */
+ ctx->restarting = true;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Restarting_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not restarting.
+ */
+ ctx->restarting = false;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Restarting_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Pre_Terminating_Prepare(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Pre_Terminating state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Pre_Terminating_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is terminating.
+ */
+ ctx->terminating = true;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Terminating_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not terminating.
+ */
+ ctx->terminating = false;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Terminating_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Pre_Protected_Prepare(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Pre_Protected state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Pre_Protected_Yes: {
+ /*
+ * While thread life of the task specified by the ``id`` parameter is
+ * protected.
+ */
+ ctx->protected = true;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Protected_No: {
+ /*
+ * While thread life of the task specified by the ``id`` parameter is not
+ * protected.
+ */
+ ctx->protected = false;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Protected_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Pre_Context_Prepare(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Pre_Context state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Pre_Context_Task: {
+ /*
+ * While the rtems_task_restart() directive is called from within task
+ * context.
+ */
+ ctx->interrupt = false;
+ ctx->nested_request = false;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Context_Interrupt: {
+ /*
+ * While the rtems_task_restart() directive is called from within
+ * interrupt context.
+ */
+ ctx->interrupt = true;
+ ctx->nested_request = false;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Context_NestedRequest: {
+ /*
+ * While the rtems_task_restart() directive is called during another
+ * rtems_task_restart() call with the same task as a nested request.
+ */
+ ctx->interrupt = false;
+ ctx->nested_request = true;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Pre_State_Prepare(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Pre_State state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Pre_State_Ready: {
+ /*
+ * While the task specified by the ``id`` parameter is a ready task or
+ * scheduled task.
+ */
+ ctx->blocked = false;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_State_Blocked: {
+ /*
+ * While the task specified by the ``id`` parameter is blocked.
+ */
+ ctx->blocked = true;
+ ctx->enqueued = false;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_State_Enqueued: {
+ /*
+ * While the task specified by the ``id`` parameter is enqueued on a wait
+ * queue.
+ */
+ ctx->blocked = true;
+ ctx->enqueued = true;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_State_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Pre_Timer_Prepare(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Pre_Timer state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Pre_Timer_Inactive: {
+ /*
+ * While timer of the task specified by the ``id`` parameter is inactive.
+ */
+ ctx->timer_active = false;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Timer_Active: {
+ /*
+ * While timer of the task specified by the ``id`` parameter is active.
+ */
+ ctx->timer_active = true;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_Timer_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Pre_RealPriority_Prepare(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Pre_RealPriority state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Pre_RealPriority_Initial: {
+ /*
+ * While real priority of the task specified by the ``id`` parameter is
+ * equal to the initial priority.
+ */
+ ctx->real_priority_is_initial = true;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_RealPriority_Changed: {
+ /*
+ * While real priority of the task specified by the ``id`` parameter is
+ * not equal to the initial priority.
+ */
+ ctx->real_priority_is_initial = false;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_RealPriority_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Pre_ThreadDispatch_Prepare(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Pre_ThreadDispatch state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Pre_ThreadDispatch_Disabled: {
+ /*
+ * While thread dispatching is disabled for the calling task.
+ */
+ ctx->dispatch_disabled = true;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_ThreadDispatch_Enabled: {
+ /*
+ * While thread dispatching is enabled for the calling task.
+ */
+ ctx->dispatch_disabled = false;
+ break;
+ }
+
+ case RtemsTaskReqRestart_Pre_ThreadDispatch_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Post_Status_Check(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_restart() shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Status_InvId: {
+ /*
+ * The return status of rtems_task_restart() shall be RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Status_IncStat: {
+ /*
+ * The return status of rtems_task_restart() shall be
+ * RTEMS_INCORRECT_STATE.
+ */
+ T_rsc( ctx->status, RTEMS_INCORRECT_STATE );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Status_NoReturn: {
+ /*
+ * The rtems_task_restart() call shall not return.
+ */
+ T_rsc( ctx->status, RTEMS_NOT_IMPLEMENTED );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Post_FatalError_Check(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Post_FatalError state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Post_FatalError_Yes: {
+ /*
+ * The fatal error with a fatal source of INTERNAL_ERROR_CORE and a fatal
+ * code of INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL shall occur
+ * through the rtems_task_restart() call.
+ */
+ T_eq_u32( ctx->calls.fatal, 1 );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_FatalError_Nop: {
+ /*
+ * No fatal error shall occur through the rtems_task_restart() call.
+ */
+ T_eq_u32( ctx->calls.fatal, 0 );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_FatalError_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Post_Argument_Check(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Post_Argument state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Post_Argument_Set: {
+ /*
+ * The entry point argument of the task specified by the ``id`` parameter
+ * shall be set to the value specified by the ``argument`` parameter
+ * before the task is unblocked by the rtems_task_restart() call.
+ */
+ if ( ctx->restart_counter != 0 ) {
+ #if CPU_SIZEOF_POINTER > 4
+ T_eq_u64( ctx->actual_argument, RESTART_ARGUMENT );
+ #else
+ T_eq_u32( ctx->actual_argument, RESTART_ARGUMENT );
+ #endif
+
+ T_eq_u32( ctx->restart_counter, 1 );
+ } else {
+ #if CPU_SIZEOF_POINTER > 4
+ T_eq_u64(
+ ctx->worker_tcb->Start.Entry.Kinds.Numeric.argument,
+ RESTART_ARGUMENT
+ );
+ T_eq_u64( ctx->actual_argument, UNSET_ARGUMENT );
+ #else
+ T_eq_u32(
+ ctx->worker_tcb->Start.Entry.Kinds.Numeric.argument,
+ RESTART_ARGUMENT
+ );
+ T_eq_u32( ctx->actual_argument, UNSET_ARGUMENT );
+ #endif
+ }
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Argument_Nop: {
+ /*
+ * No entry point argument of a task shall be modified by the
+ * rtems_task_restart() call.
+ */
+ T_eq_u32( ctx->actual_argument, UNSET_ARGUMENT );
+ T_eq_u32( ctx->restart_counter, 0 );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Argument_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Post_State_Check(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Post_State state
+)
+{
+ const T_scheduler_event *event;
+ size_t index;
+
+ index = 0;
+
+ switch ( state ) {
+ case RtemsTaskReqRestart_Post_State_Dormant: {
+ /*
+ * The state of the task specified by the ``id`` parameter shall be
+ * dormant after the rtems_task_restart() call.
+ */
+ T_eq_u32( ctx->worker_state, STATES_DORMANT )
+
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_NOP );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_State_DormantSuspended: {
+ /*
+ * The state of the task specified by the ``id`` parameter shall be
+ * dormant and suspended after the rtems_task_restart() call.
+ */
+ T_eq_u32( ctx->worker_state, STATES_DORMANT | STATES_SUSPENDED )
+
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_NOP );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_State_Blocked: {
+ /*
+ * The state of the task specified by the ``id`` parameter shall be
+ * blocked after the rtems_task_restart() call.
+ */
+ T_ne_u32( ctx->worker_state & STATES_BLOCKED, 0 )
+ T_eq_u32( ctx->worker_state & STATES_BLOCKED, ctx->worker_state )
+
+ if ( ctx->suspended && !ctx->blocked ) {
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UNBLOCK );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+ }
+
+ if ( !ctx->real_priority_is_initial && !ctx->terminating ) {
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UPDATE_PRIORITY );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+ }
+
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_NOP );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_State_Ready: {
+ /*
+ * The state of the task specified by the ``id`` parameter shall be ready
+ * after the rtems_task_restart() call.
+ */
+ T_eq_u32( ctx->worker_state, STATES_READY )
+
+ if ( ctx->protected ) {
+ if ( ctx->suspended ) {
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UNBLOCK );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+ }
+ } else {
+ if ( ctx->suspended || ctx->blocked ) {
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UNBLOCK );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+ } else {
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_BLOCK );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UNBLOCK );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+ }
+ }
+
+ if ( !ctx->real_priority_is_initial && !ctx->terminating ) {
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UPDATE_PRIORITY );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+ }
+
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_NOP );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_State_Zombie: {
+ /*
+ * The state of the task specified by the ``id`` parameter shall be the
+ * zombie state after the rtems_task_restart() call.
+ */
+ T_eq_u32( ctx->worker_state, STATES_ZOMBIE )
+
+ if ( ctx->protected ) {
+ if ( ctx->suspended ) {
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UNBLOCK );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+ }
+ } else {
+ if ( ctx->suspended ) {
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UNBLOCK );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+ } else {
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_BLOCK );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UNBLOCK );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+ }
+ }
+
+ if ( !ctx->real_priority_is_initial && !ctx->terminating ) {
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UPDATE_PRIORITY );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+ }
+
+ /* Set zombie state */
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_BLOCK );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+
+ /* Wake up deleter */
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UNBLOCK );
+ T_eq_ptr( event->thread, ctx->deleter_tcb );
+
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_NOP );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_State_Nop: {
+ /*
+ * The state of the task specified by the ``id`` parameter shall not be
+ * modified by the rtems_task_restart() call.
+ */
+ T_ne_u32( ctx->worker_state & STATES_LIFE_IS_CHANGING, 0 )
+
+ if ( !ctx->real_priority_is_initial ) {
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_UPDATE_PRIORITY );
+ T_eq_ptr( event->thread, ctx->worker_tcb );
+ }
+
+ event = T_scheduler_next_any( &ctx->scheduler_log.header, &index );
+ T_eq_int( event->operation, T_SCHEDULER_NOP );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_State_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Post_Enqueued_Check(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Post_Enqueued state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Post_Enqueued_Yes: {
+ /*
+ * The task specified by the ``id`` parameter shall be enqueued on a wait
+ * queue after the rtems_task_restart() call.
+ */
+ T_not_null( ctx->worker_tcb->Wait.queue );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Enqueued_No: {
+ /*
+ * The task specified by the ``id`` parameter shall not be enqueued on a
+ * wait queue after the rtems_task_restart() call.
+ */
+ T_null( ctx->worker_tcb->Wait.queue );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Enqueued_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Post_Timer_Check(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Post_Timer state
+)
+{
+ TaskTimerInfo info;
+
+ switch ( state ) {
+ case RtemsTaskReqRestart_Post_Timer_Active: {
+ /*
+ * The timer of the task specified by the ``id`` parameter shall be
+ * active after the rtems_task_restart() call.
+ */
+ GetTaskTimerInfoByThread( ctx->worker_tcb, &info);
+ T_eq_int( info.state, TASK_TIMER_TICKS );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Timer_Inactive: {
+ /*
+ * The timer of the task specified by the ``id`` parameter shall be
+ * inactive after the rtems_task_restart() call.
+ */
+ GetTaskTimerInfoByThread( ctx->worker_tcb, &info);
+ T_eq_int( info.state, TASK_TIMER_INACTIVE );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Timer_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Post_Restarting_Check(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Post_Restarting state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Post_Restarting_Yes: {
+ /*
+ * The task specified by the ``id`` parameter shall be restarting after
+ * the rtems_task_restart() call.
+ */
+ T_ne_int( ctx->worker_life_state & THREAD_LIFE_RESTARTING, 0 );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Restarting_No: {
+ /*
+ * The task specified by the ``id`` parameter shall not be restarting
+ * after the rtems_task_restart() call.
+ */
+ T_eq_int( ctx->worker_life_state & THREAD_LIFE_RESTARTING, 0 );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Restarting_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Post_Terminating_Check(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Post_Terminating state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Post_Terminating_Yes: {
+ /*
+ * The task specified by the ``id`` parameter shall be terminating after
+ * the rtems_task_restart() call.
+ */
+ T_ne_int( ctx->worker_life_state & THREAD_LIFE_TERMINATING, 0 );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Terminating_No: {
+ /*
+ * The task specified by the ``id`` parameter shall not be terminating
+ * after the rtems_task_restart() call.
+ */
+ T_eq_int( ctx->worker_life_state & THREAD_LIFE_TERMINATING, 0 );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Terminating_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Post_Protected_Check(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Post_Protected state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Post_Protected_Yes: {
+ /*
+ * The thread life of the task specified by the ``id`` parameter be
+ * protected after the rtems_task_restart() call.
+ */
+ T_ne_int( ctx->worker_life_state & THREAD_LIFE_PROTECTED, 0 );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Protected_No: {
+ /*
+ * The thread life of the task specified by the ``id`` parameter shall
+ * not be protected after the rtems_task_restart() call.
+ */
+ T_eq_int( ctx->worker_life_state & THREAD_LIFE_PROTECTED, 0 );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_Protected_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Post_RestartExtensions_Check(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Post_RestartExtensions state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Post_RestartExtensions_Yes: {
+ /*
+ * The thread restart user extensions shall be invoked by the
+ * rtems_task_restart() call.
+ */
+ T_eq_u32( ctx->calls_after_restart.thread_restart, 1 );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_RestartExtensions_Nop: {
+ /*
+ * The thread restart user extensions shall not be invoked by the
+ * rtems_task_restart() call.
+ */
+ T_eq_u32( ctx->calls_after_restart.thread_restart, 0 );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_RestartExtensions_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Post_TerminateExtensions_Check(
+ RtemsTaskReqRestart_Context *ctx,
+ RtemsTaskReqRestart_Post_TerminateExtensions state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqRestart_Post_TerminateExtensions_Yes: {
+ /*
+ * The thread terminate user extensions shall be invoked by the
+ * rtems_task_restart() call.
+ */
+ T_eq_u32( ctx->calls_after_restart.thread_terminate, 1 );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_TerminateExtensions_Nop: {
+ /*
+ * The thread terminate user extensions shall not be invoked by the
+ * rtems_task_restart() call.
+ */
+ T_eq_u32( ctx->calls_after_restart.thread_terminate, 0 );
+ break;
+ }
+
+ case RtemsTaskReqRestart_Post_TerminateExtensions_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqRestart_Setup( RtemsTaskReqRestart_Context *ctx )
+{
+ rtems_status_code sc;
+
+ ctx->runner_id = rtems_task_self();
+ ctx->scheduler_id = GetSelfScheduler();
+ ctx->mutex_id = CreateMutexNoProtocol();
+ ObtainMutex( ctx->mutex_id );
+ WrapThreadQueueInitialize( &ctx->wrap_tq_ctx, Restart, ctx );
+
+ sc = rtems_extension_create(
+ rtems_build_name( 'T', 'E', 'S', 'T' ),
+ &extensions,
+ &ctx->extension_id
+ );
+ T_rsc_success( sc );
+
+ SetFatalHandler( Fatal, ctx );
+ SetSelfPriority( PRIO_NORMAL );
+
+ ctx->deleter_id = CreateTask( "DELE", PRIO_HIGH );
+ ctx->deleter_tcb = GetThread( ctx->deleter_id );
+ StartTask( ctx->deleter_id, Deleter, NULL );
+}
+
+static void RtemsTaskReqRestart_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqRestart_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqRestart_Setup( ctx );
+}
+
+static void RtemsTaskReqRestart_Teardown( RtemsTaskReqRestart_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_extension_delete( ctx->extension_id );
+ T_rsc_success( sc );
+
+ SetFatalHandler( NULL, NULL );
+ DeleteTask( ctx->deleter_id );
+ ReleaseMutex( ctx->mutex_id );
+ DeleteMutex( ctx->mutex_id );
+ RestoreRunnerASR();
+ RestoreRunnerPriority();
+ WrapThreadQueueDestroy( &ctx->wrap_tq_ctx );
+}
+
+static void RtemsTaskReqRestart_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqRestart_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqRestart_Teardown( ctx );
+}
+
+static void RtemsTaskReqRestart_Prepare( RtemsTaskReqRestart_Context *ctx )
+{
+ ctx->status = RTEMS_NOT_IMPLEMENTED;
+ ctx->actual_argument = UNSET_ARGUMENT;
+ ctx->restart_counter = 0;
+
+ ctx->delete_worker_expected = false;
+ ctx->worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ ctx->delete_worker_expected = true;
+
+ ctx->worker_tcb = GetThread( ctx->worker_id );
+ ctx->worker_state = UINT32_MAX;
+ ctx->worker_life_state = INT_MAX;
+
+ SetPriority( ctx->deleter_id, PRIO_HIGH );
+}
+
+static void RtemsTaskReqRestart_Action( RtemsTaskReqRestart_Context *ctx )
+{
+ rtems_status_code sc;
+
+ if ( ctx->id != INVALID_ID ) {
+ if ( ctx->dormant ) {
+ PrepareRealPriority( ctx );
+ } else {
+ StartTask( ctx->worker_id, Worker, NULL );
+
+ /* Let the worker catch signals and set the thread life protection state */
+ Yield();
+
+ sc = rtems_signal_send( ctx->worker_id, RTEMS_SIGNAL_0 );
+ T_rsc_success( sc );
+
+ if (
+ ctx->restarting &&
+ ( !ctx->nested_request || ( ctx->nested_request && ctx->terminating ) )
+ ) {
+ sc = rtems_task_restart( ctx->worker_id, (rtems_task_argument) ctx );
+ T_rsc_success( sc );
+ }
+
+ if ( ctx->terminating && !ctx->nested_request ) {
+ sc = rtems_task_restart( ctx->deleter_id, (rtems_task_argument) ctx );
+ T_rsc_success( sc );
+ } else {
+ PrepareRealPriority( ctx );
+ Yield();
+ }
+ }
+ }
+
+ if ( ctx->id == RTEMS_SELF ) {
+ CaptureWorkerState( ctx );
+ } else {
+ if ( ctx->nested_request ) {
+ if ( ctx->terminating ) {
+ sc = rtems_task_restart( ctx->deleter_id, (rtems_task_argument) ctx );
+ T_rsc_success( sc );
+ } else {
+ WrapThreadQueueExtract( &ctx->wrap_tq_ctx, ctx->worker_tcb );
+
+ sc = rtems_task_restart( ctx->worker_id, (rtems_task_argument) ctx );
+ T_rsc_success( sc );
+ }
+ } else {
+ SetSelfPriority( PRIO_VERY_HIGH );
+
+ if ( ctx->interrupt ) {
+ CallWithinISR( Restart, ctx );
+ } else {
+ Restart( ctx );
+ }
+ }
+ }
+}
+
+static void RtemsTaskReqRestart_Cleanup( RtemsTaskReqRestart_Context *ctx )
+{
+ SetSelfPriority( PRIO_VERY_LOW );
+
+ if ( ctx->protected && ctx->blocked ) {
+ if ( ctx->enqueued ) {
+ ReleaseMutex( ctx->mutex_id );
+ ObtainMutex( ctx->mutex_id );
+ } else {
+ SendEvents( ctx->worker_id, RTEMS_EVENT_0 );
+ }
+ }
+
+ if ( ctx->id == INVALID_ID || ctx->dormant || !ctx->terminating ) {
+ DeleteTask( ctx->worker_id );
+ }
+
+ SetSelfPriority( PRIO_NORMAL );
+}
+
+static const RtemsTaskReqRestart_Entry
+RtemsTaskReqRestart_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_NA,
+ RtemsTaskReqRestart_Post_FatalError_NA,
+ RtemsTaskReqRestart_Post_Argument_NA, RtemsTaskReqRestart_Post_State_NA,
+ RtemsTaskReqRestart_Post_Enqueued_NA, RtemsTaskReqRestart_Post_Timer_NA,
+ RtemsTaskReqRestart_Post_Restarting_NA,
+ RtemsTaskReqRestart_Post_Terminating_NA,
+ RtemsTaskReqRestart_Post_Protected_NA,
+ RtemsTaskReqRestart_Post_RestartExtensions_NA,
+ RtemsTaskReqRestart_Post_TerminateExtensions_NA },
+ { 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, RtemsTaskReqRestart_Post_Status_InvId,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_NA, RtemsTaskReqRestart_Post_State_NA,
+ RtemsTaskReqRestart_Post_Enqueued_NA, RtemsTaskReqRestart_Post_Timer_NA,
+ RtemsTaskReqRestart_Post_Restarting_NA,
+ RtemsTaskReqRestart_Post_Terminating_NA,
+ RtemsTaskReqRestart_Post_Protected_NA,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_NA,
+ RtemsTaskReqRestart_Post_FatalError_NA,
+ RtemsTaskReqRestart_Post_Argument_NA, RtemsTaskReqRestart_Post_State_NA,
+ RtemsTaskReqRestart_Post_Enqueued_NA, RtemsTaskReqRestart_Post_Timer_NA,
+ RtemsTaskReqRestart_Post_Restarting_NA,
+ RtemsTaskReqRestart_Post_Terminating_NA,
+ RtemsTaskReqRestart_Post_Protected_NA,
+ RtemsTaskReqRestart_Post_RestartExtensions_NA,
+ RtemsTaskReqRestart_Post_TerminateExtensions_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_NA,
+ RtemsTaskReqRestart_Post_FatalError_NA,
+ RtemsTaskReqRestart_Post_Argument_NA, RtemsTaskReqRestart_Post_State_NA,
+ RtemsTaskReqRestart_Post_Enqueued_NA, RtemsTaskReqRestart_Post_Timer_NA,
+ RtemsTaskReqRestart_Post_Restarting_NA,
+ RtemsTaskReqRestart_Post_Terminating_NA,
+ RtemsTaskReqRestart_Post_Protected_NA,
+ RtemsTaskReqRestart_Post_RestartExtensions_NA,
+ RtemsTaskReqRestart_Post_TerminateExtensions_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_NA,
+ RtemsTaskReqRestart_Post_FatalError_NA,
+ RtemsTaskReqRestart_Post_Argument_NA, RtemsTaskReqRestart_Post_State_NA,
+ RtemsTaskReqRestart_Post_Enqueued_NA, RtemsTaskReqRestart_Post_Timer_NA,
+ RtemsTaskReqRestart_Post_Restarting_NA,
+ RtemsTaskReqRestart_Post_Terminating_NA,
+ RtemsTaskReqRestart_Post_Protected_NA,
+ RtemsTaskReqRestart_Post_RestartExtensions_NA,
+ RtemsTaskReqRestart_Post_TerminateExtensions_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_NA,
+ RtemsTaskReqRestart_Post_FatalError_NA,
+ RtemsTaskReqRestart_Post_Argument_NA, RtemsTaskReqRestart_Post_State_NA,
+ RtemsTaskReqRestart_Post_Enqueued_NA, RtemsTaskReqRestart_Post_Timer_NA,
+ RtemsTaskReqRestart_Post_Restarting_NA,
+ RtemsTaskReqRestart_Post_Terminating_NA,
+ RtemsTaskReqRestart_Post_Protected_NA,
+ RtemsTaskReqRestart_Post_RestartExtensions_NA,
+ RtemsTaskReqRestart_Post_TerminateExtensions_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_NA,
+ RtemsTaskReqRestart_Post_FatalError_NA,
+ RtemsTaskReqRestart_Post_Argument_NA, RtemsTaskReqRestart_Post_State_NA,
+ RtemsTaskReqRestart_Post_Enqueued_NA, RtemsTaskReqRestart_Post_Timer_NA,
+ RtemsTaskReqRestart_Post_Restarting_NA,
+ RtemsTaskReqRestart_Post_Terminating_NA,
+ RtemsTaskReqRestart_Post_Protected_NA,
+ RtemsTaskReqRestart_Post_RestartExtensions_NA,
+ RtemsTaskReqRestart_Post_TerminateExtensions_NA },
+ { 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0,
+ RtemsTaskReqRestart_Post_Status_IncStat,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Nop,
+ RtemsTaskReqRestart_Post_State_DormantSuspended,
+ RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_No,
+ RtemsTaskReqRestart_Post_Terminating_No,
+ RtemsTaskReqRestart_Post_Protected_No,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0,
+ RtemsTaskReqRestart_Post_Status_IncStat,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Nop,
+ RtemsTaskReqRestart_Post_State_Dormant,
+ RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_No,
+ RtemsTaskReqRestart_Post_Terminating_No,
+ RtemsTaskReqRestart_Post_Protected_No,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_NA,
+ RtemsTaskReqRestart_Post_FatalError_NA,
+ RtemsTaskReqRestart_Post_Argument_NA, RtemsTaskReqRestart_Post_State_NA,
+ RtemsTaskReqRestart_Post_Enqueued_NA, RtemsTaskReqRestart_Post_Timer_NA,
+ RtemsTaskReqRestart_Post_Restarting_NA,
+ RtemsTaskReqRestart_Post_Terminating_NA,
+ RtemsTaskReqRestart_Post_Protected_NA,
+ RtemsTaskReqRestart_Post_RestartExtensions_NA,
+ RtemsTaskReqRestart_Post_TerminateExtensions_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_NA,
+ RtemsTaskReqRestart_Post_FatalError_NA,
+ RtemsTaskReqRestart_Post_Argument_NA, RtemsTaskReqRestart_Post_State_NA,
+ RtemsTaskReqRestart_Post_Enqueued_NA, RtemsTaskReqRestart_Post_Timer_NA,
+ RtemsTaskReqRestart_Post_Restarting_NA,
+ RtemsTaskReqRestart_Post_Terminating_NA,
+ RtemsTaskReqRestart_Post_Protected_NA,
+ RtemsTaskReqRestart_Post_RestartExtensions_NA,
+ RtemsTaskReqRestart_Post_TerminateExtensions_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_NA,
+ RtemsTaskReqRestart_Post_FatalError_NA,
+ RtemsTaskReqRestart_Post_Argument_NA, RtemsTaskReqRestart_Post_State_NA,
+ RtemsTaskReqRestart_Post_Enqueued_NA, RtemsTaskReqRestart_Post_Timer_NA,
+ RtemsTaskReqRestart_Post_Restarting_NA,
+ RtemsTaskReqRestart_Post_Terminating_NA,
+ RtemsTaskReqRestart_Post_Protected_NA,
+ RtemsTaskReqRestart_Post_RestartExtensions_NA,
+ RtemsTaskReqRestart_Post_TerminateExtensions_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Ready, RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_Yes,
+ RtemsTaskReqRestart_Post_Protected_No,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Ready, RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_No,
+ RtemsTaskReqRestart_Post_Protected_No,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set, RtemsTaskReqRestart_Post_State_Nop,
+ RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_No,
+ RtemsTaskReqRestart_Post_Protected_No,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set, RtemsTaskReqRestart_Post_State_Nop,
+ RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_Yes,
+ RtemsTaskReqRestart_Post_Protected_No,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Ready, RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_Yes,
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Blocked,
+ RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_Yes,
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Blocked,
+ RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Active,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_Yes,
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Blocked,
+ RtemsTaskReqRestart_Post_Enqueued_Yes,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_Yes,
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Blocked,
+ RtemsTaskReqRestart_Post_Enqueued_Yes,
+ RtemsTaskReqRestart_Post_Timer_Active,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_Yes,
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Ready, RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_No,
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Blocked,
+ RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_No,
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Blocked,
+ RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Active,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_No,
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Blocked,
+ RtemsTaskReqRestart_Post_Enqueued_Yes,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_No,
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqRestart_Post_Status_Ok,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Blocked,
+ RtemsTaskReqRestart_Post_Enqueued_Yes,
+ RtemsTaskReqRestart_Post_Timer_Active,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_No,
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqRestart_Post_Status_NoReturn,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Zombie,
+ RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_Yes,
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Yes },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqRestart_Post_Status_NoReturn,
+ RtemsTaskReqRestart_Post_FatalError_Nop,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Ready, RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_No,
+ RtemsTaskReqRestart_Post_Terminating_No,
+ RtemsTaskReqRestart_Post_Protected_No,
+ RtemsTaskReqRestart_Post_RestartExtensions_Yes,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqRestart_Post_Status_NoReturn,
+ RtemsTaskReqRestart_Post_FatalError_Yes,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Ready, RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_Yes,
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqRestart_Post_Status_NoReturn,
+ RtemsTaskReqRestart_Post_FatalError_Yes,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Ready, RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_Yes,
+ RtemsTaskReqRestart_Post_Protected_No,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqRestart_Post_Status_NoReturn,
+ RtemsTaskReqRestart_Post_FatalError_Yes,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Ready, RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_No,
+ RtemsTaskReqRestart_Post_Protected_Yes,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqRestart_Post_Status_NoReturn,
+ RtemsTaskReqRestart_Post_FatalError_Yes,
+ RtemsTaskReqRestart_Post_Argument_Set,
+ RtemsTaskReqRestart_Post_State_Ready, RtemsTaskReqRestart_Post_Enqueued_No,
+ RtemsTaskReqRestart_Post_Timer_Inactive,
+ RtemsTaskReqRestart_Post_Restarting_Yes,
+ RtemsTaskReqRestart_Post_Terminating_No,
+ RtemsTaskReqRestart_Post_Protected_No,
+ RtemsTaskReqRestart_Post_RestartExtensions_Nop,
+ RtemsTaskReqRestart_Post_TerminateExtensions_Nop }
+};
+
+static const uint8_t
+RtemsTaskReqRestart_Map[] = {
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
+ 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
+ 0, 3, 0, 3, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3,
+ 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 28, 26, 28, 26, 10, 10,
+ 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 16, 0, 16, 0, 10, 0,
+ 10, 0, 17, 0, 17, 0, 18, 0, 18, 0, 19, 0, 19, 0, 20, 0, 20, 0, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 29, 26, 29, 26, 10,
+ 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 12, 0, 12, 0, 10,
+ 0, 10, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 30, 27, 30, 27,
+ 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 21, 0, 21, 0,
+ 10, 0, 10, 0, 22, 0, 22, 0, 23, 0, 23, 0, 24, 0, 24, 0, 25, 0, 25, 0, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 31, 27, 31,
+ 27, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 13, 0,
+ 13, 0, 10, 0, 10, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0,
+ 14, 0, 14, 0, 10, 0, 10, 0, 14, 0, 14, 0, 14, 0, 14, 0, 14, 0, 14, 0, 14, 0,
+ 14, 0, 28, 26, 28, 26, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 16, 0, 16, 0, 10, 0, 10, 0, 17, 0, 17, 0, 18, 0, 18, 0, 19, 0, 19,
+ 0, 20, 0, 20, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 29, 26, 29, 26, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 12, 0, 12, 0, 10, 0, 10, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0,
+ 12, 0, 12, 0, 12, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 30, 27, 30, 27, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 21, 0, 21, 0, 10, 0, 10, 0, 22, 0, 22, 0, 23, 0, 23, 0, 24,
+ 0, 24, 0, 25, 0, 25, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 31, 27, 31, 27, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 13, 0, 13, 0, 10, 0, 10, 0, 13, 0, 13, 0, 13, 0, 13, 0,
+ 13, 0, 13, 0, 13, 0, 13, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 28, 26, 28, 26, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 16, 0, 16, 0, 10, 0, 10, 0, 17, 0, 17, 0, 18, 0,
+ 18, 0, 19, 0, 19, 0, 20, 0, 20, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 29, 26, 29, 26, 10, 10, 10, 10, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 12, 0, 12, 0, 10, 0, 10, 0, 12, 0, 12, 0,
+ 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 30, 27, 30, 27, 10, 10, 10, 10, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 21, 0, 21, 0, 10, 0, 10, 0, 22, 0, 22,
+ 0, 23, 0, 23, 0, 24, 0, 24, 0, 25, 0, 25, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 31, 27, 31, 27, 10, 10, 10, 10, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 13, 0, 13, 0, 10, 0, 10, 0, 13, 0,
+ 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 14, 0, 14, 0, 10, 0, 10, 0,
+ 14, 0, 14, 0, 14, 0, 14, 0, 14, 0, 14, 0, 14, 0, 14, 0, 28, 26, 28, 26, 10,
+ 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 16, 0, 16, 0, 10,
+ 0, 10, 0, 17, 0, 17, 0, 18, 0, 18, 0, 19, 0, 19, 0, 20, 0, 20, 0, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 29, 26, 29, 26,
+ 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 12, 0, 12, 0,
+ 10, 0, 10, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 30, 27, 30,
+ 27, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 21, 0,
+ 21, 0, 10, 0, 10, 0, 22, 0, 22, 0, 23, 0, 23, 0, 24, 0, 24, 0, 25, 0, 25, 0,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 31,
+ 27, 31, 27, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 13, 0, 13, 0, 10, 0, 10, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0,
+ 13, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 7, 0, 7, 0, 7,
+ 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 7, 0,
+ 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0,
+ 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 7, 0, 7, 0, 7, 0,
+ 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0,
+ 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0,
+ 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0,
+ 7, 0, 7, 0, 7, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 8, 0,
+ 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 8, 0, 8, 0,
+ 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 8, 0,
+ 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0,
+ 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 8, 0, 8, 0, 8, 0,
+ 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0,
+ 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 16, 16, 16, 16, 10, 10, 10, 10, 17, 17, 17, 17, 18,
+ 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 16, 0, 16, 0, 10, 0, 10, 0, 17,
+ 0, 17, 0, 18, 0, 18, 0, 19, 0, 19, 0, 20, 0, 20, 0, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 12, 12, 12, 12, 10, 10, 10,
+ 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0,
+ 12, 0, 10, 0, 10, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0,
+ 15, 0, 15, 0, 10, 0, 10, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0,
+ 15, 0, 21, 21, 21, 21, 10, 10, 10, 10, 22, 22, 22, 22, 23, 23, 23, 23, 24,
+ 24, 24, 24, 25, 25, 25, 25, 21, 0, 21, 0, 10, 0, 10, 0, 22, 0, 22, 0, 23, 0,
+ 23, 0, 24, 0, 24, 0, 25, 0, 25, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 13, 13, 13, 13, 10, 10, 10, 10, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 13, 0, 10, 0, 10, 0,
+ 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 14, 0, 14, 0, 10, 0,
+ 10, 0, 14, 0, 14, 0, 14, 0, 14, 0, 14, 0, 14, 0, 14, 0, 14, 0, 16, 16, 16,
+ 16, 10, 10, 10, 10, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20,
+ 20, 20, 16, 0, 16, 0, 10, 0, 10, 0, 17, 0, 17, 0, 18, 0, 18, 0, 19, 0, 19, 0,
+ 20, 0, 20, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 12, 12, 12, 12, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 0, 10, 0, 10, 0, 12, 0, 12, 0, 12, 0,
+ 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 15, 0, 15, 0, 10, 0, 10, 0, 15, 0, 15, 0,
+ 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 21, 21, 21, 21, 10, 10, 10, 10, 22,
+ 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 21, 0, 21, 0, 10,
+ 0, 10, 0, 22, 0, 22, 0, 23, 0, 23, 0, 24, 0, 24, 0, 25, 0, 25, 0, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 13, 13, 13, 13,
+ 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 0, 13, 0, 10, 0, 10, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13,
+ 0, 13, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 16, 16, 16, 16, 10, 10, 10, 10, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19,
+ 19, 19, 20, 20, 20, 20, 16, 0, 16, 0, 10, 0, 10, 0, 17, 0, 17, 0, 18, 0, 18,
+ 0, 19, 0, 19, 0, 20, 0, 20, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 12, 12, 12, 12, 10, 10, 10, 10, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 0, 10, 0, 10, 0,
+ 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 15, 0, 15, 0, 10, 0,
+ 10, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 21, 21, 21,
+ 21, 10, 10, 10, 10, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25,
+ 25, 25, 21, 0, 21, 0, 10, 0, 10, 0, 22, 0, 22, 0, 23, 0, 23, 0, 24, 0, 24, 0,
+ 25, 0, 25, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 13, 13, 13, 13, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 0, 13, 0, 10, 0, 10, 0, 13, 0, 13, 0, 13, 0,
+ 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 14, 0, 14, 0, 10, 0, 10, 0, 14, 0, 14, 0,
+ 14, 0, 14, 0, 14, 0, 14, 0, 14, 0, 14, 0, 16, 16, 16, 16, 10, 10, 10, 10, 17,
+ 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 16, 0, 16, 0, 10,
+ 0, 10, 0, 17, 0, 17, 0, 18, 0, 18, 0, 19, 0, 19, 0, 20, 0, 20, 0, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 12, 12, 12, 12,
+ 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 0, 12, 0, 10, 0, 10, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12,
+ 0, 12, 0, 15, 0, 15, 0, 10, 0, 10, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15,
+ 0, 15, 0, 15, 0, 21, 21, 21, 21, 10, 10, 10, 10, 22, 22, 22, 22, 23, 23, 23,
+ 23, 24, 24, 24, 24, 25, 25, 25, 25, 21, 0, 21, 0, 10, 0, 10, 0, 22, 0, 22, 0,
+ 23, 0, 23, 0, 24, 0, 24, 0, 25, 0, 25, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 13, 13, 13, 13, 10, 10, 10, 10, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 13, 0, 10, 0,
+ 10, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6
+};
+
+static size_t RtemsTaskReqRestart_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqRestart_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTaskReqRestart_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqRestart_Fixture = {
+ .setup = RtemsTaskReqRestart_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqRestart_Teardown_Wrap,
+ .scope = RtemsTaskReqRestart_Scope,
+ .initial_context = &RtemsTaskReqRestart_Instance
+};
+
+static inline RtemsTaskReqRestart_Entry RtemsTaskReqRestart_PopEntry(
+ RtemsTaskReqRestart_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqRestart_Entries[
+ RtemsTaskReqRestart_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqRestart_SetPreConditionStates(
+ RtemsTaskReqRestart_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_Dormant_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqRestart_Pre_Dormant_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Suspended_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsTaskReqRestart_Pre_Suspended_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Restarting_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsTaskReqRestart_Pre_Restarting_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Terminating_NA ) {
+ ctx->Map.pcs[ 4 ] = RtemsTaskReqRestart_Pre_Terminating_NA;
+ } else {
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Protected_NA ) {
+ ctx->Map.pcs[ 5 ] = RtemsTaskReqRestart_Pre_Protected_NA;
+ } else {
+ ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
+ }
+
+ ctx->Map.pcs[ 6 ] = ctx->Map.pci[ 6 ];
+
+ if ( ctx->Map.entry.Pre_State_NA ) {
+ ctx->Map.pcs[ 7 ] = RtemsTaskReqRestart_Pre_State_NA;
+ } else {
+ ctx->Map.pcs[ 7 ] = ctx->Map.pci[ 7 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Timer_NA ) {
+ ctx->Map.pcs[ 8 ] = RtemsTaskReqRestart_Pre_Timer_NA;
+ } else {
+ ctx->Map.pcs[ 8 ] = ctx->Map.pci[ 8 ];
+ }
+
+ if ( ctx->Map.entry.Pre_RealPriority_NA ) {
+ ctx->Map.pcs[ 9 ] = RtemsTaskReqRestart_Pre_RealPriority_NA;
+ } else {
+ ctx->Map.pcs[ 9 ] = ctx->Map.pci[ 9 ];
+ }
+
+ ctx->Map.pcs[ 10 ] = ctx->Map.pci[ 10 ];
+}
+
+static void RtemsTaskReqRestart_TestVariant( RtemsTaskReqRestart_Context *ctx )
+{
+ RtemsTaskReqRestart_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqRestart_Pre_Dormant_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqRestart_Pre_Suspended_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTaskReqRestart_Pre_Restarting_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTaskReqRestart_Pre_Terminating_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsTaskReqRestart_Pre_Protected_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsTaskReqRestart_Pre_Context_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsTaskReqRestart_Pre_State_Prepare( ctx, ctx->Map.pcs[ 7 ] );
+ RtemsTaskReqRestart_Pre_Timer_Prepare( ctx, ctx->Map.pcs[ 8 ] );
+ RtemsTaskReqRestart_Pre_RealPriority_Prepare( ctx, ctx->Map.pcs[ 9 ] );
+ RtemsTaskReqRestart_Pre_ThreadDispatch_Prepare( ctx, ctx->Map.pcs[ 10 ] );
+ RtemsTaskReqRestart_Action( ctx );
+ RtemsTaskReqRestart_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTaskReqRestart_Post_FatalError_Check(
+ ctx,
+ ctx->Map.entry.Post_FatalError
+ );
+ RtemsTaskReqRestart_Post_Argument_Check( ctx, ctx->Map.entry.Post_Argument );
+ RtemsTaskReqRestart_Post_State_Check( ctx, ctx->Map.entry.Post_State );
+ RtemsTaskReqRestart_Post_Enqueued_Check( ctx, ctx->Map.entry.Post_Enqueued );
+ RtemsTaskReqRestart_Post_Timer_Check( ctx, ctx->Map.entry.Post_Timer );
+ RtemsTaskReqRestart_Post_Restarting_Check(
+ ctx,
+ ctx->Map.entry.Post_Restarting
+ );
+ RtemsTaskReqRestart_Post_Terminating_Check(
+ ctx,
+ ctx->Map.entry.Post_Terminating
+ );
+ RtemsTaskReqRestart_Post_Protected_Check(
+ ctx,
+ ctx->Map.entry.Post_Protected
+ );
+ RtemsTaskReqRestart_Post_RestartExtensions_Check(
+ ctx,
+ ctx->Map.entry.Post_RestartExtensions
+ );
+ RtemsTaskReqRestart_Post_TerminateExtensions_Check(
+ ctx,
+ ctx->Map.entry.Post_TerminateExtensions
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqRestart( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTaskReqRestart, &RtemsTaskReqRestart_Fixture )
+{
+ RtemsTaskReqRestart_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsTaskReqRestart_Pre_Id_Invalid;
+ ctx->Map.pci[ 0 ] < RtemsTaskReqRestart_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsTaskReqRestart_Pre_Dormant_Yes;
+ ctx->Map.pci[ 1 ] < RtemsTaskReqRestart_Pre_Dormant_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsTaskReqRestart_Pre_Suspended_Yes;
+ ctx->Map.pci[ 2 ] < RtemsTaskReqRestart_Pre_Suspended_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsTaskReqRestart_Pre_Restarting_Yes;
+ ctx->Map.pci[ 3 ] < RtemsTaskReqRestart_Pre_Restarting_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = RtemsTaskReqRestart_Pre_Terminating_Yes;
+ ctx->Map.pci[ 4 ] < RtemsTaskReqRestart_Pre_Terminating_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ for (
+ ctx->Map.pci[ 5 ] = RtemsTaskReqRestart_Pre_Protected_Yes;
+ ctx->Map.pci[ 5 ] < RtemsTaskReqRestart_Pre_Protected_NA;
+ ++ctx->Map.pci[ 5 ]
+ ) {
+ for (
+ ctx->Map.pci[ 6 ] = RtemsTaskReqRestart_Pre_Context_Task;
+ ctx->Map.pci[ 6 ] < RtemsTaskReqRestart_Pre_Context_NA;
+ ++ctx->Map.pci[ 6 ]
+ ) {
+ for (
+ ctx->Map.pci[ 7 ] = RtemsTaskReqRestart_Pre_State_Ready;
+ ctx->Map.pci[ 7 ] < RtemsTaskReqRestart_Pre_State_NA;
+ ++ctx->Map.pci[ 7 ]
+ ) {
+ for (
+ ctx->Map.pci[ 8 ] = RtemsTaskReqRestart_Pre_Timer_Inactive;
+ ctx->Map.pci[ 8 ] < RtemsTaskReqRestart_Pre_Timer_NA;
+ ++ctx->Map.pci[ 8 ]
+ ) {
+ for (
+ ctx->Map.pci[ 9 ] = RtemsTaskReqRestart_Pre_RealPriority_Initial;
+ ctx->Map.pci[ 9 ] < RtemsTaskReqRestart_Pre_RealPriority_NA;
+ ++ctx->Map.pci[ 9 ]
+ ) {
+ for (
+ ctx->Map.pci[ 10 ] = RtemsTaskReqRestart_Pre_ThreadDispatch_Disabled;
+ ctx->Map.pci[ 10 ] < RtemsTaskReqRestart_Pre_ThreadDispatch_NA;
+ ++ctx->Map.pci[ 10 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqRestart_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsTaskReqRestart_SetPreConditionStates( ctx );
+ RtemsTaskReqRestart_Prepare( ctx );
+ RtemsTaskReqRestart_TestVariant( ctx );
+ RtemsTaskReqRestart_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-resume.c b/testsuites/validation/tc-task-resume.c
new file mode 100644
index 0000000000..d440b52bd5
--- /dev/null
+++ b/testsuites/validation/tc-task-resume.c
@@ -0,0 +1,411 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqResume
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqResume spec:/rtems/task/req/resume
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqResume_Pre_Id_Invalid,
+ RtemsTaskReqResume_Pre_Id_Task,
+ RtemsTaskReqResume_Pre_Id_NA
+} RtemsTaskReqResume_Pre_Id;
+
+typedef enum {
+ RtemsTaskReqResume_Pre_Suspended_Yes,
+ RtemsTaskReqResume_Pre_Suspended_No,
+ RtemsTaskReqResume_Pre_Suspended_NA
+} RtemsTaskReqResume_Pre_Suspended;
+
+typedef enum {
+ RtemsTaskReqResume_Post_Status_Ok,
+ RtemsTaskReqResume_Post_Status_InvId,
+ RtemsTaskReqResume_Post_Status_IncStat,
+ RtemsTaskReqResume_Post_Status_NA
+} RtemsTaskReqResume_Post_Status;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Pre_Suspended_NA : 1;
+ uint8_t Post_Status : 2;
+} RtemsTaskReqResume_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/resume test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the identifier of a task.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief If this member is true, then the worker is suspended before the
+ * rtems_task_resume() call.
+ */
+ bool suspend;
+
+ /**
+ * @brief This member contains the return value of the rtems_task_resume()
+ * call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``id`` parameter value.
+ */
+ rtems_id id;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 2 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqResume_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqResume_Context;
+
+static RtemsTaskReqResume_Context
+ RtemsTaskReqResume_Instance;
+
+static const char * const RtemsTaskReqResume_PreDesc_Id[] = {
+ "Invalid",
+ "Task",
+ "NA"
+};
+
+static const char * const RtemsTaskReqResume_PreDesc_Suspended[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqResume_PreDesc[] = {
+ RtemsTaskReqResume_PreDesc_Id,
+ RtemsTaskReqResume_PreDesc_Suspended,
+ NULL
+};
+
+static void Worker( rtems_task_argument arg )
+{
+ while ( true ) {
+ /* Do nothing */
+ }
+}
+
+static void RtemsTaskReqResume_Pre_Id_Prepare(
+ RtemsTaskReqResume_Context *ctx,
+ RtemsTaskReqResume_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqResume_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is not associated with a task.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqResume_Pre_Id_Task: {
+ /*
+ * While the ``id`` parameter is associated with a task.
+ */
+ ctx->id = ctx->worker_id;
+ break;
+ }
+
+ case RtemsTaskReqResume_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqResume_Pre_Suspended_Prepare(
+ RtemsTaskReqResume_Context *ctx,
+ RtemsTaskReqResume_Pre_Suspended state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqResume_Pre_Suspended_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is suspended.
+ */
+ ctx->suspend = true;
+ break;
+ }
+
+ case RtemsTaskReqResume_Pre_Suspended_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not suspended.
+ */
+ ctx->suspend = false;
+ break;
+ }
+
+ case RtemsTaskReqResume_Pre_Suspended_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqResume_Post_Status_Check(
+ RtemsTaskReqResume_Context *ctx,
+ RtemsTaskReqResume_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqResume_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_resume() shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqResume_Post_Status_InvId: {
+ /*
+ * The return status of rtems_task_resume() shall be RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqResume_Post_Status_IncStat: {
+ /*
+ * The return status of rtems_task_resume() shall be
+ * RTEMS_INCORRECT_STATE.
+ */
+ T_rsc( ctx->status, RTEMS_INCORRECT_STATE );
+ break;
+ }
+
+ case RtemsTaskReqResume_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqResume_Setup( RtemsTaskReqResume_Context *ctx )
+{
+ ctx->worker_id = CreateTask( "WORK", PRIO_LOW );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+static void RtemsTaskReqResume_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqResume_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqResume_Setup( ctx );
+}
+
+static void RtemsTaskReqResume_Teardown( RtemsTaskReqResume_Context *ctx )
+{
+ DeleteTask( ctx->worker_id );
+}
+
+static void RtemsTaskReqResume_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqResume_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqResume_Teardown( ctx );
+}
+
+static void RtemsTaskReqResume_Action( RtemsTaskReqResume_Context *ctx )
+{
+ if ( ctx->suspend ) {
+ SuspendTask( ctx->worker_id );
+ }
+
+ ctx->status = rtems_task_resume( ctx->id );
+
+ if ( ctx->suspend && ctx->status != RTEMS_SUCCESSFUL ) {
+ ResumeTask( ctx->worker_id );
+ }
+}
+
+static const RtemsTaskReqResume_Entry
+RtemsTaskReqResume_Entries[] = {
+ { 0, 0, 1, RtemsTaskReqResume_Post_Status_InvId },
+ { 0, 0, 0, RtemsTaskReqResume_Post_Status_Ok },
+ { 0, 0, 0, RtemsTaskReqResume_Post_Status_IncStat }
+};
+
+static const uint8_t
+RtemsTaskReqResume_Map[] = {
+ 0, 0, 1, 2
+};
+
+static size_t RtemsTaskReqResume_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqResume_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTaskReqResume_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqResume_Fixture = {
+ .setup = RtemsTaskReqResume_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqResume_Teardown_Wrap,
+ .scope = RtemsTaskReqResume_Scope,
+ .initial_context = &RtemsTaskReqResume_Instance
+};
+
+static inline RtemsTaskReqResume_Entry RtemsTaskReqResume_PopEntry(
+ RtemsTaskReqResume_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqResume_Entries[
+ RtemsTaskReqResume_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqResume_SetPreConditionStates(
+ RtemsTaskReqResume_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_Suspended_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqResume_Pre_Suspended_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+}
+
+static void RtemsTaskReqResume_TestVariant( RtemsTaskReqResume_Context *ctx )
+{
+ RtemsTaskReqResume_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqResume_Pre_Suspended_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqResume_Action( ctx );
+ RtemsTaskReqResume_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqResume( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTaskReqResume, &RtemsTaskReqResume_Fixture )
+{
+ RtemsTaskReqResume_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsTaskReqResume_Pre_Id_Invalid;
+ ctx->Map.pci[ 0 ] < RtemsTaskReqResume_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsTaskReqResume_Pre_Suspended_Yes;
+ ctx->Map.pci[ 1 ] < RtemsTaskReqResume_Pre_Suspended_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqResume_PopEntry( ctx );
+ RtemsTaskReqResume_SetPreConditionStates( ctx );
+ RtemsTaskReqResume_TestVariant( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-set-affinity.c b/testsuites/validation/tc-task-set-affinity.c
new file mode 100644
index 0000000000..9502d009e1
--- /dev/null
+++ b/testsuites/validation/tc-task-set-affinity.c
@@ -0,0 +1,683 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqSetAffinity
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/test-scheduler.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqSetAffinity spec:/rtems/task/req/set-affinity
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationOneCpu0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqSetAffinity_Pre_Id_Invalid,
+ RtemsTaskReqSetAffinity_Pre_Id_Task,
+ RtemsTaskReqSetAffinity_Pre_Id_NA
+} RtemsTaskReqSetAffinity_Pre_Id;
+
+typedef enum {
+ RtemsTaskReqSetAffinity_Pre_CPUSetSize_Askew,
+ RtemsTaskReqSetAffinity_Pre_CPUSetSize_Normal,
+ RtemsTaskReqSetAffinity_Pre_CPUSetSize_Huge,
+ RtemsTaskReqSetAffinity_Pre_CPUSetSize_NA
+} RtemsTaskReqSetAffinity_Pre_CPUSetSize;
+
+typedef enum {
+ RtemsTaskReqSetAffinity_Pre_CPUSetOnline_Supported,
+ RtemsTaskReqSetAffinity_Pre_CPUSetOnline_Unsupported,
+ RtemsTaskReqSetAffinity_Pre_CPUSetOnline_NA
+} RtemsTaskReqSetAffinity_Pre_CPUSetOnline;
+
+typedef enum {
+ RtemsTaskReqSetAffinity_Pre_CPUSetHuge_NotZero,
+ RtemsTaskReqSetAffinity_Pre_CPUSetHuge_Zero,
+ RtemsTaskReqSetAffinity_Pre_CPUSetHuge_NA
+} RtemsTaskReqSetAffinity_Pre_CPUSetHuge;
+
+typedef enum {
+ RtemsTaskReqSetAffinity_Pre_CPUSet_Valid,
+ RtemsTaskReqSetAffinity_Pre_CPUSet_Null,
+ RtemsTaskReqSetAffinity_Pre_CPUSet_NA
+} RtemsTaskReqSetAffinity_Pre_CPUSet;
+
+typedef enum {
+ RtemsTaskReqSetAffinity_Post_Status_Ok,
+ RtemsTaskReqSetAffinity_Post_Status_InvAddr,
+ RtemsTaskReqSetAffinity_Post_Status_InvId,
+ RtemsTaskReqSetAffinity_Post_Status_InvNum,
+ RtemsTaskReqSetAffinity_Post_Status_NA
+} RtemsTaskReqSetAffinity_Post_Status;
+
+typedef enum {
+ RtemsTaskReqSetAffinity_Post_SetAffinity_Set,
+ RtemsTaskReqSetAffinity_Post_SetAffinity_Nop,
+ RtemsTaskReqSetAffinity_Post_SetAffinity_NA
+} RtemsTaskReqSetAffinity_Post_SetAffinity;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_CPUSetSize_NA : 1;
+ uint16_t Pre_CPUSetOnline_NA : 1;
+ uint16_t Pre_CPUSetHuge_NA : 1;
+ uint16_t Pre_CPUSet_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_SetAffinity : 2;
+} RtemsTaskReqSetAffinity_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/set-affinity test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides the scheduler operation records.
+ */
+ T_scheduler_log_2 scheduler_log;
+
+ /**
+ * @brief This member provides the object referenced by the ``cpuset``
+ * parameter.
+ */
+ cpu_set_t cpuset_obj[ 2 ];
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_task_set_affinity() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``id`` parameter value.
+ */
+ rtems_id id;
+
+ /**
+ * @brief This member specifies if the ``cpusetsize`` parameter value.
+ */
+ size_t cpusetsize;
+
+ /**
+ * @brief This member specifies if the ``cpuset`` parameter value.
+ */
+ cpu_set_t *cpuset;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 5 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 5 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqSetAffinity_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqSetAffinity_Context;
+
+static RtemsTaskReqSetAffinity_Context
+ RtemsTaskReqSetAffinity_Instance;
+
+static const char * const RtemsTaskReqSetAffinity_PreDesc_Id[] = {
+ "Invalid",
+ "Task",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetAffinity_PreDesc_CPUSetSize[] = {
+ "Askew",
+ "Normal",
+ "Huge",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetAffinity_PreDesc_CPUSetOnline[] = {
+ "Supported",
+ "Unsupported",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetAffinity_PreDesc_CPUSetHuge[] = {
+ "NotZero",
+ "Zero",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetAffinity_PreDesc_CPUSet[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqSetAffinity_PreDesc[] = {
+ RtemsTaskReqSetAffinity_PreDesc_Id,
+ RtemsTaskReqSetAffinity_PreDesc_CPUSetSize,
+ RtemsTaskReqSetAffinity_PreDesc_CPUSetOnline,
+ RtemsTaskReqSetAffinity_PreDesc_CPUSetHuge,
+ RtemsTaskReqSetAffinity_PreDesc_CPUSet,
+ NULL
+};
+
+static void RtemsTaskReqSetAffinity_Pre_Id_Prepare(
+ RtemsTaskReqSetAffinity_Context *ctx,
+ RtemsTaskReqSetAffinity_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetAffinity_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is not associated with a task.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Pre_Id_Task: {
+ /*
+ * While the ``id`` parameter is associated with a task.
+ */
+ ctx->id = RTEMS_SELF;
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetAffinity_Pre_CPUSetSize_Prepare(
+ RtemsTaskReqSetAffinity_Context *ctx,
+ RtemsTaskReqSetAffinity_Pre_CPUSetSize state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetAffinity_Pre_CPUSetSize_Askew: {
+ /*
+ * While the ``cpusetsize`` parameter is not an integral multiple of the
+ * size of long.
+ */
+ ctx->cpusetsize = SIZE_MAX;
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Pre_CPUSetSize_Normal: {
+ /*
+ * While the ``cpusetsize`` parameter is an integral multiple of the size
+ * of long, while the ``cpusetsize`` parameter is less than or equal to
+ * the maximum processor set size storable in the system.
+ */
+ ctx->cpusetsize = sizeof( ctx->cpuset_obj[ 0 ] );
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Pre_CPUSetSize_Huge: {
+ /*
+ * While the ``cpusetsize`` parameter is an integral multiple of the size
+ * of long, while the ``cpusetsize`` parameter is greater than the
+ * maximum processor set size storable in the system.
+ */
+ ctx->cpusetsize = sizeof( ctx->cpuset_obj );
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Pre_CPUSetSize_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetAffinity_Pre_CPUSetOnline_Prepare(
+ RtemsTaskReqSetAffinity_Context *ctx,
+ RtemsTaskReqSetAffinity_Pre_CPUSetOnline state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetAffinity_Pre_CPUSetOnline_Supported: {
+ /*
+ * While the intersection of the processor set specified by the
+ * ``cpusetsize`` and ``cpuset`` parameters and the set of online
+ * processors represents an affinity set supported by the home scheduler
+ * of the task specified by the ``id`` parameter at some point during the
+ * rtems_task_set_affinity() call.
+ */
+ /* Already prepared */
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Pre_CPUSetOnline_Unsupported: {
+ /*
+ * While the intersection of the processor set specified by the
+ * ``cpusetsize`` and ``cpuset`` parameters and the set of online
+ * processors represents an affinity set not supported by the home
+ * scheduler of the task specified by the ``id`` parameter at some point
+ * during the rtems_task_set_affinity() call.
+ */
+ CPU_CLR( 0, &ctx->cpuset_obj[ 0 ] );
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Pre_CPUSetOnline_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetAffinity_Pre_CPUSetHuge_Prepare(
+ RtemsTaskReqSetAffinity_Context *ctx,
+ RtemsTaskReqSetAffinity_Pre_CPUSetHuge state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetAffinity_Pre_CPUSetHuge_NotZero: {
+ /*
+ * While the processor set specified by the ``cpusetsize`` and ``cpuset``
+ * parameters contains at least one processor which is not storable in a
+ * processor set supported by the system.
+ */
+ /* Already prepared */
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Pre_CPUSetHuge_Zero: {
+ /*
+ * While the processor set specified by the ``cpusetsize`` and ``cpuset``
+ * parameters contains no processor which is not storable in a processor
+ * set supported by the system.
+ */
+ CPU_ZERO( &ctx->cpuset_obj[ 1 ] );
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Pre_CPUSetHuge_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetAffinity_Pre_CPUSet_Prepare(
+ RtemsTaskReqSetAffinity_Context *ctx,
+ RtemsTaskReqSetAffinity_Pre_CPUSet state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetAffinity_Pre_CPUSet_Valid: {
+ /*
+ * While the ``cpuset`` parameter references an object of type cpu_set_t.
+ */
+ ctx->cpuset = &ctx->cpuset_obj[ 0 ];
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Pre_CPUSet_Null: {
+ /*
+ * While the ``cpuset`` parameter is equal to NULL.
+ */
+ ctx->cpuset = NULL;
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Pre_CPUSet_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetAffinity_Post_Status_Check(
+ RtemsTaskReqSetAffinity_Context *ctx,
+ RtemsTaskReqSetAffinity_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetAffinity_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_set_affinity() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_task_set_affinity() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Post_Status_InvId: {
+ /*
+ * The return status of rtems_task_set_affinity() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Post_Status_InvNum: {
+ /*
+ * The return status of rtems_task_set_affinity() shall be
+ * RTEMS_INVALID_NUMBER.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NUMBER );
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetAffinity_Post_SetAffinity_Check(
+ RtemsTaskReqSetAffinity_Context *ctx,
+ RtemsTaskReqSetAffinity_Post_SetAffinity state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetAffinity_Post_SetAffinity_Set: {
+ /*
+ * The affinity set of the task specified by the ``id`` parameter shall
+ * be set with respect to the home scheduler of the task at some point
+ * during the rtems_task_set_affinity() call.
+ */
+ #if defined(RTEMS_SMP)
+ T_eq_sz( ctx->scheduler_log.header.recorded, 1 );
+ T_eq_int(
+ ctx->scheduler_log.events[ 0 ].operation,
+ T_SCHEDULER_SET_AFFINITY
+ );
+ T_eq_int(
+ ctx->scheduler_log.events[ 0 ].set_affinity.status,
+ STATUS_SUCCESSFUL
+ );
+ #else
+ T_eq_sz( ctx->scheduler_log.header.recorded, 0 );
+ #endif
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Post_SetAffinity_Nop: {
+ /*
+ * No task affinity shall be modified by the rtems_task_set_affinity()
+ * call.
+ */
+ #if defined(RTEMS_SMP)
+ if ( ctx->scheduler_log.header.recorded == 1 ) {
+ T_eq_int(
+ ctx->scheduler_log.events[ 0 ].operation,
+ T_SCHEDULER_SET_AFFINITY
+ );
+ T_eq_int(
+ ctx->scheduler_log.events[ 0 ].set_affinity.status,
+ STATUS_INVALID_NUMBER
+ );
+ } else {
+ T_eq_sz( ctx->scheduler_log.header.recorded, 0 );
+ }
+ #else
+ T_eq_sz( ctx->scheduler_log.header.recorded, 0 );
+ #endif
+ break;
+ }
+
+ case RtemsTaskReqSetAffinity_Post_SetAffinity_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetAffinity_Prepare(
+ RtemsTaskReqSetAffinity_Context *ctx
+)
+{
+ CPU_FILL_S( sizeof( ctx->cpuset_obj ), &ctx->cpuset_obj[ 0 ] );
+}
+
+static void RtemsTaskReqSetAffinity_Action(
+ RtemsTaskReqSetAffinity_Context *ctx
+)
+{
+ T_scheduler_log *log;
+
+ log = T_scheduler_record_2( &ctx->scheduler_log );
+ T_null( log );
+
+ ctx->status = rtems_task_set_affinity(
+ ctx->id,
+ ctx->cpusetsize,
+ ctx->cpuset
+ );
+
+ log = T_scheduler_record( NULL );
+ T_eq_ptr( &log->header, &ctx->scheduler_log.header );
+}
+
+static const RtemsTaskReqSetAffinity_Entry
+RtemsTaskReqSetAffinity_Entries[] = {
+ { 0, 0, 0, 1, 1, 0, RtemsTaskReqSetAffinity_Post_Status_InvAddr,
+ RtemsTaskReqSetAffinity_Post_SetAffinity_Nop },
+ { 0, 0, 0, 1, 1, 0, RtemsTaskReqSetAffinity_Post_Status_InvId,
+ RtemsTaskReqSetAffinity_Post_SetAffinity_Nop },
+ { 0, 0, 0, 0, 1, 0, RtemsTaskReqSetAffinity_Post_Status_InvNum,
+ RtemsTaskReqSetAffinity_Post_SetAffinity_Nop },
+ { 0, 0, 0, 1, 0, 0, RtemsTaskReqSetAffinity_Post_Status_InvId,
+ RtemsTaskReqSetAffinity_Post_SetAffinity_Nop },
+ { 0, 0, 0, 0, 1, 0, RtemsTaskReqSetAffinity_Post_Status_Ok,
+ RtemsTaskReqSetAffinity_Post_SetAffinity_Set },
+ { 0, 0, 0, 0, 0, 0, RtemsTaskReqSetAffinity_Post_Status_Ok,
+ RtemsTaskReqSetAffinity_Post_SetAffinity_Set },
+ { 0, 0, 0, 0, 0, 0, RtemsTaskReqSetAffinity_Post_Status_InvNum,
+ RtemsTaskReqSetAffinity_Post_SetAffinity_Nop }
+};
+
+static const uint8_t
+RtemsTaskReqSetAffinity_Map[] = {
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 3, 0, 3, 0, 3, 0, 2, 0,
+ 2, 0, 2, 0, 2, 0, 4, 0, 4, 0, 2, 0, 2, 0, 5, 0, 5, 0, 6, 0, 6, 0
+};
+
+static size_t RtemsTaskReqSetAffinity_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqSetAffinity_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsTaskReqSetAffinity_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqSetAffinity_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsTaskReqSetAffinity_Scope,
+ .initial_context = &RtemsTaskReqSetAffinity_Instance
+};
+
+static inline RtemsTaskReqSetAffinity_Entry RtemsTaskReqSetAffinity_PopEntry(
+ RtemsTaskReqSetAffinity_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqSetAffinity_Entries[
+ RtemsTaskReqSetAffinity_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqSetAffinity_SetPreConditionStates(
+ RtemsTaskReqSetAffinity_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+
+ if ( ctx->Map.entry.Pre_CPUSetOnline_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsTaskReqSetAffinity_Pre_CPUSetOnline_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+
+ if ( ctx->Map.entry.Pre_CPUSetHuge_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsTaskReqSetAffinity_Pre_CPUSetHuge_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+}
+
+static void RtemsTaskReqSetAffinity_TestVariant(
+ RtemsTaskReqSetAffinity_Context *ctx
+)
+{
+ RtemsTaskReqSetAffinity_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqSetAffinity_Pre_CPUSetSize_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqSetAffinity_Pre_CPUSetOnline_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTaskReqSetAffinity_Pre_CPUSetHuge_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTaskReqSetAffinity_Pre_CPUSet_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsTaskReqSetAffinity_Action( ctx );
+ RtemsTaskReqSetAffinity_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTaskReqSetAffinity_Post_SetAffinity_Check(
+ ctx,
+ ctx->Map.entry.Post_SetAffinity
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqSetAffinity( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsTaskReqSetAffinity,
+ &RtemsTaskReqSetAffinity_Fixture
+)
+{
+ RtemsTaskReqSetAffinity_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsTaskReqSetAffinity_Pre_Id_Invalid;
+ ctx->Map.pci[ 0 ] < RtemsTaskReqSetAffinity_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsTaskReqSetAffinity_Pre_CPUSetSize_Askew;
+ ctx->Map.pci[ 1 ] < RtemsTaskReqSetAffinity_Pre_CPUSetSize_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsTaskReqSetAffinity_Pre_CPUSetOnline_Supported;
+ ctx->Map.pci[ 2 ] < RtemsTaskReqSetAffinity_Pre_CPUSetOnline_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsTaskReqSetAffinity_Pre_CPUSetHuge_NotZero;
+ ctx->Map.pci[ 3 ] < RtemsTaskReqSetAffinity_Pre_CPUSetHuge_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = RtemsTaskReqSetAffinity_Pre_CPUSet_Valid;
+ ctx->Map.pci[ 4 ] < RtemsTaskReqSetAffinity_Pre_CPUSet_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqSetAffinity_PopEntry( ctx );
+ RtemsTaskReqSetAffinity_SetPreConditionStates( ctx );
+ RtemsTaskReqSetAffinity_Prepare( ctx );
+ RtemsTaskReqSetAffinity_TestVariant( ctx );
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-set-priority.c b/testsuites/validation/tc-task-set-priority.c
new file mode 100644
index 0000000000..4094aaedfb
--- /dev/null
+++ b/testsuites/validation/tc-task-set-priority.c
@@ -0,0 +1,815 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqSetPriority
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqSetPriority spec:/rtems/task/req/set-priority
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationOneCpu0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqSetPriority_Pre_Id_Invalid,
+ RtemsTaskReqSetPriority_Pre_Id_Task,
+ RtemsTaskReqSetPriority_Pre_Id_NA
+} RtemsTaskReqSetPriority_Pre_Id;
+
+typedef enum {
+ RtemsTaskReqSetPriority_Pre_State_Dormant,
+ RtemsTaskReqSetPriority_Pre_State_Ready,
+ RtemsTaskReqSetPriority_Pre_State_Scheduled,
+ RtemsTaskReqSetPriority_Pre_State_Blocked,
+ RtemsTaskReqSetPriority_Pre_State_NA
+} RtemsTaskReqSetPriority_Pre_State;
+
+typedef enum {
+ RtemsTaskReqSetPriority_Pre_NewPriority_Current,
+ RtemsTaskReqSetPriority_Pre_NewPriority_Other,
+ RtemsTaskReqSetPriority_Pre_NewPriority_NA
+} RtemsTaskReqSetPriority_Pre_NewPriority;
+
+typedef enum {
+ RtemsTaskReqSetPriority_Pre_TaskPriority_High,
+ RtemsTaskReqSetPriority_Pre_TaskPriority_Equal,
+ RtemsTaskReqSetPriority_Pre_TaskPriority_Low,
+ RtemsTaskReqSetPriority_Pre_TaskPriority_Invalid,
+ RtemsTaskReqSetPriority_Pre_TaskPriority_NA
+} RtemsTaskReqSetPriority_Pre_TaskPriority;
+
+typedef enum {
+ RtemsTaskReqSetPriority_Pre_OldPriority_Valid,
+ RtemsTaskReqSetPriority_Pre_OldPriority_Null,
+ RtemsTaskReqSetPriority_Pre_OldPriority_NA
+} RtemsTaskReqSetPriority_Pre_OldPriority;
+
+typedef enum {
+ RtemsTaskReqSetPriority_Post_Status_Ok,
+ RtemsTaskReqSetPriority_Post_Status_InvAddr,
+ RtemsTaskReqSetPriority_Post_Status_InvId,
+ RtemsTaskReqSetPriority_Post_Status_InvPrio,
+ RtemsTaskReqSetPriority_Post_Status_NA
+} RtemsTaskReqSetPriority_Post_Status;
+
+typedef enum {
+ RtemsTaskReqSetPriority_Post_Priority_Set,
+ RtemsTaskReqSetPriority_Post_Priority_Nop,
+ RtemsTaskReqSetPriority_Post_Priority_NA
+} RtemsTaskReqSetPriority_Post_Priority;
+
+typedef enum {
+ RtemsTaskReqSetPriority_Post_OldPriorityObj_Set,
+ RtemsTaskReqSetPriority_Post_OldPriorityObj_Nop,
+ RtemsTaskReqSetPriority_Post_OldPriorityObj_NA
+} RtemsTaskReqSetPriority_Post_OldPriorityObj;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_State_NA : 1;
+ uint16_t Pre_NewPriority_NA : 1;
+ uint16_t Pre_TaskPriority_NA : 1;
+ uint16_t Pre_OldPriority_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_Priority : 2;
+ uint16_t Post_OldPriorityObj : 2;
+} RtemsTaskReqSetPriority_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/set-priority test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the worker task identifier.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief If this member is true, then the task shall be started.
+ */
+ bool started;
+
+ /**
+ * @brief If this member is true, then the task shall be blocked.
+ */
+ bool blocked;
+
+ /**
+ * @brief This member provides the object referenced by the ``old_priority``
+ * parameter.
+ */
+ rtems_task_priority old_priority_obj;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_task_set_priority() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``id`` parameter value.
+ */
+ rtems_id id;
+
+ /**
+ * @brief This member specifies if the ``new_priority`` parameter value.
+ */
+ rtems_task_priority new_priority;
+
+ /**
+ * @brief This member specifies if the ``old_priority`` parameter value.
+ */
+ rtems_task_priority *old_priority;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 5 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 5 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqSetPriority_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqSetPriority_Context;
+
+static RtemsTaskReqSetPriority_Context
+ RtemsTaskReqSetPriority_Instance;
+
+static const char * const RtemsTaskReqSetPriority_PreDesc_Id[] = {
+ "Invalid",
+ "Task",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetPriority_PreDesc_State[] = {
+ "Dormant",
+ "Ready",
+ "Scheduled",
+ "Blocked",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetPriority_PreDesc_NewPriority[] = {
+ "Current",
+ "Other",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetPriority_PreDesc_TaskPriority[] = {
+ "High",
+ "Equal",
+ "Low",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetPriority_PreDesc_OldPriority[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqSetPriority_PreDesc[] = {
+ RtemsTaskReqSetPriority_PreDesc_Id,
+ RtemsTaskReqSetPriority_PreDesc_State,
+ RtemsTaskReqSetPriority_PreDesc_NewPriority,
+ RtemsTaskReqSetPriority_PreDesc_TaskPriority,
+ RtemsTaskReqSetPriority_PreDesc_OldPriority,
+ NULL
+};
+
+static void Worker( rtems_task_argument arg )
+{
+ (void) ReceiveAnyEvents();
+ (void) ReceiveAnyEvents();
+}
+
+static void RtemsTaskReqSetPriority_Pre_Id_Prepare(
+ RtemsTaskReqSetPriority_Context *ctx,
+ RtemsTaskReqSetPriority_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetPriority_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is not associated with a task.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_Id_Task: {
+ /*
+ * While the ``id`` parameter is associated with a task.
+ */
+ ctx->id = ctx->worker_id;
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetPriority_Pre_State_Prepare(
+ RtemsTaskReqSetPriority_Context *ctx,
+ RtemsTaskReqSetPriority_Pre_State state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetPriority_Pre_State_Dormant: {
+ /*
+ * While the task specified by the ``id`` parameter is dormant.
+ */
+ ctx->started = false;
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_State_Ready: {
+ /*
+ * While the task specified by the ``id`` parameter is ready.
+ */
+ ctx->started = true;
+ ctx->blocked = false;
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_State_Scheduled: {
+ /*
+ * While the task specified by the ``id`` parameter is scheduled.
+ */
+ ctx->started = false;
+ ctx->id = rtems_task_self();
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_State_Blocked: {
+ /*
+ * While the task specified by the ``id`` parameter is blocked.
+ */
+ ctx->started = true;
+ ctx->blocked = true;
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_State_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetPriority_Pre_NewPriority_Prepare(
+ RtemsTaskReqSetPriority_Context *ctx,
+ RtemsTaskReqSetPriority_Pre_NewPriority state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetPriority_Pre_NewPriority_Current: {
+ /*
+ * While the value of the ``new_priority`` parameter is equal to
+ * RTEMS_CURRENT_PRIORITY.
+ */
+ ctx->new_priority = RTEMS_CURRENT_PRIORITY;
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_NewPriority_Other: {
+ /*
+ * While the value of the ``new_priority`` parameter is not equal to
+ * RTEMS_CURRENT_PRIORITY.
+ */
+ ctx->new_priority = PRIO_NORMAL;
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_NewPriority_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetPriority_Pre_TaskPriority_Prepare(
+ RtemsTaskReqSetPriority_Context *ctx,
+ RtemsTaskReqSetPriority_Pre_TaskPriority state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetPriority_Pre_TaskPriority_High: {
+ /*
+ * While the value of the ``new_priority`` parameter is a valid task
+ * priority with respect to the home scheduler of the task specified by
+ * the ``id`` parameter when the new priority is set, while the value of
+ * the ``new_priority`` parameter is higher than the task priority with
+ * respect to the home scheduler of the task specified by the ``id``
+ * parameter at time when the scheduler evaluates the new priority.
+ */
+ ctx->new_priority = PRIO_HIGH;
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_TaskPriority_Equal: {
+ /*
+ * While the value of the ``new_priority`` parameter is a valid task
+ * priority with respect to the home scheduler of the task specified by
+ * the ``id`` parameter when the new priority is set, while the value of
+ * the ``new_priority`` parameter is equal to the task priority with
+ * respect to the home scheduler of the task specified by the ``id``
+ * parameter at time when the scheduler evaluates the new priority.
+ */
+ ctx->new_priority = PRIO_NORMAL;
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_TaskPriority_Low: {
+ /*
+ * While the value of the ``new_priority`` parameter is a valid task
+ * priority with respect to the home scheduler of the task specified by
+ * the ``id`` parameter when the new priority is set, while the value of
+ * the ``new_priority`` parameter is lower than the task priority with
+ * respect to the home scheduler of the task specified by the ``id``
+ * parameter at time when the scheduler evaluates the new priority.
+ */
+ ctx->new_priority = PRIO_LOW;
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_TaskPriority_Invalid: {
+ /*
+ * While the value of the ``new_priority`` parameter is an invalid task
+ * priority with respect to the home scheduler of the task specified by
+ * the ``id`` parameter when the new priority is evaluated.
+ */
+ ctx->new_priority = PRIO_INVALID;
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_TaskPriority_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetPriority_Pre_OldPriority_Prepare(
+ RtemsTaskReqSetPriority_Context *ctx,
+ RtemsTaskReqSetPriority_Pre_OldPriority state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetPriority_Pre_OldPriority_Valid: {
+ /*
+ * While the ``old_priority`` parameter references an object of type
+ * rtems_task_priority.
+ */
+ ctx->old_priority = &ctx->old_priority_obj;
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_OldPriority_Null: {
+ /*
+ * While the ``old_priority`` parameter is equal to NULL.
+ */
+ ctx->old_priority = NULL;
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Pre_OldPriority_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetPriority_Post_Status_Check(
+ RtemsTaskReqSetPriority_Context *ctx,
+ RtemsTaskReqSetPriority_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetPriority_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_set_priority() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_task_set_priority() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Post_Status_InvId: {
+ /*
+ * The return status of rtems_task_set_priority() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Post_Status_InvPrio: {
+ /*
+ * The return status of rtems_task_set_priority() shall be
+ * RTEMS_INVALID_PRIORITY.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_PRIORITY );
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetPriority_Post_Priority_Check(
+ RtemsTaskReqSetPriority_Context *ctx,
+ RtemsTaskReqSetPriority_Post_Priority state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetPriority_Post_Priority_Set: {
+ /*
+ * The real priority of the task specified by the ``id`` parameter shall
+ * be set to the value specified by the ``new_priority`` parameter at
+ * some point during the rtems_task_set_priority() call.
+ */
+ T_eq_u32( GetPriority( ctx->id ), ctx->new_priority );
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Post_Priority_Nop: {
+ /*
+ * No real priority of a task shall be modified by the
+ * rtems_task_set_priority() call.
+ */
+ T_eq_u32( GetPriority( ctx->worker_id ), PRIO_NORMAL );
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Post_Priority_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetPriority_Post_OldPriorityObj_Check(
+ RtemsTaskReqSetPriority_Context *ctx,
+ RtemsTaskReqSetPriority_Post_OldPriorityObj state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetPriority_Post_OldPriorityObj_Set: {
+ /*
+ * The value of the object referenced by the ``old_priority`` parameter
+ * shall be set after the return of the rtems_task_set_priority() call to
+ * the current priority of the task specified by the ``id`` parameter at
+ * some point during the call and before the real priority is modified by
+ * the call if it is modified by the call.
+ */
+ T_eq_u32( ctx->old_priority_obj, PRIO_NORMAL );
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Post_OldPriorityObj_Nop: {
+ /*
+ * Objects referenced by the ``old_priority`` parameter in past calls to
+ * rtems_task_set_priority() shall not be accessed by the
+ * rtems_task_set_priority() call.
+ */
+ T_eq_u32( ctx->old_priority_obj, PRIO_INVALID );
+ break;
+ }
+
+ case RtemsTaskReqSetPriority_Post_OldPriorityObj_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetPriority_Setup(
+ RtemsTaskReqSetPriority_Context *ctx
+)
+{
+ SetSelfPriority( PRIO_ULTRA_HIGH );
+}
+
+static void RtemsTaskReqSetPriority_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqSetPriority_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqSetPriority_Setup( ctx );
+}
+
+static void RtemsTaskReqSetPriority_Teardown(
+ RtemsTaskReqSetPriority_Context *ctx
+)
+{
+ RestoreRunnerPriority();
+}
+
+static void RtemsTaskReqSetPriority_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqSetPriority_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqSetPriority_Teardown( ctx );
+}
+
+static void RtemsTaskReqSetPriority_Prepare(
+ RtemsTaskReqSetPriority_Context *ctx
+)
+{
+ ctx->old_priority_obj = PRIO_INVALID;
+ ctx->worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ ctx->started = false;
+ ctx->blocked = false;
+}
+
+static void RtemsTaskReqSetPriority_Action(
+ RtemsTaskReqSetPriority_Context *ctx
+)
+{
+ if ( ctx->started ) {
+ SetSelfPriority( PRIO_ULTRA_HIGH );
+ StartTask( ctx->worker_id, Worker, NULL );
+
+ if ( ctx->blocked ) {
+ SetSelfPriority( PRIO_ULTRA_LOW );
+ SetSelfPriority( PRIO_ULTRA_HIGH );
+ }
+ } else {
+ SetSelfPriority( PRIO_NORMAL );
+ }
+
+ ctx->status = rtems_task_set_priority(
+ ctx->id,
+ ctx->new_priority,
+ ctx->old_priority
+ );
+
+ if ( ctx->started ) {
+ SendEvents( ctx->worker_id, RTEMS_EVENT_0 );
+ SetSelfPriority( PRIO_ULTRA_LOW );
+ SetSelfPriority( PRIO_ULTRA_HIGH );
+ }
+}
+
+static void RtemsTaskReqSetPriority_Cleanup(
+ RtemsTaskReqSetPriority_Context *ctx
+)
+{
+ DeleteTask( ctx->worker_id );
+}
+
+static const RtemsTaskReqSetPriority_Entry
+RtemsTaskReqSetPriority_Entries[] = {
+ { 0, 0, 1, 0, 1, 0, RtemsTaskReqSetPriority_Post_Status_InvId,
+ RtemsTaskReqSetPriority_Post_Priority_Nop,
+ RtemsTaskReqSetPriority_Post_OldPriorityObj_Nop },
+ { 0, 0, 1, 0, 1, 0, RtemsTaskReqSetPriority_Post_Status_InvAddr,
+ RtemsTaskReqSetPriority_Post_Priority_Nop,
+ RtemsTaskReqSetPriority_Post_OldPriorityObj_Nop },
+ { 0, 0, 0, 0, 1, 0, RtemsTaskReqSetPriority_Post_Status_Ok,
+ RtemsTaskReqSetPriority_Post_Priority_Nop,
+ RtemsTaskReqSetPriority_Post_OldPriorityObj_Set },
+ { 0, 0, 0, 0, 1, 0, RtemsTaskReqSetPriority_Post_Status_InvAddr,
+ RtemsTaskReqSetPriority_Post_Priority_Nop,
+ RtemsTaskReqSetPriority_Post_OldPriorityObj_Nop },
+ { 0, 0, 0, 0, 0, 0, RtemsTaskReqSetPriority_Post_Status_InvAddr,
+ RtemsTaskReqSetPriority_Post_Priority_Nop,
+ RtemsTaskReqSetPriority_Post_OldPriorityObj_Nop },
+ { 0, 0, 0, 0, 0, 0, RtemsTaskReqSetPriority_Post_Status_Ok,
+ RtemsTaskReqSetPriority_Post_Priority_Set,
+ RtemsTaskReqSetPriority_Post_OldPriorityObj_Set },
+ { 0, 0, 0, 0, 0, 0, RtemsTaskReqSetPriority_Post_Status_InvPrio,
+ RtemsTaskReqSetPriority_Post_Priority_Nop,
+ RtemsTaskReqSetPriority_Post_OldPriorityObj_Set }
+};
+
+static const uint8_t
+RtemsTaskReqSetPriority_Map[] = {
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 2, 3, 2, 3, 2, 3, 5, 4, 5, 4, 5, 4,
+ 6, 4, 2, 3, 2, 3, 2, 3, 2, 3, 5, 4, 5, 4, 5, 4, 6, 4, 2, 3, 2, 3, 2, 3, 2, 3,
+ 5, 4, 5, 4, 5, 4, 6, 4, 2, 3, 2, 3, 2, 3, 2, 3, 5, 4, 5, 4, 5, 4, 6, 4
+};
+
+static size_t RtemsTaskReqSetPriority_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqSetPriority_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsTaskReqSetPriority_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqSetPriority_Fixture = {
+ .setup = RtemsTaskReqSetPriority_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqSetPriority_Teardown_Wrap,
+ .scope = RtemsTaskReqSetPriority_Scope,
+ .initial_context = &RtemsTaskReqSetPriority_Instance
+};
+
+static inline RtemsTaskReqSetPriority_Entry RtemsTaskReqSetPriority_PopEntry(
+ RtemsTaskReqSetPriority_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqSetPriority_Entries[
+ RtemsTaskReqSetPriority_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqSetPriority_SetPreConditionStates(
+ RtemsTaskReqSetPriority_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_State_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqSetPriority_Pre_State_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+
+ if ( ctx->Map.entry.Pre_TaskPriority_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsTaskReqSetPriority_Pre_TaskPriority_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+}
+
+static void RtemsTaskReqSetPriority_TestVariant(
+ RtemsTaskReqSetPriority_Context *ctx
+)
+{
+ RtemsTaskReqSetPriority_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqSetPriority_Pre_State_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqSetPriority_Pre_NewPriority_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTaskReqSetPriority_Pre_TaskPriority_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTaskReqSetPriority_Pre_OldPriority_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsTaskReqSetPriority_Action( ctx );
+ RtemsTaskReqSetPriority_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTaskReqSetPriority_Post_Priority_Check(
+ ctx,
+ ctx->Map.entry.Post_Priority
+ );
+ RtemsTaskReqSetPriority_Post_OldPriorityObj_Check(
+ ctx,
+ ctx->Map.entry.Post_OldPriorityObj
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqSetPriority( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsTaskReqSetPriority,
+ &RtemsTaskReqSetPriority_Fixture
+)
+{
+ RtemsTaskReqSetPriority_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsTaskReqSetPriority_Pre_Id_Invalid;
+ ctx->Map.pci[ 0 ] < RtemsTaskReqSetPriority_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsTaskReqSetPriority_Pre_State_Dormant;
+ ctx->Map.pci[ 1 ] < RtemsTaskReqSetPriority_Pre_State_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsTaskReqSetPriority_Pre_NewPriority_Current;
+ ctx->Map.pci[ 2 ] < RtemsTaskReqSetPriority_Pre_NewPriority_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsTaskReqSetPriority_Pre_TaskPriority_High;
+ ctx->Map.pci[ 3 ] < RtemsTaskReqSetPriority_Pre_TaskPriority_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = RtemsTaskReqSetPriority_Pre_OldPriority_Valid;
+ ctx->Map.pci[ 4 ] < RtemsTaskReqSetPriority_Pre_OldPriority_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqSetPriority_PopEntry( ctx );
+ RtemsTaskReqSetPriority_SetPreConditionStates( ctx );
+ RtemsTaskReqSetPriority_Prepare( ctx );
+ RtemsTaskReqSetPriority_TestVariant( ctx );
+ RtemsTaskReqSetPriority_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-set-scheduler.c b/testsuites/validation/tc-task-set-scheduler.c
new file mode 100644
index 0000000000..174aa55736
--- /dev/null
+++ b/testsuites/validation/tc-task-set-scheduler.c
@@ -0,0 +1,1491 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqSetScheduler
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/threadimpl.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqSetScheduler spec:/rtems/task/req/set-scheduler
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqSetScheduler_Pre_TaskId_Task,
+ RtemsTaskReqSetScheduler_Pre_TaskId_Invalid,
+ RtemsTaskReqSetScheduler_Pre_TaskId_NA
+} RtemsTaskReqSetScheduler_Pre_TaskId;
+
+typedef enum {
+ RtemsTaskReqSetScheduler_Pre_Scheduler_Home,
+ RtemsTaskReqSetScheduler_Pre_Scheduler_Other,
+ RtemsTaskReqSetScheduler_Pre_Scheduler_NA
+} RtemsTaskReqSetScheduler_Pre_Scheduler;
+
+typedef enum {
+ RtemsTaskReqSetScheduler_Pre_SchedulerHasCPU_Yes,
+ RtemsTaskReqSetScheduler_Pre_SchedulerHasCPU_No,
+ RtemsTaskReqSetScheduler_Pre_SchedulerHasCPU_NA
+} RtemsTaskReqSetScheduler_Pre_SchedulerHasCPU;
+
+typedef enum {
+ RtemsTaskReqSetScheduler_Pre_SchedulerId_Scheduler,
+ RtemsTaskReqSetScheduler_Pre_SchedulerId_Invalid,
+ RtemsTaskReqSetScheduler_Pre_SchedulerId_NA
+} RtemsTaskReqSetScheduler_Pre_SchedulerId;
+
+typedef enum {
+ RtemsTaskReqSetScheduler_Pre_Priority_Valid,
+ RtemsTaskReqSetScheduler_Pre_Priority_Invalid,
+ RtemsTaskReqSetScheduler_Pre_Priority_NA
+} RtemsTaskReqSetScheduler_Pre_Priority;
+
+typedef enum {
+ RtemsTaskReqSetScheduler_Pre_HomePriority_Real,
+ RtemsTaskReqSetScheduler_Pre_HomePriority_More,
+ RtemsTaskReqSetScheduler_Pre_HomePriority_NA
+} RtemsTaskReqSetScheduler_Pre_HomePriority;
+
+typedef enum {
+ RtemsTaskReqSetScheduler_Pre_EligiblePriorities_OnlyOne,
+ RtemsTaskReqSetScheduler_Pre_EligiblePriorities_More,
+ RtemsTaskReqSetScheduler_Pre_EligiblePriorities_NA
+} RtemsTaskReqSetScheduler_Pre_EligiblePriorities;
+
+typedef enum {
+ RtemsTaskReqSetScheduler_Pre_Pinned_Yes,
+ RtemsTaskReqSetScheduler_Pre_Pinned_No,
+ RtemsTaskReqSetScheduler_Pre_Pinned_NA
+} RtemsTaskReqSetScheduler_Pre_Pinned;
+
+typedef enum {
+ RtemsTaskReqSetScheduler_Pre_TaskState_Ready,
+ RtemsTaskReqSetScheduler_Pre_TaskState_Blocked,
+ RtemsTaskReqSetScheduler_Pre_TaskState_Enqueued,
+ RtemsTaskReqSetScheduler_Pre_TaskState_NA
+} RtemsTaskReqSetScheduler_Pre_TaskState;
+
+typedef enum {
+ RtemsTaskReqSetScheduler_Pre_AffinitySupported_Yes,
+ RtemsTaskReqSetScheduler_Pre_AffinitySupported_No,
+ RtemsTaskReqSetScheduler_Pre_AffinitySupported_NA
+} RtemsTaskReqSetScheduler_Pre_AffinitySupported;
+
+typedef enum {
+ RtemsTaskReqSetScheduler_Post_Status_Ok,
+ RtemsTaskReqSetScheduler_Post_Status_InvAddr,
+ RtemsTaskReqSetScheduler_Post_Status_InvId,
+ RtemsTaskReqSetScheduler_Post_Status_InvPrio,
+ RtemsTaskReqSetScheduler_Post_Status_InUse,
+ RtemsTaskReqSetScheduler_Post_Status_Unsat,
+ RtemsTaskReqSetScheduler_Post_Status_NA
+} RtemsTaskReqSetScheduler_Post_Status;
+
+typedef enum {
+ RtemsTaskReqSetScheduler_Post_Scheduler_Set,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Scheduler_NA
+} RtemsTaskReqSetScheduler_Post_Scheduler;
+
+typedef enum {
+ RtemsTaskReqSetScheduler_Post_Priority_Set,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_NA
+} RtemsTaskReqSetScheduler_Post_Priority;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_TaskId_NA : 1;
+ uint32_t Pre_Scheduler_NA : 1;
+ uint32_t Pre_SchedulerHasCPU_NA : 1;
+ uint32_t Pre_SchedulerId_NA : 1;
+ uint32_t Pre_Priority_NA : 1;
+ uint32_t Pre_HomePriority_NA : 1;
+ uint32_t Pre_EligiblePriorities_NA : 1;
+ uint32_t Pre_Pinned_NA : 1;
+ uint32_t Pre_TaskState_NA : 1;
+ uint32_t Pre_AffinitySupported_NA : 1;
+ uint32_t Post_Status : 3;
+ uint32_t Post_Scheduler : 2;
+ uint32_t Post_Priority : 2;
+} RtemsTaskReqSetScheduler_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/set-scheduler test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the runner task identifier.
+ */
+ rtems_id runner_id;
+
+ /**
+ * @brief This member contains the scheduler A identifier.
+ */
+ rtems_id scheduler_a_id;
+
+ /**
+ * @brief This member contains the scheduler B identifier.
+ */
+ rtems_id scheduler_b_id;
+
+ /**
+ * @brief This member contains the scheduler D identifier.
+ */
+ rtems_id scheduler_d_id;
+
+ /**
+ * @brief This member contains the worker task identifiers.
+ */
+ rtems_id worker_id[ 3 ];
+
+ /**
+ * @brief This member contains the mutex identifiers.
+ */
+ rtems_id mutex_id[ 2 ];
+
+ /**
+ * @brief If this member is true, then the task shall have an additional
+ * priority for the home scheduler.
+ */
+ bool additional_home_priority;
+
+ /**
+ * @brief If this member is true, then the task shall have a second eligible
+ * scheduler.
+ */
+ bool second_eligible_scheduler;
+
+ /**
+ * @brief If this member is true, then the task shall be pinned to a
+ * processor.
+ */
+ bool pinned;
+
+ /**
+ * @brief If this member is true, then the task shall be blocked.
+ */
+ bool blocked;
+
+ /**
+ * @brief If this member is true, then the task shall be enqueued on a thread
+ * queue.
+ */
+ bool enqueued;
+
+ /**
+ * @brief This member specifies the scheduler identifier to set.
+ */
+ rtems_id scheduler_to_set_id;
+
+ /**
+ * @brief If this member is true, then the affinity of the task shall be
+ * supported by the scheduler.
+ */
+ bool affinity_supported;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_task_set_scheduler() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``task_id`` parameter value.
+ */
+ rtems_id task_id;
+
+ /**
+ * @brief This member specifies if the ``scheduler_id`` parameter value.
+ */
+ rtems_id scheduler_id;
+
+ /**
+ * @brief This member specifies if the ``priority`` parameter value.
+ */
+ rtems_task_priority priority;
+
+ /**
+ * @brief This member contains the identifier of the new scheduler.
+ */
+ rtems_id new_scheduler;
+
+ /**
+ * @brief This member contains the new priorities of the task.
+ */
+ rtems_task_priority new_priority[ 2 ];
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 10 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 10 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqSetScheduler_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqSetScheduler_Context;
+
+static RtemsTaskReqSetScheduler_Context
+ RtemsTaskReqSetScheduler_Instance;
+
+static const char * const RtemsTaskReqSetScheduler_PreDesc_TaskId[] = {
+ "Task",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetScheduler_PreDesc_Scheduler[] = {
+ "Home",
+ "Other",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetScheduler_PreDesc_SchedulerHasCPU[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetScheduler_PreDesc_SchedulerId[] = {
+ "Scheduler",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetScheduler_PreDesc_Priority[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetScheduler_PreDesc_HomePriority[] = {
+ "Real",
+ "More",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetScheduler_PreDesc_EligiblePriorities[] = {
+ "OnlyOne",
+ "More",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetScheduler_PreDesc_Pinned[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetScheduler_PreDesc_TaskState[] = {
+ "Ready",
+ "Blocked",
+ "Enqueued",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSetScheduler_PreDesc_AffinitySupported[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqSetScheduler_PreDesc[] = {
+ RtemsTaskReqSetScheduler_PreDesc_TaskId,
+ RtemsTaskReqSetScheduler_PreDesc_Scheduler,
+ RtemsTaskReqSetScheduler_PreDesc_SchedulerHasCPU,
+ RtemsTaskReqSetScheduler_PreDesc_SchedulerId,
+ RtemsTaskReqSetScheduler_PreDesc_Priority,
+ RtemsTaskReqSetScheduler_PreDesc_HomePriority,
+ RtemsTaskReqSetScheduler_PreDesc_EligiblePriorities,
+ RtemsTaskReqSetScheduler_PreDesc_Pinned,
+ RtemsTaskReqSetScheduler_PreDesc_TaskState,
+ RtemsTaskReqSetScheduler_PreDesc_AffinitySupported,
+ NULL
+};
+
+typedef RtemsTaskReqSetScheduler_Context Context;
+
+#define EVENT_OBTAIN_MUTEX_A RTEMS_EVENT_0
+
+#define EVENT_RELEASE_MUTEX_A RTEMS_EVENT_1
+
+#define EVENT_OBTAIN_MUTEX_B RTEMS_EVENT_2
+
+#define EVENT_RELEASE_MUTEX_B RTEMS_EVENT_3
+
+#define EVENT_PIN RTEMS_EVENT_4
+
+#define EVENT_UNPIN RTEMS_EVENT_5
+
+#define EVENT_SET_LOW_PRIO RTEMS_EVENT_6
+
+#define EVENT_RUNNER_SYNC_0 RTEMS_EVENT_7
+
+#define EVENT_RUNNER_SYNC_1 RTEMS_EVENT_8
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+ Thread_Control *executing;
+
+ ctx = (Context *) arg;
+ executing = _Thread_Get_executing();
+
+ while ( true ) {
+ rtems_event_set events;
+
+ events = ReceiveAnyEvents();
+
+ if ( ( events & EVENT_RUNNER_SYNC_0 ) != 0 ) {
+ SendEvents( ctx->runner_id, EVENT_RUNNER_SYNC_0 );
+ }
+
+ if ( ( events & EVENT_OBTAIN_MUTEX_A ) != 0 ) {
+ ObtainMutex( ctx->mutex_id[ 0 ] );
+ }
+
+ if ( ( events & EVENT_RELEASE_MUTEX_A ) != 0 ) {
+ ReleaseMutex( ctx->mutex_id[ 0 ] );
+ }
+
+ if ( ( events & EVENT_OBTAIN_MUTEX_B ) != 0 ) {
+ ObtainMutex( ctx->mutex_id[ 1 ] );
+ }
+
+ if ( ( events & EVENT_RELEASE_MUTEX_B ) != 0 ) {
+ ReleaseMutex( ctx->mutex_id[ 1 ] );
+ }
+
+ if ( ( events & EVENT_PIN ) != 0 ) {
+ _Thread_Pin( executing );
+ }
+
+ if ( ( events & EVENT_UNPIN ) != 0 ) {
+ _Thread_Unpin( executing, _Per_CPU_Get_snapshot() );
+ }
+
+ if ( ( events & EVENT_SET_LOW_PRIO ) != 0 ) {
+ SetSelfPriority( PRIO_LOW );
+ }
+
+ if ( ( events & EVENT_RUNNER_SYNC_1 ) != 0 ) {
+ SendEvents( ctx->runner_id, EVENT_RUNNER_SYNC_1 );
+ }
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Pre_TaskId_Prepare(
+ RtemsTaskReqSetScheduler_Context *ctx,
+ RtemsTaskReqSetScheduler_Pre_TaskId state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetScheduler_Pre_TaskId_Task: {
+ /*
+ * While the ``task_id`` parameter is associated with a task.
+ */
+ ctx->task_id = ctx->worker_id[ 0 ];
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_TaskId_Invalid: {
+ /*
+ * While the ``task_id`` parameter is not associated with a task.
+ */
+ ctx->task_id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_TaskId_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Pre_Scheduler_Prepare(
+ RtemsTaskReqSetScheduler_Context *ctx,
+ RtemsTaskReqSetScheduler_Pre_Scheduler state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetScheduler_Pre_Scheduler_Home: {
+ /*
+ * While the scheduler specified by the ``scheduler_id`` parameter is the
+ * home scheduler of the task specified by the ``task_id`` parameter.
+ */
+ ctx->scheduler_to_set_id = ctx->scheduler_a_id;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_Scheduler_Other: {
+ /*
+ * While the scheduler specified by the ``scheduler_id`` parameter is not
+ * the home scheduler of the task specified by the ``task_id`` parameter.
+ */
+ ctx->scheduler_to_set_id = ctx->scheduler_b_id;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_Scheduler_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Pre_SchedulerHasCPU_Prepare(
+ RtemsTaskReqSetScheduler_Context *ctx,
+ RtemsTaskReqSetScheduler_Pre_SchedulerHasCPU state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetScheduler_Pre_SchedulerHasCPU_Yes: {
+ /*
+ * While the scheduler specified by the ``scheduler_id`` parameter owns
+ * at least one processor.
+ */
+ /* Already set by Scheduler pre-condition */
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_SchedulerHasCPU_No: {
+ /*
+ * While the scheduler specified by the ``scheduler_id`` parameter owns
+ * no processor.
+ */
+ ctx->scheduler_to_set_id = ctx->scheduler_d_id;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_SchedulerHasCPU_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Pre_SchedulerId_Prepare(
+ RtemsTaskReqSetScheduler_Context *ctx,
+ RtemsTaskReqSetScheduler_Pre_SchedulerId state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetScheduler_Pre_SchedulerId_Scheduler: {
+ /*
+ * While the ``scheduler_id`` parameter is associated with a scheduler.
+ */
+ ctx->scheduler_id = ctx->scheduler_to_set_id;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_SchedulerId_Invalid: {
+ /*
+ * While the ``scheduler_id`` parameter is not associated with a
+ * scheduler.
+ */
+ ctx->scheduler_id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_SchedulerId_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Pre_Priority_Prepare(
+ RtemsTaskReqSetScheduler_Context *ctx,
+ RtemsTaskReqSetScheduler_Pre_Priority state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetScheduler_Pre_Priority_Valid: {
+ /*
+ * While the task priority specified by the ``priority`` parameter is
+ * valid with respect to the scheduler specified by the ``scheduler_id``
+ * parameter.
+ */
+ ctx->priority = PRIO_VERY_LOW;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_Priority_Invalid: {
+ /*
+ * While the task priority specified by the ``priority`` parameter is
+ * invalid with respect to the scheduler specified by the
+ * ``scheduler_id`` parameter.
+ */
+ ctx->priority = PRIO_INVALID;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_Priority_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Pre_HomePriority_Prepare(
+ RtemsTaskReqSetScheduler_Context *ctx,
+ RtemsTaskReqSetScheduler_Pre_HomePriority state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetScheduler_Pre_HomePriority_Real: {
+ /*
+ * While the current priority of the task specified by the ``task_id``
+ * parameter consists only of the real priority.
+ */
+ ctx->additional_home_priority = false;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_HomePriority_More: {
+ /*
+ * While the current priority of the task specified by the ``task_id``
+ * parameter consists of more than the real priority.
+ */
+ ctx->additional_home_priority = true;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_HomePriority_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Pre_EligiblePriorities_Prepare(
+ RtemsTaskReqSetScheduler_Context *ctx,
+ RtemsTaskReqSetScheduler_Pre_EligiblePriorities state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetScheduler_Pre_EligiblePriorities_OnlyOne: {
+ /*
+ * While the set of eligible priorities of the task specified by the
+ * ``task_id`` parameter consists of exactly the current priority.
+ */
+ ctx->second_eligible_scheduler = false;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_EligiblePriorities_More: {
+ /*
+ * While the set of eligible priorities of the task specified by the
+ * ``task_id`` parameter consists of more than the current priority.
+ */
+ ctx->second_eligible_scheduler = true;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_EligiblePriorities_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Pre_Pinned_Prepare(
+ RtemsTaskReqSetScheduler_Context *ctx,
+ RtemsTaskReqSetScheduler_Pre_Pinned state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetScheduler_Pre_Pinned_Yes: {
+ /*
+ * While the task specified by the ``task_id`` parameter is pinned.
+ */
+ ctx->pinned = true;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_Pinned_No: {
+ /*
+ * While the task specified by the ``task_id`` parameter is not pinned.
+ */
+ ctx->pinned = false;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_Pinned_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Pre_TaskState_Prepare(
+ RtemsTaskReqSetScheduler_Context *ctx,
+ RtemsTaskReqSetScheduler_Pre_TaskState state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetScheduler_Pre_TaskState_Ready: {
+ /*
+ * While the task specified by the ``task_id`` parameter is ready.
+ */
+ ctx->blocked = false;
+ ctx->enqueued = false;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_TaskState_Blocked: {
+ /*
+ * While the task specified by the ``task_id`` parameter is blocked,
+ * while the task specified by the ``task_id`` parameter is not enqueued
+ * on a wait queue.
+ */
+ ctx->blocked = true;
+ ctx->enqueued = false;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_TaskState_Enqueued: {
+ /*
+ * While the task specified by the ``task_id`` parameter is blocked,
+ * while the task specified by the ``task_id`` parameter is enqueued on a
+ * wait queue.
+ */
+ ctx->blocked = true;
+ ctx->enqueued = true;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_TaskState_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Pre_AffinitySupported_Prepare(
+ RtemsTaskReqSetScheduler_Context *ctx,
+ RtemsTaskReqSetScheduler_Pre_AffinitySupported state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetScheduler_Pre_AffinitySupported_Yes: {
+ /*
+ * While the affinity set of the task specified by the ``task_id``
+ * parameter is supported by the scheduler specified by the
+ * ``scheduler_id`` parameter.
+ */
+ ctx->affinity_supported = true;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_AffinitySupported_No: {
+ /*
+ * While the affinity set of the task specified by the ``task_id``
+ * parameter is not supported by the scheduler specified by the
+ * ``scheduler_id`` parameter.
+ */
+ ctx->affinity_supported = false;
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Pre_AffinitySupported_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Post_Status_Check(
+ RtemsTaskReqSetScheduler_Context *ctx,
+ RtemsTaskReqSetScheduler_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetScheduler_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_set_scheduler() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_task_set_scheduler() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Post_Status_InvId: {
+ /*
+ * The return status of rtems_task_set_scheduler() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Post_Status_InvPrio: {
+ /*
+ * The return status of rtems_task_set_scheduler() shall be
+ * RTEMS_INVALID_PRIORITY.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_PRIORITY );
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Post_Status_InUse: {
+ /*
+ * The return status of rtems_task_set_scheduler() shall be
+ * RTEMS_RESOURCE_IN_USE.
+ */
+ T_rsc( ctx->status, RTEMS_RESOURCE_IN_USE );
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Post_Status_Unsat: {
+ /*
+ * The return status of rtems_task_set_scheduler() shall be
+ * RTEMS_UNSATISFIED.
+ */
+ T_rsc( ctx->status, RTEMS_UNSATISFIED );
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Post_Scheduler_Check(
+ RtemsTaskReqSetScheduler_Context *ctx,
+ RtemsTaskReqSetScheduler_Post_Scheduler state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetScheduler_Post_Scheduler_Set: {
+ /*
+ * The home scheduler of the task specified by the ``task_id`` parameter
+ * shall be set to the scheduler specified by the ``scheduler_id``
+ * parameter at some point during the rtems_task_set_scheduler() call.
+ */
+ T_eq_u32( ctx->new_scheduler, ctx->scheduler_to_set_id );
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Post_Scheduler_Nop: {
+ /*
+ * No home scheduler of a task shall be modified by the
+ * rtems_task_set_scheduler() call.
+ */
+ T_eq_u32( ctx->new_scheduler, ctx->scheduler_a_id );
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Post_Scheduler_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Post_Priority_Check(
+ RtemsTaskReqSetScheduler_Context *ctx,
+ RtemsTaskReqSetScheduler_Post_Priority state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSetScheduler_Post_Priority_Set: {
+ /*
+ * The real priority of the task specified by the ``task_id`` parameter
+ * shall be set to the priority specified by the ``priority`` parameter
+ * at some point during the rtems_task_set_scheduler() call.
+ */
+ if ( ctx->scheduler_to_set_id == ctx->scheduler_a_id ) {
+ T_eq_u32( ctx->new_priority[ 0 ], PRIO_VERY_LOW );
+ T_eq_u32( ctx->new_priority[ 1 ], PRIO_INVALID );
+ } else {
+ T_eq_u32( ctx->new_priority[ 0 ], PRIO_INVALID );
+ T_eq_u32( ctx->new_priority[ 1 ], PRIO_VERY_LOW );
+ }
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Post_Priority_Nop: {
+ /*
+ * No task priority shall be modified by the rtems_task_set_scheduler()
+ * call.
+ */
+ if ( ctx->blocked ) {
+ T_eq_u32( ctx->new_priority[ 0 ], PRIO_HIGH );
+ } else {
+ T_eq_u32( ctx->new_priority[ 0 ], PRIO_LOW );
+ }
+
+ T_eq_u32( ctx->new_priority[ 1 ], PRIO_INVALID );
+ break;
+ }
+
+ case RtemsTaskReqSetScheduler_Post_Priority_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSetScheduler_Setup(
+ RtemsTaskReqSetScheduler_Context *ctx
+)
+{
+ rtems_status_code sc;
+ size_t i;
+
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->runner_id = rtems_task_self();
+ SetSelfPriority( PRIO_NORMAL );
+
+ sc = rtems_scheduler_ident(
+ TEST_SCHEDULER_A_NAME,
+ &ctx->scheduler_a_id
+ );
+ T_rsc_success( sc );
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( ctx->mutex_id ); ++i ) {
+ ctx->mutex_id[ i ] = CreateMutex();
+ }
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( ctx->worker_id ); ++i ) {
+ ctx->worker_id[ i ] = CreateTask( "WORK", PRIO_HIGH - i );
+ StartTask( ctx->worker_id[ i ], Worker, ctx );
+ }
+
+ #if defined(RTEMS_SMP)
+ sc = rtems_scheduler_ident( TEST_SCHEDULER_B_NAME, &ctx->scheduler_b_id );
+ T_rsc_success( sc );
+
+ sc = rtems_scheduler_ident( TEST_SCHEDULER_D_NAME, &ctx->scheduler_d_id );
+ T_rsc_success( sc );
+
+ SetScheduler( ctx->worker_id[ 2 ], ctx->scheduler_b_id, PRIO_NORMAL );
+ #else
+ ctx->scheduler_b_id = INVALID_ID;
+ #endif
+}
+
+static void RtemsTaskReqSetScheduler_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqSetScheduler_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqSetScheduler_Setup( ctx );
+}
+
+static void RtemsTaskReqSetScheduler_Teardown(
+ RtemsTaskReqSetScheduler_Context *ctx
+)
+{
+ size_t i;
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( ctx->worker_id ); ++i ) {
+ DeleteTask( ctx->worker_id[ i ] );
+ }
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( ctx->mutex_id ); ++i ) {
+ DeleteMutex( ctx->mutex_id[ i ] );
+ }
+
+ RestoreRunnerPriority();
+}
+
+static void RtemsTaskReqSetScheduler_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqSetScheduler_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqSetScheduler_Teardown( ctx );
+}
+
+static void RtemsTaskReqSetScheduler_Action(
+ RtemsTaskReqSetScheduler_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ if ( ctx->additional_home_priority || ctx->second_eligible_scheduler ) {
+ SendEvents( ctx->worker_id[ 0 ], EVENT_OBTAIN_MUTEX_A );
+
+ if ( ctx->additional_home_priority ) {
+ SendEvents( ctx->worker_id[ 1 ], EVENT_OBTAIN_MUTEX_A );
+ }
+
+ if ( ctx->second_eligible_scheduler ) {
+ SendEvents(
+ ctx->worker_id[ 2 ],
+ EVENT_RUNNER_SYNC_0 | EVENT_OBTAIN_MUTEX_A
+ );
+ ReceiveAllEvents( EVENT_RUNNER_SYNC_0 );
+ WaitForExecutionStop( ctx->worker_id[ 2 ] );
+ }
+ }
+
+ if ( ctx->blocked && ctx->enqueued ) {
+ ObtainMutex( ctx->mutex_id[ 1 ] );
+ SendEvents( ctx->worker_id[ 0 ], EVENT_OBTAIN_MUTEX_B );
+ }
+
+ if ( !ctx->affinity_supported ) {
+ SetAffinityOne( ctx->worker_id[ 0 ], 0 );
+ }
+
+ if ( ctx->pinned ) {
+ SendEvents( ctx->worker_id[ 0 ], EVENT_PIN );
+ }
+
+ if ( !ctx->blocked ) {
+ SendEvents( ctx->worker_id[ 0 ], EVENT_SET_LOW_PRIO );
+ }
+
+ ctx->status = rtems_task_set_scheduler(
+ ctx->task_id,
+ ctx->scheduler_id,
+ ctx->priority
+ );
+
+ ctx->new_scheduler = GetScheduler( ctx->worker_id[ 0 ] );
+
+ if ( ctx->pinned ) {
+ SendEvents( ctx->worker_id[ 0 ], EVENT_UNPIN );
+ }
+
+ if ( !ctx->affinity_supported ) {
+ SetAffinityAll( ctx->worker_id[ 0 ] );
+ }
+
+ if ( ctx->blocked && ctx->enqueued ) {
+ ReleaseMutex( ctx->mutex_id[ 1 ] );
+ SendEvents( ctx->worker_id[ 0 ], EVENT_RELEASE_MUTEX_B );
+ }
+
+ if ( ctx->additional_home_priority || ctx->second_eligible_scheduler ) {
+ SendEvents( ctx->worker_id[ 0 ], EVENT_RELEASE_MUTEX_A );
+
+ if ( ctx->additional_home_priority ) {
+ SendEvents( ctx->worker_id[ 1 ], EVENT_RELEASE_MUTEX_A );
+ }
+
+ if ( ctx->second_eligible_scheduler ) {
+ SendEvents(
+ ctx->worker_id[ 2 ],
+ EVENT_RELEASE_MUTEX_A | EVENT_RUNNER_SYNC_1
+ );
+ ReceiveAllEvents( EVENT_RUNNER_SYNC_1 );
+ }
+ }
+
+ sc = rtems_task_get_priority(
+ ctx->worker_id[ 0 ],
+ ctx->scheduler_a_id,
+ &ctx->new_priority[ 0 ]
+ );
+
+ if ( sc == RTEMS_NOT_DEFINED ) {
+ ctx->new_priority[ 0 ] = PRIO_INVALID;
+ } else {
+ T_rsc_success( sc );
+ }
+
+ #if defined(RTEMS_SMP)
+ sc = rtems_task_get_priority(
+ ctx->worker_id[ 0 ],
+ ctx->scheduler_b_id,
+ &ctx->new_priority[ 1 ]
+ );
+
+ if ( sc == RTEMS_NOT_DEFINED ) {
+ ctx->new_priority[ 1 ] = PRIO_INVALID;
+ } else {
+ T_rsc_success( sc );
+ }
+ #else
+ ctx->new_priority[ 1 ] = PRIO_INVALID;
+ #endif
+
+ if ( ctx->status == RTEMS_SUCCESSFUL ) {
+ SetScheduler( ctx->worker_id[ 0 ], ctx->scheduler_a_id, PRIO_HIGH );
+ } else if ( !ctx->blocked ) {
+ SetPriority( ctx->worker_id[ 0 ], PRIO_HIGH );
+ }
+}
+
+static const RtemsTaskReqSetScheduler_Entry
+RtemsTaskReqSetScheduler_Entries[] = {
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqSetScheduler_Post_Status_NA,
+ RtemsTaskReqSetScheduler_Post_Scheduler_NA,
+ RtemsTaskReqSetScheduler_Post_Priority_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqSetScheduler_Post_Status_NA,
+ RtemsTaskReqSetScheduler_Post_Scheduler_NA,
+ RtemsTaskReqSetScheduler_Post_Priority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqSetScheduler_Post_Status_NA,
+ RtemsTaskReqSetScheduler_Post_Scheduler_NA,
+ RtemsTaskReqSetScheduler_Post_Priority_NA },
+#else
+ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1,
+ RtemsTaskReqSetScheduler_Post_Status_InvId,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqSetScheduler_Post_Status_NA,
+ RtemsTaskReqSetScheduler_Post_Scheduler_NA,
+ RtemsTaskReqSetScheduler_Post_Priority_NA },
+#else
+ { 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1,
+ RtemsTaskReqSetScheduler_Post_Status_InvId,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop },
+#endif
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqSetScheduler_Post_Status_NA,
+ RtemsTaskReqSetScheduler_Post_Scheduler_NA,
+ RtemsTaskReqSetScheduler_Post_Priority_NA },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqSetScheduler_Post_Status_NA,
+ RtemsTaskReqSetScheduler_Post_Scheduler_NA,
+ RtemsTaskReqSetScheduler_Post_Priority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqSetScheduler_Post_Status_InvPrio,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqSetScheduler_Post_Status_NA,
+ RtemsTaskReqSetScheduler_Post_Scheduler_NA,
+ RtemsTaskReqSetScheduler_Post_Priority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0,
+ RtemsTaskReqSetScheduler_Post_Status_InvId,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqSetScheduler_Post_Status_NA,
+ RtemsTaskReqSetScheduler_Post_Scheduler_NA,
+ RtemsTaskReqSetScheduler_Post_Priority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0,
+ RtemsTaskReqSetScheduler_Post_Status_InvPrio,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqSetScheduler_Post_Status_NA,
+ RtemsTaskReqSetScheduler_Post_Scheduler_NA,
+ RtemsTaskReqSetScheduler_Post_Priority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqSetScheduler_Post_Status_InUse,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop },
+#endif
+ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1,
+ RtemsTaskReqSetScheduler_Post_Status_InvId,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop },
+ { 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1,
+ RtemsTaskReqSetScheduler_Post_Status_InvId,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqSetScheduler_Post_Status_InvPrio,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqSetScheduler_Post_Status_NA,
+ RtemsTaskReqSetScheduler_Post_Scheduler_NA,
+ RtemsTaskReqSetScheduler_Post_Priority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqSetScheduler_Post_Status_Unsat,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop },
+#endif
+ { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0,
+ RtemsTaskReqSetScheduler_Post_Status_InvId,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0,
+ RtemsTaskReqSetScheduler_Post_Status_InvPrio,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTaskReqSetScheduler_Post_Status_InUse,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Nop,
+ RtemsTaskReqSetScheduler_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqSetScheduler_Post_Status_Ok,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Set,
+ RtemsTaskReqSetScheduler_Post_Priority_Set },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqSetScheduler_Post_Status_NA,
+ RtemsTaskReqSetScheduler_Post_Scheduler_NA,
+ RtemsTaskReqSetScheduler_Post_Priority_NA }
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTaskReqSetScheduler_Post_Status_Ok,
+ RtemsTaskReqSetScheduler_Post_Scheduler_Set,
+ RtemsTaskReqSetScheduler_Post_Priority_Set }
+#endif
+};
+
+static const uint8_t
+RtemsTaskReqSetScheduler_Map[] = {
+ 7, 0, 7, 0, 7, 0, 15, 3, 15, 3, 14, 3, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7,
+ 0, 7, 0, 7, 0, 14, 3, 14, 3, 14, 3, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 4, 0,
+ 4, 0, 4, 0, 10, 3, 10, 3, 10, 3, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4,
+ 0, 4, 0, 10, 3, 10, 3, 10, 3, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 1, 0, 1, 0,
+ 1, 0, 8, 3, 8, 3, 8, 3, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
+ 8, 3, 8, 3, 8, 3, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 8, 3,
+ 8, 3, 8, 3, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 8, 3, 8, 3,
+ 8, 3, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7,
+ 7, 7, 7, 7, 16, 11, 16, 11, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7, 11, 11, 11, 11, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 0, 5, 0,
+ 5, 0, 12, 3, 12, 3, 12, 3, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5,
+ 0, 12, 3, 12, 3, 12, 3, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 6, 0, 6, 0, 6, 0,
+ 13, 3, 13, 3, 13, 3, 6, 0, 6, 0, 6, 0, 6, 0, 6, 0, 6, 0, 6, 0, 6, 0, 6, 0,
+ 13, 3, 13, 3, 13, 3, 6, 0, 6, 0, 6, 0, 6, 0, 6, 0, 6, 0, 2, 0, 2, 0, 2, 0, 9,
+ 3, 9, 3, 9, 3, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 9, 3, 9,
+ 3, 9, 3, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 9, 3, 9, 3, 9,
+ 3, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 9, 3, 9, 3, 9, 3, 2,
+ 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static size_t RtemsTaskReqSetScheduler_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqSetScheduler_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsTaskReqSetScheduler_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqSetScheduler_Fixture = {
+ .setup = RtemsTaskReqSetScheduler_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqSetScheduler_Teardown_Wrap,
+ .scope = RtemsTaskReqSetScheduler_Scope,
+ .initial_context = &RtemsTaskReqSetScheduler_Instance
+};
+
+static inline RtemsTaskReqSetScheduler_Entry RtemsTaskReqSetScheduler_PopEntry(
+ RtemsTaskReqSetScheduler_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqSetScheduler_Entries[
+ RtemsTaskReqSetScheduler_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqSetScheduler_SetPreConditionStates(
+ RtemsTaskReqSetScheduler_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_Scheduler_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqSetScheduler_Pre_Scheduler_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+
+ if ( ctx->Map.entry.Pre_SchedulerHasCPU_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsTaskReqSetScheduler_Pre_SchedulerHasCPU_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+
+ if ( ctx->Map.entry.Pre_Priority_NA ) {
+ ctx->Map.pcs[ 4 ] = RtemsTaskReqSetScheduler_Pre_Priority_NA;
+ } else {
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+ }
+
+ if ( ctx->Map.entry.Pre_HomePriority_NA ) {
+ ctx->Map.pcs[ 5 ] = RtemsTaskReqSetScheduler_Pre_HomePriority_NA;
+ } else {
+ ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
+ }
+
+ if ( ctx->Map.entry.Pre_EligiblePriorities_NA ) {
+ ctx->Map.pcs[ 6 ] = RtemsTaskReqSetScheduler_Pre_EligiblePriorities_NA;
+ } else {
+ ctx->Map.pcs[ 6 ] = ctx->Map.pci[ 6 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Pinned_NA ) {
+ ctx->Map.pcs[ 7 ] = RtemsTaskReqSetScheduler_Pre_Pinned_NA;
+ } else {
+ ctx->Map.pcs[ 7 ] = ctx->Map.pci[ 7 ];
+ }
+
+ if ( ctx->Map.entry.Pre_TaskState_NA ) {
+ ctx->Map.pcs[ 8 ] = RtemsTaskReqSetScheduler_Pre_TaskState_NA;
+ } else {
+ ctx->Map.pcs[ 8 ] = ctx->Map.pci[ 8 ];
+ }
+
+ if ( ctx->Map.entry.Pre_AffinitySupported_NA ) {
+ ctx->Map.pcs[ 9 ] = RtemsTaskReqSetScheduler_Pre_AffinitySupported_NA;
+ } else {
+ ctx->Map.pcs[ 9 ] = ctx->Map.pci[ 9 ];
+ }
+}
+
+static void RtemsTaskReqSetScheduler_TestVariant(
+ RtemsTaskReqSetScheduler_Context *ctx
+)
+{
+ RtemsTaskReqSetScheduler_Pre_TaskId_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqSetScheduler_Pre_Scheduler_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqSetScheduler_Pre_SchedulerHasCPU_Prepare(
+ ctx,
+ ctx->Map.pcs[ 2 ]
+ );
+ RtemsTaskReqSetScheduler_Pre_SchedulerId_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTaskReqSetScheduler_Pre_Priority_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsTaskReqSetScheduler_Pre_HomePriority_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsTaskReqSetScheduler_Pre_EligiblePriorities_Prepare(
+ ctx,
+ ctx->Map.pcs[ 6 ]
+ );
+ RtemsTaskReqSetScheduler_Pre_Pinned_Prepare( ctx, ctx->Map.pcs[ 7 ] );
+ RtemsTaskReqSetScheduler_Pre_TaskState_Prepare( ctx, ctx->Map.pcs[ 8 ] );
+ RtemsTaskReqSetScheduler_Pre_AffinitySupported_Prepare(
+ ctx,
+ ctx->Map.pcs[ 9 ]
+ );
+ RtemsTaskReqSetScheduler_Action( ctx );
+ RtemsTaskReqSetScheduler_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsTaskReqSetScheduler_Post_Scheduler_Check(
+ ctx,
+ ctx->Map.entry.Post_Scheduler
+ );
+ RtemsTaskReqSetScheduler_Post_Priority_Check(
+ ctx,
+ ctx->Map.entry.Post_Priority
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqSetScheduler( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsTaskReqSetScheduler,
+ &RtemsTaskReqSetScheduler_Fixture
+)
+{
+ RtemsTaskReqSetScheduler_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsTaskReqSetScheduler_Pre_TaskId_Task;
+ ctx->Map.pci[ 0 ] < RtemsTaskReqSetScheduler_Pre_TaskId_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsTaskReqSetScheduler_Pre_Scheduler_Home;
+ ctx->Map.pci[ 1 ] < RtemsTaskReqSetScheduler_Pre_Scheduler_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsTaskReqSetScheduler_Pre_SchedulerHasCPU_Yes;
+ ctx->Map.pci[ 2 ] < RtemsTaskReqSetScheduler_Pre_SchedulerHasCPU_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsTaskReqSetScheduler_Pre_SchedulerId_Scheduler;
+ ctx->Map.pci[ 3 ] < RtemsTaskReqSetScheduler_Pre_SchedulerId_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = RtemsTaskReqSetScheduler_Pre_Priority_Valid;
+ ctx->Map.pci[ 4 ] < RtemsTaskReqSetScheduler_Pre_Priority_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ for (
+ ctx->Map.pci[ 5 ] = RtemsTaskReqSetScheduler_Pre_HomePriority_Real;
+ ctx->Map.pci[ 5 ] < RtemsTaskReqSetScheduler_Pre_HomePriority_NA;
+ ++ctx->Map.pci[ 5 ]
+ ) {
+ for (
+ ctx->Map.pci[ 6 ] = RtemsTaskReqSetScheduler_Pre_EligiblePriorities_OnlyOne;
+ ctx->Map.pci[ 6 ] < RtemsTaskReqSetScheduler_Pre_EligiblePriorities_NA;
+ ++ctx->Map.pci[ 6 ]
+ ) {
+ for (
+ ctx->Map.pci[ 7 ] = RtemsTaskReqSetScheduler_Pre_Pinned_Yes;
+ ctx->Map.pci[ 7 ] < RtemsTaskReqSetScheduler_Pre_Pinned_NA;
+ ++ctx->Map.pci[ 7 ]
+ ) {
+ for (
+ ctx->Map.pci[ 8 ] = RtemsTaskReqSetScheduler_Pre_TaskState_Ready;
+ ctx->Map.pci[ 8 ] < RtemsTaskReqSetScheduler_Pre_TaskState_NA;
+ ++ctx->Map.pci[ 8 ]
+ ) {
+ for (
+ ctx->Map.pci[ 9 ] = RtemsTaskReqSetScheduler_Pre_AffinitySupported_Yes;
+ ctx->Map.pci[ 9 ] < RtemsTaskReqSetScheduler_Pre_AffinitySupported_NA;
+ ++ctx->Map.pci[ 9 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqSetScheduler_PopEntry(
+ ctx
+ );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsTaskReqSetScheduler_SetPreConditionStates( ctx );
+ RtemsTaskReqSetScheduler_TestVariant( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-smp.c b/testsuites/validation/tc-task-smp.c
new file mode 100644
index 0000000000..9bfdc4fd73
--- /dev/null
+++ b/testsuites/validation/tc-task-smp.c
@@ -0,0 +1,146 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskValSmp
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskValSmp spec:/rtems/task/val/smp
+ *
+ * @ingroup TestsuitesValidationSmpOnly0
+ *
+ * @brief This test case collection provides SMP-specific validation test cases
+ * for requirements of the @ref RTEMSAPIClassicTasks.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate the home scheduler of tasks created by rtems_task_create() and
+ * constructed by rtems_task_construct() on scheduler B.
+ *
+ * - Move runner from scheduler A to B.
+ *
+ * - Create a task. Check that the home scheduler of the created task is
+ * scheduler B.
+ *
+ * - Construct a task. Check that the home scheduler of the constructed task
+ * is scheduler B.
+ *
+ * - Restore runner scheduler.
+ *
+ * @{
+ */
+
+/**
+ * @brief Validate the home scheduler of tasks created by rtems_task_create()
+ * and constructed by rtems_task_construct() on scheduler B.
+ */
+static void RtemsTaskValSmp_Action_0( void )
+{
+ rtems_status_code sc;
+ rtems_status_code id;
+
+ /*
+ * Move runner from scheduler A to B.
+ */
+ T_step_eq_u32( 0, GetSelfScheduler(), SCHEDULER_A_ID );
+ SetSelfScheduler( SCHEDULER_B_ID, 1 );
+
+ /*
+ * Create a task. Check that the home scheduler of the created task is
+ * scheduler B.
+ */
+ sc = rtems_task_create(
+ OBJECT_NAME,
+ 1,
+ TEST_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &id
+ );
+ T_step_rsc_success( 1, sc );
+
+ T_step_eq_u32( 2, GetScheduler( id ), SCHEDULER_B_ID );
+ DeleteTask( id );
+
+ /*
+ * Construct a task. Check that the home scheduler of the constructed task
+ * is scheduler B.
+ */
+ sc = rtems_task_construct( &DefaultTaskConfig, &id );
+ T_step_rsc_success( 3, sc );
+
+ T_step_eq_u32( 4, GetScheduler( id ), SCHEDULER_B_ID );
+ DeleteTask( id );
+
+ /*
+ * Restore runner scheduler.
+ */
+ RestoreRunnerScheduler();
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskValSmp( void )
+ */
+T_TEST_CASE( RtemsTaskValSmp )
+{
+ T_plan( 5 );
+
+ RtemsTaskValSmp_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-start.c b/testsuites/validation/tc-task-start.c
new file mode 100644
index 0000000000..235d9f0827
--- /dev/null
+++ b/testsuites/validation/tc-task-start.c
@@ -0,0 +1,859 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqStart
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/test-scheduler.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqStart spec:/rtems/task/req/start
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqStart_Pre_Id_Invalid,
+ RtemsTaskReqStart_Pre_Id_Task,
+ RtemsTaskReqStart_Pre_Id_NA
+} RtemsTaskReqStart_Pre_Id;
+
+typedef enum {
+ RtemsTaskReqStart_Pre_EntryPoint_Valid,
+ RtemsTaskReqStart_Pre_EntryPoint_Null,
+ RtemsTaskReqStart_Pre_EntryPoint_NA
+} RtemsTaskReqStart_Pre_EntryPoint;
+
+typedef enum {
+ RtemsTaskReqStart_Pre_Argument_Pointer,
+ RtemsTaskReqStart_Pre_Argument_Number,
+ RtemsTaskReqStart_Pre_Argument_NA
+} RtemsTaskReqStart_Pre_Argument;
+
+typedef enum {
+ RtemsTaskReqStart_Pre_Dormant_Yes,
+ RtemsTaskReqStart_Pre_Dormant_No,
+ RtemsTaskReqStart_Pre_Dormant_NA
+} RtemsTaskReqStart_Pre_Dormant;
+
+typedef enum {
+ RtemsTaskReqStart_Pre_Suspended_Yes,
+ RtemsTaskReqStart_Pre_Suspended_No,
+ RtemsTaskReqStart_Pre_Suspended_NA
+} RtemsTaskReqStart_Pre_Suspended;
+
+typedef enum {
+ RtemsTaskReqStart_Post_Status_Ok,
+ RtemsTaskReqStart_Post_Status_InvAddr,
+ RtemsTaskReqStart_Post_Status_InvId,
+ RtemsTaskReqStart_Post_Status_IncStat,
+ RtemsTaskReqStart_Post_Status_NA
+} RtemsTaskReqStart_Post_Status;
+
+typedef enum {
+ RtemsTaskReqStart_Post_EntryPoint_Set,
+ RtemsTaskReqStart_Post_EntryPoint_Nop,
+ RtemsTaskReqStart_Post_EntryPoint_NA
+} RtemsTaskReqStart_Post_EntryPoint;
+
+typedef enum {
+ RtemsTaskReqStart_Post_Argument_Set,
+ RtemsTaskReqStart_Post_Argument_Nop,
+ RtemsTaskReqStart_Post_Argument_NA
+} RtemsTaskReqStart_Post_Argument;
+
+typedef enum {
+ RtemsTaskReqStart_Post_Unblock_Yes,
+ RtemsTaskReqStart_Post_Unblock_Nop,
+ RtemsTaskReqStart_Post_Unblock_NA
+} RtemsTaskReqStart_Post_Unblock;
+
+typedef enum {
+ RtemsTaskReqStart_Post_StartExtensions_Yes,
+ RtemsTaskReqStart_Post_StartExtensions_Nop,
+ RtemsTaskReqStart_Post_StartExtensions_NA
+} RtemsTaskReqStart_Post_StartExtensions;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Id_NA : 1;
+ uint32_t Pre_EntryPoint_NA : 1;
+ uint32_t Pre_Argument_NA : 1;
+ uint32_t Pre_Dormant_NA : 1;
+ uint32_t Pre_Suspended_NA : 1;
+ uint32_t Post_Status : 3;
+ uint32_t Post_EntryPoint : 2;
+ uint32_t Post_Argument : 2;
+ uint32_t Post_Unblock : 2;
+ uint32_t Post_StartExtensions : 2;
+} RtemsTaskReqStart_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/start test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides the scheduler operation records.
+ */
+ T_scheduler_log_2 scheduler_log;
+
+ /**
+ * @brief This member contains the identifier of a task.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member contains the identifier of the test user extensions.
+ */
+ rtems_id extension_id;
+
+ /**
+ * @brief This member contains the count of thread start extension calls.
+ */
+ uint32_t start_extension_calls;
+
+ /**
+ * @brief This member contains the actual argument passed to the entry point.
+ */
+ rtems_task_argument actual_argument;
+
+ /**
+ * @brief This member contains the entry point counter.
+ */
+ uint32_t counter;
+
+ /**
+ * @brief If this member is true, then the worker is started before the
+ * rtems_task_start() call.
+ */
+ bool start;
+
+ /**
+ * @brief If this member is true, then the worker is suspended before the
+ * rtems_task_start() call.
+ */
+ bool suspend;
+
+ /**
+ * @brief This member contains the return value of the rtems_task_start()
+ * call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``id`` parameter value.
+ */
+ rtems_id id;
+
+ /**
+ * @brief This member specifies if the ``entry_point`` parameter value.
+ */
+ rtems_task_entry entry_point;
+
+ /**
+ * @brief This member specifies if the ``argument`` parameter value.
+ */
+ rtems_task_argument argument;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 5 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 5 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqStart_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqStart_Context;
+
+static RtemsTaskReqStart_Context
+ RtemsTaskReqStart_Instance;
+
+static const char * const RtemsTaskReqStart_PreDesc_Id[] = {
+ "Invalid",
+ "Task",
+ "NA"
+};
+
+static const char * const RtemsTaskReqStart_PreDesc_EntryPoint[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsTaskReqStart_PreDesc_Argument[] = {
+ "Pointer",
+ "Number",
+ "NA"
+};
+
+static const char * const RtemsTaskReqStart_PreDesc_Dormant[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqStart_PreDesc_Suspended[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqStart_PreDesc[] = {
+ RtemsTaskReqStart_PreDesc_Id,
+ RtemsTaskReqStart_PreDesc_EntryPoint,
+ RtemsTaskReqStart_PreDesc_Argument,
+ RtemsTaskReqStart_PreDesc_Dormant,
+ RtemsTaskReqStart_PreDesc_Suspended,
+ NULL
+};
+
+typedef RtemsTaskReqStart_Context Context;
+
+static void WorkerA( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = &RtemsTaskReqStart_Instance;
+
+ while ( true ) {
+ ctx->actual_argument += arg;
+ ++ctx->counter;
+ Yield();
+ }
+}
+
+static void WorkerB( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = &RtemsTaskReqStart_Instance;
+
+ while ( true ) {
+ ctx->actual_argument += arg;
+ Yield();
+ }
+}
+
+static void ThreadStart( rtems_tcb *executing, rtems_tcb *started )
+{
+ (void) executing;
+ (void) started;
+
+ ++RtemsTaskReqStart_Instance.start_extension_calls;
+}
+
+static const rtems_extensions_table extensions = {
+ .thread_start = ThreadStart
+};
+
+static void RtemsTaskReqStart_Pre_Id_Prepare(
+ RtemsTaskReqStart_Context *ctx,
+ RtemsTaskReqStart_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqStart_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is not associated with a task.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqStart_Pre_Id_Task: {
+ /*
+ * While the ``id`` parameter is associated with a task.
+ */
+ ctx->id = ctx->worker_id;
+ break;
+ }
+
+ case RtemsTaskReqStart_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqStart_Pre_EntryPoint_Prepare(
+ RtemsTaskReqStart_Context *ctx,
+ RtemsTaskReqStart_Pre_EntryPoint state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqStart_Pre_EntryPoint_Valid: {
+ /*
+ * While the task entry point specified by the ``entry_point`` parameter
+ * is valid.
+ */
+ ctx->entry_point = WorkerA;
+ break;
+ }
+
+ case RtemsTaskReqStart_Pre_EntryPoint_Null: {
+ /*
+ * While the task entry point specified by the ``entry_point`` parameter
+ * is equal to NULL.
+ */
+ ctx->entry_point = NULL;
+ break;
+ }
+
+ case RtemsTaskReqStart_Pre_EntryPoint_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqStart_Pre_Argument_Prepare(
+ RtemsTaskReqStart_Context *ctx,
+ RtemsTaskReqStart_Pre_Argument state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqStart_Pre_Argument_Pointer: {
+ /*
+ * While the entry point argument specified by the ``argument`` parameter
+ * is a pointer.
+ */
+ ctx->argument = (rtems_task_argument) ctx;
+ break;
+ }
+
+ case RtemsTaskReqStart_Pre_Argument_Number: {
+ /*
+ * While the entry point argument specified by the ``argument`` parameter
+ * is a 32-bit number.
+ */
+ ctx->argument = UINT32_C( 0x87654321 );
+ break;
+ }
+
+ case RtemsTaskReqStart_Pre_Argument_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqStart_Pre_Dormant_Prepare(
+ RtemsTaskReqStart_Context *ctx,
+ RtemsTaskReqStart_Pre_Dormant state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqStart_Pre_Dormant_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is dormant.
+ */
+ ctx->start = false;
+ break;
+ }
+
+ case RtemsTaskReqStart_Pre_Dormant_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not dormant.
+ */
+ ctx->start = true;
+ break;
+ }
+
+ case RtemsTaskReqStart_Pre_Dormant_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqStart_Pre_Suspended_Prepare(
+ RtemsTaskReqStart_Context *ctx,
+ RtemsTaskReqStart_Pre_Suspended state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqStart_Pre_Suspended_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is suspended.
+ */
+ ctx->suspend = true;
+ break;
+ }
+
+ case RtemsTaskReqStart_Pre_Suspended_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not suspended.
+ */
+ ctx->suspend = false;
+ break;
+ }
+
+ case RtemsTaskReqStart_Pre_Suspended_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqStart_Post_Status_Check(
+ RtemsTaskReqStart_Context *ctx,
+ RtemsTaskReqStart_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqStart_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_start() shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqStart_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_task_start() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTaskReqStart_Post_Status_InvId: {
+ /*
+ * The return status of rtems_task_start() shall be RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqStart_Post_Status_IncStat: {
+ /*
+ * The return status of rtems_task_start() shall be
+ * RTEMS_INCORRECT_STATE.
+ */
+ T_rsc( ctx->status, RTEMS_INCORRECT_STATE );
+ break;
+ }
+
+ case RtemsTaskReqStart_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqStart_Post_EntryPoint_Check(
+ RtemsTaskReqStart_Context *ctx,
+ RtemsTaskReqStart_Post_EntryPoint state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqStart_Post_EntryPoint_Set: {
+ /*
+ * The entry point of the task specified by the ``id`` parameter shall be
+ * set to the function specified by the ``entry_point`` parameter before
+ * the task is unblocked by the rtems_task_start() call.
+ */
+ T_eq_u32( ctx->counter, 1 );
+ break;
+ }
+
+ case RtemsTaskReqStart_Post_EntryPoint_Nop: {
+ /*
+ * No entry point of a task shall be modified by the rtems_task_start()
+ * call.
+ */
+ T_eq_u32( ctx->counter, 0 );
+ break;
+ }
+
+ case RtemsTaskReqStart_Post_EntryPoint_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqStart_Post_Argument_Check(
+ RtemsTaskReqStart_Context *ctx,
+ RtemsTaskReqStart_Post_Argument state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqStart_Post_Argument_Set: {
+ /*
+ * The entry point argument of the task specified by the ``id`` parameter
+ * shall be set to the value specified by the ``argument`` parameter
+ * before the task is unblocked by the rtems_task_start() call.
+ */
+ T_eq_u32( ctx->actual_argument, ctx->argument );
+ break;
+ }
+
+ case RtemsTaskReqStart_Post_Argument_Nop: {
+ /*
+ * No entry point argument of a task shall be modified by the
+ * rtems_task_start() call.
+ */
+ T_eq_u32( ctx->actual_argument, 0 );
+ break;
+ }
+
+ case RtemsTaskReqStart_Post_Argument_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqStart_Post_Unblock_Check(
+ RtemsTaskReqStart_Context *ctx,
+ RtemsTaskReqStart_Post_Unblock state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqStart_Post_Unblock_Yes: {
+ /*
+ * The task specified by the ``id`` parameter shall be unblocked by the
+ * rtems_task_start() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 1 );
+ T_eq_int(
+ ctx->scheduler_log.events[ 0 ].operation,
+ T_SCHEDULER_UNBLOCK
+ );
+ break;
+ }
+
+ case RtemsTaskReqStart_Post_Unblock_Nop: {
+ /*
+ * No task shall be unblocked by the rtems_task_start() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 0 );
+ break;
+ }
+
+ case RtemsTaskReqStart_Post_Unblock_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqStart_Post_StartExtensions_Check(
+ RtemsTaskReqStart_Context *ctx,
+ RtemsTaskReqStart_Post_StartExtensions state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqStart_Post_StartExtensions_Yes: {
+ /*
+ * The thread start user extensions shall be invoked by the
+ * rtems_task_start() call.
+ */
+ T_eq_u32( ctx->start_extension_calls, 1 );
+ break;
+ }
+
+ case RtemsTaskReqStart_Post_StartExtensions_Nop: {
+ /*
+ * The thread start user extensions shall not be invoked by the
+ * rtems_task_start() call.
+ */
+ T_eq_u32( ctx->start_extension_calls, 0 );
+ break;
+ }
+
+ case RtemsTaskReqStart_Post_StartExtensions_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqStart_Setup( RtemsTaskReqStart_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_extension_create(
+ rtems_build_name( 'T', 'E', 'S', 'T' ),
+ &extensions,
+ &ctx->extension_id
+ );
+ T_rsc_success( sc );
+}
+
+static void RtemsTaskReqStart_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqStart_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqStart_Setup( ctx );
+}
+
+static void RtemsTaskReqStart_Teardown( RtemsTaskReqStart_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_extension_delete( ctx->extension_id );
+ T_rsc_success( sc );
+}
+
+static void RtemsTaskReqStart_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqStart_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqStart_Teardown( ctx );
+}
+
+static void RtemsTaskReqStart_Prepare( RtemsTaskReqStart_Context *ctx )
+{
+ ctx->actual_argument = 0;
+ ctx->counter = 0;
+ ctx->worker_id = CreateTask( "WORK", PRIO_DEFAULT );
+}
+
+static void RtemsTaskReqStart_Action( RtemsTaskReqStart_Context *ctx )
+{
+ T_scheduler_log *log;
+
+ if ( ctx->start ) {
+ StartTask( ctx->worker_id, WorkerB, 0 );
+ }
+
+ if ( ctx->suspend ) {
+ SuspendTask( ctx->worker_id );
+ }
+
+ ctx->start_extension_calls = 0;
+
+ log = T_scheduler_record_2( &ctx->scheduler_log );
+ T_null( log );
+
+ ctx->status = rtems_task_start( ctx->id, ctx->entry_point, ctx->argument );
+
+ log = T_scheduler_record( NULL );
+ T_eq_ptr( &log->header, &ctx->scheduler_log.header );
+
+ Yield();
+}
+
+static void RtemsTaskReqStart_Cleanup( RtemsTaskReqStart_Context *ctx )
+{
+ DeleteTask( ctx->worker_id );
+}
+
+static const RtemsTaskReqStart_Entry
+RtemsTaskReqStart_Entries[] = {
+ { 0, 0, 0, 0, 0, 0, RtemsTaskReqStart_Post_Status_InvAddr,
+ RtemsTaskReqStart_Post_EntryPoint_Nop, RtemsTaskReqStart_Post_Argument_Nop,
+ RtemsTaskReqStart_Post_Unblock_Nop,
+ RtemsTaskReqStart_Post_StartExtensions_Nop },
+ { 0, 0, 0, 0, 1, 1, RtemsTaskReqStart_Post_Status_InvId,
+ RtemsTaskReqStart_Post_EntryPoint_Nop, RtemsTaskReqStart_Post_Argument_Nop,
+ RtemsTaskReqStart_Post_Unblock_Nop,
+ RtemsTaskReqStart_Post_StartExtensions_Nop },
+ { 0, 0, 0, 0, 0, 0, RtemsTaskReqStart_Post_Status_Ok,
+ RtemsTaskReqStart_Post_EntryPoint_Set, RtemsTaskReqStart_Post_Argument_Set,
+ RtemsTaskReqStart_Post_Unblock_Yes,
+ RtemsTaskReqStart_Post_StartExtensions_Yes },
+ { 0, 0, 0, 0, 0, 0, RtemsTaskReqStart_Post_Status_IncStat,
+ RtemsTaskReqStart_Post_EntryPoint_Nop, RtemsTaskReqStart_Post_Argument_Nop,
+ RtemsTaskReqStart_Post_Unblock_Nop,
+ RtemsTaskReqStart_Post_StartExtensions_Nop }
+};
+
+static const uint8_t
+RtemsTaskReqStart_Map[] = {
+ 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 3, 3, 2, 2, 3, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0
+};
+
+static size_t RtemsTaskReqStart_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqStart_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTaskReqStart_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqStart_Fixture = {
+ .setup = RtemsTaskReqStart_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqStart_Teardown_Wrap,
+ .scope = RtemsTaskReqStart_Scope,
+ .initial_context = &RtemsTaskReqStart_Instance
+};
+
+static inline RtemsTaskReqStart_Entry RtemsTaskReqStart_PopEntry(
+ RtemsTaskReqStart_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqStart_Entries[
+ RtemsTaskReqStart_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqStart_SetPreConditionStates(
+ RtemsTaskReqStart_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+
+ if ( ctx->Map.entry.Pre_Dormant_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsTaskReqStart_Pre_Dormant_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Suspended_NA ) {
+ ctx->Map.pcs[ 4 ] = RtemsTaskReqStart_Pre_Suspended_NA;
+ } else {
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+ }
+}
+
+static void RtemsTaskReqStart_TestVariant( RtemsTaskReqStart_Context *ctx )
+{
+ RtemsTaskReqStart_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqStart_Pre_EntryPoint_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqStart_Pre_Argument_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTaskReqStart_Pre_Dormant_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTaskReqStart_Pre_Suspended_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsTaskReqStart_Action( ctx );
+ RtemsTaskReqStart_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTaskReqStart_Post_EntryPoint_Check(
+ ctx,
+ ctx->Map.entry.Post_EntryPoint
+ );
+ RtemsTaskReqStart_Post_Argument_Check( ctx, ctx->Map.entry.Post_Argument );
+ RtemsTaskReqStart_Post_Unblock_Check( ctx, ctx->Map.entry.Post_Unblock );
+ RtemsTaskReqStart_Post_StartExtensions_Check(
+ ctx,
+ ctx->Map.entry.Post_StartExtensions
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqStart( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTaskReqStart, &RtemsTaskReqStart_Fixture )
+{
+ RtemsTaskReqStart_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsTaskReqStart_Pre_Id_Invalid;
+ ctx->Map.pci[ 0 ] < RtemsTaskReqStart_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsTaskReqStart_Pre_EntryPoint_Valid;
+ ctx->Map.pci[ 1 ] < RtemsTaskReqStart_Pre_EntryPoint_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsTaskReqStart_Pre_Argument_Pointer;
+ ctx->Map.pci[ 2 ] < RtemsTaskReqStart_Pre_Argument_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsTaskReqStart_Pre_Dormant_Yes;
+ ctx->Map.pci[ 3 ] < RtemsTaskReqStart_Pre_Dormant_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = RtemsTaskReqStart_Pre_Suspended_Yes;
+ ctx->Map.pci[ 4 ] < RtemsTaskReqStart_Pre_Suspended_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqStart_PopEntry( ctx );
+ RtemsTaskReqStart_SetPreConditionStates( ctx );
+ RtemsTaskReqStart_Prepare( ctx );
+ RtemsTaskReqStart_TestVariant( ctx );
+ RtemsTaskReqStart_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-storage-size.c b/testsuites/validation/tc-task-storage-size.c
new file mode 100644
index 0000000000..29ac53c237
--- /dev/null
+++ b/testsuites/validation/tc-task-storage-size.c
@@ -0,0 +1,427 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqStorageSize
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqStorageSize spec:/rtems/task/req/storage-size
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqStorageSize_Pre_Id_Invalid,
+ RtemsTaskReqStorageSize_Pre_Id_Task,
+ RtemsTaskReqStorageSize_Pre_Id_NA
+} RtemsTaskReqStorageSize_Pre_Id;
+
+typedef enum {
+ RtemsTaskReqStorageSize_Pre_Suspended_Yes,
+ RtemsTaskReqStorageSize_Pre_Suspended_No,
+ RtemsTaskReqStorageSize_Pre_Suspended_NA
+} RtemsTaskReqStorageSize_Pre_Suspended;
+
+typedef enum {
+ RtemsTaskReqStorageSize_Post_Status_Ok,
+ RtemsTaskReqStorageSize_Post_Status_InvId,
+ RtemsTaskReqStorageSize_Post_Status_AlrdySus,
+ RtemsTaskReqStorageSize_Post_Status_NA
+} RtemsTaskReqStorageSize_Post_Status;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Pre_Suspended_NA : 1;
+ uint8_t Post_Status : 2;
+} RtemsTaskReqStorageSize_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/storage-size test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the identifier of a task.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief If this member is true, then the worker is suspended before the
+ * rtems_task_suspend() call.
+ */
+ bool suspend;
+
+ /**
+ * @brief This member contains the return value of the rtems_task_suspend()
+ * call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``id`` parameter value.
+ */
+ rtems_id id;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 2 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqStorageSize_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqStorageSize_Context;
+
+static RtemsTaskReqStorageSize_Context
+ RtemsTaskReqStorageSize_Instance;
+
+static const char * const RtemsTaskReqStorageSize_PreDesc_Id[] = {
+ "Invalid",
+ "Task",
+ "NA"
+};
+
+static const char * const RtemsTaskReqStorageSize_PreDesc_Suspended[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqStorageSize_PreDesc[] = {
+ RtemsTaskReqStorageSize_PreDesc_Id,
+ RtemsTaskReqStorageSize_PreDesc_Suspended,
+ NULL
+};
+
+static void Worker( rtems_task_argument arg )
+{
+ while ( true ) {
+ /* Do nothing */
+ }
+}
+
+static void RtemsTaskReqStorageSize_Pre_Id_Prepare(
+ RtemsTaskReqStorageSize_Context *ctx,
+ RtemsTaskReqStorageSize_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqStorageSize_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is not associated with a task.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqStorageSize_Pre_Id_Task: {
+ /*
+ * While the ``id`` parameter is associated with a task.
+ */
+ ctx->id = ctx->worker_id;
+ break;
+ }
+
+ case RtemsTaskReqStorageSize_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqStorageSize_Pre_Suspended_Prepare(
+ RtemsTaskReqStorageSize_Context *ctx,
+ RtemsTaskReqStorageSize_Pre_Suspended state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqStorageSize_Pre_Suspended_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is suspended.
+ */
+ ctx->suspend = true;
+ break;
+ }
+
+ case RtemsTaskReqStorageSize_Pre_Suspended_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not suspended.
+ */
+ ctx->suspend = false;
+ break;
+ }
+
+ case RtemsTaskReqStorageSize_Pre_Suspended_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqStorageSize_Post_Status_Check(
+ RtemsTaskReqStorageSize_Context *ctx,
+ RtemsTaskReqStorageSize_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqStorageSize_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_suspend() shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqStorageSize_Post_Status_InvId: {
+ /*
+ * The return status of rtems_task_suspend() shall be RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqStorageSize_Post_Status_AlrdySus: {
+ /*
+ * The return status of rtems_task_suspend() shall be
+ * RTEMS_ALREADY_SUSPENDED.
+ */
+ T_rsc( ctx->status, RTEMS_ALREADY_SUSPENDED );
+ break;
+ }
+
+ case RtemsTaskReqStorageSize_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqStorageSize_Setup(
+ RtemsTaskReqStorageSize_Context *ctx
+)
+{
+ ctx->worker_id = CreateTask( "WORK", PRIO_LOW );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+static void RtemsTaskReqStorageSize_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqStorageSize_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqStorageSize_Setup( ctx );
+}
+
+static void RtemsTaskReqStorageSize_Teardown(
+ RtemsTaskReqStorageSize_Context *ctx
+)
+{
+ DeleteTask( ctx->worker_id );
+}
+
+static void RtemsTaskReqStorageSize_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqStorageSize_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqStorageSize_Teardown( ctx );
+}
+
+static void RtemsTaskReqStorageSize_Action(
+ RtemsTaskReqStorageSize_Context *ctx
+)
+{
+ if ( ctx->suspend ) {
+ SuspendTask( ctx->worker_id );
+ }
+
+ ctx->status = rtems_task_suspend( ctx->id );
+
+ if ( ctx->suspend ) {
+ ResumeTask( ctx->worker_id );
+ }
+}
+
+static const RtemsTaskReqStorageSize_Entry
+RtemsTaskReqStorageSize_Entries[] = {
+ { 0, 0, 1, RtemsTaskReqStorageSize_Post_Status_InvId },
+ { 0, 0, 0, RtemsTaskReqStorageSize_Post_Status_AlrdySus },
+ { 0, 0, 0, RtemsTaskReqStorageSize_Post_Status_Ok }
+};
+
+static const uint8_t
+RtemsTaskReqStorageSize_Map[] = {
+ 0, 0, 1, 2
+};
+
+static size_t RtemsTaskReqStorageSize_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqStorageSize_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsTaskReqStorageSize_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqStorageSize_Fixture = {
+ .setup = RtemsTaskReqStorageSize_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqStorageSize_Teardown_Wrap,
+ .scope = RtemsTaskReqStorageSize_Scope,
+ .initial_context = &RtemsTaskReqStorageSize_Instance
+};
+
+static inline RtemsTaskReqStorageSize_Entry RtemsTaskReqStorageSize_PopEntry(
+ RtemsTaskReqStorageSize_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqStorageSize_Entries[
+ RtemsTaskReqStorageSize_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqStorageSize_SetPreConditionStates(
+ RtemsTaskReqStorageSize_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_Suspended_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqStorageSize_Pre_Suspended_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+}
+
+static void RtemsTaskReqStorageSize_TestVariant(
+ RtemsTaskReqStorageSize_Context *ctx
+)
+{
+ RtemsTaskReqStorageSize_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqStorageSize_Pre_Suspended_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqStorageSize_Action( ctx );
+ RtemsTaskReqStorageSize_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqStorageSize( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsTaskReqStorageSize,
+ &RtemsTaskReqStorageSize_Fixture
+)
+{
+ RtemsTaskReqStorageSize_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsTaskReqStorageSize_Pre_Id_Invalid;
+ ctx->Map.pci[ 0 ] < RtemsTaskReqStorageSize_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsTaskReqStorageSize_Pre_Suspended_Yes;
+ ctx->Map.pci[ 1 ] < RtemsTaskReqStorageSize_Pre_Suspended_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqStorageSize_PopEntry( ctx );
+ RtemsTaskReqStorageSize_SetPreConditionStates( ctx );
+ RtemsTaskReqStorageSize_TestVariant( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-suspend.c b/testsuites/validation/tc-task-suspend.c
new file mode 100644
index 0000000000..123e223fb9
--- /dev/null
+++ b/testsuites/validation/tc-task-suspend.c
@@ -0,0 +1,411 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqSuspend
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqSuspend spec:/rtems/task/req/suspend
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqSuspend_Pre_Id_Invalid,
+ RtemsTaskReqSuspend_Pre_Id_Task,
+ RtemsTaskReqSuspend_Pre_Id_NA
+} RtemsTaskReqSuspend_Pre_Id;
+
+typedef enum {
+ RtemsTaskReqSuspend_Pre_Suspended_Yes,
+ RtemsTaskReqSuspend_Pre_Suspended_No,
+ RtemsTaskReqSuspend_Pre_Suspended_NA
+} RtemsTaskReqSuspend_Pre_Suspended;
+
+typedef enum {
+ RtemsTaskReqSuspend_Post_Status_Ok,
+ RtemsTaskReqSuspend_Post_Status_InvId,
+ RtemsTaskReqSuspend_Post_Status_AlrdySus,
+ RtemsTaskReqSuspend_Post_Status_NA
+} RtemsTaskReqSuspend_Post_Status;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Pre_Suspended_NA : 1;
+ uint8_t Post_Status : 2;
+} RtemsTaskReqSuspend_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/suspend test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the identifier of a task.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief If this member is true, then the worker is suspended before the
+ * rtems_task_suspend() call.
+ */
+ bool suspend;
+
+ /**
+ * @brief This member contains the return value of the rtems_task_suspend()
+ * call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies if the ``id`` parameter value.
+ */
+ rtems_id id;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 2 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqSuspend_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqSuspend_Context;
+
+static RtemsTaskReqSuspend_Context
+ RtemsTaskReqSuspend_Instance;
+
+static const char * const RtemsTaskReqSuspend_PreDesc_Id[] = {
+ "Invalid",
+ "Task",
+ "NA"
+};
+
+static const char * const RtemsTaskReqSuspend_PreDesc_Suspended[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqSuspend_PreDesc[] = {
+ RtemsTaskReqSuspend_PreDesc_Id,
+ RtemsTaskReqSuspend_PreDesc_Suspended,
+ NULL
+};
+
+static void Worker( rtems_task_argument arg )
+{
+ while ( true ) {
+ /* Do nothing */
+ }
+}
+
+static void RtemsTaskReqSuspend_Pre_Id_Prepare(
+ RtemsTaskReqSuspend_Context *ctx,
+ RtemsTaskReqSuspend_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSuspend_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is not associated with a task.
+ */
+ ctx->id = INVALID_ID;
+ break;
+ }
+
+ case RtemsTaskReqSuspend_Pre_Id_Task: {
+ /*
+ * While the ``id`` parameter is associated with a task.
+ */
+ ctx->id = ctx->worker_id;
+ break;
+ }
+
+ case RtemsTaskReqSuspend_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSuspend_Pre_Suspended_Prepare(
+ RtemsTaskReqSuspend_Context *ctx,
+ RtemsTaskReqSuspend_Pre_Suspended state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSuspend_Pre_Suspended_Yes: {
+ /*
+ * While the task specified by the ``id`` parameter is suspended.
+ */
+ ctx->suspend = true;
+ break;
+ }
+
+ case RtemsTaskReqSuspend_Pre_Suspended_No: {
+ /*
+ * While the task specified by the ``id`` parameter is not suspended.
+ */
+ ctx->suspend = false;
+ break;
+ }
+
+ case RtemsTaskReqSuspend_Pre_Suspended_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSuspend_Post_Status_Check(
+ RtemsTaskReqSuspend_Context *ctx,
+ RtemsTaskReqSuspend_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqSuspend_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_suspend() shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqSuspend_Post_Status_InvId: {
+ /*
+ * The return status of rtems_task_suspend() shall be RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTaskReqSuspend_Post_Status_AlrdySus: {
+ /*
+ * The return status of rtems_task_suspend() shall be
+ * RTEMS_ALREADY_SUSPENDED.
+ */
+ T_rsc( ctx->status, RTEMS_ALREADY_SUSPENDED );
+ break;
+ }
+
+ case RtemsTaskReqSuspend_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqSuspend_Setup( RtemsTaskReqSuspend_Context *ctx )
+{
+ ctx->worker_id = CreateTask( "WORK", PRIO_LOW );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+static void RtemsTaskReqSuspend_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqSuspend_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqSuspend_Setup( ctx );
+}
+
+static void RtemsTaskReqSuspend_Teardown( RtemsTaskReqSuspend_Context *ctx )
+{
+ DeleteTask( ctx->worker_id );
+}
+
+static void RtemsTaskReqSuspend_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqSuspend_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqSuspend_Teardown( ctx );
+}
+
+static void RtemsTaskReqSuspend_Action( RtemsTaskReqSuspend_Context *ctx )
+{
+ if ( ctx->suspend ) {
+ SuspendTask( ctx->worker_id );
+ }
+
+ ctx->status = rtems_task_suspend( ctx->id );
+
+ if ( ctx->suspend ) {
+ ResumeTask( ctx->worker_id );
+ }
+}
+
+static const RtemsTaskReqSuspend_Entry
+RtemsTaskReqSuspend_Entries[] = {
+ { 0, 0, 1, RtemsTaskReqSuspend_Post_Status_InvId },
+ { 0, 0, 0, RtemsTaskReqSuspend_Post_Status_AlrdySus },
+ { 0, 0, 0, RtemsTaskReqSuspend_Post_Status_Ok }
+};
+
+static const uint8_t
+RtemsTaskReqSuspend_Map[] = {
+ 0, 0, 1, 2
+};
+
+static size_t RtemsTaskReqSuspend_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqSuspend_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTaskReqSuspend_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqSuspend_Fixture = {
+ .setup = RtemsTaskReqSuspend_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqSuspend_Teardown_Wrap,
+ .scope = RtemsTaskReqSuspend_Scope,
+ .initial_context = &RtemsTaskReqSuspend_Instance
+};
+
+static inline RtemsTaskReqSuspend_Entry RtemsTaskReqSuspend_PopEntry(
+ RtemsTaskReqSuspend_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqSuspend_Entries[
+ RtemsTaskReqSuspend_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqSuspend_SetPreConditionStates(
+ RtemsTaskReqSuspend_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_Suspended_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqSuspend_Pre_Suspended_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+}
+
+static void RtemsTaskReqSuspend_TestVariant( RtemsTaskReqSuspend_Context *ctx )
+{
+ RtemsTaskReqSuspend_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqSuspend_Pre_Suspended_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqSuspend_Action( ctx );
+ RtemsTaskReqSuspend_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqSuspend( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTaskReqSuspend, &RtemsTaskReqSuspend_Fixture )
+{
+ RtemsTaskReqSuspend_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsTaskReqSuspend_Pre_Id_Invalid;
+ ctx->Map.pci[ 0 ] < RtemsTaskReqSuspend_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsTaskReqSuspend_Pre_Suspended_Yes;
+ ctx->Map.pci[ 1 ] < RtemsTaskReqSuspend_Pre_Suspended_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqSuspend_PopEntry( ctx );
+ RtemsTaskReqSuspend_SetPreConditionStates( ctx );
+ RtemsTaskReqSuspend_TestVariant( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-wake-after.c b/testsuites/validation/tc-task-wake-after.c
new file mode 100644
index 0000000000..ba12d21c85
--- /dev/null
+++ b/testsuites/validation/tc-task-wake-after.c
@@ -0,0 +1,574 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqWakeAfter
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/test-scheduler.h>
+#include <rtems/score/threaddispatch.h>
+#include <rtems/score/timecounter.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqWakeAfter spec:/rtems/task/req/wake-after
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationOneCpu0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqWakeAfter_Pre_Ticks_Yield,
+ RtemsTaskReqWakeAfter_Pre_Ticks_Interval,
+ RtemsTaskReqWakeAfter_Pre_Ticks_NA
+} RtemsTaskReqWakeAfter_Pre_Ticks;
+
+typedef enum {
+ RtemsTaskReqWakeAfter_Pre_Suspended_Yes,
+ RtemsTaskReqWakeAfter_Pre_Suspended_No,
+ RtemsTaskReqWakeAfter_Pre_Suspended_NA
+} RtemsTaskReqWakeAfter_Pre_Suspended;
+
+typedef enum {
+ RtemsTaskReqWakeAfter_Post_Status_Ok,
+ RtemsTaskReqWakeAfter_Post_Status_NA
+} RtemsTaskReqWakeAfter_Post_Status;
+
+typedef enum {
+ RtemsTaskReqWakeAfter_Post_Timer_Inactive,
+ RtemsTaskReqWakeAfter_Post_Timer_Ticks,
+ RtemsTaskReqWakeAfter_Post_Timer_NA
+} RtemsTaskReqWakeAfter_Post_Timer;
+
+typedef enum {
+ RtemsTaskReqWakeAfter_Post_Expire_Relative,
+ RtemsTaskReqWakeAfter_Post_Expire_NA
+} RtemsTaskReqWakeAfter_Post_Expire;
+
+typedef enum {
+ RtemsTaskReqWakeAfter_Post_Scheduler_Block,
+ RtemsTaskReqWakeAfter_Post_Scheduler_Yield,
+ RtemsTaskReqWakeAfter_Post_Scheduler_Nop,
+ RtemsTaskReqWakeAfter_Post_Scheduler_NA
+} RtemsTaskReqWakeAfter_Post_Scheduler;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Ticks_NA : 1;
+ uint16_t Pre_Suspended_NA : 1;
+ uint16_t Post_Status : 1;
+ uint16_t Post_Timer : 2;
+ uint16_t Post_Expire : 1;
+ uint16_t Post_Scheduler : 2;
+} RtemsTaskReqWakeAfter_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/wake-after test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides the scheduler operation records.
+ */
+ T_scheduler_log_4 scheduler_log;
+
+ /**
+ * @brief This member contains the clock tick value before the
+ * rtems_task_wake_after() call.
+ */
+ uint64_t now;
+
+ /**
+ * @brief This member contains the worker task identifier.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief If this member is true, then the worker shall be suspended during
+ * the rtems_task_wake_after() call.
+ */
+ bool suspended;
+
+ /**
+ * @brief This member contains the timer information of the worker task.
+ */
+ TaskTimerInfo timer_info;
+
+ /**
+ * @brief This member contains the return value of the
+ * rtems_task_wake_after() call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies the ``ticks`` parameter value.
+ */
+ rtems_interval ticks;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqWakeAfter_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqWakeAfter_Context;
+
+static RtemsTaskReqWakeAfter_Context
+ RtemsTaskReqWakeAfter_Instance;
+
+static const char * const RtemsTaskReqWakeAfter_PreDesc_Ticks[] = {
+ "Yield",
+ "Interval",
+ "NA"
+};
+
+static const char * const RtemsTaskReqWakeAfter_PreDesc_Suspended[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqWakeAfter_PreDesc[] = {
+ RtemsTaskReqWakeAfter_PreDesc_Ticks,
+ RtemsTaskReqWakeAfter_PreDesc_Suspended,
+ NULL
+};
+
+typedef RtemsTaskReqWakeAfter_Context Context;
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ T_scheduler_log *log;
+
+ SuspendSelf();
+
+ ctx->now = rtems_clock_get_ticks_since_boot();
+
+ if ( ctx->suspended ) {
+ Per_CPU_Control *cpu_self;
+
+ /*
+ * The rtems_task_wake_after() disables thread dispatching to carry out
+ * its operations. While thread dispatching is disabled, when an
+ * interrupt suspends the calling task, the suspended task executes
+ * until it enables thread dispatching. We simulate this situation
+ * with the code below. Where the system was built with SMP support
+ * enabled, other processors may suspend an executing task in parallel.
+ * This case is also simulated by the code below.
+ */
+ cpu_self = _Thread_Dispatch_disable();
+ SuspendSelf();
+ cpu_self->dispatch_necessary = false;
+ _Thread_Dispatch_enable( cpu_self );
+ }
+
+ log = T_scheduler_record_4( &ctx->scheduler_log );
+ T_null( log );
+
+ ctx->status = rtems_task_wake_after( ctx->ticks );
+
+ (void) T_scheduler_record( NULL );
+ }
+}
+
+static void RtemsTaskReqWakeAfter_Pre_Ticks_Prepare(
+ RtemsTaskReqWakeAfter_Context *ctx,
+ RtemsTaskReqWakeAfter_Pre_Ticks state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqWakeAfter_Pre_Ticks_Yield: {
+ /*
+ * While the ``ticks`` parameter is equal to RTEMS_YIELD_PROCESSOR.
+ */
+ ctx->ticks = RTEMS_YIELD_PROCESSOR;
+ break;
+ }
+
+ case RtemsTaskReqWakeAfter_Pre_Ticks_Interval: {
+ /*
+ * While the ``ticks`` parameter is not equal to RTEMS_YIELD_PROCESSOR.
+ */
+ ctx->ticks = UINT32_MAX;
+ break;
+ }
+
+ case RtemsTaskReqWakeAfter_Pre_Ticks_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqWakeAfter_Pre_Suspended_Prepare(
+ RtemsTaskReqWakeAfter_Context *ctx,
+ RtemsTaskReqWakeAfter_Pre_Suspended state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqWakeAfter_Pre_Suspended_Yes: {
+ /*
+ * While the calling task is suspended.
+ */
+ ctx->suspended = true;
+ break;
+ }
+
+ case RtemsTaskReqWakeAfter_Pre_Suspended_No: {
+ /*
+ * While the calling task is not suspended.
+ */
+ ctx->suspended = false;
+ break;
+ }
+
+ case RtemsTaskReqWakeAfter_Pre_Suspended_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqWakeAfter_Post_Status_Check(
+ RtemsTaskReqWakeAfter_Context *ctx,
+ RtemsTaskReqWakeAfter_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqWakeAfter_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_wake_after() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqWakeAfter_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqWakeAfter_Post_Timer_Check(
+ RtemsTaskReqWakeAfter_Context *ctx,
+ RtemsTaskReqWakeAfter_Post_Timer state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqWakeAfter_Post_Timer_Inactive: {
+ /*
+ * The timer of the calling task shall be inactive.
+ */
+ T_eq_int( ctx->timer_info.state, TASK_TIMER_INACTIVE );
+ break;
+ }
+
+ case RtemsTaskReqWakeAfter_Post_Timer_Ticks: {
+ /*
+ * The timer of the calling task shall be active using the clock tick.
+ */
+ T_eq_int( ctx->timer_info.state, TASK_TIMER_TICKS );
+ break;
+ }
+
+ case RtemsTaskReqWakeAfter_Post_Timer_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqWakeAfter_Post_Expire_Check(
+ RtemsTaskReqWakeAfter_Context *ctx,
+ RtemsTaskReqWakeAfter_Post_Expire state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqWakeAfter_Post_Expire_Relative: {
+ /*
+ * The timer of the calling task shall expire at the time point specified
+ * by the sum of the current clock tick and the interval specified by the
+ * ``ticks`` parameter.
+ */
+ T_eq_u64( ctx->timer_info.expire_ticks, ctx->now + UINT32_MAX );
+ break;
+ }
+
+ case RtemsTaskReqWakeAfter_Post_Expire_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqWakeAfter_Post_Scheduler_Check(
+ RtemsTaskReqWakeAfter_Context *ctx,
+ RtemsTaskReqWakeAfter_Post_Scheduler state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqWakeAfter_Post_Scheduler_Block: {
+ /*
+ * The calling task shall be blocked by the scheduler exactly once by the
+ * rtems_task_wake_after() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 1 );
+ T_eq_int(
+ ctx->scheduler_log.events[ 0 ].operation,
+ T_SCHEDULER_BLOCK
+ );
+ break;
+ }
+
+ case RtemsTaskReqWakeAfter_Post_Scheduler_Yield: {
+ /*
+ * The calling task shall yield by the scheduler exactly once by the
+ * rtems_task_wake_after() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 1 );
+ T_eq_int(
+ ctx->scheduler_log.events[ 0 ].operation,
+ T_SCHEDULER_YIELD
+ );
+ break;
+ }
+
+ case RtemsTaskReqWakeAfter_Post_Scheduler_Nop: {
+ /*
+ * The calling task shall not carry out a scheduler operation through the
+ * rtems_task_wake_after() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 0 );
+ break;
+ }
+
+ case RtemsTaskReqWakeAfter_Post_Scheduler_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqWakeAfter_Setup( RtemsTaskReqWakeAfter_Context *ctx )
+{
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+static void RtemsTaskReqWakeAfter_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqWakeAfter_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqWakeAfter_Setup( ctx );
+}
+
+static void RtemsTaskReqWakeAfter_Teardown(
+ RtemsTaskReqWakeAfter_Context *ctx
+)
+{
+ DeleteTask( ctx->worker_id );
+ RestoreRunnerPriority();
+}
+
+static void RtemsTaskReqWakeAfter_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqWakeAfter_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqWakeAfter_Teardown( ctx );
+}
+
+static void RtemsTaskReqWakeAfter_Prepare( RtemsTaskReqWakeAfter_Context *ctx )
+{
+ ctx->status = RTEMS_NOT_IMPLEMENTED;
+}
+
+static void RtemsTaskReqWakeAfter_Action( RtemsTaskReqWakeAfter_Context *ctx )
+{
+ ResumeTask( ctx->worker_id );
+ (void) T_scheduler_record( NULL );
+ GetTaskTimerInfo( ctx->worker_id, &ctx->timer_info );
+
+ if ( ctx->suspended ) {
+ ResumeTask( ctx->worker_id );
+ }
+
+ FinalClockTick();
+}
+
+static const RtemsTaskReqWakeAfter_Entry
+RtemsTaskReqWakeAfter_Entries[] = {
+ { 0, 0, 0, RtemsTaskReqWakeAfter_Post_Status_Ok,
+ RtemsTaskReqWakeAfter_Post_Timer_Inactive,
+ RtemsTaskReqWakeAfter_Post_Expire_NA,
+ RtemsTaskReqWakeAfter_Post_Scheduler_Nop },
+ { 0, 0, 0, RtemsTaskReqWakeAfter_Post_Status_Ok,
+ RtemsTaskReqWakeAfter_Post_Timer_Inactive,
+ RtemsTaskReqWakeAfter_Post_Expire_NA,
+ RtemsTaskReqWakeAfter_Post_Scheduler_Yield },
+ { 0, 0, 0, RtemsTaskReqWakeAfter_Post_Status_Ok,
+ RtemsTaskReqWakeAfter_Post_Timer_Ticks,
+ RtemsTaskReqWakeAfter_Post_Expire_Relative,
+ RtemsTaskReqWakeAfter_Post_Scheduler_Nop },
+ { 0, 0, 0, RtemsTaskReqWakeAfter_Post_Status_Ok,
+ RtemsTaskReqWakeAfter_Post_Timer_Ticks,
+ RtemsTaskReqWakeAfter_Post_Expire_Relative,
+ RtemsTaskReqWakeAfter_Post_Scheduler_Block }
+};
+
+static const uint8_t
+RtemsTaskReqWakeAfter_Map[] = {
+ 0, 1, 2, 3
+};
+
+static size_t RtemsTaskReqWakeAfter_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqWakeAfter_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTaskReqWakeAfter_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqWakeAfter_Fixture = {
+ .setup = RtemsTaskReqWakeAfter_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqWakeAfter_Teardown_Wrap,
+ .scope = RtemsTaskReqWakeAfter_Scope,
+ .initial_context = &RtemsTaskReqWakeAfter_Instance
+};
+
+static inline RtemsTaskReqWakeAfter_Entry RtemsTaskReqWakeAfter_PopEntry(
+ RtemsTaskReqWakeAfter_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqWakeAfter_Entries[
+ RtemsTaskReqWakeAfter_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqWakeAfter_TestVariant(
+ RtemsTaskReqWakeAfter_Context *ctx
+)
+{
+ RtemsTaskReqWakeAfter_Pre_Ticks_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqWakeAfter_Pre_Suspended_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqWakeAfter_Action( ctx );
+ RtemsTaskReqWakeAfter_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTaskReqWakeAfter_Post_Timer_Check( ctx, ctx->Map.entry.Post_Timer );
+ RtemsTaskReqWakeAfter_Post_Expire_Check( ctx, ctx->Map.entry.Post_Expire );
+ RtemsTaskReqWakeAfter_Post_Scheduler_Check(
+ ctx,
+ ctx->Map.entry.Post_Scheduler
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqWakeAfter( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTaskReqWakeAfter, &RtemsTaskReqWakeAfter_Fixture )
+{
+ RtemsTaskReqWakeAfter_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTaskReqWakeAfter_Pre_Ticks_Yield;
+ ctx->Map.pcs[ 0 ] < RtemsTaskReqWakeAfter_Pre_Ticks_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTaskReqWakeAfter_Pre_Suspended_Yes;
+ ctx->Map.pcs[ 1 ] < RtemsTaskReqWakeAfter_Pre_Suspended_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqWakeAfter_PopEntry( ctx );
+ RtemsTaskReqWakeAfter_Prepare( ctx );
+ RtemsTaskReqWakeAfter_TestVariant( ctx );
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-wake-when.c b/testsuites/validation/tc-task-wake-when.c
new file mode 100644
index 0000000000..bb31fded26
--- /dev/null
+++ b/testsuites/validation/tc-task-wake-when.c
@@ -0,0 +1,665 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskReqWakeWhen
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+#include <rtems/test-scheduler.h>
+#include <rtems/score/timecounter.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskReqWakeWhen spec:/rtems/task/req/wake-when
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqWakeWhen_Pre_TODSet_Yes,
+ RtemsTaskReqWakeWhen_Pre_TODSet_No,
+ RtemsTaskReqWakeWhen_Pre_TODSet_NA
+} RtemsTaskReqWakeWhen_Pre_TODSet;
+
+typedef enum {
+ RtemsTaskReqWakeWhen_Pre_TOD_Valid,
+ RtemsTaskReqWakeWhen_Pre_TOD_Null,
+ RtemsTaskReqWakeWhen_Pre_TOD_NA
+} RtemsTaskReqWakeWhen_Pre_TOD;
+
+typedef enum {
+ RtemsTaskReqWakeWhen_Pre_TODObj_Future,
+ RtemsTaskReqWakeWhen_Pre_TODObj_PastOrNow,
+ RtemsTaskReqWakeWhen_Pre_TODObj_Invalid,
+ RtemsTaskReqWakeWhen_Pre_TODObj_NA
+} RtemsTaskReqWakeWhen_Pre_TODObj;
+
+typedef enum {
+ RtemsTaskReqWakeWhen_Post_Status_Ok,
+ RtemsTaskReqWakeWhen_Post_Status_NotDef,
+ RtemsTaskReqWakeWhen_Post_Status_InvAddr,
+ RtemsTaskReqWakeWhen_Post_Status_InvClock,
+ RtemsTaskReqWakeWhen_Post_Status_NA
+} RtemsTaskReqWakeWhen_Post_Status;
+
+typedef enum {
+ RtemsTaskReqWakeWhen_Post_Timer_Inactive,
+ RtemsTaskReqWakeWhen_Post_Timer_Realtime,
+ RtemsTaskReqWakeWhen_Post_Timer_NA
+} RtemsTaskReqWakeWhen_Post_Timer;
+
+typedef enum {
+ RtemsTaskReqWakeWhen_Post_Expire_Absolute,
+ RtemsTaskReqWakeWhen_Post_Expire_NA
+} RtemsTaskReqWakeWhen_Post_Expire;
+
+typedef enum {
+ RtemsTaskReqWakeWhen_Post_Scheduler_Block,
+ RtemsTaskReqWakeWhen_Post_Scheduler_Nop,
+ RtemsTaskReqWakeWhen_Post_Scheduler_NA
+} RtemsTaskReqWakeWhen_Post_Scheduler;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_TODSet_NA : 1;
+ uint16_t Pre_TOD_NA : 1;
+ uint16_t Pre_TODObj_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_Timer : 2;
+ uint16_t Post_Expire : 1;
+ uint16_t Post_Scheduler : 2;
+} RtemsTaskReqWakeWhen_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/wake-when test case.
+ */
+typedef struct {
+ /**
+ * @brief This member provides the scheduler operation records.
+ */
+ T_scheduler_log_4 scheduler_log;
+
+ /**
+ * @brief This member contains the CLOCK_REALTIME value before the
+ * rtems_task_wake_when() call.
+ */
+ struct timespec now;
+
+ /**
+ * @brief This member contains the worker task identifier.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member contains the timer information of the worker task.
+ */
+ TaskTimerInfo timer_info;
+
+ /**
+ * @brief This member provides the object referenced by the ``time_buffer``
+ * parameter.
+ */
+ rtems_time_of_day tod_obj;
+
+ /**
+ * @brief This member contains the return value of the rtems_task_wake_when()
+ * call.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member specifies the ``time_buffer`` parameter value.
+ */
+ const rtems_time_of_day *tod;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 3 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTaskReqWakeWhen_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTaskReqWakeWhen_Context;
+
+static RtemsTaskReqWakeWhen_Context
+ RtemsTaskReqWakeWhen_Instance;
+
+static const char * const RtemsTaskReqWakeWhen_PreDesc_TODSet[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTaskReqWakeWhen_PreDesc_TOD[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsTaskReqWakeWhen_PreDesc_TODObj[] = {
+ "Future",
+ "PastOrNow",
+ "Invalid",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqWakeWhen_PreDesc[] = {
+ RtemsTaskReqWakeWhen_PreDesc_TODSet,
+ RtemsTaskReqWakeWhen_PreDesc_TOD,
+ RtemsTaskReqWakeWhen_PreDesc_TODObj,
+ NULL
+};
+
+typedef RtemsTaskReqWakeWhen_Context Context;
+
+static void SetTOD( rtems_time_of_day *tod, uint32_t year )
+{
+ memset( tod, 0, sizeof( *tod ) );
+ tod->year = year;
+ tod->month = 1;
+ tod->day = 1;
+}
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ T_scheduler_log *log;
+
+ SuspendSelf();
+
+ log = T_scheduler_record_4( &ctx->scheduler_log );
+ T_null( log );
+
+ _Timecounter_Getnanotime( &ctx->now );
+
+ ctx->status = rtems_task_wake_when( ctx->tod );
+
+ (void) T_scheduler_record( NULL );
+ }
+}
+
+static void RtemsTaskReqWakeWhen_Pre_TODSet_Prepare(
+ RtemsTaskReqWakeWhen_Context *ctx,
+ RtemsTaskReqWakeWhen_Pre_TODSet state
+)
+{
+ rtems_status_code sc;
+ rtems_time_of_day tod;
+
+ switch ( state ) {
+ case RtemsTaskReqWakeWhen_Pre_TODSet_Yes: {
+ /*
+ * While the CLOCK_REALTIME was set at least once.
+ */
+ SetTOD( &tod, 2000 );
+ sc = rtems_clock_set( &tod );
+ T_rsc_success( sc );
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Pre_TODSet_No: {
+ /*
+ * While the CLOCK_REALTIME was never set.
+ */
+ UnsetClock();
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Pre_TODSet_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqWakeWhen_Pre_TOD_Prepare(
+ RtemsTaskReqWakeWhen_Context *ctx,
+ RtemsTaskReqWakeWhen_Pre_TOD state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqWakeWhen_Pre_TOD_Valid: {
+ /*
+ * While the ``time_buffer`` parameter references an object of type
+ * rtems_time_of_day.
+ */
+ ctx->tod = &ctx->tod_obj;
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Pre_TOD_Null: {
+ /*
+ * While the ``time_buffer`` parameter is equal to NULL.
+ */
+ ctx->tod = NULL;
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Pre_TOD_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqWakeWhen_Pre_TODObj_Prepare(
+ RtemsTaskReqWakeWhen_Context *ctx,
+ RtemsTaskReqWakeWhen_Pre_TODObj state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqWakeWhen_Pre_TODObj_Future: {
+ /*
+ * While the object referenced by the ``time_buffer`` parameter specifies
+ * a valid time of day in the future.
+ */
+ SetTOD( &ctx->tod_obj, 2010 );
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Pre_TODObj_PastOrNow: {
+ /*
+ * While the object referenced by the ``time_buffer`` parameter specifies
+ * a valid time of day in the past or at the time of the
+ * rtems_task_wake_when() call.
+ */
+ SetTOD( &ctx->tod_obj, 1990 );
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Pre_TODObj_Invalid: {
+ /*
+ * While the object referenced by the ``time_buffer`` parameter specifies
+ * an invalid time of day.
+ */
+ memset( &ctx->tod_obj, 0xff, sizeof( ctx->tod_obj ) );
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Pre_TODObj_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqWakeWhen_Post_Status_Check(
+ RtemsTaskReqWakeWhen_Context *ctx,
+ RtemsTaskReqWakeWhen_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqWakeWhen_Post_Status_Ok: {
+ /*
+ * The return status of rtems_task_wake_when() shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Post_Status_NotDef: {
+ /*
+ * The return status of rtems_task_wake_when() shall be
+ * RTEMS_NOT_DEFINED.
+ */
+ T_rsc( ctx->status, RTEMS_NOT_DEFINED );
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_task_wake_when() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Post_Status_InvClock: {
+ /*
+ * The return status of rtems_task_wake_when() shall be
+ * RTEMS_INVALID_CLOCK.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_CLOCK );
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqWakeWhen_Post_Timer_Check(
+ RtemsTaskReqWakeWhen_Context *ctx,
+ RtemsTaskReqWakeWhen_Post_Timer state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqWakeWhen_Post_Timer_Inactive: {
+ /*
+ * The timer of the calling task shall be inactive.
+ */
+ T_eq_int( ctx->timer_info.state, TASK_TIMER_INACTIVE );
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Post_Timer_Realtime: {
+ /*
+ * The timer of the calling task shall be active using the
+ * CLOCK_REALTIME.
+ */
+ T_eq_int( ctx->timer_info.state, TASK_TIMER_REALTIME );
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Post_Timer_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqWakeWhen_Post_Expire_Check(
+ RtemsTaskReqWakeWhen_Context *ctx,
+ RtemsTaskReqWakeWhen_Post_Expire state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqWakeWhen_Post_Expire_Absolute: {
+ /*
+ * The timer of the calling task shall expire at the time point specified
+ * by the ``time_buffer`` parameter.
+ */
+ T_eq_i64( ctx->timer_info.expire_timespec.tv_sec, 1262304000 );
+ T_eq_long( ctx->timer_info.expire_timespec.tv_nsec, 0 );
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Post_Expire_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqWakeWhen_Post_Scheduler_Check(
+ RtemsTaskReqWakeWhen_Context *ctx,
+ RtemsTaskReqWakeWhen_Post_Scheduler state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqWakeWhen_Post_Scheduler_Block: {
+ /*
+ * The calling task shall be blocked by the scheduler exactly once by the
+ * rtems_task_wake_when() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 1 );
+ T_eq_int(
+ ctx->scheduler_log.events[ 0 ].operation,
+ T_SCHEDULER_BLOCK
+ );
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Post_Scheduler_Nop: {
+ /*
+ * The calling task shall not be altered by the scheduler by the
+ * rtems_task_wake_when() call.
+ */
+ T_eq_sz( ctx->scheduler_log.header.recorded, 0 );
+ break;
+ }
+
+ case RtemsTaskReqWakeWhen_Post_Scheduler_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqWakeWhen_Setup( RtemsTaskReqWakeWhen_Context *ctx )
+{
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->worker_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+static void RtemsTaskReqWakeWhen_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqWakeWhen_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqWakeWhen_Setup( ctx );
+}
+
+static void RtemsTaskReqWakeWhen_Teardown( RtemsTaskReqWakeWhen_Context *ctx )
+{
+ DeleteTask( ctx->worker_id );
+ RestoreRunnerPriority();
+}
+
+static void RtemsTaskReqWakeWhen_Teardown_Wrap( void *arg )
+{
+ RtemsTaskReqWakeWhen_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTaskReqWakeWhen_Teardown( ctx );
+}
+
+static void RtemsTaskReqWakeWhen_Prepare( RtemsTaskReqWakeWhen_Context *ctx )
+{
+ ctx->status = RTEMS_NOT_IMPLEMENTED;
+}
+
+static void RtemsTaskReqWakeWhen_Action( RtemsTaskReqWakeWhen_Context *ctx )
+{
+ ResumeTask( ctx->worker_id );
+ (void) T_scheduler_record( NULL );
+ GetTaskTimerInfo( ctx->worker_id, &ctx->timer_info );
+ FinalClockTick();
+}
+
+static const RtemsTaskReqWakeWhen_Entry
+RtemsTaskReqWakeWhen_Entries[] = {
+ { 0, 0, 0, 1, RtemsTaskReqWakeWhen_Post_Status_InvAddr,
+ RtemsTaskReqWakeWhen_Post_Timer_Inactive,
+ RtemsTaskReqWakeWhen_Post_Expire_NA,
+ RtemsTaskReqWakeWhen_Post_Scheduler_Nop },
+ { 0, 0, 0, 0, RtemsTaskReqWakeWhen_Post_Status_NotDef,
+ RtemsTaskReqWakeWhen_Post_Timer_Inactive,
+ RtemsTaskReqWakeWhen_Post_Expire_NA,
+ RtemsTaskReqWakeWhen_Post_Scheduler_Nop },
+ { 0, 0, 0, 1, RtemsTaskReqWakeWhen_Post_Status_NotDef,
+ RtemsTaskReqWakeWhen_Post_Timer_Inactive,
+ RtemsTaskReqWakeWhen_Post_Expire_NA,
+ RtemsTaskReqWakeWhen_Post_Scheduler_Nop },
+ { 0, 0, 0, 0, RtemsTaskReqWakeWhen_Post_Status_InvClock,
+ RtemsTaskReqWakeWhen_Post_Timer_Inactive,
+ RtemsTaskReqWakeWhen_Post_Expire_NA,
+ RtemsTaskReqWakeWhen_Post_Scheduler_Nop },
+ { 0, 0, 0, 0, RtemsTaskReqWakeWhen_Post_Status_Ok,
+ RtemsTaskReqWakeWhen_Post_Timer_Realtime,
+ RtemsTaskReqWakeWhen_Post_Expire_Absolute,
+ RtemsTaskReqWakeWhen_Post_Scheduler_Block }
+};
+
+static const uint8_t
+RtemsTaskReqWakeWhen_Map[] = {
+ 4, 3, 3, 0, 0, 0, 1, 1, 1, 2, 2, 2
+};
+
+static size_t RtemsTaskReqWakeWhen_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqWakeWhen_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTaskReqWakeWhen_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqWakeWhen_Fixture = {
+ .setup = RtemsTaskReqWakeWhen_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTaskReqWakeWhen_Teardown_Wrap,
+ .scope = RtemsTaskReqWakeWhen_Scope,
+ .initial_context = &RtemsTaskReqWakeWhen_Instance
+};
+
+static inline RtemsTaskReqWakeWhen_Entry RtemsTaskReqWakeWhen_PopEntry(
+ RtemsTaskReqWakeWhen_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTaskReqWakeWhen_Entries[
+ RtemsTaskReqWakeWhen_Map[ index ]
+ ];
+}
+
+static void RtemsTaskReqWakeWhen_SetPreConditionStates(
+ RtemsTaskReqWakeWhen_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+
+ if ( ctx->Map.entry.Pre_TODObj_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsTaskReqWakeWhen_Pre_TODObj_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+}
+
+static void RtemsTaskReqWakeWhen_TestVariant(
+ RtemsTaskReqWakeWhen_Context *ctx
+)
+{
+ RtemsTaskReqWakeWhen_Pre_TODSet_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTaskReqWakeWhen_Pre_TOD_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTaskReqWakeWhen_Pre_TODObj_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTaskReqWakeWhen_Action( ctx );
+ RtemsTaskReqWakeWhen_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTaskReqWakeWhen_Post_Timer_Check( ctx, ctx->Map.entry.Post_Timer );
+ RtemsTaskReqWakeWhen_Post_Expire_Check( ctx, ctx->Map.entry.Post_Expire );
+ RtemsTaskReqWakeWhen_Post_Scheduler_Check(
+ ctx,
+ ctx->Map.entry.Post_Scheduler
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqWakeWhen( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTaskReqWakeWhen, &RtemsTaskReqWakeWhen_Fixture )
+{
+ RtemsTaskReqWakeWhen_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsTaskReqWakeWhen_Pre_TODSet_Yes;
+ ctx->Map.pci[ 0 ] < RtemsTaskReqWakeWhen_Pre_TODSet_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsTaskReqWakeWhen_Pre_TOD_Valid;
+ ctx->Map.pci[ 1 ] < RtemsTaskReqWakeWhen_Pre_TOD_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsTaskReqWakeWhen_Pre_TODObj_Future;
+ ctx->Map.pci[ 2 ] < RtemsTaskReqWakeWhen_Pre_TODObj_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ ctx->Map.entry = RtemsTaskReqWakeWhen_PopEntry( ctx );
+ RtemsTaskReqWakeWhen_SetPreConditionStates( ctx );
+ RtemsTaskReqWakeWhen_Prepare( ctx );
+ RtemsTaskReqWakeWhen_TestVariant( ctx );
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task.c b/testsuites/validation/tc-task.c
new file mode 100644
index 0000000000..5ab96445ed
--- /dev/null
+++ b/testsuites/validation/tc-task.c
@@ -0,0 +1,355 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTaskValTask
+ */
+
+/*
+ * Copyright (C) 2021, 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+#include <rtems/score/apimutex.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTaskValTask spec:/rtems/task/val/task
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief This test case collection provides validation test cases for
+ * requirements of the @ref RTEMSAPIClassicTasks.
+ *
+ * This test case performs the following actions:
+ *
+ * - Call rtems_task_self() check the returned value.
+ *
+ * - Check that the returned value is equal to the object identifier of the
+ * calling task.
+ *
+ * - Call rtems_task_iterate() with a visitor which always returns false.
+ *
+ * - Check that the all counter is equal to the count of tasks. Check that
+ * the calling task was visited exacly once. Firstly, this shows that
+ * rtems_task_iterate() used the parameters specified by ``visitor`` and
+ * ``arg``. Secondly, this shows that the iteration was done over all
+ * tasks.
+ *
+ * - Check that the object alloctor mutex was not owned before and after the
+ * call. Check that the object alloctor mutex was owned during the
+ * iteration.
+ *
+ * - Call rtems_task_iterate() with a visitor which returns true.
+ *
+ * - Check that the all counter is equal to one. This shows that the
+ * iteration stops when the visitor returns true.
+ *
+ * - Assert that RTEMS_TASK_STORAGE_ALIGNMENT is a constant expression which
+ * evaluates to the expected value.
+ *
+ * - Assert that RTEMS_NO_PRIORITY is a constant expression which evaluates to
+ * the expected value.
+ *
+ * - Assert that RTEMS_MINIMUM_STACK_SIZE is a constant expression which
+ * evaluates to the expected value.
+ *
+ * - Assert that RTEMS_CONFIGURED_MINIMUM_STACK_SIZE is a constant expression
+ * which evaluates to the expected value.
+ *
+ * - Assert that RTEMS_MINIMUM_PRIORITY is a constant expression which
+ * evaluates to the expected value.
+ *
+ * - Validate RTEMS_SELF using a sample directive call.
+ *
+ * - Check that rtems_task_is_suspended() returns the expected status if
+ * called with a task identifier parameter of RTEMS_SELF.
+ *
+ * - Validate the home scheduler of tasks created by rtems_task_create() and
+ * constructed by rtems_task_construct().
+ *
+ * - Create a task. Check that the home scheduler of the created task is
+ * scheduler A.
+ *
+ * - Construct a task. Check that the home scheduler of the constructed task
+ * is scheduler A.
+ *
+ * @{
+ */
+
+typedef struct {
+ bool owner_before;
+ bool owner_in_visitor;
+ bool owner_after;
+ uint32_t counter_all;
+ uint32_t counter_self;
+ bool done;
+} TaskIterateContext;
+
+static bool TaskVisitor( rtems_tcb *tcb, void *arg )
+{
+ TaskIterateContext *ctx;
+
+ ctx = arg;
+ ++ctx->counter_all;
+
+ if ( rtems_task_self() == tcb->Object.id ) {
+ ++ctx->counter_self;
+ }
+
+ ctx->owner_in_visitor = _RTEMS_Allocator_is_owner();
+
+ return ctx->done;
+}
+
+/**
+ * @brief Call rtems_task_self() check the returned value.
+ */
+static void RtemsTaskValTask_Action_0( void )
+{
+ rtems_id id;
+
+ id = rtems_task_self();
+
+ /*
+ * Check that the returned value is equal to the object identifier of the
+ * calling task.
+ */
+ T_step_eq_u32( 0, id, 0x0a010001 );
+}
+
+/**
+ * @brief Call rtems_task_iterate() with a visitor which always returns false.
+ */
+static void RtemsTaskValTask_Action_1( void )
+{
+ TaskIterateContext ctx;
+ uint32_t task_count;
+
+ task_count = rtems_scheduler_get_processor_maximum();
+
+ if ( task_count > 4 ) {
+ task_count = 4;
+ }
+
+ ++task_count;
+
+ memset( &ctx, 0, sizeof( ctx ) );
+ ctx.owner_before = _RTEMS_Allocator_is_owner();
+ rtems_task_iterate( TaskVisitor, &ctx );
+ ctx.owner_after = _RTEMS_Allocator_is_owner();
+
+ /*
+ * Check that the all counter is equal to the count of tasks. Check that the
+ * calling task was visited exacly once. Firstly, this shows that
+ * rtems_task_iterate() used the parameters specified by ``visitor`` and
+ * ``arg``. Secondly, this shows that the iteration was done over all tasks.
+ */
+ T_step_eq_u32( 1, ctx.counter_all, task_count );
+ T_step_eq_u32( 2, ctx.counter_self, 1 );
+
+ /*
+ * Check that the object alloctor mutex was not owned before and after the
+ * call. Check that the object alloctor mutex was owned during the
+ * iteration.
+ */
+ T_step_false( 3, ctx.owner_before );
+ T_step_true( 4, ctx.owner_in_visitor );
+ T_step_false( 5, ctx.owner_after );
+}
+
+/**
+ * @brief Call rtems_task_iterate() with a visitor which returns true.
+ */
+static void RtemsTaskValTask_Action_2( void )
+{
+ TaskIterateContext ctx;
+
+ memset( &ctx, 0, sizeof( ctx ) );
+ ctx.done = true;
+ rtems_task_iterate( TaskVisitor, &ctx );
+
+ /*
+ * Check that the all counter is equal to one. This shows that the iteration
+ * stops when the visitor returns true.
+ */
+ T_step_eq_u32( 6, ctx.counter_all, 1 );
+}
+
+/**
+ * @brief Assert that RTEMS_TASK_STORAGE_ALIGNMENT is a constant expression
+ * which evaluates to the expected value.
+ */
+static void RtemsTaskValTask_Action_3( void )
+{
+ RTEMS_STATIC_ASSERT(
+ RTEMS_TASK_STORAGE_ALIGNMENT == CPU_STACK_ALIGNMENT,
+ STORAGE_ALIGNMENT
+ );
+}
+
+/**
+ * @brief Assert that RTEMS_NO_PRIORITY is a constant expression which
+ * evaluates to the expected value.
+ */
+static void RtemsTaskValTask_Action_4( void )
+{
+ RTEMS_STATIC_ASSERT(
+ RTEMS_NO_PRIORITY == RTEMS_CURRENT_PRIORITY,
+ NO_PRIORITY
+ );
+}
+
+/**
+ * @brief Assert that RTEMS_MINIMUM_STACK_SIZE is a constant expression which
+ * evaluates to the expected value.
+ */
+static void RtemsTaskValTask_Action_5( void )
+{
+ RTEMS_STATIC_ASSERT(
+ RTEMS_MINIMUM_STACK_SIZE == STACK_MINIMUM_SIZE,
+ MINIMUM_STACK_SIZE
+ );
+}
+
+/**
+ * @brief Assert that RTEMS_CONFIGURED_MINIMUM_STACK_SIZE is a constant
+ * expression which evaluates to the expected value.
+ */
+static void RtemsTaskValTask_Action_6( void )
+{
+ RTEMS_STATIC_ASSERT(
+ RTEMS_CONFIGURED_MINIMUM_STACK_SIZE == 0,
+ CONFIGURED_MINIMUM_STACK_SIZE
+ );
+}
+
+/**
+ * @brief Assert that RTEMS_MINIMUM_PRIORITY is a constant expression which
+ * evaluates to the expected value.
+ */
+static void RtemsTaskValTask_Action_7( void )
+{
+ RTEMS_STATIC_ASSERT( RTEMS_MINIMUM_PRIORITY == 1, MINIMUM_PRIORITY );
+}
+
+/**
+ * @brief Validate RTEMS_SELF using a sample directive call.
+ */
+static void RtemsTaskValTask_Action_8( void )
+{
+ rtems_status_code sc;
+
+ /*
+ * Check that rtems_task_is_suspended() returns the expected status if called
+ * with a task identifier parameter of RTEMS_SELF.
+ */
+ sc = rtems_task_is_suspended( RTEMS_SELF );
+ T_step_rsc_success( 7, sc );
+}
+
+/**
+ * @brief Validate the home scheduler of tasks created by rtems_task_create()
+ * and constructed by rtems_task_construct().
+ */
+static void RtemsTaskValTask_Action_9( void )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ /*
+ * Create a task. Check that the home scheduler of the created task is
+ * scheduler A.
+ */
+ sc = rtems_task_create(
+ OBJECT_NAME,
+ 1,
+ TEST_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &id
+ );
+ T_step_rsc_success( 8, sc );
+
+ T_step_eq_u32( 9, GetScheduler( id ), SCHEDULER_A_ID );
+ DeleteTask( id );
+
+ /*
+ * Construct a task. Check that the home scheduler of the constructed task
+ * is scheduler A.
+ */
+ sc = rtems_task_construct( &DefaultTaskConfig, &id );
+ T_step_rsc_success( 10, sc );
+
+ T_step_eq_u32( 11, GetScheduler( id ), SCHEDULER_A_ID );
+ DeleteTask( id );
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskValTask( void )
+ */
+T_TEST_CASE( RtemsTaskValTask )
+{
+ T_plan( 12 );
+
+ RtemsTaskValTask_Action_0();
+ RtemsTaskValTask_Action_1();
+ RtemsTaskValTask_Action_2();
+ RtemsTaskValTask_Action_3();
+ RtemsTaskValTask_Action_4();
+ RtemsTaskValTask_Action_5();
+ RtemsTaskValTask_Action_6();
+ RtemsTaskValTask_Action_7();
+ RtemsTaskValTask_Action_8();
+ RtemsTaskValTask_Action_9();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-terminate.c b/testsuites/validation/tc-terminate.c
new file mode 100644
index 0000000000..b533092c19
--- /dev/null
+++ b/testsuites/validation/tc-terminate.c
@@ -0,0 +1,446 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreInterrValTerminate
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp.h>
+#include <setjmp.h>
+#include <string.h>
+#include <rtems/bspIo.h>
+#include <rtems/test-info.h>
+#include <rtems/score/atomic.h>
+#include <rtems/score/percpu.h>
+#include <rtems/score/sysstate.h>
+
+#include "tc-userext.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreInterrValTerminate spec:/score/interr/val/terminate
+ *
+ * @ingroup TestsuitesTerminate
+ *
+ * @brief Tests system termination procedure.
+ *
+ * This test case performs the following actions:
+ *
+ * - Create five dynamic extensions. Call the system termination procedure.
+ * Delete three dynamic extension during the fatal extension invocation.
+ * Delete the two remaining dynamic extensions.
+ *
+ * - Where the system was built with SMP support enabled, check that a
+ * shutdown request was issued.
+ *
+ * - Delete the dynamic extension sets.
+ *
+ * - Check that the fatal extensions were invoked with the expected source.
+ *
+ * - Check that the fatal extensions were invoked with the expected always
+ * set to false argument.
+ *
+ * - Check that the fatal extensions were invoked with the expected code.
+ *
+ * - Check that the fatal extensions were invoked in forward order.
+ *
+ * - Check that the fatal extension in the deleted extension set was not
+ * invoked.
+ *
+ * - Check that the system state is terminated.
+ *
+ * - Check that the system was halted with the expected fatal source.
+ *
+ * - Check that the system was halted with the expected fatal code.
+ *
+ * - Check that the system was finally halted.
+ *
+ * @{
+ */
+
+typedef struct {
+ unsigned int counter;
+ rtems_fatal_source source;
+ bool always_set_to_false;
+ rtems_fatal_code code;
+} FatalInfo;
+
+static Atomic_Uint counter;
+
+static FatalInfo info[ 7 ];
+
+static bool test_case_active;
+
+static const rtems_extensions_table bsp = BSP_INITIAL_EXTENSION;
+
+static jmp_buf before_terminate;
+
+static unsigned int halt_counter;
+
+static rtems_fatal_source halt_source;
+
+static rtems_fatal_code halt_code;
+
+static rtems_id extension_ids[ 7 ];
+
+static unsigned int GetCounter( void )
+{
+ return _Atomic_Fetch_add_uint( &counter, 1, ATOMIC_ORDER_RELAXED ) + 1;
+}
+
+void __real__CPU_Fatal_halt( uint32_t source, CPU_Uint32ptr code );
+
+void __wrap__CPU_Fatal_halt( uint32_t source, CPU_Uint32ptr code );
+
+void __wrap__CPU_Fatal_halt( uint32_t source, CPU_Uint32ptr code )
+{
+ if ( test_case_active ) {
+ halt_counter = GetCounter();
+ halt_source = source;
+ halt_code = code;
+ longjmp( before_terminate, 1 );
+ } else {
+#if defined(RTEMS_GCOV_COVERAGE)
+ rtems_test_gcov_dump_info();
+#endif
+ __real__CPU_Fatal_halt( source, code );
+ }
+}
+
+static void FatalExtension(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code,
+ size_t index
+)
+{
+ if ( test_case_active ) {
+ info[ index ].counter = GetCounter();
+ info[ index ].source = source;
+ info[ index ].always_set_to_false = always_set_to_false;
+ info[ index ].code = code;
+ } else {
+ ( *bsp.fatal )( source, always_set_to_false, code );
+ }
+}
+
+void FatalExtension0(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+)
+{
+ FatalExtension( source, always_set_to_false, code, 0 );
+}
+
+void FatalExtension1(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+)
+{
+ FatalExtension( source, always_set_to_false, code, 1 );
+}
+
+static void FatalExtension2(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+)
+{
+ rtems_status_code sc;
+
+ FatalExtension( source, always_set_to_false, code, 2 );
+
+ sc = rtems_extension_delete( extension_ids[ 3 ] );
+ T_quiet_rsc_success( sc );
+}
+
+static void FatalExtension3(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+)
+{
+ FatalExtension( source, always_set_to_false, code, 3 );
+}
+
+static void FatalExtension4(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+)
+{
+ FatalExtension( source, always_set_to_false, code, 4 );
+}
+
+static void FatalExtension5(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+)
+{
+ rtems_status_code sc;
+
+ FatalExtension( source, always_set_to_false, code, 5 );
+
+ sc = rtems_extension_delete( extension_ids[ 5 ] );
+ T_quiet_rsc_success( sc );
+}
+
+static void FatalExtension6(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+)
+{
+ rtems_status_code sc;
+
+ FatalExtension( source, always_set_to_false, code, 6 );
+
+ sc = rtems_extension_delete( extension_ids[ 4 ] );
+ T_quiet_rsc_success( sc );
+}
+
+/**
+ * @brief Create five dynamic extensions. Call the system termination
+ * procedure. Delete three dynamic extension during the fatal extension
+ * invocation. Delete the two remaining dynamic extensions.
+ */
+static void ScoreInterrValTerminate_Action_0( void )
+{
+ rtems_status_code sc;
+ rtems_extensions_table table;
+ bool shutdown_ok;
+
+ #if defined(RTEMS_SMP)
+ shutdown_ok =
+ ( _Per_CPU_Get_state( _Per_CPU_Get_snapshot() ) == PER_CPU_STATE_UP );
+ #else
+ shutdown_ok = true;
+ #endif
+
+ memset( &table, 0, sizeof( table ) );
+
+ table.fatal = FatalExtension2;
+ sc = rtems_extension_create(
+ rtems_build_name( ' ', ' ', ' ', '2' ),
+ &table,
+ &extension_ids[ 2 ]
+ );
+ T_step_rsc_success( 0, sc );
+
+ table.fatal = FatalExtension3;
+ sc = rtems_extension_create(
+ rtems_build_name( ' ', ' ', ' ', '3' ),
+ &table,
+ &extension_ids[ 3 ]
+ );
+ T_step_rsc_success( 1, sc );
+
+ table.fatal = FatalExtension4;
+ sc = rtems_extension_create(
+ rtems_build_name( ' ', ' ', ' ', '4' ),
+ &table,
+ &extension_ids[ 4 ]
+ );
+ T_step_rsc_success( 2, sc );
+
+ table.fatal = FatalExtension5;
+ sc = rtems_extension_create(
+ rtems_build_name( ' ', ' ', ' ', '5' ),
+ &table,
+ &extension_ids[ 5 ]
+ );
+ T_step_rsc_success( 3, sc );
+
+ table.fatal = FatalExtension6;
+ sc = rtems_extension_create(
+ rtems_build_name( ' ', ' ', ' ', '6' ),
+ &table,
+ &extension_ids[ 6 ]
+ );
+ T_step_rsc_success( 4, sc );
+
+ test_case_active = true;
+
+ if ( setjmp( before_terminate ) == 0 ) {
+ _Terminate( RTEMS_FATAL_SOURCE_APPLICATION, 123456 );
+ }
+
+ test_case_active = false;
+
+ /*
+ * Where the system was built with SMP support enabled, check that a shutdown
+ * request was issued.
+ */
+ #if defined(RTEMS_SMP)
+ shutdown_ok = ( shutdown_ok && _ISR_Get_level() != 0 &&
+ _Per_CPU_Get_state( _Per_CPU_Get() ) == PER_CPU_STATE_SHUTDOWN );
+ _ISR_Set_level( 0 );
+ #endif
+ T_step_true( 5, shutdown_ok );
+
+ /*
+ * Delete the dynamic extension sets.
+ */
+ sc = rtems_extension_delete( extension_ids[ 2 ] );
+ T_step_rsc_success( 6, sc );
+
+ sc = rtems_extension_delete( extension_ids[ 6 ] );
+ T_step_rsc_success( 7, sc );
+
+ /*
+ * Check that the fatal extensions were invoked with the expected source.
+ */
+ T_step_eq_int(
+ 8,
+ info[ 0 ].source,
+ RTEMS_FATAL_SOURCE_APPLICATION
+ );
+ T_step_eq_int(
+ 9,
+ info[ 1 ].source,
+ RTEMS_FATAL_SOURCE_APPLICATION
+ );
+ T_step_eq_int(
+ 10,
+ info[ 2 ].source,
+ RTEMS_FATAL_SOURCE_APPLICATION
+ );
+ T_step_eq_int(
+ 11,
+ info[ 4 ].source,
+ RTEMS_FATAL_SOURCE_APPLICATION
+ );
+ T_step_eq_int(
+ 12,
+ info[ 5 ].source,
+ RTEMS_FATAL_SOURCE_APPLICATION
+ );
+ T_step_eq_int(
+ 13,
+ info[ 6 ].source,
+ RTEMS_FATAL_SOURCE_APPLICATION
+ );
+
+ /*
+ * Check that the fatal extensions were invoked with the expected always set
+ * to false argument.
+ */
+ T_step_false( 14, info[ 0 ].always_set_to_false );
+ T_step_false( 15, info[ 1 ].always_set_to_false );
+ T_step_false( 16, info[ 2 ].always_set_to_false );
+ T_step_false( 17, info[ 4 ].always_set_to_false );
+ T_step_false( 18, info[ 5 ].always_set_to_false );
+ T_step_false( 19, info[ 6 ].always_set_to_false );
+
+ /*
+ * Check that the fatal extensions were invoked with the expected code.
+ */
+ T_step_eq_ulong( 20, info[ 0 ].code, 123456 );
+ T_step_eq_ulong( 21, info[ 1 ].code, 123456 );
+ T_step_eq_ulong( 22, info[ 2 ].code, 123456 );
+ T_step_eq_ulong( 23, info[ 4 ].code, 123456 );
+ T_step_eq_ulong( 24, info[ 5 ].code, 123456 );
+ T_step_eq_ulong( 25, info[ 6 ].code, 123456 );
+
+ /*
+ * Check that the fatal extensions were invoked in forward order.
+ */
+ T_step_eq_uint( 26, info[ 0 ].counter, 1 );
+ T_step_eq_uint( 27, info[ 1 ].counter, 2 );
+ T_step_eq_uint( 28, info[ 2 ].counter, 3 );
+ T_step_eq_uint( 29, info[ 4 ].counter, 4 );
+ T_step_eq_uint( 30, info[ 5 ].counter, 5 );
+ T_step_eq_uint( 31, info[ 6 ].counter, 6 );
+
+ /*
+ * Check that the fatal extension in the deleted extension set was not
+ * invoked.
+ */
+ T_step_eq_int( 32, info[ 3 ].source, 0 );
+ T_step_false( 33, info[ 3 ].always_set_to_false );
+ T_step_eq_ulong( 34, info[ 3 ].code, 0 );
+ T_step_eq_uint( 35, info[ 3 ].counter, 0 );
+
+ /*
+ * Check that the system state is terminated.
+ */
+ T_step_eq_int( 36, _System_state_Get(), SYSTEM_STATE_TERMINATED );
+
+ /*
+ * Check that the system was halted with the expected fatal source.
+ */
+ T_step_eq_int( 37, halt_source, RTEMS_FATAL_SOURCE_APPLICATION );
+
+ /*
+ * Check that the system was halted with the expected fatal code.
+ */
+ T_step_eq_ulong( 38, halt_code, 123456 );
+
+ /*
+ * Check that the system was finally halted.
+ */
+ T_step_eq_uint( 39, counter, 7 );
+}
+
+/**
+ * @fn void T_case_body_ScoreInterrValTerminate( void )
+ */
+T_TEST_CASE( ScoreInterrValTerminate )
+{
+ T_plan( 40 );
+
+ ScoreInterrValTerminate_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-thread-idle-body-no-return.c b/testsuites/validation/tc-thread-idle-body-no-return.c
new file mode 100644
index 0000000000..19c86dad99
--- /dev/null
+++ b/testsuites/validation/tc-thread-idle-body-no-return.c
@@ -0,0 +1,205 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreThreadValIdleBodyNoReturn
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreThreadValIdleBodyNoReturn \
+ * spec:/score/thread/val/idle-body-no-return
+ *
+ * @ingroup TestsuitesValidation0
+ *
+ * @brief Tests thread idle body behaviour.
+ *
+ * This test case performs the following actions:
+ *
+ * - Create threads which execute an thread idle body. Check that the thread
+ * idle body does not return. If it would return, then an
+ * INTERNAL_ERROR_THREAD_EXITTED fatal error would occur.
+ *
+ * - Check that the CPU port thread idle body does not return.
+ *
+ * - Where the BSP provides an idle thread body, check that it does not
+ * return.
+ *
+ * - Clean up all used resources.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/score/thread/val/idle-body-no-return test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a counter.
+ */
+ uint32_t counter;
+} ScoreThreadValIdleBodyNoReturn_Context;
+
+static ScoreThreadValIdleBodyNoReturn_Context
+ ScoreThreadValIdleBodyNoReturn_Instance;
+
+typedef ScoreThreadValIdleBodyNoReturn_Context Context;
+
+static void CheckIdleBody( Context *ctx, rtems_task_entry entry )
+{
+ rtems_id id;
+ rtems_interval interval;
+ rtems_status_code sc;
+
+ ctx->counter = 0;
+ id = CreateTask( "WORK", PRIO_LOW );
+ StartTask( id, entry, ctx );
+
+ /*
+ * With optimization disabled, coverage enabled, SMP enabled and a slow
+ * target, things may take some time.
+ */
+ interval = 1;
+ while ( ctx->counter == 0 && interval <= 1024 ) {
+
+ sc = rtems_task_wake_after( interval );
+ T_rsc_success( sc );
+
+ interval *= 2;
+ }
+
+ sc = rtems_task_wake_after( interval );
+ T_rsc_success( sc );
+
+ T_eq_u32( ctx->counter, 1 );
+ DeleteTask( id );
+}
+
+static void CPUThreadIdleBody( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+ ++ctx->counter;
+
+ (void) _CPU_Thread_Idle_body( 0 );
+}
+
+#if defined(BSP_IDLE_TASK_BODY)
+static void BSPIdleTaskBody( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+ ++ctx->counter;
+
+ (void) BSP_IDLE_TASK_BODY( 0 );
+}
+#endif
+
+static T_fixture ScoreThreadValIdleBodyNoReturn_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &ScoreThreadValIdleBodyNoReturn_Instance
+};
+
+/**
+ * @brief Create threads which execute an thread idle body. Check that the
+ * thread idle body does not return. If it would return, then an
+ * INTERNAL_ERROR_THREAD_EXITTED fatal error would occur.
+ */
+static void ScoreThreadValIdleBodyNoReturn_Action_0(
+ ScoreThreadValIdleBodyNoReturn_Context *ctx
+)
+{
+ SetSelfPriority( PRIO_NORMAL );
+
+ /*
+ * Check that the CPU port thread idle body does not return.
+ */
+ CheckIdleBody( ctx, CPUThreadIdleBody );
+
+ /*
+ * Where the BSP provides an idle thread body, check that it does not return.
+ */
+ #if defined(BSP_IDLE_TASK_BODY)
+ CheckIdleBody( ctx, BSPIdleTaskBody );
+ #endif
+
+ /*
+ * Clean up all used resources.
+ */
+ RestoreRunnerPriority();
+}
+
+/**
+ * @fn void T_case_body_ScoreThreadValIdleBodyNoReturn( void )
+ */
+T_TEST_CASE_FIXTURE(
+ ScoreThreadValIdleBodyNoReturn,
+ &ScoreThreadValIdleBodyNoReturn_Fixture
+)
+{
+ ScoreThreadValIdleBodyNoReturn_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ ScoreThreadValIdleBodyNoReturn_Action_0( ctx );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timecounter-get-smp.c b/testsuites/validation/tc-timecounter-get-smp.c
new file mode 100644
index 0000000000..d8c9f598dd
--- /dev/null
+++ b/testsuites/validation/tc-timecounter-get-smp.c
@@ -0,0 +1,740 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTimecounterValGetSmp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/counter.h>
+#include <rtems/timecounter.h>
+#include <rtems/score/smpbarrier.h>
+#include <rtems/score/threaddispatch.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTimecounterValGetSmp spec:/score/timecounter/val/get-smp
+ *
+ * @ingroup TestsuitesValidationTimecounterSmp0
+ *
+ * @brief Tests directives to get a time value.
+ *
+ * This test case performs the following actions:
+ *
+ * - Install timecounter of different quality levels and frequencies.
+ *
+ * - Call the rtems_clock_get_realtime() directive and let it observe a
+ * generation number of zero as well as a generation number change.
+ *
+ * - Call the rtems_clock_get_realtime_bintime() directive and let it observe
+ * a generation number of zero as well as a generation number change.
+ *
+ * - Call the rtems_clock_get_realtime_timeval() directive and let it observe
+ * a generation number of zero as well as a generation number change.
+ *
+ * - Call the rtems_clock_get_monotonic() directive and let it observe a
+ * generation number of zero as well as a generation number change.
+ *
+ * - Call the rtems_clock_get_monotonic_bintime() directive and let it
+ * observe a generation number of zero as well as a generation number
+ * change.
+ *
+ * - Call the rtems_clock_get_monotonic_sbintime() directive and let it
+ * observe a generation number of zero as well as a generation number
+ * change.
+ *
+ * - Call the rtems_clock_get_monotonic_timeval() directive and let it
+ * observe a generation number of zero as well as a generation number
+ * change.
+ *
+ * - Delete the synchronous worker task. Reinitialize the barrier and
+ * barrier states. Start the zero worker task.
+ *
+ * - Call the rtems_clock_get_realtime_coarse() directive and try to let it
+ * observe a generation number of zero.
+ *
+ * - Call the rtems_clock_get_realtime_coarse_bintime() directive and try to
+ * let it observe a generation number of zero.
+ *
+ * - Call the rtems_clock_get_realtime_coarse_timeval() directive and try to
+ * let it observe a generation number of zero.
+ *
+ * - Call the rtems_clock_get_monotonic_coarse() directive and try to let it
+ * observe a generation number of zero.
+ *
+ * - Call the rtems_clock_get_monotonic_coarse_bintime() directive and try to
+ * let it observe a generation number of zero.
+ *
+ * - Call the rtems_clock_get_monotonic_coarse_timeval() directive and try to
+ * let it observe a generation number of zero.
+ *
+ * - Call the rtems_clock_get_boot_time() directive and try to let it observe
+ * a generation number of zero.
+ *
+ * - Call the rtems_clock_get_boot_time_bintime() directive and try to let it
+ * observe a generation number of zero.
+ *
+ * - Call the rtems_clock_get_boot_time_timeval() directive and try to let it
+ * observe a generation number of zero.
+ *
+ * - Delete the zero worker task. Reinitialize the barrier and barrier
+ * states. Start the change worker task.
+ *
+ * - Call the rtems_clock_get_realtime_coarse() directive and try to let it
+ * observe a changing generation number.
+ *
+ * - Call the rtems_clock_get_realtime_coarse_bintime() directive and try to
+ * let it observe a changing generation number.
+ *
+ * - Call the rtems_clock_get_realtime_coarse_timeval() directive and try to
+ * let it observe a changing generation number.
+ *
+ * - Call the rtems_clock_get_monotonic_coarse() directive and try to let it
+ * observe a changing generation number.
+ *
+ * - Call the rtems_clock_get_monotonic_coarse_bintime() directive and try to
+ * let it observe a changing generation number.
+ *
+ * - Call the rtems_clock_get_monotonic_coarse_timeval() directive and try to
+ * let it observe a changing generation number.
+ *
+ * - Call the rtems_clock_get_boot_time() directive and try to let it observe
+ * a changing generation number.
+ *
+ * - Call the rtems_clock_get_boot_time_bintime() directive and try to let it
+ * observe a changing generation number.
+ *
+ * - Call the rtems_clock_get_boot_time_timeval() directive and try to let it
+ * observe a changing generation number.
+ *
+ * - Delete the change worker task.
+ *
+ * @{
+ */
+
+typedef struct {
+ struct timecounter base;
+ Atomic_Ulong counter;
+ Atomic_Uint *generation_0;
+ Atomic_Uint *generation_1;
+ SMP_barrier_Control barrier;
+ SMP_barrier_State barrier_state[ 2 ];
+} Timecounter;
+
+static Timecounter test_timecounter;
+
+static uint32_t GetTimecount( struct timecounter *base )
+{
+ Timecounter *tc;
+
+ tc = (Timecounter *) base;
+
+ return (uint32_t) _Atomic_Fetch_add_ulong(
+ &tc->counter,
+ 1,
+ ATOMIC_ORDER_RELAXED
+ );
+}
+
+static uint32_t GetTimecountBarrier( struct timecounter *base )
+{
+ Timecounter *tc;
+
+ tc = (Timecounter *) base;
+
+ /* C0, C1, C2 */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 0 ], 2 );
+
+ /* D0, D1, D2 */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 0 ], 2 );
+
+ return GetTimecount( &tc->base );
+}
+
+static uint32_t GetCounter( const Timecounter *tc )
+{
+ return (uint32_t) _Atomic_Load_ulong(
+ &tc->counter,
+ ATOMIC_ORDER_RELAXED
+ );
+}
+
+static void SetCounter( Timecounter *tc, uint32_t counter )
+{
+ _Atomic_Store_ulong(
+ &tc->counter,
+ counter,
+ ATOMIC_ORDER_RELAXED
+ );
+}
+
+static void CallTimecounterTick( void )
+{
+ Per_CPU_Control *cpu_self;
+
+ cpu_self = _Thread_Dispatch_disable();
+ rtems_timecounter_tick();
+ _Thread_Dispatch_enable( cpu_self );
+}
+
+static void SetGeneration( Timecounter *tc, unsigned int generation )
+{
+ _Atomic_Store_uint( tc->generation_0, generation, ATOMIC_ORDER_RELAXED );
+ _Atomic_Store_uint( tc->generation_1, generation, ATOMIC_ORDER_RELAXED );
+}
+
+static void PrepareSynchronousWork( Timecounter *tc )
+{
+ /* A */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 0 ], 2 );
+
+ SetCounter( tc, 0 );
+
+ /* B */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 0 ], 2 );
+}
+
+static void CleanupSynchronousWork( Timecounter *tc )
+{
+ /* E */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 0 ], 2 );
+
+ T_eq_u32( GetCounter( tc ), 3 );
+}
+
+static void SynchronousWorker( rtems_task_argument arg )
+{
+ Timecounter *tc;
+
+ tc = (Timecounter *) arg;
+
+ while ( true ) {
+ /* A */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+
+ SetGeneration( tc, 0 );
+
+ /* B */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+
+ /* C0 */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+
+ SetGeneration( tc, 1 );
+
+ /* D0 */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+
+ /* C1 */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+
+ SetGeneration( tc, 2 );
+
+ /* D1 */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+
+ /* C2 */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+
+ /* D2 */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+
+ /* E */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+ }
+}
+
+static void PrepareZeroWork( Timecounter *tc )
+{
+ /* F */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 0 ], 2 );
+
+ SetCounter( tc, 0 );
+
+ /* G */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 0 ], 2 );
+}
+
+static void CleanupZeroWork( Timecounter *tc )
+{
+ /* H */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 0 ], 2 );
+
+ T_eq_u32( GetCounter( tc ), 0 );
+}
+
+static void ZeroWorker( rtems_task_argument arg )
+{
+ Timecounter *tc;
+
+ tc = (Timecounter *) arg;
+
+ while ( true ) {
+ /* F */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+
+ SetGeneration( tc, 0 );
+
+ /* G */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+
+ rtems_counter_delay_nanoseconds( 10000000 );
+ SetGeneration( tc, 1 );
+
+ /* H */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+ }
+}
+
+static void PrepareChangeWork( Timecounter *tc )
+{
+ /* F */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 0 ], 2 );
+
+ SetCounter( tc, 0 );
+
+ /* G */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 0 ], 2 );
+}
+
+static void CleanupChangeWork( Timecounter *tc )
+{
+ /* H */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 0 ], 2 );
+
+ T_eq_u32( GetCounter( tc ), 0 );
+}
+
+static void ChangeWorker( rtems_task_argument arg )
+{
+ Timecounter *tc;
+
+ tc = (Timecounter *) arg;
+
+ while ( true ) {
+ unsigned int i;
+
+ /* F */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+
+ /* G */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+
+ for ( i = 1; i < 1000; ++i ) {
+ SetGeneration( tc, i );
+ }
+
+ /* H */
+ _SMP_barrier_Wait( &tc->barrier, &tc->barrier_state[ 1 ], 2 );
+ }
+}
+
+/* This definition must be identical to the one in kern_tc.c */
+struct timehands {
+ struct timecounter *th_counter;
+ int64_t th_adjustment;
+ uint64_t th_scale;
+ uint32_t th_large_delta;
+ uint32_t th_offset_count;
+ struct bintime th_offset;
+ struct bintime th_bintime;
+ struct timeval th_microtime;
+ struct timespec th_nanotime;
+ struct bintime th_boottime;
+ Atomic_Uint th_generation;
+ struct timehands *th_next;
+};
+
+static void NtpUpdateSecond( int64_t *adjustment, time_t *newsec )
+{
+ Timecounter *tc;
+ struct timehands *th;
+
+ tc = &test_timecounter;
+ th = RTEMS_CONTAINER_OF( adjustment, struct timehands, th_adjustment );
+ T_assert_eq_ptr( th, th->th_next->th_next );
+ tc->generation_0 = &th->th_generation;
+ tc->generation_1 = &th->th_next->th_generation;
+}
+
+/**
+ * @brief Install timecounter of different quality levels and frequencies.
+ */
+static void ScoreTimecounterValGetSmp_Action_0( void )
+{
+ Timecounter *tc;
+ rtems_id worker_id;
+ struct bintime bt;
+ sbintime_t sbt;
+ struct timespec ts;
+ struct timeval tv;
+ unsigned int i;
+
+ tc = &test_timecounter;
+ tc->base.tc_get_timecount = GetTimecount;
+ tc->base.tc_counter_mask = 0xffffffff;
+ tc->base.tc_frequency = 0x10000000;
+ tc->base.tc_quality = RTEMS_TIMECOUNTER_QUALITY_CLOCK_DRIVER;
+ rtems_timecounter_install( &tc->base );
+
+ SetCounter( tc, tc->base.tc_frequency );
+ _Timecounter_Set_NTP_update_second( NtpUpdateSecond );
+ CallTimecounterTick();
+ _Timecounter_Set_NTP_update_second( NULL );
+
+ T_assert_not_null( tc->generation_0 );
+ T_assert_not_null( tc->generation_1 );
+
+ _SMP_barrier_Control_initialize( &tc->barrier );
+ _SMP_barrier_State_initialize( &tc->barrier_state[ 0 ] );
+ _SMP_barrier_State_initialize( &tc->barrier_state[ 1 ] );
+
+ worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ SetScheduler( worker_id, SCHEDULER_B_ID, PRIO_NORMAL );
+ StartTask( worker_id, SynchronousWorker, tc );
+
+ tc->base.tc_get_timecount = GetTimecountBarrier;
+
+ /*
+ * Call the rtems_clock_get_realtime() directive and let it observe a
+ * generation number of zero as well as a generation number change.
+ */
+ PrepareSynchronousWork( tc );
+ rtems_clock_get_realtime( &ts );
+ T_eq_i64( ts.tv_sec, 567993616 );
+ T_eq_long( ts.tv_nsec, 7 );
+ CleanupSynchronousWork( tc );
+
+ /*
+ * Call the rtems_clock_get_realtime_bintime() directive and let it observe a
+ * generation number of zero as well as a generation number change.
+ */
+ PrepareSynchronousWork( tc );
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567993616 );
+ T_eq_u64( bt.frac, 137438953472 );
+ CleanupSynchronousWork( tc );
+
+ /*
+ * Call the rtems_clock_get_realtime_timeval() directive and let it observe a
+ * generation number of zero as well as a generation number change.
+ */
+ PrepareSynchronousWork( tc );
+ rtems_clock_get_realtime_timeval( &tv );
+ T_eq_i64( tv.tv_sec, 567993616 );
+ T_eq_long( tv.tv_usec, 0 );
+ CleanupSynchronousWork( tc );
+
+ /*
+ * Call the rtems_clock_get_monotonic() directive and let it observe a
+ * generation number of zero as well as a generation number change.
+ */
+ PrepareSynchronousWork( tc );
+ rtems_clock_get_monotonic( &ts );
+ T_eq_i64( ts.tv_sec, 17 );
+ T_eq_long( ts.tv_nsec, 7 );
+ CleanupSynchronousWork( tc );
+
+ /*
+ * Call the rtems_clock_get_monotonic_bintime() directive and let it observe
+ * a generation number of zero as well as a generation number change.
+ */
+ PrepareSynchronousWork( tc );
+ rtems_clock_get_monotonic_bintime( &bt );
+ T_eq_i64( bt.sec, 17 );
+ T_eq_u64( bt.frac, 137438953472 );
+ CleanupSynchronousWork( tc );
+
+ /*
+ * Call the rtems_clock_get_monotonic_sbintime() directive and let it observe
+ * a generation number of zero as well as a generation number change.
+ */
+ PrepareSynchronousWork( tc );
+ sbt = rtems_clock_get_monotonic_sbintime();
+ T_eq_i64( sbt, 73014444064 );
+ CleanupSynchronousWork( tc );
+
+ /*
+ * Call the rtems_clock_get_monotonic_timeval() directive and let it observe
+ * a generation number of zero as well as a generation number change.
+ */
+ PrepareSynchronousWork( tc );
+ rtems_clock_get_monotonic_timeval( &tv );
+ T_eq_i64( tv.tv_sec, 17 );
+ T_eq_long( tv.tv_usec, 0 );
+ CleanupSynchronousWork( tc );
+
+ /*
+ * Delete the synchronous worker task. Reinitialize the barrier and barrier
+ * states. Start the zero worker task.
+ */
+ tc->base.tc_get_timecount = GetTimecount;
+ DeleteTask( worker_id );
+
+ _SMP_barrier_Control_initialize( &tc->barrier );
+ _SMP_barrier_State_initialize( &tc->barrier_state[ 0 ] );
+ _SMP_barrier_State_initialize( &tc->barrier_state[ 1 ] );
+
+ worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ SetScheduler( worker_id, SCHEDULER_B_ID, PRIO_NORMAL );
+ StartTask( worker_id, ZeroWorker, tc );
+
+ /*
+ * Call the rtems_clock_get_realtime_coarse() directive and try to let it
+ * observe a generation number of zero.
+ */
+ PrepareZeroWork( tc );
+ rtems_clock_get_realtime_coarse( &ts );
+ CleanupZeroWork( tc );
+
+ /*
+ * Call the rtems_clock_get_realtime_coarse_bintime() directive and try to
+ * let it observe a generation number of zero.
+ */
+ PrepareZeroWork( tc );
+ rtems_clock_get_realtime_coarse_bintime( &bt );
+ CleanupZeroWork( tc );
+
+ /*
+ * Call the rtems_clock_get_realtime_coarse_timeval() directive and try to
+ * let it observe a generation number of zero.
+ */
+ PrepareZeroWork( tc );
+ rtems_clock_get_realtime_coarse_timeval( &tv );
+ CleanupZeroWork( tc );
+
+ /*
+ * Call the rtems_clock_get_monotonic_coarse() directive and try to let it
+ * observe a generation number of zero.
+ */
+ PrepareZeroWork( tc );
+ rtems_clock_get_monotonic_coarse( &ts );
+ CleanupZeroWork( tc );
+
+ /*
+ * Call the rtems_clock_get_monotonic_coarse_bintime() directive and try to
+ * let it observe a generation number of zero.
+ */
+ PrepareZeroWork( tc );
+ rtems_clock_get_monotonic_coarse_bintime( &bt );
+ CleanupZeroWork( tc );
+
+ /*
+ * Call the rtems_clock_get_monotonic_coarse_timeval() directive and try to
+ * let it observe a generation number of zero.
+ */
+ PrepareZeroWork( tc );
+ rtems_clock_get_monotonic_coarse_timeval( &tv );
+ CleanupZeroWork( tc );
+
+ /*
+ * Call the rtems_clock_get_boot_time() directive and try to let it observe a
+ * generation number of zero.
+ */
+ PrepareZeroWork( tc );
+ rtems_clock_get_boot_time( &ts );
+ CleanupZeroWork( tc );
+
+ /*
+ * Call the rtems_clock_get_boot_time_bintime() directive and try to let it
+ * observe a generation number of zero.
+ */
+ PrepareZeroWork( tc );
+ rtems_clock_get_boot_time_bintime( &bt );
+ CleanupZeroWork( tc );
+
+ /*
+ * Call the rtems_clock_get_boot_time_timeval() directive and try to let it
+ * observe a generation number of zero.
+ */
+ PrepareZeroWork( tc );
+ rtems_clock_get_boot_time_timeval( &tv );
+ CleanupZeroWork( tc );
+
+ /*
+ * Delete the zero worker task. Reinitialize the barrier and barrier states.
+ * Start the change worker task.
+ */
+ DeleteTask( worker_id );
+
+ _SMP_barrier_Control_initialize( &tc->barrier );
+ _SMP_barrier_State_initialize( &tc->barrier_state[ 0 ] );
+ _SMP_barrier_State_initialize( &tc->barrier_state[ 1 ] );
+
+ worker_id = CreateTask( "WORK", PRIO_NORMAL );
+ SetScheduler( worker_id, SCHEDULER_B_ID, PRIO_NORMAL );
+ StartTask( worker_id, ChangeWorker, tc );
+
+ /*
+ * Call the rtems_clock_get_realtime_coarse() directive and try to let it
+ * observe a changing generation number.
+ */
+ PrepareChangeWork( tc );
+
+ for ( i = 0; i < 100; ++i ) {
+ rtems_clock_get_realtime_coarse( &ts );
+ }
+
+ CleanupChangeWork( tc );
+
+ /*
+ * Call the rtems_clock_get_realtime_coarse_bintime() directive and try to
+ * let it observe a changing generation number.
+ */
+ PrepareChangeWork( tc );
+
+ for ( i = 0; i < 100; ++i ) {
+ rtems_clock_get_realtime_coarse_bintime( &bt );
+ }
+
+ CleanupChangeWork( tc );
+
+ /*
+ * Call the rtems_clock_get_realtime_coarse_timeval() directive and try to
+ * let it observe a changing generation number.
+ */
+ PrepareChangeWork( tc );
+
+ for ( i = 0; i < 100; ++i ) {
+ rtems_clock_get_realtime_coarse_timeval( &tv );
+ }
+
+ CleanupChangeWork( tc );
+
+ /*
+ * Call the rtems_clock_get_monotonic_coarse() directive and try to let it
+ * observe a changing generation number.
+ */
+ PrepareChangeWork( tc );
+
+ for ( i = 0; i < 100; ++i ) {
+ rtems_clock_get_monotonic_coarse( &ts );
+ }
+
+ CleanupChangeWork( tc );
+
+ /*
+ * Call the rtems_clock_get_monotonic_coarse_bintime() directive and try to
+ * let it observe a changing generation number.
+ */
+ PrepareChangeWork( tc );
+
+ for ( i = 0; i < 100; ++i ) {
+ rtems_clock_get_monotonic_coarse_bintime( &bt );
+ }
+
+ CleanupChangeWork( tc );
+
+ /*
+ * Call the rtems_clock_get_monotonic_coarse_timeval() directive and try to
+ * let it observe a changing generation number.
+ */
+ PrepareChangeWork( tc );
+
+ for ( i = 0; i < 100; ++i ) {
+ rtems_clock_get_monotonic_coarse_timeval( &tv );
+ }
+
+ CleanupChangeWork( tc );
+
+ /*
+ * Call the rtems_clock_get_boot_time() directive and try to let it observe a
+ * changing generation number.
+ */
+ PrepareChangeWork( tc );
+
+ for ( i = 0; i < 100; ++i ) {
+ rtems_clock_get_boot_time( &ts );
+ }
+
+ CleanupChangeWork( tc );
+
+ /*
+ * Call the rtems_clock_get_boot_time_bintime() directive and try to let it
+ * observe a changing generation number.
+ */
+ PrepareChangeWork( tc );
+
+ for ( i = 0; i < 100; ++i ) {
+ rtems_clock_get_boot_time_bintime( &bt );
+ }
+
+ CleanupChangeWork( tc );
+
+ /*
+ * Call the rtems_clock_get_boot_time_timeval() directive and try to let it
+ * observe a changing generation number.
+ */
+ PrepareChangeWork( tc );
+
+ for ( i = 0; i < 100; ++i ) {
+ rtems_clock_get_boot_time_timeval( &tv );
+ }
+
+ CleanupChangeWork( tc );
+
+ /*
+ * Delete the change worker task.
+ */
+ DeleteTask( worker_id );
+}
+
+/**
+ * @fn void T_case_body_ScoreTimecounterValGetSmp( void )
+ */
+T_TEST_CASE( ScoreTimecounterValGetSmp )
+{
+ ScoreTimecounterValGetSmp_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timecounter-get.c b/testsuites/validation/tc-timecounter-get.c
new file mode 100644
index 0000000000..cd2464399e
--- /dev/null
+++ b/testsuites/validation/tc-timecounter-get.c
@@ -0,0 +1,574 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTimecounterValGet
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/counter.h>
+#include <rtems/timecounter.h>
+#include <rtems/score/timecounterimpl.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTimecounterValGet spec:/score/timecounter/val/get
+ *
+ * @ingroup TestsuitesValidationTimecounter1
+ *
+ * @brief Tests directives to get a time value.
+ *
+ * This test case performs the following actions:
+ *
+ * - Install a timecounter which can be used to perform interrut tests for the
+ * get time directives.
+ *
+ * - Try to interrupt the rtems_clock_get_realtime() directive to provoke a
+ * change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_realtime_bintime() directive to
+ * provoke a change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_realtime_timeval() directive to
+ * provoke a change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_monotonic() directive to provoke a
+ * change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_monotonic_bintime() directive to
+ * provoke a change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_monotonic_sbintime() directive to
+ * provoke a change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_monotonic_timeval() directive to
+ * provoke a change in the timehand generation number.
+ *
+ * - Prepare for the coarse get time directives.
+ *
+ * - Try to interrupt the rtems_clock_get_realtime_coarse() directive to
+ * provoke a change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_realtime_coarse_bintime() directive
+ * to provoke a change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_realtime_coarse_timeval() directive
+ * to provoke a change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_monotonic_coarse() directive to
+ * provoke a change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_monotonic_coarse_bintime()
+ * directive to provoke a change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_monotonic_coarse_timeval()
+ * directive to provoke a change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_boot_time() directive to provoke a
+ * change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_boot_time_bintime() directive to
+ * provoke a change in the timehand generation number.
+ *
+ * - Try to interrupt the rtems_clock_get_boot_time_timeval() directive to
+ * provoke a change in the timehand generation number.
+ *
+ * @{
+ */
+
+typedef enum {
+ STATE_EARLY,
+ STATE_GET_TIMECOUNT_BEFORE,
+ STATE_GET_TIMECOUNT_BUSY,
+ STATE_GET_TIMECOUNT_DONE,
+ STATE_GET_TIMECOUNT_AFTER
+} State;
+
+typedef struct {
+ struct timecounter base;
+ State state;
+ uint_fast32_t busy;
+ struct bintime tod;
+} Timecounter;
+
+static Timecounter test_timecounter;
+
+static uint32_t GetTimecount( struct timecounter *base )
+{
+ Timecounter *tc;
+
+ tc = (Timecounter *) base;
+
+ if (
+ tc->state == STATE_GET_TIMECOUNT_BEFORE &&
+ !rtems_interrupt_is_in_progress()
+ ) {
+ tc->state = STATE_GET_TIMECOUNT_BUSY;
+ T_busy( tc->busy );
+ tc->state = STATE_GET_TIMECOUNT_DONE;
+ }
+
+ return rtems_counter_read();
+}
+
+static void InterruptPrepare( void *arg )
+{
+ Timecounter *tc;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_EARLY;
+}
+
+static void ActionRealtime( void *arg )
+{
+ Timecounter *tc;
+ struct timespec ts;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_realtime( &ts );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionRealtimeBintime( void *arg )
+{
+ Timecounter *tc;
+ struct bintime bt;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_realtime_bintime( &bt );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionRealtimeTimeval( void *arg )
+{
+ Timecounter *tc;
+ struct timeval tv;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_realtime_timeval( &tv );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionMonotonic( void *arg )
+{
+ Timecounter *tc;
+ struct timespec ts;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_monotonic( &ts );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionMonotonicBintime( void *arg )
+{
+ Timecounter *tc;
+ struct bintime bt;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_monotonic_bintime( &bt );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionMonotonicSbintime( void *arg )
+{
+ Timecounter *tc;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ (void) rtems_clock_get_monotonic_sbintime();
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionMonotonicTimeval( void *arg )
+{
+ Timecounter *tc;
+ struct timeval tv;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_monotonic_timeval( &tv );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionCoarseRealtime( void *arg )
+{
+ Timecounter *tc;
+ struct timespec ts;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_realtime_coarse( &ts );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionCoarseRealtimeBintime( void *arg )
+{
+ Timecounter *tc;
+ struct bintime bt;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_realtime_coarse_bintime( &bt );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionCoarseRealtimeTimeval( void *arg )
+{
+ Timecounter *tc;
+ struct timeval tv;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_realtime_coarse_timeval( &tv );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionCoarseMonotonic( void *arg )
+{
+ Timecounter *tc;
+ struct timespec ts;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_monotonic_coarse( &ts );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionCoarseMonotonicBintime( void *arg )
+{
+ Timecounter *tc;
+ struct bintime bt;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_monotonic_coarse_bintime( &bt );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionCoarseMonotonicTimeval( void *arg )
+{
+ Timecounter *tc;
+ struct timeval tv;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_monotonic_coarse_timeval( &tv );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionBootTime( void *arg )
+{
+ Timecounter *tc;
+ struct timespec ts;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_boot_time( &ts );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionBootTimeBintime( void *arg )
+{
+ Timecounter *tc;
+ struct bintime bt;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_boot_time_bintime( &bt );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void ActionBootTimeTimeval( void *arg )
+{
+ Timecounter *tc;
+ struct timeval tv;
+
+ tc = (Timecounter *) arg;
+ tc->state = STATE_GET_TIMECOUNT_BEFORE;
+ rtems_clock_get_boot_time_timeval( &tv );
+ tc->state = STATE_GET_TIMECOUNT_AFTER;
+}
+
+static void CallTimcounterWindupTwice( const Timecounter *tc )
+{
+ ISR_lock_Context lock_context;
+
+ /*
+ * Make sure that tc_windup() was called at least twice to increment the
+ * generation number for * both timehands.
+ */
+
+ _Timecounter_Acquire( &lock_context );
+ _Timecounter_Set_clock( &tc->tod, &lock_context );
+
+ _Timecounter_Acquire( &lock_context );
+ _Timecounter_Set_clock( &tc->tod, &lock_context );
+}
+
+static T_interrupt_test_state Interrupt( void *arg )
+{
+ Timecounter *tc;
+ State state;
+
+ tc = (Timecounter *) arg;
+ state = tc->state;
+
+ if ( state == STATE_EARLY || state == STATE_GET_TIMECOUNT_BEFORE ) {
+ return T_INTERRUPT_TEST_EARLY;
+ }
+
+ if ( state == STATE_GET_TIMECOUNT_BUSY ) {
+ CallTimcounterWindupTwice( tc );
+
+ return T_INTERRUPT_TEST_DONE;
+ }
+
+ return T_INTERRUPT_TEST_LATE;
+}
+
+static T_interrupt_test_state InterruptCoarse( void *arg )
+{
+ Timecounter *tc;
+ State state;
+
+ tc = (Timecounter *) arg;
+ state = tc->state;
+
+ if ( state == STATE_EARLY ) {
+ return T_INTERRUPT_TEST_EARLY;
+ }
+
+ if ( state == STATE_GET_TIMECOUNT_BEFORE ) {
+ CallTimcounterWindupTwice( tc );
+
+ return T_INTERRUPT_TEST_DONE;
+ }
+
+ return T_INTERRUPT_TEST_LATE;
+}
+
+static bool InterruptTest(
+ const T_interrupt_test_config *config,
+ void *arg,
+ uint32_t iterations
+)
+{
+ uint32_t i;
+ bool ok;
+
+ ok = false;
+
+ for ( i = 0; i < iterations; ++i ) {
+ T_interrupt_test_state test_state;
+
+ test_state = T_interrupt_test( config, arg );
+ ok = ok || test_state == T_INTERRUPT_TEST_DONE;
+ }
+
+ return ok;
+}
+
+/**
+ * @brief Install a timecounter which can be used to perform interrut tests for
+ * the get time directives.
+ */
+static void ScoreTimecounterValGet_Action_0( void )
+{
+ T_interrupt_test_config config = {
+ .prepare = InterruptPrepare,
+ .interrupt = Interrupt,
+ .max_iteration_count = 10000
+ };
+ Timecounter *tc;
+
+ tc = &test_timecounter;
+ tc->base.tc_get_timecount = GetTimecount;
+ tc->base.tc_counter_mask = 0xffffffff;
+ tc->base.tc_frequency = rtems_counter_frequency();
+ tc->base.tc_quality = RTEMS_TIMECOUNTER_QUALITY_CLOCK_DRIVER + 1;
+ tc->busy = T_get_one_clock_tick_busy() / 10;
+ rtems_clock_get_realtime_bintime( &tc->tod );
+ rtems_timecounter_install( &tc->base );
+
+ /*
+ * Try to interrupt the rtems_clock_get_realtime() directive to provoke a
+ * change in the timehand generation number.
+ */
+ config.action = ActionRealtime;
+ T_true( InterruptTest( &config, tc, 1 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_realtime_bintime() directive to
+ * provoke a change in the timehand generation number.
+ */
+ config.action = ActionRealtimeBintime;
+ T_true( InterruptTest( &config, tc, 1 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_realtime_timeval() directive to
+ * provoke a change in the timehand generation number.
+ */
+ config.action = ActionRealtimeTimeval;
+ T_true( InterruptTest( &config, tc, 1 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_monotonic() directive to provoke a
+ * change in the timehand generation number.
+ */
+ config.action = ActionMonotonic;
+ T_true( InterruptTest( &config, tc, 1 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_monotonic_bintime() directive to
+ * provoke a change in the timehand generation number.
+ */
+ config.action = ActionMonotonicBintime;
+ T_true( InterruptTest( &config, tc, 1 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_monotonic_sbintime() directive to
+ * provoke a change in the timehand generation number.
+ */
+ config.action = ActionMonotonicSbintime;
+ T_true( InterruptTest( &config, tc, 1 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_monotonic_timeval() directive to
+ * provoke a change in the timehand generation number.
+ */
+ config.action = ActionMonotonicTimeval;
+ T_true( InterruptTest( &config, tc, 1 ) );
+
+ /*
+ * Prepare for the coarse get time directives.
+ */
+ config.interrupt = InterruptCoarse;
+
+ /*
+ * Try to interrupt the rtems_clock_get_realtime_coarse() directive to
+ * provoke a change in the timehand generation number.
+ */
+ config.action = ActionCoarseRealtime;
+ T_true( InterruptTest( &config, tc, 10 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_realtime_coarse_bintime() directive
+ * to provoke a change in the timehand generation number.
+ */
+ config.action = ActionCoarseRealtimeBintime;
+ T_true( InterruptTest( &config, tc, 10 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_realtime_coarse_timeval() directive
+ * to provoke a change in the timehand generation number.
+ */
+ config.action = ActionCoarseRealtimeTimeval;
+ T_true( InterruptTest( &config, tc, 10 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_monotonic_coarse() directive to
+ * provoke a change in the timehand generation number.
+ */
+ config.action = ActionCoarseMonotonic;
+ T_true( InterruptTest( &config, tc, 10 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_monotonic_coarse_bintime() directive
+ * to provoke a change in the timehand generation number.
+ */
+ config.action = ActionCoarseMonotonicBintime;
+ T_true( InterruptTest( &config, tc, 10 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_monotonic_coarse_timeval() directive
+ * to provoke a change in the timehand generation number.
+ */
+ config.action = ActionCoarseMonotonicTimeval;
+ T_true( InterruptTest( &config, tc, 10 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_boot_time() directive to provoke a
+ * change in the timehand generation number.
+ */
+ config.action = ActionBootTime;
+ T_true( InterruptTest( &config, tc, 10 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_boot_time_bintime() directive to
+ * provoke a change in the timehand generation number.
+ */
+ config.action = ActionBootTimeBintime;
+ T_true( InterruptTest( &config, tc, 10 ) );
+
+ /*
+ * Try to interrupt the rtems_clock_get_boot_time_timeval() directive to
+ * provoke a change in the timehand generation number.
+ */
+ config.action = ActionBootTimeTimeval;
+ T_true( InterruptTest( &config, tc, 10 ) );
+}
+
+/**
+ * @fn void T_case_body_ScoreTimecounterValGet( void )
+ */
+T_TEST_CASE( ScoreTimecounterValGet )
+{
+ ScoreTimecounterValGet_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timecounter-install.c b/testsuites/validation/tc-timecounter-install.c
new file mode 100644
index 0000000000..14babc5b94
--- /dev/null
+++ b/testsuites/validation/tc-timecounter-install.c
@@ -0,0 +1,1133 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTimecounterValInstall
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/timecounter.h>
+#include <rtems/score/atomic.h>
+#include <rtems/score/threaddispatch.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTimecounterValInstall spec:/score/timecounter/val/install
+ *
+ * @ingroup TestsuitesValidationTimecounter0
+ *
+ * @brief Tests timecounter installation related functions and directives of
+ * the Clock Manager.
+ *
+ * This test case performs the following actions:
+ *
+ * - Call the simple timecounter tick service with a zero delta and offset.
+ * This will lead to an overflow to zero of the timehand generation. It
+ * shall not change the initial clock values.
+ *
+ * - Call the directives to get the initial value of CLOCK_REALTIME and the
+ * initial boot time.
+ *
+ * - Check the initial CLOCK_REALTIME in seconds and nanoseconds format.
+ *
+ * - Check that CLOCK_REALTIME is frozen in seconds and nanoseconds format.
+ *
+ * - Check the initial CLOCK_REALTIME in coarse resolution in seconds and
+ * nanoseconds format.
+ *
+ * - Check that CLOCK_REALTIME is frozen in coarse resolution in seconds and
+ * nanoseconds format.
+ *
+ * - Check the initial CLOCK_REALTIME in binary time format.
+ *
+ * - Check that CLOCK_REALTIME is frozen in binary time format.
+ *
+ * - Check the initial CLOCK_REALTIME in coarse resolution in binary time
+ * format.
+ *
+ * - Check that CLOCK_REALTIME is frozen in coarse resolution in binary time
+ * format.
+ *
+ * - Check the initial CLOCK_REALTIME in seconds and microseconds format.
+ *
+ * - Check that CLOCK_REALTIME is frozen in seconds and microseconds format.
+ *
+ * - Check the initial CLOCK_REALTIME in coarse resolution in seconds and
+ * microseconds format.
+ *
+ * - Check that CLOCK_REALTIME is frozen in coarse resolution in seconds and
+ * microseconds format.
+ *
+ * - Check the initial boot time in seconds and nanoseconds format.
+ *
+ * - Check the initial boot time in binary time format.
+ *
+ * - Check the initial boot time in seconds and microseconds format.
+ *
+ * - Call the directives to get the initial value of CLOCK_MONOTONIC and the
+ * initial boot time.
+ *
+ * - Check the initial CLOCK_MONOTONIC in seconds and nanoseconds format.
+ *
+ * - Check that CLOCK_MONOTONIC is frozen in seconds and nanoseconds format.
+ *
+ * - Check the initial CLOCK_MONOTONIC in coarse resolution in seconds and
+ * nanoseconds format.
+ *
+ * - Check that CLOCK_MONOTONIC is frozen in coarse resolution in seconds and
+ * nanoseconds format.
+ *
+ * - Check the initial CLOCK_MONOTONIC in binary time format.
+ *
+ * - Check that CLOCK_MONOTONIC is frozen in binary time format.
+ *
+ * - Check the initial CLOCK_MONOTONIC in coarse resolution in binary time
+ * format.
+ *
+ * - Check that CLOCK_MONOTONIC is frozen in coarse resolution in binary time
+ * format.
+ *
+ * - Check the initial CLOCK_MONOTONIC in signed binary time format.
+ *
+ * - Check that CLOCK_MONOTONIC is frozen in signed binary time format.
+ *
+ * - Check the initial CLOCK_MONOTONIC in seconds and microseconds format.
+ *
+ * - Check that CLOCK_MONOTONIC is frozen in seconds and microseconds format.
+ *
+ * - Check the initial CLOCK_MONOTONIC in coarse resolution in seconds and
+ * microseconds format.
+ *
+ * - Check that CLOCK_MONOTONIC is frozen in coarse resolution in seconds and
+ * microseconds format.
+ *
+ * - Install timecounter of different quality levels and frequencies.
+ *
+ * - Install a timecounter with a high quality level and normal frequency.
+ * Check that it was installed.
+ *
+ * - Install a timecounter with a high quality level and low frequency. Check
+ * that it was not installed.
+ *
+ * - Install a timecounter with a high quality level and high frequency.
+ * Check that it was installed.
+ *
+ * - Install a timecounter with a low quality level. Check that it was not
+ * installed.
+ *
+ * - Call the directives to get the time in the highest resolution available to
+ * the system.
+ *
+ * - Check that the timecounter was used by rtems_clock_get_realtime().
+ *
+ * - Check that the timecounter was used by
+ * rtems_clock_get_realtime_bintime().
+ *
+ * - Check that the timecounter was used by
+ * rtems_clock_get_realtime_timeval().
+ *
+ * - Check that the timecounter was used by rtems_clock_get_monotonic().
+ *
+ * - Check that the timecounter was used by
+ * rtems_clock_get_monotonic_bintime().
+ *
+ * - Check that the timecounter was used by
+ * rtems_clock_get_monotonic_sbintime().
+ *
+ * - Check that the timecounter was used by
+ * rtems_clock_get_monotonic_timeval().
+ *
+ * - Call the directives to get the time in a coarse resolution.
+ *
+ * - Check that the timecounter was not used by
+ * rtems_clock_get_realtime_coarse().
+ *
+ * - Check that the timecounter was not used by
+ * rtems_clock_get_realtime_coarse_bintime().
+ *
+ * - Check that the timecounter was not used by
+ * rtems_clock_get_realtime_coarse_timeval().
+ *
+ * - Check that the timecounter was not used by
+ * rtems_clock_get_monotonic_coarse().
+ *
+ * - Check that the timecounter was not used by
+ * rtems_clock_get_monotonic_coarse_bintime().
+ *
+ * - Check that the timecounter was not used by
+ * rtems_clock_get_monotonic_coarse_timeval().
+ *
+ * - Check that the timecounter was not used by rtems_clock_get_boot_time().
+ *
+ * - Check that the timecounter was not used by
+ * rtems_clock_get_boot_time_bintime().
+ *
+ * - Check that the timecounter was not used by
+ * rtems_clock_get_boot_time_timeval().
+ *
+ * - Call the directives to get the time in the highest resolution available to
+ * the system.
+ *
+ * - Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_realtime() returns the correct time.
+ *
+ * - Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_realtime_bintime() returns the correct time.
+ *
+ * - Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_realtime_timeval() returns the correct time.
+ *
+ * - Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_monotonic() returns the correct time.
+ *
+ * - Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_monotonic_bintime() returns the correct time.
+ *
+ * - Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_monotonic_sbintime() returns the correct time.
+ *
+ * - Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_monotonic_timeval() returns the correct time.
+ *
+ * - Update the oldest timehand after a large time interval.
+ *
+ * - Call the simple timecounter tick service with non-zero delta and offset
+ * parameter values so that exactly one second passed.
+ *
+ * - Check that exactly one second passed due to the simple clock tick
+ * service.
+ *
+ * - Install a very high quality timecounter with a low frequency to test the
+ * NTP support.
+ *
+ * - Let the seconds value of CLOCK_REALTIME not change. Check that the NTP
+ * update second handler is not called.
+ *
+ * - Let the seconds value of CLOCK_REALTIME change by one. Check that the
+ * NTP update second handler is called exactly once.
+ *
+ * - Let the seconds value of CLOCK_REALTIME change by 200. Check that the
+ * NTP update second handler is called exactly 200 times.
+ *
+ * - Let the seconds value of CLOCK_REALTIME change by 201. Check that the
+ * NTP update second handler is called exactly twice.
+ *
+ * - Let the seconds value of CLOCK_REALTIME change by one. Check that the
+ * NTP update second handler is incremented the CLOCK_REALTIME by one
+ * second.
+ *
+ * - Let the seconds value of CLOCK_REALTIME change by one. Check that the
+ * NTP update second handler is decremented the CLOCK_REALTIME by one
+ * second.
+ *
+ * - Let the seconds value of CLOCK_REALTIME change by one. Check that the
+ * NTP update second handler increased the timecounter frequency.
+ *
+ * - Let the seconds value of CLOCK_REALTIME change by one. Check that the
+ * NTP update second handler decreased the timecounter frequency.
+ *
+ * @{
+ */
+
+typedef struct {
+ struct timecounter base;
+ Atomic_Ulong counter;
+} Timecounter;
+
+static Timecounter high_quality_low_frequency;
+
+static Timecounter high_quality_normal_frequency;
+
+static Timecounter high_quality_high_frequency;
+
+static Timecounter low_quality;
+
+static Timecounter very_high_quality;
+
+static uint32_t ntp_counter;
+
+static uint32_t GetTimecount( struct timecounter *base )
+{
+ Timecounter *tc;
+
+ tc = (Timecounter *) base;
+
+ return (uint32_t) _Atomic_Fetch_add_ulong(
+ &tc->counter,
+ 1,
+ ATOMIC_ORDER_RELAXED
+ );
+}
+
+static uint32_t GetCounter( const Timecounter *tc )
+{
+ return (uint32_t) _Atomic_Load_ulong(
+ &tc->counter,
+ ATOMIC_ORDER_RELAXED
+ );
+}
+
+static void SetCounter( Timecounter *tc, uint32_t counter )
+{
+ _Atomic_Store_ulong(
+ &tc->counter,
+ counter,
+ ATOMIC_ORDER_RELAXED
+ );
+}
+
+static void NtpUpdateCounter( int64_t *adjustment, time_t *newsec )
+{
+ (void) newsec;
+ T_eq_i64( *adjustment, 0 );
+ ++ntp_counter;
+}
+
+static void NtpUpdateSecondIncrement( int64_t *adjustment, time_t *newsec )
+{
+ (void) adjustment;
+ ++(*newsec);
+}
+
+static void NtpUpdateSecondDecrement( int64_t *adjustment, time_t *newsec )
+{
+ (void) adjustment;
+ --(*newsec);
+}
+
+static void NtpUpdateAdjustmentFaster( int64_t *adjustment, time_t *newsec )
+{
+ *adjustment = ( (int64_t) 5000 ) << 32;
+ (void) newsec;
+}
+
+static void NtpUpdateAdjustmentSlower( int64_t *adjustment, time_t *newsec )
+{
+ *adjustment = -( (int64_t) 5000 ) << 32;
+ (void) newsec;
+}
+
+static void CallTimecounterTick( void )
+{
+ Per_CPU_Control *cpu_self;
+
+ cpu_self = _Thread_Dispatch_disable();
+ rtems_timecounter_tick();
+ _Thread_Dispatch_enable( cpu_self );
+}
+
+/**
+ * @brief Call the simple timecounter tick service with a zero delta and
+ * offset. This will lead to an overflow to zero of the timehand generation.
+ * It shall not change the initial clock values.
+ */
+static void ScoreTimecounterValInstall_Action_0( void )
+{
+ ISR_lock_Context lock_context;
+
+ _Timecounter_Acquire( &lock_context );
+ _Timecounter_Tick_simple( 0, 0, &lock_context );
+}
+
+/**
+ * @brief Call the directives to get the initial value of CLOCK_REALTIME and
+ * the initial boot time.
+ */
+static void ScoreTimecounterValInstall_Action_1( void )
+{
+ struct bintime bt;
+ struct timespec ts;
+ struct timeval tv;
+
+ /*
+ * Check the initial CLOCK_REALTIME in seconds and nanoseconds format.
+ */
+ rtems_clock_get_realtime( &ts );
+ T_eq_i64( ts.tv_sec, 567993600 );
+ T_eq_u64( ts.tv_nsec, 0 );
+
+ /*
+ * Check that CLOCK_REALTIME is frozen in seconds and nanoseconds format.
+ */
+ rtems_clock_get_realtime( &ts );
+ T_eq_i64( ts.tv_sec, 567993600 );
+ T_eq_u64( ts.tv_nsec, 0 );
+
+ /*
+ * Check the initial CLOCK_REALTIME in coarse resolution in seconds and
+ * nanoseconds format.
+ */
+ rtems_clock_get_realtime_coarse( &ts );
+ T_eq_i64( ts.tv_sec, 567993600 );
+ T_eq_u64( ts.tv_nsec, 0 );
+
+ /*
+ * Check that CLOCK_REALTIME is frozen in coarse resolution in seconds and
+ * nanoseconds format.
+ */
+ rtems_clock_get_realtime_coarse( &ts );
+ T_eq_i64( ts.tv_sec, 567993600 );
+ T_eq_u64( ts.tv_nsec, 0 );
+
+ /*
+ * Check the initial CLOCK_REALTIME in binary time format.
+ */
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567993600 );
+ T_eq_u64( bt.frac, 0 );
+
+ /*
+ * Check that CLOCK_REALTIME is frozen in binary time format.
+ */
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567993600 );
+ T_eq_u64( bt.frac, 0 );
+
+ /*
+ * Check the initial CLOCK_REALTIME in coarse resolution in binary time
+ * format.
+ */
+ rtems_clock_get_realtime_coarse_bintime( &bt );
+ T_eq_i64( bt.sec, 567993600 );
+ T_eq_u64( bt.frac, 0 );
+
+ /*
+ * Check that CLOCK_REALTIME is frozen in coarse resolution in binary time
+ * format.
+ */
+ rtems_clock_get_realtime_coarse_bintime( &bt );
+ T_eq_i64( bt.sec, 567993600 );
+ T_eq_u64( bt.frac, 0 );
+
+ /*
+ * Check the initial CLOCK_REALTIME in seconds and microseconds format.
+ */
+ rtems_clock_get_realtime_timeval( &tv );
+ T_eq_i64( tv.tv_sec, 567993600 );
+ T_eq_long( tv.tv_usec, 0 );
+
+ /*
+ * Check that CLOCK_REALTIME is frozen in seconds and microseconds format.
+ */
+ rtems_clock_get_realtime_timeval( &tv );
+ T_eq_i64( tv.tv_sec, 567993600 );
+ T_eq_long( tv.tv_usec, 0 );
+
+ /*
+ * Check the initial CLOCK_REALTIME in coarse resolution in seconds and
+ * microseconds format.
+ */
+ rtems_clock_get_realtime_coarse_timeval( &tv );
+ T_eq_i64( tv.tv_sec, 567993600 );
+ T_eq_long( tv.tv_usec, 0 );
+
+ /*
+ * Check that CLOCK_REALTIME is frozen in coarse resolution in seconds and
+ * microseconds format.
+ */
+ rtems_clock_get_realtime_coarse_timeval( &tv );
+ T_eq_i64( tv.tv_sec, 567993600 );
+ T_eq_long( tv.tv_usec, 0 );
+
+ /*
+ * Check the initial boot time in seconds and nanoseconds format.
+ */
+ rtems_clock_get_boot_time( &ts );
+ T_eq_i64( ts.tv_sec, 567993599 );
+ T_eq_u64( ts.tv_nsec, 0 );
+
+ /*
+ * Check the initial boot time in binary time format.
+ */
+ rtems_clock_get_boot_time_bintime( &bt );
+ T_eq_i64( bt.sec, 567993599 );
+ T_eq_u64( bt.frac, 0 );
+
+ /*
+ * Check the initial boot time in seconds and microseconds format.
+ */
+ rtems_clock_get_boot_time_timeval( &tv );
+ T_eq_i64( tv.tv_sec, 567993599 );
+ T_eq_long( tv.tv_usec, 0 );
+}
+
+/**
+ * @brief Call the directives to get the initial value of CLOCK_MONOTONIC and
+ * the initial boot time.
+ */
+static void ScoreTimecounterValInstall_Action_2( void )
+{
+ struct bintime bt;
+ sbintime_t sb;
+ struct timespec ts;
+ struct timeval tv;
+
+ /*
+ * Check the initial CLOCK_MONOTONIC in seconds and nanoseconds format.
+ */
+ rtems_clock_get_monotonic( &ts );
+ T_eq_i64( ts.tv_sec, 1 );
+ T_eq_u64( ts.tv_nsec, 0 );
+
+ /*
+ * Check that CLOCK_MONOTONIC is frozen in seconds and nanoseconds format.
+ */
+ rtems_clock_get_monotonic( &ts );
+ T_eq_i64( ts.tv_sec, 1 );
+ T_eq_u64( ts.tv_nsec, 0 );
+
+ /*
+ * Check the initial CLOCK_MONOTONIC in coarse resolution in seconds and
+ * nanoseconds format.
+ */
+ rtems_clock_get_monotonic_coarse( &ts );
+ T_eq_i64( ts.tv_sec, 1 );
+ T_eq_u64( ts.tv_nsec, 0 );
+
+ /*
+ * Check that CLOCK_MONOTONIC is frozen in coarse resolution in seconds and
+ * nanoseconds format.
+ */
+ rtems_clock_get_monotonic_coarse( &ts );
+ T_eq_i64( ts.tv_sec, 1 );
+ T_eq_u64( ts.tv_nsec, 0 );
+
+ /*
+ * Check the initial CLOCK_MONOTONIC in binary time format.
+ */
+ rtems_clock_get_monotonic_bintime( &bt );
+ T_eq_i64( bt.sec, 1 );
+ T_eq_u64( bt.frac, 0 );
+
+ /*
+ * Check that CLOCK_MONOTONIC is frozen in binary time format.
+ */
+ rtems_clock_get_monotonic_bintime( &bt );
+ T_eq_i64( bt.sec, 1 );
+ T_eq_u64( bt.frac, 0 );
+
+ /*
+ * Check the initial CLOCK_MONOTONIC in coarse resolution in binary time
+ * format.
+ */
+ rtems_clock_get_monotonic_coarse_bintime( &bt );
+ T_eq_i64( bt.sec, 1 );
+ T_eq_u64( bt.frac, 0 );
+
+ /*
+ * Check that CLOCK_MONOTONIC is frozen in coarse resolution in binary time
+ * format.
+ */
+ rtems_clock_get_monotonic_coarse_bintime( &bt );
+ T_eq_i64( bt.sec, 1 );
+ T_eq_u64( bt.frac, 0 );
+
+ /*
+ * Check the initial CLOCK_MONOTONIC in signed binary time format.
+ */
+ sb = rtems_clock_get_monotonic_sbintime();
+ T_eq_i64( sb, SBT_1S );
+
+ /*
+ * Check that CLOCK_MONOTONIC is frozen in signed binary time format.
+ */
+ sb = rtems_clock_get_monotonic_sbintime();
+ T_eq_i64( sb, SBT_1S );
+
+ /*
+ * Check the initial CLOCK_MONOTONIC in seconds and microseconds format.
+ */
+ rtems_clock_get_monotonic_timeval( &tv );
+ T_eq_i64( tv.tv_sec, 1 );
+ T_eq_long( tv.tv_usec, 0 );
+
+ /*
+ * Check that CLOCK_MONOTONIC is frozen in seconds and microseconds format.
+ */
+ rtems_clock_get_monotonic_timeval( &tv );
+ T_eq_i64( tv.tv_sec, 1 );
+ T_eq_long( tv.tv_usec, 0 );
+
+ /*
+ * Check the initial CLOCK_MONOTONIC in coarse resolution in seconds and
+ * microseconds format.
+ */
+ rtems_clock_get_monotonic_coarse_timeval( &tv );
+ T_eq_i64( tv.tv_sec, 1 );
+ T_eq_long( tv.tv_usec, 0 );
+
+ /*
+ * Check that CLOCK_MONOTONIC is frozen in coarse resolution in seconds and
+ * microseconds format.
+ */
+ rtems_clock_get_monotonic_coarse_timeval( &tv );
+ T_eq_i64( tv.tv_sec, 1 );
+ T_eq_long( tv.tv_usec, 0 );
+}
+
+/**
+ * @brief Install timecounter of different quality levels and frequencies.
+ */
+static void ScoreTimecounterValInstall_Action_3( void )
+{
+ Timecounter *hqlf;
+ Timecounter *hqnf;
+ Timecounter *hqhf;
+ Timecounter *lq;
+ sbintime_t sb;
+
+ hqlf = &high_quality_low_frequency;
+ hqnf = &high_quality_normal_frequency;
+ hqhf = &high_quality_high_frequency;
+ lq = &low_quality;
+
+ /*
+ * Install a timecounter with a high quality level and normal frequency.
+ * Check that it was installed.
+ */
+ hqnf->base.tc_get_timecount = GetTimecount;
+ hqnf->base.tc_counter_mask = 0xffffffff;
+ hqnf->base.tc_frequency = 0x20000000;
+ hqnf->base.tc_quality = RTEMS_TIMECOUNTER_QUALITY_CLOCK_DRIVER + 1;
+ rtems_timecounter_install( &hqnf->base );
+
+ T_eq_u32( GetCounter( hqnf ), 1 );
+
+ sb = rtems_clock_get_monotonic_sbintime();
+ T_eq_u32( GetCounter( hqnf ), 2 );
+ T_eq_i64( sb, SBT_1S + 8 );
+
+ /*
+ * Install a timecounter with a high quality level and low frequency. Check
+ * that it was not installed.
+ */
+ hqlf->base.tc_get_timecount = GetTimecount;
+ hqlf->base.tc_counter_mask = 0xffffffff;
+ hqlf->base.tc_frequency = 0x10000000;
+ hqlf->base.tc_quality = RTEMS_TIMECOUNTER_QUALITY_CLOCK_DRIVER + 1;
+ rtems_timecounter_install( &hqlf->base );
+
+ T_eq_u32( GetCounter( hqlf ), 0 );
+ T_eq_u32( GetCounter( hqnf ), 2 );
+
+ sb = rtems_clock_get_monotonic_sbintime();
+ T_eq_u32( GetCounter( hqlf ), 0 );
+ T_eq_u32( GetCounter( hqnf ), 3 );
+ T_eq_i64( sb, SBT_1S + 16 );
+
+ /*
+ * Install a timecounter with a high quality level and high frequency. Check
+ * that it was installed.
+ */
+ hqhf->base.tc_get_timecount = GetTimecount;
+ hqhf->base.tc_counter_mask = 0xffffffff;
+ hqhf->base.tc_frequency = 0x40000000;
+ hqhf->base.tc_quality = RTEMS_TIMECOUNTER_QUALITY_CLOCK_DRIVER + 1;
+ rtems_timecounter_install( &hqhf->base );
+
+ T_eq_u32( GetCounter( hqlf ), 0 );
+ T_eq_u32( GetCounter( hqnf ), 4 );
+ T_eq_u32( GetCounter( hqhf ), 1 );
+
+ sb = rtems_clock_get_monotonic_sbintime();
+ T_eq_u32( GetCounter( hqlf ), 0 );
+ T_eq_u32( GetCounter( hqnf ), 4 );
+ T_eq_u32( GetCounter( hqhf ), 2 );
+ T_eq_i64( sb, SBT_1S + 28 );
+
+ /*
+ * Install a timecounter with a low quality level. Check that it was not
+ * installed.
+ */
+ lq->base.tc_get_timecount = GetTimecount;
+ lq->base.tc_counter_mask = 0xffffffff;
+ lq->base.tc_frequency = 0x80000000;
+ lq->base.tc_quality = RTEMS_TIMECOUNTER_QUALITY_CLOCK_DRIVER;
+ rtems_timecounter_install( &lq->base );
+
+ T_eq_u32( GetCounter( hqlf ), 0 );
+ T_eq_u32( GetCounter( hqnf ), 4 );
+ T_eq_u32( GetCounter( hqhf ), 2 );
+ T_eq_u32( GetCounter( lq ), 0 );
+
+ sb = rtems_clock_get_monotonic_sbintime();
+ T_eq_u32( GetCounter( hqlf ), 0 );
+ T_eq_u32( GetCounter( hqnf ), 4 );
+ T_eq_u32( GetCounter( hqhf ), 3 );
+ T_eq_u32( GetCounter( lq ), 0 );
+ T_eq_i64( sb, SBT_1S + 32 );
+}
+
+/**
+ * @brief Call the directives to get the time in the highest resolution
+ * available to the system.
+ */
+static void ScoreTimecounterValInstall_Action_4( void )
+{
+ Timecounter *tc;
+ uint32_t counter;
+ struct bintime bt;
+ struct timespec ts;
+ struct timeval tv;
+
+ tc = &high_quality_high_frequency;
+ counter = GetCounter( tc );
+
+ /*
+ * Check that the timecounter was used by rtems_clock_get_realtime().
+ */
+ rtems_clock_get_realtime( &ts );
+ T_eq_u32( GetCounter( tc ), counter + 1 );
+
+ /*
+ * Check that the timecounter was used by rtems_clock_get_realtime_bintime().
+ */
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_u32( GetCounter( tc ), counter + 2 );
+
+ /*
+ * Check that the timecounter was used by rtems_clock_get_realtime_timeval().
+ */
+ rtems_clock_get_realtime_timeval( &tv );
+ T_eq_u32( GetCounter( tc ), counter + 3 );
+
+ /*
+ * Check that the timecounter was used by rtems_clock_get_monotonic().
+ */
+ rtems_clock_get_monotonic( &ts );
+ T_eq_u32( GetCounter( tc ), counter + 4 );
+
+ /*
+ * Check that the timecounter was used by
+ * rtems_clock_get_monotonic_bintime().
+ */
+ rtems_clock_get_monotonic_bintime( &bt );
+ T_eq_u32( GetCounter( tc ), counter + 5 );
+
+ /*
+ * Check that the timecounter was used by
+ * rtems_clock_get_monotonic_sbintime().
+ */
+ (void) rtems_clock_get_monotonic_sbintime();
+ T_eq_u32( GetCounter( tc ), counter + 6 );
+
+ /*
+ * Check that the timecounter was used by
+ * rtems_clock_get_monotonic_timeval().
+ */
+ rtems_clock_get_monotonic_timeval( &tv );
+ T_eq_u32( GetCounter( tc ), counter + 7 );
+}
+
+/**
+ * @brief Call the directives to get the time in a coarse resolution.
+ */
+static void ScoreTimecounterValInstall_Action_5( void )
+{
+ Timecounter *tc;
+ uint32_t counter;
+ struct bintime bt;
+ struct timespec ts;
+ struct timeval tv;
+
+ tc = &high_quality_high_frequency;
+ counter = GetCounter( tc );
+
+ /*
+ * Check that the timecounter was not used by
+ * rtems_clock_get_realtime_coarse().
+ */
+ rtems_clock_get_realtime_coarse( &ts );
+ T_eq_u32( GetCounter( tc ), counter );
+
+ /*
+ * Check that the timecounter was not used by
+ * rtems_clock_get_realtime_coarse_bintime().
+ */
+ rtems_clock_get_realtime_coarse_bintime( &bt );
+ T_eq_u32( GetCounter( tc ), counter );
+
+ /*
+ * Check that the timecounter was not used by
+ * rtems_clock_get_realtime_coarse_timeval().
+ */
+ rtems_clock_get_realtime_coarse_timeval( &tv );
+ T_eq_u32( GetCounter( tc ), counter );
+
+ /*
+ * Check that the timecounter was not used by
+ * rtems_clock_get_monotonic_coarse().
+ */
+ rtems_clock_get_monotonic_coarse( &ts );
+ T_eq_u32( GetCounter( tc ), counter );
+
+ /*
+ * Check that the timecounter was not used by
+ * rtems_clock_get_monotonic_coarse_bintime().
+ */
+ rtems_clock_get_monotonic_coarse_bintime( &bt );
+ T_eq_u32( GetCounter( tc ), counter );
+
+ /*
+ * Check that the timecounter was not used by
+ * rtems_clock_get_monotonic_coarse_timeval().
+ */
+ rtems_clock_get_monotonic_coarse_timeval( &tv );
+ T_eq_u32( GetCounter( tc ), counter );
+
+ /*
+ * Check that the timecounter was not used by rtems_clock_get_boot_time().
+ */
+ rtems_clock_get_boot_time( &ts );
+ T_eq_u32( GetCounter( tc ), counter );
+
+ /*
+ * Check that the timecounter was not used by
+ * rtems_clock_get_boot_time_bintime().
+ */
+ rtems_clock_get_boot_time_bintime( &bt );
+ T_eq_u32( GetCounter( tc ), counter );
+
+ /*
+ * Check that the timecounter was not used by
+ * rtems_clock_get_boot_time_timeval().
+ */
+ rtems_clock_get_boot_time_timeval( &tv );
+ T_eq_u32( GetCounter( tc ), counter );
+}
+
+/**
+ * @brief Call the directives to get the time in the highest resolution
+ * available to the system.
+ */
+static void ScoreTimecounterValInstall_Action_6( void )
+{
+ Timecounter *tc;
+ uint32_t counter;
+ struct bintime bt;
+ sbintime_t sb;
+ struct timespec ts;
+ struct timeval tv;
+
+ tc = &high_quality_high_frequency;
+ counter = 3 * tc->base.tc_frequency + 123456789;
+
+ /*
+ * Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_realtime() returns the correct time.
+ */
+ SetCounter( tc, counter );
+ rtems_clock_get_realtime( &ts );
+ T_eq_i64( ts.tv_sec, 567993603 );
+ T_eq_u64( ts.tv_nsec, 114978100 );
+
+ /*
+ * Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_realtime_bintime() returns the correct time.
+ */
+ SetCounter( tc, counter );
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567993603 );
+ T_eq_u64( bt.frac, 2120971587975905280 );
+
+ /*
+ * Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_realtime_timeval() returns the correct time.
+ */
+ SetCounter( tc, counter );
+ rtems_clock_get_realtime_timeval( &tv );
+ T_eq_i64( tv.tv_sec, 567993603 );
+ T_eq_long( tv.tv_usec, 114978 );
+
+ /*
+ * Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_monotonic() returns the correct time.
+ */
+ SetCounter( tc, counter );
+ rtems_clock_get_monotonic( &ts );
+ T_eq_i64( ts.tv_sec, 4 );
+ T_eq_u64( ts.tv_nsec, 114978100 );
+
+ /*
+ * Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_monotonic_bintime() returns the correct time.
+ */
+ SetCounter( tc, counter );
+ rtems_clock_get_monotonic_bintime( &bt );
+ T_eq_i64( bt.sec, 4 );
+ T_eq_u64( bt.frac, 2120971587975905280 );
+
+ /*
+ * Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_monotonic_sbintime() returns the correct time.
+ */
+ SetCounter( tc, counter );
+ sb = rtems_clock_get_monotonic_sbintime();
+ T_eq_i64( sb, 17673696364 );
+
+ /*
+ * Prepare the timecounter to get a large time difference. Check that
+ * rtems_clock_get_monotonic_timeval() returns the correct time.
+ */
+ SetCounter( tc, counter );
+ rtems_clock_get_monotonic_timeval( &tv );
+ T_eq_i64( tv.tv_sec, 4 );
+ T_eq_long( tv.tv_usec, 114978 );
+}
+
+/**
+ * @brief Update the oldest timehand after a large time interval.
+ */
+static void ScoreTimecounterValInstall_Action_7( void )
+{
+ Timecounter *tc;
+ struct bintime bt;
+
+ tc = &high_quality_high_frequency;
+
+ SetCounter( tc, 0 );
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567993600 );
+ T_eq_u64( bt.frac, 103079215104 );
+
+ SetCounter( tc, 2 * tc->base.tc_frequency );
+ CallTimecounterTick();
+
+ SetCounter( tc, 2 * tc->base.tc_frequency );
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567993602 );
+ T_eq_u64( bt.frac, 103079215104 );
+}
+
+/**
+ * @brief Call the simple timecounter tick service with non-zero delta and
+ * offset parameter values so that exactly one second passed.
+ */
+static void ScoreTimecounterValInstall_Action_8( void )
+{
+ ISR_lock_Context lock_context;
+ Timecounter *tc;
+ struct bintime bt;
+
+ tc = &high_quality_high_frequency;
+
+ _Timecounter_Acquire( &lock_context );
+ _Timecounter_Tick_simple(
+ tc->base.tc_frequency / 2,
+ GetCounter( tc ) - tc->base.tc_frequency / 2,
+ &lock_context
+ );
+
+ /*
+ * Check that exactly one second passed due to the simple clock tick service.
+ */
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567993603 );
+ T_eq_u64( bt.frac, 103079215104 );
+}
+
+/**
+ * @brief Install a very high quality timecounter with a low frequency to test
+ * the NTP support.
+ */
+static void ScoreTimecounterValInstall_Action_9( void )
+{
+ Timecounter *tc;
+ struct bintime bt;
+
+ tc = &very_high_quality;
+ tc->base.tc_get_timecount = GetTimecount;
+ tc->base.tc_counter_mask = 0xffffffff;
+ tc->base.tc_frequency = 0x01000000;
+ tc->base.tc_quality = RTEMS_TIMECOUNTER_QUALITY_CLOCK_DRIVER + 2;
+ rtems_timecounter_install( &tc->base );
+
+ T_eq_u32( GetCounter( tc ), 1 );
+
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567993603 );
+ T_eq_u64( bt.frac, 1219770712064 );
+
+ /*
+ * Let the seconds value of CLOCK_REALTIME not change. Check that the NTP
+ * update second handler is not called.
+ */
+ _Timecounter_Set_NTP_update_second( NtpUpdateCounter );
+ SetCounter( tc, tc->base.tc_frequency / 2 );
+ CallTimecounterTick();
+ _Timecounter_Set_NTP_update_second( NULL );
+
+ T_eq_u32( ntp_counter, 0 );
+
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567993603 );
+ T_eq_u64( bt.frac, UINT64_C( 9223373256625487872 ) );
+
+ /*
+ * Let the seconds value of CLOCK_REALTIME change by one. Check that the NTP
+ * update second handler is called exactly once.
+ */
+ _Timecounter_Set_NTP_update_second( NtpUpdateCounter );
+ SetCounter( tc, tc->base.tc_frequency );
+ CallTimecounterTick();
+ _Timecounter_Set_NTP_update_second( NULL );
+
+ T_eq_u32( ntp_counter, 1 );
+
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567993604 );
+ T_eq_u64( bt.frac, 1219770712064 );
+
+ /*
+ * Let the seconds value of CLOCK_REALTIME change by 200. Check that the NTP
+ * update second handler is called exactly 200 times.
+ */
+ _Timecounter_Set_NTP_update_second( NtpUpdateCounter );
+ SetCounter( tc, 201 * tc->base.tc_frequency );
+ CallTimecounterTick();
+ _Timecounter_Set_NTP_update_second( NULL );
+
+ T_eq_u32( ntp_counter, 201 );
+
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567993804 );
+ T_eq_u64( bt.frac, 1219770712064 );
+
+ /*
+ * Let the seconds value of CLOCK_REALTIME change by 201. Check that the NTP
+ * update second handler is called exactly twice.
+ */
+ _Timecounter_Set_NTP_update_second( NtpUpdateCounter );
+ SetCounter( tc, 402 * tc->base.tc_frequency );
+ CallTimecounterTick();
+ _Timecounter_Set_NTP_update_second( NULL );
+
+ T_eq_u32( ntp_counter, 203 );
+
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567994005 );
+ T_eq_u64( bt.frac, 1219770712064 );
+
+ /*
+ * Let the seconds value of CLOCK_REALTIME change by one. Check that the NTP
+ * update second handler is incremented the CLOCK_REALTIME by one second.
+ */
+ _Timecounter_Set_NTP_update_second( NtpUpdateSecondIncrement );
+ SetCounter( tc, 403 * tc->base.tc_frequency );
+ CallTimecounterTick();
+ _Timecounter_Set_NTP_update_second( NULL );
+
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567994007 );
+ T_eq_u64( bt.frac, 1219770712064 );
+
+ /*
+ * Let the seconds value of CLOCK_REALTIME change by one. Check that the NTP
+ * update second handler is decremented the CLOCK_REALTIME by one second.
+ */
+ _Timecounter_Set_NTP_update_second( NtpUpdateSecondDecrement );
+ SetCounter( tc, 404 * tc->base.tc_frequency );
+ CallTimecounterTick();
+ _Timecounter_Set_NTP_update_second( NULL );
+
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567994007 );
+ T_eq_u64( bt.frac, 1219770712064 );
+
+ /*
+ * Let the seconds value of CLOCK_REALTIME change by one. Check that the NTP
+ * update second handler increased the timecounter frequency.
+ */
+ _Timecounter_Set_NTP_update_second( NtpUpdateAdjustmentFaster );
+ SetCounter( tc, 405 * tc->base.tc_frequency );
+ CallTimecounterTick();
+ _Timecounter_Set_NTP_update_second( NULL );
+
+ SetCounter( tc, 406 * tc->base.tc_frequency );
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567994009 );
+ T_eq_u64( bt.frac, 92353004044288 );
+
+ /*
+ * Let the seconds value of CLOCK_REALTIME change by one. Check that the NTP
+ * update second handler decreased the timecounter frequency.
+ */
+ _Timecounter_Set_NTP_update_second( NtpUpdateAdjustmentSlower );
+ SetCounter( tc, 407 * tc->base.tc_frequency );
+ CallTimecounterTick();
+ _Timecounter_Set_NTP_update_second( NULL );
+
+ SetCounter( tc, 408 * tc->base.tc_frequency );
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567994011 );
+ T_eq_u64( bt.frac, 92353004044288 );
+}
+
+/**
+ * @fn void T_case_body_ScoreTimecounterValInstall( void )
+ */
+T_TEST_CASE( ScoreTimecounterValInstall )
+{
+ ScoreTimecounterValInstall_Action_0();
+ ScoreTimecounterValInstall_Action_1();
+ ScoreTimecounterValInstall_Action_2();
+ ScoreTimecounterValInstall_Action_3();
+ ScoreTimecounterValInstall_Action_4();
+ ScoreTimecounterValInstall_Action_5();
+ ScoreTimecounterValInstall_Action_6();
+ ScoreTimecounterValInstall_Action_7();
+ ScoreTimecounterValInstall_Action_8();
+ ScoreTimecounterValInstall_Action_9();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timer-cancel.c b/testsuites/validation/tc-timer-cancel.c
new file mode 100644
index 0000000000..3030045e9c
--- /dev/null
+++ b/testsuites/validation/tc-timer-cancel.c
@@ -0,0 +1,813 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTimerReqCancel
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTimerReqCancel spec:/rtems/timer/req/cancel
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTimerReqCancel_Pre_Id_Valid,
+ RtemsTimerReqCancel_Pre_Id_Invalid,
+ RtemsTimerReqCancel_Pre_Id_NA
+} RtemsTimerReqCancel_Pre_Id;
+
+typedef enum {
+ RtemsTimerReqCancel_Pre_Context_None,
+ RtemsTimerReqCancel_Pre_Context_Interrupt,
+ RtemsTimerReqCancel_Pre_Context_Server,
+ RtemsTimerReqCancel_Pre_Context_NA
+} RtemsTimerReqCancel_Pre_Context;
+
+typedef enum {
+ RtemsTimerReqCancel_Pre_Clock_None,
+ RtemsTimerReqCancel_Pre_Clock_Ticks,
+ RtemsTimerReqCancel_Pre_Clock_Realtime,
+ RtemsTimerReqCancel_Pre_Clock_NA
+} RtemsTimerReqCancel_Pre_Clock;
+
+typedef enum {
+ RtemsTimerReqCancel_Pre_State_Inactive,
+ RtemsTimerReqCancel_Pre_State_Scheduled,
+ RtemsTimerReqCancel_Pre_State_Pending,
+ RtemsTimerReqCancel_Pre_State_NA
+} RtemsTimerReqCancel_Pre_State;
+
+typedef enum {
+ RtemsTimerReqCancel_Post_Status_Ok,
+ RtemsTimerReqCancel_Post_Status_InvId,
+ RtemsTimerReqCancel_Post_Status_NA
+} RtemsTimerReqCancel_Post_Status;
+
+typedef enum {
+ RtemsTimerReqCancel_Post_Context_None,
+ RtemsTimerReqCancel_Post_Context_Interrupt,
+ RtemsTimerReqCancel_Post_Context_Server,
+ RtemsTimerReqCancel_Post_Context_Nop,
+ RtemsTimerReqCancel_Post_Context_NA
+} RtemsTimerReqCancel_Post_Context;
+
+typedef enum {
+ RtemsTimerReqCancel_Post_Clock_None,
+ RtemsTimerReqCancel_Post_Clock_Ticks,
+ RtemsTimerReqCancel_Post_Clock_Realtime,
+ RtemsTimerReqCancel_Post_Clock_Nop,
+ RtemsTimerReqCancel_Post_Clock_NA
+} RtemsTimerReqCancel_Post_Clock;
+
+typedef enum {
+ RtemsTimerReqCancel_Post_State_Inactive,
+ RtemsTimerReqCancel_Post_State_Nop,
+ RtemsTimerReqCancel_Post_State_NA
+} RtemsTimerReqCancel_Post_State;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_Context_NA : 1;
+ uint16_t Pre_Clock_NA : 1;
+ uint16_t Pre_State_NA : 1;
+ uint16_t Post_Status : 2;
+ uint16_t Post_Context : 3;
+ uint16_t Post_Clock : 3;
+ uint16_t Post_State : 2;
+} RtemsTimerReqCancel_Entry;
+
+typedef enum {
+ PRE_NONE = 0,
+ PRE_INTERRUPT = 1,
+ PRE_SERVER = 2
+} PreConditionContext;
+
+/**
+ * @brief Test context for spec:/rtems/timer/req/cancel test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a valid id of a timer.
+ */
+ rtems_id timer_id;
+
+ /**
+ * @brief This member specifies the ``id`` parameter for the action.
+ */
+ rtems_id id_param;
+
+ /**
+ * @brief This member contains the return status of the action.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member contains the counter for invocations of the Timer
+ * Service Routine.
+ */
+ int invocations;
+
+ /**
+ * @brief This member specifies which pre-condition context (none, interrupt
+ * context, server context) must be created before the cancel action gets
+ * executed.
+ */
+ PreConditionContext pre_cond_contex;
+
+ /**
+ * @brief This member stores RTEMS internal clock and context settings of the
+ * timer before the execution of the test action.
+ */
+ Timer_Classes pre_class;
+
+ /**
+ * @brief This member stores the state of the timer before the execution of
+ * the test action.
+ */
+ Timer_States pre_state;
+
+ /**
+ * @brief This member stores the state of the timer after the execution of
+ * the test action.
+ */
+ Timer_States post_state;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 4 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTimerReqCancel_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTimerReqCancel_Context;
+
+static RtemsTimerReqCancel_Context
+ RtemsTimerReqCancel_Instance;
+
+static const char * const RtemsTimerReqCancel_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTimerReqCancel_PreDesc_Context[] = {
+ "None",
+ "Interrupt",
+ "Server",
+ "NA"
+};
+
+static const char * const RtemsTimerReqCancel_PreDesc_Clock[] = {
+ "None",
+ "Ticks",
+ "Realtime",
+ "NA"
+};
+
+static const char * const RtemsTimerReqCancel_PreDesc_State[] = {
+ "Inactive",
+ "Scheduled",
+ "Pending",
+ "NA"
+};
+
+static const char * const * const RtemsTimerReqCancel_PreDesc[] = {
+ RtemsTimerReqCancel_PreDesc_Id,
+ RtemsTimerReqCancel_PreDesc_Context,
+ RtemsTimerReqCancel_PreDesc_Clock,
+ RtemsTimerReqCancel_PreDesc_State,
+ NULL
+};
+
+static const rtems_time_of_day tod_now = { 2000, 1, 1, 0, 0, 0, 0 };
+static const rtems_time_of_day tod_schedule = { 2000, 1, 1, 1, 0, 0, 0 };
+static const rtems_time_of_day tod_fire = { 2000, 1, 2, 0, 0, 0, 0 };
+
+static void TriggerTimer( void )
+{
+ /* Fire the timer service routine for ticks and realtime clock */
+ int i;
+ for ( i = 0; i < 5; i++ ) {
+ ClockTick();
+ }
+ T_rsc_success( rtems_clock_set( &tod_fire ) );
+}
+
+static void TimerServiceRoutine(
+ rtems_id timer_id,
+ void *user_data
+)
+{
+ RtemsTimerReqCancel_Context *ctx = user_data;
+ ++( ctx->invocations );
+}
+
+static void RtemsTimerReqCancel_Pre_Id_Prepare(
+ RtemsTimerReqCancel_Context *ctx,
+ RtemsTimerReqCancel_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqCancel_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is valid.
+ */
+ ctx->id_param = ctx->timer_id;
+ break;
+ }
+
+ case RtemsTimerReqCancel_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id_param = RTEMS_ID_NONE;
+ break;
+ }
+
+ case RtemsTimerReqCancel_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCancel_Pre_Context_Prepare(
+ RtemsTimerReqCancel_Context *ctx,
+ RtemsTimerReqCancel_Pre_Context state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqCancel_Pre_Context_None: {
+ /*
+ * While the Timer Service Routine has never been scheduled since
+ * creation of the timer. See also none.
+ */
+ ctx->pre_cond_contex = PRE_NONE;
+ break;
+ }
+
+ case RtemsTimerReqCancel_Pre_Context_Interrupt: {
+ /*
+ * While the timer is in interrupt context.
+ */
+ ctx->pre_cond_contex = PRE_INTERRUPT;
+ break;
+ }
+
+ case RtemsTimerReqCancel_Pre_Context_Server: {
+ /*
+ * While the timer is in server context.
+ */
+ ctx->pre_cond_contex = PRE_SERVER;
+ break;
+ }
+
+ case RtemsTimerReqCancel_Pre_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCancel_Pre_Clock_Prepare(
+ RtemsTimerReqCancel_Context *ctx,
+ RtemsTimerReqCancel_Pre_Clock state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqCancel_Pre_Clock_None: {
+ /*
+ * While the timer has never been scheduled since creation of the timer.
+ */
+ T_eq_int( ctx->pre_cond_contex, PRE_NONE );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Pre_Clock_Ticks: {
+ /*
+ * While the clock used to determine when the timer will fire is the
+ * ticks based clock.
+ */
+ rtems_status_code status;
+
+ if ( ctx->pre_cond_contex == PRE_INTERRUPT ) {
+ status = rtems_timer_fire_after(
+ ctx->timer_id,
+ 1,
+ TimerServiceRoutine,
+ ctx
+ );
+ } else {
+ status = rtems_timer_server_fire_after(
+ ctx->timer_id,
+ 1,
+ TimerServiceRoutine,
+ ctx
+ );
+ }
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Pre_Clock_Realtime: {
+ /*
+ * While the clock used to determine when the timer will fire is the
+ * realtime clock.
+ */
+ rtems_status_code status;
+
+ if ( ctx->pre_cond_contex == PRE_INTERRUPT ) {
+ status = rtems_timer_fire_when(
+ ctx->timer_id,
+ &tod_schedule,
+ TimerServiceRoutine,
+ ctx
+ );
+ } else {
+ status = rtems_timer_server_fire_when(
+ ctx->timer_id,
+ &tod_schedule,
+ TimerServiceRoutine,
+ ctx
+ );
+ }
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Pre_Clock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCancel_Pre_State_Prepare(
+ RtemsTimerReqCancel_Context *ctx,
+ RtemsTimerReqCancel_Pre_State state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqCancel_Pre_State_Inactive: {
+ /*
+ * While the timer is in inactive state.
+ */
+ TriggerTimer();
+ T_eq_int(
+ ctx->invocations,
+ ( ctx->pre_cond_contex == PRE_NONE ) ? 0 : 1
+ );
+ ctx->invocations = 0;
+ ctx->pre_state = TIMER_INACTIVE;
+ break;
+ }
+
+ case RtemsTimerReqCancel_Pre_State_Scheduled: {
+ /*
+ * While the timer is in scheduled state.
+ */
+ /* The timer was already scheduled in the "Clock" pre-conditions. */
+ ctx->pre_state = TIMER_SCHEDULED;
+ break;
+ }
+
+ case RtemsTimerReqCancel_Pre_State_Pending: {
+ /*
+ * While the timer is in pending state.
+ */
+ T_rsc_success( rtems_task_suspend( GetTimerServerTaskId() ) );
+ TriggerTimer();
+ T_eq_int( ctx->invocations, 0 );
+ ctx->pre_state = TIMER_PENDING;
+ break;
+ }
+
+ case RtemsTimerReqCancel_Pre_State_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCancel_Post_Status_Check(
+ RtemsTimerReqCancel_Context *ctx,
+ RtemsTimerReqCancel_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqCancel_Post_Status_Ok: {
+ /*
+ * The return status of rtems_timer_cancel() shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Post_Status_InvId: {
+ /*
+ * The return status of rtems_timer_cancel() shall be RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCancel_Post_Context_Check(
+ RtemsTimerReqCancel_Context *ctx,
+ RtemsTimerReqCancel_Post_Context state
+)
+{
+ Timer_Classes class;
+ class = GetTimerClass( ctx->timer_id );
+
+ switch ( state ) {
+ case RtemsTimerReqCancel_Post_Context_None: {
+ /*
+ * The timer shall have never been scheduled. See also none.
+ */
+ T_eq_int( class, TIMER_DORMANT );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Post_Context_Interrupt: {
+ /*
+ * The timer shall be in interrupt context.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, 0 );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Post_Context_Server: {
+ /*
+ * The timer shall be in server context.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, TIMER_CLASS_BIT_ON_TASK );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Post_Context_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past call to
+ * rtems_timer_cancel() shall not be accessed by the rtems_timer_cancel()
+ * call. See also Nop.
+ */
+ T_eq_int( class, ctx->pre_class );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Post_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCancel_Post_Clock_Check(
+ RtemsTimerReqCancel_Context *ctx,
+ RtemsTimerReqCancel_Post_Clock state
+)
+{
+ Timer_Classes class;
+ class = GetTimerClass( ctx->timer_id );
+
+ switch ( state ) {
+ case RtemsTimerReqCancel_Post_Clock_None: {
+ /*
+ * The timer shall have never been scheduled.
+ */
+ T_eq_int( class, TIMER_DORMANT );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Post_Clock_Ticks: {
+ /*
+ * The timer shall use the ticks based clock.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_TIME_OF_DAY, 0 );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Post_Clock_Realtime: {
+ /*
+ * The timer shall use the realtime clock.
+ */
+ T_eq_int(
+ class & TIMER_CLASS_BIT_TIME_OF_DAY,
+ TIMER_CLASS_BIT_TIME_OF_DAY
+ );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Post_Clock_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past call to
+ * rtems_timer_cancel() shall not be accessed by the rtems_timer_cancel()
+ * call.
+ */
+ T_eq_int( class, ctx->pre_class );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Post_Clock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCancel_Post_State_Check(
+ RtemsTimerReqCancel_Context *ctx,
+ RtemsTimerReqCancel_Post_State state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqCancel_Post_State_Inactive: {
+ /*
+ * The timer shall be in inactive state.
+ */
+ /* Try to fire the timer service routine - which should not fire. */
+ TriggerTimer();
+ T_eq_int( ctx->invocations, 0 );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Post_State_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past call to
+ * rtems_timer_cancel() shall not be accessed by the rtems_timer_cancel()
+ * call.
+ */
+ T_eq_int( ctx->post_state, ctx->pre_state );
+ break;
+ }
+
+ case RtemsTimerReqCancel_Post_State_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCancel_Setup( RtemsTimerReqCancel_Context *ctx )
+{
+ rtems_status_code status;
+ status = rtems_timer_initiate_server(
+ RTEMS_TIMER_SERVER_DEFAULT_PRIORITY,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_ATTRIBUTES
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsTimerReqCancel_Setup_Wrap( void *arg )
+{
+ RtemsTimerReqCancel_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqCancel_Setup( ctx );
+}
+
+/**
+ * @brief Make sure the timer server is not running and the realtime clock is
+ * not set after this test.
+ */
+static void RtemsTimerReqCancel_Teardown( RtemsTimerReqCancel_Context *ctx )
+{
+ DeleteTimerServer();
+ UnsetClock();
+}
+
+static void RtemsTimerReqCancel_Teardown_Wrap( void *arg )
+{
+ RtemsTimerReqCancel_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqCancel_Teardown( ctx );
+}
+
+static void RtemsTimerReqCancel_Prepare( RtemsTimerReqCancel_Context *ctx )
+{
+ rtems_status_code status;
+ status = rtems_timer_create(
+ rtems_build_name( 'T', 'I', 'M', 'E' ),
+ &ctx->timer_id
+ );
+ T_rsc_success( status );
+
+ ctx->invocations = 0;
+ T_rsc_success( rtems_clock_set( &tod_now ) );
+}
+
+static void RtemsTimerReqCancel_Action( RtemsTimerReqCancel_Context *ctx )
+{
+ ctx->pre_class = GetTimerClass( ctx->timer_id );
+ ctx->status = rtems_timer_cancel( ctx->id_param );
+ ctx->post_state = GetTimerState( ctx->timer_id );
+ /* Ignoring return status: the timer server task may be suspended or not. */
+ rtems_task_resume( GetTimerServerTaskId() );
+}
+
+static void RtemsTimerReqCancel_Cleanup( RtemsTimerReqCancel_Context *ctx )
+{
+ T_rsc_success( rtems_timer_delete( ctx->timer_id ) );
+}
+
+static const RtemsTimerReqCancel_Entry
+RtemsTimerReqCancel_Entries[] = {
+ { 1, 0, 0, 0, 0, RtemsTimerReqCancel_Post_Status_NA,
+ RtemsTimerReqCancel_Post_Context_NA, RtemsTimerReqCancel_Post_Clock_NA,
+ RtemsTimerReqCancel_Post_State_NA },
+ { 0, 0, 0, 0, 0, RtemsTimerReqCancel_Post_Status_InvId,
+ RtemsTimerReqCancel_Post_Context_Nop, RtemsTimerReqCancel_Post_Clock_Nop,
+ RtemsTimerReqCancel_Post_State_Nop },
+ { 0, 0, 0, 0, 0, RtemsTimerReqCancel_Post_Status_Ok,
+ RtemsTimerReqCancel_Post_Context_Server,
+ RtemsTimerReqCancel_Post_Clock_Ticks,
+ RtemsTimerReqCancel_Post_State_Inactive },
+ { 0, 0, 0, 0, 0, RtemsTimerReqCancel_Post_Status_Ok,
+ RtemsTimerReqCancel_Post_Context_Server,
+ RtemsTimerReqCancel_Post_Clock_Realtime,
+ RtemsTimerReqCancel_Post_State_Inactive },
+ { 0, 0, 0, 0, 0, RtemsTimerReqCancel_Post_Status_Ok,
+ RtemsTimerReqCancel_Post_Context_Interrupt,
+ RtemsTimerReqCancel_Post_Clock_Ticks,
+ RtemsTimerReqCancel_Post_State_Inactive },
+ { 0, 0, 0, 0, 0, RtemsTimerReqCancel_Post_Status_Ok,
+ RtemsTimerReqCancel_Post_Context_Interrupt,
+ RtemsTimerReqCancel_Post_Clock_Realtime,
+ RtemsTimerReqCancel_Post_State_Inactive },
+ { 0, 0, 0, 0, 0, RtemsTimerReqCancel_Post_Status_Ok,
+ RtemsTimerReqCancel_Post_Context_None, RtemsTimerReqCancel_Post_Clock_None,
+ RtemsTimerReqCancel_Post_State_Inactive }
+};
+
+static const uint8_t
+RtemsTimerReqCancel_Map[] = {
+ 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 5, 5, 0, 0, 0, 0, 2, 2, 2, 3, 3,
+ 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,
+ 1, 1
+};
+
+static size_t RtemsTimerReqCancel_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTimerReqCancel_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTimerReqCancel_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTimerReqCancel_Fixture = {
+ .setup = RtemsTimerReqCancel_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTimerReqCancel_Teardown_Wrap,
+ .scope = RtemsTimerReqCancel_Scope,
+ .initial_context = &RtemsTimerReqCancel_Instance
+};
+
+static inline RtemsTimerReqCancel_Entry RtemsTimerReqCancel_PopEntry(
+ RtemsTimerReqCancel_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTimerReqCancel_Entries[
+ RtemsTimerReqCancel_Map[ index ]
+ ];
+}
+
+static void RtemsTimerReqCancel_TestVariant( RtemsTimerReqCancel_Context *ctx )
+{
+ RtemsTimerReqCancel_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTimerReqCancel_Pre_Context_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTimerReqCancel_Pre_Clock_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTimerReqCancel_Pre_State_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTimerReqCancel_Action( ctx );
+ RtemsTimerReqCancel_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTimerReqCancel_Post_Context_Check( ctx, ctx->Map.entry.Post_Context );
+ RtemsTimerReqCancel_Post_Clock_Check( ctx, ctx->Map.entry.Post_Clock );
+ RtemsTimerReqCancel_Post_State_Check( ctx, ctx->Map.entry.Post_State );
+}
+
+/**
+ * @fn void T_case_body_RtemsTimerReqCancel( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTimerReqCancel, &RtemsTimerReqCancel_Fixture )
+{
+ RtemsTimerReqCancel_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTimerReqCancel_Pre_Id_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsTimerReqCancel_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTimerReqCancel_Pre_Context_None;
+ ctx->Map.pcs[ 1 ] < RtemsTimerReqCancel_Pre_Context_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsTimerReqCancel_Pre_Clock_None;
+ ctx->Map.pcs[ 2 ] < RtemsTimerReqCancel_Pre_Clock_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsTimerReqCancel_Pre_State_Inactive;
+ ctx->Map.pcs[ 3 ] < RtemsTimerReqCancel_Pre_State_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ ctx->Map.entry = RtemsTimerReqCancel_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsTimerReqCancel_Prepare( ctx );
+ RtemsTimerReqCancel_TestVariant( ctx );
+ RtemsTimerReqCancel_Cleanup( ctx );
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timer-create.c b/testsuites/validation/tc-timer-create.c
new file mode 100644
index 0000000000..416f5401d0
--- /dev/null
+++ b/testsuites/validation/tc-timer-create.c
@@ -0,0 +1,535 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTimerReqCreate
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTimerReqCreate spec:/rtems/timer/req/create
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTimerReqCreate_Pre_Name_Valid,
+ RtemsTimerReqCreate_Pre_Name_Invalid,
+ RtemsTimerReqCreate_Pre_Name_NA
+} RtemsTimerReqCreate_Pre_Name;
+
+typedef enum {
+ RtemsTimerReqCreate_Pre_Id_Valid,
+ RtemsTimerReqCreate_Pre_Id_Null,
+ RtemsTimerReqCreate_Pre_Id_NA
+} RtemsTimerReqCreate_Pre_Id;
+
+typedef enum {
+ RtemsTimerReqCreate_Pre_Free_Yes,
+ RtemsTimerReqCreate_Pre_Free_No,
+ RtemsTimerReqCreate_Pre_Free_NA
+} RtemsTimerReqCreate_Pre_Free;
+
+typedef enum {
+ RtemsTimerReqCreate_Post_Status_Ok,
+ RtemsTimerReqCreate_Post_Status_InvName,
+ RtemsTimerReqCreate_Post_Status_InvAddr,
+ RtemsTimerReqCreate_Post_Status_TooMany,
+ RtemsTimerReqCreate_Post_Status_NA
+} RtemsTimerReqCreate_Post_Status;
+
+typedef enum {
+ RtemsTimerReqCreate_Post_Name_Valid,
+ RtemsTimerReqCreate_Post_Name_Invalid,
+ RtemsTimerReqCreate_Post_Name_NA
+} RtemsTimerReqCreate_Post_Name;
+
+typedef enum {
+ RtemsTimerReqCreate_Post_IdVar_Set,
+ RtemsTimerReqCreate_Post_IdVar_Nop,
+ RtemsTimerReqCreate_Post_IdVar_NA
+} RtemsTimerReqCreate_Post_IdVar;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Name_NA : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_Free_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_Name : 2;
+ uint16_t Post_IdVar : 2;
+} RtemsTimerReqCreate_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/timer/req/create test case.
+ */
+typedef struct {
+ /**
+ * @brief This member is used by the T_seize_objects() and
+ * T_surrender_objects() support functions.
+ */
+ void *seized_objects;
+
+ /**
+ * @brief This member may contain the object identifier returned by
+ * rtems_timer_create().
+ */
+ rtems_id id_value;
+
+ /**
+ * @brief This member specifies the ``name`` parameter for the action.
+ */
+ rtems_name name;
+
+ /**
+ * @brief This member specifies the ``id`` parameter for the action.
+ */
+ rtems_id *id;
+
+ /**
+ * @brief This member contains the return status of the action.
+ */
+ rtems_status_code status;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTimerReqCreate_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTimerReqCreate_Context;
+
+static RtemsTimerReqCreate_Context
+ RtemsTimerReqCreate_Instance;
+
+static const char * const RtemsTimerReqCreate_PreDesc_Name[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTimerReqCreate_PreDesc_Id[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsTimerReqCreate_PreDesc_Free[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsTimerReqCreate_PreDesc[] = {
+ RtemsTimerReqCreate_PreDesc_Name,
+ RtemsTimerReqCreate_PreDesc_Id,
+ RtemsTimerReqCreate_PreDesc_Free,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+static rtems_status_code Create( void *arg, uint32_t *id )
+{
+ return rtems_timer_create( rtems_build_name( 'S', 'I', 'Z', 'E' ), id );
+}
+
+static void RtemsTimerReqCreate_Pre_Name_Prepare(
+ RtemsTimerReqCreate_Context *ctx,
+ RtemsTimerReqCreate_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqCreate_Pre_Name_Valid: {
+ /*
+ * While the ``name`` parameter is valid.
+ */
+ ctx->name = NAME;
+ break;
+ }
+
+ case RtemsTimerReqCreate_Pre_Name_Invalid: {
+ /*
+ * While the ``name`` parameter is invalid.
+ */
+ ctx->name = 0;
+ break;
+ }
+
+ case RtemsTimerReqCreate_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCreate_Pre_Id_Prepare(
+ RtemsTimerReqCreate_Context *ctx,
+ RtemsTimerReqCreate_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqCreate_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter references an object of type rtems_id.
+ */
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsTimerReqCreate_Pre_Id_Null: {
+ /*
+ * While the ``id`` parameter is NULL.
+ */
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsTimerReqCreate_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCreate_Pre_Free_Prepare(
+ RtemsTimerReqCreate_Context *ctx,
+ RtemsTimerReqCreate_Pre_Free state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqCreate_Pre_Free_Yes: {
+ /*
+ * While the system has at least one inactive timer object available.
+ */
+ /* Ensured by the test suite configuration */
+ break;
+ }
+
+ case RtemsTimerReqCreate_Pre_Free_No: {
+ /*
+ * While the system has no inactive timer object available.
+ */
+ ctx->seized_objects = T_seize_objects( Create, NULL );
+ break;
+ }
+
+ case RtemsTimerReqCreate_Pre_Free_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCreate_Post_Status_Check(
+ RtemsTimerReqCreate_Context *ctx,
+ RtemsTimerReqCreate_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqCreate_Post_Status_Ok: {
+ /*
+ * The return status of rtems_timer_create() shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTimerReqCreate_Post_Status_InvName: {
+ /*
+ * The return status of rtems_timer_create() shall be RTEMS_INVALID_NAME.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsTimerReqCreate_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_timer_create() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTimerReqCreate_Post_Status_TooMany: {
+ /*
+ * The return status of rtems_timer_create() shall be RTEMS_TOO_MANY.
+ */
+ T_rsc( ctx->status, RTEMS_TOO_MANY );
+ break;
+ }
+
+ case RtemsTimerReqCreate_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCreate_Post_Name_Check(
+ RtemsTimerReqCreate_Context *ctx,
+ RtemsTimerReqCreate_Post_Name state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ switch ( state ) {
+ case RtemsTimerReqCreate_Post_Name_Valid: {
+ /*
+ * The unique object name shall identify the timer created by the
+ * rtems_timer_create() call.
+ */
+ id = 0;
+ sc = rtems_timer_ident( NAME, &id );
+ T_rsc_success( sc );
+ T_eq_u32( id, ctx->id_value );
+ break;
+ }
+
+ case RtemsTimerReqCreate_Post_Name_Invalid: {
+ /*
+ * The unique object name shall not identify a timer.
+ */
+ sc = rtems_timer_ident( NAME, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsTimerReqCreate_Post_Name_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCreate_Post_IdVar_Check(
+ RtemsTimerReqCreate_Context *ctx,
+ RtemsTimerReqCreate_Post_IdVar state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqCreate_Post_IdVar_Set: {
+ /*
+ * The value of the object referenced by the ``id`` parameter shall be
+ * set to the object identifier of the created timer after the return of
+ * the rtems_timer_create() call.
+ */
+ T_eq_ptr( ctx->id, &ctx->id_value );
+ T_ne_u32( ctx->id_value, INVALID_ID );
+ break;
+ }
+
+ case RtemsTimerReqCreate_Post_IdVar_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past calls to
+ * rtems_timer_create() shall not be accessed by the rtems_timer_create()
+ * call.
+ */
+ T_eq_u32( ctx->id_value, INVALID_ID );
+ break;
+ }
+
+ case RtemsTimerReqCreate_Post_IdVar_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqCreate_Setup( RtemsTimerReqCreate_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->id_value = INVALID_ID;
+}
+
+static void RtemsTimerReqCreate_Setup_Wrap( void *arg )
+{
+ RtemsTimerReqCreate_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqCreate_Setup( ctx );
+}
+
+static void RtemsTimerReqCreate_Action( RtemsTimerReqCreate_Context *ctx )
+{
+ ctx->status = rtems_timer_create( ctx->name, ctx->id );
+}
+
+static void RtemsTimerReqCreate_Cleanup( RtemsTimerReqCreate_Context *ctx )
+{
+ if ( ctx->id_value != INVALID_ID ) {
+ rtems_status_code sc;
+
+ sc = rtems_timer_delete( ctx->id_value );
+ T_rsc_success( sc );
+
+ ctx->id_value = INVALID_ID;
+ }
+
+ T_surrender_objects( &ctx->seized_objects, rtems_timer_delete );
+}
+
+static const RtemsTimerReqCreate_Entry
+RtemsTimerReqCreate_Entries[] = {
+ { 0, 0, 0, 0, RtemsTimerReqCreate_Post_Status_InvName,
+ RtemsTimerReqCreate_Post_Name_Invalid, RtemsTimerReqCreate_Post_IdVar_Nop },
+ { 0, 0, 0, 0, RtemsTimerReqCreate_Post_Status_InvAddr,
+ RtemsTimerReqCreate_Post_Name_Invalid, RtemsTimerReqCreate_Post_IdVar_Nop },
+ { 0, 0, 0, 0, RtemsTimerReqCreate_Post_Status_Ok,
+ RtemsTimerReqCreate_Post_Name_Valid, RtemsTimerReqCreate_Post_IdVar_Set },
+ { 0, 0, 0, 0, RtemsTimerReqCreate_Post_Status_TooMany,
+ RtemsTimerReqCreate_Post_Name_Invalid, RtemsTimerReqCreate_Post_IdVar_Nop }
+};
+
+static const uint8_t
+RtemsTimerReqCreate_Map[] = {
+ 2, 3, 1, 1, 0, 0, 0, 0
+};
+
+static size_t RtemsTimerReqCreate_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTimerReqCreate_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTimerReqCreate_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTimerReqCreate_Fixture = {
+ .setup = RtemsTimerReqCreate_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsTimerReqCreate_Scope,
+ .initial_context = &RtemsTimerReqCreate_Instance
+};
+
+static inline RtemsTimerReqCreate_Entry RtemsTimerReqCreate_PopEntry(
+ RtemsTimerReqCreate_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTimerReqCreate_Entries[
+ RtemsTimerReqCreate_Map[ index ]
+ ];
+}
+
+static void RtemsTimerReqCreate_TestVariant( RtemsTimerReqCreate_Context *ctx )
+{
+ RtemsTimerReqCreate_Pre_Name_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTimerReqCreate_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTimerReqCreate_Pre_Free_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTimerReqCreate_Action( ctx );
+ RtemsTimerReqCreate_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTimerReqCreate_Post_Name_Check( ctx, ctx->Map.entry.Post_Name );
+ RtemsTimerReqCreate_Post_IdVar_Check( ctx, ctx->Map.entry.Post_IdVar );
+}
+
+/**
+ * @fn void T_case_body_RtemsTimerReqCreate( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTimerReqCreate, &RtemsTimerReqCreate_Fixture )
+{
+ RtemsTimerReqCreate_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTimerReqCreate_Pre_Name_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsTimerReqCreate_Pre_Name_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTimerReqCreate_Pre_Id_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsTimerReqCreate_Pre_Id_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsTimerReqCreate_Pre_Free_Yes;
+ ctx->Map.pcs[ 2 ] < RtemsTimerReqCreate_Pre_Free_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ ctx->Map.entry = RtemsTimerReqCreate_PopEntry( ctx );
+ RtemsTimerReqCreate_TestVariant( ctx );
+ RtemsTimerReqCreate_Cleanup( ctx );
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timer-delete.c b/testsuites/validation/tc-timer-delete.c
new file mode 100644
index 0000000000..84999c5ae7
--- /dev/null
+++ b/testsuites/validation/tc-timer-delete.c
@@ -0,0 +1,362 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTimerReqDelete
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTimerReqDelete spec:/rtems/timer/req/delete
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTimerReqDelete_Pre_Id_NoObj,
+ RtemsTimerReqDelete_Pre_Id_Timer,
+ RtemsTimerReqDelete_Pre_Id_NA
+} RtemsTimerReqDelete_Pre_Id;
+
+typedef enum {
+ RtemsTimerReqDelete_Post_Status_Ok,
+ RtemsTimerReqDelete_Post_Status_InvId,
+ RtemsTimerReqDelete_Post_Status_NA
+} RtemsTimerReqDelete_Post_Status;
+
+typedef enum {
+ RtemsTimerReqDelete_Post_Name_Valid,
+ RtemsTimerReqDelete_Post_Name_Invalid,
+ RtemsTimerReqDelete_Post_Name_NA
+} RtemsTimerReqDelete_Post_Name;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_Name : 2;
+} RtemsTimerReqDelete_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/timer/req/delete test case.
+ */
+typedef struct {
+ rtems_id timer_id;
+
+ rtems_id id;
+
+ rtems_status_code status;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTimerReqDelete_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTimerReqDelete_Context;
+
+static RtemsTimerReqDelete_Context
+ RtemsTimerReqDelete_Instance;
+
+static const char * const RtemsTimerReqDelete_PreDesc_Id[] = {
+ "NoObj",
+ "Timer",
+ "NA"
+};
+
+static const char * const * const RtemsTimerReqDelete_PreDesc[] = {
+ RtemsTimerReqDelete_PreDesc_Id,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+static void RtemsTimerReqDelete_Pre_Id_Prepare(
+ RtemsTimerReqDelete_Context *ctx,
+ RtemsTimerReqDelete_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqDelete_Pre_Id_NoObj: {
+ /*
+ * While the ``id`` parameter is not associated with a timer.
+ */
+ ctx->id = 0;
+ break;
+ }
+
+ case RtemsTimerReqDelete_Pre_Id_Timer: {
+ /*
+ * While the ``id`` parameter is associated with a timer.
+ */
+ ctx->id = ctx->timer_id;
+ break;
+ }
+
+ case RtemsTimerReqDelete_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqDelete_Post_Status_Check(
+ RtemsTimerReqDelete_Context *ctx,
+ RtemsTimerReqDelete_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqDelete_Post_Status_Ok: {
+ /*
+ * The return status of rtems_timer_delete() shall be RTEMS_SUCCESSFUL.
+ */
+ ctx->timer_id = 0;
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTimerReqDelete_Post_Status_InvId: {
+ /*
+ * The return status of rtems_timer_delete() shall be RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTimerReqDelete_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqDelete_Post_Name_Check(
+ RtemsTimerReqDelete_Context *ctx,
+ RtemsTimerReqDelete_Post_Name state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ switch ( state ) {
+ case RtemsTimerReqDelete_Post_Name_Valid: {
+ /*
+ * The unique object name shall identify a timer.
+ */
+ id = 0;
+ sc = rtems_timer_ident( NAME, &id );
+ T_rsc_success( sc );
+ T_eq_u32( id, ctx->timer_id );
+ break;
+ }
+
+ case RtemsTimerReqDelete_Post_Name_Invalid: {
+ /*
+ * The unique object name shall not identify a timer.
+ */
+ sc = rtems_timer_ident( NAME, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsTimerReqDelete_Post_Name_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqDelete_Setup( RtemsTimerReqDelete_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+}
+
+static void RtemsTimerReqDelete_Setup_Wrap( void *arg )
+{
+ RtemsTimerReqDelete_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqDelete_Setup( ctx );
+}
+
+static void RtemsTimerReqDelete_Teardown( RtemsTimerReqDelete_Context *ctx )
+{
+ if ( ctx->timer_id != 0 ) {
+ rtems_status_code sc;
+
+ sc = rtems_timer_delete( ctx->timer_id );
+ T_rsc_success( sc );
+ }
+}
+
+static void RtemsTimerReqDelete_Teardown_Wrap( void *arg )
+{
+ RtemsTimerReqDelete_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqDelete_Teardown( ctx );
+}
+
+static void RtemsTimerReqDelete_Prepare( RtemsTimerReqDelete_Context *ctx )
+{
+ if ( ctx->timer_id == 0 ) {
+ rtems_status_code sc;
+
+ sc = rtems_timer_create( NAME, &ctx->timer_id );
+ T_rsc_success( sc );
+ }
+}
+
+static void RtemsTimerReqDelete_Action( RtemsTimerReqDelete_Context *ctx )
+{
+ ctx->status = rtems_timer_delete( ctx->id );
+}
+
+static const RtemsTimerReqDelete_Entry
+RtemsTimerReqDelete_Entries[] = {
+ { 0, 0, RtemsTimerReqDelete_Post_Status_InvId,
+ RtemsTimerReqDelete_Post_Name_Valid },
+ { 0, 0, RtemsTimerReqDelete_Post_Status_Ok,
+ RtemsTimerReqDelete_Post_Name_Invalid }
+};
+
+static const uint8_t
+RtemsTimerReqDelete_Map[] = {
+ 0, 1
+};
+
+static size_t RtemsTimerReqDelete_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTimerReqDelete_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTimerReqDelete_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTimerReqDelete_Fixture = {
+ .setup = RtemsTimerReqDelete_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTimerReqDelete_Teardown_Wrap,
+ .scope = RtemsTimerReqDelete_Scope,
+ .initial_context = &RtemsTimerReqDelete_Instance
+};
+
+static inline RtemsTimerReqDelete_Entry RtemsTimerReqDelete_PopEntry(
+ RtemsTimerReqDelete_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTimerReqDelete_Entries[
+ RtemsTimerReqDelete_Map[ index ]
+ ];
+}
+
+static void RtemsTimerReqDelete_TestVariant( RtemsTimerReqDelete_Context *ctx )
+{
+ RtemsTimerReqDelete_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTimerReqDelete_Action( ctx );
+ RtemsTimerReqDelete_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTimerReqDelete_Post_Name_Check( ctx, ctx->Map.entry.Post_Name );
+}
+
+/**
+ * @fn void T_case_body_RtemsTimerReqDelete( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTimerReqDelete, &RtemsTimerReqDelete_Fixture )
+{
+ RtemsTimerReqDelete_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTimerReqDelete_Pre_Id_NoObj;
+ ctx->Map.pcs[ 0 ] < RtemsTimerReqDelete_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = RtemsTimerReqDelete_PopEntry( ctx );
+ RtemsTimerReqDelete_Prepare( ctx );
+ RtemsTimerReqDelete_TestVariant( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timer-fire-after.c b/testsuites/validation/tc-timer-fire-after.c
new file mode 100644
index 0000000000..27c27523cb
--- /dev/null
+++ b/testsuites/validation/tc-timer-fire-after.c
@@ -0,0 +1,1161 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTimerReqFireAfter
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTimerReqFireAfter spec:/rtems/timer/req/fire-after
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTimerReqFireAfter_Pre_Ticks_Valid,
+ RtemsTimerReqFireAfter_Pre_Ticks_Is0,
+ RtemsTimerReqFireAfter_Pre_Ticks_NA
+} RtemsTimerReqFireAfter_Pre_Ticks;
+
+typedef enum {
+ RtemsTimerReqFireAfter_Pre_Routine_Valid,
+ RtemsTimerReqFireAfter_Pre_Routine_Null,
+ RtemsTimerReqFireAfter_Pre_Routine_NA
+} RtemsTimerReqFireAfter_Pre_Routine;
+
+typedef enum {
+ RtemsTimerReqFireAfter_Pre_Id_Valid,
+ RtemsTimerReqFireAfter_Pre_Id_Invalid,
+ RtemsTimerReqFireAfter_Pre_Id_NA
+} RtemsTimerReqFireAfter_Pre_Id;
+
+typedef enum {
+ RtemsTimerReqFireAfter_Pre_Context_None,
+ RtemsTimerReqFireAfter_Pre_Context_Interrupt,
+ RtemsTimerReqFireAfter_Pre_Context_Server,
+ RtemsTimerReqFireAfter_Pre_Context_NA
+} RtemsTimerReqFireAfter_Pre_Context;
+
+typedef enum {
+ RtemsTimerReqFireAfter_Pre_Clock_None,
+ RtemsTimerReqFireAfter_Pre_Clock_Ticks,
+ RtemsTimerReqFireAfter_Pre_Clock_Realtime,
+ RtemsTimerReqFireAfter_Pre_Clock_NA
+} RtemsTimerReqFireAfter_Pre_Clock;
+
+typedef enum {
+ RtemsTimerReqFireAfter_Pre_State_Inactive,
+ RtemsTimerReqFireAfter_Pre_State_Scheduled,
+ RtemsTimerReqFireAfter_Pre_State_Pending,
+ RtemsTimerReqFireAfter_Pre_State_NA
+} RtemsTimerReqFireAfter_Pre_State;
+
+typedef enum {
+ RtemsTimerReqFireAfter_Post_Status_Ok,
+ RtemsTimerReqFireAfter_Post_Status_InvId,
+ RtemsTimerReqFireAfter_Post_Status_InvAddr,
+ RtemsTimerReqFireAfter_Post_Status_InvNum,
+ RtemsTimerReqFireAfter_Post_Status_NA
+} RtemsTimerReqFireAfter_Post_Status;
+
+typedef enum {
+ RtemsTimerReqFireAfter_Post_Context_None,
+ RtemsTimerReqFireAfter_Post_Context_Interrupt,
+ RtemsTimerReqFireAfter_Post_Context_Server,
+ RtemsTimerReqFireAfter_Post_Context_Nop,
+ RtemsTimerReqFireAfter_Post_Context_NA
+} RtemsTimerReqFireAfter_Post_Context;
+
+typedef enum {
+ RtemsTimerReqFireAfter_Post_Clock_None,
+ RtemsTimerReqFireAfter_Post_Clock_Ticks,
+ RtemsTimerReqFireAfter_Post_Clock_Realtime,
+ RtemsTimerReqFireAfter_Post_Clock_Nop,
+ RtemsTimerReqFireAfter_Post_Clock_NA
+} RtemsTimerReqFireAfter_Post_Clock;
+
+typedef enum {
+ RtemsTimerReqFireAfter_Post_State_Scheduled,
+ RtemsTimerReqFireAfter_Post_State_Nop,
+ RtemsTimerReqFireAfter_Post_State_NA
+} RtemsTimerReqFireAfter_Post_State;
+
+typedef enum {
+ RtemsTimerReqFireAfter_Post_Interval_Param,
+ RtemsTimerReqFireAfter_Post_Interval_Nop,
+ RtemsTimerReqFireAfter_Post_Interval_NA
+} RtemsTimerReqFireAfter_Post_Interval;
+
+typedef enum {
+ RtemsTimerReqFireAfter_Post_Routine_Param,
+ RtemsTimerReqFireAfter_Post_Routine_Nop,
+ RtemsTimerReqFireAfter_Post_Routine_NA
+} RtemsTimerReqFireAfter_Post_Routine;
+
+typedef enum {
+ RtemsTimerReqFireAfter_Post_UserData_Param,
+ RtemsTimerReqFireAfter_Post_UserData_Nop,
+ RtemsTimerReqFireAfter_Post_UserData_NA
+} RtemsTimerReqFireAfter_Post_UserData;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Ticks_NA : 1;
+ uint32_t Pre_Routine_NA : 1;
+ uint32_t Pre_Id_NA : 1;
+ uint32_t Pre_Context_NA : 1;
+ uint32_t Pre_Clock_NA : 1;
+ uint32_t Pre_State_NA : 1;
+ uint32_t Post_Status : 3;
+ uint32_t Post_Context : 3;
+ uint32_t Post_Clock : 3;
+ uint32_t Post_State : 2;
+ uint32_t Post_Interval : 2;
+ uint32_t Post_Routine : 2;
+ uint32_t Post_UserData : 2;
+} RtemsTimerReqFireAfter_Entry;
+
+typedef enum {
+ PRE_NONE = 0,
+ PRE_INTERRUPT = 1,
+ PRE_SERVER = 2
+} PreConditionContext;
+
+typedef enum {
+ SCHEDULE_NONE = 0,
+ SCHEDULE_SOON = 1,
+ SCHEDULE_LATER = 2,
+ SCHEDULE_MAX = 5
+} Scheduling_Ticks;
+
+/**
+ * @brief Test context for spec:/rtems/timer/req/fire-after test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a valid id of a timer.
+ */
+ rtems_id timer_id;
+
+ /**
+ * @brief This member specifies the ``id`` parameter for the action.
+ */
+ rtems_id id_param;
+
+ /**
+ * @brief This member specifies the ``ticks`` parameter for the action.
+ */
+ rtems_interval ticks_param;
+
+ /**
+ * @brief This member specifies the ``routine`` parameter for the action.
+ */
+ rtems_timer_service_routine_entry routine_param;
+
+ /**
+ * @brief This member contains the returned status code of the action.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member contains a counter for invocations of the Timer Service
+ * Routine.
+ */
+ int invocations;
+
+ /**
+ * @brief Function TriggerTimer() is used to figure out how many ticks (see
+ * tick) are needed till the Timer Service Routine gets executed. This
+ * member contains the number of ticks needed to fire the Timer Service
+ * Routine.
+ */
+ Scheduling_Ticks ticks_till_fire;
+
+ /**
+ * @brief This member contains the user data given to the Timer Service
+ * Routine when called.
+ */
+ void *routine_user_data;
+
+ /**
+ * @brief This member specifies which pre-condition context (none, interrupt
+ * context, server context) must be created before the
+ * rtems_timer_fire_after() action gets executed.
+ */
+ PreConditionContext pre_cond_contex;
+
+ /**
+ * @brief This member stores internal clock and context settings of the timer
+ * before the execution of the test action.
+ */
+ Timer_Classes pre_class;
+
+ /**
+ * @brief This member stores the state of the timer before the execution of
+ * the test action.
+ */
+ Timer_States pre_state;
+
+ /**
+ * @brief This member stores the state of the timer after the execution of
+ * the test action.
+ */
+ Timer_States post_state;
+
+ /**
+ * @brief This member stores the scheduling data of the timer before the
+ * execution of the test action.
+ */
+ Timer_Scheduling_Data pre_scheduling_data;
+
+ /**
+ * @brief This member stores the scheduling data of the timer after the
+ * execution of the test action.
+ */
+ Timer_Scheduling_Data post_scheduling_data;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 6 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTimerReqFireAfter_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTimerReqFireAfter_Context;
+
+static RtemsTimerReqFireAfter_Context
+ RtemsTimerReqFireAfter_Instance;
+
+static const char * const RtemsTimerReqFireAfter_PreDesc_Ticks[] = {
+ "Valid",
+ "Is0",
+ "NA"
+};
+
+static const char * const RtemsTimerReqFireAfter_PreDesc_Routine[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsTimerReqFireAfter_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTimerReqFireAfter_PreDesc_Context[] = {
+ "None",
+ "Interrupt",
+ "Server",
+ "NA"
+};
+
+static const char * const RtemsTimerReqFireAfter_PreDesc_Clock[] = {
+ "None",
+ "Ticks",
+ "Realtime",
+ "NA"
+};
+
+static const char * const RtemsTimerReqFireAfter_PreDesc_State[] = {
+ "Inactive",
+ "Scheduled",
+ "Pending",
+ "NA"
+};
+
+static const char * const * const RtemsTimerReqFireAfter_PreDesc[] = {
+ RtemsTimerReqFireAfter_PreDesc_Ticks,
+ RtemsTimerReqFireAfter_PreDesc_Routine,
+ RtemsTimerReqFireAfter_PreDesc_Id,
+ RtemsTimerReqFireAfter_PreDesc_Context,
+ RtemsTimerReqFireAfter_PreDesc_Clock,
+ RtemsTimerReqFireAfter_PreDesc_State,
+ NULL
+};
+
+static const rtems_time_of_day tod_now = { 2000, 1, 1, 0, 0, 0, 0 };
+static const rtems_time_of_day tod_schedule = { 2000, 1, 1, 1, 0, 0, 0 };
+static const rtems_time_of_day tod_fire = { 2000, 1, 2, 0, 0, 0, 0 };
+
+static Scheduling_Ticks TriggerTimer( const RtemsTimerReqFireAfter_Context *ctx )
+{
+ int ticks_fired = SCHEDULE_NONE;
+ int invocations_old = ctx->invocations;
+
+ /* Fire the timer service routine for ticks and realtime clock */
+ int i;
+ for ( i = 1; i <= SCHEDULE_MAX; ++i ) {
+ ClockTick();
+ if ( ctx->invocations > invocations_old ) {
+ ticks_fired = i;
+ break;
+ }
+ }
+
+ T_rsc_success( rtems_clock_set( &tod_fire ) );
+
+ return ticks_fired;
+}
+
+static void TimerServiceRoutine(
+ rtems_id timer_id,
+ void *user_data
+)
+{
+ RtemsTimerReqFireAfter_Context *ctx = user_data;
+ ++( ctx->invocations );
+ ctx->routine_user_data = user_data;
+}
+
+static void RtemsTimerReqFireAfter_Pre_Ticks_Prepare(
+ RtemsTimerReqFireAfter_Context *ctx,
+ RtemsTimerReqFireAfter_Pre_Ticks state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireAfter_Pre_Ticks_Valid: {
+ /*
+ * While the ``ticks`` parameter is a positive (greater 0) number.
+ */
+ ctx->ticks_param = SCHEDULE_LATER;
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_Ticks_Is0: {
+ /*
+ * While the ``ticks`` parameter is 0.
+ */
+ ctx->ticks_param = 0;
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_Ticks_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireAfter_Pre_Routine_Prepare(
+ RtemsTimerReqFireAfter_Context *ctx,
+ RtemsTimerReqFireAfter_Pre_Routine state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireAfter_Pre_Routine_Valid: {
+ /*
+ * While the ``routine`` parameter references an object of type
+ * rtems_timer_service_routine_entry.
+ */
+ ctx->routine_param = TimerServiceRoutine;
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_Routine_Null: {
+ /*
+ * While the ``routine`` parameter is NULL..
+ */
+ ctx->routine_param = NULL;
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_Routine_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireAfter_Pre_Id_Prepare(
+ RtemsTimerReqFireAfter_Context *ctx,
+ RtemsTimerReqFireAfter_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireAfter_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is valid.
+ */
+ ctx->id_param = ctx->timer_id;
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id_param = RTEMS_ID_NONE;
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireAfter_Pre_Context_Prepare(
+ RtemsTimerReqFireAfter_Context *ctx,
+ RtemsTimerReqFireAfter_Pre_Context state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireAfter_Pre_Context_None: {
+ /*
+ * While the Timer Service Routine has never been scheduled since
+ * creation of the timer. See also none.
+ */
+ ctx->pre_cond_contex = PRE_NONE;
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_Context_Interrupt: {
+ /*
+ * While the timer is in interrupt context.
+ */
+ ctx->pre_cond_contex = PRE_INTERRUPT;
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_Context_Server: {
+ /*
+ * While the timer is in server context.
+ */
+ ctx->pre_cond_contex = PRE_SERVER;
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireAfter_Pre_Clock_Prepare(
+ RtemsTimerReqFireAfter_Context *ctx,
+ RtemsTimerReqFireAfter_Pre_Clock state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireAfter_Pre_Clock_None: {
+ /*
+ * While the timer has never been scheduled since creation of the timer.
+ */
+ T_eq_int( ctx->pre_cond_contex, PRE_NONE );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_Clock_Ticks: {
+ /*
+ * While the clock used to determine when the timer will fire is the
+ * ticks based clock.
+ */
+ rtems_status_code status;
+
+ if ( ctx->pre_cond_contex == PRE_INTERRUPT ) {
+ status = rtems_timer_fire_after(
+ ctx->timer_id,
+ SCHEDULE_SOON,
+ TimerServiceRoutine,
+ ctx
+ );
+ } else {
+ status = rtems_timer_server_fire_after(
+ ctx->timer_id,
+ SCHEDULE_SOON,
+ TimerServiceRoutine,
+ ctx
+ );
+ }
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_Clock_Realtime: {
+ /*
+ * While the clock used to determine when the timer will fire is the
+ * realtime clock.
+ */
+ rtems_status_code status;
+
+ if ( ctx->pre_cond_contex == PRE_INTERRUPT ) {
+ status = rtems_timer_fire_when(
+ ctx->timer_id,
+ &tod_schedule,
+ TimerServiceRoutine,
+ ctx
+ );
+ } else {
+ status = rtems_timer_server_fire_when(
+ ctx->timer_id,
+ &tod_schedule,
+ TimerServiceRoutine,
+ ctx
+ );
+ }
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_Clock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireAfter_Pre_State_Prepare(
+ RtemsTimerReqFireAfter_Context *ctx,
+ RtemsTimerReqFireAfter_Pre_State state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireAfter_Pre_State_Inactive: {
+ /*
+ * While the timer is in inactive state.
+ */
+ TriggerTimer( ctx );
+ T_eq_int(
+ ctx->invocations,
+ ( ctx->pre_cond_contex == PRE_NONE ) ? 0 : 1
+ );
+ ctx->invocations = 0;
+ ctx->pre_state = TIMER_INACTIVE;
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_State_Scheduled: {
+ /*
+ * While the timer is in scheduled state.
+ */
+ /* The timer was already scheduled in the "Clock" pre-conditions. */
+ ctx->pre_state = TIMER_SCHEDULED;
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_State_Pending: {
+ /*
+ * While the timer is in pending state.
+ */
+ T_rsc_success( rtems_task_suspend( GetTimerServerTaskId() ) );
+ TriggerTimer( ctx );
+ T_eq_int( ctx->invocations, 0 );
+ ctx->pre_state = TIMER_PENDING;
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Pre_State_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireAfter_Post_Status_Check(
+ RtemsTimerReqFireAfter_Context *ctx,
+ RtemsTimerReqFireAfter_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireAfter_Post_Status_Ok: {
+ /*
+ * The return status of rtems_timer_fire_after() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Status_InvId: {
+ /*
+ * The return status of rtems_timer_fire_after() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_timer_fire_after() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Status_InvNum: {
+ /*
+ * The return status of rtems_timer_fire_after() shall be
+ * RTEMS_INVALID_NUMBER.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NUMBER );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireAfter_Post_Context_Check(
+ RtemsTimerReqFireAfter_Context *ctx,
+ RtemsTimerReqFireAfter_Post_Context state
+)
+{
+ Timer_Classes class;
+ class = GetTimerClass( ctx->timer_id );
+
+ switch ( state ) {
+ case RtemsTimerReqFireAfter_Post_Context_None: {
+ /*
+ * The timer shall have never been scheduled. See also none.
+ */
+ T_eq_int( class, TIMER_DORMANT );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Context_Interrupt: {
+ /*
+ * The timer shall be in interrupt context.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, 0 );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Context_Server: {
+ /*
+ * The timer shall be in server context.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, TIMER_CLASS_BIT_ON_TASK );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Context_Nop: {
+ /*
+ * Objects referenced by the parameters in the past call to
+ * rtems_timer_fire_after() shall not be accessed by the
+ * rtems_timer_fire_after() call. See also Nop.
+ */
+ T_eq_int( class, ctx->pre_class );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireAfter_Post_Clock_Check(
+ RtemsTimerReqFireAfter_Context *ctx,
+ RtemsTimerReqFireAfter_Post_Clock state
+)
+{
+ Timer_Classes class;
+ class = GetTimerClass( ctx->timer_id );
+
+ switch ( state ) {
+ case RtemsTimerReqFireAfter_Post_Clock_None: {
+ /*
+ * The timer shall have never been scheduled.
+ */
+ T_eq_int( class, TIMER_DORMANT );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Clock_Ticks: {
+ /*
+ * The timer shall use the ticks based clock.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_TIME_OF_DAY, 0 );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Clock_Realtime: {
+ /*
+ * The timer shall use the realtime clock.
+ */
+ T_eq_int(
+ class & TIMER_CLASS_BIT_TIME_OF_DAY,
+ TIMER_CLASS_BIT_TIME_OF_DAY
+ );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Clock_Nop: {
+ /*
+ * Objects referenced by the parameters in the past call to
+ * rtems_timer_fire_after() shall not be accessed by the
+ * rtems_timer_fire_after() call.
+ */
+ T_eq_int( class, ctx->pre_class );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Clock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireAfter_Post_State_Check(
+ RtemsTimerReqFireAfter_Context *ctx,
+ RtemsTimerReqFireAfter_Post_State state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireAfter_Post_State_Scheduled: {
+ /*
+ * The timer shall be in scheduled state.
+ */
+ ctx->ticks_till_fire = TriggerTimer( ctx );
+ T_eq_int( ctx->invocations, 1 );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_State_Nop: {
+ /*
+ * Objects referenced by the parameters in the past call to
+ * rtems_timer_fire_after() shall not be accessed by the
+ * rtems_timer_fire_after() call.
+ */
+ T_eq_int( ctx->post_state, ctx->pre_state );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_State_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireAfter_Post_Interval_Check(
+ RtemsTimerReqFireAfter_Context *ctx,
+ RtemsTimerReqFireAfter_Post_Interval state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireAfter_Post_Interval_Param: {
+ /*
+ * The Timer Service Routine shall be invoked the number of ticks (see
+ * tick), which are provided by the ``ticks`` parameter in the past call
+ * to rtems_timer_fire_after(), after a point in time during the
+ * execution of the rtems_timer_fire_after() call.
+ */
+ T_eq_int( ctx->ticks_till_fire, ctx->ticks_param );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Interval_Nop: {
+ /*
+ * If and when the Timer Service Routine will be invoked shall not be
+ * changed by the past call to rtems_timer_fire_after().
+ */
+ /*
+ * Whether the timer is scheduled has already been tested by the
+ * "Nop" "State" post-condition above.
+ */
+ T_eq_u32(
+ ctx->post_scheduling_data.interval,
+ ctx->pre_scheduling_data.interval
+ );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Interval_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireAfter_Post_Routine_Check(
+ RtemsTimerReqFireAfter_Context *ctx,
+ RtemsTimerReqFireAfter_Post_Routine state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireAfter_Post_Routine_Param: {
+ /*
+ * The function reference used to invoke the Timer Service Routine when
+ * the timer will fire shall be the one provided by the ``routine``
+ * parameter in the past call to rtems_timer_fire_after().
+ */
+ T_eq_int( ctx->invocations, 1 );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Routine_Nop: {
+ /*
+ * The function reference used for any invocation of the Timer Service
+ * Routine shall not be changed by the past call to
+ * rtems_timer_fire_after().
+ */
+ T_eq_ptr(
+ ctx->post_scheduling_data.routine,
+ ctx->pre_scheduling_data.routine
+ );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_Routine_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireAfter_Post_UserData_Check(
+ RtemsTimerReqFireAfter_Context *ctx,
+ RtemsTimerReqFireAfter_Post_UserData state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireAfter_Post_UserData_Param: {
+ /*
+ * The user data argument for invoking the Timer Service Routine when the
+ * timer will fire shall be the one provided by the ``user_data``
+ * parameter in the past call to rtems_timer_fire_after().
+ */
+ T_eq_ptr( ctx->routine_user_data, ctx );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_UserData_Nop: {
+ /*
+ * The user data argument used for any invocation of the Timer Service
+ * Routine shall not be changed by the past call to
+ * rtems_timer_fire_after().
+ */
+ T_eq_ptr(
+ ctx->post_scheduling_data.user_data,
+ ctx->pre_scheduling_data.user_data
+ );
+ break;
+ }
+
+ case RtemsTimerReqFireAfter_Post_UserData_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireAfter_Setup( RtemsTimerReqFireAfter_Context *ctx )
+{
+ rtems_status_code status;
+ status = rtems_timer_initiate_server(
+ RTEMS_TIMER_SERVER_DEFAULT_PRIORITY,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_ATTRIBUTES
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsTimerReqFireAfter_Setup_Wrap( void *arg )
+{
+ RtemsTimerReqFireAfter_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqFireAfter_Setup( ctx );
+}
+
+/**
+ * @brief Make sure the timer server is not running and the realtime clock is
+ * not set after this test.
+ */
+static void RtemsTimerReqFireAfter_Teardown(
+ RtemsTimerReqFireAfter_Context *ctx
+)
+{
+ DeleteTimerServer();
+ UnsetClock();
+}
+
+static void RtemsTimerReqFireAfter_Teardown_Wrap( void *arg )
+{
+ RtemsTimerReqFireAfter_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqFireAfter_Teardown( ctx );
+}
+
+static void RtemsTimerReqFireAfter_Prepare(
+ RtemsTimerReqFireAfter_Context *ctx
+)
+{
+ rtems_status_code status;
+ status = rtems_timer_create(
+ rtems_build_name( 'T', 'I', 'M', 'E' ),
+ &ctx->timer_id
+ );
+ T_rsc_success( status );
+
+ ctx->invocations = 0;
+ ctx->ticks_till_fire = SCHEDULE_NONE;
+ ctx->routine_user_data = NULL;
+ T_rsc_success( rtems_clock_set( &tod_now ) );
+}
+
+static void RtemsTimerReqFireAfter_Action(
+ RtemsTimerReqFireAfter_Context *ctx
+)
+{
+ GetTimerSchedulingData( ctx->timer_id, &ctx->pre_scheduling_data );
+ ctx->pre_class = GetTimerClass( ctx->timer_id );
+ ctx->status = rtems_timer_fire_after(
+ ctx->id_param,
+ ctx->ticks_param,
+ ctx->routine_param,
+ ctx
+ );
+ ctx->post_state = GetTimerState( ctx->timer_id );
+ GetTimerSchedulingData( ctx->timer_id, &ctx->post_scheduling_data );
+ /* Ignoring return status: the timer server task may be suspended or not. */
+ rtems_task_resume( GetTimerServerTaskId() );
+}
+
+static void RtemsTimerReqFireAfter_Cleanup(
+ RtemsTimerReqFireAfter_Context *ctx
+)
+{
+ T_rsc_success( rtems_timer_delete( ctx->timer_id ) );
+}
+
+static const RtemsTimerReqFireAfter_Entry
+RtemsTimerReqFireAfter_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, 0, RtemsTimerReqFireAfter_Post_Status_NA,
+ RtemsTimerReqFireAfter_Post_Context_NA,
+ RtemsTimerReqFireAfter_Post_Clock_NA, RtemsTimerReqFireAfter_Post_State_NA,
+ RtemsTimerReqFireAfter_Post_Interval_NA,
+ RtemsTimerReqFireAfter_Post_Routine_NA,
+ RtemsTimerReqFireAfter_Post_UserData_NA },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqFireAfter_Post_Status_InvNum,
+ RtemsTimerReqFireAfter_Post_Context_Nop,
+ RtemsTimerReqFireAfter_Post_Clock_Nop,
+ RtemsTimerReqFireAfter_Post_State_Nop,
+ RtemsTimerReqFireAfter_Post_Interval_Nop,
+ RtemsTimerReqFireAfter_Post_Routine_Nop,
+ RtemsTimerReqFireAfter_Post_UserData_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqFireAfter_Post_Status_InvAddr,
+ RtemsTimerReqFireAfter_Post_Context_Nop,
+ RtemsTimerReqFireAfter_Post_Clock_Nop,
+ RtemsTimerReqFireAfter_Post_State_Nop,
+ RtemsTimerReqFireAfter_Post_Interval_Nop,
+ RtemsTimerReqFireAfter_Post_Routine_Nop,
+ RtemsTimerReqFireAfter_Post_UserData_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqFireAfter_Post_Status_Ok,
+ RtemsTimerReqFireAfter_Post_Context_Interrupt,
+ RtemsTimerReqFireAfter_Post_Clock_Ticks,
+ RtemsTimerReqFireAfter_Post_State_Scheduled,
+ RtemsTimerReqFireAfter_Post_Interval_Param,
+ RtemsTimerReqFireAfter_Post_Routine_Param,
+ RtemsTimerReqFireAfter_Post_UserData_Param },
+ { 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqFireAfter_Post_Status_InvId,
+ RtemsTimerReqFireAfter_Post_Context_Nop,
+ RtemsTimerReqFireAfter_Post_Clock_Nop,
+ RtemsTimerReqFireAfter_Post_State_Nop,
+ RtemsTimerReqFireAfter_Post_Interval_Nop,
+ RtemsTimerReqFireAfter_Post_Routine_Nop,
+ RtemsTimerReqFireAfter_Post_UserData_Nop }
+};
+
+static const uint8_t
+RtemsTimerReqFireAfter_Map[] = {
+ 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 3, 3, 0, 0, 0, 0, 3, 3, 3, 3, 3,
+ 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4, 0, 0, 0, 0, 4, 4, 4, 4,
+ 4, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 2, 0, 0, 0, 0, 2, 2, 2,
+ 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 2, 0, 0, 0, 0, 2, 2,
+ 2, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1,
+ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0,
+ 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0,
+ 0, 0, 1, 1, 1, 1, 1, 1
+};
+
+static size_t RtemsTimerReqFireAfter_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTimerReqFireAfter_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTimerReqFireAfter_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTimerReqFireAfter_Fixture = {
+ .setup = RtemsTimerReqFireAfter_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTimerReqFireAfter_Teardown_Wrap,
+ .scope = RtemsTimerReqFireAfter_Scope,
+ .initial_context = &RtemsTimerReqFireAfter_Instance
+};
+
+static inline RtemsTimerReqFireAfter_Entry RtemsTimerReqFireAfter_PopEntry(
+ RtemsTimerReqFireAfter_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTimerReqFireAfter_Entries[
+ RtemsTimerReqFireAfter_Map[ index ]
+ ];
+}
+
+static void RtemsTimerReqFireAfter_TestVariant(
+ RtemsTimerReqFireAfter_Context *ctx
+)
+{
+ RtemsTimerReqFireAfter_Pre_Ticks_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTimerReqFireAfter_Pre_Routine_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTimerReqFireAfter_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTimerReqFireAfter_Pre_Context_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTimerReqFireAfter_Pre_Clock_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsTimerReqFireAfter_Pre_State_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsTimerReqFireAfter_Action( ctx );
+ RtemsTimerReqFireAfter_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTimerReqFireAfter_Post_Context_Check(
+ ctx,
+ ctx->Map.entry.Post_Context
+ );
+ RtemsTimerReqFireAfter_Post_Clock_Check( ctx, ctx->Map.entry.Post_Clock );
+ RtemsTimerReqFireAfter_Post_State_Check( ctx, ctx->Map.entry.Post_State );
+ RtemsTimerReqFireAfter_Post_Interval_Check(
+ ctx,
+ ctx->Map.entry.Post_Interval
+ );
+ RtemsTimerReqFireAfter_Post_Routine_Check(
+ ctx,
+ ctx->Map.entry.Post_Routine
+ );
+ RtemsTimerReqFireAfter_Post_UserData_Check(
+ ctx,
+ ctx->Map.entry.Post_UserData
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTimerReqFireAfter( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTimerReqFireAfter, &RtemsTimerReqFireAfter_Fixture )
+{
+ RtemsTimerReqFireAfter_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTimerReqFireAfter_Pre_Ticks_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsTimerReqFireAfter_Pre_Ticks_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTimerReqFireAfter_Pre_Routine_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsTimerReqFireAfter_Pre_Routine_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsTimerReqFireAfter_Pre_Id_Valid;
+ ctx->Map.pcs[ 2 ] < RtemsTimerReqFireAfter_Pre_Id_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsTimerReqFireAfter_Pre_Context_None;
+ ctx->Map.pcs[ 3 ] < RtemsTimerReqFireAfter_Pre_Context_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsTimerReqFireAfter_Pre_Clock_None;
+ ctx->Map.pcs[ 4 ] < RtemsTimerReqFireAfter_Pre_Clock_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = RtemsTimerReqFireAfter_Pre_State_Inactive;
+ ctx->Map.pcs[ 5 ] < RtemsTimerReqFireAfter_Pre_State_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ ctx->Map.entry = RtemsTimerReqFireAfter_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsTimerReqFireAfter_Prepare( ctx );
+ RtemsTimerReqFireAfter_TestVariant( ctx );
+ RtemsTimerReqFireAfter_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timer-fire-when.c b/testsuites/validation/tc-timer-fire-when.c
new file mode 100644
index 0000000000..92bd505a41
--- /dev/null
+++ b/testsuites/validation/tc-timer-fire-when.c
@@ -0,0 +1,1286 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTimerReqFireWhen
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTimerReqFireWhen spec:/rtems/timer/req/fire-when
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTimerReqFireWhen_Pre_RtClock_Set,
+ RtemsTimerReqFireWhen_Pre_RtClock_Unset,
+ RtemsTimerReqFireWhen_Pre_RtClock_NA
+} RtemsTimerReqFireWhen_Pre_RtClock;
+
+typedef enum {
+ RtemsTimerReqFireWhen_Pre_Routine_Valid,
+ RtemsTimerReqFireWhen_Pre_Routine_Null,
+ RtemsTimerReqFireWhen_Pre_Routine_NA
+} RtemsTimerReqFireWhen_Pre_Routine;
+
+typedef enum {
+ RtemsTimerReqFireWhen_Pre_WallTime_Valid,
+ RtemsTimerReqFireWhen_Pre_WallTime_Invalid,
+ RtemsTimerReqFireWhen_Pre_WallTime_Past,
+ RtemsTimerReqFireWhen_Pre_WallTime_Null,
+ RtemsTimerReqFireWhen_Pre_WallTime_NA
+} RtemsTimerReqFireWhen_Pre_WallTime;
+
+typedef enum {
+ RtemsTimerReqFireWhen_Pre_Id_Valid,
+ RtemsTimerReqFireWhen_Pre_Id_Invalid,
+ RtemsTimerReqFireWhen_Pre_Id_NA
+} RtemsTimerReqFireWhen_Pre_Id;
+
+typedef enum {
+ RtemsTimerReqFireWhen_Pre_Context_None,
+ RtemsTimerReqFireWhen_Pre_Context_Interrupt,
+ RtemsTimerReqFireWhen_Pre_Context_Server,
+ RtemsTimerReqFireWhen_Pre_Context_NA
+} RtemsTimerReqFireWhen_Pre_Context;
+
+typedef enum {
+ RtemsTimerReqFireWhen_Pre_Clock_None,
+ RtemsTimerReqFireWhen_Pre_Clock_Ticks,
+ RtemsTimerReqFireWhen_Pre_Clock_Realtime,
+ RtemsTimerReqFireWhen_Pre_Clock_NA
+} RtemsTimerReqFireWhen_Pre_Clock;
+
+typedef enum {
+ RtemsTimerReqFireWhen_Pre_State_Inactive,
+ RtemsTimerReqFireWhen_Pre_State_Scheduled,
+ RtemsTimerReqFireWhen_Pre_State_Pending,
+ RtemsTimerReqFireWhen_Pre_State_NA
+} RtemsTimerReqFireWhen_Pre_State;
+
+typedef enum {
+ RtemsTimerReqFireWhen_Post_Status_Ok,
+ RtemsTimerReqFireWhen_Post_Status_NotDef,
+ RtemsTimerReqFireWhen_Post_Status_InvId,
+ RtemsTimerReqFireWhen_Post_Status_InvAddr,
+ RtemsTimerReqFireWhen_Post_Status_InvClock,
+ RtemsTimerReqFireWhen_Post_Status_NA
+} RtemsTimerReqFireWhen_Post_Status;
+
+typedef enum {
+ RtemsTimerReqFireWhen_Post_Context_None,
+ RtemsTimerReqFireWhen_Post_Context_Interrupt,
+ RtemsTimerReqFireWhen_Post_Context_Server,
+ RtemsTimerReqFireWhen_Post_Context_Nop,
+ RtemsTimerReqFireWhen_Post_Context_NA
+} RtemsTimerReqFireWhen_Post_Context;
+
+typedef enum {
+ RtemsTimerReqFireWhen_Post_Clock_None,
+ RtemsTimerReqFireWhen_Post_Clock_Ticks,
+ RtemsTimerReqFireWhen_Post_Clock_Realtime,
+ RtemsTimerReqFireWhen_Post_Clock_Nop,
+ RtemsTimerReqFireWhen_Post_Clock_NA
+} RtemsTimerReqFireWhen_Post_Clock;
+
+typedef enum {
+ RtemsTimerReqFireWhen_Post_State_Scheduled,
+ RtemsTimerReqFireWhen_Post_State_Nop,
+ RtemsTimerReqFireWhen_Post_State_NA
+} RtemsTimerReqFireWhen_Post_State;
+
+typedef enum {
+ RtemsTimerReqFireWhen_Post_WallTime_Param,
+ RtemsTimerReqFireWhen_Post_WallTime_Nop,
+ RtemsTimerReqFireWhen_Post_WallTime_NA
+} RtemsTimerReqFireWhen_Post_WallTime;
+
+typedef enum {
+ RtemsTimerReqFireWhen_Post_Routine_Param,
+ RtemsTimerReqFireWhen_Post_Routine_Nop,
+ RtemsTimerReqFireWhen_Post_Routine_NA
+} RtemsTimerReqFireWhen_Post_Routine;
+
+typedef enum {
+ RtemsTimerReqFireWhen_Post_UserData_Param,
+ RtemsTimerReqFireWhen_Post_UserData_Nop,
+ RtemsTimerReqFireWhen_Post_UserData_NA
+} RtemsTimerReqFireWhen_Post_UserData;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_RtClock_NA : 1;
+ uint32_t Pre_Routine_NA : 1;
+ uint32_t Pre_WallTime_NA : 1;
+ uint32_t Pre_Id_NA : 1;
+ uint32_t Pre_Context_NA : 1;
+ uint32_t Pre_Clock_NA : 1;
+ uint32_t Pre_State_NA : 1;
+ uint32_t Post_Status : 3;
+ uint32_t Post_Context : 3;
+ uint32_t Post_Clock : 3;
+ uint32_t Post_State : 2;
+ uint32_t Post_WallTime : 2;
+ uint32_t Post_Routine : 2;
+ uint32_t Post_UserData : 2;
+} RtemsTimerReqFireWhen_Entry;
+
+typedef enum {
+ PRE_NONE = 0,
+ PRE_INTERRUPT = 1,
+ PRE_SERVER = 2
+} PreConditionContext;
+
+typedef enum {
+ SCHEDULE_NONE = 0,
+ SCHEDULE_SOON = 1,
+ SCHEDULE_MAX = 5
+} Scheduling_Ticks;
+
+/**
+ * @brief Test context for spec:/rtems/timer/req/fire-when test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a valid id of a timer.
+ */
+ rtems_id timer_id;
+
+ /**
+ * @brief This member specifies the ``id`` parameter for the action.
+ */
+ rtems_id id_param;
+
+ /**
+ * @brief This member specifies the ``wall_time`` parameter for the action.
+ */
+ const rtems_time_of_day *wall_time_param;
+
+ /**
+ * @brief This member specifies the ``routine`` parameter for the action.
+ */
+ rtems_timer_service_routine_entry routine_param;
+
+ /**
+ * @brief This member contains the returned status code of the action.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member contains a counter of invocations of the Timer Service
+ * Routine.
+ */
+ int invocations;
+
+ /**
+ * @brief Function TriggerTimer() is used to figure out when the Timer
+ * Service Routine gets executed. This member contains the time-of-day when
+ * the Timer Service Routine fires (see fire).
+ */
+ rtems_time_of_day tod_till_fire;
+
+ /**
+ * @brief This member contains the user data given to the Timer Service
+ * Routine when called.
+ */
+ void *routine_user_data;
+
+ /**
+ * @brief This member specifies which pre-condition context (none, interrupt
+ * context, server context) must be created before the
+ * rtems_timer_fire_when() action gets executed.
+ */
+ PreConditionContext pre_cond_contex;
+
+ /**
+ * @brief This member specifies the pre-condition state of the realtime
+ * clock. It should either be set to the value referenced by pre_cond_tod
+ * or if NULL, then the realtime clock should be not set.
+ */
+ const rtems_time_of_day *pre_cond_tod;
+
+ /**
+ * @brief This member stores internal clock and context settings of the timer
+ * before the execution of the test action.
+ */
+ Timer_Classes pre_class;
+
+ /**
+ * @brief This member stores the state of the timer before the execution of
+ * the test action.
+ */
+ Timer_States pre_state;
+
+ /**
+ * @brief This member stores the state of the timer after the execution of
+ * the test action.
+ */
+ Timer_States post_state;
+
+ /**
+ * @brief This member stores the scheduling data of the timer before the
+ * execution of the test action.
+ */
+ Timer_Scheduling_Data pre_scheduling_data;
+
+ /**
+ * @brief This member stores the scheduling data of the timer after the
+ * execution of the test action.
+ */
+ Timer_Scheduling_Data post_scheduling_data;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 7 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTimerReqFireWhen_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTimerReqFireWhen_Context;
+
+static RtemsTimerReqFireWhen_Context
+ RtemsTimerReqFireWhen_Instance;
+
+static const char * const RtemsTimerReqFireWhen_PreDesc_RtClock[] = {
+ "Set",
+ "Unset",
+ "NA"
+};
+
+static const char * const RtemsTimerReqFireWhen_PreDesc_Routine[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsTimerReqFireWhen_PreDesc_WallTime[] = {
+ "Valid",
+ "Invalid",
+ "Past",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsTimerReqFireWhen_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTimerReqFireWhen_PreDesc_Context[] = {
+ "None",
+ "Interrupt",
+ "Server",
+ "NA"
+};
+
+static const char * const RtemsTimerReqFireWhen_PreDesc_Clock[] = {
+ "None",
+ "Ticks",
+ "Realtime",
+ "NA"
+};
+
+static const char * const RtemsTimerReqFireWhen_PreDesc_State[] = {
+ "Inactive",
+ "Scheduled",
+ "Pending",
+ "NA"
+};
+
+static const char * const * const RtemsTimerReqFireWhen_PreDesc[] = {
+ RtemsTimerReqFireWhen_PreDesc_RtClock,
+ RtemsTimerReqFireWhen_PreDesc_Routine,
+ RtemsTimerReqFireWhen_PreDesc_WallTime,
+ RtemsTimerReqFireWhen_PreDesc_Id,
+ RtemsTimerReqFireWhen_PreDesc_Context,
+ RtemsTimerReqFireWhen_PreDesc_Clock,
+ RtemsTimerReqFireWhen_PreDesc_State,
+ NULL
+};
+
+static const rtems_time_of_day tod_now = { 2000, 1, 1, 0, 0, 0, 0 };
+static const rtems_time_of_day tod_schedule = { 2000, 1, 1, 5, 0, 0, 0 };
+static const rtems_time_of_day tod_invalid = { 1985, 1, 1, 0, 0, 0, 0 };
+/*
+ * rtems_fire_when() ignores ticks and treads all wall times in the
+ * current second like being in the "past". This border case is tested.
+ */
+static const rtems_time_of_day tod_past = { 2000, 1, 1, 0, 0, 0, 50 };
+
+static void TriggerTimer(
+ const RtemsTimerReqFireWhen_Context *ctx,
+ rtems_time_of_day *tod_fire
+)
+{
+ rtems_time_of_day tod = tod_now;
+ int invocations_old = ctx->invocations;
+ int i;
+
+ /* Fire the timer service routine for ticks and realtime clock */
+ for ( i = 1; i <= SCHEDULE_MAX; ++i ) {
+ ClockTick();
+ }
+
+ for ( i = 1; i < 24; ++i ) {
+ tod.hour = i;
+ T_rsc_success( rtems_clock_set( &tod ) );
+ if ( tod_fire != NULL && ctx->invocations > invocations_old ) {
+ *tod_fire = tod;
+ break;
+ }
+ }
+}
+
+static void TimerServiceRoutine(
+ rtems_id timer_id,
+ void *user_data
+)
+{
+ RtemsTimerReqFireWhen_Context *ctx = user_data;
+ ++( ctx->invocations );
+ ctx->routine_user_data = user_data;
+}
+
+static void RtemsTimerReqFireWhen_Pre_RtClock_Prepare(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Pre_RtClock state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Pre_RtClock_Set: {
+ /*
+ * While the realtime clock is set to a valid time-of-day.
+ */
+ ctx->pre_cond_tod = &tod_now;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_RtClock_Unset: {
+ /*
+ * While the realtime clock has never been set.
+ */
+ ctx->pre_cond_tod = NULL;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_RtClock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Pre_Routine_Prepare(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Pre_Routine state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Pre_Routine_Valid: {
+ /*
+ * While the ``routine`` parameter references an object of type
+ * rtems_timer_service_routine_entry.
+ */
+ ctx->routine_param = TimerServiceRoutine;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_Routine_Null: {
+ /*
+ * While the ``routine`` parameter is NULL..
+ */
+ ctx->routine_param = NULL;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_Routine_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Pre_WallTime_Prepare(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Pre_WallTime state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Pre_WallTime_Valid: {
+ /*
+ * While the ``wall_time`` parameter references a time at least one
+ * second in the future but not later than the last second of the year
+ * 2105. (Times after 2105 are invalid.)
+ */
+ ctx->wall_time_param = &tod_schedule;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_WallTime_Invalid: {
+ /*
+ * While the ``wall_time`` parameter is invalid.
+ */
+ ctx->wall_time_param = &tod_invalid;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_WallTime_Past: {
+ /*
+ * While the ``wall_time`` parameter references a time in the current
+ * second or in the past but not earlier than 1988. (Times before 1988
+ * are invalid.)
+ */
+ ctx->wall_time_param = &tod_past;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_WallTime_Null: {
+ /*
+ * While the ``wall_time`` parameter is 0.
+ */
+ ctx->wall_time_param = NULL;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_WallTime_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Pre_Id_Prepare(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is valid.
+ */
+ ctx->id_param = ctx->timer_id;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id_param = RTEMS_ID_NONE;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Pre_Context_Prepare(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Pre_Context state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Pre_Context_None: {
+ /*
+ * While the Timer Service Routine has never been scheduled since
+ * creation of the timer. See also none.
+ */
+ ctx->pre_cond_contex = PRE_NONE;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_Context_Interrupt: {
+ /*
+ * While the timer is in interrupt context.
+ */
+ ctx->pre_cond_contex = PRE_INTERRUPT;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_Context_Server: {
+ /*
+ * While the timer is in server context.
+ */
+ ctx->pre_cond_contex = PRE_SERVER;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Pre_Clock_Prepare(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Pre_Clock state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Pre_Clock_None: {
+ /*
+ * While the timer has never been scheduled since creation of the timer.
+ */
+ T_eq_int( ctx->pre_cond_contex, PRE_NONE );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_Clock_Ticks: {
+ /*
+ * While the clock used to determine when the timer will fire is the
+ * ticks based clock.
+ */
+ rtems_status_code status;
+
+ if ( ctx->pre_cond_contex == PRE_INTERRUPT ) {
+ status = rtems_timer_fire_after(
+ ctx->timer_id,
+ SCHEDULE_SOON,
+ TimerServiceRoutine,
+ ctx
+ );
+ } else {
+ status = rtems_timer_server_fire_after(
+ ctx->timer_id,
+ SCHEDULE_SOON,
+ TimerServiceRoutine,
+ ctx
+ );
+ }
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_Clock_Realtime: {
+ /*
+ * While the clock used to determine when the timer will fire is the
+ * realtime clock.
+ */
+ rtems_status_code status;
+ T_rsc_success( rtems_clock_set( &tod_now ) );
+
+ if ( ctx->pre_cond_contex == PRE_INTERRUPT ) {
+ status = rtems_timer_fire_when(
+ ctx->timer_id,
+ &tod_schedule,
+ TimerServiceRoutine,
+ ctx
+ );
+ } else {
+ status = rtems_timer_server_fire_when(
+ ctx->timer_id,
+ &tod_schedule,
+ TimerServiceRoutine,
+ ctx
+ );
+ }
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_Clock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Pre_State_Prepare(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Pre_State state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Pre_State_Inactive: {
+ /*
+ * While the timer is in inactive state.
+ */
+ TriggerTimer( ctx, NULL );
+ T_eq_int(
+ ctx->invocations,
+ ( ctx->pre_cond_contex == PRE_NONE ) ? 0 : 1
+ );
+ ctx->invocations = 0;
+ ctx->pre_state = TIMER_INACTIVE;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_State_Scheduled: {
+ /*
+ * While the timer is in scheduled state.
+ */
+ /* The timer was already scheduled in the "Clock" pre-conditions. */
+ ctx->pre_state = TIMER_SCHEDULED;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_State_Pending: {
+ /*
+ * While the timer is in pending state.
+ */
+ T_rsc_success( rtems_task_suspend( GetTimerServerTaskId() ) );
+ TriggerTimer( ctx, NULL );
+ T_eq_int( ctx->invocations, 0 );
+ ctx->pre_state = TIMER_PENDING;
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Pre_State_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Post_Status_Check(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Post_Status_Ok: {
+ /*
+ * The return status of rtems_timer_fire_when() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Status_NotDef: {
+ /*
+ * The return status of rtems_timer_fire_when() shall be
+ * RTEMS_NOT_DEFINED
+ */
+ T_rsc( ctx->status, RTEMS_NOT_DEFINED );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Status_InvId: {
+ /*
+ * The return status of rtems_timer_fire_when() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_timer_fire_when() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Status_InvClock: {
+ /*
+ * The return status of rtems_timer_fire_when() shall be
+ * RTEMS_INVALID_CLOCK.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_CLOCK );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Post_Context_Check(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Post_Context state
+)
+{
+ Timer_Classes class;
+ class = GetTimerClass( ctx->timer_id );
+
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Post_Context_None: {
+ /*
+ * The timer shall have never been scheduled. See also none.
+ */
+ T_eq_int( class, TIMER_DORMANT );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Context_Interrupt: {
+ /*
+ * The timer shall be in interrupt context.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, 0 );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Context_Server: {
+ /*
+ * The timer shall be in server context.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, TIMER_CLASS_BIT_ON_TASK );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Context_Nop: {
+ /*
+ * Objects referenced by parameters in the past call to
+ * rtems_timer_fire_when() shall not be accessed by the
+ * rtems_timer_fire_when() call. See also Nop.
+ */
+ T_eq_int( class, ctx->pre_class );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Post_Clock_Check(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Post_Clock state
+)
+{
+ Timer_Classes class;
+ class = GetTimerClass( ctx->timer_id );
+
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Post_Clock_None: {
+ /*
+ * The timer shall have never been scheduled.
+ */
+ T_eq_int( class, TIMER_DORMANT );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Clock_Ticks: {
+ /*
+ * The timer shall use the ticks based clock.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_TIME_OF_DAY, 0 );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Clock_Realtime: {
+ /*
+ * The timer shall use the realtime clock.
+ */
+ T_eq_int(
+ class & TIMER_CLASS_BIT_TIME_OF_DAY,
+ TIMER_CLASS_BIT_TIME_OF_DAY
+ );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Clock_Nop: {
+ /*
+ * Objects referenced by parameters in the past call to
+ * rtems_timer_fire_when() shall not be accessed by the
+ * rtems_timer_fire_when() call.
+ */
+ T_eq_int( class, ctx->pre_class );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Clock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Post_State_Check(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Post_State state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Post_State_Scheduled: {
+ /*
+ * The timer shall be in scheduled state.
+ */
+ TriggerTimer( ctx, &ctx->tod_till_fire );
+ T_eq_int( ctx->invocations, 1 );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_State_Nop: {
+ /*
+ * Objects referenced by parameters in the past call to
+ * rtems_timer_fire_when() shall not be accessed by the
+ * rtems_timer_fire_when() call.
+ */
+ T_eq_int( ctx->post_state, ctx->pre_state );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_State_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Post_WallTime_Check(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Post_WallTime state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Post_WallTime_Param: {
+ /*
+ * The Timer Service Routine shall be invoked at the wall time (see
+ * realtime clock) (ignoring ticks), which was provided by the
+ * ``wall_time`` parameter in the past call to rtems_timer_fire_when().
+ */
+ T_eq_mem(
+ &ctx->tod_till_fire,
+ ctx->wall_time_param,
+ sizeof( ctx->tod_till_fire )
+ );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_WallTime_Nop: {
+ /*
+ * If and when the Timer Service Routine will be invoked shall not be
+ * changed by the past call to rtems_timer_fire_when().
+ */
+ /*
+ * Whether the timer is scheduled has already been tested by the
+ * "Nop" "State" post-condition above.
+ */
+ T_eq_u32(
+ ctx->post_scheduling_data.interval,
+ ctx->pre_scheduling_data.interval
+ );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_WallTime_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Post_Routine_Check(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Post_Routine state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Post_Routine_Param: {
+ /*
+ * The function reference used to invoke the Timer Service Routine when
+ * the timer will fire shall be the one provided by the ``routine``
+ * parameter in the past call to rtems_timer_fire_when().
+ */
+ T_eq_int( ctx->invocations, 1 );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Routine_Nop: {
+ /*
+ * The function reference used for any invocation of the Timer Service
+ * Routine shall not be changed by the past call to
+ * rtems_timer_fire_when().
+ */
+ T_eq_ptr(
+ ctx->post_scheduling_data.routine,
+ ctx->pre_scheduling_data.routine
+ );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_Routine_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Post_UserData_Check(
+ RtemsTimerReqFireWhen_Context *ctx,
+ RtemsTimerReqFireWhen_Post_UserData state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqFireWhen_Post_UserData_Param: {
+ /*
+ * The user data argument for invoking the Timer Service Routine when the
+ * timer will fire shall be the one provided by the ``user_data``
+ * parameter in the past call to rtems_timer_fire_when().
+ */
+ T_eq_ptr( ctx->routine_user_data, ctx );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_UserData_Nop: {
+ /*
+ * The user data argument used for any invocation of the Timer Service
+ * Routine shall not be changed by the past call to
+ * rtems_timer_fire_when().
+ */
+ T_eq_ptr(
+ ctx->post_scheduling_data.user_data,
+ ctx->pre_scheduling_data.user_data
+ );
+ break;
+ }
+
+ case RtemsTimerReqFireWhen_Post_UserData_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqFireWhen_Setup( RtemsTimerReqFireWhen_Context *ctx )
+{
+ rtems_status_code status;
+ status = rtems_timer_initiate_server(
+ RTEMS_TIMER_SERVER_DEFAULT_PRIORITY,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_ATTRIBUTES
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsTimerReqFireWhen_Setup_Wrap( void *arg )
+{
+ RtemsTimerReqFireWhen_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqFireWhen_Setup( ctx );
+}
+
+/**
+ * @brief Make sure the timer server is not running and the realtime clock is
+ * not set after this test.
+ */
+static void RtemsTimerReqFireWhen_Teardown(
+ RtemsTimerReqFireWhen_Context *ctx
+)
+{
+ DeleteTimerServer();
+ UnsetClock();
+}
+
+static void RtemsTimerReqFireWhen_Teardown_Wrap( void *arg )
+{
+ RtemsTimerReqFireWhen_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqFireWhen_Teardown( ctx );
+}
+
+static void RtemsTimerReqFireWhen_Prepare( RtemsTimerReqFireWhen_Context *ctx )
+{
+ rtems_status_code status;
+ status = rtems_timer_create(
+ rtems_build_name( 'T', 'I', 'M', 'E' ),
+ &ctx->timer_id
+ );
+ T_rsc_success( status );
+
+ ctx->invocations = 0;
+ ctx->routine_user_data = NULL;
+}
+
+static void RtemsTimerReqFireWhen_Action( RtemsTimerReqFireWhen_Context *ctx )
+{
+ GetTimerSchedulingData( ctx->timer_id, &ctx->pre_scheduling_data );
+ ctx->pre_class = GetTimerClass( ctx->timer_id );
+ if ( ctx->pre_cond_tod == NULL ) {
+ UnsetClock();
+ } else {
+ T_rsc_success( rtems_clock_set( ctx->pre_cond_tod ) );
+ }
+ ctx->status = rtems_timer_fire_when(
+ ctx->id_param,
+ ctx->wall_time_param,
+ ctx->routine_param,
+ ctx
+ );
+ ctx->post_state = GetTimerState( ctx->timer_id );
+ GetTimerSchedulingData( ctx->timer_id, &ctx->post_scheduling_data );
+ /* Ignoring return status: the timer server task may be suspended or not. */
+ rtems_task_resume( GetTimerServerTaskId() );
+}
+
+static void RtemsTimerReqFireWhen_Cleanup( RtemsTimerReqFireWhen_Context *ctx )
+{
+ T_rsc_success( rtems_timer_delete( ctx->timer_id ) );
+}
+
+static const RtemsTimerReqFireWhen_Entry
+RtemsTimerReqFireWhen_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqFireWhen_Post_Status_NA,
+ RtemsTimerReqFireWhen_Post_Context_NA, RtemsTimerReqFireWhen_Post_Clock_NA,
+ RtemsTimerReqFireWhen_Post_State_NA,
+ RtemsTimerReqFireWhen_Post_WallTime_NA,
+ RtemsTimerReqFireWhen_Post_Routine_NA,
+ RtemsTimerReqFireWhen_Post_UserData_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqFireWhen_Post_Status_InvAddr,
+ RtemsTimerReqFireWhen_Post_Context_Nop,
+ RtemsTimerReqFireWhen_Post_Clock_Nop, RtemsTimerReqFireWhen_Post_State_Nop,
+ RtemsTimerReqFireWhen_Post_WallTime_Nop,
+ RtemsTimerReqFireWhen_Post_Routine_Nop,
+ RtemsTimerReqFireWhen_Post_UserData_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqFireWhen_Post_Status_NotDef,
+ RtemsTimerReqFireWhen_Post_Context_Nop,
+ RtemsTimerReqFireWhen_Post_Clock_Nop, RtemsTimerReqFireWhen_Post_State_Nop,
+ RtemsTimerReqFireWhen_Post_WallTime_Nop,
+ RtemsTimerReqFireWhen_Post_Routine_Nop,
+ RtemsTimerReqFireWhen_Post_UserData_Nop },
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqFireWhen_Post_Status_NA,
+ RtemsTimerReqFireWhen_Post_Context_NA, RtemsTimerReqFireWhen_Post_Clock_NA,
+ RtemsTimerReqFireWhen_Post_State_NA,
+ RtemsTimerReqFireWhen_Post_WallTime_NA,
+ RtemsTimerReqFireWhen_Post_Routine_NA,
+ RtemsTimerReqFireWhen_Post_UserData_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqFireWhen_Post_Status_InvClock,
+ RtemsTimerReqFireWhen_Post_Context_Nop,
+ RtemsTimerReqFireWhen_Post_Clock_Nop, RtemsTimerReqFireWhen_Post_State_Nop,
+ RtemsTimerReqFireWhen_Post_WallTime_Nop,
+ RtemsTimerReqFireWhen_Post_Routine_Nop,
+ RtemsTimerReqFireWhen_Post_UserData_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqFireWhen_Post_Status_Ok,
+ RtemsTimerReqFireWhen_Post_Context_Interrupt,
+ RtemsTimerReqFireWhen_Post_Clock_Realtime,
+ RtemsTimerReqFireWhen_Post_State_Scheduled,
+ RtemsTimerReqFireWhen_Post_WallTime_Param,
+ RtemsTimerReqFireWhen_Post_Routine_Param,
+ RtemsTimerReqFireWhen_Post_UserData_Param },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqFireWhen_Post_Status_InvId,
+ RtemsTimerReqFireWhen_Post_Context_Nop,
+ RtemsTimerReqFireWhen_Post_Clock_Nop, RtemsTimerReqFireWhen_Post_State_Nop,
+ RtemsTimerReqFireWhen_Post_WallTime_Nop,
+ RtemsTimerReqFireWhen_Post_Routine_Nop,
+ RtemsTimerReqFireWhen_Post_UserData_Nop }
+};
+
+static const uint8_t
+RtemsTimerReqFireWhen_Map[] = {
+ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 5,
+ 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 6, 6, 0, 0, 0, 0, 6, 6, 6, 6,
+ 6, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4, 0, 0, 0, 0, 4, 4, 4,
+ 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4, 0, 0, 0, 0, 4, 4,
+ 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4, 0, 0, 0, 0, 4,
+ 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4, 0, 0, 0, 0,
+ 4, 4, 4, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0,
+ 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0,
+ 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0,
+ 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1,
+ 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1,
+ 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0,
+ 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
+ 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
+ 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2, 2, 3, 3, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2, 2, 3, 3, 3, 2, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2, 2, 3, 3, 3, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2, 2, 3, 3, 3, 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2, 2, 3, 3, 3, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2, 2, 3, 3, 3, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2, 2, 3, 3, 3, 2, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2, 2, 3, 3, 3, 2, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2, 2, 3, 3, 3, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2, 2, 3, 3, 3,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2, 2, 3, 3,
+ 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2, 2, 3,
+ 3, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2, 2,
+ 3, 3, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2, 2,
+ 2, 3, 3, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0, 2,
+ 2, 2, 3, 3, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 3, 3, 3, 0, 0, 0,
+ 2, 2, 2, 3, 3, 3
+};
+
+static size_t RtemsTimerReqFireWhen_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTimerReqFireWhen_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTimerReqFireWhen_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTimerReqFireWhen_Fixture = {
+ .setup = RtemsTimerReqFireWhen_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTimerReqFireWhen_Teardown_Wrap,
+ .scope = RtemsTimerReqFireWhen_Scope,
+ .initial_context = &RtemsTimerReqFireWhen_Instance
+};
+
+static inline RtemsTimerReqFireWhen_Entry RtemsTimerReqFireWhen_PopEntry(
+ RtemsTimerReqFireWhen_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTimerReqFireWhen_Entries[
+ RtemsTimerReqFireWhen_Map[ index ]
+ ];
+}
+
+static void RtemsTimerReqFireWhen_TestVariant(
+ RtemsTimerReqFireWhen_Context *ctx
+)
+{
+ RtemsTimerReqFireWhen_Pre_RtClock_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTimerReqFireWhen_Pre_Routine_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTimerReqFireWhen_Pre_WallTime_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTimerReqFireWhen_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTimerReqFireWhen_Pre_Context_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsTimerReqFireWhen_Pre_Clock_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsTimerReqFireWhen_Pre_State_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsTimerReqFireWhen_Action( ctx );
+ RtemsTimerReqFireWhen_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTimerReqFireWhen_Post_Context_Check( ctx, ctx->Map.entry.Post_Context );
+ RtemsTimerReqFireWhen_Post_Clock_Check( ctx, ctx->Map.entry.Post_Clock );
+ RtemsTimerReqFireWhen_Post_State_Check( ctx, ctx->Map.entry.Post_State );
+ RtemsTimerReqFireWhen_Post_WallTime_Check(
+ ctx,
+ ctx->Map.entry.Post_WallTime
+ );
+ RtemsTimerReqFireWhen_Post_Routine_Check( ctx, ctx->Map.entry.Post_Routine );
+ RtemsTimerReqFireWhen_Post_UserData_Check(
+ ctx,
+ ctx->Map.entry.Post_UserData
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTimerReqFireWhen( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTimerReqFireWhen, &RtemsTimerReqFireWhen_Fixture )
+{
+ RtemsTimerReqFireWhen_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTimerReqFireWhen_Pre_RtClock_Set;
+ ctx->Map.pcs[ 0 ] < RtemsTimerReqFireWhen_Pre_RtClock_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTimerReqFireWhen_Pre_Routine_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsTimerReqFireWhen_Pre_Routine_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsTimerReqFireWhen_Pre_WallTime_Valid;
+ ctx->Map.pcs[ 2 ] < RtemsTimerReqFireWhen_Pre_WallTime_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsTimerReqFireWhen_Pre_Id_Valid;
+ ctx->Map.pcs[ 3 ] < RtemsTimerReqFireWhen_Pre_Id_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsTimerReqFireWhen_Pre_Context_None;
+ ctx->Map.pcs[ 4 ] < RtemsTimerReqFireWhen_Pre_Context_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = RtemsTimerReqFireWhen_Pre_Clock_None;
+ ctx->Map.pcs[ 5 ] < RtemsTimerReqFireWhen_Pre_Clock_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 6 ] = RtemsTimerReqFireWhen_Pre_State_Inactive;
+ ctx->Map.pcs[ 6 ] < RtemsTimerReqFireWhen_Pre_State_NA;
+ ++ctx->Map.pcs[ 6 ]
+ ) {
+ ctx->Map.entry = RtemsTimerReqFireWhen_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsTimerReqFireWhen_Prepare( ctx );
+ RtemsTimerReqFireWhen_TestVariant( ctx );
+ RtemsTimerReqFireWhen_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timer-ident.c b/testsuites/validation/tc-timer-ident.c
new file mode 100644
index 0000000000..e39ec73b9a
--- /dev/null
+++ b/testsuites/validation/tc-timer-ident.c
@@ -0,0 +1,117 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTimerValIdent
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident-local.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTimerValIdent spec:/rtems/timer/val/ident
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Test the rtems_timer_ident() directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API timer class
+ * objects defined by spec:/rtems/req/ident-local.
+ *
+ * @{
+ */
+
+#define NAME_LOCAL_OBJECT rtems_build_name( 'T', 'I', 'M', 'R' )
+
+static rtems_status_code ClassicTimerIdentAction(
+ rtems_name name,
+ rtems_id *id
+)
+{
+ return rtems_timer_ident( name, id );
+}
+
+/**
+ * @brief Run the generic object identification tests for Classic API timer
+ * class objects defined by spec:/rtems/req/ident-local.
+ */
+static void RtemsTimerValIdent_Action_0( void )
+{
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_timer_create(
+ NAME_LOCAL_OBJECT,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdentLocal_Run(
+ id_local_object,
+ NAME_LOCAL_OBJECT,
+ ClassicTimerIdentAction
+ );
+
+ sc = rtems_timer_delete( id_local_object );
+ T_rsc_success( sc );
+}
+
+/**
+ * @fn void T_case_body_RtemsTimerValIdent( void )
+ */
+T_TEST_CASE( RtemsTimerValIdent )
+{
+ RtemsTimerValIdent_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timer-initiate-server.c b/testsuites/validation/tc-timer-initiate-server.c
new file mode 100644
index 0000000000..7a21a3a10b
--- /dev/null
+++ b/testsuites/validation/tc-timer-initiate-server.c
@@ -0,0 +1,816 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTimerReqInitiateServer
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/rtems/timerimpl.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTimerReqInitiateServer spec:/rtems/timer/req/initiate-server
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTimerReqInitiateServer_Pre_Priority_Valid,
+ RtemsTimerReqInitiateServer_Pre_Priority_Default,
+ RtemsTimerReqInitiateServer_Pre_Priority_Invalid,
+ RtemsTimerReqInitiateServer_Pre_Priority_NA
+} RtemsTimerReqInitiateServer_Pre_Priority;
+
+typedef enum {
+ RtemsTimerReqInitiateServer_Pre_Stack_Allocatable,
+ RtemsTimerReqInitiateServer_Pre_Stack_TooLarge,
+ RtemsTimerReqInitiateServer_Pre_Stack_NA
+} RtemsTimerReqInitiateServer_Pre_Stack;
+
+typedef enum {
+ RtemsTimerReqInitiateServer_Pre_Started_Yes,
+ RtemsTimerReqInitiateServer_Pre_Started_No,
+ RtemsTimerReqInitiateServer_Pre_Started_NA
+} RtemsTimerReqInitiateServer_Pre_Started;
+
+typedef enum {
+ RtemsTimerReqInitiateServer_Pre_TaskObj_Available,
+ RtemsTimerReqInitiateServer_Pre_TaskObj_Unavailable,
+ RtemsTimerReqInitiateServer_Pre_TaskObj_NA
+} RtemsTimerReqInitiateServer_Pre_TaskObj;
+
+typedef enum {
+ RtemsTimerReqInitiateServer_Post_Status_Ok,
+ RtemsTimerReqInitiateServer_Post_Status_IncStat,
+ RtemsTimerReqInitiateServer_Post_Status_InvPrio,
+ RtemsTimerReqInitiateServer_Post_Status_TooMany,
+ RtemsTimerReqInitiateServer_Post_Status_Unsat,
+ RtemsTimerReqInitiateServer_Post_Status_NA
+} RtemsTimerReqInitiateServer_Post_Status;
+
+typedef enum {
+ RtemsTimerReqInitiateServer_Post_Started_Yes,
+ RtemsTimerReqInitiateServer_Post_Started_No,
+ RtemsTimerReqInitiateServer_Post_Started_NA
+} RtemsTimerReqInitiateServer_Post_Started;
+
+typedef enum {
+ RtemsTimerReqInitiateServer_Post_TaskPrio_Set,
+ RtemsTimerReqInitiateServer_Post_TaskPrio_Nop,
+ RtemsTimerReqInitiateServer_Post_TaskPrio_NA
+} RtemsTimerReqInitiateServer_Post_TaskPrio;
+
+typedef enum {
+ RtemsTimerReqInitiateServer_Post_TaskStack_Set,
+ RtemsTimerReqInitiateServer_Post_TaskStack_Nop,
+ RtemsTimerReqInitiateServer_Post_TaskStack_NA
+} RtemsTimerReqInitiateServer_Post_TaskStack;
+
+typedef enum {
+ RtemsTimerReqInitiateServer_Post_TaskAttr_Set,
+ RtemsTimerReqInitiateServer_Post_TaskAttr_Nop,
+ RtemsTimerReqInitiateServer_Post_TaskAttr_NA
+} RtemsTimerReqInitiateServer_Post_TaskAttr;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Priority_NA : 1;
+ uint16_t Pre_Stack_NA : 1;
+ uint16_t Pre_Started_NA : 1;
+ uint16_t Pre_TaskObj_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_Started : 2;
+ uint16_t Post_TaskPrio : 2;
+ uint16_t Post_TaskStack : 2;
+ uint16_t Post_TaskAttr : 2;
+} RtemsTimerReqInitiateServer_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/timer/req/initiate-server test case.
+ */
+typedef struct {
+ /**
+ * @brief If the Timer Server task exists before the action, its priority
+ * before the action.
+ */
+ rtems_task_priority before_priority;
+
+ /**
+ * @brief If the Timer Server task exists before the action, its stack size
+ * before the action.
+ */
+ size_t before_stack_size;
+
+ /**
+ * @brief If the Timer Server task exists before the action, whether the
+ * floating point attribute is set before the action.
+ */
+ bool before_has_floating_point;
+
+ /**
+ * @brief The ``priority`` parameter for the action.
+ */
+ rtems_task_priority priority;
+
+ /**
+ * @brief The ``stack_size`` parameter for the action.
+ */
+ size_t stack_size;
+
+ /**
+ * @brief The status value returned by the action
+ * rtems_timer_initiate_server().
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member is used by the T_seize_objects() and
+ * T_surrender_objects() support functions.
+ */
+ void *task_objects;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 4 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTimerReqInitiateServer_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTimerReqInitiateServer_Context;
+
+static RtemsTimerReqInitiateServer_Context
+ RtemsTimerReqInitiateServer_Instance;
+
+static const char * const RtemsTimerReqInitiateServer_PreDesc_Priority[] = {
+ "Valid",
+ "Default",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTimerReqInitiateServer_PreDesc_Stack[] = {
+ "Allocatable",
+ "TooLarge",
+ "NA"
+};
+
+static const char * const RtemsTimerReqInitiateServer_PreDesc_Started[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const RtemsTimerReqInitiateServer_PreDesc_TaskObj[] = {
+ "Available",
+ "Unavailable",
+ "NA"
+};
+
+static const char * const * const RtemsTimerReqInitiateServer_PreDesc[] = {
+ RtemsTimerReqInitiateServer_PreDesc_Priority,
+ RtemsTimerReqInitiateServer_PreDesc_Stack,
+ RtemsTimerReqInitiateServer_PreDesc_Started,
+ RtemsTimerReqInitiateServer_PreDesc_TaskObj,
+ NULL
+};
+
+static bool ExistTimerServer( void )
+{
+ return GetTimerServerTaskId() != RTEMS_INVALID_ID;
+}
+
+static rtems_task_priority GetTimerServerPriority( void )
+{
+ return GetPriority( GetTimerServerTaskId() );
+}
+
+static size_t GetTimerServerStackSize( void )
+{
+ rtems_tcb *tcb;
+ rtems_id server_task_id;
+ server_task_id = GetTimerServerTaskId();
+ T_ne_u32( server_task_id, RTEMS_INVALID_ID );
+ tcb = GetThread( server_task_id );
+ T_not_null( tcb );
+ return tcb->Start.Initial_stack.size;
+}
+
+static bool HasTimerServerFloatingPoint( void )
+{
+ rtems_tcb *tcb;
+ rtems_id server_task_id;
+ server_task_id = GetTimerServerTaskId();
+ T_ne_u32( server_task_id, RTEMS_INVALID_ID );
+ tcb = GetThread( server_task_id );
+ T_not_null( tcb );
+ return tcb->is_fp;
+}
+
+static rtems_status_code AllocateTaskObject( void *arg, rtems_id *task_id )
+{
+ (void) arg;
+
+ return rtems_task_create(
+ rtems_build_name( 'T', 'A', ' ', 'N' ),
+ PRIO_LOW,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ task_id
+ );
+}
+
+static void RtemsTimerReqInitiateServer_Pre_Priority_Prepare(
+ RtemsTimerReqInitiateServer_Context *ctx,
+ RtemsTimerReqInitiateServer_Pre_Priority state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqInitiateServer_Pre_Priority_Valid: {
+ /*
+ * While the ``priority`` parameter is valid.
+ */
+ ctx->priority = 13;
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Pre_Priority_Default: {
+ /*
+ * While the ``priority`` parameter is equal to
+ * RTEMS_TIMER_SERVER_DEFAULT_PRIORITY.
+ */
+ ctx->priority = RTEMS_TIMER_SERVER_DEFAULT_PRIORITY;
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Pre_Priority_Invalid: {
+ /*
+ * While the ``priority`` parameter is invalid.
+ */
+ ctx->priority = PRIO_INVALID;
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Pre_Priority_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqInitiateServer_Pre_Stack_Prepare(
+ RtemsTimerReqInitiateServer_Context *ctx,
+ RtemsTimerReqInitiateServer_Pre_Stack state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqInitiateServer_Pre_Stack_Allocatable: {
+ /*
+ * While the ``stack_size`` parameter specifies a task stack size which
+ * is allocatable by the system.
+ */
+ ctx->stack_size = RTEMS_MINIMUM_STACK_SIZE;
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Pre_Stack_TooLarge: {
+ /*
+ * While the ``stack_size`` parameter specifies a task stack size which
+ * is not allocatable by the system.
+ */
+ ctx->stack_size = SIZE_MAX;
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Pre_Stack_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqInitiateServer_Pre_Started_Prepare(
+ RtemsTimerReqInitiateServer_Context *ctx,
+ RtemsTimerReqInitiateServer_Pre_Started state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqInitiateServer_Pre_Started_Yes: {
+ /*
+ * While the Timer Server task is started.
+ */
+ rtems_status_code status;
+
+ if ( !ExistTimerServer() ) {
+ status = rtems_timer_initiate_server(
+ RTEMS_TIMER_SERVER_DEFAULT_PRIORITY,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_ATTRIBUTES
+ );
+ T_rsc_success( status );
+ }
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Pre_Started_No: {
+ /*
+ * While the Timer Server task is not started.
+ */
+ DeleteTimerServer();
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Pre_Started_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqInitiateServer_Pre_TaskObj_Prepare(
+ RtemsTimerReqInitiateServer_Context *ctx,
+ RtemsTimerReqInitiateServer_Pre_TaskObj state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqInitiateServer_Pre_TaskObj_Available: {
+ /*
+ * While the system has at least one inactive task object available.
+ */
+ /* The test clean up ensures that all tasks objects are free. */
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Pre_TaskObj_Unavailable: {
+ /*
+ * While the system has no inactive task object available.
+ */
+ ctx->task_objects = T_seize_objects(
+ AllocateTaskObject,
+ NULL
+ );
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Pre_TaskObj_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqInitiateServer_Post_Status_Check(
+ RtemsTimerReqInitiateServer_Context *ctx,
+ RtemsTimerReqInitiateServer_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqInitiateServer_Post_Status_Ok: {
+ /*
+ * The return status of rtems_timer_initiate_server() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Post_Status_IncStat: {
+ /*
+ * The return status of rtems_timer_initiate_server() shall be
+ * RTEMS_INCORRECT_STATE
+ */
+ T_rsc( ctx->status, RTEMS_INCORRECT_STATE );
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Post_Status_InvPrio: {
+ /*
+ * The return status of rtems_timer_initiate_server() shall be
+ * RTEMS_INVALID_PRIORITY.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_PRIORITY );
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Post_Status_TooMany: {
+ /*
+ * The return status of rtems_timer_initiate_server() shall be
+ * RTEMS_TOO_MANY.
+ */
+ T_rsc( ctx->status, RTEMS_TOO_MANY );
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Post_Status_Unsat: {
+ /*
+ * The return status of rtems_timer_initiate_server() shall be
+ * RTEMS_UNSATISFIED.
+ */
+ T_rsc( ctx->status, RTEMS_UNSATISFIED );
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqInitiateServer_Post_Started_Check(
+ RtemsTimerReqInitiateServer_Context *ctx,
+ RtemsTimerReqInitiateServer_Post_Started state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqInitiateServer_Post_Started_Yes: {
+ /*
+ * The Timer Server task shall be started after the
+ * rtems_timer_initiate_server() call.
+ */
+ T_true( ExistTimerServer() );
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Post_Started_No: {
+ /*
+ * The Timer Server task shall not be started after the
+ * rtems_timer_initiate_server() call.
+ */
+ T_false( ExistTimerServer() );
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Post_Started_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqInitiateServer_Post_TaskPrio_Check(
+ RtemsTimerReqInitiateServer_Context *ctx,
+ RtemsTimerReqInitiateServer_Post_TaskPrio state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqInitiateServer_Post_TaskPrio_Set: {
+ /*
+ * The priority of the Timer Server task shall be equal to the priority
+ * specified by the ``priority`` parameter in the
+ * rtems_timer_initiate_server() call.
+ */
+ if ( ctx->priority == RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) {
+ T_eq_u32( GetTimerServerPriority(), 0 );
+ } else {
+ T_eq_u32( GetTimerServerPriority(), ctx->priority );
+ }
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Post_TaskPrio_Nop: {
+ /*
+ * The priority of the Timer Server task shall not be modified by the
+ * rtems_timer_initiate_server() call.
+ */
+ T_eq_u32( GetTimerServerPriority(), ctx->before_priority );
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Post_TaskPrio_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqInitiateServer_Post_TaskStack_Check(
+ RtemsTimerReqInitiateServer_Context *ctx,
+ RtemsTimerReqInitiateServer_Post_TaskStack state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqInitiateServer_Post_TaskStack_Set: {
+ /*
+ * The stack size of the Timer Server task shall be greater than or equal
+ * to the stack size specified by the ``stack_size`` parameter in the
+ * rtems_timer_initiate_server() call.
+ */
+ T_ge_sz( GetTimerServerStackSize(), ctx->stack_size );
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Post_TaskStack_Nop: {
+ /*
+ * The stack size of the Timer Server task shall not be modified by the
+ * rtems_timer_initiate_server() call.
+ */
+ T_ge_sz( GetTimerServerStackSize(), ctx->before_stack_size );
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Post_TaskStack_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqInitiateServer_Post_TaskAttr_Check(
+ RtemsTimerReqInitiateServer_Context *ctx,
+ RtemsTimerReqInitiateServer_Post_TaskAttr state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqInitiateServer_Post_TaskAttr_Set: {
+ /*
+ * The task attributes of the Timer Server task shall be specified by the
+ * ``attribute_set`` parameter in the rtems_timer_initiate_server() call.
+ */
+ T_true( HasTimerServerFloatingPoint() );
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Post_TaskAttr_Nop: {
+ /*
+ * The task attributes of the Timer Server task shall not be modified by
+ * the rtems_timer_initiate_server() call.
+ */
+ T_true( HasTimerServerFloatingPoint() == ctx->before_has_floating_point );
+ break;
+ }
+
+ case RtemsTimerReqInitiateServer_Post_TaskAttr_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqInitiateServer_Setup(
+ RtemsTimerReqInitiateServer_Context *ctx
+)
+{
+ ctx->task_objects = NULL;
+}
+
+static void RtemsTimerReqInitiateServer_Setup_Wrap( void *arg )
+{
+ RtemsTimerReqInitiateServer_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqInitiateServer_Setup( ctx );
+}
+
+/**
+ * @brief Make sure the time server in not running after this test.
+ */
+static void RtemsTimerReqInitiateServer_Teardown(
+ RtemsTimerReqInitiateServer_Context *ctx
+)
+{
+ DeleteTimerServer();
+}
+
+static void RtemsTimerReqInitiateServer_Teardown_Wrap( void *arg )
+{
+ RtemsTimerReqInitiateServer_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqInitiateServer_Teardown( ctx );
+}
+
+static void RtemsTimerReqInitiateServer_Action(
+ RtemsTimerReqInitiateServer_Context *ctx
+)
+{
+ if ( ExistTimerServer() ) {
+ ctx->before_priority = GetTimerServerPriority();
+ ctx->before_stack_size = GetTimerServerStackSize();
+ ctx->before_has_floating_point = HasTimerServerFloatingPoint();
+ }
+
+ ctx->status = rtems_timer_initiate_server(
+ ctx->priority,
+ ctx->stack_size,
+ RTEMS_FLOATING_POINT
+ );
+}
+
+static void RtemsTimerReqInitiateServer_Cleanup(
+ RtemsTimerReqInitiateServer_Context *ctx
+)
+{
+ T_surrender_objects( &ctx->task_objects, rtems_task_delete );
+}
+
+static const RtemsTimerReqInitiateServer_Entry
+RtemsTimerReqInitiateServer_Entries[] = {
+ { 0, 0, 0, 0, 0, RtemsTimerReqInitiateServer_Post_Status_IncStat,
+ RtemsTimerReqInitiateServer_Post_Started_Yes,
+ RtemsTimerReqInitiateServer_Post_TaskPrio_Nop,
+ RtemsTimerReqInitiateServer_Post_TaskStack_Nop,
+ RtemsTimerReqInitiateServer_Post_TaskAttr_Nop },
+ { 0, 0, 0, 0, 0, RtemsTimerReqInitiateServer_Post_Status_TooMany,
+ RtemsTimerReqInitiateServer_Post_Started_No,
+ RtemsTimerReqInitiateServer_Post_TaskPrio_NA,
+ RtemsTimerReqInitiateServer_Post_TaskStack_NA,
+ RtemsTimerReqInitiateServer_Post_TaskAttr_NA },
+ { 0, 0, 0, 0, 0, RtemsTimerReqInitiateServer_Post_Status_InvPrio,
+ RtemsTimerReqInitiateServer_Post_Started_No,
+ RtemsTimerReqInitiateServer_Post_TaskPrio_NA,
+ RtemsTimerReqInitiateServer_Post_TaskStack_NA,
+ RtemsTimerReqInitiateServer_Post_TaskAttr_NA },
+ { 0, 0, 0, 0, 0, RtemsTimerReqInitiateServer_Post_Status_Ok,
+ RtemsTimerReqInitiateServer_Post_Started_Yes,
+ RtemsTimerReqInitiateServer_Post_TaskPrio_Set,
+ RtemsTimerReqInitiateServer_Post_TaskStack_Set,
+ RtemsTimerReqInitiateServer_Post_TaskAttr_Set },
+ { 0, 0, 0, 0, 0, RtemsTimerReqInitiateServer_Post_Status_Unsat,
+ RtemsTimerReqInitiateServer_Post_Started_No,
+ RtemsTimerReqInitiateServer_Post_TaskPrio_NA,
+ RtemsTimerReqInitiateServer_Post_TaskStack_NA,
+ RtemsTimerReqInitiateServer_Post_TaskAttr_NA }
+};
+
+static const uint8_t
+RtemsTimerReqInitiateServer_Map[] = {
+ 0, 0, 3, 1, 0, 0, 4, 1, 0, 0, 3, 1, 0, 0, 4, 1, 0, 0, 2, 2, 0, 0, 2, 2
+};
+
+static size_t RtemsTimerReqInitiateServer_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ RtemsTimerReqInitiateServer_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsTimerReqInitiateServer_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTimerReqInitiateServer_Fixture = {
+ .setup = RtemsTimerReqInitiateServer_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTimerReqInitiateServer_Teardown_Wrap,
+ .scope = RtemsTimerReqInitiateServer_Scope,
+ .initial_context = &RtemsTimerReqInitiateServer_Instance
+};
+
+static inline RtemsTimerReqInitiateServer_Entry
+RtemsTimerReqInitiateServer_PopEntry(
+ RtemsTimerReqInitiateServer_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTimerReqInitiateServer_Entries[
+ RtemsTimerReqInitiateServer_Map[ index ]
+ ];
+}
+
+static void RtemsTimerReqInitiateServer_TestVariant(
+ RtemsTimerReqInitiateServer_Context *ctx
+)
+{
+ RtemsTimerReqInitiateServer_Pre_Priority_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTimerReqInitiateServer_Pre_Stack_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTimerReqInitiateServer_Pre_Started_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTimerReqInitiateServer_Pre_TaskObj_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTimerReqInitiateServer_Action( ctx );
+ RtemsTimerReqInitiateServer_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsTimerReqInitiateServer_Post_Started_Check(
+ ctx,
+ ctx->Map.entry.Post_Started
+ );
+ RtemsTimerReqInitiateServer_Post_TaskPrio_Check(
+ ctx,
+ ctx->Map.entry.Post_TaskPrio
+ );
+ RtemsTimerReqInitiateServer_Post_TaskStack_Check(
+ ctx,
+ ctx->Map.entry.Post_TaskStack
+ );
+ RtemsTimerReqInitiateServer_Post_TaskAttr_Check(
+ ctx,
+ ctx->Map.entry.Post_TaskAttr
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTimerReqInitiateServer( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsTimerReqInitiateServer,
+ &RtemsTimerReqInitiateServer_Fixture
+)
+{
+ RtemsTimerReqInitiateServer_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTimerReqInitiateServer_Pre_Priority_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsTimerReqInitiateServer_Pre_Priority_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTimerReqInitiateServer_Pre_Stack_Allocatable;
+ ctx->Map.pcs[ 1 ] < RtemsTimerReqInitiateServer_Pre_Stack_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsTimerReqInitiateServer_Pre_Started_Yes;
+ ctx->Map.pcs[ 2 ] < RtemsTimerReqInitiateServer_Pre_Started_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsTimerReqInitiateServer_Pre_TaskObj_Available;
+ ctx->Map.pcs[ 3 ] < RtemsTimerReqInitiateServer_Pre_TaskObj_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ ctx->Map.entry = RtemsTimerReqInitiateServer_PopEntry( ctx );
+ RtemsTimerReqInitiateServer_TestVariant( ctx );
+ RtemsTimerReqInitiateServer_Cleanup( ctx );
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timer-reset.c b/testsuites/validation/tc-timer-reset.c
new file mode 100644
index 0000000000..709b9fe8a5
--- /dev/null
+++ b/testsuites/validation/tc-timer-reset.c
@@ -0,0 +1,1058 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTimerReqReset
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTimerReqReset spec:/rtems/timer/req/reset
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTimerReqReset_Pre_Id_Valid,
+ RtemsTimerReqReset_Pre_Id_Invalid,
+ RtemsTimerReqReset_Pre_Id_NA
+} RtemsTimerReqReset_Pre_Id;
+
+typedef enum {
+ RtemsTimerReqReset_Pre_Context_None,
+ RtemsTimerReqReset_Pre_Context_Interrupt,
+ RtemsTimerReqReset_Pre_Context_Server,
+ RtemsTimerReqReset_Pre_Context_NA
+} RtemsTimerReqReset_Pre_Context;
+
+typedef enum {
+ RtemsTimerReqReset_Pre_Clock_None,
+ RtemsTimerReqReset_Pre_Clock_Ticks,
+ RtemsTimerReqReset_Pre_Clock_Realtime,
+ RtemsTimerReqReset_Pre_Clock_NA
+} RtemsTimerReqReset_Pre_Clock;
+
+typedef enum {
+ RtemsTimerReqReset_Pre_State_Inactive,
+ RtemsTimerReqReset_Pre_State_Scheduled,
+ RtemsTimerReqReset_Pre_State_Pending,
+ RtemsTimerReqReset_Pre_State_NA
+} RtemsTimerReqReset_Pre_State;
+
+typedef enum {
+ RtemsTimerReqReset_Post_Status_Ok,
+ RtemsTimerReqReset_Post_Status_InvId,
+ RtemsTimerReqReset_Post_Status_NotDef,
+ RtemsTimerReqReset_Post_Status_NA
+} RtemsTimerReqReset_Post_Status;
+
+typedef enum {
+ RtemsTimerReqReset_Post_Context_None,
+ RtemsTimerReqReset_Post_Context_Interrupt,
+ RtemsTimerReqReset_Post_Context_Server,
+ RtemsTimerReqReset_Post_Context_Nop,
+ RtemsTimerReqReset_Post_Context_NA
+} RtemsTimerReqReset_Post_Context;
+
+typedef enum {
+ RtemsTimerReqReset_Post_Clock_None,
+ RtemsTimerReqReset_Post_Clock_Ticks,
+ RtemsTimerReqReset_Post_Clock_Realtime,
+ RtemsTimerReqReset_Post_Clock_Nop,
+ RtemsTimerReqReset_Post_Clock_NA
+} RtemsTimerReqReset_Post_Clock;
+
+typedef enum {
+ RtemsTimerReqReset_Post_State_Scheduled,
+ RtemsTimerReqReset_Post_State_Nop,
+ RtemsTimerReqReset_Post_State_NA
+} RtemsTimerReqReset_Post_State;
+
+typedef enum {
+ RtemsTimerReqReset_Post_Interval_Last,
+ RtemsTimerReqReset_Post_Interval_Nop,
+ RtemsTimerReqReset_Post_Interval_NA
+} RtemsTimerReqReset_Post_Interval;
+
+typedef enum {
+ RtemsTimerReqReset_Post_Routine_Last,
+ RtemsTimerReqReset_Post_Routine_Nop,
+ RtemsTimerReqReset_Post_Routine_NA
+} RtemsTimerReqReset_Post_Routine;
+
+typedef enum {
+ RtemsTimerReqReset_Post_UserData_Last,
+ RtemsTimerReqReset_Post_UserData_Nop,
+ RtemsTimerReqReset_Post_UserData_NA
+} RtemsTimerReqReset_Post_UserData;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Id_NA : 1;
+ uint32_t Pre_Context_NA : 1;
+ uint32_t Pre_Clock_NA : 1;
+ uint32_t Pre_State_NA : 1;
+ uint32_t Post_Status : 2;
+ uint32_t Post_Context : 3;
+ uint32_t Post_Clock : 3;
+ uint32_t Post_State : 2;
+ uint32_t Post_Interval : 2;
+ uint32_t Post_Routine : 2;
+ uint32_t Post_UserData : 2;
+} RtemsTimerReqReset_Entry;
+
+typedef enum {
+ PRE_NONE = 0,
+ PRE_INTERRUPT = 1,
+ PRE_SERVER = 2
+} PreConditionContext;
+
+typedef enum {
+ SCHEDULE_NONE = 0,
+ SCHEDULE_SOON = 1,
+ SCHEDULE_LATER = 2,
+ SCHEDULE_MAX = 5
+} Scheduling_Ticks;
+
+/**
+ * @brief Test context for spec:/rtems/timer/req/reset test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a valid id of a timer.
+ */
+ rtems_id timer_id;
+
+ /**
+ * @brief This member specifies the ``id`` parameter for the action.
+ */
+ rtems_id id_param;
+
+ /**
+ * @brief This member contains the returned status code of the action.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member contains the user data for Timer Service Routine "A".
+ */
+ void *data_a;
+
+ /**
+ * @brief This member contains the user data for Timer Service Routine "B".
+ */
+ void *data_b;
+
+ /**
+ * @brief This member contains the counter for invocations of Timer Service
+ * Routine "A".
+ */
+ int invocations_a;
+
+ /**
+ * @brief This member contains the counter for invocations of Timer Service
+ * Routine "B".
+ */
+ int invocations_b;
+
+ /**
+ * @brief This member contains the number of ticks needed to fire the Timer
+ * Service Routine.
+ */
+ Scheduling_Ticks ticks_till_fire;
+
+ /**
+ * @brief This member identifier the user data given to the Timer Service
+ * Routine when called. It either the address of member data_a or data_b.
+ */
+ void **routine_user_data;
+
+ /**
+ * @brief This member contains a reference to the user data to be used in the
+ * next call to the Timer Service Routine.
+ */
+ void **scheduled_user_data;
+
+ /**
+ * @brief This member contains 1 if the Timer Service Routine "A" has been
+ * scheduled otherwise 0.
+ */
+ int scheduled_invocations_a;
+
+ /**
+ * @brief This member contains 1 if the Timer Service Routine "B" has been
+ * scheduled otherwise 0.
+ */
+ int scheduled_invocations_b;
+
+ /**
+ * @brief This member specifies the number of ticks till the scheduled Timer
+ * Service Routine should fire.
+ */
+ Scheduling_Ticks scheduled_ticks_till_fire;
+
+ /**
+ * @brief This member specifies which pre-condition context (none, interrupt
+ * context, server context) must be created before the rtems_timer_reset()
+ * action gets executed.
+ */
+ PreConditionContext pre_cond_contex;
+
+ /**
+ * @brief This member stores internal clock and context settings of the timer
+ * before the execution of the test action.
+ */
+ Timer_Classes pre_class;
+
+ /**
+ * @brief This member stores the state of the timer before the execution of
+ * the test action.
+ */
+ Timer_States pre_state;
+
+ /**
+ * @brief This member stores the state of the timer after the execution of
+ * the test action.
+ */
+ Timer_States post_state;
+
+ /**
+ * @brief This member stores the scheduling data of the timer before the
+ * execution of the test action.
+ */
+ Timer_Scheduling_Data pre_scheduling_data;
+
+ /**
+ * @brief This member stores the scheduling data of the timer after the
+ * execution of the test action.
+ */
+ Timer_Scheduling_Data post_scheduling_data;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 4 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTimerReqReset_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTimerReqReset_Context;
+
+static RtemsTimerReqReset_Context
+ RtemsTimerReqReset_Instance;
+
+static const char * const RtemsTimerReqReset_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTimerReqReset_PreDesc_Context[] = {
+ "None",
+ "Interrupt",
+ "Server",
+ "NA"
+};
+
+static const char * const RtemsTimerReqReset_PreDesc_Clock[] = {
+ "None",
+ "Ticks",
+ "Realtime",
+ "NA"
+};
+
+static const char * const RtemsTimerReqReset_PreDesc_State[] = {
+ "Inactive",
+ "Scheduled",
+ "Pending",
+ "NA"
+};
+
+static const char * const * const RtemsTimerReqReset_PreDesc[] = {
+ RtemsTimerReqReset_PreDesc_Id,
+ RtemsTimerReqReset_PreDesc_Context,
+ RtemsTimerReqReset_PreDesc_Clock,
+ RtemsTimerReqReset_PreDesc_State,
+ NULL
+};
+
+static const rtems_time_of_day tod_now = { 2000, 1, 1, 0, 0, 0, 0 };
+static const rtems_time_of_day tod_schedule = { 2000, 1, 1, 1, 0, 0, 0 };
+static const rtems_time_of_day tod_fire = { 2000, 1, 2, 0, 0, 0, 0 };
+
+static Scheduling_Ticks TriggerTimer( const RtemsTimerReqReset_Context *ctx )
+{
+ int ticks_fired = SCHEDULE_NONE;
+ int invocations_old = ctx->invocations_a + ctx->invocations_b;
+
+ /* Fire the timer service routine for ticks and realtime clock */
+ int i;
+ for ( i = 1; i <= SCHEDULE_MAX; ++i ) {
+ ClockTick();
+ if ( ctx->invocations_a + ctx->invocations_b > invocations_old ) {
+ ticks_fired = i;
+ break;
+ }
+ }
+
+ T_rsc_success( rtems_clock_set( &tod_fire ) );
+
+ return ticks_fired;
+}
+
+static void TimerServiceRoutineA(
+ rtems_id timer_id,
+ void *user_data
+)
+{
+ RtemsTimerReqReset_Context *ctx =
+ *(RtemsTimerReqReset_Context **) user_data;
+ ++( ctx->invocations_a );
+ ctx->routine_user_data = user_data;
+}
+
+static void TimerServiceRoutineB(
+ rtems_id timer_id,
+ void *user_data
+)
+{
+ RtemsTimerReqReset_Context *ctx =
+ *(RtemsTimerReqReset_Context **) user_data;
+ ++( ctx->invocations_b );
+ ctx->routine_user_data = user_data;
+}
+
+static void RtemsTimerReqReset_Pre_Id_Prepare(
+ RtemsTimerReqReset_Context *ctx,
+ RtemsTimerReqReset_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqReset_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is valid.
+ */
+ ctx->id_param = ctx->timer_id;
+ break;
+ }
+
+ case RtemsTimerReqReset_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id_param = RTEMS_ID_NONE;
+ break;
+ }
+
+ case RtemsTimerReqReset_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqReset_Pre_Context_Prepare(
+ RtemsTimerReqReset_Context *ctx,
+ RtemsTimerReqReset_Pre_Context state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqReset_Pre_Context_None: {
+ /*
+ * While the Timer Service Routine has never been scheduled since
+ * creation of the timer. See also none.
+ */
+ ctx->pre_cond_contex = PRE_NONE;
+ break;
+ }
+
+ case RtemsTimerReqReset_Pre_Context_Interrupt: {
+ /*
+ * While the timer is in interrupt context.
+ */
+ ctx->pre_cond_contex = PRE_INTERRUPT;
+ break;
+ }
+
+ case RtemsTimerReqReset_Pre_Context_Server: {
+ /*
+ * While the timer is in server context.
+ */
+ ctx->pre_cond_contex = PRE_SERVER;
+ break;
+ }
+
+ case RtemsTimerReqReset_Pre_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqReset_Pre_Clock_Prepare(
+ RtemsTimerReqReset_Context *ctx,
+ RtemsTimerReqReset_Pre_Clock state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqReset_Pre_Clock_None: {
+ /*
+ * While the timer has never been scheduled since creation of the timer.
+ */
+ T_eq_int( ctx->pre_cond_contex, PRE_NONE );
+ break;
+ }
+
+ case RtemsTimerReqReset_Pre_Clock_Ticks: {
+ /*
+ * While the clock used to determine when the timer will fire is the
+ * ticks based clock.
+ */
+ rtems_status_code status;
+
+ if ( ctx->pre_cond_contex == PRE_INTERRUPT ) {
+ ctx->scheduled_ticks_till_fire = SCHEDULE_SOON;
+ ctx->scheduled_invocations_a = 1;
+ ctx->scheduled_user_data = &ctx->data_a;
+ status = rtems_timer_fire_after(
+ ctx->timer_id,
+ ctx->scheduled_ticks_till_fire,
+ TimerServiceRoutineA,
+ ctx->scheduled_user_data
+ );
+ } else {
+ ctx->scheduled_ticks_till_fire = SCHEDULE_LATER;
+ ctx->scheduled_invocations_b = 1;
+ ctx->scheduled_user_data = &ctx->data_b;
+ status = rtems_timer_server_fire_after(
+ ctx->timer_id,
+ ctx->scheduled_ticks_till_fire,
+ TimerServiceRoutineB,
+ ctx->scheduled_user_data
+ );
+ }
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqReset_Pre_Clock_Realtime: {
+ /*
+ * While the clock used to determine when the timer will fire is the
+ * realtime clock.
+ */
+ rtems_status_code status;
+
+ if ( ctx->pre_cond_contex == PRE_INTERRUPT ) {
+ status = rtems_timer_fire_when(
+ ctx->timer_id,
+ &tod_schedule,
+ TimerServiceRoutineA,
+ &ctx->data_a
+ );
+ } else {
+ status = rtems_timer_server_fire_when(
+ ctx->timer_id,
+ &tod_schedule,
+ TimerServiceRoutineB,
+ &ctx->data_b
+ );
+ }
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqReset_Pre_Clock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqReset_Pre_State_Prepare(
+ RtemsTimerReqReset_Context *ctx,
+ RtemsTimerReqReset_Pre_State state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqReset_Pre_State_Inactive: {
+ /*
+ * While the timer is in inactive state.
+ */
+ TriggerTimer( ctx );
+ T_eq_int(
+ ctx->invocations_a + ctx->invocations_b,
+ ( ctx->pre_cond_contex == PRE_NONE ) ? 0 : 1
+ );
+ ctx->invocations_a = 0;
+ ctx->invocations_b = 0;
+ ctx->pre_state = TIMER_INACTIVE;
+ break;
+ }
+
+ case RtemsTimerReqReset_Pre_State_Scheduled: {
+ /*
+ * While the timer is in scheduled state.
+ */
+ /* The timer was already scheduled in the "Clock" pre-conditions. */
+ ctx->pre_state = TIMER_SCHEDULED;
+ break;
+ }
+
+ case RtemsTimerReqReset_Pre_State_Pending: {
+ /*
+ * While the timer is in pending state.
+ */
+ T_rsc_success( rtems_task_suspend( GetTimerServerTaskId() ) );
+ TriggerTimer( ctx );
+ T_eq_int( ctx->invocations_a + ctx->invocations_b, 0 );
+ ctx->pre_state = TIMER_PENDING;
+ break;
+ }
+
+ case RtemsTimerReqReset_Pre_State_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqReset_Post_Status_Check(
+ RtemsTimerReqReset_Context *ctx,
+ RtemsTimerReqReset_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqReset_Post_Status_Ok: {
+ /*
+ * The return status of rtems_timer_reset() shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Status_InvId: {
+ /*
+ * The return status of rtems_timer_reset() shall be RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Status_NotDef: {
+ /*
+ * The return status of rtems_timer_reset() shall be RTEMS_NOT_DEFINED
+ */
+ T_rsc( ctx->status, RTEMS_NOT_DEFINED );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqReset_Post_Context_Check(
+ RtemsTimerReqReset_Context *ctx,
+ RtemsTimerReqReset_Post_Context state
+)
+{
+ Timer_Classes class;
+ class = GetTimerClass( ctx->timer_id );
+
+ switch ( state ) {
+ case RtemsTimerReqReset_Post_Context_None: {
+ /*
+ * The timer shall have never been scheduled. See also none.
+ */
+ T_eq_int( class, TIMER_DORMANT );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Context_Interrupt: {
+ /*
+ * The timer shall be in interrupt context.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, 0 );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Context_Server: {
+ /*
+ * The timer shall be in server context.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, TIMER_CLASS_BIT_ON_TASK );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Context_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past call to
+ * rtems_timer_reset() shall not be accessed by the rtems_timer_reset()
+ * call. See also Nop.
+ */
+ T_eq_int( class, ctx->pre_class );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqReset_Post_Clock_Check(
+ RtemsTimerReqReset_Context *ctx,
+ RtemsTimerReqReset_Post_Clock state
+)
+{
+ Timer_Classes class;
+ class = GetTimerClass( ctx->timer_id );
+
+ switch ( state ) {
+ case RtemsTimerReqReset_Post_Clock_None: {
+ /*
+ * The timer shall have never been scheduled.
+ */
+ T_eq_int( class, TIMER_DORMANT );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Clock_Ticks: {
+ /*
+ * The timer shall use the ticks based clock.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_TIME_OF_DAY, 0 );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Clock_Realtime: {
+ /*
+ * The timer shall use the realtime clock.
+ */
+ T_eq_int(
+ class & TIMER_CLASS_BIT_TIME_OF_DAY,
+ TIMER_CLASS_BIT_TIME_OF_DAY
+ );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Clock_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past call to
+ * rtems_timer_reset() shall not be accessed by the rtems_timer_reset()
+ * call.
+ */
+ T_eq_int( class, ctx->pre_class );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Clock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqReset_Post_State_Check(
+ RtemsTimerReqReset_Context *ctx,
+ RtemsTimerReqReset_Post_State state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqReset_Post_State_Scheduled: {
+ /*
+ * The timer shall be in scheduled state.
+ */
+ ctx->ticks_till_fire = TriggerTimer( ctx );
+ T_eq_int( ctx->invocations_a + ctx->invocations_b, 1 );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_State_Nop: {
+ /*
+ * Objects referenced by the ``id`` parameter in past call to
+ * rtems_timer_reset() shall not be accessed by the rtems_timer_reset()
+ * call.
+ */
+ T_eq_int( ctx->post_state, ctx->pre_state );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_State_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqReset_Post_Interval_Check(
+ RtemsTimerReqReset_Context *ctx,
+ RtemsTimerReqReset_Post_Interval state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqReset_Post_Interval_Last: {
+ /*
+ * The Timer Service Routine shall be invoked the same number of ticks
+ * (see tick), as defined by the last scheduled interval, after a point
+ * in time during the execution of the rtems_timer_reset() call.
+ */
+ T_eq_int( ctx->ticks_till_fire, ctx->scheduled_ticks_till_fire );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Interval_Nop: {
+ /*
+ * If and when the Timer Service Routine will be invoked shall not be
+ * changed by the past call to rtems_timer_reset().
+ */
+ /*
+ * Whether the timer is scheduled has already been tested by the
+ * "Nop" "State" post-condition above.
+ */
+ T_eq_u32(
+ ctx->post_scheduling_data.interval,
+ ctx->pre_scheduling_data.interval
+ );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Interval_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqReset_Post_Routine_Check(
+ RtemsTimerReqReset_Context *ctx,
+ RtemsTimerReqReset_Post_Routine state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqReset_Post_Routine_Last: {
+ /*
+ * The function reference used to invoke the Timer Service Routine when
+ * the timer will fire shall be the same one as the last one scheduled.
+ */
+ T_eq_int( ctx->invocations_a, ctx->scheduled_invocations_a );
+ T_eq_int( ctx->invocations_b, ctx->scheduled_invocations_b );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Routine_Nop: {
+ /*
+ * The function reference used for any invocation of the Timer Service
+ * Routine shall not be changed by the past call to rtems_timer_reset().
+ */
+ T_eq_ptr(
+ ctx->post_scheduling_data.routine,
+ ctx->pre_scheduling_data.routine
+ );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_Routine_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqReset_Post_UserData_Check(
+ RtemsTimerReqReset_Context *ctx,
+ RtemsTimerReqReset_Post_UserData state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqReset_Post_UserData_Last: {
+ /*
+ * The user data argument for invoking the Timer Service Routine when the
+ * timer will fire shall be the same as the last scheduled user data
+ * argument.
+ */
+ T_eq_ptr( ctx->routine_user_data, ctx->scheduled_user_data);
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_UserData_Nop: {
+ /*
+ * The user data argument used for any invocation of the Timer Service
+ * Routine shall not be changed by the past call to rtems_timer_reset().
+ */
+ T_eq_ptr(
+ ctx->post_scheduling_data.user_data,
+ ctx->pre_scheduling_data.user_data
+ );
+ break;
+ }
+
+ case RtemsTimerReqReset_Post_UserData_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqReset_Setup( RtemsTimerReqReset_Context *ctx )
+{
+ rtems_status_code status;
+ status = rtems_timer_initiate_server(
+ RTEMS_TIMER_SERVER_DEFAULT_PRIORITY,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_ATTRIBUTES
+ );
+ T_rsc_success( status );
+}
+
+static void RtemsTimerReqReset_Setup_Wrap( void *arg )
+{
+ RtemsTimerReqReset_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqReset_Setup( ctx );
+}
+
+/**
+ * @brief Make sure the timer server is not running and the realtime clock is
+ * not set after this test.
+ */
+static void RtemsTimerReqReset_Teardown( RtemsTimerReqReset_Context *ctx )
+{
+ DeleteTimerServer();
+ UnsetClock();
+}
+
+static void RtemsTimerReqReset_Teardown_Wrap( void *arg )
+{
+ RtemsTimerReqReset_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqReset_Teardown( ctx );
+}
+
+static void RtemsTimerReqReset_Prepare( RtemsTimerReqReset_Context *ctx )
+{
+ rtems_status_code status;
+ status = rtems_timer_create(
+ rtems_build_name( 'T', 'I', 'M', 'E' ),
+ &ctx->timer_id
+ );
+ T_rsc_success( status );
+
+ ctx->data_a = ctx;
+ ctx->data_b = ctx;
+ ctx->invocations_a = 0;
+ ctx->invocations_b = 0;
+ ctx->ticks_till_fire = SCHEDULE_NONE;
+ ctx->routine_user_data = NULL;
+ ctx->scheduled_invocations_a = 0;
+ ctx->scheduled_invocations_b = 0;
+ ctx->scheduled_ticks_till_fire = SCHEDULE_NONE;
+ T_rsc_success( rtems_clock_set( &tod_now ) );
+}
+
+static void RtemsTimerReqReset_Action( RtemsTimerReqReset_Context *ctx )
+{
+ GetTimerSchedulingData( ctx->timer_id, &ctx->pre_scheduling_data );
+ ctx->pre_class = GetTimerClass( ctx->timer_id );
+ ctx->status = rtems_timer_reset( ctx->id_param );
+ ctx->post_state = GetTimerState( ctx->timer_id );
+ GetTimerSchedulingData( ctx->timer_id, &ctx->post_scheduling_data );
+ /* Ignoring return status: the timer server task may be suspended or not. */
+ rtems_task_resume( GetTimerServerTaskId() );
+}
+
+static void RtemsTimerReqReset_Cleanup( RtemsTimerReqReset_Context *ctx )
+{
+ T_rsc_success( rtems_timer_delete( ctx->timer_id ) );
+}
+
+static const RtemsTimerReqReset_Entry
+RtemsTimerReqReset_Entries[] = {
+ { 1, 0, 0, 0, 0, RtemsTimerReqReset_Post_Status_NA,
+ RtemsTimerReqReset_Post_Context_NA, RtemsTimerReqReset_Post_Clock_NA,
+ RtemsTimerReqReset_Post_State_NA, RtemsTimerReqReset_Post_Interval_NA,
+ RtemsTimerReqReset_Post_Routine_NA, RtemsTimerReqReset_Post_UserData_NA },
+ { 0, 0, 0, 0, 0, RtemsTimerReqReset_Post_Status_InvId,
+ RtemsTimerReqReset_Post_Context_Nop, RtemsTimerReqReset_Post_Clock_Nop,
+ RtemsTimerReqReset_Post_State_Nop, RtemsTimerReqReset_Post_Interval_Nop,
+ RtemsTimerReqReset_Post_Routine_Nop, RtemsTimerReqReset_Post_UserData_Nop },
+ { 0, 0, 0, 0, 0, RtemsTimerReqReset_Post_Status_NotDef,
+ RtemsTimerReqReset_Post_Context_Nop, RtemsTimerReqReset_Post_Clock_Nop,
+ RtemsTimerReqReset_Post_State_Nop, RtemsTimerReqReset_Post_Interval_Nop,
+ RtemsTimerReqReset_Post_Routine_Nop, RtemsTimerReqReset_Post_UserData_Nop },
+ { 0, 0, 0, 0, 0, RtemsTimerReqReset_Post_Status_Ok,
+ RtemsTimerReqReset_Post_Context_Server,
+ RtemsTimerReqReset_Post_Clock_Ticks,
+ RtemsTimerReqReset_Post_State_Scheduled,
+ RtemsTimerReqReset_Post_Interval_Last,
+ RtemsTimerReqReset_Post_Routine_Last, RtemsTimerReqReset_Post_UserData_Last },
+ { 0, 0, 0, 0, 0, RtemsTimerReqReset_Post_Status_Ok,
+ RtemsTimerReqReset_Post_Context_Interrupt,
+ RtemsTimerReqReset_Post_Clock_Ticks,
+ RtemsTimerReqReset_Post_State_Scheduled,
+ RtemsTimerReqReset_Post_Interval_Last,
+ RtemsTimerReqReset_Post_Routine_Last, RtemsTimerReqReset_Post_UserData_Last }
+};
+
+static const uint8_t
+RtemsTimerReqReset_Map[] = {
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 2, 2, 0, 0, 0, 0, 3, 3, 3, 2, 2,
+ 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,
+ 1, 1
+};
+
+static size_t RtemsTimerReqReset_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTimerReqReset_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsTimerReqReset_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTimerReqReset_Fixture = {
+ .setup = RtemsTimerReqReset_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsTimerReqReset_Teardown_Wrap,
+ .scope = RtemsTimerReqReset_Scope,
+ .initial_context = &RtemsTimerReqReset_Instance
+};
+
+static inline RtemsTimerReqReset_Entry RtemsTimerReqReset_PopEntry(
+ RtemsTimerReqReset_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTimerReqReset_Entries[
+ RtemsTimerReqReset_Map[ index ]
+ ];
+}
+
+static void RtemsTimerReqReset_TestVariant( RtemsTimerReqReset_Context *ctx )
+{
+ RtemsTimerReqReset_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTimerReqReset_Pre_Context_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTimerReqReset_Pre_Clock_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTimerReqReset_Pre_State_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTimerReqReset_Action( ctx );
+ RtemsTimerReqReset_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsTimerReqReset_Post_Context_Check( ctx, ctx->Map.entry.Post_Context );
+ RtemsTimerReqReset_Post_Clock_Check( ctx, ctx->Map.entry.Post_Clock );
+ RtemsTimerReqReset_Post_State_Check( ctx, ctx->Map.entry.Post_State );
+ RtemsTimerReqReset_Post_Interval_Check( ctx, ctx->Map.entry.Post_Interval );
+ RtemsTimerReqReset_Post_Routine_Check( ctx, ctx->Map.entry.Post_Routine );
+ RtemsTimerReqReset_Post_UserData_Check( ctx, ctx->Map.entry.Post_UserData );
+}
+
+/**
+ * @fn void T_case_body_RtemsTimerReqReset( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTimerReqReset, &RtemsTimerReqReset_Fixture )
+{
+ RtemsTimerReqReset_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTimerReqReset_Pre_Id_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsTimerReqReset_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTimerReqReset_Pre_Context_None;
+ ctx->Map.pcs[ 1 ] < RtemsTimerReqReset_Pre_Context_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsTimerReqReset_Pre_Clock_None;
+ ctx->Map.pcs[ 2 ] < RtemsTimerReqReset_Pre_Clock_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsTimerReqReset_Pre_State_Inactive;
+ ctx->Map.pcs[ 3 ] < RtemsTimerReqReset_Pre_State_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ ctx->Map.entry = RtemsTimerReqReset_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsTimerReqReset_Prepare( ctx );
+ RtemsTimerReqReset_TestVariant( ctx );
+ RtemsTimerReqReset_Cleanup( ctx );
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timer-server-fire-after.c b/testsuites/validation/tc-timer-server-fire-after.c
new file mode 100644
index 0000000000..3ee91d8461
--- /dev/null
+++ b/testsuites/validation/tc-timer-server-fire-after.c
@@ -0,0 +1,1301 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTimerReqServerFireAfter
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTimerReqServerFireAfter \
+ * spec:/rtems/timer/req/server-fire-after
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Pre_Server_Init,
+ RtemsTimerReqServerFireAfter_Pre_Server_NotInit,
+ RtemsTimerReqServerFireAfter_Pre_Server_NA
+} RtemsTimerReqServerFireAfter_Pre_Server;
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Pre_Ticks_Valid,
+ RtemsTimerReqServerFireAfter_Pre_Ticks_Is0,
+ RtemsTimerReqServerFireAfter_Pre_Ticks_NA
+} RtemsTimerReqServerFireAfter_Pre_Ticks;
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Pre_Routine_Valid,
+ RtemsTimerReqServerFireAfter_Pre_Routine_Null,
+ RtemsTimerReqServerFireAfter_Pre_Routine_NA
+} RtemsTimerReqServerFireAfter_Pre_Routine;
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Pre_Id_Valid,
+ RtemsTimerReqServerFireAfter_Pre_Id_Invalid,
+ RtemsTimerReqServerFireAfter_Pre_Id_NA
+} RtemsTimerReqServerFireAfter_Pre_Id;
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Pre_Context_None,
+ RtemsTimerReqServerFireAfter_Pre_Context_Interrupt,
+ RtemsTimerReqServerFireAfter_Pre_Context_Server,
+ RtemsTimerReqServerFireAfter_Pre_Context_NA
+} RtemsTimerReqServerFireAfter_Pre_Context;
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Pre_Clock_None,
+ RtemsTimerReqServerFireAfter_Pre_Clock_Ticks,
+ RtemsTimerReqServerFireAfter_Pre_Clock_Realtime,
+ RtemsTimerReqServerFireAfter_Pre_Clock_NA
+} RtemsTimerReqServerFireAfter_Pre_Clock;
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Pre_State_Inactive,
+ RtemsTimerReqServerFireAfter_Pre_State_Scheduled,
+ RtemsTimerReqServerFireAfter_Pre_State_Pending,
+ RtemsTimerReqServerFireAfter_Pre_State_NA
+} RtemsTimerReqServerFireAfter_Pre_State;
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Post_Status_Ok,
+ RtemsTimerReqServerFireAfter_Post_Status_InvId,
+ RtemsTimerReqServerFireAfter_Post_Status_InvAddr,
+ RtemsTimerReqServerFireAfter_Post_Status_InvNum,
+ RtemsTimerReqServerFireAfter_Post_Status_IncStat,
+ RtemsTimerReqServerFireAfter_Post_Status_NA
+} RtemsTimerReqServerFireAfter_Post_Status;
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Post_Context_None,
+ RtemsTimerReqServerFireAfter_Post_Context_Interrupt,
+ RtemsTimerReqServerFireAfter_Post_Context_Server,
+ RtemsTimerReqServerFireAfter_Post_Context_Nop,
+ RtemsTimerReqServerFireAfter_Post_Context_NA
+} RtemsTimerReqServerFireAfter_Post_Context;
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Post_Clock_None,
+ RtemsTimerReqServerFireAfter_Post_Clock_Ticks,
+ RtemsTimerReqServerFireAfter_Post_Clock_Realtime,
+ RtemsTimerReqServerFireAfter_Post_Clock_Nop,
+ RtemsTimerReqServerFireAfter_Post_Clock_NA
+} RtemsTimerReqServerFireAfter_Post_Clock;
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Post_State_Scheduled,
+ RtemsTimerReqServerFireAfter_Post_State_Nop,
+ RtemsTimerReqServerFireAfter_Post_State_NA
+} RtemsTimerReqServerFireAfter_Post_State;
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Post_Interval_Param,
+ RtemsTimerReqServerFireAfter_Post_Interval_Nop,
+ RtemsTimerReqServerFireAfter_Post_Interval_NA
+} RtemsTimerReqServerFireAfter_Post_Interval;
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Post_Routine_Param,
+ RtemsTimerReqServerFireAfter_Post_Routine_Nop,
+ RtemsTimerReqServerFireAfter_Post_Routine_NA
+} RtemsTimerReqServerFireAfter_Post_Routine;
+
+typedef enum {
+ RtemsTimerReqServerFireAfter_Post_UserData_Param,
+ RtemsTimerReqServerFireAfter_Post_UserData_Nop,
+ RtemsTimerReqServerFireAfter_Post_UserData_NA
+} RtemsTimerReqServerFireAfter_Post_UserData;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Server_NA : 1;
+ uint32_t Pre_Ticks_NA : 1;
+ uint32_t Pre_Routine_NA : 1;
+ uint32_t Pre_Id_NA : 1;
+ uint32_t Pre_Context_NA : 1;
+ uint32_t Pre_Clock_NA : 1;
+ uint32_t Pre_State_NA : 1;
+ uint32_t Post_Status : 3;
+ uint32_t Post_Context : 3;
+ uint32_t Post_Clock : 3;
+ uint32_t Post_State : 2;
+ uint32_t Post_Interval : 2;
+ uint32_t Post_Routine : 2;
+ uint32_t Post_UserData : 2;
+} RtemsTimerReqServerFireAfter_Entry;
+
+typedef enum {
+ PRE_NONE = 0,
+ PRE_INTERRUPT = 1,
+ PRE_SERVER = 2
+} PreConditionContext;
+
+typedef enum {
+ SCHEDULE_NONE = 0,
+ SCHEDULE_VERY_SOON = 1,
+ SCHEDULE_SOON = 2,
+ SCHEDULE_LATER = 3,
+ SCHEDULE_MAX = 5
+} Scheduling_Ticks;
+
+/**
+ * @brief Test context for spec:/rtems/timer/req/server-fire-after test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a valid id of a timer.
+ */
+ rtems_id timer_id;
+
+ /**
+ * @brief This member contains a valid id of a second timer.
+ *
+ * This timer is used reach branch coverage in an if-statement which only
+ * serves performance optimization.
+ */
+ rtems_id timer_cover_id;
+
+ /**
+ * @brief This member specifies the ``id`` parameter for the action.
+ */
+ rtems_id id_param;
+
+ /**
+ * @brief This member specifies the ``ticks`` parameter for the action.
+ */
+ rtems_interval ticks_param;
+
+ /**
+ * @brief This member specifies the ``routine`` parameter for the action.
+ */
+ rtems_timer_service_routine_entry routine_param;
+
+ /**
+ * @brief This member contains the returned status code of the action.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member contains a counter for invocations of the Timer Service
+ * Routine.
+ */
+ int invocations;
+
+ /**
+ * @brief Function TriggerTimer() is used to figure out how many ticks (see
+ * tick) are needed till the Timer Service Routine gets executed. This
+ * member contains the number of ticks needed to fire the Timer Service
+ * Routine.
+ */
+ Scheduling_Ticks ticks_till_fire;
+
+ /**
+ * @brief This member contains the user data given to the Timer Service
+ * Routine when called.
+ */
+ void *routine_user_data;
+
+ /**
+ * @brief This member specifies which pre-condition context (none, interrupt
+ * context, server context) must be created before the
+ * rtems_timer_server_fire_after() action gets executed.
+ */
+ PreConditionContext pre_cond_contex;
+
+ /**
+ * @brief This member stores internal clock and context settings of the timer
+ * before the execution of the test action.
+ */
+ Timer_Classes pre_class;
+
+ /**
+ * @brief This member stores the state of the timer before the execution of
+ * the test action.
+ */
+ Timer_States pre_state;
+
+ /**
+ * @brief This member stores the state of the timer after the execution of
+ * the test action.
+ */
+ Timer_States post_state;
+
+ /**
+ * @brief This member stores the scheduling data of the timer before the
+ * execution of the test action.
+ */
+ Timer_Scheduling_Data pre_scheduling_data;
+
+ /**
+ * @brief This member stores the scheduling data of the timer after the
+ * execution of the test action.
+ */
+ Timer_Scheduling_Data post_scheduling_data;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 7 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTimerReqServerFireAfter_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTimerReqServerFireAfter_Context;
+
+static RtemsTimerReqServerFireAfter_Context
+ RtemsTimerReqServerFireAfter_Instance;
+
+static const char * const RtemsTimerReqServerFireAfter_PreDesc_Server[] = {
+ "Init",
+ "NotInit",
+ "NA"
+};
+
+static const char * const RtemsTimerReqServerFireAfter_PreDesc_Ticks[] = {
+ "Valid",
+ "Is0",
+ "NA"
+};
+
+static const char * const RtemsTimerReqServerFireAfter_PreDesc_Routine[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsTimerReqServerFireAfter_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTimerReqServerFireAfter_PreDesc_Context[] = {
+ "None",
+ "Interrupt",
+ "Server",
+ "NA"
+};
+
+static const char * const RtemsTimerReqServerFireAfter_PreDesc_Clock[] = {
+ "None",
+ "Ticks",
+ "Realtime",
+ "NA"
+};
+
+static const char * const RtemsTimerReqServerFireAfter_PreDesc_State[] = {
+ "Inactive",
+ "Scheduled",
+ "Pending",
+ "NA"
+};
+
+static const char * const * const RtemsTimerReqServerFireAfter_PreDesc[] = {
+ RtemsTimerReqServerFireAfter_PreDesc_Server,
+ RtemsTimerReqServerFireAfter_PreDesc_Ticks,
+ RtemsTimerReqServerFireAfter_PreDesc_Routine,
+ RtemsTimerReqServerFireAfter_PreDesc_Id,
+ RtemsTimerReqServerFireAfter_PreDesc_Context,
+ RtemsTimerReqServerFireAfter_PreDesc_Clock,
+ RtemsTimerReqServerFireAfter_PreDesc_State,
+ NULL
+};
+
+static const rtems_time_of_day tod_now = { 2000, 1, 1, 0, 0, 0, 0 };
+static const rtems_time_of_day tod_schedule = { 2000, 1, 1, 1, 0, 0, 0 };
+static const rtems_time_of_day tod_fire = { 2000, 1, 2, 0, 0, 0, 0 };
+
+static Scheduling_Ticks TriggerTimer( const RtemsTimerReqServerFireAfter_Context *ctx )
+{
+ int ticks_fired = SCHEDULE_NONE;
+ int invocations_old = ctx->invocations;
+
+ /* Fire the timer service routine for ticks and realtime clock */
+ int i;
+ for ( i = 1; i <= SCHEDULE_MAX; ++i ) {
+ ClockTick();
+ if ( ctx->invocations > invocations_old ) {
+ ticks_fired = i;
+ break;
+ }
+ }
+
+ T_rsc_success( rtems_clock_set( &tod_fire ) );
+
+ return ticks_fired;
+}
+
+static void TimerServiceRoutine(
+ rtems_id timer_id,
+ void *user_data
+)
+{
+ RtemsTimerReqServerFireAfter_Context *ctx = user_data;
+ ++( ctx->invocations );
+ ctx->routine_user_data = user_data;
+}
+
+/*
+ * This service routine is used reach branch coverage in an if-statement
+ * which only serves performance optimization.
+ */
+static void TimerServiceRoutineCover(
+ rtems_id timer_cover_id,
+ void *user_data
+)
+{
+ (void) timer_cover_id;
+ (void) user_data;
+}
+
+static void RtemsTimerReqServerFireAfter_Pre_Server_Prepare(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Pre_Server state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Pre_Server_Init: {
+ /*
+ * While the Timer Server task has been successfully initialized by a
+ * call to rtems_timer_initiate_server().
+ */
+ rtems_status_code status;
+ status = rtems_timer_initiate_server(
+ RTEMS_TIMER_SERVER_DEFAULT_PRIORITY,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_ATTRIBUTES
+ );
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Server_NotInit: {
+ /*
+ * While the Timer Server task has not been initialized and does not
+ * exist.
+ */
+ DeleteTimerServer();
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Server_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireAfter_Pre_Ticks_Prepare(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Pre_Ticks state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Pre_Ticks_Valid: {
+ /*
+ * While the ``ticks`` parameter is a positive (greater 0) number.
+ */
+ ctx->ticks_param = SCHEDULE_LATER;
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Ticks_Is0: {
+ /*
+ * While the ``ticks`` parameter is 0.
+ */
+ ctx->ticks_param = 0;
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Ticks_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireAfter_Pre_Routine_Prepare(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Pre_Routine state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Pre_Routine_Valid: {
+ /*
+ * While the ``routine`` parameter references an object of type
+ * rtems_timer_service_routine_entry.
+ */
+ ctx->routine_param = TimerServiceRoutine;
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Routine_Null: {
+ /*
+ * While the ``routine`` parameter is NULL..
+ */
+ ctx->routine_param = NULL;
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Routine_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireAfter_Pre_Id_Prepare(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is valid.
+ */
+ ctx->id_param = ctx->timer_id;
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id_param = RTEMS_ID_NONE;
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireAfter_Pre_Context_Prepare(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Pre_Context state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Pre_Context_None: {
+ /*
+ * While the Timer Service Routine has never been scheduled since
+ * creation of the timer. See also none.
+ */
+ ctx->pre_cond_contex = PRE_NONE;
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Context_Interrupt: {
+ /*
+ * While the timer is in interrupt context.
+ */
+ ctx->pre_cond_contex = PRE_INTERRUPT;
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Context_Server: {
+ /*
+ * While the timer is in server context.
+ */
+ ctx->pre_cond_contex = PRE_SERVER;
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireAfter_Pre_Clock_Prepare(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Pre_Clock state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Pre_Clock_None: {
+ /*
+ * While the timer has never been scheduled since creation of the timer.
+ */
+ T_eq_int( ctx->pre_cond_contex, PRE_NONE );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Clock_Ticks: {
+ /*
+ * While the clock used to determine when the timer will fire is the
+ * ticks based clock.
+ */
+ rtems_status_code status;
+
+ if ( ctx->pre_cond_contex == PRE_INTERRUPT ) {
+ status = rtems_timer_fire_after(
+ ctx->timer_id,
+ SCHEDULE_SOON,
+ TimerServiceRoutine,
+ ctx
+ );
+ } else {
+ status = rtems_timer_server_fire_after(
+ ctx->timer_id,
+ SCHEDULE_SOON,
+ TimerServiceRoutine,
+ ctx
+ );
+ }
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Clock_Realtime: {
+ /*
+ * While the clock used to determine when the timer will fire is the
+ * realtime clock.
+ */
+ rtems_status_code status;
+
+ if ( ctx->pre_cond_contex == PRE_INTERRUPT ) {
+ status = rtems_timer_fire_when(
+ ctx->timer_id,
+ &tod_schedule,
+ TimerServiceRoutine,
+ ctx
+ );
+ } else {
+ status = rtems_timer_server_fire_when(
+ ctx->timer_id,
+ &tod_schedule,
+ TimerServiceRoutine,
+ ctx
+ );
+ }
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_Clock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireAfter_Pre_State_Prepare(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Pre_State state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Pre_State_Inactive: {
+ /*
+ * While the timer is in inactive state.
+ */
+ TriggerTimer( ctx );
+ T_eq_int(
+ ctx->invocations,
+ ( ctx->pre_cond_contex == PRE_NONE ) ? 0 : 1
+ );
+ ctx->invocations = 0;
+ ctx->pre_state = TIMER_INACTIVE;
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_State_Scheduled: {
+ /*
+ * While the timer is in scheduled state.
+ */
+ /* The timer was already scheduled in the "Clock" pre-conditions. */
+ ctx->pre_state = TIMER_SCHEDULED;
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_State_Pending: {
+ /*
+ * While the timer is in pending state.
+ */
+ rtems_status_code status;
+ if ( ctx->pre_cond_contex == PRE_SERVER ) {
+ /*
+ * This call to rtems_timer_fire_after() serves to reach branch coverage
+ * in an if-statement which only serves performance optimization.
+ *
+ * cpukit/rtems/src/timerserver.c:70 else-branch was not reached:
+ * if ( wakeup ) {
+ * (void) rtems_event_system_send( ts->server_id, RTEMS_EVENT_SYSTEM_SERVER );
+ * }
+ */
+ status = rtems_timer_server_fire_after(
+ ctx->timer_cover_id,
+ SCHEDULE_VERY_SOON,
+ TimerServiceRoutineCover,
+ ctx
+ );
+ T_rsc_success( status );
+ }
+
+ T_rsc_success( rtems_task_suspend( GetTimerServerTaskId() ) );
+ TriggerTimer( ctx );
+ T_eq_int( ctx->invocations, 0 );
+ ctx->pre_state = TIMER_PENDING;
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Pre_State_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireAfter_Post_Status_Check(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Post_Status_Ok: {
+ /*
+ * The return status of rtems_timer_server_fire_after() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Status_InvId: {
+ /*
+ * The return status of rtems_timer_server_fire_after() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_timer_server_fire_after() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Status_InvNum: {
+ /*
+ * The return status of rtems_timer_server_fire_after() shall be
+ * RTEMS_INVALID_NUMBER.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NUMBER );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Status_IncStat: {
+ /*
+ * The return status of rtems_timer_server_fire_after() shall be
+ * RTEMS_INCORRECT_STATE.
+ */
+ T_rsc( ctx->status, RTEMS_INCORRECT_STATE );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireAfter_Post_Context_Check(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Post_Context state
+)
+{
+ Timer_Classes class;
+ class = GetTimerClass( ctx->timer_id );
+
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Post_Context_None: {
+ /*
+ * The timer shall have never been scheduled. See also none.
+ */
+ T_eq_int( class, TIMER_DORMANT );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Context_Interrupt: {
+ /*
+ * The timer shall be in interrupt context.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, 0 );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Context_Server: {
+ /*
+ * The timer shall be in server context.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, TIMER_CLASS_BIT_ON_TASK );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Context_Nop: {
+ /*
+ * Objects referenced by the parameters in the past call to
+ * rtems_timer_server_fire_after() shall not be accessed by the
+ * rtems_timer_server_fire_after() call. See also Nop.
+ */
+ T_eq_int( class, ctx->pre_class );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireAfter_Post_Clock_Check(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Post_Clock state
+)
+{
+ Timer_Classes class;
+ class = GetTimerClass( ctx->timer_id );
+
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Post_Clock_None: {
+ /*
+ * The timer shall have never been scheduled.
+ */
+ T_eq_int( class, TIMER_DORMANT );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Clock_Ticks: {
+ /*
+ * The timer shall use the ticks based clock.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_TIME_OF_DAY, 0 );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Clock_Realtime: {
+ /*
+ * The timer shall use the realtime clock.
+ */
+ T_eq_int(
+ class & TIMER_CLASS_BIT_TIME_OF_DAY,
+ TIMER_CLASS_BIT_TIME_OF_DAY
+ );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Clock_Nop: {
+ /*
+ * Objects referenced by the parameters in the past call to
+ * rtems_timer_server_fire_after() shall not be accessed by the
+ * rtems_timer_server_fire_after() call.
+ */
+ T_eq_int( class, ctx->pre_class );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Clock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireAfter_Post_State_Check(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Post_State state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Post_State_Scheduled: {
+ /*
+ * The timer shall be in scheduled state.
+ */
+ ctx->ticks_till_fire = TriggerTimer( ctx );
+ T_eq_int( ctx->invocations, 1 );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_State_Nop: {
+ /*
+ * Objects referenced by the parameters in the past call to
+ * rtems_timer_server_fire_after() shall not be accessed by the
+ * rtems_timer_server_fire_after() call.
+ */
+ T_eq_int( ctx->post_state, ctx->pre_state );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_State_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireAfter_Post_Interval_Check(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Post_Interval state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Post_Interval_Param: {
+ /*
+ * The Timer Service Routine shall be invoked the number of ticks (see
+ * tick), which are provided by the ``ticks`` parameter in the past call
+ * to rtems_timer_server_fire_after(), after a point in time during the
+ * execution of the rtems_timer_server_fire_after() call.
+ */
+ T_eq_int( ctx->ticks_till_fire, ctx->ticks_param );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Interval_Nop: {
+ /*
+ * If and when the Timer Service Routine will be invoked shall not be
+ * changed by the past call to rtems_timer_server_fire_after().
+ */
+ /*
+ * Whether the timer is scheduled has already been tested by the
+ * "Nop" "State" post-condition above.
+ */
+ T_eq_u32(
+ ctx->post_scheduling_data.interval,
+ ctx->pre_scheduling_data.interval
+ );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Interval_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireAfter_Post_Routine_Check(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Post_Routine state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Post_Routine_Param: {
+ /*
+ * The function reference used to invoke the Timer Service Routine when
+ * the timer will fire shall be the one provided by the ``routine``
+ * parameter in the past call to rtems_timer_server_fire_after().
+ */
+ T_eq_int( ctx->invocations, 1 );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Routine_Nop: {
+ /*
+ * The function reference used for any invocation of the Timer Service
+ * Routine shall not be changed by the past call to
+ * rtems_timer_server_fire_after().
+ */
+ T_eq_ptr(
+ ctx->post_scheduling_data.routine,
+ ctx->pre_scheduling_data.routine
+ );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_Routine_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireAfter_Post_UserData_Check(
+ RtemsTimerReqServerFireAfter_Context *ctx,
+ RtemsTimerReqServerFireAfter_Post_UserData state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireAfter_Post_UserData_Param: {
+ /*
+ * The user data argument for invoking the Timer Service Routine when the
+ * timer will fire shall be the one provided by the ``user_data``
+ * parameter in the past call to rtems_timer_server_fire_after().
+ */
+ T_eq_ptr( ctx->routine_user_data, ctx );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_UserData_Nop: {
+ /*
+ * The user data argument used for any invocation of the Timer Service
+ * Routine shall not be changed by the past call to
+ * rtems_timer_server_fire_after().
+ */
+ T_eq_ptr(
+ ctx->post_scheduling_data.user_data,
+ ctx->pre_scheduling_data.user_data
+ );
+ break;
+ }
+
+ case RtemsTimerReqServerFireAfter_Post_UserData_NA:
+ break;
+ }
+}
+
+/**
+ * @brief Make sure the realtime clock is not set after this test.
+ */
+static void RtemsTimerReqServerFireAfter_Teardown(
+ RtemsTimerReqServerFireAfter_Context *ctx
+)
+{
+ UnsetClock();
+}
+
+static void RtemsTimerReqServerFireAfter_Teardown_Wrap( void *arg )
+{
+ RtemsTimerReqServerFireAfter_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqServerFireAfter_Teardown( ctx );
+}
+
+static void RtemsTimerReqServerFireAfter_Prepare(
+ RtemsTimerReqServerFireAfter_Context *ctx
+)
+{
+ rtems_status_code status;
+ status = rtems_timer_create(
+ rtems_build_name( 'T', 'I', 'M', 'E' ),
+ &ctx->timer_id
+ );
+ T_rsc_success( status );
+
+ status = rtems_timer_create(
+ rtems_build_name( 'C', 'O', 'V', 'R' ),
+ &ctx->timer_cover_id
+ );
+ T_rsc_success( status );
+
+ ctx->invocations = 0;
+ ctx->ticks_till_fire = SCHEDULE_NONE;
+ ctx->routine_user_data = NULL;
+ T_rsc_success( rtems_clock_set( &tod_now ) );
+}
+
+static void RtemsTimerReqServerFireAfter_Action(
+ RtemsTimerReqServerFireAfter_Context *ctx
+)
+{
+ GetTimerSchedulingData( ctx->timer_id, &ctx->pre_scheduling_data );
+ ctx->pre_class = GetTimerClass( ctx->timer_id );
+ ctx->status = rtems_timer_server_fire_after(
+ ctx->id_param,
+ ctx->ticks_param,
+ ctx->routine_param,
+ ctx
+ );
+ ctx->post_state = GetTimerState( ctx->timer_id );
+ GetTimerSchedulingData( ctx->timer_id, &ctx->post_scheduling_data );
+ /* Ignoring return status: the timer server task may be suspended or not. */
+ rtems_task_resume( GetTimerServerTaskId() );
+}
+
+static void RtemsTimerReqServerFireAfter_Cleanup(
+ RtemsTimerReqServerFireAfter_Context *ctx
+)
+{
+ T_rsc_success( rtems_timer_delete( ctx->timer_cover_id ) );
+ T_rsc_success( rtems_timer_delete( ctx->timer_id ) );
+ DeleteTimerServer();
+}
+
+static const RtemsTimerReqServerFireAfter_Entry
+RtemsTimerReqServerFireAfter_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireAfter_Post_Status_NA,
+ RtemsTimerReqServerFireAfter_Post_Context_NA,
+ RtemsTimerReqServerFireAfter_Post_Clock_NA,
+ RtemsTimerReqServerFireAfter_Post_State_NA,
+ RtemsTimerReqServerFireAfter_Post_Interval_NA,
+ RtemsTimerReqServerFireAfter_Post_Routine_NA,
+ RtemsTimerReqServerFireAfter_Post_UserData_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireAfter_Post_Status_NA,
+ RtemsTimerReqServerFireAfter_Post_Context_NA,
+ RtemsTimerReqServerFireAfter_Post_Clock_NA,
+ RtemsTimerReqServerFireAfter_Post_State_NA,
+ RtemsTimerReqServerFireAfter_Post_Interval_NA,
+ RtemsTimerReqServerFireAfter_Post_Routine_NA,
+ RtemsTimerReqServerFireAfter_Post_UserData_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireAfter_Post_Status_InvNum,
+ RtemsTimerReqServerFireAfter_Post_Context_Nop,
+ RtemsTimerReqServerFireAfter_Post_Clock_Nop,
+ RtemsTimerReqServerFireAfter_Post_State_Nop,
+ RtemsTimerReqServerFireAfter_Post_Interval_Nop,
+ RtemsTimerReqServerFireAfter_Post_Routine_Nop,
+ RtemsTimerReqServerFireAfter_Post_UserData_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireAfter_Post_Status_IncStat,
+ RtemsTimerReqServerFireAfter_Post_Context_Nop,
+ RtemsTimerReqServerFireAfter_Post_Clock_Nop,
+ RtemsTimerReqServerFireAfter_Post_State_Nop,
+ RtemsTimerReqServerFireAfter_Post_Interval_Nop,
+ RtemsTimerReqServerFireAfter_Post_Routine_Nop,
+ RtemsTimerReqServerFireAfter_Post_UserData_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireAfter_Post_Status_InvAddr,
+ RtemsTimerReqServerFireAfter_Post_Context_Nop,
+ RtemsTimerReqServerFireAfter_Post_Clock_Nop,
+ RtemsTimerReqServerFireAfter_Post_State_Nop,
+ RtemsTimerReqServerFireAfter_Post_Interval_Nop,
+ RtemsTimerReqServerFireAfter_Post_Routine_Nop,
+ RtemsTimerReqServerFireAfter_Post_UserData_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireAfter_Post_Status_Ok,
+ RtemsTimerReqServerFireAfter_Post_Context_Server,
+ RtemsTimerReqServerFireAfter_Post_Clock_Ticks,
+ RtemsTimerReqServerFireAfter_Post_State_Scheduled,
+ RtemsTimerReqServerFireAfter_Post_Interval_Param,
+ RtemsTimerReqServerFireAfter_Post_Routine_Param,
+ RtemsTimerReqServerFireAfter_Post_UserData_Param },
+ { 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireAfter_Post_Status_InvId,
+ RtemsTimerReqServerFireAfter_Post_Context_Nop,
+ RtemsTimerReqServerFireAfter_Post_Clock_Nop,
+ RtemsTimerReqServerFireAfter_Post_State_Nop,
+ RtemsTimerReqServerFireAfter_Post_Interval_Nop,
+ RtemsTimerReqServerFireAfter_Post_Routine_Nop,
+ RtemsTimerReqServerFireAfter_Post_UserData_Nop }
+};
+
+static const uint8_t
+RtemsTimerReqServerFireAfter_Map[] = {
+ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 5,
+ 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 6, 6, 0, 0, 0, 0, 6, 6, 6, 6,
+ 6, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4, 0, 0, 0, 0, 4, 4, 4,
+ 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4, 0, 0, 0, 0, 4, 4,
+ 4, 4, 4, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 2, 0, 0, 0, 0, 2,
+ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 2, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 2, 0, 0, 0,
+ 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 2, 0, 0,
+ 0, 0, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 3, 3, 0,
+ 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 3, 3,
+ 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 3,
+ 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0,
+ 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3,
+ 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
+ 3, 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3, 3, 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3, 3, 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1
+};
+
+static size_t RtemsTimerReqServerFireAfter_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ RtemsTimerReqServerFireAfter_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsTimerReqServerFireAfter_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTimerReqServerFireAfter_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = RtemsTimerReqServerFireAfter_Teardown_Wrap,
+ .scope = RtemsTimerReqServerFireAfter_Scope,
+ .initial_context = &RtemsTimerReqServerFireAfter_Instance
+};
+
+static inline RtemsTimerReqServerFireAfter_Entry
+RtemsTimerReqServerFireAfter_PopEntry(
+ RtemsTimerReqServerFireAfter_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTimerReqServerFireAfter_Entries[
+ RtemsTimerReqServerFireAfter_Map[ index ]
+ ];
+}
+
+static void RtemsTimerReqServerFireAfter_TestVariant(
+ RtemsTimerReqServerFireAfter_Context *ctx
+)
+{
+ RtemsTimerReqServerFireAfter_Pre_Server_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTimerReqServerFireAfter_Pre_Ticks_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTimerReqServerFireAfter_Pre_Routine_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTimerReqServerFireAfter_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTimerReqServerFireAfter_Pre_Context_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsTimerReqServerFireAfter_Pre_Clock_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsTimerReqServerFireAfter_Pre_State_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsTimerReqServerFireAfter_Action( ctx );
+ RtemsTimerReqServerFireAfter_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsTimerReqServerFireAfter_Post_Context_Check(
+ ctx,
+ ctx->Map.entry.Post_Context
+ );
+ RtemsTimerReqServerFireAfter_Post_Clock_Check(
+ ctx,
+ ctx->Map.entry.Post_Clock
+ );
+ RtemsTimerReqServerFireAfter_Post_State_Check(
+ ctx,
+ ctx->Map.entry.Post_State
+ );
+ RtemsTimerReqServerFireAfter_Post_Interval_Check(
+ ctx,
+ ctx->Map.entry.Post_Interval
+ );
+ RtemsTimerReqServerFireAfter_Post_Routine_Check(
+ ctx,
+ ctx->Map.entry.Post_Routine
+ );
+ RtemsTimerReqServerFireAfter_Post_UserData_Check(
+ ctx,
+ ctx->Map.entry.Post_UserData
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTimerReqServerFireAfter( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsTimerReqServerFireAfter,
+ &RtemsTimerReqServerFireAfter_Fixture
+)
+{
+ RtemsTimerReqServerFireAfter_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTimerReqServerFireAfter_Pre_Server_Init;
+ ctx->Map.pcs[ 0 ] < RtemsTimerReqServerFireAfter_Pre_Server_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTimerReqServerFireAfter_Pre_Ticks_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsTimerReqServerFireAfter_Pre_Ticks_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsTimerReqServerFireAfter_Pre_Routine_Valid;
+ ctx->Map.pcs[ 2 ] < RtemsTimerReqServerFireAfter_Pre_Routine_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsTimerReqServerFireAfter_Pre_Id_Valid;
+ ctx->Map.pcs[ 3 ] < RtemsTimerReqServerFireAfter_Pre_Id_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsTimerReqServerFireAfter_Pre_Context_None;
+ ctx->Map.pcs[ 4 ] < RtemsTimerReqServerFireAfter_Pre_Context_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = RtemsTimerReqServerFireAfter_Pre_Clock_None;
+ ctx->Map.pcs[ 5 ] < RtemsTimerReqServerFireAfter_Pre_Clock_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 6 ] = RtemsTimerReqServerFireAfter_Pre_State_Inactive;
+ ctx->Map.pcs[ 6 ] < RtemsTimerReqServerFireAfter_Pre_State_NA;
+ ++ctx->Map.pcs[ 6 ]
+ ) {
+ ctx->Map.entry = RtemsTimerReqServerFireAfter_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsTimerReqServerFireAfter_Prepare( ctx );
+ RtemsTimerReqServerFireAfter_TestVariant( ctx );
+ RtemsTimerReqServerFireAfter_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timer-server-fire-when.c b/testsuites/validation/tc-timer-server-fire-when.c
new file mode 100644
index 0000000000..d9c5ba8221
--- /dev/null
+++ b/testsuites/validation/tc-timer-server-fire-when.c
@@ -0,0 +1,1416 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTimerReqServerFireWhen
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTimerReqServerFireWhen spec:/rtems/timer/req/server-fire-when
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Pre_Server_Init,
+ RtemsTimerReqServerFireWhen_Pre_Server_NotInit,
+ RtemsTimerReqServerFireWhen_Pre_Server_NA
+} RtemsTimerReqServerFireWhen_Pre_Server;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Pre_RtClock_Set,
+ RtemsTimerReqServerFireWhen_Pre_RtClock_Unset,
+ RtemsTimerReqServerFireWhen_Pre_RtClock_NA
+} RtemsTimerReqServerFireWhen_Pre_RtClock;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Pre_Routine_Valid,
+ RtemsTimerReqServerFireWhen_Pre_Routine_Null,
+ RtemsTimerReqServerFireWhen_Pre_Routine_NA
+} RtemsTimerReqServerFireWhen_Pre_Routine;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Pre_WallTime_Valid,
+ RtemsTimerReqServerFireWhen_Pre_WallTime_Invalid,
+ RtemsTimerReqServerFireWhen_Pre_WallTime_Past,
+ RtemsTimerReqServerFireWhen_Pre_WallTime_Null,
+ RtemsTimerReqServerFireWhen_Pre_WallTime_NA
+} RtemsTimerReqServerFireWhen_Pre_WallTime;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Pre_Id_Valid,
+ RtemsTimerReqServerFireWhen_Pre_Id_Invalid,
+ RtemsTimerReqServerFireWhen_Pre_Id_NA
+} RtemsTimerReqServerFireWhen_Pre_Id;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Pre_Context_None,
+ RtemsTimerReqServerFireWhen_Pre_Context_Interrupt,
+ RtemsTimerReqServerFireWhen_Pre_Context_Server,
+ RtemsTimerReqServerFireWhen_Pre_Context_NA
+} RtemsTimerReqServerFireWhen_Pre_Context;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Pre_Clock_None,
+ RtemsTimerReqServerFireWhen_Pre_Clock_Ticks,
+ RtemsTimerReqServerFireWhen_Pre_Clock_Realtime,
+ RtemsTimerReqServerFireWhen_Pre_Clock_NA
+} RtemsTimerReqServerFireWhen_Pre_Clock;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Pre_State_Inactive,
+ RtemsTimerReqServerFireWhen_Pre_State_Scheduled,
+ RtemsTimerReqServerFireWhen_Pre_State_Pending,
+ RtemsTimerReqServerFireWhen_Pre_State_NA
+} RtemsTimerReqServerFireWhen_Pre_State;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Post_Status_Ok,
+ RtemsTimerReqServerFireWhen_Post_Status_NotDef,
+ RtemsTimerReqServerFireWhen_Post_Status_InvId,
+ RtemsTimerReqServerFireWhen_Post_Status_InvAddr,
+ RtemsTimerReqServerFireWhen_Post_Status_InvClock,
+ RtemsTimerReqServerFireWhen_Post_Status_IncStat,
+ RtemsTimerReqServerFireWhen_Post_Status_NA
+} RtemsTimerReqServerFireWhen_Post_Status;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Post_Context_None,
+ RtemsTimerReqServerFireWhen_Post_Context_Interrupt,
+ RtemsTimerReqServerFireWhen_Post_Context_Server,
+ RtemsTimerReqServerFireWhen_Post_Context_Nop,
+ RtemsTimerReqServerFireWhen_Post_Context_NA
+} RtemsTimerReqServerFireWhen_Post_Context;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Post_Clock_None,
+ RtemsTimerReqServerFireWhen_Post_Clock_Ticks,
+ RtemsTimerReqServerFireWhen_Post_Clock_Realtime,
+ RtemsTimerReqServerFireWhen_Post_Clock_Nop,
+ RtemsTimerReqServerFireWhen_Post_Clock_NA
+} RtemsTimerReqServerFireWhen_Post_Clock;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Post_State_Scheduled,
+ RtemsTimerReqServerFireWhen_Post_State_Nop,
+ RtemsTimerReqServerFireWhen_Post_State_NA
+} RtemsTimerReqServerFireWhen_Post_State;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Post_WallTime_Param,
+ RtemsTimerReqServerFireWhen_Post_WallTime_Nop,
+ RtemsTimerReqServerFireWhen_Post_WallTime_NA
+} RtemsTimerReqServerFireWhen_Post_WallTime;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Post_Routine_Param,
+ RtemsTimerReqServerFireWhen_Post_Routine_Nop,
+ RtemsTimerReqServerFireWhen_Post_Routine_NA
+} RtemsTimerReqServerFireWhen_Post_Routine;
+
+typedef enum {
+ RtemsTimerReqServerFireWhen_Post_UserData_Param,
+ RtemsTimerReqServerFireWhen_Post_UserData_Nop,
+ RtemsTimerReqServerFireWhen_Post_UserData_NA
+} RtemsTimerReqServerFireWhen_Post_UserData;
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Server_NA : 1;
+ uint32_t Pre_RtClock_NA : 1;
+ uint32_t Pre_Routine_NA : 1;
+ uint32_t Pre_WallTime_NA : 1;
+ uint32_t Pre_Id_NA : 1;
+ uint32_t Pre_Context_NA : 1;
+ uint32_t Pre_Clock_NA : 1;
+ uint32_t Pre_State_NA : 1;
+ uint32_t Post_Status : 3;
+ uint32_t Post_Context : 3;
+ uint32_t Post_Clock : 3;
+ uint32_t Post_State : 2;
+ uint32_t Post_WallTime : 2;
+ uint32_t Post_Routine : 2;
+ uint32_t Post_UserData : 2;
+} RtemsTimerReqServerFireWhen_Entry;
+
+typedef enum {
+ PRE_NONE = 0,
+ PRE_INTERRUPT = 1,
+ PRE_SERVER = 2
+} PreConditionContext;
+
+typedef enum {
+ SCHEDULE_NONE = 0,
+ SCHEDULE_SOON = 1,
+ SCHEDULE_MAX = 5
+} Scheduling_Ticks;
+
+/**
+ * @brief Test context for spec:/rtems/timer/req/server-fire-when test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a valid id of a timer.
+ */
+ rtems_id timer_id;
+
+ /**
+ * @brief This member specifies the ``id`` parameter for the action.
+ */
+ rtems_id id_param;
+
+ /**
+ * @brief This member specifies the ``wall_time`` parameter for the action.
+ */
+ const rtems_time_of_day *wall_time_param;
+
+ /**
+ * @brief This member specifies the ``routine`` parameter for the action.
+ */
+ rtems_timer_service_routine_entry routine_param;
+
+ /**
+ * @brief This member contains the returned status code of the action.
+ */
+ rtems_status_code status;
+
+ /**
+ * @brief This member contains a counter of invocations of the Timer Service
+ * Routine.
+ */
+ int invocations;
+
+ /**
+ * @brief Function TriggerTimer() is used to figure out when the Timer
+ * Service Routine gets executed. This member contains the time-of-day when
+ * the Timer Service Routine fires (see fire).
+ */
+ rtems_time_of_day tod_till_fire;
+
+ /**
+ * @brief This member contains the user data given to the Timer Service
+ * Routine when called.
+ */
+ void *routine_user_data;
+
+ /**
+ * @brief This member specifies which pre-condition context (none, interrupt
+ * context, server context) must be created before the
+ * rtems_timer_server_fire_when() action gets executed.
+ */
+ PreConditionContext pre_cond_contex;
+
+ /**
+ * @brief This member specifies the pre-condition state of the realtime
+ * clock. It should either be set to the value referenced by pre_cond_tod
+ * or if NULL, then the realtime clock should be not set.
+ */
+ const rtems_time_of_day *pre_cond_tod;
+
+ /**
+ * @brief This member stores internal clock and context settings of the timer
+ * before the execution of the test action.
+ */
+ Timer_Classes pre_class;
+
+ /**
+ * @brief This member stores the state of the timer before the execution of
+ * the test action.
+ */
+ Timer_States pre_state;
+
+ /**
+ * @brief This member stores the state of the timer after the execution of
+ * the test action.
+ */
+ Timer_States post_state;
+
+ /**
+ * @brief This member stores the scheduling data of the timer before the
+ * execution of the test action.
+ */
+ Timer_Scheduling_Data pre_scheduling_data;
+
+ /**
+ * @brief This member stores the scheduling data of the timer after the
+ * execution of the test action.
+ */
+ Timer_Scheduling_Data post_scheduling_data;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 8 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsTimerReqServerFireWhen_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsTimerReqServerFireWhen_Context;
+
+static RtemsTimerReqServerFireWhen_Context
+ RtemsTimerReqServerFireWhen_Instance;
+
+static const char * const RtemsTimerReqServerFireWhen_PreDesc_Server[] = {
+ "Init",
+ "NotInit",
+ "NA"
+};
+
+static const char * const RtemsTimerReqServerFireWhen_PreDesc_RtClock[] = {
+ "Set",
+ "Unset",
+ "NA"
+};
+
+static const char * const RtemsTimerReqServerFireWhen_PreDesc_Routine[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsTimerReqServerFireWhen_PreDesc_WallTime[] = {
+ "Valid",
+ "Invalid",
+ "Past",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsTimerReqServerFireWhen_PreDesc_Id[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsTimerReqServerFireWhen_PreDesc_Context[] = {
+ "None",
+ "Interrupt",
+ "Server",
+ "NA"
+};
+
+static const char * const RtemsTimerReqServerFireWhen_PreDesc_Clock[] = {
+ "None",
+ "Ticks",
+ "Realtime",
+ "NA"
+};
+
+static const char * const RtemsTimerReqServerFireWhen_PreDesc_State[] = {
+ "Inactive",
+ "Scheduled",
+ "Pending",
+ "NA"
+};
+
+static const char * const * const RtemsTimerReqServerFireWhen_PreDesc[] = {
+ RtemsTimerReqServerFireWhen_PreDesc_Server,
+ RtemsTimerReqServerFireWhen_PreDesc_RtClock,
+ RtemsTimerReqServerFireWhen_PreDesc_Routine,
+ RtemsTimerReqServerFireWhen_PreDesc_WallTime,
+ RtemsTimerReqServerFireWhen_PreDesc_Id,
+ RtemsTimerReqServerFireWhen_PreDesc_Context,
+ RtemsTimerReqServerFireWhen_PreDesc_Clock,
+ RtemsTimerReqServerFireWhen_PreDesc_State,
+ NULL
+};
+
+static const rtems_time_of_day tod_now = { 2000, 1, 1, 0, 0, 0, 0 };
+static const rtems_time_of_day tod_schedule = { 2000, 1, 1, 5, 0, 0, 0 };
+static const rtems_time_of_day tod_invalid = { 1985, 1, 1, 0, 0, 0, 0 };
+static const rtems_time_of_day tod_past = { 1999, 12, 31, 23, 59, 59, 1 };
+
+static void TriggerTimer(
+ const RtemsTimerReqServerFireWhen_Context *ctx,
+ rtems_time_of_day *tod_fire
+)
+{
+ rtems_time_of_day tod = tod_now;
+ int invocations_old = ctx->invocations;
+ int i;
+
+ /* Fire the timer service routine for ticks and realtime clock */
+ for ( i = 1; i <= SCHEDULE_MAX; ++i ) {
+ ClockTick();
+ }
+
+ for ( i = 1; i < 24; ++i ) {
+ tod.hour = i;
+ T_rsc_success( rtems_clock_set( &tod ) );
+ if ( tod_fire != NULL && ctx->invocations > invocations_old ) {
+ *tod_fire = tod;
+ break;
+ }
+ }
+}
+
+static void TimerServiceRoutine(
+ rtems_id timer_id,
+ void *user_data
+)
+{
+ RtemsTimerReqServerFireWhen_Context *ctx = user_data;
+ ++( ctx->invocations );
+ ctx->routine_user_data = user_data;
+}
+
+static void RtemsTimerReqServerFireWhen_Pre_Server_Prepare(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Pre_Server state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Pre_Server_Init: {
+ /*
+ * While the Timer Server task has been successfully initialized by a
+ * call to rtems_timer_initiate_server().
+ */
+ rtems_status_code status;
+ status = rtems_timer_initiate_server(
+ RTEMS_TIMER_SERVER_DEFAULT_PRIORITY,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_ATTRIBUTES
+ );
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_Server_NotInit: {
+ /*
+ * While the Timer Server task has not been initialized and does not
+ * exist.
+ */
+ DeleteTimerServer();
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_Server_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Pre_RtClock_Prepare(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Pre_RtClock state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Pre_RtClock_Set: {
+ /*
+ * While the realtime clock is set to a valid time-of-day.
+ */
+ ctx->pre_cond_tod = &tod_now;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_RtClock_Unset: {
+ /*
+ * While the realtime clock has never been set.
+ */
+ ctx->pre_cond_tod = NULL;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_RtClock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Pre_Routine_Prepare(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Pre_Routine state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Pre_Routine_Valid: {
+ /*
+ * While the ``routine`` parameter references an object of type
+ * rtems_timer_service_routine_entry.
+ */
+ ctx->routine_param = TimerServiceRoutine;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_Routine_Null: {
+ /*
+ * While the ``routine`` parameter is NULL..
+ */
+ ctx->routine_param = NULL;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_Routine_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Pre_WallTime_Prepare(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Pre_WallTime state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Pre_WallTime_Valid: {
+ /*
+ * While the ``wall_time`` parameter references a time at least one
+ * second in the future but not later than the last second of the year
+ * 2105. (Times after 2105 are invalid.)
+ */
+ ctx->wall_time_param = &tod_schedule;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_WallTime_Invalid: {
+ /*
+ * While the ``wall_time`` parameter is invalid.
+ */
+ ctx->wall_time_param = &tod_invalid;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_WallTime_Past: {
+ /*
+ * While the ``wall_time`` parameter references a time in the current
+ * second or in the past but not earlier than 1988. (Times before 1988
+ * are invalid.)
+ */
+ ctx->wall_time_param = &tod_past;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_WallTime_Null: {
+ /*
+ * While the ``wall_time`` parameter is 0.
+ */
+ ctx->wall_time_param = NULL;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_WallTime_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Pre_Id_Prepare(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter is valid.
+ */
+ ctx->id_param = ctx->timer_id;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_Id_Invalid: {
+ /*
+ * While the ``id`` parameter is invalid.
+ */
+ ctx->id_param = RTEMS_ID_NONE;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Pre_Context_Prepare(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Pre_Context state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Pre_Context_None: {
+ /*
+ * While the Timer Service Routine has never been scheduled since
+ * creation of the timer. See also none.
+ */
+ ctx->pre_cond_contex = PRE_NONE;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_Context_Interrupt: {
+ /*
+ * While the timer is in interrupt context.
+ */
+ ctx->pre_cond_contex = PRE_INTERRUPT;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_Context_Server: {
+ /*
+ * While the timer is in server context.
+ */
+ ctx->pre_cond_contex = PRE_SERVER;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Pre_Clock_Prepare(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Pre_Clock state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Pre_Clock_None: {
+ /*
+ * While the timer has never been scheduled since creation of the timer.
+ */
+ T_eq_int( ctx->pre_cond_contex, PRE_NONE );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_Clock_Ticks: {
+ /*
+ * While the clock used to determine when the timer will fire is the
+ * ticks based clock.
+ */
+ rtems_status_code status;
+
+ if ( ctx->pre_cond_contex == PRE_INTERRUPT ) {
+ status = rtems_timer_fire_after(
+ ctx->timer_id,
+ SCHEDULE_SOON,
+ TimerServiceRoutine,
+ ctx
+ );
+ } else {
+ status = rtems_timer_server_fire_after(
+ ctx->timer_id,
+ SCHEDULE_SOON,
+ TimerServiceRoutine,
+ ctx
+ );
+ }
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_Clock_Realtime: {
+ /*
+ * While the clock used to determine when the timer will fire is the
+ * realtime clock.
+ */
+ rtems_status_code status;
+ T_rsc_success( rtems_clock_set( &tod_now ) );
+
+ if ( ctx->pre_cond_contex == PRE_INTERRUPT ) {
+ status = rtems_timer_fire_when(
+ ctx->timer_id,
+ &tod_schedule,
+ TimerServiceRoutine,
+ ctx
+ );
+ } else {
+ status = rtems_timer_server_fire_when(
+ ctx->timer_id,
+ &tod_schedule,
+ TimerServiceRoutine,
+ ctx
+ );
+ }
+ T_rsc_success( status );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_Clock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Pre_State_Prepare(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Pre_State state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Pre_State_Inactive: {
+ /*
+ * While the timer is in inactive state.
+ */
+ TriggerTimer( ctx, NULL );
+ T_eq_int(
+ ctx->invocations,
+ ( ctx->pre_cond_contex == PRE_NONE ) ? 0 : 1
+ );
+ ctx->invocations = 0;
+ ctx->pre_state = TIMER_INACTIVE;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_State_Scheduled: {
+ /*
+ * While the timer is in scheduled state.
+ */
+ /* The timer was already scheduled in the "Clock" pre-conditions. */
+ ctx->pre_state = TIMER_SCHEDULED;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_State_Pending: {
+ /*
+ * While the timer is in pending state.
+ */
+ T_rsc_success( rtems_task_suspend( GetTimerServerTaskId() ) );
+ TriggerTimer( ctx, NULL );
+ T_eq_int( ctx->invocations, 0 );
+ ctx->pre_state = TIMER_PENDING;
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Pre_State_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Post_Status_Check(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Post_Status_Ok: {
+ /*
+ * The return status of rtems_timer_server_fire_when() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Status_NotDef: {
+ /*
+ * The return status of rtems_timer_server_fire_when() shall be
+ * RTEMS_NOT_DEFINED
+ */
+ T_rsc( ctx->status, RTEMS_NOT_DEFINED );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Status_InvId: {
+ /*
+ * The return status of rtems_timer_server_fire_when() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_timer_server_fire_when() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Status_InvClock: {
+ /*
+ * The return status of rtems_timer_server_fire_when() shall be
+ * RTEMS_INVALID_CLOCK.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_CLOCK );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Status_IncStat: {
+ /*
+ * The return status of rtems_timer_server_fire_when() shall be
+ * RTEMS_INCORRECT_STATE.
+ */
+ T_rsc( ctx->status, RTEMS_INCORRECT_STATE );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Post_Context_Check(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Post_Context state
+)
+{
+ Timer_Classes class;
+ class = GetTimerClass( ctx->timer_id );
+
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Post_Context_None: {
+ /*
+ * The timer shall have never been scheduled. See also none.
+ */
+ T_eq_int( class, TIMER_DORMANT );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Context_Interrupt: {
+ /*
+ * The timer shall be in interrupt context.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, 0 );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Context_Server: {
+ /*
+ * The timer shall be in server context.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, TIMER_CLASS_BIT_ON_TASK );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Context_Nop: {
+ /*
+ * Objects referenced by parameters in the past call to
+ * rtems_timer_server_fire_when() shall not be accessed by the
+ * rtems_timer_server_fire_when() call. See also Nop.
+ */
+ T_eq_int( class, ctx->pre_class );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Context_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Post_Clock_Check(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Post_Clock state
+)
+{
+ Timer_Classes class;
+ class = GetTimerClass( ctx->timer_id );
+
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Post_Clock_None: {
+ /*
+ * The timer shall have never been scheduled.
+ */
+ T_eq_int( class, TIMER_DORMANT );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Clock_Ticks: {
+ /*
+ * The timer shall use the ticks based clock.
+ */
+ T_eq_int( class & TIMER_CLASS_BIT_TIME_OF_DAY, 0 );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Clock_Realtime: {
+ /*
+ * The timer shall use the realtime clock.
+ */
+ T_eq_int(
+ class & TIMER_CLASS_BIT_TIME_OF_DAY,
+ TIMER_CLASS_BIT_TIME_OF_DAY
+ );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Clock_Nop: {
+ /*
+ * Objects referenced by parameters in the past call to
+ * rtems_timer_server_fire_when() shall not be accessed by the
+ * rtems_timer_server_fire_when() call.
+ */
+ T_eq_int( class, ctx->pre_class );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Clock_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Post_State_Check(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Post_State state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Post_State_Scheduled: {
+ /*
+ * The timer shall be in scheduled state.
+ */
+ TriggerTimer( ctx, &ctx->tod_till_fire );
+ T_eq_int( ctx->invocations, 1 );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_State_Nop: {
+ /*
+ * Objects referenced by parameters in the past call to
+ * rtems_timer_server_fire_when() shall not be accessed by the
+ * rtems_timer_server_fire_when() call.
+ */
+ T_eq_int( ctx->post_state, ctx->pre_state );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_State_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Post_WallTime_Check(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Post_WallTime state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Post_WallTime_Param: {
+ /*
+ * The Timer Service Routine shall be invoked at the wall time (see
+ * realtime clock) (ignoring ticks), which was provided by the
+ * ``wall_time`` parameter in the past call to
+ * rtems_timer_server_fire_when().
+ */
+ T_eq_mem(
+ &ctx->tod_till_fire,
+ ctx->wall_time_param,
+ sizeof( ctx->tod_till_fire )
+ );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_WallTime_Nop: {
+ /*
+ * If and when the Timer Service Routine will be invoked shall not be
+ * changed by the past call to rtems_timer_server_fire_when().
+ */
+ /*
+ * Whether the timer is scheduled has already been tested by the
+ * "Nop" "State" post-condition above.
+ */
+ T_eq_u32(
+ ctx->post_scheduling_data.interval,
+ ctx->pre_scheduling_data.interval
+ );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_WallTime_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Post_Routine_Check(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Post_Routine state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Post_Routine_Param: {
+ /*
+ * The function reference used to invoke the Timer Service Routine when
+ * the timer will fire shall be the one provided by the ``routine``
+ * parameter in the past call to rtems_timer_server_fire_when().
+ */
+ T_eq_int( ctx->invocations, 1 );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Routine_Nop: {
+ /*
+ * The function reference used for any invocation of the Timer Service
+ * Routine shall not be changed by the past call to
+ * rtems_timer_server_fire_when().
+ */
+ T_eq_ptr(
+ ctx->post_scheduling_data.routine,
+ ctx->pre_scheduling_data.routine
+ );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_Routine_NA:
+ break;
+ }
+}
+
+static void RtemsTimerReqServerFireWhen_Post_UserData_Check(
+ RtemsTimerReqServerFireWhen_Context *ctx,
+ RtemsTimerReqServerFireWhen_Post_UserData state
+)
+{
+ switch ( state ) {
+ case RtemsTimerReqServerFireWhen_Post_UserData_Param: {
+ /*
+ * The user data argument for invoking the Timer Service Routine when the
+ * timer will fire shall be the one provided by the ``user_data``
+ * parameter in the past call to rtems_timer_server_fire_when().
+ */
+ T_eq_ptr( ctx->routine_user_data, ctx );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_UserData_Nop: {
+ /*
+ * The user data argument used for any invocation of the Timer Service
+ * Routine shall not be changed by the past call to
+ * rtems_timer_server_fire_when().
+ */
+ T_eq_ptr(
+ ctx->post_scheduling_data.user_data,
+ ctx->pre_scheduling_data.user_data
+ );
+ break;
+ }
+
+ case RtemsTimerReqServerFireWhen_Post_UserData_NA:
+ break;
+ }
+}
+
+/**
+ * @brief Make sure the realtime clock is not set after this test.
+ */
+static void RtemsTimerReqServerFireWhen_Teardown(
+ RtemsTimerReqServerFireWhen_Context *ctx
+)
+{
+ UnsetClock();
+}
+
+static void RtemsTimerReqServerFireWhen_Teardown_Wrap( void *arg )
+{
+ RtemsTimerReqServerFireWhen_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsTimerReqServerFireWhen_Teardown( ctx );
+}
+
+static void RtemsTimerReqServerFireWhen_Prepare(
+ RtemsTimerReqServerFireWhen_Context *ctx
+)
+{
+ rtems_status_code status;
+ status = rtems_timer_create(
+ rtems_build_name( 'T', 'I', 'M', 'E' ),
+ &ctx->timer_id
+ );
+ T_rsc_success( status );
+
+ ctx->invocations = 0;
+ ctx->routine_user_data = NULL;
+}
+
+static void RtemsTimerReqServerFireWhen_Action(
+ RtemsTimerReqServerFireWhen_Context *ctx
+)
+{
+ GetTimerSchedulingData( ctx->timer_id, &ctx->pre_scheduling_data );
+ ctx->pre_class = GetTimerClass( ctx->timer_id );
+ if ( ctx->pre_cond_tod == NULL ) {
+ UnsetClock();
+ } else {
+ T_rsc_success( rtems_clock_set( ctx->pre_cond_tod ) );
+ }
+ ctx->status = rtems_timer_server_fire_when(
+ ctx->id_param,
+ ctx->wall_time_param,
+ ctx->routine_param,
+ ctx
+ );
+ ctx->post_state = GetTimerState( ctx->timer_id );
+ GetTimerSchedulingData( ctx->timer_id, &ctx->post_scheduling_data );
+ /* Ignoring return status: the timer server task may be suspended or not. */
+ rtems_task_resume( GetTimerServerTaskId() );
+}
+
+static void RtemsTimerReqServerFireWhen_Cleanup(
+ RtemsTimerReqServerFireWhen_Context *ctx
+)
+{
+ T_rsc_success( rtems_timer_delete( ctx->timer_id ) );
+ DeleteTimerServer();
+}
+
+static const RtemsTimerReqServerFireWhen_Entry
+RtemsTimerReqServerFireWhen_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireWhen_Post_Status_NA,
+ RtemsTimerReqServerFireWhen_Post_Context_NA,
+ RtemsTimerReqServerFireWhen_Post_Clock_NA,
+ RtemsTimerReqServerFireWhen_Post_State_NA,
+ RtemsTimerReqServerFireWhen_Post_WallTime_NA,
+ RtemsTimerReqServerFireWhen_Post_Routine_NA,
+ RtemsTimerReqServerFireWhen_Post_UserData_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireWhen_Post_Status_NA,
+ RtemsTimerReqServerFireWhen_Post_Context_NA,
+ RtemsTimerReqServerFireWhen_Post_Clock_NA,
+ RtemsTimerReqServerFireWhen_Post_State_NA,
+ RtemsTimerReqServerFireWhen_Post_WallTime_NA,
+ RtemsTimerReqServerFireWhen_Post_Routine_NA,
+ RtemsTimerReqServerFireWhen_Post_UserData_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireWhen_Post_Status_NA,
+ RtemsTimerReqServerFireWhen_Post_Context_NA,
+ RtemsTimerReqServerFireWhen_Post_Clock_NA,
+ RtemsTimerReqServerFireWhen_Post_State_NA,
+ RtemsTimerReqServerFireWhen_Post_WallTime_NA,
+ RtemsTimerReqServerFireWhen_Post_Routine_NA,
+ RtemsTimerReqServerFireWhen_Post_UserData_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireWhen_Post_Status_IncStat,
+ RtemsTimerReqServerFireWhen_Post_Context_Nop,
+ RtemsTimerReqServerFireWhen_Post_Clock_Nop,
+ RtemsTimerReqServerFireWhen_Post_State_Nop,
+ RtemsTimerReqServerFireWhen_Post_WallTime_Nop,
+ RtemsTimerReqServerFireWhen_Post_Routine_Nop,
+ RtemsTimerReqServerFireWhen_Post_UserData_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireWhen_Post_Status_InvAddr,
+ RtemsTimerReqServerFireWhen_Post_Context_Nop,
+ RtemsTimerReqServerFireWhen_Post_Clock_Nop,
+ RtemsTimerReqServerFireWhen_Post_State_Nop,
+ RtemsTimerReqServerFireWhen_Post_WallTime_Nop,
+ RtemsTimerReqServerFireWhen_Post_Routine_Nop,
+ RtemsTimerReqServerFireWhen_Post_UserData_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireWhen_Post_Status_NotDef,
+ RtemsTimerReqServerFireWhen_Post_Context_Nop,
+ RtemsTimerReqServerFireWhen_Post_Clock_Nop,
+ RtemsTimerReqServerFireWhen_Post_State_Nop,
+ RtemsTimerReqServerFireWhen_Post_WallTime_Nop,
+ RtemsTimerReqServerFireWhen_Post_Routine_Nop,
+ RtemsTimerReqServerFireWhen_Post_UserData_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ RtemsTimerReqServerFireWhen_Post_Status_InvClock,
+ RtemsTimerReqServerFireWhen_Post_Context_Nop,
+ RtemsTimerReqServerFireWhen_Post_Clock_Nop,
+ RtemsTimerReqServerFireWhen_Post_State_Nop,
+ RtemsTimerReqServerFireWhen_Post_WallTime_Nop,
+ RtemsTimerReqServerFireWhen_Post_Routine_Nop,
+ RtemsTimerReqServerFireWhen_Post_UserData_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireWhen_Post_Status_Ok,
+ RtemsTimerReqServerFireWhen_Post_Context_Server,
+ RtemsTimerReqServerFireWhen_Post_Clock_Realtime,
+ RtemsTimerReqServerFireWhen_Post_State_Scheduled,
+ RtemsTimerReqServerFireWhen_Post_WallTime_Param,
+ RtemsTimerReqServerFireWhen_Post_Routine_Param,
+ RtemsTimerReqServerFireWhen_Post_UserData_Param },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, RtemsTimerReqServerFireWhen_Post_Status_InvId,
+ RtemsTimerReqServerFireWhen_Post_Context_Nop,
+ RtemsTimerReqServerFireWhen_Post_Clock_Nop,
+ RtemsTimerReqServerFireWhen_Post_State_Nop,
+ RtemsTimerReqServerFireWhen_Post_WallTime_Nop,
+ RtemsTimerReqServerFireWhen_Post_Routine_Nop,
+ RtemsTimerReqServerFireWhen_Post_UserData_Nop }
+};
+
+static const uint8_t
+RtemsTimerReqServerFireWhen_Map[] = {
+ 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 7, 7, 0, 0, 0, 0, 7, 7, 7, 7, 7,
+ 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 8, 8, 8, 8,
+ 8, 8, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 6, 6, 0, 0, 0, 0, 6, 6, 6,
+ 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 6, 6, 0, 0, 0, 0, 6, 6,
+ 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 6, 6, 0, 0, 0, 0, 6,
+ 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 6, 6, 0, 0, 0, 0,
+ 6, 6, 6, 6, 6, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4, 0, 0, 0,
+ 0, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4, 0, 0,
+ 0, 0, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4, 0,
+ 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4,
+ 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4,
+ 4, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0,
+ 4, 4, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4,
+ 0, 4, 4, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,
+ 4, 0, 4, 4, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 4, 0, 4, 4, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4, 4, 0, 4, 4, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5, 5, 2, 2, 2, 5, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5, 5, 2, 2, 2, 5, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5, 5, 2, 2, 2, 5, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5, 5, 2, 2, 2, 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5, 5, 2, 2, 2, 5, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5, 5, 2, 2, 2, 5, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5, 5, 2, 2, 2, 5, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5, 5, 2, 2, 2, 5, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5, 5, 2, 2, 2, 5,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5, 5, 2, 2, 2,
+ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5, 5, 2, 2,
+ 2, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5, 5, 2,
+ 2, 2, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5, 5,
+ 2, 2, 2, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5, 5,
+ 5, 2, 2, 2, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0, 5,
+ 5, 5, 2, 2, 2, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 2, 2, 2, 0, 0, 0,
+ 5, 5, 5, 2, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 3, 3, 0, 0, 0,
+ 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 3, 3, 0, 0,
+ 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 3, 3, 0,
+ 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 3, 3,
+ 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 3,
+ 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0,
+ 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3,
+ 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
+ 3, 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3, 3, 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3, 3, 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 3, 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3, 3, 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 3, 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3, 3, 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3, 3, 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2, 2, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2, 2, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2, 2, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2, 2, 0, 0, 0, 1, 1, 1, 1, 1, 1,
+ 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2, 2, 0, 0, 0, 1, 1, 1, 1, 1,
+ 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2, 2, 0, 0, 0, 1, 1, 1, 1,
+ 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2, 2, 0, 0, 0, 1, 1, 1,
+ 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2, 2, 0, 0, 0, 1, 1,
+ 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2, 2, 0, 0, 0, 1,
+ 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2, 2, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2, 2, 0, 0,
+ 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2, 2, 0,
+ 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2, 2,
+ 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 2,
+ 2, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 2,
+ 2, 2, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0,
+ 2, 2, 2, 0, 0, 0, 1, 1, 1, 1, 1, 1
+};
+
+static size_t RtemsTimerReqServerFireWhen_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ RtemsTimerReqServerFireWhen_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsTimerReqServerFireWhen_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTimerReqServerFireWhen_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = RtemsTimerReqServerFireWhen_Teardown_Wrap,
+ .scope = RtemsTimerReqServerFireWhen_Scope,
+ .initial_context = &RtemsTimerReqServerFireWhen_Instance
+};
+
+static inline RtemsTimerReqServerFireWhen_Entry
+RtemsTimerReqServerFireWhen_PopEntry(
+ RtemsTimerReqServerFireWhen_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsTimerReqServerFireWhen_Entries[
+ RtemsTimerReqServerFireWhen_Map[ index ]
+ ];
+}
+
+static void RtemsTimerReqServerFireWhen_TestVariant(
+ RtemsTimerReqServerFireWhen_Context *ctx
+)
+{
+ RtemsTimerReqServerFireWhen_Pre_Server_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsTimerReqServerFireWhen_Pre_RtClock_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsTimerReqServerFireWhen_Pre_Routine_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsTimerReqServerFireWhen_Pre_WallTime_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsTimerReqServerFireWhen_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ RtemsTimerReqServerFireWhen_Pre_Context_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ RtemsTimerReqServerFireWhen_Pre_Clock_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ RtemsTimerReqServerFireWhen_Pre_State_Prepare( ctx, ctx->Map.pcs[ 7 ] );
+ RtemsTimerReqServerFireWhen_Action( ctx );
+ RtemsTimerReqServerFireWhen_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ RtemsTimerReqServerFireWhen_Post_Context_Check(
+ ctx,
+ ctx->Map.entry.Post_Context
+ );
+ RtemsTimerReqServerFireWhen_Post_Clock_Check(
+ ctx,
+ ctx->Map.entry.Post_Clock
+ );
+ RtemsTimerReqServerFireWhen_Post_State_Check(
+ ctx,
+ ctx->Map.entry.Post_State
+ );
+ RtemsTimerReqServerFireWhen_Post_WallTime_Check(
+ ctx,
+ ctx->Map.entry.Post_WallTime
+ );
+ RtemsTimerReqServerFireWhen_Post_Routine_Check(
+ ctx,
+ ctx->Map.entry.Post_Routine
+ );
+ RtemsTimerReqServerFireWhen_Post_UserData_Check(
+ ctx,
+ ctx->Map.entry.Post_UserData
+ );
+}
+
+/**
+ * @fn void T_case_body_RtemsTimerReqServerFireWhen( void )
+ */
+T_TEST_CASE_FIXTURE(
+ RtemsTimerReqServerFireWhen,
+ &RtemsTimerReqServerFireWhen_Fixture
+)
+{
+ RtemsTimerReqServerFireWhen_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsTimerReqServerFireWhen_Pre_Server_Init;
+ ctx->Map.pcs[ 0 ] < RtemsTimerReqServerFireWhen_Pre_Server_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsTimerReqServerFireWhen_Pre_RtClock_Set;
+ ctx->Map.pcs[ 1 ] < RtemsTimerReqServerFireWhen_Pre_RtClock_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsTimerReqServerFireWhen_Pre_Routine_Valid;
+ ctx->Map.pcs[ 2 ] < RtemsTimerReqServerFireWhen_Pre_Routine_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsTimerReqServerFireWhen_Pre_WallTime_Valid;
+ ctx->Map.pcs[ 3 ] < RtemsTimerReqServerFireWhen_Pre_WallTime_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = RtemsTimerReqServerFireWhen_Pre_Id_Valid;
+ ctx->Map.pcs[ 4 ] < RtemsTimerReqServerFireWhen_Pre_Id_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = RtemsTimerReqServerFireWhen_Pre_Context_None;
+ ctx->Map.pcs[ 5 ] < RtemsTimerReqServerFireWhen_Pre_Context_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 6 ] = RtemsTimerReqServerFireWhen_Pre_Clock_None;
+ ctx->Map.pcs[ 6 ] < RtemsTimerReqServerFireWhen_Pre_Clock_NA;
+ ++ctx->Map.pcs[ 6 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 7 ] = RtemsTimerReqServerFireWhen_Pre_State_Inactive;
+ ctx->Map.pcs[ 7 ] < RtemsTimerReqServerFireWhen_Pre_State_NA;
+ ++ctx->Map.pcs[ 7 ]
+ ) {
+ ctx->Map.entry = RtemsTimerReqServerFireWhen_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsTimerReqServerFireWhen_Prepare( ctx );
+ RtemsTimerReqServerFireWhen_TestVariant( ctx );
+ RtemsTimerReqServerFireWhen_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timer.c b/testsuites/validation/tc-timer.c
new file mode 100644
index 0000000000..d33ad6b440
--- /dev/null
+++ b/testsuites/validation/tc-timer.c
@@ -0,0 +1,208 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTimerValTimer
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/atomic.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTimerValTimer spec:/rtems/timer/val/timer
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests general timer behaviour.
+ *
+ * This test case performs the following actions:
+ *
+ * - Create a couple of timers.
+ *
+ * - Schedule some timers at the same time point.
+ *
+ * - Fire the timers and check that they fired in the expected order.
+ *
+ * - Clean up all used resources.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/rtems/timer/val/timer test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the timer identifiers.
+ */
+ rtems_id timer_ids[ TEST_MAXIMUM_TIMERS ];
+
+ /**
+ * @brief This member contains the counter.
+ */
+ Atomic_Uint counter;
+
+ /**
+ * @brief This member contains the timer counter snapshots.
+ */
+ unsigned int counter_snapshots[ TEST_MAXIMUM_TIMERS ];
+} RtemsTimerValTimer_Context;
+
+static RtemsTimerValTimer_Context
+ RtemsTimerValTimer_Instance;
+
+typedef RtemsTimerValTimer_Context Context;
+
+static void Timer( rtems_id timer, void *arg )
+{
+ Context *ctx;
+ unsigned int *counter;
+
+ ctx = T_fixture_context();
+ counter = arg;
+ *counter = _Atomic_Fetch_add_uint(
+ &ctx->counter,
+ 1,
+ ATOMIC_ORDER_RELAXED
+ ) + 1;
+}
+
+static void Fire( Context *ctx, size_t i, rtems_interval ticks )
+{
+ rtems_status_code sc;
+
+ ctx->counter_snapshots[ i ] = 0;
+ sc = rtems_timer_fire_after(
+ ctx->timer_ids[ i ],
+ ticks,
+ Timer,
+ &ctx->counter_snapshots[ i ]
+ );
+ T_rsc_success( sc );
+}
+
+static T_fixture RtemsTimerValTimer_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &RtemsTimerValTimer_Instance
+};
+
+/**
+ * @brief Create a couple of timers.
+ */
+static void RtemsTimerValTimer_Action_0( RtemsTimerValTimer_Context *ctx )
+{
+ rtems_status_code sc;
+ size_t i;
+
+ T_assert_eq_sz( TEST_MAXIMUM_TIMERS, 10 );
+
+ _Atomic_Init_uint( &ctx->counter, 0 );
+
+ for ( i = 0; i < TEST_MAXIMUM_TIMERS ; ++i ) {
+ sc = rtems_timer_create(
+ rtems_build_name( 'T', 'E', 'S', 'T' ),
+ &ctx->timer_ids[ i ]
+ );
+ T_rsc_success( sc );
+ }
+
+ /*
+ * Schedule some timers at the same time point.
+ */
+ Fire( ctx, 3, 2 );
+ Fire( ctx, 0, 1 );
+ Fire( ctx, 7, 3 );
+ Fire( ctx, 4, 2 );
+ Fire( ctx, 5, 2 );
+ Fire( ctx, 8, 3 );
+ Fire( ctx, 9, 3 );
+ Fire( ctx, 1, 1 );
+ Fire( ctx, 2, 1 );
+ Fire( ctx, 6, 2 );
+
+ /*
+ * Fire the timers and check that they fired in the expected order.
+ */
+ FinalClockTick();
+
+ for ( i = 0; i < TEST_MAXIMUM_TIMERS ; ++i ) {
+ T_eq_sz( ctx->counter_snapshots[ i ], i + 1 );
+ }
+
+ /*
+ * Clean up all used resources.
+ */
+ for ( i = 0; i < TEST_MAXIMUM_TIMERS ; ++i ) {
+ sc = rtems_timer_delete( ctx->timer_ids[ i ] );
+ T_rsc_success( sc );
+ }
+}
+
+/**
+ * @fn void T_case_body_RtemsTimerValTimer( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTimerValTimer, &RtemsTimerValTimer_Fixture )
+{
+ RtemsTimerValTimer_Context *ctx;
+
+ ctx = T_fixture_context();
+
+ RtemsTimerValTimer_Action_0( ctx );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-type.c b/testsuites/validation/tc-type.c
new file mode 100644
index 0000000000..14f9aa1743
--- /dev/null
+++ b/testsuites/validation/tc-type.c
@@ -0,0 +1,130 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsTypeValType
+ */
+
+/*
+ * Copyright (C) 2021, 2023 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/objectimpl.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsTypeValType spec:/rtems/type/val/type
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests some @ref RTEMSAPIClassicTypes interfaces.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate the RTEMS_ID_NONE constant.
+ *
+ * - Assert that RTEMS_ID_NONE cannot be associated with an object because it
+ * has an object index outside the range of valid object indices.
+ *
+ * - Validate the RTEMS_NO_TIMEOUT constant.
+ *
+ * - Assert that RTEMS_NO_TIMEOUT is a compile time constant which evaluates
+ * to a value of zero.
+ *
+ * - Check that RTEMS_NO_TIMEOUT evaluates to a value of zero.
+ *
+ * @{
+ */
+
+/**
+ * @brief Validate the RTEMS_ID_NONE constant.
+ */
+static void RtemsTypeValType_Action_0( void )
+{
+ /* Nothing to do */
+
+ /*
+ * Assert that RTEMS_ID_NONE cannot be associated with an object because it
+ * has an object index outside the range of valid object indices.
+ */
+ RTEMS_STATIC_ASSERT(
+ ( ( RTEMS_ID_NONE >> OBJECTS_INDEX_START_BIT ) &
+ OBJECTS_INDEX_VALID_BITS ) < OBJECTS_INDEX_MINIMUM,
+ ID_NONE
+ );
+}
+
+/**
+ * @brief Validate the RTEMS_NO_TIMEOUT constant.
+ */
+static void RtemsTypeValType_Action_1( void )
+{
+ /* Nothing to do */
+
+ /*
+ * Assert that RTEMS_NO_TIMEOUT is a compile time constant which evaluates to
+ * a value of zero.
+ */
+ RTEMS_STATIC_ASSERT( RTEMS_NO_TIMEOUT == 0, NO_TIMEOUT );
+
+ /*
+ * Check that RTEMS_NO_TIMEOUT evaluates to a value of zero.
+ */
+ T_eq_u32( RTEMS_NO_TIMEOUT, 0 );
+}
+
+/**
+ * @fn void T_case_body_RtemsTypeValType( void )
+ */
+T_TEST_CASE( RtemsTypeValType )
+{
+ RtemsTypeValType_Action_0();
+ RtemsTypeValType_Action_1();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-userext-create.c b/testsuites/validation/tc-userext-create.c
new file mode 100644
index 0000000000..a15ccf6c1a
--- /dev/null
+++ b/testsuites/validation/tc-userext-create.c
@@ -0,0 +1,610 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsUserextReqCreate
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsUserextReqCreate spec:/rtems/userext/req/create
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsUserextReqCreate_Pre_Name_Valid,
+ RtemsUserextReqCreate_Pre_Name_Invalid,
+ RtemsUserextReqCreate_Pre_Name_NA
+} RtemsUserextReqCreate_Pre_Name;
+
+typedef enum {
+ RtemsUserextReqCreate_Pre_Id_Valid,
+ RtemsUserextReqCreate_Pre_Id_Null,
+ RtemsUserextReqCreate_Pre_Id_NA
+} RtemsUserextReqCreate_Pre_Id;
+
+typedef enum {
+ RtemsUserextReqCreate_Pre_Table_TdSw,
+ RtemsUserextReqCreate_Pre_Table_NoTdSw,
+ RtemsUserextReqCreate_Pre_Table_Null,
+ RtemsUserextReqCreate_Pre_Table_NA
+} RtemsUserextReqCreate_Pre_Table;
+
+typedef enum {
+ RtemsUserextReqCreate_Pre_Free_Yes,
+ RtemsUserextReqCreate_Pre_Free_No,
+ RtemsUserextReqCreate_Pre_Free_NA
+} RtemsUserextReqCreate_Pre_Free;
+
+typedef enum {
+ RtemsUserextReqCreate_Post_Status_Ok,
+ RtemsUserextReqCreate_Post_Status_InvName,
+ RtemsUserextReqCreate_Post_Status_InvAddr,
+ RtemsUserextReqCreate_Post_Status_TooMany,
+ RtemsUserextReqCreate_Post_Status_NA
+} RtemsUserextReqCreate_Post_Status;
+
+typedef enum {
+ RtemsUserextReqCreate_Post_Name_Valid,
+ RtemsUserextReqCreate_Post_Name_Invalid,
+ RtemsUserextReqCreate_Post_Name_NA
+} RtemsUserextReqCreate_Post_Name;
+
+typedef enum {
+ RtemsUserextReqCreate_Post_IdVar_Set,
+ RtemsUserextReqCreate_Post_IdVar_Nop,
+ RtemsUserextReqCreate_Post_IdVar_NA
+} RtemsUserextReqCreate_Post_IdVar;
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Name_NA : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_Table_NA : 1;
+ uint16_t Pre_Free_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_Name : 2;
+ uint16_t Post_IdVar : 2;
+} RtemsUserextReqCreate_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/userext/req/create test case.
+ */
+typedef struct {
+ void *seized_objects;
+
+ rtems_extensions_table table_variable;
+
+ rtems_id id_value;
+
+ rtems_name name;
+
+ rtems_extensions_table *table;
+
+ rtems_id *id;
+
+ rtems_status_code status;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 4 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsUserextReqCreate_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsUserextReqCreate_Context;
+
+static RtemsUserextReqCreate_Context
+ RtemsUserextReqCreate_Instance;
+
+static const char * const RtemsUserextReqCreate_PreDesc_Name[] = {
+ "Valid",
+ "Invalid",
+ "NA"
+};
+
+static const char * const RtemsUserextReqCreate_PreDesc_Id[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsUserextReqCreate_PreDesc_Table[] = {
+ "TdSw",
+ "NoTdSw",
+ "Null",
+ "NA"
+};
+
+static const char * const RtemsUserextReqCreate_PreDesc_Free[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const * const RtemsUserextReqCreate_PreDesc[] = {
+ RtemsUserextReqCreate_PreDesc_Name,
+ RtemsUserextReqCreate_PreDesc_Id,
+ RtemsUserextReqCreate_PreDesc_Table,
+ RtemsUserextReqCreate_PreDesc_Free,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+static rtems_status_code Create( void *arg, uint32_t *id )
+{
+ static const rtems_extensions_table table;
+
+ return rtems_extension_create(
+ rtems_build_name( 'S', 'I', 'Z', 'E' ),
+ &table,
+ id
+ );
+}
+
+static void ThreadSwitch( rtems_tcb *executing, rtems_tcb *heir)
+{
+ (void) executing;
+ (void) heir;
+}
+
+static void RtemsUserextReqCreate_Pre_Name_Prepare(
+ RtemsUserextReqCreate_Context *ctx,
+ RtemsUserextReqCreate_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsUserextReqCreate_Pre_Name_Valid: {
+ /*
+ * While the ``name`` parameter is valid.
+ */
+ ctx->name = NAME;
+ break;
+ }
+
+ case RtemsUserextReqCreate_Pre_Name_Invalid: {
+ /*
+ * While the ``name`` parameter is invalid.
+ */
+ ctx->name = 0;
+ break;
+ }
+
+ case RtemsUserextReqCreate_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsUserextReqCreate_Pre_Id_Prepare(
+ RtemsUserextReqCreate_Context *ctx,
+ RtemsUserextReqCreate_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsUserextReqCreate_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter references an object of type rtems_id.
+ */
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsUserextReqCreate_Pre_Id_Null: {
+ /*
+ * While the ``id`` parameter is NULL.
+ */
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsUserextReqCreate_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsUserextReqCreate_Pre_Table_Prepare(
+ RtemsUserextReqCreate_Context *ctx,
+ RtemsUserextReqCreate_Pre_Table state
+)
+{
+ switch ( state ) {
+ case RtemsUserextReqCreate_Pre_Table_TdSw: {
+ /*
+ * While the ``extension_table`` parameter references an object of type
+ * rtems_extensions_table, while all extensions except the thread switch
+ * extension of the referenced object are set to NULL or the address of a
+ * corresponding extension, while the thread switch extension of the
+ * referenced object is set to the address of a thread switch extension.
+ */
+ ctx->table = &ctx->table_variable;
+ ctx->table_variable.thread_switch = ThreadSwitch;
+ break;
+ }
+
+ case RtemsUserextReqCreate_Pre_Table_NoTdSw: {
+ /*
+ * While the ``extension_table`` parameter references an object of type
+ * rtems_id, while all extensions except the thread switch extension of
+ * the referenced object are set to NULL or the address of a
+ * corresponding extension, while the thread switch extension of the
+ * referenced object is set to NULL.
+ */
+ ctx->table = &ctx->table_variable;
+ ctx->table_variable.thread_switch = NULL;
+ break;
+ }
+
+ case RtemsUserextReqCreate_Pre_Table_Null: {
+ /*
+ * While the ``extension_table`` parameter is NULL.
+ */
+ ctx->table = NULL;
+ break;
+ }
+
+ case RtemsUserextReqCreate_Pre_Table_NA:
+ break;
+ }
+}
+
+static void RtemsUserextReqCreate_Pre_Free_Prepare(
+ RtemsUserextReqCreate_Context *ctx,
+ RtemsUserextReqCreate_Pre_Free state
+)
+{
+ switch ( state ) {
+ case RtemsUserextReqCreate_Pre_Free_Yes: {
+ /*
+ * While the system has at least one inactive extension set object
+ * available.
+ */
+ /* Nothing to do */
+ break;
+ }
+
+ case RtemsUserextReqCreate_Pre_Free_No: {
+ /*
+ * While the system has no inactive extension set object available.
+ */
+ ctx->seized_objects = T_seize_objects( Create, NULL );
+ break;
+ }
+
+ case RtemsUserextReqCreate_Pre_Free_NA:
+ break;
+ }
+}
+
+static void RtemsUserextReqCreate_Post_Status_Check(
+ RtemsUserextReqCreate_Context *ctx,
+ RtemsUserextReqCreate_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsUserextReqCreate_Post_Status_Ok: {
+ /*
+ * The return status of rtems_extension_create() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsUserextReqCreate_Post_Status_InvName: {
+ /*
+ * The return status of rtems_extension_create() shall be
+ * RTEMS_INVALID_NAME.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsUserextReqCreate_Post_Status_InvAddr: {
+ /*
+ * The return status of rtems_extension_create() shall be
+ * RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsUserextReqCreate_Post_Status_TooMany: {
+ /*
+ * The return status of rtems_extension_create() shall be RTEMS_TOO_MANY.
+ */
+ T_rsc( ctx->status, RTEMS_TOO_MANY );
+ break;
+ }
+
+ case RtemsUserextReqCreate_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsUserextReqCreate_Post_Name_Check(
+ RtemsUserextReqCreate_Context *ctx,
+ RtemsUserextReqCreate_Post_Name state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ switch ( state ) {
+ case RtemsUserextReqCreate_Post_Name_Valid: {
+ /*
+ * The unique object name shall identify the extension set created by the
+ * rtems_extension_create() call.
+ */
+ id = 0;
+ sc = rtems_extension_ident( NAME, &id );
+ T_rsc_success( sc );
+ T_eq_u32( id, ctx->id_value );
+ break;
+ }
+
+ case RtemsUserextReqCreate_Post_Name_Invalid: {
+ /*
+ * The unique object name shall not identify an extension set.
+ */
+ sc = rtems_extension_ident( NAME, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsUserextReqCreate_Post_Name_NA:
+ break;
+ }
+}
+
+static void RtemsUserextReqCreate_Post_IdVar_Check(
+ RtemsUserextReqCreate_Context *ctx,
+ RtemsUserextReqCreate_Post_IdVar state
+)
+{
+ switch ( state ) {
+ case RtemsUserextReqCreate_Post_IdVar_Set: {
+ /*
+ * The value of the object referenced by the ``extension_table``
+ * parameter shall be set to the object identifier of the created
+ * extension set after the return of the rtems_extension_create() call.
+ */
+ T_eq_ptr( ctx->id, &ctx->id_value );
+ T_ne_u32( ctx->id_value, INVALID_ID );
+ break;
+ }
+
+ case RtemsUserextReqCreate_Post_IdVar_Nop: {
+ /*
+ * Objects referenced by the ``extension_table`` parameter in past calls
+ * to rtems_extension_create() shall not be accessed by the
+ * rtems_extension_create() call.
+ */
+ T_eq_u32( ctx->id_value, INVALID_ID );
+ break;
+ }
+
+ case RtemsUserextReqCreate_Post_IdVar_NA:
+ break;
+ }
+}
+
+static void RtemsUserextReqCreate_Setup( RtemsUserextReqCreate_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->id_value = INVALID_ID;
+}
+
+static void RtemsUserextReqCreate_Setup_Wrap( void *arg )
+{
+ RtemsUserextReqCreate_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsUserextReqCreate_Setup( ctx );
+}
+
+static void RtemsUserextReqCreate_Action( RtemsUserextReqCreate_Context *ctx )
+{
+ ctx->status = rtems_extension_create( ctx->name, ctx->table, ctx->id );
+}
+
+static void RtemsUserextReqCreate_Cleanup( RtemsUserextReqCreate_Context *ctx )
+{
+ if ( ctx->id_value != INVALID_ID ) {
+ rtems_status_code sc;
+
+ sc = rtems_extension_delete( ctx->id_value );
+ T_rsc_success( sc );
+
+ ctx->id_value = INVALID_ID;
+ }
+
+ T_surrender_objects( &ctx->seized_objects, rtems_extension_delete );
+}
+
+static const RtemsUserextReqCreate_Entry
+RtemsUserextReqCreate_Entries[] = {
+ { 0, 0, 0, 0, 0, RtemsUserextReqCreate_Post_Status_InvName,
+ RtemsUserextReqCreate_Post_Name_Invalid,
+ RtemsUserextReqCreate_Post_IdVar_Nop },
+ { 0, 0, 0, 0, 0, RtemsUserextReqCreate_Post_Status_InvAddr,
+ RtemsUserextReqCreate_Post_Name_Invalid,
+ RtemsUserextReqCreate_Post_IdVar_Nop },
+ { 0, 0, 0, 0, 0, RtemsUserextReqCreate_Post_Status_Ok,
+ RtemsUserextReqCreate_Post_Name_Valid, RtemsUserextReqCreate_Post_IdVar_Set },
+ { 0, 0, 0, 0, 0, RtemsUserextReqCreate_Post_Status_TooMany,
+ RtemsUserextReqCreate_Post_Name_Invalid,
+ RtemsUserextReqCreate_Post_IdVar_Nop }
+};
+
+static const uint8_t
+RtemsUserextReqCreate_Map[] = {
+ 2, 3, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static size_t RtemsUserextReqCreate_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsUserextReqCreate_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsUserextReqCreate_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsUserextReqCreate_Fixture = {
+ .setup = RtemsUserextReqCreate_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsUserextReqCreate_Scope,
+ .initial_context = &RtemsUserextReqCreate_Instance
+};
+
+static inline RtemsUserextReqCreate_Entry RtemsUserextReqCreate_PopEntry(
+ RtemsUserextReqCreate_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsUserextReqCreate_Entries[
+ RtemsUserextReqCreate_Map[ index ]
+ ];
+}
+
+static void RtemsUserextReqCreate_TestVariant(
+ RtemsUserextReqCreate_Context *ctx
+)
+{
+ RtemsUserextReqCreate_Pre_Name_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsUserextReqCreate_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsUserextReqCreate_Pre_Table_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsUserextReqCreate_Pre_Free_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsUserextReqCreate_Action( ctx );
+ RtemsUserextReqCreate_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsUserextReqCreate_Post_Name_Check( ctx, ctx->Map.entry.Post_Name );
+ RtemsUserextReqCreate_Post_IdVar_Check( ctx, ctx->Map.entry.Post_IdVar );
+}
+
+/**
+ * @fn void T_case_body_RtemsUserextReqCreate( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsUserextReqCreate, &RtemsUserextReqCreate_Fixture )
+{
+ RtemsUserextReqCreate_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsUserextReqCreate_Pre_Name_Valid;
+ ctx->Map.pcs[ 0 ] < RtemsUserextReqCreate_Pre_Name_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsUserextReqCreate_Pre_Id_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsUserextReqCreate_Pre_Id_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsUserextReqCreate_Pre_Table_TdSw;
+ ctx->Map.pcs[ 2 ] < RtemsUserextReqCreate_Pre_Table_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = RtemsUserextReqCreate_Pre_Free_Yes;
+ ctx->Map.pcs[ 3 ] < RtemsUserextReqCreate_Pre_Free_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ ctx->Map.entry = RtemsUserextReqCreate_PopEntry( ctx );
+ RtemsUserextReqCreate_TestVariant( ctx );
+ RtemsUserextReqCreate_Cleanup( ctx );
+ }
+ }
+ }
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-userext-delete.c b/testsuites/validation/tc-userext-delete.c
new file mode 100644
index 0000000000..9827d715bc
--- /dev/null
+++ b/testsuites/validation/tc-userext-delete.c
@@ -0,0 +1,387 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsUserextReqDelete
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <string.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsUserextReqDelete spec:/rtems/userext/req/delete
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsUserextReqDelete_Pre_Id_NoObj,
+ RtemsUserextReqDelete_Pre_Id_ExtTdSw,
+ RtemsUserextReqDelete_Pre_Id_ExtNoTdSw,
+ RtemsUserextReqDelete_Pre_Id_NA
+} RtemsUserextReqDelete_Pre_Id;
+
+typedef enum {
+ RtemsUserextReqDelete_Post_Status_Ok,
+ RtemsUserextReqDelete_Post_Status_InvId,
+ RtemsUserextReqDelete_Post_Status_NA
+} RtemsUserextReqDelete_Post_Status;
+
+typedef enum {
+ RtemsUserextReqDelete_Post_Name_Valid,
+ RtemsUserextReqDelete_Post_Name_Invalid,
+ RtemsUserextReqDelete_Post_Name_NA
+} RtemsUserextReqDelete_Post_Name;
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_Name : 2;
+} RtemsUserextReqDelete_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/userext/req/delete test case.
+ */
+typedef struct {
+ rtems_id extension_id;
+
+ rtems_extensions_table table;
+
+ rtems_id id;
+
+ rtems_status_code status;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsUserextReqDelete_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsUserextReqDelete_Context;
+
+static RtemsUserextReqDelete_Context
+ RtemsUserextReqDelete_Instance;
+
+static const char * const RtemsUserextReqDelete_PreDesc_Id[] = {
+ "NoObj",
+ "ExtTdSw",
+ "ExtNoTdSw",
+ "NA"
+};
+
+static const char * const * const RtemsUserextReqDelete_PreDesc[] = {
+ RtemsUserextReqDelete_PreDesc_Id,
+ NULL
+};
+
+#define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
+static void ThreadSwitch( rtems_tcb *executing, rtems_tcb *heir)
+{
+ (void) executing;
+ (void) heir;
+}
+
+static void RtemsUserextReqDelete_Pre_Id_Prepare(
+ RtemsUserextReqDelete_Context *ctx,
+ RtemsUserextReqDelete_Pre_Id state
+)
+{
+ rtems_status_code sc;
+ bool valid_id;
+
+ valid_id = false;
+
+ switch ( state ) {
+ case RtemsUserextReqDelete_Pre_Id_NoObj: {
+ /*
+ * While the ``id`` parameter is not associated with an extension set.
+ */
+ /* Already set by prologue */
+ break;
+ }
+
+ case RtemsUserextReqDelete_Pre_Id_ExtTdSw: {
+ /*
+ * While the ``id`` parameter is associated with an extension set with a
+ * thread switch extension.
+ */
+ valid_id = true;
+ ctx->table.thread_switch = ThreadSwitch;
+ break;
+ }
+
+ case RtemsUserextReqDelete_Pre_Id_ExtNoTdSw: {
+ /*
+ * While the ``id`` parameter is associated with an extension set without
+ * a thread switch extension.
+ */
+ valid_id = true;
+ ctx->table.thread_switch = NULL;
+ break;
+ }
+
+ case RtemsUserextReqDelete_Pre_Id_NA:
+ break;
+ }
+
+ sc = rtems_extension_create(
+ NAME,
+ &ctx->table,
+ &ctx->extension_id
+ );
+ T_rsc_success( sc );
+
+ if ( valid_id ) {
+ ctx->id = ctx->extension_id;
+ } else {
+ ctx->id = 0;
+ }
+}
+
+static void RtemsUserextReqDelete_Post_Status_Check(
+ RtemsUserextReqDelete_Context *ctx,
+ RtemsUserextReqDelete_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsUserextReqDelete_Post_Status_Ok: {
+ /*
+ * The return status of rtems_extension_delete() shall be
+ * RTEMS_SUCCESSFUL.
+ */
+ ctx->extension_id = 0;
+ T_rsc_success( ctx->status );
+ break;
+ }
+
+ case RtemsUserextReqDelete_Post_Status_InvId: {
+ /*
+ * The return status of rtems_extension_delete() shall be
+ * RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsUserextReqDelete_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsUserextReqDelete_Post_Name_Check(
+ RtemsUserextReqDelete_Context *ctx,
+ RtemsUserextReqDelete_Post_Name state
+)
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ switch ( state ) {
+ case RtemsUserextReqDelete_Post_Name_Valid: {
+ /*
+ * The unique object name shall identify an extension set.
+ */
+ id = 0;
+ sc = rtems_extension_ident( NAME, &id );
+ T_rsc_success( sc );
+ T_eq_u32( id, ctx->extension_id );
+ break;
+ }
+
+ case RtemsUserextReqDelete_Post_Name_Invalid: {
+ /*
+ * The unique object name shall not identify an extension set.
+ */
+ sc = rtems_extension_ident( NAME, &id );
+ T_rsc( sc, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsUserextReqDelete_Post_Name_NA:
+ break;
+ }
+}
+
+static void RtemsUserextReqDelete_Setup( RtemsUserextReqDelete_Context *ctx )
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+}
+
+static void RtemsUserextReqDelete_Setup_Wrap( void *arg )
+{
+ RtemsUserextReqDelete_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsUserextReqDelete_Setup( ctx );
+}
+
+static void RtemsUserextReqDelete_Action( RtemsUserextReqDelete_Context *ctx )
+{
+ ctx->status = rtems_extension_delete( ctx->id );
+}
+
+static void RtemsUserextReqDelete_Cleanup( RtemsUserextReqDelete_Context *ctx )
+{
+ if ( ctx->extension_id != 0 ) {
+ rtems_status_code sc;
+
+ sc = rtems_extension_delete( ctx->extension_id );
+ T_rsc_success( sc );
+ }
+}
+
+static const RtemsUserextReqDelete_Entry
+RtemsUserextReqDelete_Entries[] = {
+ { 0, 0, RtemsUserextReqDelete_Post_Status_Ok,
+ RtemsUserextReqDelete_Post_Name_Invalid },
+ { 0, 0, RtemsUserextReqDelete_Post_Status_InvId,
+ RtemsUserextReqDelete_Post_Name_Valid }
+};
+
+static const uint8_t
+RtemsUserextReqDelete_Map[] = {
+ 1, 0, 0
+};
+
+static size_t RtemsUserextReqDelete_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsUserextReqDelete_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsUserextReqDelete_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsUserextReqDelete_Fixture = {
+ .setup = RtemsUserextReqDelete_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsUserextReqDelete_Scope,
+ .initial_context = &RtemsUserextReqDelete_Instance
+};
+
+static inline RtemsUserextReqDelete_Entry RtemsUserextReqDelete_PopEntry(
+ RtemsUserextReqDelete_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsUserextReqDelete_Entries[
+ RtemsUserextReqDelete_Map[ index ]
+ ];
+}
+
+static void RtemsUserextReqDelete_TestVariant(
+ RtemsUserextReqDelete_Context *ctx
+)
+{
+ RtemsUserextReqDelete_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsUserextReqDelete_Action( ctx );
+ RtemsUserextReqDelete_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsUserextReqDelete_Post_Name_Check( ctx, ctx->Map.entry.Post_Name );
+}
+
+/**
+ * @fn void T_case_body_RtemsUserextReqDelete( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsUserextReqDelete, &RtemsUserextReqDelete_Fixture )
+{
+ RtemsUserextReqDelete_Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsUserextReqDelete_Pre_Id_NoObj;
+ ctx->Map.pcs[ 0 ] < RtemsUserextReqDelete_Pre_Id_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = RtemsUserextReqDelete_PopEntry( ctx );
+ RtemsUserextReqDelete_TestVariant( ctx );
+ RtemsUserextReqDelete_Cleanup( ctx );
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-userext-ident.c b/testsuites/validation/tc-userext-ident.c
new file mode 100644
index 0000000000..24646b6a54
--- /dev/null
+++ b/testsuites/validation/tc-userext-ident.c
@@ -0,0 +1,119 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsUserextValIdent
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident-local.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsUserextValIdent spec:/rtems/userext/val/ident
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Test the rtems_extension_ident() directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API user extension
+ * class objects defined by spec:/rtems/req/ident-local.
+ *
+ * @{
+ */
+
+#define NAME_LOCAL_OBJECT rtems_build_name( 'U', 'E', 'X', 'T' )
+
+static rtems_status_code ClassicUserExtIdentAction(
+ rtems_name name,
+ rtems_id *id
+)
+{
+ return rtems_extension_ident( name, id );
+}
+
+/**
+ * @brief Run the generic object identification tests for Classic API user
+ * extension class objects defined by spec:/rtems/req/ident-local.
+ */
+static void RtemsUserextValIdent_Action_0( void )
+{
+ static const rtems_extensions_table table;
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_extension_create(
+ NAME_LOCAL_OBJECT,
+ &table,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdentLocal_Run(
+ id_local_object,
+ NAME_LOCAL_OBJECT,
+ ClassicUserExtIdentAction
+ );
+
+ sc = rtems_extension_delete( id_local_object );
+ T_rsc_success( sc );
+}
+
+/**
+ * @fn void T_case_body_RtemsUserextValIdent( void )
+ */
+T_TEST_CASE( RtemsUserextValIdent )
+{
+ RtemsUserextValIdent_Action_0();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-userext.c b/testsuites/validation/tc-userext.c
new file mode 100644
index 0000000000..192be30669
--- /dev/null
+++ b/testsuites/validation/tc-userext.c
@@ -0,0 +1,918 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsUserextValUserext
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <rtems/score/apimutex.h>
+#include <rtems/score/atomic.h>
+
+#include "tc-userext.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsUserextValUserext spec:/rtems/userext/val/userext
+ *
+ * @ingroup TestsuitesUserext
+ *
+ * @brief Tests the thread user extensions.
+ *
+ * This test case performs the following actions:
+ *
+ * - Create five dynamic extensions. Switch to a started thread. Delete three
+ * dynamic extension during the thread begin invocation. Clean up the used
+ * resources.
+ *
+ * - Check that the thread switch extensions were invoked in the right order
+ * before the thread begin extensions.
+ *
+ * - Check that the thread begin extensions were invoked in the right order.
+ *
+ * - Check that the other extensions were not invoked.
+ *
+ * - Check that the thread begin extension of the extension set deleted
+ * before its turn in the invocation was not invoked.
+ *
+ * - Create five dynamic extensions. Create a thread. Delete three dynamic
+ * extension during the thread create invocation. Clean up the used
+ * resources.
+ *
+ * - Check that the thread create extensions were invoked in the right order.
+ *
+ * - Check that the thread create extensions were invoked under protection of
+ * the allocator mutex.
+ *
+ * - Check that the other extensions were not invoked.
+ *
+ * - Check that the thread create extension of the extension set deleted
+ * before its turn in the invocation was not invoked.
+ *
+ * - Create five dynamic extensions. Delete a thread. Delete three dynamic
+ * extension during the thread delete invocation. Clean up the used
+ * resources.
+ *
+ * - Check that the thread delete extensions were invoked in the right order.
+ *
+ * - Check that the thread delete extensions were invoked under protection of
+ * the allocator mutex.
+ *
+ * - Check that the other extensions were not invoked.
+ *
+ * - Check that the thread delete extension of the extension set deleted
+ * before its turn in the invocation was not invoked.
+ *
+ * - Create five dynamic extensions. Return from a thread entry. Delete three
+ * dynamic extension during the thread exitted invocation. Clean up the used
+ * resources.
+ *
+ * - Check that the thread exitted extensions were invoked in the right
+ * order.
+ *
+ * - Check that the other extensions were not invoked.
+ *
+ * - Check that the thread exitted extension of the extension set deleted
+ * before its turn in the invocation was not invoked.
+ *
+ * - Create five dynamic extensions. Restart a thread. Delete three dynamic
+ * extension during the thread restart invocation. Clean up the used
+ * resources.
+ *
+ * - Check that the thread restart extensions were invoked in the right
+ * order.
+ *
+ * - Check that the other extensions were not invoked.
+ *
+ * - Check that the thread restart extension of the extension set deleted
+ * before its turn in the invocation was not invoked.
+ *
+ * - Create five dynamic extensions. Start a thread. Delete three dynamic
+ * extension during the thread start invocation. Clean up the used
+ * resources.
+ *
+ * - Check that the thread start extensions were invoked in the right order.
+ *
+ * - Check that the other extensions were not invoked.
+ *
+ * - Check that the thread start extension of the extension set deleted
+ * before its turn in the invocation was not invoked.
+ *
+ * - Create five dynamic extensions. Terminate a thread. Delete three dynamic
+ * extension during the thread terminate invocation. Clean up the used
+ * resources.
+ *
+ * - Check that the thread terminate extensions were invoked in the right
+ * order.
+ *
+ * - Check that the other extensions were not invoked.
+ *
+ * - Check that the thread terminate extension of the extension set deleted
+ * before its turn in the invocation was not invoked.
+ *
+ * - Create five dynamic extensions. Let an idle thread return from its entry.
+ * Delete three dynamic extension during the thread exitted invocation.
+ * Clean up the used resources.
+ *
+ * - Check that the thread exitted extensions were invoked in the right
+ * order.
+ *
+ * - Check that the other extensions were not invoked.
+ *
+ * - Check that the thread exitted extension of the extension set deleted
+ * before its turn in the invocation was not invoked.
+ *
+ * @{
+ */
+
+typedef struct {
+ unsigned int counter;
+ rtems_tcb *executing;
+ rtems_tcb *thread;
+} ExtensionEvent;
+
+typedef enum {
+ THREAD_BEGIN,
+ THREAD_CREATE,
+ THREAD_DELETE,
+ THREAD_EXITTED,
+ THREAD_RESTART,
+ THREAD_START,
+ THREAD_SWITCH,
+ THREAD_TERMINATE,
+ EXTENSION_KIND_COUNT
+} ExtensionKind;
+
+static rtems_id extension_ids[ 7 ];
+
+static Atomic_Uint extension_counter[ RTEMS_ARRAY_SIZE( extension_ids ) ]
+ [ EXTENSION_KIND_COUNT ];
+
+static ExtensionEvent extension_events[ RTEMS_ARRAY_SIZE( extension_ids ) ]
+ [ EXTENSION_KIND_COUNT ][ 3 ];
+
+static Atomic_Uint global_counter;
+
+static ExtensionKind extension_under_test = EXTENSION_KIND_COUNT;
+
+static uint32_t thread_create_allocator_owner_count;
+
+static uint32_t thread_delete_allocator_owner_count;
+
+static void StopTestCase( void )
+{
+ ExtensionKind kind;
+ rtems_status_code sc;
+
+ kind = extension_under_test;
+ extension_under_test = EXTENSION_KIND_COUNT;
+
+ sc = rtems_extension_delete( extension_ids[ 2 ] );
+ T_rsc_success( sc );
+
+ if ( kind == THREAD_SWITCH ) {
+ sc = rtems_extension_delete( extension_ids[ 3 ] );
+ T_rsc_success( sc );
+
+ sc = rtems_extension_delete( extension_ids[ 4 ] );
+ T_rsc_success( sc );
+
+ sc = rtems_extension_delete( extension_ids[ 5 ] );
+ T_rsc_success( sc );
+ }
+
+ sc = rtems_extension_delete( extension_ids[ 6 ] );
+ T_rsc_success( sc );
+}
+
+static void Extension(
+ size_t index,
+ ExtensionKind kind,
+ rtems_tcb *executing,
+ rtems_tcb *thread
+)
+{
+ unsigned int gc;
+ unsigned int c;
+ rtems_status_code sc;
+
+ if ( extension_under_test == EXTENSION_KIND_COUNT ) {
+ return;
+ }
+
+ if ( kind == THREAD_CREATE && _RTEMS_Allocator_is_owner() ) {
+ ++thread_create_allocator_owner_count;
+ }
+
+ if ( kind == THREAD_DELETE && _RTEMS_Allocator_is_owner() ) {
+ ++thread_delete_allocator_owner_count;
+ }
+
+ gc = _Atomic_Fetch_add_uint( &global_counter, 1, ATOMIC_ORDER_RELAXED ) + 1;
+ c = _Atomic_Fetch_add_uint(
+ &extension_counter[ index ][ kind ],
+ 1,
+ ATOMIC_ORDER_RELAXED
+ );
+
+ if ( c < RTEMS_ARRAY_SIZE( extension_events[ index ][ kind ] ) ) {
+ extension_events[ index ][ kind ][ c ].counter = gc;
+ extension_events[ index ][ kind ][ c ].executing = executing;
+ extension_events[ index ][ kind ][ c ].thread = thread;
+ }
+
+ if ( kind == THREAD_SWITCH ) {
+ /* Extension set deletion is not allowed in thread switch extensions */
+ return;
+ }
+
+ if ( kind != extension_under_test ) {
+ return;
+ }
+
+ if ( kind == THREAD_DELETE || kind == THREAD_TERMINATE ) {
+ if ( index == 6 ) {
+ sc = rtems_extension_delete( extension_ids[ 5 ] );
+ T_rsc_success( sc );
+ } else if ( index == 3 ) {
+ sc = rtems_extension_delete( extension_ids[ 3 ] );
+ T_rsc_success( sc );
+ } else if ( index == 2 ) {
+ sc = rtems_extension_delete( extension_ids[ 4 ] );
+ T_rsc_success( sc );
+ }
+ } else {
+ if ( index == 2 ) {
+ sc = rtems_extension_delete( extension_ids[ 3 ] );
+ T_rsc_success( sc );
+ } else if ( index == 5 ) {
+ sc = rtems_extension_delete( extension_ids[ 5 ] );
+ T_rsc_success( sc );
+ } else if ( index == 6 ) {
+ sc = rtems_extension_delete( extension_ids[ 4 ] );
+ T_rsc_success( sc );
+ }
+ }
+
+ if ( index == 6 && ( kind == THREAD_EXITTED || kind == THREAD_RESTART ) ) {
+ StopTestCase();
+
+ if ( GetExecuting()->is_idle ) {
+ SetSelfPriority( RTEMS_MAXIMUM_PRIORITY );
+ _CPU_Thread_Idle_body( 0 );
+ } else {
+ rtems_task_exit();
+ }
+ }
+
+ if ( index == 0 && kind == THREAD_TERMINATE ) {
+ StopTestCase();
+ }
+}
+
+#define DEFINE_EXTENSIONS( index, linkage ) \
+ linkage void ThreadBeginExtension##index( rtems_tcb *executing ) \
+ { \
+ Extension( index, THREAD_BEGIN, executing, NULL ); \
+ } \
+ linkage bool ThreadCreateExtension##index( \
+ rtems_tcb *executing, \
+ rtems_tcb *created \
+ ) \
+ { \
+ Extension( index, THREAD_CREATE, executing, created ); \
+ return true; \
+ } \
+ linkage void ThreadDeleteExtension##index( \
+ rtems_tcb *executing, \
+ rtems_tcb *deleted \
+ ) \
+ { \
+ Extension( index, THREAD_DELETE, executing, deleted ); \
+ } \
+ linkage void ThreadExittedExtension##index( rtems_tcb *executing ) \
+ { \
+ Extension( index, THREAD_EXITTED, executing, NULL ); \
+ } \
+ linkage void ThreadRestartExtension##index( \
+ rtems_tcb *executing, \
+ rtems_tcb *restarted \
+ ) \
+ { \
+ Extension( index, THREAD_RESTART, executing, restarted ); \
+ } \
+ linkage void ThreadStartExtension##index( \
+ rtems_tcb *executing, \
+ rtems_tcb *started \
+ ) \
+ { \
+ Extension( index, THREAD_START, executing, started ); \
+ } \
+ linkage void ThreadSwitchExtension##index( \
+ rtems_tcb *executing, \
+ rtems_tcb *heir \
+ ) \
+ { \
+ Extension( index, THREAD_SWITCH, executing, heir ); \
+ } \
+ linkage void ThreadTerminateExtension##index( rtems_tcb *executing ) \
+ { \
+ Extension( index, THREAD_TERMINATE, executing, NULL ); \
+ }
+
+DEFINE_EXTENSIONS( 0, )
+DEFINE_EXTENSIONS( 1, )
+
+#define DEFINE_EXTENSIONS_AND_TABLE( index ) \
+ DEFINE_EXTENSIONS( index, static ) \
+ static const rtems_extensions_table table_##index = { \
+ .thread_begin = ThreadBeginExtension##index, \
+ .thread_create = ThreadCreateExtension##index, \
+ .thread_delete = ThreadDeleteExtension##index, \
+ .thread_exitted = ThreadExittedExtension##index, \
+ .thread_restart = ThreadRestartExtension##index, \
+ .thread_start = ThreadStartExtension##index, \
+ .thread_switch = ThreadSwitchExtension##index, \
+ .thread_terminate = ThreadTerminateExtension##index \
+ }
+
+DEFINE_EXTENSIONS_AND_TABLE( 2 );
+DEFINE_EXTENSIONS_AND_TABLE( 3 );
+DEFINE_EXTENSIONS_AND_TABLE( 4 );
+DEFINE_EXTENSIONS_AND_TABLE( 5 );
+DEFINE_EXTENSIONS_AND_TABLE( 6 );
+
+static const rtems_extensions_table * const tables[] = {
+ NULL,
+ NULL,
+ &table_2,
+ &table_3,
+ &table_4,
+ &table_5,
+ &table_6
+};
+
+static rtems_tcb *StartTestCase( ExtensionKind kind )
+{
+ size_t i;
+
+ thread_create_allocator_owner_count = 0;
+ thread_delete_allocator_owner_count = 0;
+ _Atomic_Store_uint( &global_counter, 0, ATOMIC_ORDER_RELAXED );
+ memset( extension_counter, 0, sizeof( extension_counter ) );
+ memset( extension_events, 0, sizeof( extension_events ) );
+
+ extension_under_test = kind;
+
+ for ( i = 2; i < RTEMS_ARRAY_SIZE( extension_ids ); ++i ) {
+ rtems_status_code sc;
+
+ sc = rtems_extension_create(
+ rtems_build_name( ' ', ' ', ' ', '2' + i ),
+ tables[ i ],
+ &extension_ids[ i ]
+ );
+ T_rsc_success( sc );
+ }
+
+ return GetExecuting();
+}
+
+static void CheckForward(
+ ExtensionKind kind,
+ unsigned int counter,
+ unsigned int increment,
+ rtems_tcb *executing,
+ rtems_tcb *thread
+)
+{
+ size_t i;
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( extension_ids ); ++i ) {
+ if ( i == 3 && kind != THREAD_SWITCH ) {
+ continue;
+ }
+
+ if ( counter == 0 ) {
+ T_eq_uint( extension_counter[ i ][ kind ], 0 );
+ } else {
+ T_eq_uint( extension_counter[ i ][ kind ], 1 );
+ T_eq_uint( extension_events[ i ][ kind ][ 0 ].counter, counter );
+ T_eq_ptr( extension_events[ i ][ kind ][ 0 ].executing, executing );
+ T_eq_ptr( extension_events[ i ][ kind ][ 0 ].thread, thread );
+
+ counter += increment;
+ }
+ }
+}
+
+static void CheckReverse(
+ ExtensionKind kind,
+ unsigned int counter,
+ unsigned int increment,
+ rtems_tcb *executing,
+ rtems_tcb *thread
+)
+{
+ size_t i;
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( extension_ids ); ++i ) {
+ if ( i == 5 && kind != THREAD_SWITCH ) {
+ continue;
+ }
+
+ if ( counter == 0 ) {
+ T_eq_uint( extension_counter[ i ][ kind ], 0 );
+ } else {
+ T_eq_uint( extension_counter[ i ][ kind ], 1 );
+ T_eq_uint(
+ extension_events[ i ][ kind ][ 0 ].counter,
+ 7 - counter
+ );
+ T_eq_ptr( extension_events[ i ][ kind ][ 0 ].executing, executing );
+ T_eq_ptr( extension_events[ i ][ kind ][ 0 ].thread, thread );
+
+ counter += increment;
+ }
+ }
+}
+
+static void CheckDeletedNotInvoked( ExtensionKind kind )
+{
+ size_t index;
+
+ if ( kind == THREAD_DELETE || kind == THREAD_TERMINATE ) {
+ index = 5;
+ } else {
+ index = 3;
+ }
+
+ T_eq_uint( extension_events[ index ][ kind ][ 0 ].counter, 0 );
+ T_null( extension_events[ index ][ kind ][ 0 ].executing );
+ T_null( extension_events[ index ][ kind ][ 0 ].thread );
+}
+
+static void BeginWorker( rtems_task_argument arg )
+{
+ T_eq_u32( arg, 0 );
+ StopTestCase();
+ rtems_task_exit();
+}
+
+static void ExittedWorker( rtems_task_argument arg )
+{
+ T_eq_u32( arg, 0 );
+ (void) StartTestCase( THREAD_EXITTED );
+}
+
+static void RestartWorker( rtems_task_argument arg )
+{
+ T_eq_u32( arg, 0 );
+ (void) StartTestCase( THREAD_RESTART );
+ (void) rtems_task_restart( RTEMS_SELF, 1 );
+}
+
+static void StartWorker( rtems_task_argument arg )
+{
+ (void) arg;
+ T_unreachable();
+}
+
+static void TerminateWorker( rtems_task_argument arg )
+{
+ T_eq_u32( arg, 0 );
+ (void) StartTestCase( THREAD_TERMINATE );
+ rtems_task_exit();
+}
+
+void *IdleBody( uintptr_t arg )
+{
+ rtems_event_set events;
+
+ do {
+ events = PollAnyEvents();
+ } while ( events == 0 );
+
+ (void) StartTestCase( THREAD_EXITTED );
+ return (void *) arg;
+}
+
+static void RtemsUserextValUserext_Setup( void *ctx )
+{
+ SetSelfPriority( PRIO_NORMAL );
+}
+
+static void RtemsUserextValUserext_Teardown( void *ctx )
+{
+ RestoreRunnerPriority();
+}
+
+static T_fixture RtemsUserextValUserext_Fixture = {
+ .setup = RtemsUserextValUserext_Setup,
+ .stop = NULL,
+ .teardown = RtemsUserextValUserext_Teardown,
+ .scope = NULL,
+ .initial_context = NULL
+};
+
+/**
+ * @brief Create five dynamic extensions. Switch to a started thread. Delete
+ * three dynamic extension during the thread begin invocation. Clean up the
+ * used resources.
+ */
+static void RtemsUserextValUserext_Action_0( void )
+{
+ rtems_tcb *executing;
+ rtems_tcb *thread;
+ rtems_id id;
+
+ id = CreateTask( "WORK", PRIO_LOW );
+ thread = GetThread( id );
+ StartTask( id, BeginWorker, NULL );
+ executing = StartTestCase( THREAD_BEGIN );
+ SetPriority( id, PRIO_HIGH );
+ KillZombies();
+
+ /*
+ * Check that the thread switch extensions were invoked in the right order
+ * before the thread begin extensions.
+ */
+ CheckForward( THREAD_SWITCH, 1, 1, executing, thread );
+
+ /*
+ * Check that the thread begin extensions were invoked in the right order.
+ */
+ CheckForward( THREAD_BEGIN, 8, 1, thread, NULL );
+
+ /*
+ * Check that the other extensions were not invoked.
+ */
+ CheckForward( THREAD_CREATE, 0, 0, NULL, NULL );
+ CheckReverse( THREAD_DELETE, 0, 0, NULL, NULL );
+ CheckForward( THREAD_EXITTED, 0, 0, NULL, NULL );
+ CheckForward( THREAD_RESTART, 0, 0, NULL, NULL );
+ CheckForward( THREAD_START, 0, 0, NULL, NULL );
+ CheckReverse( THREAD_TERMINATE, 0, 0, NULL, NULL );
+
+ /*
+ * Check that the thread begin extension of the extension set deleted before
+ * its turn in the invocation was not invoked.
+ */
+ CheckDeletedNotInvoked( THREAD_BEGIN );
+}
+
+/**
+ * @brief Create five dynamic extensions. Create a thread. Delete three
+ * dynamic extension during the thread create invocation. Clean up the used
+ * resources.
+ */
+static void RtemsUserextValUserext_Action_1( void )
+{
+ rtems_tcb *executing;
+ rtems_tcb *thread;
+ rtems_id id;
+
+ executing = StartTestCase( THREAD_CREATE );
+ id = CreateTask( "WORK", PRIO_NORMAL );
+ thread = GetThread( id );
+ StopTestCase();
+ DeleteTask( id );
+ KillZombies();
+
+ /*
+ * Check that the thread create extensions were invoked in the right order.
+ */
+ CheckForward( THREAD_CREATE, 1, 1, executing, thread );
+
+ /*
+ * Check that the thread create extensions were invoked under protection of
+ * the allocator mutex.
+ */
+ T_eq_u32( thread_create_allocator_owner_count, 6 );
+
+ /*
+ * Check that the other extensions were not invoked.
+ */
+ CheckForward( THREAD_BEGIN, 0, 0, NULL, NULL );
+ CheckReverse( THREAD_DELETE, 0, 0, NULL, NULL );
+ CheckForward( THREAD_EXITTED, 0, 0, NULL, NULL );
+ CheckForward( THREAD_RESTART, 0, 0, NULL, NULL );
+ CheckForward( THREAD_START, 0, 0, NULL, NULL );
+ CheckForward( THREAD_SWITCH, 0, 0, NULL, NULL );
+ CheckReverse( THREAD_TERMINATE, 0, 0, NULL, NULL );
+
+ /*
+ * Check that the thread create extension of the extension set deleted before
+ * its turn in the invocation was not invoked.
+ */
+ CheckDeletedNotInvoked( THREAD_CREATE );
+}
+
+/**
+ * @brief Create five dynamic extensions. Delete a thread. Delete three
+ * dynamic extension during the thread delete invocation. Clean up the used
+ * resources.
+ */
+static void RtemsUserextValUserext_Action_2( void )
+{
+ rtems_tcb *executing;
+ rtems_tcb *thread;
+ rtems_id id;
+
+ id = CreateTask( "WORK", PRIO_NORMAL );
+ thread = GetThread( id );
+ DeleteTask( id );
+ executing = StartTestCase( THREAD_DELETE );
+ KillZombies();
+ StopTestCase();
+
+ /*
+ * Check that the thread delete extensions were invoked in the right order.
+ */
+ CheckReverse( THREAD_DELETE, 1, 1, executing, thread );
+
+ /*
+ * Check that the thread delete extensions were invoked under protection of
+ * the allocator mutex.
+ */
+ T_eq_u32( thread_delete_allocator_owner_count, 6 );
+
+ /*
+ * Check that the other extensions were not invoked.
+ */
+ CheckForward( THREAD_BEGIN, 0, 0, NULL, NULL );
+ CheckForward( THREAD_CREATE, 0, 0, NULL, NULL );
+ CheckForward( THREAD_EXITTED, 0, 0, NULL, NULL );
+ CheckForward( THREAD_RESTART, 0, 0, NULL, NULL );
+ CheckForward( THREAD_START, 0, 0, NULL, NULL );
+ CheckForward( THREAD_SWITCH, 0, 0, NULL, NULL );
+ CheckReverse( THREAD_TERMINATE, 0, 0, NULL, NULL );
+
+ /*
+ * Check that the thread delete extension of the extension set deleted before
+ * its turn in the invocation was not invoked.
+ */
+ CheckDeletedNotInvoked( THREAD_DELETE );
+}
+
+/**
+ * @brief Create five dynamic extensions. Return from a thread entry. Delete
+ * three dynamic extension during the thread exitted invocation. Clean up
+ * the used resources.
+ */
+static void RtemsUserextValUserext_Action_3( void )
+{
+ rtems_tcb *thread;
+ rtems_id id;
+
+ id = CreateTask( "WORK", PRIO_HIGH );
+ thread = GetThread( id );
+ StartTask( id, ExittedWorker, NULL );
+ KillZombies();
+
+ /*
+ * Check that the thread exitted extensions were invoked in the right order.
+ */
+ CheckForward( THREAD_EXITTED, 1, 1, thread, NULL );
+
+ /*
+ * Check that the other extensions were not invoked.
+ */
+ CheckForward( THREAD_BEGIN, 0, 0, NULL, NULL );
+ CheckForward( THREAD_CREATE, 0, 0, NULL, NULL );
+ CheckReverse( THREAD_DELETE, 0, 0, NULL, NULL );
+ CheckForward( THREAD_RESTART, 0, 0, NULL, NULL );
+ CheckForward( THREAD_START, 0, 0, NULL, NULL );
+ CheckForward( THREAD_SWITCH, 0, 0, NULL, NULL );
+ CheckReverse( THREAD_TERMINATE, 0, 0, NULL, NULL );
+
+ /*
+ * Check that the thread exitted extension of the extension set deleted
+ * before its turn in the invocation was not invoked.
+ */
+ CheckDeletedNotInvoked( THREAD_EXITTED );
+}
+
+/**
+ * @brief Create five dynamic extensions. Restart a thread. Delete three
+ * dynamic extension during the thread restart invocation. Clean up the used
+ * resources.
+ */
+static void RtemsUserextValUserext_Action_4( void )
+{
+ rtems_tcb *thread;
+ rtems_id id;
+
+ id = CreateTask( "WORK", PRIO_HIGH );
+ thread = GetThread( id );
+ StartTask( id, RestartWorker, NULL );
+ KillZombies();
+
+ /*
+ * Check that the thread restart extensions were invoked in the right order.
+ */
+ CheckForward( THREAD_RESTART, 1, 1, thread, thread );
+
+ /*
+ * Check that the other extensions were not invoked.
+ */
+ CheckForward( THREAD_BEGIN, 0, 0, NULL, NULL );
+ CheckForward( THREAD_EXITTED, 0, 0, NULL, NULL );
+ CheckForward( THREAD_CREATE, 0, 0, NULL, NULL );
+ CheckReverse( THREAD_DELETE, 0, 0, NULL, NULL );
+ CheckForward( THREAD_START, 0, 0, NULL, NULL );
+ CheckForward( THREAD_SWITCH, 0, 0, NULL, NULL );
+ CheckForward( THREAD_TERMINATE, 0, 0, NULL, NULL );
+
+ /*
+ * Check that the thread restart extension of the extension set deleted
+ * before its turn in the invocation was not invoked.
+ */
+ CheckDeletedNotInvoked( THREAD_RESTART );
+}
+
+/**
+ * @brief Create five dynamic extensions. Start a thread. Delete three
+ * dynamic extension during the thread start invocation. Clean up the used
+ * resources.
+ */
+static void RtemsUserextValUserext_Action_5( void )
+{
+ rtems_tcb *executing;
+ rtems_tcb *thread;
+ rtems_id id;
+
+ id = CreateTask( "WORK", PRIO_LOW );
+ thread = GetThread( id );
+ executing = StartTestCase( THREAD_START );
+ StartTask( id, StartWorker, NULL );
+ StopTestCase();
+ DeleteTask( id );
+ KillZombies();
+
+ /*
+ * Check that the thread start extensions were invoked in the right order.
+ */
+ CheckForward( THREAD_START, 1, 1, executing, thread );
+
+ /*
+ * Check that the other extensions were not invoked.
+ */
+ CheckForward( THREAD_BEGIN, 0, 0, NULL, NULL );
+ CheckForward( THREAD_EXITTED, 0, 0, NULL, NULL );
+ CheckForward( THREAD_CREATE, 0, 0, NULL, NULL );
+ CheckReverse( THREAD_DELETE, 0, 0, NULL, NULL );
+ CheckForward( THREAD_RESTART, 0, 0, NULL, NULL );
+ CheckForward( THREAD_SWITCH, 0, 0, NULL, NULL );
+ CheckForward( THREAD_TERMINATE, 0, 0, NULL, NULL );
+
+ /*
+ * Check that the thread start extension of the extension set deleted before
+ * its turn in the invocation was not invoked.
+ */
+ CheckDeletedNotInvoked( THREAD_START );
+}
+
+/**
+ * @brief Create five dynamic extensions. Terminate a thread. Delete three
+ * dynamic extension during the thread terminate invocation. Clean up the
+ * used resources.
+ */
+static void RtemsUserextValUserext_Action_6( void )
+{
+ rtems_tcb *thread;
+ rtems_id id;
+
+ id = CreateTask( "WORK", PRIO_HIGH );
+ thread = GetThread( id );
+ StartTask( id, TerminateWorker, NULL );
+ KillZombies();
+
+ /*
+ * Check that the thread terminate extensions were invoked in the right
+ * order.
+ */
+ CheckReverse( THREAD_TERMINATE, 1, 1, thread, NULL );
+
+ /*
+ * Check that the other extensions were not invoked.
+ */
+ CheckForward( THREAD_BEGIN, 0, 0, NULL, NULL );
+ CheckForward( THREAD_EXITTED, 0, 0, NULL, NULL );
+ CheckForward( THREAD_CREATE, 0, 0, NULL, NULL );
+ CheckReverse( THREAD_DELETE, 0, 0, NULL, NULL );
+ CheckForward( THREAD_RESTART, 0, 0, NULL, NULL );
+ CheckForward( THREAD_START, 0, 0, NULL, NULL );
+ CheckForward( THREAD_SWITCH, 0, 0, NULL, NULL );
+
+ /*
+ * Check that the thread terminate extension of the extension set deleted
+ * before its turn in the invocation was not invoked.
+ */
+ CheckDeletedNotInvoked( THREAD_TERMINATE );
+}
+
+/**
+ * @brief Create five dynamic extensions. Let an idle thread return from its
+ * entry. Delete three dynamic extension during the thread exitted
+ * invocation. Clean up the used resources.
+ */
+static void RtemsUserextValUserext_Action_7( void )
+{
+ rtems_tcb *thread;
+ rtems_id id;
+
+ /* ID of idle thread of processor 0 */
+ id = 0x09010001;
+ thread = GetThread( id );
+ SendEvents( id, RTEMS_EVENT_0 );
+ SetPriority( id, PRIO_HIGH );
+
+ /*
+ * Check that the thread exitted extensions were invoked in the right order.
+ */
+ CheckForward( THREAD_EXITTED, 1, 1, thread, NULL );
+
+ /*
+ * Check that the other extensions were not invoked.
+ */
+ CheckForward( THREAD_BEGIN, 0, 0, NULL, NULL );
+ CheckForward( THREAD_CREATE, 0, 0, NULL, NULL );
+ CheckReverse( THREAD_DELETE, 0, 0, NULL, NULL );
+ CheckForward( THREAD_RESTART, 0, 0, NULL, NULL );
+ CheckForward( THREAD_START, 0, 0, NULL, NULL );
+ CheckForward( THREAD_SWITCH, 0, 0, NULL, NULL );
+ CheckReverse( THREAD_TERMINATE, 0, 0, NULL, NULL );
+
+ /*
+ * Check that the thread exitted extension of the extension set deleted
+ * before its turn in the invocation was not invoked.
+ */
+ CheckDeletedNotInvoked( THREAD_EXITTED );
+}
+
+/**
+ * @fn void T_case_body_RtemsUserextValUserext( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsUserextValUserext, &RtemsUserextValUserext_Fixture )
+{
+ RtemsUserextValUserext_Action_0();
+ RtemsUserextValUserext_Action_1();
+ RtemsUserextValUserext_Action_2();
+ RtemsUserextValUserext_Action_3();
+ RtemsUserextValUserext_Action_4();
+ RtemsUserextValUserext_Action_5();
+ RtemsUserextValUserext_Action_6();
+ RtemsUserextValUserext_Action_7();
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-userext.h b/testsuites/validation/tc-userext.h
new file mode 100644
index 0000000000..538180dfd4
--- /dev/null
+++ b/testsuites/validation/tc-userext.h
@@ -0,0 +1,93 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreInterrValTerminate
+ *
+ * @brief This header file provides functions used by corresponding test suite.
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifndef _TC_USEREXT_H
+#define _TC_USEREXT_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void ThreadBeginExtension0( rtems_tcb *executing );
+
+bool ThreadCreateExtension0( rtems_tcb *executing, rtems_tcb *created );
+
+void ThreadDeleteExtension0( rtems_tcb *executing, rtems_tcb *deleted );
+
+void ThreadExittedExtension0( rtems_tcb *executing );
+
+void ThreadRestartExtension0( rtems_tcb *executing, rtems_tcb *restarted );
+
+void ThreadStartExtension0( rtems_tcb *executing, rtems_tcb *started );
+
+void ThreadSwitchExtension0( rtems_tcb *executing, rtems_tcb *heir );
+
+void ThreadTerminateExtension0( rtems_tcb *executing );
+
+void FatalExtension0(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+);
+
+void ThreadBeginExtension1( rtems_tcb *executing );
+
+bool ThreadCreateExtension1( rtems_tcb *executing, rtems_tcb *created );
+
+void ThreadDeleteExtension1( rtems_tcb *executing, rtems_tcb *deleted );
+
+void ThreadExittedExtension1( rtems_tcb *executing );
+
+void ThreadRestartExtension1( rtems_tcb *executing, rtems_tcb *restarted );
+
+void ThreadStartExtension1( rtems_tcb *executing, rtems_tcb *started );
+
+void ThreadSwitchExtension1( rtems_tcb *executing, rtems_tcb *heir );
+
+void ThreadTerminateExtension1( rtems_tcb *executing );
+
+void FatalExtension1(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TC_USEREXT_H */
diff --git a/testsuites/validation/tr-event-constant.c b/testsuites/validation/tr-event-constant.c
new file mode 100644
index 0000000000..a0327973de
--- /dev/null
+++ b/testsuites/validation/tr-event-constant.c
@@ -0,0 +1,726 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsEventValEventConstant
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tr-event-constant.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsEventValEventConstant spec:/rtems/event/val/event-constant
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests an event constant and number of the Event Manager using the
+ * Classic and system event sets of the executing task.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate the event constant.
+ *
+ * - Check that the event constant is equal to the event number bit in the
+ * event set.
+ *
+ * - Check that the event number bit of the event constant is not set in
+ * RTEMS_PENDING_EVENTS.
+ *
+ * - Get all pending events of the Classic event set of the executing task.
+ *
+ * - Check that the directive call was successful.
+ *
+ * - Check that there were no pending events.
+ *
+ * - Get all pending events of the system event set of the executing task.
+ *
+ * - Check that the directive call was successful.
+ *
+ * - Check that there were no pending events.
+ *
+ * - Receive all pending events of the Classic event set of the executing task.
+ *
+ * - Check that the directive call was unsatisfied.
+ *
+ * - Check that there were no events received.
+ *
+ * - Receive all pending events of the system event set of the executing task.
+ *
+ * - Check that the directive call was unsatisfied.
+ *
+ * - Check that there were no events received.
+ *
+ * - Send the event to the Classic event set of the executing task.
+ *
+ * - Check that the directive call was successful.
+ *
+ * - Get all pending events of the Classic event set of the executing task.
+ *
+ * - Check that the directive call was successful.
+ *
+ * - Check that the pending event is equal to the event sent by a previous
+ * action.
+ *
+ * - Get all pending events of the system event set of the executing task.
+ *
+ * - Check that the directive call was successful.
+ *
+ * - Check that there were no pending events.
+ *
+ * - Receive any event of the Classic event set of the executing task.
+ *
+ * - Check that the directive call was successful.
+ *
+ * - Check that the received event is equal to the event sent by a previous
+ * action.
+ *
+ * - Receive any event of the system event set of the executing task.
+ *
+ * - Check that the directive call was unsatisfied.
+ *
+ * - Check that the no events were received.
+ *
+ * - Send the event to the Classic event set of the executing task.
+ *
+ * - Check that the directive call was successful.
+ *
+ * - Get all pending events of the Classic event set of the executing task.
+ *
+ * - Check that the directive call was successful.
+ *
+ * - Check that there were no pending events.
+ *
+ * - Get all pending events of the system event set of the executing task.
+ *
+ * - Check that the directive call was successful.
+ *
+ * - Check that the pending event is equal to the event sent by a previous
+ * action.
+ *
+ * - Receive any event of the Classic event set of the executing task.
+ *
+ * - Check that the directive call was unsatisfied.
+ *
+ * - Check that the no events were received.
+ *
+ * - Receive any event of the system event set of the executing task.
+ *
+ * - Check that the directive call was successful.
+ *
+ * - Check that the received event is equal to the event sent by a previous
+ * action.
+ *
+ * - Get all pending events of the Classic event set of the executing task.
+ *
+ * - Check that the directive call was successful.
+ *
+ * - Check that there were no pending events.
+ *
+ * - Get all pending events of the system event set of the executing task.
+ *
+ * - Check that the directive call was successful.
+ *
+ * - Check that there were no pending events.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/rtems/event/val/event-constant test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsEventValEventConstant_Run() parameter.
+ */
+ rtems_event_set event;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsEventValEventConstant_Run() parameter.
+ */
+ int number;
+} RtemsEventValEventConstant_Context;
+
+static RtemsEventValEventConstant_Context
+ RtemsEventValEventConstant_Instance;
+
+static T_fixture RtemsEventValEventConstant_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &RtemsEventValEventConstant_Instance
+};
+
+/**
+ * @brief Validate the event constant.
+ */
+static void RtemsEventValEventConstant_Action_0(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ /* No action */
+
+ /*
+ * Check that the event constant is equal to the event number bit in the
+ * event set.
+ */
+ T_step_eq_u32(
+ 0,
+ ctx->event,
+ ( (rtems_event_set) 1 ) << ctx->number
+ );
+
+ /*
+ * Check that the event number bit of the event constant is not set in
+ * RTEMS_PENDING_EVENTS.
+ */
+ T_step_eq_u32( 1, ctx->event & RTEMS_PENDING_EVENTS, 0 );
+}
+
+/**
+ * @brief Get all pending events of the Classic event set of the executing
+ * task.
+ */
+static void RtemsEventValEventConstant_Action_1(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was successful.
+ */
+ T_step_rsc_success( 2, sc );
+
+ /*
+ * Check that there were no pending events.
+ */
+ T_step_eq_u32( 3, out, 0 );
+}
+
+/**
+ * @brief Get all pending events of the system event set of the executing task.
+ */
+static void RtemsEventValEventConstant_Action_2(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_system_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was successful.
+ */
+ T_step_rsc_success( 4, sc );
+
+ /*
+ * Check that there were no pending events.
+ */
+ T_step_eq_u32( 5, out, 0 );
+}
+
+/**
+ * @brief Receive all pending events of the Classic event set of the executing
+ * task.
+ */
+static void RtemsEventValEventConstant_Action_3(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was unsatisfied.
+ */
+ T_step_rsc( 6, sc, RTEMS_UNSATISFIED );
+
+ /*
+ * Check that there were no events received.
+ */
+ T_step_eq_u32( 7, out, 0 );
+}
+
+/**
+ * @brief Receive all pending events of the system event set of the executing
+ * task.
+ */
+static void RtemsEventValEventConstant_Action_4(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_system_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was unsatisfied.
+ */
+ T_step_rsc( 8, sc, RTEMS_UNSATISFIED );
+
+ /*
+ * Check that there were no events received.
+ */
+ T_step_eq_u32( 9, out, 0 );
+}
+
+/**
+ * @brief Send the event to the Classic event set of the executing task.
+ */
+static void RtemsEventValEventConstant_Action_5(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_event_send( RTEMS_SELF, ctx->event );
+
+ /*
+ * Check that the directive call was successful.
+ */
+ T_step_rsc_success( 10, sc );
+}
+
+/**
+ * @brief Get all pending events of the Classic event set of the executing
+ * task.
+ */
+static void RtemsEventValEventConstant_Action_6(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was successful.
+ */
+ T_step_rsc_success( 11, sc );
+
+ /*
+ * Check that the pending event is equal to the event sent by a previous
+ * action.
+ */
+ T_step_eq_u32( 12, out, ctx->event );
+}
+
+/**
+ * @brief Get all pending events of the system event set of the executing task.
+ */
+static void RtemsEventValEventConstant_Action_7(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_system_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was successful.
+ */
+ T_step_rsc_success( 13, sc );
+
+ /*
+ * Check that there were no pending events.
+ */
+ T_step_eq_u32( 14, out, 0 );
+}
+
+/**
+ * @brief Receive any event of the Classic event set of the executing task.
+ */
+static void RtemsEventValEventConstant_Action_8(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = 0;
+ sc = rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was successful.
+ */
+ T_step_rsc_success( 15, sc );
+
+ /*
+ * Check that the received event is equal to the event sent by a previous
+ * action.
+ */
+ T_step_eq_u32( 16, out, ctx->event );
+}
+
+/**
+ * @brief Receive any event of the system event set of the executing task.
+ */
+static void RtemsEventValEventConstant_Action_9(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_system_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was unsatisfied.
+ */
+ T_step_rsc( 17, sc, RTEMS_UNSATISFIED );
+
+ /*
+ * Check that the no events were received.
+ */
+ T_step_eq_u32( 18, out, 0 );
+}
+
+/**
+ * @brief Send the event to the Classic event set of the executing task.
+ */
+static void RtemsEventValEventConstant_Action_10(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_event_system_send( RTEMS_SELF, ctx->event );
+
+ /*
+ * Check that the directive call was successful.
+ */
+ T_step_rsc_success( 19, sc );
+}
+
+/**
+ * @brief Get all pending events of the Classic event set of the executing
+ * task.
+ */
+static void RtemsEventValEventConstant_Action_11(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was successful.
+ */
+ T_step_rsc_success( 20, sc );
+
+ /*
+ * Check that there were no pending events.
+ */
+ T_step_eq_u32( 21, out, 0 );
+}
+
+/**
+ * @brief Get all pending events of the system event set of the executing task.
+ */
+static void RtemsEventValEventConstant_Action_12(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_system_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was successful.
+ */
+ T_step_rsc_success( 22, sc );
+
+ /*
+ * Check that the pending event is equal to the event sent by a previous
+ * action.
+ */
+ T_step_eq_u32( 23, out, ctx->event );
+}
+
+/**
+ * @brief Receive any event of the Classic event set of the executing task.
+ */
+static void RtemsEventValEventConstant_Action_13(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was unsatisfied.
+ */
+ T_step_rsc( 24, sc, RTEMS_UNSATISFIED );
+
+ /*
+ * Check that the no events were received.
+ */
+ T_step_eq_u32( 25, out, 0 );
+}
+
+/**
+ * @brief Receive any event of the system event set of the executing task.
+ */
+static void RtemsEventValEventConstant_Action_14(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = 0;
+ sc = rtems_event_system_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was successful.
+ */
+ T_step_rsc_success( 26, sc );
+
+ /*
+ * Check that the received event is equal to the event sent by a previous
+ * action.
+ */
+ T_step_eq_u32( 27, out, ctx->event );
+}
+
+/**
+ * @brief Get all pending events of the Classic event set of the executing
+ * task.
+ */
+static void RtemsEventValEventConstant_Action_15(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was successful.
+ */
+ T_step_rsc_success( 28, sc );
+
+ /*
+ * Check that there were no pending events.
+ */
+ T_step_eq_u32( 29, out, 0 );
+}
+
+/**
+ * @brief Get all pending events of the system event set of the executing task.
+ */
+static void RtemsEventValEventConstant_Action_16(
+ RtemsEventValEventConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set out;
+
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_system_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+
+ /*
+ * Check that the directive call was successful.
+ */
+ T_step_rsc_success( 30, sc );
+
+ /*
+ * Check that there were no pending events.
+ */
+ T_step_eq_u32( 31, out, 0 );
+}
+
+static T_fixture_node RtemsEventValEventConstant_Node;
+
+static T_remark RtemsEventValEventConstant_Remark = {
+ .next = NULL,
+ .remark = "RtemsEventValEventConstant"
+};
+
+void RtemsEventValEventConstant_Run( rtems_event_set event, int number )
+{
+ RtemsEventValEventConstant_Context *ctx;
+
+ ctx = &RtemsEventValEventConstant_Instance;
+ ctx->event = event;
+ ctx->number = number;
+
+ ctx = T_push_fixture(
+ &RtemsEventValEventConstant_Node,
+ &RtemsEventValEventConstant_Fixture
+ );
+
+ T_plan( 32 );
+
+ RtemsEventValEventConstant_Action_0( ctx );
+ RtemsEventValEventConstant_Action_1( ctx );
+ RtemsEventValEventConstant_Action_2( ctx );
+ RtemsEventValEventConstant_Action_3( ctx );
+ RtemsEventValEventConstant_Action_4( ctx );
+ RtemsEventValEventConstant_Action_5( ctx );
+ RtemsEventValEventConstant_Action_6( ctx );
+ RtemsEventValEventConstant_Action_7( ctx );
+ RtemsEventValEventConstant_Action_8( ctx );
+ RtemsEventValEventConstant_Action_9( ctx );
+ RtemsEventValEventConstant_Action_10( ctx );
+ RtemsEventValEventConstant_Action_11( ctx );
+ RtemsEventValEventConstant_Action_12( ctx );
+ RtemsEventValEventConstant_Action_13( ctx );
+ RtemsEventValEventConstant_Action_14( ctx );
+ RtemsEventValEventConstant_Action_15( ctx );
+ RtemsEventValEventConstant_Action_16( ctx );
+
+ T_add_remark( &RtemsEventValEventConstant_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-event-constant.h b/testsuites/validation/tr-event-constant.h
new file mode 100644
index 0000000000..9c57ca2d8a
--- /dev/null
+++ b/testsuites/validation/tr-event-constant.h
@@ -0,0 +1,81 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsEventValEventConstant
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_EVENT_CONSTANT_H
+#define _TR_EVENT_CONSTANT_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup RtemsEventValEventConstant
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param event is the event constant.
+ *
+ * @param number is the event number.
+ */
+void RtemsEventValEventConstant_Run( rtems_event_set event, int number );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_EVENT_CONSTANT_H */
diff --git a/testsuites/validation/tr-event-send-receive.c b/testsuites/validation/tr-event-send-receive.c
new file mode 100644
index 0000000000..85d0040615
--- /dev/null
+++ b/testsuites/validation/tr-event-send-receive.c
@@ -0,0 +1,1321 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsEventReqSendReceive
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/threadimpl.h>
+
+#include "tr-event-send-receive.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsEventReqSendReceive spec:/rtems/event/req/send-receive
+ *
+ * @ingroup TestsuitesValidation0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Pre_Send_NA : 1;
+ uint16_t Pre_ReceiverState_NA : 1;
+ uint16_t Pre_Satisfy_NA : 1;
+ uint16_t Post_SendStatus : 2;
+ uint16_t Post_ReceiveStatus : 3;
+ uint16_t Post_SenderPreemption : 2;
+} RtemsEventReqSendReceive_Entry;
+
+#define PRIO_OTHER UINT32_MAX
+
+typedef enum {
+ SENDER_NONE,
+ SENDER_SELF,
+ SENDER_SELF_2,
+ SENDER_WORKER,
+ SENDER_INTERRUPT
+} SenderTypes;
+
+typedef enum {
+ RECEIVE_SKIP,
+ RECEIVE_NORMAL,
+ RECEIVE_INTERRUPT
+} ReceiveTypes;
+
+typedef enum {
+ RECEIVE_COND_UNKNOWN,
+ RECEIVE_COND_SATSIFIED,
+ RECEIVE_COND_UNSATISFIED
+} ReceiveConditionStates;
+
+/**
+ * @brief Test context for spec:/rtems/event/req/send-receive test case.
+ */
+typedef struct {
+ /**
+ * @brief This member defines the sender type to perform the event send
+ * action.
+ */
+ SenderTypes sender_type;
+
+ /**
+ * @brief This member defines the sender task priority.
+ */
+ rtems_task_priority sender_prio;
+
+ /**
+ * @brief This member defines the receiver ID used for the event send action.
+ */
+ rtems_id receiver_id;
+
+ /**
+ * @brief This member defines the events to send for the event send action.
+ */
+ rtems_event_set events_to_send;
+
+ /**
+ * @brief This member contains the status of the event send action.
+ */
+ rtems_status_code send_status;
+
+ /**
+ * @brief This member contains the scheduler ID of the runner task.
+ */
+ ReceiveTypes receive_type;
+
+ /**
+ * @brief This member defines the option set used for the event receive
+ * action.
+ */
+ rtems_option receive_option_set;
+
+ /**
+ * @brief This member defines the timeout used for the event receive action.
+ */
+ rtems_interval receive_timeout;
+
+ /**
+ * @brief This member contains the events received by the event receive
+ * action.
+ */
+ rtems_event_set received_events;
+
+ /**
+ * @brief This member references the event set received by the event receive
+ * action or is NULL.
+ */
+ rtems_event_set *received_events_parameter;
+
+ /**
+ * @brief This member contains the status of the event receive action.
+ */
+ rtems_status_code receive_status;
+
+ /**
+ * @brief This member contains the event condition state of the receiver task
+ * after the event send action.
+ */
+ ReceiveConditionStates receive_condition_state;
+
+ /**
+ * @brief This member contains the pending events after an event send action
+ * which did not satisify the event condition of the receiver.
+ */
+ rtems_event_set unsatisfied_pending;
+
+ /**
+ * @brief This member contains the TCB of the runner task.
+ */
+ Thread_Control *runner_thread;
+
+ /**
+ * @brief This member contains the ID of the runner task.
+ */
+ rtems_id runner_id;
+
+ /**
+ * @brief This member contains the task ID of the worker task.
+ */
+ rtems_id worker_id;
+
+ /**
+ * @brief This member contains the ID of the semaphore used to wake up the
+ * worker task.
+ */
+ rtems_id worker_wakeup;
+
+ /**
+ * @brief This member contains the ID of the semaphore used to wake up the
+ * runner task.
+ */
+ rtems_id runner_wakeup;
+
+ /**
+ * @brief This member contains the scheduler ID of scheduler used by the
+ * runner task.
+ */
+ rtems_id runner_sched;
+
+ /**
+ * @brief This member contains the scheduler ID of another scheduler which is
+ * not used by the runner task.
+ */
+ rtems_id other_sched;
+
+ /**
+ * @brief This member contains the thread switch log.
+ */
+ T_thread_switch_log_4 thread_switch_log;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsEventReqSendReceive_Run() parameter.
+ */
+ rtems_status_code ( *send )( rtems_id, rtems_event_set );
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsEventReqSendReceive_Run() parameter.
+ */
+ rtems_status_code ( *receive )( rtems_event_set, rtems_option, rtems_interval, rtems_event_set * );
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsEventReqSendReceive_Run() parameter.
+ */
+ rtems_event_set ( *get_pending_events )( Thread_Control * );
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsEventReqSendReceive_Run() parameter.
+ */
+ unsigned int wait_class;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsEventReqSendReceive_Run() parameter.
+ */
+ int waiting_for_event;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 4 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 4 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsEventReqSendReceive_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsEventReqSendReceive_Context;
+
+static RtemsEventReqSendReceive_Context
+ RtemsEventReqSendReceive_Instance;
+
+static const char * const RtemsEventReqSendReceive_PreDesc_Id[] = {
+ "InvId",
+ "Task",
+ "NA"
+};
+
+static const char * const RtemsEventReqSendReceive_PreDesc_Send[] = {
+ "Zero",
+ "Unrelated",
+ "Any",
+ "All",
+ "MixedAny",
+ "MixedAll",
+ "NA"
+};
+
+static const char * const RtemsEventReqSendReceive_PreDesc_ReceiverState[] = {
+ "InvAddr",
+ "NotWaiting",
+ "Poll",
+ "Timeout",
+ "Lower",
+ "Equal",
+ "Higher",
+ "Other",
+ "Intend",
+ "NA"
+};
+
+static const char * const RtemsEventReqSendReceive_PreDesc_Satisfy[] = {
+ "All",
+ "Any",
+ "NA"
+};
+
+static const char * const * const RtemsEventReqSendReceive_PreDesc[] = {
+ RtemsEventReqSendReceive_PreDesc_Id,
+ RtemsEventReqSendReceive_PreDesc_Send,
+ RtemsEventReqSendReceive_PreDesc_ReceiverState,
+ RtemsEventReqSendReceive_PreDesc_Satisfy,
+ NULL
+};
+
+#define INPUT_EVENTS ( RTEMS_EVENT_5 | RTEMS_EVENT_23 )
+
+typedef RtemsEventReqSendReceive_Context Context;
+
+static rtems_id CreateWakeupSema( void )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'W', 'K', 'U', 'P' ),
+ 0,
+ RTEMS_SIMPLE_BINARY_SEMAPHORE,
+ 0,
+ &id
+ );
+ T_assert_rsc_success( sc );
+
+ return id;
+}
+
+static void DeleteWakeupSema( rtems_id id )
+{
+ if ( id != 0 ) {
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_delete( id );
+ T_rsc_success( sc );
+ }
+}
+
+static void Wait( rtems_id id )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_obtain( id, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
+ T_quiet_rsc_success( sc );
+}
+
+static void Wakeup( rtems_id id )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_release( id );
+ T_quiet_rsc_success( sc );
+}
+
+static bool BlockedForEvent( Context *ctx, Thread_Wait_flags flags )
+{
+ return flags == ( ctx->wait_class | THREAD_WAIT_STATE_BLOCKED );
+}
+
+static bool IntendsToBlockForEvent( Context *ctx, Thread_Wait_flags flags )
+{
+ return flags == ( ctx->wait_class | THREAD_WAIT_STATE_INTEND_TO_BLOCK );
+}
+
+static bool IsReady( Context *ctx, Thread_Wait_flags flags )
+{
+ return flags == THREAD_WAIT_STATE_READY;
+}
+
+static bool IsSatisfiedFlags( Context *ctx )
+{
+ return IsReady(
+ ctx,
+ _Thread_Wait_flags_get( ctx->runner_thread )
+ );
+}
+
+static bool IsSatisfiedState( Context *ctx )
+{
+ return ctx->runner_thread->current_state != ctx->waiting_for_event;
+}
+
+static void SendAction( Context *ctx )
+{
+ T_thread_switch_log *log;
+
+ log = T_thread_switch_record_4( &ctx->thread_switch_log );
+ T_quiet_null( log );
+ ctx->send_status = ( *ctx->send )( ctx->receiver_id, ctx->events_to_send );
+ log = T_thread_switch_record( NULL );
+ T_quiet_eq_ptr( &log->header, &ctx->thread_switch_log.header );
+}
+
+static void Send(
+ Context *ctx,
+ bool ( *is_satsified )( Context * )
+)
+{
+ SendAction( ctx );
+
+ if ( ( *is_satsified )( ctx ) ) {
+ ctx->receive_condition_state = RECEIVE_COND_SATSIFIED;
+ } else {
+ rtems_status_code sc;
+ rtems_event_set pending;
+ rtems_event_set missing;
+
+ ctx->receive_condition_state = RECEIVE_COND_UNSATISFIED;
+ pending = ( *ctx->get_pending_events )( ctx->runner_thread );
+ ctx->unsatisfied_pending = pending;
+
+ missing = INPUT_EVENTS & ~ctx->events_to_send;
+ T_ne_u32( missing, 0 );
+ sc = ( *ctx->send )( ctx->runner_id, missing );
+ T_rsc_success( sc );
+
+ pending = ( *ctx->get_pending_events )( ctx->runner_thread );
+ T_eq_u32( pending, ctx->events_to_send & ~INPUT_EVENTS );
+ }
+}
+
+static void Worker( rtems_task_argument arg )
+{
+ Context *ctx;
+
+ ctx = (Context *) arg;
+
+ while ( true ) {
+ rtems_status_code sc;
+ rtems_task_priority prio;
+ T_thread_switch_log *log;
+
+ Wait( ctx->worker_wakeup );
+
+ switch ( ctx->sender_prio ) {
+ case PRIO_NORMAL:
+ case PRIO_HIGH:
+ prio = SetSelfPriority( ctx->sender_prio );
+ T_eq_u32( prio, PRIO_LOW );
+ break;
+ case PRIO_OTHER:
+ log = T_thread_switch_record_4( &ctx->thread_switch_log );
+ T_null( log );
+ sc = rtems_task_set_scheduler(
+ RTEMS_SELF,
+ ctx->other_sched,
+ PRIO_LOW
+ );
+ T_rsc_success( sc );
+
+ /*
+ * Make sure the context switch to the IDLE thread on the previous
+ * CPU is recorded, otherwise the preemption check may sporadically
+ * fail on some targets.
+ */
+ while (ctx->thread_switch_log.header.recorded < 2) {
+ RTEMS_COMPILER_MEMORY_BARRIER();
+ }
+
+ log = T_thread_switch_record( NULL );
+ T_eq_ptr( &log->header, &ctx->thread_switch_log.header );
+ break;
+ case PRIO_LOW:
+ break;
+ }
+
+ Send( ctx, IsSatisfiedState );
+
+ sc = rtems_task_set_scheduler(
+ RTEMS_SELF,
+ ctx->runner_sched,
+ PRIO_HIGH
+ );
+ T_rsc_success( sc );
+
+ Wakeup( ctx->runner_wakeup );
+ }
+}
+
+static rtems_event_set GetPendingEvents( Context *ctx )
+{
+ rtems_event_set pending;
+ rtems_status_code sc;
+
+ sc = ( *ctx->receive )(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &pending
+ );
+ T_quiet_rsc_success( sc );
+
+ return pending;
+}
+
+static void RtemsEventReqSendReceive_Cleanup( Context *ctx );
+
+static void InterruptPrepare( void *arg )
+{
+ RtemsEventReqSendReceive_Cleanup( arg );
+}
+
+static void InterruptAction( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ ctx->receive_status = ( *ctx->receive )(
+ INPUT_EVENTS,
+ ctx->receive_option_set,
+ ctx->receive_timeout,
+ &ctx->received_events
+ );
+ T_quiet_rsc_success( ctx->receive_status );
+}
+
+static void InterruptContinue( Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = ( *ctx->send )( ctx->receiver_id, INPUT_EVENTS );
+ T_quiet_rsc_success( sc );
+}
+
+static T_interrupt_test_state Interrupt( void *arg )
+{
+ Context *ctx;
+ Thread_Wait_flags flags;
+ T_interrupt_test_state next_state;
+ T_interrupt_test_state previous_state;
+
+ ctx = arg;
+ flags = _Thread_Wait_flags_get( ctx->runner_thread );
+
+ if ( IntendsToBlockForEvent( ctx, flags ) ) {
+ next_state = T_INTERRUPT_TEST_DONE;
+ } else if ( BlockedForEvent( ctx, flags ) ) {
+ next_state = T_INTERRUPT_TEST_LATE;
+ } else {
+ next_state = T_INTERRUPT_TEST_EARLY;
+ }
+
+ previous_state = T_interrupt_test_change_state(
+ T_INTERRUPT_TEST_ACTION,
+ next_state
+ );
+
+ if ( previous_state == T_INTERRUPT_TEST_ACTION ) {
+ if ( next_state == T_INTERRUPT_TEST_DONE ) {
+ Send( ctx, IsSatisfiedFlags );
+ } else {
+ InterruptContinue( ctx );
+ }
+ }
+
+ return next_state;
+}
+
+static const T_interrupt_test_config InterruptConfig = {
+ .prepare = InterruptPrepare,
+ .action = InterruptAction,
+ .interrupt = Interrupt,
+ .max_iteration_count = 10000
+};
+
+static void RtemsEventReqSendReceive_Pre_Id_Prepare(
+ RtemsEventReqSendReceive_Context *ctx,
+ RtemsEventReqSendReceive_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsEventReqSendReceive_Pre_Id_InvId: {
+ /*
+ * While the id parameter of the send directive is not associated with a
+ * task.
+ */
+ ctx->receiver_id = 0xffffffff;
+ ctx->sender_type = SENDER_SELF;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_Id_Task: {
+ /*
+ * While the id parameter of the send directive is is associated with a
+ * task.
+ */
+ ctx->receiver_id = ctx->runner_id;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsEventReqSendReceive_Pre_Send_Prepare(
+ RtemsEventReqSendReceive_Context *ctx,
+ RtemsEventReqSendReceive_Pre_Send state
+)
+{
+ switch ( state ) {
+ case RtemsEventReqSendReceive_Pre_Send_Zero: {
+ /*
+ * While the event set sent is the empty.
+ */
+ ctx->events_to_send = 0;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_Send_Unrelated: {
+ /*
+ * While the event set sent is unrelated to the event receive condition.
+ */
+ ctx->events_to_send = RTEMS_EVENT_7;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_Send_Any: {
+ /*
+ * While the event set sent is contain at least one but not all events of
+ * the event receive condition.
+ */
+ ctx->events_to_send = RTEMS_EVENT_5;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_Send_All: {
+ /*
+ * While the event set sent is contain all events of the event receive
+ * condition.
+ */
+ ctx->events_to_send = RTEMS_EVENT_5 | RTEMS_EVENT_23;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_Send_MixedAny: {
+ /*
+ * While the event set sent is contain at least one but not all events of
+ * the event receive condition and at least one unrelated event.
+ */
+ ctx->events_to_send = RTEMS_EVENT_5 | RTEMS_EVENT_7;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_Send_MixedAll: {
+ /*
+ * While the event set sent is contain all events of the event receive
+ * condition and at least one unrelated event.
+ */
+ ctx->events_to_send = RTEMS_EVENT_5 | RTEMS_EVENT_7 | RTEMS_EVENT_23;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_Send_NA:
+ break;
+ }
+}
+
+static void RtemsEventReqSendReceive_Pre_ReceiverState_Prepare(
+ RtemsEventReqSendReceive_Context *ctx,
+ RtemsEventReqSendReceive_Pre_ReceiverState state
+)
+{
+ switch ( state ) {
+ case RtemsEventReqSendReceive_Pre_ReceiverState_InvAddr: {
+ /*
+ * While the receiver task calls the receive directive with the event set
+ * to receive parameter set to NULL.
+ */
+ ctx->sender_type = SENDER_SELF;
+ ctx->receive_type = RECEIVE_NORMAL;
+ ctx->received_events_parameter = NULL;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_ReceiverState_NotWaiting: {
+ /*
+ * While the receiver task is not waiting for events.
+ */
+ ctx->sender_type = SENDER_SELF;
+ ctx->receive_type = RECEIVE_SKIP;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_ReceiverState_Poll: {
+ /*
+ * While the receiver task polls for events.
+ */
+ ctx->sender_type = SENDER_SELF;
+ ctx->receive_type = RECEIVE_NORMAL;
+ ctx->receive_option_set |= RTEMS_NO_WAIT;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_ReceiverState_Timeout: {
+ /*
+ * While the receiver task waited for events with a timeout which
+ * occurred.
+ */
+ ctx->sender_type = SENDER_SELF_2;
+ ctx->receive_type = RECEIVE_NORMAL;
+ ctx->receive_timeout = 1;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_ReceiverState_Lower: {
+ /*
+ * While the receiver task is blocked waiting for events and the receiver
+ * task shall have a lower priority than the sender task.
+ */
+ ctx->sender_type = SENDER_WORKER;
+ ctx->sender_prio = PRIO_HIGH;
+ ctx->receive_type = RECEIVE_NORMAL;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_ReceiverState_Equal: {
+ /*
+ * While the receiver task is blocked waiting for events and the receiver
+ * task shall have a priority equal to the sender task.
+ */
+ ctx->sender_type = SENDER_WORKER;
+ ctx->sender_prio = PRIO_NORMAL;
+ ctx->receive_type = RECEIVE_NORMAL;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_ReceiverState_Higher: {
+ /*
+ * While the receiver task is blocked waiting for events and the receiver
+ * task shall have a higher priority than the sender task.
+ */
+ ctx->sender_type = SENDER_WORKER;
+ ctx->sender_prio = PRIO_LOW;
+ ctx->receive_type = RECEIVE_NORMAL;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_ReceiverState_Other: {
+ /*
+ * While the receiver task is blocked waiting for events and the receiver
+ * task shall be on another scheduler instance than the sender task.
+ */
+ ctx->sender_type = SENDER_WORKER;
+ ctx->sender_prio = PRIO_OTHER;
+ ctx->receive_type = RECEIVE_NORMAL;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_ReceiverState_Intend: {
+ /*
+ * While the receiver task intends to block for waiting for events.
+ */
+ ctx->sender_type = SENDER_INTERRUPT;
+ ctx->receive_type = RECEIVE_INTERRUPT;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_ReceiverState_NA:
+ break;
+ }
+}
+
+static void RtemsEventReqSendReceive_Pre_Satisfy_Prepare(
+ RtemsEventReqSendReceive_Context *ctx,
+ RtemsEventReqSendReceive_Pre_Satisfy state
+)
+{
+ switch ( state ) {
+ case RtemsEventReqSendReceive_Pre_Satisfy_All: {
+ /*
+ * While the receiver task is interested in all input events.
+ */
+ ctx->receive_option_set |= RTEMS_EVENT_ALL;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_Satisfy_Any: {
+ /*
+ * While the receiver task is interested in any input event.
+ */
+ ctx->receive_option_set |= RTEMS_EVENT_ANY;
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Pre_Satisfy_NA:
+ break;
+ }
+}
+
+static void RtemsEventReqSendReceive_Post_SendStatus_Check(
+ RtemsEventReqSendReceive_Context *ctx,
+ RtemsEventReqSendReceive_Post_SendStatus state
+)
+{
+ switch ( state ) {
+ case RtemsEventReqSendReceive_Post_SendStatus_Ok: {
+ /*
+ * The send event status shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc_success( ctx->send_status );
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Post_SendStatus_InvId: {
+ /*
+ * The send event status shall be RTEMS_INVALID_ID.
+ */
+ T_rsc( ctx->send_status, RTEMS_INVALID_ID );
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Post_SendStatus_NA:
+ break;
+ }
+}
+
+static void RtemsEventReqSendReceive_Post_ReceiveStatus_Check(
+ RtemsEventReqSendReceive_Context *ctx,
+ RtemsEventReqSendReceive_Post_ReceiveStatus state
+)
+{
+ switch ( state ) {
+ case RtemsEventReqSendReceive_Post_ReceiveStatus_None: {
+ /*
+ * The receiver task shall not have pending events.
+ */
+ T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNKNOWN );
+ T_eq_u32( GetPendingEvents( ctx ), 0 );
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Post_ReceiveStatus_Pending: {
+ /*
+ * The receiver task shall have all events sent pending.
+ */
+ T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNKNOWN );
+ T_eq_u32( GetPendingEvents( ctx ), ctx->events_to_send );
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Post_ReceiveStatus_Timeout: {
+ /*
+ * The receive event status shall be RTEMS_TIMEOUT. The receiver task
+ * shall have all events sent after the timeout pending.
+ */
+ T_rsc( ctx->receive_status, RTEMS_TIMEOUT );
+ T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNKNOWN );
+ T_eq_u32( GetPendingEvents( ctx ), ctx->events_to_send );
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Post_ReceiveStatus_Satisfied: {
+ /*
+ * The receive event status shall be RTEMS_SUCCESSFUL. The receiver task
+ * shall receive all events sent which are an element of the input
+ * events. The receiver task shall have all events sent which are not an
+ * element of the input events pending.
+ */
+ T_rsc( ctx->receive_status, RTEMS_SUCCESSFUL );
+
+ if ( ctx->receive_type != RECEIVE_NORMAL ) {
+ T_eq_int( ctx->receive_condition_state, RECEIVE_COND_SATSIFIED );
+ }
+
+ T_eq_u32( ctx->received_events, ctx->events_to_send & INPUT_EVENTS );
+ T_eq_u32( GetPendingEvents( ctx ), ctx->events_to_send & ~INPUT_EVENTS );
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Post_ReceiveStatus_Unsatisfied: {
+ /*
+ * The receive event status shall be RTEMS_UNSATISFIED. The receiver task
+ * shall have all events sent pending.
+ */
+ T_rsc( ctx->receive_status, RTEMS_UNSATISFIED );
+ T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNKNOWN );
+ T_eq_u32( GetPendingEvents( ctx ), ctx->events_to_send );
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Post_ReceiveStatus_Blocked: {
+ /*
+ * The receiver task shall remain blocked waiting for events after the
+ * directive call. The receiver task shall have all events sent pending.
+ */
+ T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNSATISFIED );
+ T_eq_u32( ctx->unsatisfied_pending, ctx->events_to_send );
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Post_ReceiveStatus_InvAddr: {
+ /*
+ * The receive event status shall be RTEMS_INVALID_ADDRESS. The receiver
+ * task shall have all events sent pending.
+ */
+ T_rsc( ctx->receive_status, RTEMS_INVALID_ADDRESS );
+ T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNKNOWN );
+ T_eq_u32( GetPendingEvents( ctx ), ctx->events_to_send );
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Post_ReceiveStatus_NA:
+ break;
+ }
+}
+
+static void RtemsEventReqSendReceive_Post_SenderPreemption_Check(
+ RtemsEventReqSendReceive_Context *ctx,
+ RtemsEventReqSendReceive_Post_SenderPreemption state
+)
+{
+ const T_thread_switch_log_4 *log;
+ size_t i;
+
+ log = &ctx->thread_switch_log;
+
+ switch ( state ) {
+ case RtemsEventReqSendReceive_Post_SenderPreemption_No: {
+ /*
+ * When the sender task calls the directive to send the events, the
+ * sender task shall not be preempted as a result of the call.
+ */
+ /*
+ * There may be a thread switch to the runner thread if the sender thread
+ * was on another scheduler instance.
+ */
+
+ T_le_sz( log->header.recorded, 1 );
+
+ for ( i = 0; i < log->header.recorded; ++i ) {
+ T_ne_u32( log->events[ i ].executing, ctx->worker_id );
+ T_eq_u32( log->events[ i ].heir, ctx->runner_id );
+ }
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Post_SenderPreemption_Yes: {
+ /*
+ * When the sender task calls the directive to send the events, the
+ * sender task shall be preempted as a result of the call.
+ */
+ T_eq_sz( log->header.recorded, 2 );
+ T_eq_u32( log->events[ 0 ].heir, ctx->runner_id );
+ T_eq_u32( log->events[ 1 ].heir, ctx->worker_id );
+ break;
+ }
+
+ case RtemsEventReqSendReceive_Post_SenderPreemption_NA:
+ break;
+ }
+}
+
+static void RtemsEventReqSendReceive_Setup(
+ RtemsEventReqSendReceive_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ ctx->runner_thread = _Thread_Get_executing();
+ ctx->runner_id = ctx->runner_thread->Object.id;
+ ctx->worker_wakeup = CreateWakeupSema();
+ ctx->runner_wakeup = CreateWakeupSema();
+
+ sc = rtems_task_get_scheduler( RTEMS_SELF, &ctx->runner_sched );
+ T_rsc_success( sc );
+
+ #if defined(RTEMS_SMP)
+ sc = rtems_scheduler_ident_by_processor( 1, &ctx->other_sched );
+ T_rsc_success( sc );
+ T_ne_u32( ctx->runner_sched, ctx->other_sched );
+ #endif
+
+ SetSelfPriority( PRIO_NORMAL );
+ ctx->worker_id = CreateTask( "WORK", PRIO_LOW );
+ StartTask( ctx->worker_id, Worker, ctx );
+}
+
+static void RtemsEventReqSendReceive_Setup_Wrap( void *arg )
+{
+ RtemsEventReqSendReceive_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsEventReqSendReceive_Setup( ctx );
+}
+
+static void RtemsEventReqSendReceive_Teardown(
+ RtemsEventReqSendReceive_Context *ctx
+)
+{
+ DeleteTask( ctx->worker_id );
+ DeleteWakeupSema( ctx->worker_wakeup );
+ DeleteWakeupSema( ctx->runner_wakeup );
+ RestoreRunnerPriority();
+}
+
+static void RtemsEventReqSendReceive_Teardown_Wrap( void *arg )
+{
+ RtemsEventReqSendReceive_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ RtemsEventReqSendReceive_Teardown( ctx );
+}
+
+static void RtemsEventReqSendReceive_Prepare(
+ RtemsEventReqSendReceive_Context *ctx
+)
+{
+ ctx->events_to_send = 0;
+ ctx->send_status = RTEMS_INCORRECT_STATE;
+ ctx->received_events = 0xffffffff;
+ ctx->received_events_parameter = &ctx->received_events;
+ ctx->receive_option_set = 0;
+ ctx->receive_timeout = RTEMS_NO_TIMEOUT;
+ ctx->sender_type = SENDER_NONE;
+ ctx->sender_prio = PRIO_NORMAL;
+ ctx->receive_type = RECEIVE_SKIP;
+ ctx->receive_condition_state = RECEIVE_COND_UNKNOWN;
+ ctx->unsatisfied_pending = 0xffffffff;
+ memset( &ctx->thread_switch_log, 0, sizeof( ctx->thread_switch_log ) );
+ T_eq_u32( GetPendingEvents( ctx ), 0 );
+}
+
+static void RtemsEventReqSendReceive_Action(
+ RtemsEventReqSendReceive_Context *ctx
+)
+{
+ if ( ctx->sender_type == SENDER_SELF ) {
+ SendAction( ctx );
+ } else if ( ctx->sender_type == SENDER_WORKER ) {
+ Wakeup( ctx->worker_wakeup );
+ }
+
+ if ( ctx->receive_type == RECEIVE_NORMAL ) {
+ ctx->receive_status = ( *ctx->receive )(
+ INPUT_EVENTS,
+ ctx->receive_option_set,
+ ctx->receive_timeout,
+ ctx->received_events_parameter
+ );
+ } else if ( ctx->receive_type == RECEIVE_INTERRUPT ) {
+ T_interrupt_test_state state;
+
+ state = T_interrupt_test( &InterruptConfig, ctx );
+ T_eq_int( state, T_INTERRUPT_TEST_DONE );
+ }
+
+ if ( ctx->sender_type == SENDER_SELF_2 ) {
+ SendAction( ctx );
+ } else if ( ctx->sender_type == SENDER_WORKER ) {
+ rtems_task_priority prio;
+
+ Wait( ctx->runner_wakeup );
+ prio = SetPriority( ctx->worker_id, PRIO_LOW );
+ T_eq_u32( prio, PRIO_HIGH );
+ }
+}
+
+static void RtemsEventReqSendReceive_Cleanup(
+ RtemsEventReqSendReceive_Context *ctx
+)
+{
+ rtems_status_code sc;
+ rtems_event_set events;
+
+ events = 0;
+ sc = ( *ctx->receive )(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &events
+ );
+ if ( sc == RTEMS_SUCCESSFUL ) {
+ T_quiet_ne_u32( events, 0 );
+ } else {
+ T_quiet_rsc( sc, RTEMS_UNSATISFIED );
+ T_quiet_eq_u32( events, 0 );
+ }
+}
+
+static const RtemsEventReqSendReceive_Entry
+RtemsEventReqSendReceive_Entries[] = {
+ { 0, 0, 1, 1, 1, RtemsEventReqSendReceive_Post_SendStatus_InvId,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_None,
+ RtemsEventReqSendReceive_Post_SenderPreemption_No },
+ { 0, 0, 0, 0, 1, RtemsEventReqSendReceive_Post_SendStatus_Ok,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Pending,
+ RtemsEventReqSendReceive_Post_SenderPreemption_No },
+ { 0, 0, 0, 0, 0, RtemsEventReqSendReceive_Post_SendStatus_Ok,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Blocked,
+ RtemsEventReqSendReceive_Post_SenderPreemption_No },
+ { 0, 0, 0, 0, 0, RtemsEventReqSendReceive_Post_SendStatus_Ok,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Satisfied,
+ RtemsEventReqSendReceive_Post_SenderPreemption_No },
+ { 0, 0, 0, 0, 0, RtemsEventReqSendReceive_Post_SendStatus_Ok,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Timeout,
+ RtemsEventReqSendReceive_Post_SenderPreemption_No },
+ { 0, 0, 0, 0, 0, RtemsEventReqSendReceive_Post_SendStatus_Ok,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Unsatisfied,
+ RtemsEventReqSendReceive_Post_SenderPreemption_No },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, RtemsEventReqSendReceive_Post_SendStatus_Ok,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Blocked,
+ RtemsEventReqSendReceive_Post_SenderPreemption_No },
+#else
+ { 1, 0, 0, 0, 0, RtemsEventReqSendReceive_Post_SendStatus_NA,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_NA,
+ RtemsEventReqSendReceive_Post_SenderPreemption_NA },
+#endif
+ { 0, 0, 0, 0, 0, RtemsEventReqSendReceive_Post_SendStatus_Ok,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Satisfied,
+ RtemsEventReqSendReceive_Post_SenderPreemption_Yes },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, 0, RtemsEventReqSendReceive_Post_SendStatus_Ok,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Satisfied,
+ RtemsEventReqSendReceive_Post_SenderPreemption_No }
+#else
+ { 1, 0, 0, 0, 0, RtemsEventReqSendReceive_Post_SendStatus_NA,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_NA,
+ RtemsEventReqSendReceive_Post_SenderPreemption_NA }
+#endif
+};
+
+static const uint8_t
+RtemsEventReqSendReceive_Map[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 1, 1, 5, 5, 4, 4, 2, 2, 2, 2, 2, 2, 6, 6, 2, 2, 1, 1, 1, 1,
+ 5, 5, 4, 4, 2, 2, 2, 2, 2, 2, 6, 6, 2, 2, 1, 1, 1, 1, 5, 3, 4, 4, 2, 3, 2, 3,
+ 2, 7, 6, 8, 2, 3, 1, 1, 1, 1, 3, 3, 4, 4, 3, 3, 3, 3, 7, 7, 8, 8, 3, 3, 1, 1,
+ 1, 1, 5, 3, 4, 4, 2, 3, 2, 3, 2, 7, 6, 8, 2, 3, 1, 1, 1, 1, 3, 3, 4, 4, 3, 3,
+ 3, 3, 7, 7, 8, 8, 3, 3
+};
+
+static size_t RtemsEventReqSendReceive_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsEventReqSendReceive_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ RtemsEventReqSendReceive_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsEventReqSendReceive_Fixture = {
+ .setup = RtemsEventReqSendReceive_Setup_Wrap,
+ .stop = NULL,
+ .teardown = RtemsEventReqSendReceive_Teardown_Wrap,
+ .scope = RtemsEventReqSendReceive_Scope,
+ .initial_context = &RtemsEventReqSendReceive_Instance
+};
+
+static inline RtemsEventReqSendReceive_Entry RtemsEventReqSendReceive_PopEntry(
+ RtemsEventReqSendReceive_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsEventReqSendReceive_Entries[
+ RtemsEventReqSendReceive_Map[ index ]
+ ];
+}
+
+static void RtemsEventReqSendReceive_SetPreConditionStates(
+ RtemsEventReqSendReceive_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+
+ if ( ctx->Map.entry.Pre_Send_NA ) {
+ ctx->Map.pcs[ 1 ] = RtemsEventReqSendReceive_Pre_Send_NA;
+ } else {
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ }
+
+ if ( ctx->Map.entry.Pre_ReceiverState_NA ) {
+ ctx->Map.pcs[ 2 ] = RtemsEventReqSendReceive_Pre_ReceiverState_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+
+ if ( ctx->Map.entry.Pre_Satisfy_NA ) {
+ ctx->Map.pcs[ 3 ] = RtemsEventReqSendReceive_Pre_Satisfy_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+}
+
+static void RtemsEventReqSendReceive_TestVariant(
+ RtemsEventReqSendReceive_Context *ctx
+)
+{
+ RtemsEventReqSendReceive_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsEventReqSendReceive_Pre_Send_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsEventReqSendReceive_Pre_ReceiverState_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsEventReqSendReceive_Pre_Satisfy_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ RtemsEventReqSendReceive_Action( ctx );
+ RtemsEventReqSendReceive_Post_SendStatus_Check(
+ ctx,
+ ctx->Map.entry.Post_SendStatus
+ );
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Check(
+ ctx,
+ ctx->Map.entry.Post_ReceiveStatus
+ );
+ RtemsEventReqSendReceive_Post_SenderPreemption_Check(
+ ctx,
+ ctx->Map.entry.Post_SenderPreemption
+ );
+}
+
+static T_fixture_node RtemsEventReqSendReceive_Node;
+
+static T_remark RtemsEventReqSendReceive_Remark = {
+ .next = NULL,
+ .remark = "RtemsEventReqSendReceive"
+};
+
+void RtemsEventReqSendReceive_Run(
+ rtems_status_code ( *send )( rtems_id, rtems_event_set ),
+ rtems_status_code ( *receive )( rtems_event_set, rtems_option, rtems_interval, rtems_event_set * ),
+ rtems_event_set ( *get_pending_events )( Thread_Control * ),
+ unsigned int wait_class,
+ int waiting_for_event
+)
+{
+ RtemsEventReqSendReceive_Context *ctx;
+
+ ctx = &RtemsEventReqSendReceive_Instance;
+ ctx->send = send;
+ ctx->receive = receive;
+ ctx->get_pending_events = get_pending_events;
+ ctx->wait_class = wait_class;
+ ctx->waiting_for_event = waiting_for_event;
+
+ ctx = T_push_fixture(
+ &RtemsEventReqSendReceive_Node,
+ &RtemsEventReqSendReceive_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = RtemsEventReqSendReceive_Pre_Id_InvId;
+ ctx->Map.pci[ 0 ] < RtemsEventReqSendReceive_Pre_Id_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = RtemsEventReqSendReceive_Pre_Send_Zero;
+ ctx->Map.pci[ 1 ] < RtemsEventReqSendReceive_Pre_Send_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = RtemsEventReqSendReceive_Pre_ReceiverState_InvAddr;
+ ctx->Map.pci[ 2 ] < RtemsEventReqSendReceive_Pre_ReceiverState_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = RtemsEventReqSendReceive_Pre_Satisfy_All;
+ ctx->Map.pci[ 3 ] < RtemsEventReqSendReceive_Pre_Satisfy_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ ctx->Map.entry = RtemsEventReqSendReceive_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ RtemsEventReqSendReceive_SetPreConditionStates( ctx );
+ RtemsEventReqSendReceive_Prepare( ctx );
+ RtemsEventReqSendReceive_TestVariant( ctx );
+ RtemsEventReqSendReceive_Cleanup( ctx );
+ }
+ }
+ }
+ }
+
+ T_add_remark( &RtemsEventReqSendReceive_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-event-send-receive.h b/testsuites/validation/tr-event-send-receive.h
new file mode 100644
index 0000000000..f6dee4ddca
--- /dev/null
+++ b/testsuites/validation/tr-event-send-receive.h
@@ -0,0 +1,152 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsEventReqSendReceive
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_EVENT_SEND_RECEIVE_H
+#define _TR_EVENT_SEND_RECEIVE_H
+
+#include <rtems.h>
+#include <rtems/score/thread.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup RtemsEventReqSendReceive
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsEventReqSendReceive_Pre_Id_InvId,
+ RtemsEventReqSendReceive_Pre_Id_Task,
+ RtemsEventReqSendReceive_Pre_Id_NA
+} RtemsEventReqSendReceive_Pre_Id;
+
+typedef enum {
+ RtemsEventReqSendReceive_Pre_Send_Zero,
+ RtemsEventReqSendReceive_Pre_Send_Unrelated,
+ RtemsEventReqSendReceive_Pre_Send_Any,
+ RtemsEventReqSendReceive_Pre_Send_All,
+ RtemsEventReqSendReceive_Pre_Send_MixedAny,
+ RtemsEventReqSendReceive_Pre_Send_MixedAll,
+ RtemsEventReqSendReceive_Pre_Send_NA
+} RtemsEventReqSendReceive_Pre_Send;
+
+typedef enum {
+ RtemsEventReqSendReceive_Pre_ReceiverState_InvAddr,
+ RtemsEventReqSendReceive_Pre_ReceiverState_NotWaiting,
+ RtemsEventReqSendReceive_Pre_ReceiverState_Poll,
+ RtemsEventReqSendReceive_Pre_ReceiverState_Timeout,
+ RtemsEventReqSendReceive_Pre_ReceiverState_Lower,
+ RtemsEventReqSendReceive_Pre_ReceiverState_Equal,
+ RtemsEventReqSendReceive_Pre_ReceiverState_Higher,
+ RtemsEventReqSendReceive_Pre_ReceiverState_Other,
+ RtemsEventReqSendReceive_Pre_ReceiverState_Intend,
+ RtemsEventReqSendReceive_Pre_ReceiverState_NA
+} RtemsEventReqSendReceive_Pre_ReceiverState;
+
+typedef enum {
+ RtemsEventReqSendReceive_Pre_Satisfy_All,
+ RtemsEventReqSendReceive_Pre_Satisfy_Any,
+ RtemsEventReqSendReceive_Pre_Satisfy_NA
+} RtemsEventReqSendReceive_Pre_Satisfy;
+
+typedef enum {
+ RtemsEventReqSendReceive_Post_SendStatus_Ok,
+ RtemsEventReqSendReceive_Post_SendStatus_InvId,
+ RtemsEventReqSendReceive_Post_SendStatus_NA
+} RtemsEventReqSendReceive_Post_SendStatus;
+
+typedef enum {
+ RtemsEventReqSendReceive_Post_ReceiveStatus_None,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Pending,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Timeout,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Satisfied,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Unsatisfied,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_Blocked,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_InvAddr,
+ RtemsEventReqSendReceive_Post_ReceiveStatus_NA
+} RtemsEventReqSendReceive_Post_ReceiveStatus;
+
+typedef enum {
+ RtemsEventReqSendReceive_Post_SenderPreemption_No,
+ RtemsEventReqSendReceive_Post_SenderPreemption_Yes,
+ RtemsEventReqSendReceive_Post_SenderPreemption_NA
+} RtemsEventReqSendReceive_Post_SenderPreemption;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param send is the event send handler.
+ *
+ * @param receive is the event receive handler.
+ *
+ * @param get_pending_events is the get pending events handler.
+ *
+ * @param wait_class is the thread wait class.
+ *
+ * @param waiting_for_event is the thread waiting for event state.
+ */
+void RtemsEventReqSendReceive_Run(
+ rtems_status_code ( *send )( rtems_id, rtems_event_set ),
+ rtems_status_code ( *receive )( rtems_event_set, rtems_option, rtems_interval, rtems_event_set * ),
+ rtems_event_set ( *get_pending_events )( Thread_Control * ),
+ unsigned int wait_class,
+ int waiting_for_event
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_EVENT_SEND_RECEIVE_H */
diff --git a/testsuites/validation/tr-fatal-boot-processor-not-assigned-to-scheduler.c b/testsuites/validation/tr-fatal-boot-processor-not-assigned-to-scheduler.c
new file mode 100644
index 0000000000..d02e2df8b6
--- /dev/null
+++ b/testsuites/validation/tr-fatal-boot-processor-not-assigned-to-scheduler.c
@@ -0,0 +1,159 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValFatalBootProcessorNotAssignedToScheduler
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/smpimpl.h>
+
+#include "tr-fatal-boot-processor-not-assigned-to-scheduler.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSmpValFatalBootProcessorNotAssignedToScheduler \
+ * spec:/score/smp/val/fatal-boot-processor-not-assigned-to-scheduler
+ *
+ * @ingroup TestsuitesFatalBootProcessorNotAssignedToScheduler
+ *
+ * @brief Tests a fatal error.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by the application configuration of the
+ * test suite.
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for
+ * spec:/score/smp/val/fatal-boot-processor-not-assigned-to-scheduler test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Run() parameter.
+ */
+ rtems_fatal_code code;
+} ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Context;
+
+static ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Context
+ ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Instance;
+
+static T_fixture ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Instance
+};
+
+/**
+ * @brief The test action is carried out by the application configuration of
+ * the test suite.
+ */
+static void ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Action_0(
+ ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Context *ctx
+)
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_SMP );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong(
+ 1,
+ ctx->code,
+ SMP_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER
+ );
+}
+
+void ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+)
+{
+ ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Context *ctx;
+
+ ctx = &ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin(
+ "ScoreSmpValFatalBootProcessorNotAssignedToScheduler",
+ &ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Fixture
+ );
+
+ T_plan( 2 );
+
+ ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Action_0( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-fatal-boot-processor-not-assigned-to-scheduler.h b/testsuites/validation/tr-fatal-boot-processor-not-assigned-to-scheduler.h
new file mode 100644
index 0000000000..77299a5b39
--- /dev/null
+++ b/testsuites/validation/tr-fatal-boot-processor-not-assigned-to-scheduler.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValFatalBootProcessorNotAssignedToScheduler
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER_H
+#define _TR_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreSmpValFatalBootProcessorNotAssignedToScheduler
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is fatal source.
+ *
+ * @param code is fatal code.
+ */
+void ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER_H */
diff --git a/testsuites/validation/tr-fatal-idle-thread-create-failed.c b/testsuites/validation/tr-fatal-idle-thread-create-failed.c
new file mode 100644
index 0000000000..60a400c43d
--- /dev/null
+++ b/testsuites/validation/tr-fatal-idle-thread-create-failed.c
@@ -0,0 +1,158 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreThreadValFatalIdleThreadCreateFailed
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tr-fatal-idle-thread-create-failed.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreThreadValFatalIdleThreadCreateFailed \
+ * spec:/score/thread/val/fatal-idle-thread-create-failed
+ *
+ * @ingroup TestsuitesFatalIdleThreadCreateFailed
+ *
+ * @brief Tests a fatal error caused by a failing task create extension.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by configuring a task create extension
+ * which always fails.
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for
+ * spec:/score/thread/val/fatal-idle-thread-create-failed test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreThreadValFatalIdleThreadCreateFailed_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreThreadValFatalIdleThreadCreateFailed_Run() parameter.
+ */
+ rtems_fatal_code code;
+} ScoreThreadValFatalIdleThreadCreateFailed_Context;
+
+static ScoreThreadValFatalIdleThreadCreateFailed_Context
+ ScoreThreadValFatalIdleThreadCreateFailed_Instance;
+
+static T_fixture ScoreThreadValFatalIdleThreadCreateFailed_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &ScoreThreadValFatalIdleThreadCreateFailed_Instance
+};
+
+/**
+ * @brief The test action is carried out by configuring a task create extension
+ * which always fails.
+ */
+static void ScoreThreadValFatalIdleThreadCreateFailed_Action_0(
+ ScoreThreadValFatalIdleThreadCreateFailed_Context *ctx
+)
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, INTERNAL_ERROR_CORE );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong(
+ 1,
+ ctx->code,
+ INTERNAL_ERROR_IDLE_THREAD_CREATE_FAILED
+ );
+}
+
+void ScoreThreadValFatalIdleThreadCreateFailed_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+)
+{
+ ScoreThreadValFatalIdleThreadCreateFailed_Context *ctx;
+
+ ctx = &ScoreThreadValFatalIdleThreadCreateFailed_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin(
+ "ScoreThreadValFatalIdleThreadCreateFailed",
+ &ScoreThreadValFatalIdleThreadCreateFailed_Fixture
+ );
+
+ T_plan( 2 );
+
+ ScoreThreadValFatalIdleThreadCreateFailed_Action_0( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-fatal-idle-thread-create-failed.h b/testsuites/validation/tr-fatal-idle-thread-create-failed.h
new file mode 100644
index 0000000000..d521f3ed29
--- /dev/null
+++ b/testsuites/validation/tr-fatal-idle-thread-create-failed.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreThreadValFatalIdleThreadCreateFailed
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_IDLE_THREAD_CREATE_FAILED_H
+#define _TR_FATAL_IDLE_THREAD_CREATE_FAILED_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreThreadValFatalIdleThreadCreateFailed
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is the fatal source.
+ *
+ * @param code is the fatal code.
+ */
+void ScoreThreadValFatalIdleThreadCreateFailed_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_IDLE_THREAD_CREATE_FAILED_H */
diff --git a/testsuites/validation/tr-fatal-idle-thread-stack-too-small.c b/testsuites/validation/tr-fatal-idle-thread-stack-too-small.c
new file mode 100644
index 0000000000..34a428c883
--- /dev/null
+++ b/testsuites/validation/tr-fatal-idle-thread-stack-too-small.c
@@ -0,0 +1,175 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreThreadValFatalIdleThreadStackTooSmall
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tr-fatal-idle-thread-stack-too-small.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreThreadValFatalIdleThreadStackTooSmall \
+ * spec:/score/thread/val/fatal-idle-thread-stack-too-small
+ *
+ * @ingroup TestsuitesFatalIdleThreadStackTooSmall
+ *
+ * @brief Tests a fatal error caused by a too small idle thread stack size.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by configuring a thread-local storage
+ * demand which leads to a too small idle thread stack size.
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * - Check the configured value of CONFIGURE_IDLE_TASK_STORAGE_SIZE.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for
+ * spec:/score/thread/val/fatal-idle-thread-stack-too-small test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreThreadValFatalIdleThreadStackTooSmall_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreThreadValFatalIdleThreadStackTooSmall_Run() parameter.
+ */
+ rtems_fatal_code code;
+} ScoreThreadValFatalIdleThreadStackTooSmall_Context;
+
+static ScoreThreadValFatalIdleThreadStackTooSmall_Context
+ ScoreThreadValFatalIdleThreadStackTooSmall_Instance;
+
+static T_fixture ScoreThreadValFatalIdleThreadStackTooSmall_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &ScoreThreadValFatalIdleThreadStackTooSmall_Instance
+};
+
+/**
+ * @brief The test action is carried out by configuring a thread-local storage
+ * demand which leads to a too small idle thread stack size.
+ */
+static void ScoreThreadValFatalIdleThreadStackTooSmall_Action_0(
+ ScoreThreadValFatalIdleThreadStackTooSmall_Context *ctx
+)
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, INTERNAL_ERROR_CORE );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong(
+ 1,
+ ctx->code,
+ INTERNAL_ERROR_IDLE_THREAD_STACK_TOO_SMALL
+ );
+
+ /*
+ * Check the configured value of CONFIGURE_IDLE_TASK_STORAGE_SIZE.
+ */
+ T_step_eq_sz(
+ 2,
+ _Stack_Allocator_allocate_for_idle_storage_size,
+ RTEMS_ALIGN_UP(
+ RTEMS_TASK_STORAGE_SIZE(
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_ATTRIBUTES
+ ),
+ CPU_INTERRUPT_STACK_ALIGNMENT
+ )
+ );
+}
+
+void ScoreThreadValFatalIdleThreadStackTooSmall_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+)
+{
+ ScoreThreadValFatalIdleThreadStackTooSmall_Context *ctx;
+
+ ctx = &ScoreThreadValFatalIdleThreadStackTooSmall_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin(
+ "ScoreThreadValFatalIdleThreadStackTooSmall",
+ &ScoreThreadValFatalIdleThreadStackTooSmall_Fixture
+ );
+
+ T_plan( 3 );
+
+ ScoreThreadValFatalIdleThreadStackTooSmall_Action_0( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-fatal-idle-thread-stack-too-small.h b/testsuites/validation/tr-fatal-idle-thread-stack-too-small.h
new file mode 100644
index 0000000000..be29df8a39
--- /dev/null
+++ b/testsuites/validation/tr-fatal-idle-thread-stack-too-small.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreThreadValFatalIdleThreadStackTooSmall
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_IDLE_THREAD_STACK_TOO_SMALL_H
+#define _TR_FATAL_IDLE_THREAD_STACK_TOO_SMALL_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreThreadValFatalIdleThreadStackTooSmall
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is the fatal source.
+ *
+ * @param code is the fatal code.
+ */
+void ScoreThreadValFatalIdleThreadStackTooSmall_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_IDLE_THREAD_STACK_TOO_SMALL_H */
diff --git a/testsuites/validation/tr-fatal-init-task-construct-failed.c b/testsuites/validation/tr-fatal-init-task-construct-failed.c
new file mode 100644
index 0000000000..2bef7b73d8
--- /dev/null
+++ b/testsuites/validation/tr-fatal-init-task-construct-failed.c
@@ -0,0 +1,172 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup AcfgValFatalInitTaskConstructFailed
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/rtems/tasksdata.h>
+
+#include "tr-fatal-init-task-construct-failed.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup AcfgValFatalInitTaskConstructFailed \
+ * spec:/acfg/val/fatal-init-task-construct-failed
+ *
+ * @ingroup TestsuitesFatalInitTaskConstructFailed
+ *
+ * @brief Tests a fatal error caused by an invalid application configuration.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by configuring an invalid task priority
+ * used to construct the initialization task.
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * - Check that the CONFIGURE_INIT_TASK_PRIORITY application configuration
+ * option resulted in the expected system setting.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/acfg/val/fatal-init-task-construct-failed test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * AcfgValFatalInitTaskConstructFailed_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * AcfgValFatalInitTaskConstructFailed_Run() parameter.
+ */
+ rtems_fatal_code code;
+} AcfgValFatalInitTaskConstructFailed_Context;
+
+static AcfgValFatalInitTaskConstructFailed_Context
+ AcfgValFatalInitTaskConstructFailed_Instance;
+
+static T_fixture AcfgValFatalInitTaskConstructFailed_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &AcfgValFatalInitTaskConstructFailed_Instance
+};
+
+/**
+ * @brief The test action is carried out by configuring an invalid task
+ * priority used to construct the initialization task.
+ */
+static void AcfgValFatalInitTaskConstructFailed_Action_0(
+ AcfgValFatalInitTaskConstructFailed_Context *ctx
+)
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, INTERNAL_ERROR_CORE );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong(
+ 1,
+ ctx->code,
+ INTERNAL_ERROR_RTEMS_INIT_TASK_CONSTRUCT_FAILED
+ );
+
+ /*
+ * Check that the CONFIGURE_INIT_TASK_PRIORITY application configuration
+ * option resulted in the expected system setting.
+ */
+ T_step_eq_u32(
+ 2,
+ _RTEMS_tasks_User_task_config.config.initial_priority,
+ 0
+ );
+}
+
+void AcfgValFatalInitTaskConstructFailed_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+)
+{
+ AcfgValFatalInitTaskConstructFailed_Context *ctx;
+
+ ctx = &AcfgValFatalInitTaskConstructFailed_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin(
+ "AcfgValFatalInitTaskConstructFailed",
+ &AcfgValFatalInitTaskConstructFailed_Fixture
+ );
+
+ T_plan( 3 );
+
+ AcfgValFatalInitTaskConstructFailed_Action_0( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-fatal-init-task-construct-failed.h b/testsuites/validation/tr-fatal-init-task-construct-failed.h
new file mode 100644
index 0000000000..9288a7f724
--- /dev/null
+++ b/testsuites/validation/tr-fatal-init-task-construct-failed.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup AcfgValFatalInitTaskConstructFailed
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_INIT_TASK_CONSTRUCT_FAILED_H
+#define _TR_FATAL_INIT_TASK_CONSTRUCT_FAILED_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup AcfgValFatalInitTaskConstructFailed
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is fatal source.
+ *
+ * @param code is fatal code.
+ */
+void AcfgValFatalInitTaskConstructFailed_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_INIT_TASK_CONSTRUCT_FAILED_H */
diff --git a/testsuites/validation/tr-fatal-mandatory-processor-not-present.c b/testsuites/validation/tr-fatal-mandatory-processor-not-present.c
new file mode 100644
index 0000000000..00b5678e1c
--- /dev/null
+++ b/testsuites/validation/tr-fatal-mandatory-processor-not-present.c
@@ -0,0 +1,158 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValFatalMandatoryProcessorNotPresent
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/smpimpl.h>
+
+#include "tr-fatal-mandatory-processor-not-present.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSmpValFatalMandatoryProcessorNotPresent \
+ * spec:/score/smp/val/fatal-mandatory-processor-not-present
+ *
+ * @ingroup TestsuitesFatalMandatoryProcessorNotPresent
+ *
+ * @brief Tests a fatal error.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by the application configuration of the
+ * test suite.
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for
+ * spec:/score/smp/val/fatal-mandatory-processor-not-present test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSmpValFatalMandatoryProcessorNotPresent_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSmpValFatalMandatoryProcessorNotPresent_Run() parameter.
+ */
+ rtems_fatal_code code;
+} ScoreSmpValFatalMandatoryProcessorNotPresent_Context;
+
+static ScoreSmpValFatalMandatoryProcessorNotPresent_Context
+ ScoreSmpValFatalMandatoryProcessorNotPresent_Instance;
+
+static T_fixture ScoreSmpValFatalMandatoryProcessorNotPresent_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &ScoreSmpValFatalMandatoryProcessorNotPresent_Instance
+};
+
+/**
+ * @brief The test action is carried out by the application configuration of
+ * the test suite.
+ */
+static void ScoreSmpValFatalMandatoryProcessorNotPresent_Action_0(
+ ScoreSmpValFatalMandatoryProcessorNotPresent_Context *ctx
+)
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_SMP );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong(
+ 1,
+ ctx->code,
+ SMP_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT
+ );
+}
+
+void ScoreSmpValFatalMandatoryProcessorNotPresent_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+)
+{
+ ScoreSmpValFatalMandatoryProcessorNotPresent_Context *ctx;
+
+ ctx = &ScoreSmpValFatalMandatoryProcessorNotPresent_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin(
+ "ScoreSmpValFatalMandatoryProcessorNotPresent",
+ &ScoreSmpValFatalMandatoryProcessorNotPresent_Fixture
+ );
+
+ T_plan( 2 );
+
+ ScoreSmpValFatalMandatoryProcessorNotPresent_Action_0( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-fatal-mandatory-processor-not-present.h b/testsuites/validation/tr-fatal-mandatory-processor-not-present.h
new file mode 100644
index 0000000000..46d1581cc2
--- /dev/null
+++ b/testsuites/validation/tr-fatal-mandatory-processor-not-present.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValFatalMandatoryProcessorNotPresent
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT_H
+#define _TR_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreSmpValFatalMandatoryProcessorNotPresent
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is fatal source.
+ *
+ * @param code is fatal code.
+ */
+void ScoreSmpValFatalMandatoryProcessorNotPresent_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT_H */
diff --git a/testsuites/validation/tr-fatal-scheduler-requires-exactly-one-processor.c b/testsuites/validation/tr-fatal-scheduler-requires-exactly-one-processor.c
new file mode 100644
index 0000000000..8ac69193fa
--- /dev/null
+++ b/testsuites/validation/tr-fatal-scheduler-requires-exactly-one-processor.c
@@ -0,0 +1,159 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/smpimpl.h>
+
+#include "tr-fatal-scheduler-requires-exactly-one-processor.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor \
+ * spec:/score/smp/val/fatal-scheduler-requires-exactly-one-processor
+ *
+ * @ingroup TestsuitesFatalSchedulerRequiresExactlyOneProcessor
+ *
+ * @brief Tests a fatal error.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by the application configuration of the
+ * test suite.
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for
+ * spec:/score/smp/val/fatal-scheduler-requires-exactly-one-processor test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Run() parameter.
+ */
+ rtems_fatal_code code;
+} ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Context;
+
+static ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Context
+ ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Instance;
+
+static T_fixture ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Instance
+};
+
+/**
+ * @brief The test action is carried out by the application configuration of
+ * the test suite.
+ */
+static void ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Action_0(
+ ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Context *ctx
+)
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_SMP );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong(
+ 1,
+ ctx->code,
+ SMP_FATAL_SCHEDULER_REQUIRES_EXACTLY_ONE_PROCESSOR
+ );
+}
+
+void ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+)
+{
+ ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Context *ctx;
+
+ ctx = &ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin(
+ "ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor",
+ &ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Fixture
+ );
+
+ T_plan( 2 );
+
+ ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Action_0( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-fatal-scheduler-requires-exactly-one-processor.h b/testsuites/validation/tr-fatal-scheduler-requires-exactly-one-processor.h
new file mode 100644
index 0000000000..6bfb18fcfd
--- /dev/null
+++ b/testsuites/validation/tr-fatal-scheduler-requires-exactly-one-processor.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_SCHEDULER_REQUIRES_EXACTLY_ONE_PROCESSOR_H
+#define _TR_FATAL_SCHEDULER_REQUIRES_EXACTLY_ONE_PROCESSOR_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is fatal source.
+ *
+ * @param code is fatal code.
+ */
+void ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_SCHEDULER_REQUIRES_EXACTLY_ONE_PROCESSOR_H */
diff --git a/testsuites/validation/tr-fatal-smp.c b/testsuites/validation/tr-fatal-smp.c
new file mode 100644
index 0000000000..c2369d0ae7
--- /dev/null
+++ b/testsuites/validation/tr-fatal-smp.c
@@ -0,0 +1,320 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValFatal
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <setjmp.h>
+#include <rtems/sysinit.h>
+#include <rtems/score/atomic.h>
+#include <rtems/score/percpu.h>
+#include <rtems/score/smpimpl.h>
+
+#include "tr-fatal-smp.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSmpValFatal spec:/score/smp/val/fatal
+ *
+ * @ingroup TestsuitesFatalSmp
+ *
+ * @brief Tests four fatal errors.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by TriggerTestCase().
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * - Check that the processor state is shutdown.
+ *
+ * - Check that a second shutdown request does not end in a recursive
+ * shutdown response.
+ *
+ * - Issue a job on a processor in the shutdown state. Check that the right
+ * fatal error occurs if we try to wait for this job to complete.
+ *
+ * - Start multitasking on an invalid processor. Check that the right fatal
+ * error occurs.
+ *
+ * - Start multitasking on an unassigned processor. Check that the right fatal
+ * error occurs.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/score/smp/val/fatal test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSmpValFatal_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSmpValFatal_Run() parameter.
+ */
+ rtems_fatal_code code;
+} ScoreSmpValFatal_Context;
+
+static ScoreSmpValFatal_Context
+ ScoreSmpValFatal_Instance;
+
+static void TriggerTestCase( void )
+{
+ _SMP_Request_shutdown();
+ (void) _CPU_Thread_Idle_body( 0 );
+}
+
+RTEMS_SYSINIT_ITEM(
+ TriggerTestCase,
+ RTEMS_SYSINIT_DEVICE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
+static jmp_buf fatal_before;
+
+static Atomic_Uint fatal_counter;
+
+static rtems_fatal_source fatal_source;
+
+static rtems_fatal_code fatal_code;
+
+static void FatalRecordAndJump(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ (void) arg;
+
+ fatal_source = source;
+ fatal_code = code;
+ _Atomic_Fetch_add_uint( &fatal_counter, 1, ATOMIC_ORDER_RELAXED );
+ longjmp( fatal_before, 1 );
+}
+
+static void DoNothing( void *arg )
+{
+ (void) arg;
+}
+
+static const Per_CPU_Job_context job_context = {
+ .handler = DoNothing
+};
+
+Per_CPU_Job job = {
+ .context = &job_context
+};
+
+static T_fixture ScoreSmpValFatal_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &ScoreSmpValFatal_Instance
+};
+
+/**
+ * @brief The test action is carried out by TriggerTestCase().
+ */
+static void ScoreSmpValFatal_Action_0( ScoreSmpValFatal_Context *ctx )
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_SMP );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong( 1, ctx->code, SMP_FATAL_SHUTDOWN_RESPONSE );
+
+ /*
+ * Check that the processor state is shutdown.
+ */
+ T_step_eq_int(
+ 2,
+ _Per_CPU_Get_state( _Per_CPU_Get() ),
+ PER_CPU_STATE_SHUTDOWN
+ );
+
+ /*
+ * Check that a second shutdown request does not end in a recursive shutdown
+ * response.
+ */
+ _SMP_Process_message( _Per_CPU_Get(), SMP_MESSAGE_SHUTDOWN );
+}
+
+/**
+ * @brief Issue a job on a processor in the shutdown state. Check that the
+ * right fatal error occurs if we try to wait for this job to complete.
+ */
+static void ScoreSmpValFatal_Action_1( ScoreSmpValFatal_Context *ctx )
+{
+ Per_CPU_Control *cpu;
+
+ SetFatalHandler( FatalRecordAndJump, ctx );
+ cpu = _Per_CPU_Get_by_index( 0 );
+ _Per_CPU_Submit_job( cpu, &job );
+
+ if ( setjmp( fatal_before ) == 0 ) {
+ _Per_CPU_Wait_for_job( cpu, &job );
+ }
+
+ T_step_eq_uint(
+ 3,
+ _Atomic_Load_uint( &fatal_counter, ATOMIC_ORDER_RELAXED ),
+ 1
+ );
+ T_step_eq_int( 4, fatal_source, RTEMS_FATAL_SOURCE_SMP );
+ T_step_eq_ulong(
+ 5,
+ fatal_code,
+ SMP_FATAL_WRONG_CPU_STATE_TO_PERFORM_JOBS
+ );
+ SetFatalHandler( NULL, NULL );
+}
+
+/**
+ * @brief Start multitasking on an invalid processor. Check that the right
+ * fatal error occurs.
+ */
+static void ScoreSmpValFatal_Action_2( ScoreSmpValFatal_Context *ctx )
+{
+ Per_CPU_Control *cpu;
+
+ SetFatalHandler( FatalRecordAndJump, ctx );
+
+ /*
+ * This element is outside the array. This is not an issue since
+ * _SMP_Start_multitasking_on_secondary_processor() does not access the
+ * structure.
+ */
+ cpu = _Per_CPU_Get_by_index( 3 );
+
+ if ( setjmp( fatal_before ) == 0 ) {
+ _SMP_Start_multitasking_on_secondary_processor( cpu );
+ }
+
+ T_step_eq_uint(
+ 6,
+ _Atomic_Load_uint( &fatal_counter, ATOMIC_ORDER_RELAXED ),
+ 2
+ );
+ T_step_eq_int( 7, fatal_source, RTEMS_FATAL_SOURCE_SMP );
+ T_step_eq_ulong(
+ 8,
+ fatal_code,
+ SMP_FATAL_MULTITASKING_START_ON_INVALID_PROCESSOR
+ );
+ SetFatalHandler( NULL, NULL );
+}
+
+/**
+ * @brief Start multitasking on an unassigned processor. Check that the right
+ * fatal error occurs.
+ */
+static void ScoreSmpValFatal_Action_3( ScoreSmpValFatal_Context *ctx )
+{
+ Per_CPU_Control *cpu;
+
+ SetFatalHandler( FatalRecordAndJump, ctx );
+ cpu = _Per_CPU_Get_by_index( 2 );
+
+ if ( setjmp( fatal_before ) == 0 ) {
+ _SMP_Start_multitasking_on_secondary_processor( cpu );
+ }
+
+ T_step_eq_uint(
+ 9,
+ _Atomic_Load_uint( &fatal_counter, ATOMIC_ORDER_RELAXED ),
+ 3
+ );
+ T_step_eq_int( 10, fatal_source, RTEMS_FATAL_SOURCE_SMP );
+ T_step_eq_ulong(
+ 11,
+ fatal_code,
+ SMP_FATAL_MULTITASKING_START_ON_UNASSIGNED_PROCESSOR
+ );
+ SetFatalHandler( NULL, NULL );
+}
+
+void ScoreSmpValFatal_Run( rtems_fatal_source source, rtems_fatal_code code )
+{
+ ScoreSmpValFatal_Context *ctx;
+
+ ctx = &ScoreSmpValFatal_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin( "ScoreSmpValFatal", &ScoreSmpValFatal_Fixture );
+
+ T_plan( 12 );
+
+ ScoreSmpValFatal_Action_0( ctx );
+ ScoreSmpValFatal_Action_1( ctx );
+ ScoreSmpValFatal_Action_2( ctx );
+ ScoreSmpValFatal_Action_3( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-fatal-smp.h b/testsuites/validation/tr-fatal-smp.h
new file mode 100644
index 0000000000..ff7406a47f
--- /dev/null
+++ b/testsuites/validation/tr-fatal-smp.h
@@ -0,0 +1,81 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValFatal
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_SMP_H
+#define _TR_FATAL_SMP_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreSmpValFatal
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is fatal source.
+ *
+ * @param code is fatal code.
+ */
+void ScoreSmpValFatal_Run( rtems_fatal_source source, rtems_fatal_code code );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_SMP_H */
diff --git a/testsuites/validation/tr-fatal-start-of-mandatory-processor-failed.c b/testsuites/validation/tr-fatal-start-of-mandatory-processor-failed.c
new file mode 100644
index 0000000000..5c1be8271a
--- /dev/null
+++ b/testsuites/validation/tr-fatal-start-of-mandatory-processor-failed.c
@@ -0,0 +1,166 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValFatalStartOfMandatoryProcessorFailed
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/smpimpl.h>
+
+#include "tr-fatal-start-of-mandatory-processor-failed.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSmpValFatalStartOfMandatoryProcessorFailed \
+ * spec:/score/smp/val/fatal-start-of-mandatory-processor-failed
+ *
+ * @ingroup TestsuitesFatalStartOfMandatoryProcessorFailed
+ *
+ * @brief Tests a fatal error.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by the application configuration of the
+ * test suite and the wrapped _CPU_SMP_Start_processor().
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for
+ * spec:/score/smp/val/fatal-start-of-mandatory-processor-failed test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSmpValFatalStartOfMandatoryProcessorFailed_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSmpValFatalStartOfMandatoryProcessorFailed_Run() parameter.
+ */
+ rtems_fatal_code code;
+} ScoreSmpValFatalStartOfMandatoryProcessorFailed_Context;
+
+static ScoreSmpValFatalStartOfMandatoryProcessorFailed_Context
+ ScoreSmpValFatalStartOfMandatoryProcessorFailed_Instance;
+
+bool __wrap__CPU_SMP_Start_processor( uint32_t cpu_index );
+
+bool __wrap__CPU_SMP_Start_processor( uint32_t cpu_index )
+{
+ (void) cpu_index;
+ return false;
+}
+
+static T_fixture ScoreSmpValFatalStartOfMandatoryProcessorFailed_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &ScoreSmpValFatalStartOfMandatoryProcessorFailed_Instance
+};
+
+/**
+ * @brief The test action is carried out by the application configuration of
+ * the test suite and the wrapped _CPU_SMP_Start_processor().
+ */
+static void ScoreSmpValFatalStartOfMandatoryProcessorFailed_Action_0(
+ ScoreSmpValFatalStartOfMandatoryProcessorFailed_Context *ctx
+)
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_SMP );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong(
+ 1,
+ ctx->code,
+ SMP_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED
+ );
+}
+
+void ScoreSmpValFatalStartOfMandatoryProcessorFailed_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+)
+{
+ ScoreSmpValFatalStartOfMandatoryProcessorFailed_Context *ctx;
+
+ ctx = &ScoreSmpValFatalStartOfMandatoryProcessorFailed_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin(
+ "ScoreSmpValFatalStartOfMandatoryProcessorFailed",
+ &ScoreSmpValFatalStartOfMandatoryProcessorFailed_Fixture
+ );
+
+ T_plan( 2 );
+
+ ScoreSmpValFatalStartOfMandatoryProcessorFailed_Action_0( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-fatal-start-of-mandatory-processor-failed.h b/testsuites/validation/tr-fatal-start-of-mandatory-processor-failed.h
new file mode 100644
index 0000000000..b233ddc00c
--- /dev/null
+++ b/testsuites/validation/tr-fatal-start-of-mandatory-processor-failed.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValFatalStartOfMandatoryProcessorFailed
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED_H
+#define _TR_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreSmpValFatalStartOfMandatoryProcessorFailed
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is fatal source.
+ *
+ * @param code is fatal code.
+ */
+void ScoreSmpValFatalStartOfMandatoryProcessorFailed_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED_H */
diff --git a/testsuites/validation/tr-fatal-start-on-not-online-processor.c b/testsuites/validation/tr-fatal-start-on-not-online-processor.c
new file mode 100644
index 0000000000..2773b00783
--- /dev/null
+++ b/testsuites/validation/tr-fatal-start-on-not-online-processor.c
@@ -0,0 +1,167 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValFatalStartOnNotOnlineProcessor
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/smpimpl.h>
+
+#include "tr-fatal-start-on-not-online-processor.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSmpValFatalStartOnNotOnlineProcessor \
+ * spec:/score/smp/val/fatal-start-on-not-online-processor
+ *
+ * @ingroup TestsuitesFatalStartOnNotOnlineProcessor
+ *
+ * @brief Tests a fatal error.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by the wrapped _CPU_SMP_Start_processor().
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for
+ * spec:/score/smp/val/fatal-start-on-not-online-processor test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSmpValFatalStartOnNotOnlineProcessor_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSmpValFatalStartOnNotOnlineProcessor_Run() parameter.
+ */
+ rtems_fatal_code code;
+} ScoreSmpValFatalStartOnNotOnlineProcessor_Context;
+
+static ScoreSmpValFatalStartOnNotOnlineProcessor_Context
+ ScoreSmpValFatalStartOnNotOnlineProcessor_Instance;
+
+bool __real__CPU_SMP_Start_processor( uint32_t cpu_index );
+
+bool __wrap__CPU_SMP_Start_processor( uint32_t cpu_index );
+
+bool __wrap__CPU_SMP_Start_processor( uint32_t cpu_index )
+{
+ (void) __real__CPU_SMP_Start_processor( cpu_index );
+ return false;
+}
+
+static T_fixture ScoreSmpValFatalStartOnNotOnlineProcessor_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &ScoreSmpValFatalStartOnNotOnlineProcessor_Instance
+};
+
+/**
+ * @brief The test action is carried out by the wrapped
+ * _CPU_SMP_Start_processor().
+ */
+static void ScoreSmpValFatalStartOnNotOnlineProcessor_Action_0(
+ ScoreSmpValFatalStartOnNotOnlineProcessor_Context *ctx
+)
+{
+ /* Nothing to do */
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, RTEMS_FATAL_SOURCE_SMP );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong(
+ 1,
+ ctx->code,
+ SMP_FATAL_MULTITASKING_START_ON_NOT_ONLINE_PROCESSOR
+ );
+}
+
+void ScoreSmpValFatalStartOnNotOnlineProcessor_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+)
+{
+ ScoreSmpValFatalStartOnNotOnlineProcessor_Context *ctx;
+
+ ctx = &ScoreSmpValFatalStartOnNotOnlineProcessor_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin(
+ "ScoreSmpValFatalStartOnNotOnlineProcessor",
+ &ScoreSmpValFatalStartOnNotOnlineProcessor_Fixture
+ );
+
+ T_plan( 2 );
+
+ ScoreSmpValFatalStartOnNotOnlineProcessor_Action_0( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-fatal-start-on-not-online-processor.h b/testsuites/validation/tr-fatal-start-on-not-online-processor.h
new file mode 100644
index 0000000000..58e9641c4f
--- /dev/null
+++ b/testsuites/validation/tr-fatal-start-on-not-online-processor.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSmpValFatalStartOnNotOnlineProcessor
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_START_ON_NOT_ONLINE_PROCESSOR_H
+#define _TR_FATAL_START_ON_NOT_ONLINE_PROCESSOR_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreSmpValFatalStartOnNotOnlineProcessor
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is fatal source.
+ *
+ * @param code is fatal code.
+ */
+void ScoreSmpValFatalStartOnNotOnlineProcessor_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_START_ON_NOT_ONLINE_PROCESSOR_H */
diff --git a/testsuites/validation/tr-fatal-too-large-tls-size.c b/testsuites/validation/tr-fatal-too-large-tls-size.c
new file mode 100644
index 0000000000..9bf5dcda97
--- /dev/null
+++ b/testsuites/validation/tr-fatal-too-large-tls-size.c
@@ -0,0 +1,182 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup AcfgValFatalTooLargeTlsSize
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include <rtems/score/thread.h>
+
+#include "tr-fatal-too-large-tls-size.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup AcfgValFatalTooLargeTlsSize \
+ * spec:/acfg/val/fatal-too-large-tls-size
+ *
+ * @ingroup TestsuitesFatalTooLargeTlsSize
+ *
+ * @brief Tests a fatal error.
+ *
+ * This test case performs the following actions:
+ *
+ * - The test action is carried out by providing a thread-local storage object
+ * of sufficient size with respect to the application configuration of the
+ * test suite.
+ *
+ * - Check that the expected fatal source is present.
+ *
+ * - Check that the expected fatal code is present.
+ *
+ * - Check that the CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE application
+ * configuration option resulted in the expected system setting.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/acfg/val/fatal-too-large-tls-size test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * AcfgValFatalTooLargeTlsSize_Run() parameter.
+ */
+ rtems_fatal_source source;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * AcfgValFatalTooLargeTlsSize_Run() parameter.
+ */
+ rtems_fatal_code code;
+} AcfgValFatalTooLargeTlsSize_Context;
+
+static AcfgValFatalTooLargeTlsSize_Context
+ AcfgValFatalTooLargeTlsSize_Instance;
+
+static volatile _Thread_local uint8_t large_tls_object[ RTEMS_TASK_STORAGE_ALIGNMENT + 1 ];
+
+static volatile bool shall_not_load_the_value;
+
+static T_fixture AcfgValFatalTooLargeTlsSize_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &AcfgValFatalTooLargeTlsSize_Instance
+};
+
+/**
+ * @brief The test action is carried out by providing a thread-local storage
+ * object of sufficient size with respect to the application configuration of
+ * the test suite.
+ */
+static void AcfgValFatalTooLargeTlsSize_Action_0(
+ AcfgValFatalTooLargeTlsSize_Context *ctx
+)
+{
+ if ( shall_not_load_the_value ) {
+ uint8_t value;
+
+ value = large_tls_object[ 0 ];
+ RTEMS_OBFUSCATE_VARIABLE( value );
+ }
+
+ /*
+ * Check that the expected fatal source is present.
+ */
+ T_step_eq_int( 0, ctx->source, INTERNAL_ERROR_CORE );
+
+ /*
+ * Check that the expected fatal code is present.
+ */
+ T_step_eq_ulong(
+ 1,
+ ctx->code,
+ INTERNAL_ERROR_TOO_LARGE_TLS_SIZE
+ );
+
+ /*
+ * Check that the CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE application
+ * configuration option resulted in the expected system setting.
+ */
+ T_step_eq_sz(
+ 2,
+ _Thread_Maximum_TLS_size,
+ RTEMS_TASK_STORAGE_ALIGNMENT
+ );
+}
+
+void AcfgValFatalTooLargeTlsSize_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+)
+{
+ AcfgValFatalTooLargeTlsSize_Context *ctx;
+
+ ctx = &AcfgValFatalTooLargeTlsSize_Instance;
+ ctx->source = source;
+ ctx->code = code;
+
+ ctx = T_case_begin(
+ "AcfgValFatalTooLargeTlsSize",
+ &AcfgValFatalTooLargeTlsSize_Fixture
+ );
+
+ T_plan( 3 );
+
+ AcfgValFatalTooLargeTlsSize_Action_0( ctx );
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-fatal-too-large-tls-size.h b/testsuites/validation/tr-fatal-too-large-tls-size.h
new file mode 100644
index 0000000000..c1504261d2
--- /dev/null
+++ b/testsuites/validation/tr-fatal-too-large-tls-size.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup AcfgValFatalTooLargeTlsSize
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_FATAL_TOO_LARGE_TLS_SIZE_H
+#define _TR_FATAL_TOO_LARGE_TLS_SIZE_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup AcfgValFatalTooLargeTlsSize
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param source is fatal source.
+ *
+ * @param code is fatal code.
+ */
+void AcfgValFatalTooLargeTlsSize_Run(
+ rtems_fatal_source source,
+ rtems_fatal_code code
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_FATAL_TOO_LARGE_TLS_SIZE_H */
diff --git a/testsuites/validation/tr-io-kernel.c b/testsuites/validation/tr-io-kernel.c
new file mode 100644
index 0000000000..bbebfe5a26
--- /dev/null
+++ b/testsuites/validation/tr-io-kernel.c
@@ -0,0 +1,125 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsIoValKernel
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/bspIo.h>
+
+#include "tr-io-kernel.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsIoValKernel spec:/rtems/io/val/kernel
+ *
+ * @ingroup TestsuitesValidationIoKernel
+ *
+ * @brief Tests the functions referenced by BSP_output_char and BSP_poll_char.
+ *
+ * This test case performs the following actions:
+ *
+ * - Call the function referenced by BSP_output_char.
+ *
+ * - If BSP_poll_char references a function, then call it.
+ *
+ * - Check that the returned value is minus one or an unsigned character
+ * value.
+ *
+ * @{
+ */
+
+/**
+ * @brief Call the function referenced by BSP_output_char.
+ */
+static void RtemsIoValKernel_Action_0( void )
+{
+ T_report_hash_sha256_update( 'X' );
+ ( *BSP_output_char )( 'X' );
+ T_report_hash_sha256_update( '\n' );
+ ( *BSP_output_char )( '\n' );
+}
+
+/**
+ * @brief If BSP_poll_char references a function, then call it.
+ */
+static void RtemsIoValKernel_Action_1( void )
+{
+ BSP_polling_getchar_function_type poll_char;
+ int c;
+
+ poll_char = BSP_poll_char;
+
+ if ( poll_char != NULL ) {
+ c = ( *poll_char )();
+ } else {
+ c = -1;
+ }
+
+ /*
+ * Check that the returned value is minus one or an unsigned character value.
+ */
+ T_step_true( 0, c == -1 || ( c & ~0xff ) == 0 );
+}
+
+void RtemsIoValKernel_Run( void )
+{
+ T_case_begin( "RtemsIoValKernel", &T_empty_fixture );
+
+ T_plan( 1 );
+
+ RtemsIoValKernel_Action_0();
+ RtemsIoValKernel_Action_1();
+
+ T_case_end();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-io-kernel.h b/testsuites/validation/tr-io-kernel.h
new file mode 100644
index 0000000000..ef878982dc
--- /dev/null
+++ b/testsuites/validation/tr-io-kernel.h
@@ -0,0 +1,75 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsIoValKernel
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_IO_KERNEL_H
+#define _TR_IO_KERNEL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup RtemsIoValKernel
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ */
+void RtemsIoValKernel_Run( void );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_IO_KERNEL_H */
diff --git a/testsuites/validation/tr-mtx-seize-try.c b/testsuites/validation/tr-mtx-seize-try.c
new file mode 100644
index 0000000000..ddc995c2e1
--- /dev/null
+++ b/testsuites/validation/tr-mtx-seize-try.c
@@ -0,0 +1,868 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreMtxReqSeizeTry
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-mtx-seize-try.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreMtxReqSeizeTry spec:/score/mtx/req/seize-try
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Protocol_NA : 1;
+ uint16_t Pre_Discipline_NA : 1;
+ uint16_t Pre_Recursive_NA : 1;
+ uint16_t Pre_Owner_NA : 1;
+ uint16_t Pre_Priority_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_Owner : 2;
+ uint16_t Post_Priority : 2;
+} ScoreMtxReqSeizeTry_Entry;
+
+/**
+ * @brief Test context for spec:/score/mtx/req/seize-try test case.
+ */
+typedef struct {
+ /**
+ * @brief If this member is true, then the calling thread shall be the owner
+ * of the mutex.
+ */
+ bool owner_caller;
+
+ /**
+ * @brief If this member is true, then a thread other than the calling thread
+ * shall be the owner of the mutex.
+ */
+ bool owner_other;
+
+ /**
+ * @brief This member contains the current priority of the calling thread
+ * before the directive call.
+ */
+ rtems_task_priority priority_before;
+
+ /**
+ * @brief This member contains the owner of the mutex after the directive
+ * call.
+ */
+ const rtems_tcb *owner_after;
+
+ /**
+ * @brief This member contains the current priority of the calling thread
+ * after the directive call.
+ */
+ rtems_task_priority priority_after;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreMtxReqSeizeTry_Run() parameter.
+ */
+ TQMtxContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 5 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 5 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreMtxReqSeizeTry_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreMtxReqSeizeTry_Context;
+
+static ScoreMtxReqSeizeTry_Context
+ ScoreMtxReqSeizeTry_Instance;
+
+static const char * const ScoreMtxReqSeizeTry_PreDesc_Protocol[] = {
+ "Ceiling",
+ "MrsP",
+ "Other",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSeizeTry_PreDesc_Discipline[] = {
+ "FIFO",
+ "Priority",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSeizeTry_PreDesc_Recursive[] = {
+ "Allowed",
+ "Unavailable",
+ "Deadlock",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSeizeTry_PreDesc_Owner[] = {
+ "None",
+ "Caller",
+ "Other",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSeizeTry_PreDesc_Priority[] = {
+ "High",
+ "Equal",
+ "Low",
+ "NA"
+};
+
+static const char * const * const ScoreMtxReqSeizeTry_PreDesc[] = {
+ ScoreMtxReqSeizeTry_PreDesc_Protocol,
+ ScoreMtxReqSeizeTry_PreDesc_Discipline,
+ ScoreMtxReqSeizeTry_PreDesc_Recursive,
+ ScoreMtxReqSeizeTry_PreDesc_Owner,
+ ScoreMtxReqSeizeTry_PreDesc_Priority,
+ NULL
+};
+
+typedef ScoreMtxReqSeizeTry_Context Context;
+
+static Status_Control Status( const Context *ctx, Status_Control status )
+{
+ return TQConvertStatus( &ctx->tq_ctx->base, status );
+}
+
+static bool IsEnqueueStatus( const Context *ctx, Status_Control expected )
+{
+ return ctx->tq_ctx->base.status[ TQ_BLOCKER_A ] == Status( ctx, expected );
+}
+
+static void Action( Context *ctx )
+{
+ TQSetScheduler(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ SCHEDULER_A_ID,
+ PRIO_VERY_HIGH
+ );
+
+ if ( ctx->owner_caller ) {
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE );
+ } else if ( ctx->owner_other ) {
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_B, TQ_EVENT_ENQUEUE );
+ }
+
+ TQSetPriority( &ctx->tq_ctx->base, TQ_BLOCKER_A, ctx->priority_before );
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE );
+ ctx->owner_after = TQGetOwner( &ctx->tq_ctx->base );
+ ctx->priority_after = TQGetPriority( &ctx->tq_ctx->base, TQ_BLOCKER_A );
+
+ if ( ctx->owner_caller ) {
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_A, TQ_EVENT_SURRENDER );
+ } else if ( ctx->owner_other ) {
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_B, TQ_EVENT_SURRENDER );
+ }
+
+ if ( IsEnqueueStatus( ctx, STATUS_SUCCESSFUL ) ) {
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_A, TQ_EVENT_SURRENDER );
+ }
+}
+
+static void ActionSticky( Context *ctx )
+{
+ TQSetScheduler(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ SCHEDULER_B_ID,
+ PRIO_VERY_HIGH
+ );
+
+ if ( ctx->owner_caller ) {
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_ENQUEUE
+ );
+ } else if ( ctx->owner_other ) {
+ SetSelfScheduler( SCHEDULER_B_ID, PRIO_ULTRA_HIGH );
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_B,
+ TQ_EVENT_ENQUEUE
+ );
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH );
+ }
+
+ TQSetPriority( &ctx->tq_ctx->base, TQ_BLOCKER_A, ctx->priority_before );
+ TQClearDone( &ctx->tq_ctx->base, TQ_BLOCKER_A );
+ TQSendAndWaitForExecutionStopOrIntendToBlock(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_ENQUEUE
+ );
+ ctx->owner_after = TQGetOwner( &ctx->tq_ctx->base );
+ ctx->priority_after = TQGetPriority( &ctx->tq_ctx->base, TQ_BLOCKER_A );
+
+ if ( ctx->owner_caller ) {
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_SURRENDER
+ );
+ } else if ( ctx->owner_other ) {
+ SetSelfScheduler( SCHEDULER_B_ID, PRIO_ULTRA_HIGH );
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_B,
+ TQ_EVENT_SURRENDER
+ );
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_NORMAL );
+ }
+
+ TQWaitForDone( &ctx->tq_ctx->base, TQ_BLOCKER_A );
+
+ if ( IsEnqueueStatus( ctx, STATUS_SUCCESSFUL ) ) {
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_SURRENDER
+ );
+ }
+}
+
+static void ScoreMtxReqSeizeTry_Pre_Protocol_Prepare(
+ ScoreMtxReqSeizeTry_Context *ctx,
+ ScoreMtxReqSeizeTry_Pre_Protocol state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeTry_Pre_Protocol_Ceiling: {
+ /*
+ * Where the mutex uses the priority ceiling locking protocol.
+ */
+ if (
+ ctx->tq_ctx->priority_ceiling == PRIO_INVALID ||
+ ctx->tq_ctx->base.enqueue_variant == TQ_ENQUEUE_STICKY
+ ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Protocol_MrsP: {
+ /*
+ * Where the mutex uses the MrsP locking protocol.
+ */
+ if (
+ ctx->tq_ctx->priority_ceiling == PRIO_INVALID ||
+ ctx->tq_ctx->base.enqueue_variant != TQ_ENQUEUE_STICKY
+ ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Protocol_Other: {
+ /*
+ * Where the mutex does not use the priority ceiling or MrsP locking
+ * protocol.
+ */
+ if ( ctx->tq_ctx->priority_ceiling != PRIO_INVALID ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Protocol_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeTry_Pre_Discipline_Prepare(
+ ScoreMtxReqSeizeTry_Context *ctx,
+ ScoreMtxReqSeizeTry_Pre_Discipline state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeTry_Pre_Discipline_FIFO: {
+ /*
+ * Where the thread queue of the mutex uses the FIFO discipline.
+ */
+ if ( ctx->tq_ctx->base.discipline != TQ_FIFO ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Discipline_Priority: {
+ /*
+ * Where the thread queue of the mutex uses the priority discipline.
+ */
+ if ( ctx->tq_ctx->base.discipline != TQ_PRIORITY ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Discipline_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeTry_Pre_Recursive_Prepare(
+ ScoreMtxReqSeizeTry_Context *ctx,
+ ScoreMtxReqSeizeTry_Pre_Recursive state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeTry_Pre_Recursive_Allowed: {
+ /*
+ * Where a recursive seize of the mutex is allowed.
+ */
+ if ( ctx->tq_ctx->recursive != TQ_MTX_RECURSIVE_ALLOWED ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Recursive_Unavailable: {
+ /*
+ * Where a recursive seize of the mutex results in an unavailable status.
+ */
+ if ( ctx->tq_ctx->recursive != TQ_MTX_RECURSIVE_UNAVAILABLE ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Recursive_Deadlock: {
+ /*
+ * Where a recursive seize of the mutex results in a deadlock status.
+ */
+ if ( ctx->tq_ctx->recursive != TQ_MTX_RECURSIVE_DEADLOCK ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Recursive_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeTry_Pre_Owner_Prepare(
+ ScoreMtxReqSeizeTry_Context *ctx,
+ ScoreMtxReqSeizeTry_Pre_Owner state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeTry_Pre_Owner_None: {
+ /*
+ * While the mutex has no owner.
+ */
+ /* This is the default */
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Owner_Caller: {
+ /*
+ * While the owner of the mutex is the calling thread.
+ */
+ ctx->owner_caller = true;
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Owner_Other: {
+ /*
+ * While the owner of the mutex is a thread other than the calling
+ * thread.
+ */
+ ctx->owner_other = true;
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Owner_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeTry_Pre_Priority_Prepare(
+ ScoreMtxReqSeizeTry_Context *ctx,
+ ScoreMtxReqSeizeTry_Pre_Priority state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeTry_Pre_Priority_High: {
+ /*
+ * While the calling thread has a current priority higher than the
+ * priority ceiling.
+ */
+ ctx->priority_before = ctx->tq_ctx->priority_ceiling - 1;
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Priority_Equal: {
+ /*
+ * While the calling thread has a current priority equal to the priority
+ * ceiling.
+ */
+ ctx->priority_before = ctx->tq_ctx->priority_ceiling;
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Priority_Low: {
+ /*
+ * While the calling thread has a current priority lower than the
+ * priority ceiling.
+ */
+ ctx->priority_before = ctx->tq_ctx->priority_ceiling + 1;
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Pre_Priority_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeTry_Post_Status_Check(
+ ScoreMtxReqSeizeTry_Context *ctx,
+ ScoreMtxReqSeizeTry_Post_Status state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeTry_Post_Status_Ok: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_SUCCESSFUL.
+ */
+ T_true( IsEnqueueStatus( ctx, STATUS_SUCCESSFUL ) );
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Post_Status_MutexCeilingViolated: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_MUTEX_CEILING_VIOLATED.
+ */
+ T_true( IsEnqueueStatus( ctx, STATUS_MUTEX_CEILING_VIOLATED ) );
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Post_Status_Deadlock: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_DEADLOCK.
+ */
+ T_true( IsEnqueueStatus( ctx, STATUS_DEADLOCK ) );
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Post_Status_Unavailable: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_UNAVAILABLE.
+ */
+ T_true( IsEnqueueStatus( ctx, STATUS_UNAVAILABLE ) );
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Post_Status_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeTry_Post_Owner_Check(
+ ScoreMtxReqSeizeTry_Context *ctx,
+ ScoreMtxReqSeizeTry_Post_Owner state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeTry_Post_Owner_Other: {
+ /*
+ * The owner of the mutex shall not be modified.
+ */
+ T_eq_ptr(
+ ctx->owner_after,
+ ctx->tq_ctx->base.worker_tcb[ TQ_BLOCKER_B ]
+ );
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Post_Owner_Caller: {
+ /*
+ * The owner of the mutex shall be the calling thread.
+ */
+ T_eq_ptr(
+ ctx->owner_after,
+ ctx->tq_ctx->base.worker_tcb[ TQ_BLOCKER_A ]
+ );
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Post_Owner_None: {
+ /*
+ * The mutex shall have no owner.
+ */
+ T_null( ctx->owner_after );
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Post_Owner_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeTry_Post_Priority_Check(
+ ScoreMtxReqSeizeTry_Context *ctx,
+ ScoreMtxReqSeizeTry_Post_Priority state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeTry_Post_Priority_Nop: {
+ /*
+ * The priorities of the calling thread shall not be modified.
+ */
+ T_eq_u32( ctx->priority_after, ctx->priority_before );
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Post_Priority_Ceiling: {
+ /*
+ * The calling thread shall use the priority ceiling of the mutex.
+ */
+ T_eq_u32( ctx->priority_after, ctx->tq_ctx->priority_ceiling );
+ break;
+ }
+
+ case ScoreMtxReqSeizeTry_Post_Priority_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeTry_Prepare( ScoreMtxReqSeizeTry_Context *ctx )
+{
+ ctx->owner_caller = false;
+ ctx->owner_other = false;
+ ctx->priority_before = PRIO_VERY_HIGH;
+}
+
+static void ScoreMtxReqSeizeTry_Action( ScoreMtxReqSeizeTry_Context *ctx )
+{
+ TQSetScheduler(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_B,
+ SCHEDULER_A_ID,
+ PRIO_VERY_HIGH
+ );
+
+ if ( ctx->tq_ctx->base.enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ ActionSticky( ctx );
+ } else {
+ Action( ctx );
+ }
+}
+
+static const ScoreMtxReqSeizeTry_Entry
+ScoreMtxReqSeizeTry_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, ScoreMtxReqSeizeTry_Post_Status_NA,
+ ScoreMtxReqSeizeTry_Post_Owner_NA, ScoreMtxReqSeizeTry_Post_Priority_NA },
+ { 0, 0, 0, 0, 0, 1, ScoreMtxReqSeizeTry_Post_Status_Ok,
+ ScoreMtxReqSeizeTry_Post_Owner_Caller,
+ ScoreMtxReqSeizeTry_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeTry_Post_Status_Unavailable,
+ ScoreMtxReqSeizeTry_Post_Owner_Other, ScoreMtxReqSeizeTry_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 1, ScoreMtxReqSeizeTry_Post_Status_Unavailable,
+ ScoreMtxReqSeizeTry_Post_Owner_Other, ScoreMtxReqSeizeTry_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeTry_Post_Status_Ok,
+ ScoreMtxReqSeizeTry_Post_Owner_Caller,
+ ScoreMtxReqSeizeTry_Post_Priority_Ceiling },
+ { 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeTry_Post_Status_MutexCeilingViolated,
+ ScoreMtxReqSeizeTry_Post_Owner_None, ScoreMtxReqSeizeTry_Post_Priority_Nop },
+ { 1, 0, 0, 0, 0, 0, ScoreMtxReqSeizeTry_Post_Status_NA,
+ ScoreMtxReqSeizeTry_Post_Owner_NA, ScoreMtxReqSeizeTry_Post_Priority_NA },
+ { 0, 0, 0, 0, 0, 1, ScoreMtxReqSeizeTry_Post_Status_Unavailable,
+ ScoreMtxReqSeizeTry_Post_Owner_Caller,
+ ScoreMtxReqSeizeTry_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 1, ScoreMtxReqSeizeTry_Post_Status_Deadlock,
+ ScoreMtxReqSeizeTry_Post_Owner_Caller,
+ ScoreMtxReqSeizeTry_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeTry_Post_Status_Ok,
+ ScoreMtxReqSeizeTry_Post_Owner_Caller,
+ ScoreMtxReqSeizeTry_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeTry_Post_Status_Unavailable,
+ ScoreMtxReqSeizeTry_Post_Owner_Caller,
+ ScoreMtxReqSeizeTry_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeTry_Post_Status_Deadlock,
+ ScoreMtxReqSeizeTry_Post_Owner_Caller,
+ ScoreMtxReqSeizeTry_Post_Priority_Nop }
+};
+
+static const uint8_t
+ScoreMtxReqSeizeTry_Map[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 5, 4, 4, 9, 9, 6, 2, 2, 2, 5, 4, 4, 10, 10, 6, 2, 2, 2, 5, 4, 4, 11, 11,
+ 6, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5, 4, 4, 9, 9, 6, 2, 2, 2, 5, 4, 4, 10, 10, 6, 2, 2, 2, 5, 4,
+ 4, 11, 11, 6, 2, 2, 2, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 1, 1, 7, 7, 7, 3, 3, 3,
+ 1, 1, 1, 8, 8, 8, 3, 3, 3, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 1, 1, 7, 7, 7, 3, 3,
+ 3, 1, 1, 1, 8, 8, 8, 3, 3, 3
+};
+
+static size_t ScoreMtxReqSeizeTry_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreMtxReqSeizeTry_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( ScoreMtxReqSeizeTry_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreMtxReqSeizeTry_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = ScoreMtxReqSeizeTry_Scope,
+ .initial_context = &ScoreMtxReqSeizeTry_Instance
+};
+
+static const uint8_t ScoreMtxReqSeizeTry_Weights[] = {
+ 54, 27, 9, 3, 1
+};
+
+static void ScoreMtxReqSeizeTry_Skip(
+ ScoreMtxReqSeizeTry_Context *ctx,
+ size_t index
+)
+{
+ switch ( index + 1 ) {
+ case 1:
+ ctx->Map.pci[ 1 ] = ScoreMtxReqSeizeTry_Pre_Discipline_NA - 1;
+ /* Fall through */
+ case 2:
+ ctx->Map.pci[ 2 ] = ScoreMtxReqSeizeTry_Pre_Recursive_NA - 1;
+ /* Fall through */
+ case 3:
+ ctx->Map.pci[ 3 ] = ScoreMtxReqSeizeTry_Pre_Owner_NA - 1;
+ /* Fall through */
+ case 4:
+ ctx->Map.pci[ 4 ] = ScoreMtxReqSeizeTry_Pre_Priority_NA - 1;
+ break;
+ }
+}
+
+static inline ScoreMtxReqSeizeTry_Entry ScoreMtxReqSeizeTry_PopEntry(
+ ScoreMtxReqSeizeTry_Context *ctx
+)
+{
+ size_t index;
+
+ if ( ctx->Map.skip ) {
+ size_t i;
+
+ ctx->Map.skip = false;
+ index = 0;
+
+ for ( i = 0; i < 5; ++i ) {
+ index += ScoreMtxReqSeizeTry_Weights[ i ] * ctx->Map.pci[ i ];
+ }
+ } else {
+ index = ctx->Map.index;
+ }
+
+ ctx->Map.index = index + 1;
+
+ return ScoreMtxReqSeizeTry_Entries[
+ ScoreMtxReqSeizeTry_Map[ index ]
+ ];
+}
+
+static void ScoreMtxReqSeizeTry_SetPreConditionStates(
+ ScoreMtxReqSeizeTry_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+
+ if ( ctx->Map.entry.Pre_Priority_NA ) {
+ ctx->Map.pcs[ 4 ] = ScoreMtxReqSeizeTry_Pre_Priority_NA;
+ } else {
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+ }
+}
+
+static void ScoreMtxReqSeizeTry_TestVariant( ScoreMtxReqSeizeTry_Context *ctx )
+{
+ ScoreMtxReqSeizeTry_Pre_Protocol_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreMtxReqSeizeTry_Skip( ctx, 0 );
+ return;
+ }
+
+ ScoreMtxReqSeizeTry_Pre_Discipline_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreMtxReqSeizeTry_Skip( ctx, 1 );
+ return;
+ }
+
+ ScoreMtxReqSeizeTry_Pre_Recursive_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreMtxReqSeizeTry_Skip( ctx, 2 );
+ return;
+ }
+
+ ScoreMtxReqSeizeTry_Pre_Owner_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ ScoreMtxReqSeizeTry_Pre_Priority_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ ScoreMtxReqSeizeTry_Action( ctx );
+ ScoreMtxReqSeizeTry_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ ScoreMtxReqSeizeTry_Post_Owner_Check( ctx, ctx->Map.entry.Post_Owner );
+ ScoreMtxReqSeizeTry_Post_Priority_Check( ctx, ctx->Map.entry.Post_Priority );
+}
+
+static T_fixture_node ScoreMtxReqSeizeTry_Node;
+
+static T_remark ScoreMtxReqSeizeTry_Remark = {
+ .next = NULL,
+ .remark = "ScoreMtxReqSeizeTry"
+};
+
+void ScoreMtxReqSeizeTry_Run( TQMtxContext *tq_ctx )
+{
+ ScoreMtxReqSeizeTry_Context *ctx;
+
+ ctx = &ScoreMtxReqSeizeTry_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreMtxReqSeizeTry_Node,
+ &ScoreMtxReqSeizeTry_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+ ctx->Map.skip = false;
+
+ for (
+ ctx->Map.pci[ 0 ] = ScoreMtxReqSeizeTry_Pre_Protocol_Ceiling;
+ ctx->Map.pci[ 0 ] < ScoreMtxReqSeizeTry_Pre_Protocol_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = ScoreMtxReqSeizeTry_Pre_Discipline_FIFO;
+ ctx->Map.pci[ 1 ] < ScoreMtxReqSeizeTry_Pre_Discipline_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = ScoreMtxReqSeizeTry_Pre_Recursive_Allowed;
+ ctx->Map.pci[ 2 ] < ScoreMtxReqSeizeTry_Pre_Recursive_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = ScoreMtxReqSeizeTry_Pre_Owner_None;
+ ctx->Map.pci[ 3 ] < ScoreMtxReqSeizeTry_Pre_Owner_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = ScoreMtxReqSeizeTry_Pre_Priority_High;
+ ctx->Map.pci[ 4 ] < ScoreMtxReqSeizeTry_Pre_Priority_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ ctx->Map.entry = ScoreMtxReqSeizeTry_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ ScoreMtxReqSeizeTry_SetPreConditionStates( ctx );
+ ScoreMtxReqSeizeTry_Prepare( ctx );
+ ScoreMtxReqSeizeTry_TestVariant( ctx );
+ }
+ }
+ }
+ }
+ }
+
+ T_add_remark( &ScoreMtxReqSeizeTry_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-mtx-seize-try.h b/testsuites/validation/tr-mtx-seize-try.h
new file mode 100644
index 0000000000..28bac7d25d
--- /dev/null
+++ b/testsuites/validation/tr-mtx-seize-try.h
@@ -0,0 +1,134 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreMtxReqSeizeTry
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_MTX_SEIZE_TRY_H
+#define _TR_MTX_SEIZE_TRY_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreMtxReqSeizeTry
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreMtxReqSeizeTry_Pre_Protocol_Ceiling,
+ ScoreMtxReqSeizeTry_Pre_Protocol_MrsP,
+ ScoreMtxReqSeizeTry_Pre_Protocol_Other,
+ ScoreMtxReqSeizeTry_Pre_Protocol_NA
+} ScoreMtxReqSeizeTry_Pre_Protocol;
+
+typedef enum {
+ ScoreMtxReqSeizeTry_Pre_Discipline_FIFO,
+ ScoreMtxReqSeizeTry_Pre_Discipline_Priority,
+ ScoreMtxReqSeizeTry_Pre_Discipline_NA
+} ScoreMtxReqSeizeTry_Pre_Discipline;
+
+typedef enum {
+ ScoreMtxReqSeizeTry_Pre_Recursive_Allowed,
+ ScoreMtxReqSeizeTry_Pre_Recursive_Unavailable,
+ ScoreMtxReqSeizeTry_Pre_Recursive_Deadlock,
+ ScoreMtxReqSeizeTry_Pre_Recursive_NA
+} ScoreMtxReqSeizeTry_Pre_Recursive;
+
+typedef enum {
+ ScoreMtxReqSeizeTry_Pre_Owner_None,
+ ScoreMtxReqSeizeTry_Pre_Owner_Caller,
+ ScoreMtxReqSeizeTry_Pre_Owner_Other,
+ ScoreMtxReqSeizeTry_Pre_Owner_NA
+} ScoreMtxReqSeizeTry_Pre_Owner;
+
+typedef enum {
+ ScoreMtxReqSeizeTry_Pre_Priority_High,
+ ScoreMtxReqSeizeTry_Pre_Priority_Equal,
+ ScoreMtxReqSeizeTry_Pre_Priority_Low,
+ ScoreMtxReqSeizeTry_Pre_Priority_NA
+} ScoreMtxReqSeizeTry_Pre_Priority;
+
+typedef enum {
+ ScoreMtxReqSeizeTry_Post_Status_Ok,
+ ScoreMtxReqSeizeTry_Post_Status_MutexCeilingViolated,
+ ScoreMtxReqSeizeTry_Post_Status_Deadlock,
+ ScoreMtxReqSeizeTry_Post_Status_Unavailable,
+ ScoreMtxReqSeizeTry_Post_Status_NA
+} ScoreMtxReqSeizeTry_Post_Status;
+
+typedef enum {
+ ScoreMtxReqSeizeTry_Post_Owner_Other,
+ ScoreMtxReqSeizeTry_Post_Owner_Caller,
+ ScoreMtxReqSeizeTry_Post_Owner_None,
+ ScoreMtxReqSeizeTry_Post_Owner_NA
+} ScoreMtxReqSeizeTry_Post_Owner;
+
+typedef enum {
+ ScoreMtxReqSeizeTry_Post_Priority_Nop,
+ ScoreMtxReqSeizeTry_Post_Priority_Ceiling,
+ ScoreMtxReqSeizeTry_Post_Priority_NA
+} ScoreMtxReqSeizeTry_Post_Priority;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue context.
+ */
+void ScoreMtxReqSeizeTry_Run( TQMtxContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_MTX_SEIZE_TRY_H */
diff --git a/testsuites/validation/tr-mtx-seize-wait.c b/testsuites/validation/tr-mtx-seize-wait.c
new file mode 100644
index 0000000000..2e2fe9d1ec
--- /dev/null
+++ b/testsuites/validation/tr-mtx-seize-wait.c
@@ -0,0 +1,1152 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreMtxReqSeizeWait
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-mtx-seize-wait.h"
+#include "tr-tq-enqueue-ceiling.h"
+#include "tr-tq-enqueue-deadlock.h"
+#include "tr-tq-enqueue-fifo.h"
+#include "tr-tq-enqueue-priority-inherit.h"
+#include "tr-tq-enqueue-priority.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreMtxReqSeizeWait spec:/score/mtx/req/seize-wait
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Protocol_NA : 1;
+ uint32_t Pre_Discipline_NA : 1;
+ uint32_t Pre_DeadlockResult_NA : 1;
+ uint32_t Pre_Recursive_NA : 1;
+ uint32_t Pre_Owner_NA : 1;
+ uint32_t Pre_Priority_NA : 1;
+ uint32_t Post_Status : 3;
+ uint32_t Post_Enqueued : 3;
+ uint32_t Post_Owner : 2;
+ uint32_t Post_Priority : 2;
+} ScoreMtxReqSeizeWait_Entry;
+
+/**
+ * @brief Test context for spec:/score/mtx/req/seize-wait test case.
+ */
+typedef struct {
+ /**
+ * @brief If this member is true, then the calling thread shall be the owner
+ * of the mutex.
+ */
+ bool owner_caller;
+
+ /**
+ * @brief If this member is true, then a thread other than the calling thread
+ * shall be the owner of the mutex.
+ */
+ bool owner_other;
+
+ /**
+ * @brief If this member is true, then a deadlock shall occur.
+ */
+ bool deadlock;
+
+ /**
+ * @brief This member contains the current priority of the calling thread
+ * before the directive call.
+ */
+ rtems_task_priority priority_before;
+
+ /**
+ * @brief This member contains the owner of the mutex after the directive
+ * call.
+ */
+ const rtems_tcb *owner_after;
+
+ /**
+ * @brief This member contains the current priority of the calling thread
+ * after the directive call.
+ */
+ rtems_task_priority priority_after;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreMtxReqSeizeWait_Run() parameter.
+ */
+ TQMtxContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 6 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 6 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreMtxReqSeizeWait_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreMtxReqSeizeWait_Context;
+
+static ScoreMtxReqSeizeWait_Context
+ ScoreMtxReqSeizeWait_Instance;
+
+static const char * const ScoreMtxReqSeizeWait_PreDesc_Protocol[] = {
+ "None",
+ "Inherit",
+ "Ceiling",
+ "MrsP",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSeizeWait_PreDesc_Discipline[] = {
+ "FIFO",
+ "Priority",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSeizeWait_PreDesc_DeadlockResult[] = {
+ "Status",
+ "Fatal",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSeizeWait_PreDesc_Recursive[] = {
+ "Allowed",
+ "Deadlock",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSeizeWait_PreDesc_Owner[] = {
+ "None",
+ "Caller",
+ "Other",
+ "Deadlock",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSeizeWait_PreDesc_Priority[] = {
+ "High",
+ "Equal",
+ "Low",
+ "NA"
+};
+
+static const char * const * const ScoreMtxReqSeizeWait_PreDesc[] = {
+ ScoreMtxReqSeizeWait_PreDesc_Protocol,
+ ScoreMtxReqSeizeWait_PreDesc_Discipline,
+ ScoreMtxReqSeizeWait_PreDesc_DeadlockResult,
+ ScoreMtxReqSeizeWait_PreDesc_Recursive,
+ ScoreMtxReqSeizeWait_PreDesc_Owner,
+ ScoreMtxReqSeizeWait_PreDesc_Priority,
+ NULL
+};
+
+#if defined(RTEMS_SMP)
+#include "tr-tq-enqueue-mrsp.h"
+#endif
+
+typedef ScoreMtxReqSeizeWait_Context Context;
+
+static Status_Control Status( const Context *ctx, Status_Control status )
+{
+ return TQConvertStatus( &ctx->tq_ctx->base, status );
+}
+
+static bool IsEnqueueStatus( const Context *ctx, Status_Control expected )
+{
+ return ctx->tq_ctx->base.status[ TQ_BLOCKER_A ] == Status( ctx, expected );
+}
+
+static void Action( Context *ctx )
+{
+ TQEvent enqueue;
+
+ TQSetScheduler(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ SCHEDULER_A_ID,
+ PRIO_VERY_HIGH
+ );
+
+ if ( ctx->owner_caller ) {
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE );
+ } else if ( ctx->owner_other ) {
+ if ( ctx->deadlock ) {
+ TQSend(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_MUTEX_NO_PROTOCOL_OBTAIN
+ );
+ }
+
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_B, TQ_EVENT_ENQUEUE );
+
+ if ( ctx->deadlock ) {
+ TQSend(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_B,
+ TQ_EVENT_MUTEX_NO_PROTOCOL_OBTAIN
+ );
+ }
+ }
+
+ TQSetPriority( &ctx->tq_ctx->base, TQ_BLOCKER_A, ctx->priority_before );
+
+ if ( ctx->tq_ctx->base.deadlock == TQ_DEADLOCK_FATAL ) {
+ enqueue = TQ_EVENT_ENQUEUE_FATAL;
+ } else {
+ enqueue = TQ_EVENT_ENQUEUE;
+ }
+
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_A, enqueue );
+ ctx->owner_after = TQGetOwner( &ctx->tq_ctx->base );
+ ctx->priority_after = TQGetPriority( &ctx->tq_ctx->base, TQ_BLOCKER_A );
+
+ if ( ctx->owner_caller ) {
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_A, TQ_EVENT_SURRENDER );
+ } else if ( ctx->owner_other ) {
+ if ( ctx->deadlock ) {
+ TQSend(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_MUTEX_NO_PROTOCOL_RELEASE
+ );
+ }
+
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_B, TQ_EVENT_SURRENDER );
+
+ if ( ctx->deadlock ) {
+ TQSend(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_B,
+ TQ_EVENT_MUTEX_NO_PROTOCOL_RELEASE
+ );
+ }
+ }
+
+ if ( IsEnqueueStatus( ctx, STATUS_SUCCESSFUL ) ) {
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_A, TQ_EVENT_SURRENDER );
+ }
+}
+
+static void ActionSticky( Context *ctx )
+{
+ TQSetScheduler(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ SCHEDULER_B_ID,
+ PRIO_VERY_HIGH
+ );
+
+ if ( ctx->owner_caller ) {
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_ENQUEUE
+ );
+ } else if ( ctx->owner_other ) {
+ if ( ctx->deadlock ) {
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_MUTEX_NO_PROTOCOL_OBTAIN
+ );
+ }
+
+ SetSelfScheduler( SCHEDULER_B_ID, PRIO_ULTRA_HIGH );
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_B,
+ TQ_EVENT_ENQUEUE
+ );
+
+ if ( ctx->deadlock ) {
+ TQSendAndWaitForExecutionStop(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_B,
+ TQ_EVENT_MUTEX_NO_PROTOCOL_OBTAIN
+ );
+ }
+
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH );
+ }
+
+ TQSetPriority( &ctx->tq_ctx->base, TQ_BLOCKER_A, ctx->priority_before );
+ TQClearDone( &ctx->tq_ctx->base, TQ_BLOCKER_A );
+ TQSendAndWaitForExecutionStopOrIntendToBlock(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_ENQUEUE
+ );
+ ctx->owner_after = TQGetOwner( &ctx->tq_ctx->base );
+ ctx->priority_after = TQGetPriority( &ctx->tq_ctx->base, TQ_BLOCKER_A );
+
+ if ( ctx->owner_caller ) {
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_SURRENDER
+ );
+ } else if ( ctx->owner_other ) {
+ if ( ctx->deadlock ) {
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_MUTEX_NO_PROTOCOL_RELEASE
+ );
+ }
+
+ SetSelfScheduler( SCHEDULER_B_ID, PRIO_ULTRA_HIGH );
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_B,
+ TQ_EVENT_SURRENDER
+ );
+
+ if ( ctx->deadlock ) {
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_B,
+ TQ_EVENT_MUTEX_NO_PROTOCOL_RELEASE
+ );
+ }
+
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_NORMAL );
+ }
+
+ TQWaitForDone( &ctx->tq_ctx->base, TQ_BLOCKER_A );
+
+ if ( IsEnqueueStatus( ctx, STATUS_SUCCESSFUL ) ) {
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_SURRENDER
+ );
+ }
+}
+
+static void ScoreMtxReqSeizeWait_Pre_Protocol_Prepare(
+ ScoreMtxReqSeizeWait_Context *ctx,
+ ScoreMtxReqSeizeWait_Pre_Protocol state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeWait_Pre_Protocol_None: {
+ /*
+ * Where the mutex does not use a locking protocol.
+ */
+ if ( ctx->tq_ctx->protocol != TQ_MTX_NO_PROTOCOL ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Protocol_Inherit: {
+ /*
+ * Where the mutex uses the priority inheritance locking protocol.
+ */
+ if ( ctx->tq_ctx->protocol != TQ_MTX_PRIORITY_INHERIT ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Protocol_Ceiling: {
+ /*
+ * Where the mutex uses the priority ceiling locking protocol.
+ */
+ if ( ctx->tq_ctx->protocol != TQ_MTX_PRIORITY_CEILING ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Protocol_MrsP: {
+ /*
+ * Where the mutex uses the MrsP locking protocol.
+ */
+ if ( ctx->tq_ctx->protocol != TQ_MTX_MRSP ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Protocol_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeWait_Pre_Discipline_Prepare(
+ ScoreMtxReqSeizeWait_Context *ctx,
+ ScoreMtxReqSeizeWait_Pre_Discipline state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeWait_Pre_Discipline_FIFO: {
+ /*
+ * Where the thread queue of the mutex uses the FIFO discipline.
+ */
+ if ( ctx->tq_ctx->base.discipline != TQ_FIFO ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Discipline_Priority: {
+ /*
+ * Where the thread queue of the mutex uses the priority discipline.
+ */
+ if ( ctx->tq_ctx->base.discipline != TQ_PRIORITY ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Discipline_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeWait_Pre_DeadlockResult_Prepare(
+ ScoreMtxReqSeizeWait_Context *ctx,
+ ScoreMtxReqSeizeWait_Pre_DeadlockResult state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeWait_Pre_DeadlockResult_Status: {
+ /*
+ * Where a detected deadlock results in a return with a status code.
+ */
+ if ( ctx->tq_ctx->base.deadlock != TQ_DEADLOCK_STATUS ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_DeadlockResult_Fatal: {
+ /*
+ * Where a detected deadlock results in a fatal error.
+ */
+ if ( ctx->tq_ctx->base.deadlock != TQ_DEADLOCK_FATAL ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_DeadlockResult_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeWait_Pre_Recursive_Prepare(
+ ScoreMtxReqSeizeWait_Context *ctx,
+ ScoreMtxReqSeizeWait_Pre_Recursive state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeWait_Pre_Recursive_Allowed: {
+ /*
+ * Where a recursive seize of the mutex is allowed.
+ */
+ if ( ctx->tq_ctx->recursive != TQ_MTX_RECURSIVE_ALLOWED ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Recursive_Deadlock: {
+ /*
+ * Where a recursive seize of the mutex results in a deadlock.
+ */
+ if ( ctx->tq_ctx->recursive != TQ_MTX_RECURSIVE_DEADLOCK ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Recursive_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeWait_Pre_Owner_Prepare(
+ ScoreMtxReqSeizeWait_Context *ctx,
+ ScoreMtxReqSeizeWait_Pre_Owner state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeWait_Pre_Owner_None: {
+ /*
+ * While the mutex has no owner.
+ */
+ /* This is the default */
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Owner_Caller: {
+ /*
+ * While the owner of the mutex is the calling thread.
+ */
+ ctx->owner_caller = true;
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Owner_Other: {
+ /*
+ * While the owner of the mutex is a thread other than the calling
+ * thread.
+ */
+ ctx->owner_other = true;
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Owner_Deadlock: {
+ /*
+ * While the attempt to seize the mutex results in a deadlock.
+ */
+ ctx->owner_other = true;
+ ctx->deadlock = true;
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Owner_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeWait_Pre_Priority_Prepare(
+ ScoreMtxReqSeizeWait_Context *ctx,
+ ScoreMtxReqSeizeWait_Pre_Priority state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeWait_Pre_Priority_High: {
+ /*
+ * While the calling thread has a current priority higher than the
+ * priority ceiling.
+ */
+ ctx->priority_before = ctx->tq_ctx->priority_ceiling - 1;
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Priority_Equal: {
+ /*
+ * While the calling thread has a current priority equal to the priority
+ * ceiling.
+ */
+ ctx->priority_before = ctx->tq_ctx->priority_ceiling;
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Priority_Low: {
+ /*
+ * While the calling thread has a current priority lower than the
+ * priority ceiling.
+ */
+ ctx->priority_before = ctx->tq_ctx->priority_ceiling + 1;
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Pre_Priority_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeWait_Post_Status_Check(
+ ScoreMtxReqSeizeWait_Context *ctx,
+ ScoreMtxReqSeizeWait_Post_Status state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeWait_Post_Status_Ok: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_SUCCESSFUL.
+ */
+ T_true( IsEnqueueStatus( ctx, STATUS_SUCCESSFUL ) );
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Status_MutexCeilingViolated: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_MUTEX_CEILING_VIOLATED.
+ */
+ T_true( IsEnqueueStatus( ctx, STATUS_MUTEX_CEILING_VIOLATED ) );
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Status_DeadlockStatus: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_DEADLOCK.
+ */
+ T_true( IsEnqueueStatus( ctx, STATUS_DEADLOCK ) );
+ ScoreTqReqEnqueueDeadlock_Run( &ctx->tq_ctx->base );
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Status_DeadlockFatal: {
+ /*
+ * The system shall terminate with the INTERNAL_ERROR_CORE fatal source
+ * and the INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK fatal code.
+ */
+ T_eq_int( ctx->tq_ctx->base.status[ TQ_BLOCKER_A ], STATUS_DEADLOCK );
+ ScoreTqReqEnqueueDeadlock_Run( &ctx->tq_ctx->base );
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Status_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeWait_Post_Enqueued_Check(
+ ScoreMtxReqSeizeWait_Context *ctx,
+ ScoreMtxReqSeizeWait_Post_Enqueued state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeWait_Post_Enqueued_No: {
+ /*
+ * The calling thread shall not be enqueued on the thread queue of the
+ * mutex.
+ */
+ /* The test runner would block if the worker is enqueued */
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Enqueued_FIFO: {
+ /*
+ * The calling thread shall be enqueued in FIFO order.
+ */
+ ScoreTqReqEnqueueFifo_Run( &ctx->tq_ctx->base );
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Enqueued_Priority: {
+ /*
+ * The calling thread shall be enqueued in priority order.
+ */
+ ScoreTqReqEnqueuePriority_Run( &ctx->tq_ctx->base );
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Enqueued_PriorityInherit: {
+ /*
+ * The calling thread shall be enqueued in priority order with priority
+ * inheritance.
+ */
+ ScoreTqReqEnqueuePriorityInherit_Run( &ctx->tq_ctx->base );
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Enqueued_PriorityCeiling: {
+ /*
+ * The calling thread shall be enqueued in priority order according to
+ * the priority ceiling locking protocol.
+ */
+ ScoreTqReqEnqueueCeiling_Run( &ctx->tq_ctx->base );
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Enqueued_PriorityMrsP: {
+ /*
+ * The calling thread shall be enqueued in priority order according to
+ * the MrsP locking protocol.
+ */
+ #if defined(RTEMS_SMP)
+ ScoreTqReqEnqueueMrsp_Run( &ctx->tq_ctx->base );
+ #else
+ T_unreachable();
+ #endif
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Enqueued_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeWait_Post_Owner_Check(
+ ScoreMtxReqSeizeWait_Context *ctx,
+ ScoreMtxReqSeizeWait_Post_Owner state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeWait_Post_Owner_Other: {
+ /*
+ * The owner of the mutex shall not be modified.
+ */
+ T_eq_ptr(
+ ctx->owner_after,
+ ctx->tq_ctx->base.worker_tcb[ TQ_BLOCKER_B ]
+ );
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Owner_Caller: {
+ /*
+ * The owner of the mutex shall be the calling thread.
+ */
+ T_eq_ptr(
+ ctx->owner_after,
+ ctx->tq_ctx->base.worker_tcb[ TQ_BLOCKER_A ]
+ );
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Owner_None: {
+ /*
+ * The mutex shall have no owner.
+ */
+ T_null( ctx->owner_after );
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Owner_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeWait_Post_Priority_Check(
+ ScoreMtxReqSeizeWait_Context *ctx,
+ ScoreMtxReqSeizeWait_Post_Priority state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSeizeWait_Post_Priority_Nop: {
+ /*
+ * The priorities of the calling thread shall not be modified.
+ */
+ T_eq_u32( ctx->priority_after, ctx->priority_before );
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Priority_Ceiling: {
+ /*
+ * The calling thread shall use the priority ceiling of the mutex.
+ */
+ T_eq_u32( ctx->priority_after, ctx->tq_ctx->priority_ceiling );
+ break;
+ }
+
+ case ScoreMtxReqSeizeWait_Post_Priority_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSeizeWait_Prepare( ScoreMtxReqSeizeWait_Context *ctx )
+{
+ ctx->owner_caller = false;
+ ctx->owner_other = false;
+ ctx->deadlock = false;
+ ctx->priority_before = PRIO_VERY_HIGH;
+}
+
+static void ScoreMtxReqSeizeWait_Action( ScoreMtxReqSeizeWait_Context *ctx )
+{
+ TQSetScheduler(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_B,
+ SCHEDULER_A_ID,
+ PRIO_VERY_HIGH
+ );
+
+ if ( ctx->tq_ctx->base.enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ ActionSticky( ctx );
+ } else {
+ Action( ctx );
+ }
+}
+
+static const ScoreMtxReqSeizeWait_Entry
+ScoreMtxReqSeizeWait_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeWait_Post_Status_NA,
+ ScoreMtxReqSeizeWait_Post_Enqueued_NA, ScoreMtxReqSeizeWait_Post_Owner_NA,
+ ScoreMtxReqSeizeWait_Post_Priority_NA },
+ { 0, 0, 0, 0, 0, 0, 1, ScoreMtxReqSeizeWait_Post_Status_Ok,
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Owner_Caller,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 1, ScoreMtxReqSeizeWait_Post_Status_DeadlockStatus,
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Owner_Other,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 1, ScoreMtxReqSeizeWait_Post_Status_DeadlockFatal,
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Owner_Other,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeWait_Post_Status_Ok,
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Owner_Caller,
+ ScoreMtxReqSeizeWait_Post_Priority_Ceiling },
+ { 0, 0, 0, 0, 0, 0, 1, ScoreMtxReqSeizeWait_Post_Status_NA,
+ ScoreMtxReqSeizeWait_Post_Enqueued_FIFO,
+ ScoreMtxReqSeizeWait_Post_Owner_Other,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 1, ScoreMtxReqSeizeWait_Post_Status_NA,
+ ScoreMtxReqSeizeWait_Post_Enqueued_Priority,
+ ScoreMtxReqSeizeWait_Post_Owner_Other,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 1, ScoreMtxReqSeizeWait_Post_Status_NA,
+ ScoreMtxReqSeizeWait_Post_Enqueued_PriorityInherit,
+ ScoreMtxReqSeizeWait_Post_Owner_Other,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeWait_Post_Status_NA,
+ ScoreMtxReqSeizeWait_Post_Enqueued_PriorityCeiling,
+ ScoreMtxReqSeizeWait_Post_Owner_Other,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeWait_Post_Status_DeadlockStatus,
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Owner_Other,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeWait_Post_Status_DeadlockFatal,
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Owner_Other,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 1, ScoreMtxReqSeizeWait_Post_Status_DeadlockStatus,
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Owner_Caller,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 1, ScoreMtxReqSeizeWait_Post_Status_DeadlockFatal,
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Owner_Caller,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeWait_Post_Status_MutexCeilingViolated,
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Owner_None,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeWait_Post_Status_Ok,
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Owner_Caller,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 1, 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeWait_Post_Status_NA,
+ ScoreMtxReqSeizeWait_Post_Enqueued_NA, ScoreMtxReqSeizeWait_Post_Owner_NA,
+ ScoreMtxReqSeizeWait_Post_Priority_NA },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeWait_Post_Status_MutexCeilingViolated,
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Owner_Other,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeWait_Post_Status_NA,
+ ScoreMtxReqSeizeWait_Post_Enqueued_PriorityMrsP,
+ ScoreMtxReqSeizeWait_Post_Owner_Other,
+ ScoreMtxReqSeizeWait_Post_Priority_Ceiling },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeWait_Post_Status_DeadlockStatus,
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Owner_Caller,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSeizeWait_Post_Status_DeadlockFatal,
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Owner_Caller,
+ ScoreMtxReqSeizeWait_Post_Priority_Nop }
+};
+
+static const uint8_t
+ScoreMtxReqSeizeWait_Map[] = {
+ 1, 1, 1, 1, 1, 1, 5, 5, 5, 2, 2, 2, 1, 1, 1, 11, 11, 11, 5, 5, 5, 2, 2, 2, 1,
+ 1, 1, 1, 1, 1, 5, 5, 5, 3, 3, 3, 1, 1, 1, 12, 12, 12, 5, 5, 5, 3, 3, 3, 1, 1,
+ 1, 1, 1, 1, 6, 6, 6, 2, 2, 2, 1, 1, 1, 11, 11, 11, 6, 6, 6, 2, 2, 2, 1, 1, 1,
+ 1, 1, 1, 6, 6, 6, 3, 3, 3, 1, 1, 1, 12, 12, 12, 6, 6, 6, 3, 3, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 7, 7,
+ 7, 2, 2, 2, 1, 1, 1, 11, 11, 11, 7, 7, 7, 2, 2, 2, 1, 1, 1, 1, 1, 1, 7, 7, 7,
+ 3, 3, 3, 1, 1, 1, 12, 12, 12, 7, 7, 7, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 4, 4, 14, 14, 15, 8, 8, 8, 9, 9, 9,
+ 13, 4, 4, 18, 18, 15, 8, 8, 8, 9, 9, 9, 13, 4, 4, 14, 14, 15, 8, 8, 8, 10,
+ 10, 10, 13, 4, 4, 19, 19, 15, 8, 8, 8, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 4, 4, 14, 14, 15, 16, 17, 17, 16,
+ 9, 9, 13, 4, 4, 18, 18, 15, 16, 17, 17, 16, 9, 9, 13, 4, 4, 14, 14, 15, 16,
+ 17, 17, 16, 10, 10, 13, 4, 4, 19, 19, 15, 16, 17, 17, 16, 10, 10
+};
+
+static size_t ScoreMtxReqSeizeWait_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreMtxReqSeizeWait_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( ScoreMtxReqSeizeWait_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreMtxReqSeizeWait_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = ScoreMtxReqSeizeWait_Scope,
+ .initial_context = &ScoreMtxReqSeizeWait_Instance
+};
+
+static const uint8_t ScoreMtxReqSeizeWait_Weights[] = {
+ 96, 48, 24, 12, 3, 1
+};
+
+static void ScoreMtxReqSeizeWait_Skip(
+ ScoreMtxReqSeizeWait_Context *ctx,
+ size_t index
+)
+{
+ switch ( index + 1 ) {
+ case 1:
+ ctx->Map.pci[ 1 ] = ScoreMtxReqSeizeWait_Pre_Discipline_NA - 1;
+ /* Fall through */
+ case 2:
+ ctx->Map.pci[ 2 ] = ScoreMtxReqSeizeWait_Pre_DeadlockResult_NA - 1;
+ /* Fall through */
+ case 3:
+ ctx->Map.pci[ 3 ] = ScoreMtxReqSeizeWait_Pre_Recursive_NA - 1;
+ /* Fall through */
+ case 4:
+ ctx->Map.pci[ 4 ] = ScoreMtxReqSeizeWait_Pre_Owner_NA - 1;
+ /* Fall through */
+ case 5:
+ ctx->Map.pci[ 5 ] = ScoreMtxReqSeizeWait_Pre_Priority_NA - 1;
+ break;
+ }
+}
+
+static inline ScoreMtxReqSeizeWait_Entry ScoreMtxReqSeizeWait_PopEntry(
+ ScoreMtxReqSeizeWait_Context *ctx
+)
+{
+ size_t index;
+
+ if ( ctx->Map.skip ) {
+ size_t i;
+
+ ctx->Map.skip = false;
+ index = 0;
+
+ for ( i = 0; i < 6; ++i ) {
+ index += ScoreMtxReqSeizeWait_Weights[ i ] * ctx->Map.pci[ i ];
+ }
+ } else {
+ index = ctx->Map.index;
+ }
+
+ ctx->Map.index = index + 1;
+
+ return ScoreMtxReqSeizeWait_Entries[
+ ScoreMtxReqSeizeWait_Map[ index ]
+ ];
+}
+
+static void ScoreMtxReqSeizeWait_SetPreConditionStates(
+ ScoreMtxReqSeizeWait_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+
+ if ( ctx->Map.entry.Pre_Priority_NA ) {
+ ctx->Map.pcs[ 5 ] = ScoreMtxReqSeizeWait_Pre_Priority_NA;
+ } else {
+ ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
+ }
+}
+
+static void ScoreMtxReqSeizeWait_TestVariant(
+ ScoreMtxReqSeizeWait_Context *ctx
+)
+{
+ ScoreMtxReqSeizeWait_Pre_Protocol_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreMtxReqSeizeWait_Skip( ctx, 0 );
+ return;
+ }
+
+ ScoreMtxReqSeizeWait_Pre_Discipline_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreMtxReqSeizeWait_Skip( ctx, 1 );
+ return;
+ }
+
+ ScoreMtxReqSeizeWait_Pre_DeadlockResult_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreMtxReqSeizeWait_Skip( ctx, 2 );
+ return;
+ }
+
+ ScoreMtxReqSeizeWait_Pre_Recursive_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreMtxReqSeizeWait_Skip( ctx, 3 );
+ return;
+ }
+
+ ScoreMtxReqSeizeWait_Pre_Owner_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ ScoreMtxReqSeizeWait_Pre_Priority_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ ScoreMtxReqSeizeWait_Action( ctx );
+ ScoreMtxReqSeizeWait_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ ScoreMtxReqSeizeWait_Post_Enqueued_Check(
+ ctx,
+ ctx->Map.entry.Post_Enqueued
+ );
+ ScoreMtxReqSeizeWait_Post_Owner_Check( ctx, ctx->Map.entry.Post_Owner );
+ ScoreMtxReqSeizeWait_Post_Priority_Check(
+ ctx,
+ ctx->Map.entry.Post_Priority
+ );
+}
+
+static T_fixture_node ScoreMtxReqSeizeWait_Node;
+
+static T_remark ScoreMtxReqSeizeWait_Remark = {
+ .next = NULL,
+ .remark = "ScoreMtxReqSeizeWait"
+};
+
+void ScoreMtxReqSeizeWait_Run( TQMtxContext *tq_ctx )
+{
+ ScoreMtxReqSeizeWait_Context *ctx;
+
+ ctx = &ScoreMtxReqSeizeWait_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreMtxReqSeizeWait_Node,
+ &ScoreMtxReqSeizeWait_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+ ctx->Map.skip = false;
+
+ for (
+ ctx->Map.pci[ 0 ] = ScoreMtxReqSeizeWait_Pre_Protocol_None;
+ ctx->Map.pci[ 0 ] < ScoreMtxReqSeizeWait_Pre_Protocol_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = ScoreMtxReqSeizeWait_Pre_Discipline_FIFO;
+ ctx->Map.pci[ 1 ] < ScoreMtxReqSeizeWait_Pre_Discipline_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = ScoreMtxReqSeizeWait_Pre_DeadlockResult_Status;
+ ctx->Map.pci[ 2 ] < ScoreMtxReqSeizeWait_Pre_DeadlockResult_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = ScoreMtxReqSeizeWait_Pre_Recursive_Allowed;
+ ctx->Map.pci[ 3 ] < ScoreMtxReqSeizeWait_Pre_Recursive_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = ScoreMtxReqSeizeWait_Pre_Owner_None;
+ ctx->Map.pci[ 4 ] < ScoreMtxReqSeizeWait_Pre_Owner_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ for (
+ ctx->Map.pci[ 5 ] = ScoreMtxReqSeizeWait_Pre_Priority_High;
+ ctx->Map.pci[ 5 ] < ScoreMtxReqSeizeWait_Pre_Priority_NA;
+ ++ctx->Map.pci[ 5 ]
+ ) {
+ ctx->Map.entry = ScoreMtxReqSeizeWait_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ ScoreMtxReqSeizeWait_SetPreConditionStates( ctx );
+ ScoreMtxReqSeizeWait_Prepare( ctx );
+ ScoreMtxReqSeizeWait_TestVariant( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ T_add_remark( &ScoreMtxReqSeizeWait_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-mtx-seize-wait.h b/testsuites/validation/tr-mtx-seize-wait.h
new file mode 100644
index 0000000000..0d3beeb97b
--- /dev/null
+++ b/testsuites/validation/tr-mtx-seize-wait.h
@@ -0,0 +1,151 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreMtxReqSeizeWait
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_MTX_SEIZE_WAIT_H
+#define _TR_MTX_SEIZE_WAIT_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreMtxReqSeizeWait
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreMtxReqSeizeWait_Pre_Protocol_None,
+ ScoreMtxReqSeizeWait_Pre_Protocol_Inherit,
+ ScoreMtxReqSeizeWait_Pre_Protocol_Ceiling,
+ ScoreMtxReqSeizeWait_Pre_Protocol_MrsP,
+ ScoreMtxReqSeizeWait_Pre_Protocol_NA
+} ScoreMtxReqSeizeWait_Pre_Protocol;
+
+typedef enum {
+ ScoreMtxReqSeizeWait_Pre_Discipline_FIFO,
+ ScoreMtxReqSeizeWait_Pre_Discipline_Priority,
+ ScoreMtxReqSeizeWait_Pre_Discipline_NA
+} ScoreMtxReqSeizeWait_Pre_Discipline;
+
+typedef enum {
+ ScoreMtxReqSeizeWait_Pre_DeadlockResult_Status,
+ ScoreMtxReqSeizeWait_Pre_DeadlockResult_Fatal,
+ ScoreMtxReqSeizeWait_Pre_DeadlockResult_NA
+} ScoreMtxReqSeizeWait_Pre_DeadlockResult;
+
+typedef enum {
+ ScoreMtxReqSeizeWait_Pre_Recursive_Allowed,
+ ScoreMtxReqSeizeWait_Pre_Recursive_Deadlock,
+ ScoreMtxReqSeizeWait_Pre_Recursive_NA
+} ScoreMtxReqSeizeWait_Pre_Recursive;
+
+typedef enum {
+ ScoreMtxReqSeizeWait_Pre_Owner_None,
+ ScoreMtxReqSeizeWait_Pre_Owner_Caller,
+ ScoreMtxReqSeizeWait_Pre_Owner_Other,
+ ScoreMtxReqSeizeWait_Pre_Owner_Deadlock,
+ ScoreMtxReqSeizeWait_Pre_Owner_NA
+} ScoreMtxReqSeizeWait_Pre_Owner;
+
+typedef enum {
+ ScoreMtxReqSeizeWait_Pre_Priority_High,
+ ScoreMtxReqSeizeWait_Pre_Priority_Equal,
+ ScoreMtxReqSeizeWait_Pre_Priority_Low,
+ ScoreMtxReqSeizeWait_Pre_Priority_NA
+} ScoreMtxReqSeizeWait_Pre_Priority;
+
+typedef enum {
+ ScoreMtxReqSeizeWait_Post_Status_Ok,
+ ScoreMtxReqSeizeWait_Post_Status_MutexCeilingViolated,
+ ScoreMtxReqSeizeWait_Post_Status_DeadlockStatus,
+ ScoreMtxReqSeizeWait_Post_Status_DeadlockFatal,
+ ScoreMtxReqSeizeWait_Post_Status_NA
+} ScoreMtxReqSeizeWait_Post_Status;
+
+typedef enum {
+ ScoreMtxReqSeizeWait_Post_Enqueued_No,
+ ScoreMtxReqSeizeWait_Post_Enqueued_FIFO,
+ ScoreMtxReqSeizeWait_Post_Enqueued_Priority,
+ ScoreMtxReqSeizeWait_Post_Enqueued_PriorityInherit,
+ ScoreMtxReqSeizeWait_Post_Enqueued_PriorityCeiling,
+ ScoreMtxReqSeizeWait_Post_Enqueued_PriorityMrsP,
+ ScoreMtxReqSeizeWait_Post_Enqueued_NA
+} ScoreMtxReqSeizeWait_Post_Enqueued;
+
+typedef enum {
+ ScoreMtxReqSeizeWait_Post_Owner_Other,
+ ScoreMtxReqSeizeWait_Post_Owner_Caller,
+ ScoreMtxReqSeizeWait_Post_Owner_None,
+ ScoreMtxReqSeizeWait_Post_Owner_NA
+} ScoreMtxReqSeizeWait_Post_Owner;
+
+typedef enum {
+ ScoreMtxReqSeizeWait_Post_Priority_Nop,
+ ScoreMtxReqSeizeWait_Post_Priority_Ceiling,
+ ScoreMtxReqSeizeWait_Post_Priority_NA
+} ScoreMtxReqSeizeWait_Post_Priority;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue context.
+ */
+void ScoreMtxReqSeizeWait_Run( TQMtxContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_MTX_SEIZE_WAIT_H */
diff --git a/testsuites/validation/tr-mtx-surrender.c b/testsuites/validation/tr-mtx-surrender.c
new file mode 100644
index 0000000000..3c60726803
--- /dev/null
+++ b/testsuites/validation/tr-mtx-surrender.c
@@ -0,0 +1,1246 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreMtxReqSurrender
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-mtx-surrender.h"
+#include "tr-tq-surrender-priority-inherit.h"
+#include "tr-tq-surrender.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreMtxReqSurrender spec:/score/mtx/req/surrender
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Protocol_NA : 1;
+ uint32_t Pre_Discipline_NA : 1;
+ uint32_t Pre_Recursive_NA : 1;
+ uint32_t Pre_OwnerCheck_NA : 1;
+ uint32_t Pre_Owner_NA : 1;
+ uint32_t Pre_Nested_NA : 1;
+ uint32_t Pre_Blocked_NA : 1;
+ uint32_t Pre_Priority_NA : 1;
+ uint32_t Post_Status : 2;
+ uint32_t Post_Owner : 3;
+ uint32_t Post_Surrender : 3;
+ uint32_t Post_Priority : 2;
+} ScoreMtxReqSurrender_Entry;
+
+/**
+ * @brief Test context for spec:/score/mtx/req/surrender test case.
+ */
+typedef struct {
+ /**
+ * @brief If this member is true, then the calling thread shall be the owner
+ * of the mutex.
+ */
+ bool owner_caller;
+
+ /**
+ * @brief If this member is true, then a thread other than the calling thread
+ * shall be the owner of the mutex.
+ */
+ bool owner_other;
+
+ /**
+ * @brief If this member is true, then the calling thread shall have seized
+ * the mutex recursively.
+ */
+ bool nested;
+
+ /**
+ * @brief If this member is true, then there shall be a thread blocked
+ * waiting for the mutex.
+ */
+ bool blocked;
+
+ /**
+ * @brief This member contains the real priority of the calling thread.
+ */
+ rtems_task_priority priority_real;
+
+ /**
+ * @brief This member contains the current priority of the calling thread
+ * before the directive call.
+ */
+ rtems_task_priority priority_before;
+
+ /**
+ * @brief This member contains the return status of the directive call.
+ */
+ Status_Control status;
+
+ /**
+ * @brief This member contains the owner of the mutex after the directive
+ * call.
+ */
+ const rtems_tcb *owner_after;
+
+ /**
+ * @brief This member contains the current priority of the calling thread
+ * after the directive call.
+ */
+ rtems_task_priority priority_after;
+
+ /**
+ * @brief This member contains the counter snapshot after the directive call.
+ */
+ uint32_t counter;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreMtxReqSurrender_Run() parameter.
+ */
+ TQMtxContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 8 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 8 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreMtxReqSurrender_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreMtxReqSurrender_Context;
+
+static ScoreMtxReqSurrender_Context
+ ScoreMtxReqSurrender_Instance;
+
+static const char * const ScoreMtxReqSurrender_PreDesc_Protocol[] = {
+ "None",
+ "Inherit",
+ "Ceiling",
+ "MrsP",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSurrender_PreDesc_Discipline[] = {
+ "FIFO",
+ "Priority",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSurrender_PreDesc_Recursive[] = {
+ "Allowed",
+ "NotAllowed",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSurrender_PreDesc_OwnerCheck[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSurrender_PreDesc_Owner[] = {
+ "None",
+ "Caller",
+ "Other",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSurrender_PreDesc_Nested[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSurrender_PreDesc_Blocked[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const ScoreMtxReqSurrender_PreDesc_Priority[] = {
+ "High",
+ "Equal",
+ "Low",
+ "NA"
+};
+
+static const char * const * const ScoreMtxReqSurrender_PreDesc[] = {
+ ScoreMtxReqSurrender_PreDesc_Protocol,
+ ScoreMtxReqSurrender_PreDesc_Discipline,
+ ScoreMtxReqSurrender_PreDesc_Recursive,
+ ScoreMtxReqSurrender_PreDesc_OwnerCheck,
+ ScoreMtxReqSurrender_PreDesc_Owner,
+ ScoreMtxReqSurrender_PreDesc_Nested,
+ ScoreMtxReqSurrender_PreDesc_Blocked,
+ ScoreMtxReqSurrender_PreDesc_Priority,
+ NULL
+};
+
+#if defined(RTEMS_SMP)
+#include "tr-tq-surrender-mrsp.h"
+#endif
+
+typedef ScoreMtxReqSurrender_Context Context;
+
+static Status_Control Status( const Context *ctx, Status_Control status )
+{
+ return TQConvertStatus( &ctx->tq_ctx->base, status );
+}
+
+static void Action( Context *ctx )
+{
+ Status_Control status;
+
+ TQSetScheduler(
+ &ctx->tq_ctx->base,
+ TQ_HELPER_A,
+ SCHEDULER_A_ID,
+ PRIO_VERY_HIGH
+ );
+ TQSetScheduler(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ SCHEDULER_A_ID,
+ PRIO_VERY_HIGH
+ );
+
+ if ( ctx->owner_caller ) {
+ status = TQEnqueue( &ctx->tq_ctx->base, TQ_NO_WAIT );
+ T_eq_int( status, Status( ctx, STATUS_SUCCESSFUL ) );
+ } else if ( ctx->owner_other ) {
+ TQSend( &ctx->tq_ctx->base, TQ_HELPER_A, TQ_EVENT_ENQUEUE );
+ }
+
+ if ( ctx->nested ) {
+ status = TQEnqueue( &ctx->tq_ctx->base, TQ_NO_WAIT );
+ T_eq_int( status, Status( ctx, STATUS_SUCCESSFUL ) );
+ }
+
+ if ( ctx->blocked ) {
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE );
+ Yield();
+ }
+
+ TQResetCounter( &ctx->tq_ctx->base );
+ SetSelfPriority( ctx->priority_real );
+ ctx->priority_before = GetSelfPriority();
+ TQSchedulerRecordStart( &ctx->tq_ctx->base );
+ ctx->status = TQSurrender( &ctx->tq_ctx->base );
+ TQSchedulerRecordStop( &ctx->tq_ctx->base );
+ ctx->owner_after = TQGetOwner( &ctx->tq_ctx->base );
+ ctx->priority_after = GetSelfPriority();
+ SetSelfPriority( PRIO_NORMAL );
+ Yield();
+ ctx->counter = TQGetCounter( &ctx->tq_ctx->base );
+
+ if ( ctx->nested ) {
+ status = TQSurrender( &ctx->tq_ctx->base );
+ T_eq_int( status, Status( ctx, STATUS_SUCCESSFUL ) );
+ }
+
+ if ( ctx->owner_other ) {
+ TQSend( &ctx->tq_ctx->base, TQ_HELPER_A, TQ_EVENT_SURRENDER );
+ }
+
+ if ( ctx->blocked ) {
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_A, TQ_EVENT_SURRENDER );
+ }
+}
+
+static void ActionSticky( Context *ctx )
+{
+ Status_Control status;
+
+ TQSetScheduler(
+ &ctx->tq_ctx->base,
+ TQ_HELPER_A,
+ SCHEDULER_A_ID,
+ PRIO_VERY_HIGH
+ );
+ TQSetScheduler(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ SCHEDULER_B_ID,
+ PRIO_VERY_HIGH
+ );
+
+ if ( ctx->owner_caller ) {
+ status = TQEnqueue( &ctx->tq_ctx->base, TQ_NO_WAIT );
+ T_eq_int( status, Status( ctx, STATUS_SUCCESSFUL ) );
+ } else if ( ctx->owner_other ) {
+ SetSelfScheduler( SCHEDULER_B_ID, PRIO_ULTRA_HIGH );
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_HELPER_A,
+ TQ_EVENT_ENQUEUE
+ );
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH );
+ }
+
+ if ( ctx->nested ) {
+ status = TQEnqueue( &ctx->tq_ctx->base, TQ_NO_WAIT );
+ T_eq_int( status, Status( ctx, STATUS_SUCCESSFUL ) );
+ }
+
+ if ( ctx->blocked ) {
+ TQSendAndWaitForIntendToBlock(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_ENQUEUE
+ );
+ }
+
+ TQResetCounter( &ctx->tq_ctx->base );
+ SetSelfPriority( ctx->priority_real );
+ ctx->priority_before = GetSelfPriority();
+ TQSchedulerRecordStart( &ctx->tq_ctx->base );
+ ctx->status = TQSurrender( &ctx->tq_ctx->base );
+ TQSchedulerRecordStop( &ctx->tq_ctx->base );
+ ctx->owner_after = TQGetOwner( &ctx->tq_ctx->base );
+ ctx->priority_after = GetSelfPriority();
+
+ if ( ctx->status == Status( ctx, STATUS_SUCCESSFUL ) ) {
+ TQWaitForExecutionStop( &ctx->tq_ctx->base, TQ_BLOCKER_A );
+ }
+
+ ctx->counter = TQGetCounter( &ctx->tq_ctx->base );
+
+ if ( ctx->nested ) {
+ status = TQSurrender( &ctx->tq_ctx->base );
+ T_eq_int( status, Status( ctx, STATUS_SUCCESSFUL ) );
+ }
+
+ if ( ctx->owner_other ) {
+ SetSelfScheduler( SCHEDULER_B_ID, PRIO_ULTRA_HIGH );
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_HELPER_A,
+ TQ_EVENT_SURRENDER
+ );
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_NORMAL );
+ } else {
+ SetSelfPriority( PRIO_NORMAL );
+ }
+
+ if ( ctx->blocked ) {
+ TQSendAndSynchronizeRunner(
+ &ctx->tq_ctx->base,
+ TQ_BLOCKER_A,
+ TQ_EVENT_SURRENDER
+ );
+ }
+}
+
+static void ScoreMtxReqSurrender_Pre_Protocol_Prepare(
+ ScoreMtxReqSurrender_Context *ctx,
+ ScoreMtxReqSurrender_Pre_Protocol state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSurrender_Pre_Protocol_None: {
+ /*
+ * Where the mutex does not use a locking protocol.
+ */
+ if ( ctx->tq_ctx->protocol != TQ_MTX_NO_PROTOCOL ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Protocol_Inherit: {
+ /*
+ * Where the mutex uses the priority inheritance locking protocol.
+ */
+ if ( ctx->tq_ctx->protocol != TQ_MTX_PRIORITY_INHERIT ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Protocol_Ceiling: {
+ /*
+ * Where the mutex uses the priority ceiling locking protocol.
+ */
+ if ( ctx->tq_ctx->protocol != TQ_MTX_PRIORITY_CEILING ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Protocol_MrsP: {
+ /*
+ * Where the mutex uses the MrsP locking protocol.
+ */
+ if ( ctx->tq_ctx->protocol != TQ_MTX_MRSP ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Protocol_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSurrender_Pre_Discipline_Prepare(
+ ScoreMtxReqSurrender_Context *ctx,
+ ScoreMtxReqSurrender_Pre_Discipline state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSurrender_Pre_Discipline_FIFO: {
+ /*
+ * Where the thread queue of the mutex uses the FIFO discipline.
+ */
+ if ( ctx->tq_ctx->base.discipline != TQ_FIFO ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Discipline_Priority: {
+ /*
+ * Where the thread queue of the mutex uses the priority discipline.
+ */
+ if ( ctx->tq_ctx->base.discipline != TQ_PRIORITY ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Discipline_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSurrender_Pre_Recursive_Prepare(
+ ScoreMtxReqSurrender_Context *ctx,
+ ScoreMtxReqSurrender_Pre_Recursive state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSurrender_Pre_Recursive_Allowed: {
+ /*
+ * Where a recursive seize of the mutex is allowed.
+ */
+ if ( ctx->tq_ctx->recursive != TQ_MTX_RECURSIVE_ALLOWED ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Recursive_NotAllowed: {
+ /*
+ * Where a recursive seize of the mutex is not allowed.
+ */
+ if ( ctx->tq_ctx->recursive == TQ_MTX_RECURSIVE_ALLOWED ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Recursive_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSurrender_Pre_OwnerCheck_Prepare(
+ ScoreMtxReqSurrender_Context *ctx,
+ ScoreMtxReqSurrender_Pre_OwnerCheck state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSurrender_Pre_OwnerCheck_Yes: {
+ /*
+ * Where the surrender checks that the mutex owner is the calling thread.
+ */
+ if ( ctx->tq_ctx->owner_check != TQ_MTX_CHECKS_OWNER ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_OwnerCheck_No: {
+ /*
+ * Where the surrender does not check that the mutex owner is the calling
+ * thread.
+ */
+ if ( ctx->tq_ctx->owner_check != TQ_MTX_NO_OWNER_CHECK ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_OwnerCheck_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSurrender_Pre_Owner_Prepare(
+ ScoreMtxReqSurrender_Context *ctx,
+ ScoreMtxReqSurrender_Pre_Owner state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSurrender_Pre_Owner_None: {
+ /*
+ * While the mutex has no owner.
+ */
+ ctx->owner_caller = false;
+ ctx->owner_other = false;
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Owner_Caller: {
+ /*
+ * While the owner of the mutex is the calling thread.
+ */
+ ctx->owner_caller = true;
+ ctx->owner_other = false;
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Owner_Other: {
+ /*
+ * While the owner of the mutex is a thread other than the calling
+ * thread.
+ */
+ ctx->owner_caller = false;
+ ctx->owner_other = true;
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Owner_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSurrender_Pre_Nested_Prepare(
+ ScoreMtxReqSurrender_Context *ctx,
+ ScoreMtxReqSurrender_Pre_Nested state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSurrender_Pre_Nested_Yes: {
+ /*
+ * While calling thread seized the mutex recursively.
+ */
+ ctx->nested = true;
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Nested_No: {
+ /*
+ * While calling thread seized the mutex not recursively.
+ */
+ ctx->nested = false;
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Nested_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSurrender_Pre_Blocked_Prepare(
+ ScoreMtxReqSurrender_Context *ctx,
+ ScoreMtxReqSurrender_Pre_Blocked state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSurrender_Pre_Blocked_Yes: {
+ /*
+ * While the mutex has threads blocked on the mutex.
+ */
+ ctx->blocked = true;
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Blocked_No: {
+ /*
+ * While no threads are blocked on the mutex.
+ */
+ ctx->blocked = false;
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Blocked_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSurrender_Pre_Priority_Prepare(
+ ScoreMtxReqSurrender_Context *ctx,
+ ScoreMtxReqSurrender_Pre_Priority state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSurrender_Pre_Priority_High: {
+ /*
+ * While the current priority of the calling thread without the
+ * priorities available through the mutex would be higher than the
+ * highest priority of the priorities available through the mutex.
+ */
+ ctx->priority_real = PRIO_ULTRA_HIGH;
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Priority_Equal: {
+ /*
+ * While the current priority of the calling thread without the
+ * priorities available through the mutex would be equal to the highest
+ * priority of the priorities available through the mutex.
+ */
+ ctx->priority_real = PRIO_VERY_HIGH;
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Priority_Low: {
+ /*
+ * While the current priority of the calling thread without the
+ * priorities available through the mutex would be lower than the highest
+ * priority of the priorities available through the mutex.
+ */
+ ctx->priority_real = PRIO_HIGH;
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Pre_Priority_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSurrender_Post_Status_Check(
+ ScoreMtxReqSurrender_Context *ctx,
+ ScoreMtxReqSurrender_Post_Status state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSurrender_Post_Status_Ok: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_SUCCESSFUL.
+ */
+ T_eq_int( ctx->status, Status( ctx, STATUS_SUCCESSFUL ) );
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Post_Status_NotOwner: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_NOT_OWNER.
+ */
+ T_eq_int( ctx->status, Status( ctx, STATUS_NOT_OWNER ) );
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Post_Status_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSurrender_Post_Owner_Check(
+ ScoreMtxReqSurrender_Context *ctx,
+ ScoreMtxReqSurrender_Post_Owner state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSurrender_Post_Owner_None: {
+ /*
+ * The mutex shall have no owner.
+ */
+ T_null( ctx->owner_after );
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Post_Owner_Caller: {
+ /*
+ * The owner of the mutex shall be the calling thread.
+ */
+ T_eq_ptr(
+ ctx->owner_after,
+ ctx->tq_ctx->base.runner_tcb
+ );
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Post_Owner_Other: {
+ /*
+ * The owner of the mutex shall not be modified.
+ */
+ T_eq_ptr(
+ ctx->owner_after,
+ ctx->tq_ctx->base.worker_tcb[ TQ_HELPER_A ]
+ );
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Post_Owner_First: {
+ /*
+ * The owner of the mutex shall be dequeued thread.
+ */
+ T_eq_ptr(
+ ctx->owner_after,
+ ctx->tq_ctx->base.worker_tcb[ TQ_BLOCKER_A ]
+ );
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Post_Owner_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSurrender_Post_Surrender_Check(
+ ScoreMtxReqSurrender_Context *ctx,
+ ScoreMtxReqSurrender_Post_Surrender state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSurrender_Post_Surrender_Nop: {
+ /*
+ * The thread queue of the mutex shall not be surrendered to a thread.
+ */
+ T_eq_u32( ctx->counter, 0 );
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Post_Surrender_FIFO: {
+ /*
+ * The thread queue of the mutex shall be surrendered in FIFO order.
+ */
+ T_eq_u32( ctx->counter, 1 );
+ ScoreTqReqSurrender_Run( &ctx->tq_ctx->base );
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Post_Surrender_Priority: {
+ /*
+ * The thread queue of the mutex shall be surrendered in priority order.
+ */
+ T_eq_u32( ctx->counter, 1 );
+ ScoreTqReqSurrender_Run( &ctx->tq_ctx->base );
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Post_Surrender_PriorityInherit: {
+ /*
+ * The thread queue of the mutex shall be surrendered in priority order
+ * with priority inheritance.
+ */
+ T_eq_u32( ctx->counter, 1 );
+ ScoreTqReqSurrenderPriorityInherit_Run( &ctx->tq_ctx->base );
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Post_Surrender_MrsP: {
+ /*
+ * The thread queue of the mutex shall be surrendered in priority order
+ * with MrsP.
+ */
+ #if defined(RTEMS_SMP)
+ T_eq_u32( ctx->counter, 1 );
+ ScoreTqReqSurrenderMrsp_Run( &ctx->tq_ctx->base );
+ #else
+ T_unreachable();
+ #endif
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Post_Surrender_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSurrender_Post_Priority_Check(
+ ScoreMtxReqSurrender_Context *ctx,
+ ScoreMtxReqSurrender_Post_Priority state
+)
+{
+ switch ( state ) {
+ case ScoreMtxReqSurrender_Post_Priority_Nop: {
+ /*
+ * The current priority of the calling thread shall be not be modified.
+ */
+ T_eq_u32( ctx->priority_after, ctx->priority_before );
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Post_Priority_Low: {
+ /*
+ * The current priority of the calling thread shall be lowered to reflect
+ * the removal of the priorities available through the mutex.
+ */
+ T_eq_u32( ctx->priority_after, ctx->priority_real );
+ break;
+ }
+
+ case ScoreMtxReqSurrender_Post_Priority_NA:
+ break;
+ }
+}
+
+static void ScoreMtxReqSurrender_Prepare( ScoreMtxReqSurrender_Context *ctx )
+{
+ ctx->owner_caller = false;
+ ctx->owner_other = false;
+ ctx->nested = false;
+ ctx->blocked = false;
+
+ if ( ctx->tq_ctx->base.enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ ctx->priority_real = PRIO_ULTRA_HIGH;
+ } else {
+ ctx->priority_real = PRIO_NORMAL;
+ }
+}
+
+static void ScoreMtxReqSurrender_Action( ScoreMtxReqSurrender_Context *ctx )
+{
+ if ( ctx->tq_ctx->base.enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ ActionSticky( ctx );
+ } else {
+ Action( ctx );
+ }
+}
+
+static const ScoreMtxReqSurrender_Entry
+ScoreMtxReqSurrender_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_NA,
+ ScoreMtxReqSurrender_Post_Owner_NA, ScoreMtxReqSurrender_Post_Surrender_NA,
+ ScoreMtxReqSurrender_Post_Priority_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_NA,
+ ScoreMtxReqSurrender_Post_Owner_NA, ScoreMtxReqSurrender_Post_Surrender_NA,
+ ScoreMtxReqSurrender_Post_Priority_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_NA,
+ ScoreMtxReqSurrender_Post_Owner_NA, ScoreMtxReqSurrender_Post_Surrender_NA,
+ ScoreMtxReqSurrender_Post_Priority_NA },
+ { 0, 0, 0, 0, 0, 0, 1, 0, 1, ScoreMtxReqSurrender_Post_Status_NotOwner,
+ ScoreMtxReqSurrender_Post_Owner_Other,
+ ScoreMtxReqSurrender_Post_Surrender_Nop,
+ ScoreMtxReqSurrender_Post_Priority_Nop },
+ { 1, 0, 0, 0, 0, 0, 1, 0, 1, ScoreMtxReqSurrender_Post_Status_NA,
+ ScoreMtxReqSurrender_Post_Owner_NA, ScoreMtxReqSurrender_Post_Surrender_NA,
+ ScoreMtxReqSurrender_Post_Priority_NA },
+ { 0, 0, 0, 0, 0, 0, 1, 0, 1, ScoreMtxReqSurrender_Post_Status_NotOwner,
+ ScoreMtxReqSurrender_Post_Owner_None,
+ ScoreMtxReqSurrender_Post_Surrender_Nop,
+ ScoreMtxReqSurrender_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 1, ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Owner_None,
+ ScoreMtxReqSurrender_Post_Surrender_Nop,
+ ScoreMtxReqSurrender_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 1, ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Owner_Caller,
+ ScoreMtxReqSurrender_Post_Surrender_Nop,
+ ScoreMtxReqSurrender_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Owner_Caller,
+ ScoreMtxReqSurrender_Post_Surrender_Nop,
+ ScoreMtxReqSurrender_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Owner_None,
+ ScoreMtxReqSurrender_Post_Surrender_Nop,
+ ScoreMtxReqSurrender_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 1, ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Owner_First,
+ ScoreMtxReqSurrender_Post_Surrender_FIFO,
+ ScoreMtxReqSurrender_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 1, ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Owner_First,
+ ScoreMtxReqSurrender_Post_Surrender_Priority,
+ ScoreMtxReqSurrender_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Owner_First,
+ ScoreMtxReqSurrender_Post_Surrender_PriorityInherit,
+ ScoreMtxReqSurrender_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Owner_First,
+ ScoreMtxReqSurrender_Post_Surrender_Priority,
+ ScoreMtxReqSurrender_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Owner_None,
+ ScoreMtxReqSurrender_Post_Surrender_Nop,
+ ScoreMtxReqSurrender_Post_Priority_Low },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Owner_First,
+ ScoreMtxReqSurrender_Post_Surrender_MrsP,
+ ScoreMtxReqSurrender_Post_Priority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Owner_First,
+ ScoreMtxReqSurrender_Post_Surrender_PriorityInherit,
+ ScoreMtxReqSurrender_Post_Priority_Low },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Owner_First,
+ ScoreMtxReqSurrender_Post_Surrender_Priority,
+ ScoreMtxReqSurrender_Post_Priority_Low },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Owner_First,
+ ScoreMtxReqSurrender_Post_Surrender_MrsP,
+ ScoreMtxReqSurrender_Post_Priority_Low }
+};
+
+static const uint8_t
+ScoreMtxReqSurrender_Map[] = {
+ 4, 4, 4, 5, 5, 5, 4, 4, 4, 5, 5, 5, 7, 7, 7, 7, 7, 7, 10, 10, 10, 6, 6, 6, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7,
+ 7, 7, 7, 10, 10, 10, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
+ 2, 2, 4, 4, 4, 5, 5, 5, 2, 2, 2, 2, 2, 2, 10, 10, 10, 6, 6, 6, 2, 2, 2, 2, 2,
+ 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
+ 10, 10, 10, 6, 6, 6, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 4, 4, 4, 5, 5, 5, 4,
+ 4, 4, 5, 5, 5, 7, 7, 7, 7, 7, 7, 11, 11, 11, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7, 11, 11, 11,
+ 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 4, 5, 5,
+ 5, 2, 2, 2, 2, 2, 2, 11, 11, 11, 6, 6, 6, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
+ 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 11, 11, 11, 6, 6, 6, 2,
+ 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,
+ 4, 4, 5, 5, 5, 4, 4, 4, 5, 5, 5, 8, 8, 8, 7, 7, 7, 12, 12, 16, 6, 6, 6, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 7,
+ 7, 7, 12, 12, 16, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2,
+ 2, 4, 4, 4, 5, 5, 5, 2, 2, 2, 2, 2, 2, 12, 12, 16, 6, 6, 6, 2, 2, 2, 2, 2, 2,
+ 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 12,
+ 12, 16, 6, 6, 6, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4, 4, 4, 5, 5, 5, 4, 4, 4, 5, 5, 5, 8, 8, 8, 8, 8, 8, 13,
+ 13, 17, 9, 9, 14, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 13, 13, 17, 9, 9, 14, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 4, 5, 5, 5, 2, 2, 2, 2, 2, 2, 13, 13, 17,
+ 9, 9, 14, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1,
+ 1, 1, 2, 2, 2, 2, 2, 2, 13, 13, 17, 9, 9, 14, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1,
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 5, 5, 5, 4, 4, 4, 5,
+ 5, 5, 8, 8, 8, 8, 8, 8, 15, 15, 18, 9, 9, 14, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 15, 15, 18, 9, 9,
+ 14, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 4, 5, 5, 5,
+ 2, 2, 2, 2, 2, 2, 15, 15, 18, 9, 9, 14, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
+ 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 15, 15, 18, 9, 9, 14,
+ 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1
+};
+
+static size_t ScoreMtxReqSurrender_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreMtxReqSurrender_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( ScoreMtxReqSurrender_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreMtxReqSurrender_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = ScoreMtxReqSurrender_Scope,
+ .initial_context = &ScoreMtxReqSurrender_Instance
+};
+
+static const uint16_t ScoreMtxReqSurrender_Weights[] = {
+ 288, 144, 72, 36, 12, 6, 3, 1
+};
+
+static void ScoreMtxReqSurrender_Skip(
+ ScoreMtxReqSurrender_Context *ctx,
+ size_t index
+)
+{
+ switch ( index + 1 ) {
+ case 1:
+ ctx->Map.pci[ 1 ] = ScoreMtxReqSurrender_Pre_Discipline_NA - 1;
+ /* Fall through */
+ case 2:
+ ctx->Map.pci[ 2 ] = ScoreMtxReqSurrender_Pre_Recursive_NA - 1;
+ /* Fall through */
+ case 3:
+ ctx->Map.pci[ 3 ] = ScoreMtxReqSurrender_Pre_OwnerCheck_NA - 1;
+ /* Fall through */
+ case 4:
+ ctx->Map.pci[ 4 ] = ScoreMtxReqSurrender_Pre_Owner_NA - 1;
+ /* Fall through */
+ case 5:
+ ctx->Map.pci[ 5 ] = ScoreMtxReqSurrender_Pre_Nested_NA - 1;
+ /* Fall through */
+ case 6:
+ ctx->Map.pci[ 6 ] = ScoreMtxReqSurrender_Pre_Blocked_NA - 1;
+ /* Fall through */
+ case 7:
+ ctx->Map.pci[ 7 ] = ScoreMtxReqSurrender_Pre_Priority_NA - 1;
+ break;
+ }
+}
+
+static inline ScoreMtxReqSurrender_Entry ScoreMtxReqSurrender_PopEntry(
+ ScoreMtxReqSurrender_Context *ctx
+)
+{
+ size_t index;
+
+ if ( ctx->Map.skip ) {
+ size_t i;
+
+ ctx->Map.skip = false;
+ index = 0;
+
+ for ( i = 0; i < 8; ++i ) {
+ index += ScoreMtxReqSurrender_Weights[ i ] * ctx->Map.pci[ i ];
+ }
+ } else {
+ index = ctx->Map.index;
+ }
+
+ ctx->Map.index = index + 1;
+
+ return ScoreMtxReqSurrender_Entries[
+ ScoreMtxReqSurrender_Map[ index ]
+ ];
+}
+
+static void ScoreMtxReqSurrender_SetPreConditionStates(
+ ScoreMtxReqSurrender_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+
+ if ( ctx->Map.entry.Pre_Nested_NA ) {
+ ctx->Map.pcs[ 5 ] = ScoreMtxReqSurrender_Pre_Nested_NA;
+ } else {
+ ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
+ }
+
+ ctx->Map.pcs[ 6 ] = ctx->Map.pci[ 6 ];
+
+ if ( ctx->Map.entry.Pre_Priority_NA ) {
+ ctx->Map.pcs[ 7 ] = ScoreMtxReqSurrender_Pre_Priority_NA;
+ } else {
+ ctx->Map.pcs[ 7 ] = ctx->Map.pci[ 7 ];
+ }
+}
+
+static void ScoreMtxReqSurrender_TestVariant(
+ ScoreMtxReqSurrender_Context *ctx
+)
+{
+ ScoreMtxReqSurrender_Pre_Protocol_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreMtxReqSurrender_Skip( ctx, 0 );
+ return;
+ }
+
+ ScoreMtxReqSurrender_Pre_Discipline_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreMtxReqSurrender_Skip( ctx, 1 );
+ return;
+ }
+
+ ScoreMtxReqSurrender_Pre_Recursive_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreMtxReqSurrender_Skip( ctx, 2 );
+ return;
+ }
+
+ ScoreMtxReqSurrender_Pre_OwnerCheck_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreMtxReqSurrender_Skip( ctx, 3 );
+ return;
+ }
+
+ ScoreMtxReqSurrender_Pre_Owner_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ ScoreMtxReqSurrender_Pre_Nested_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ ScoreMtxReqSurrender_Pre_Blocked_Prepare( ctx, ctx->Map.pcs[ 6 ] );
+ ScoreMtxReqSurrender_Pre_Priority_Prepare( ctx, ctx->Map.pcs[ 7 ] );
+ ScoreMtxReqSurrender_Action( ctx );
+ ScoreMtxReqSurrender_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ ScoreMtxReqSurrender_Post_Owner_Check( ctx, ctx->Map.entry.Post_Owner );
+ ScoreMtxReqSurrender_Post_Surrender_Check(
+ ctx,
+ ctx->Map.entry.Post_Surrender
+ );
+ ScoreMtxReqSurrender_Post_Priority_Check(
+ ctx,
+ ctx->Map.entry.Post_Priority
+ );
+}
+
+static T_fixture_node ScoreMtxReqSurrender_Node;
+
+static T_remark ScoreMtxReqSurrender_Remark = {
+ .next = NULL,
+ .remark = "ScoreMtxReqSurrender"
+};
+
+void ScoreMtxReqSurrender_Run( TQMtxContext *tq_ctx )
+{
+ ScoreMtxReqSurrender_Context *ctx;
+
+ ctx = &ScoreMtxReqSurrender_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreMtxReqSurrender_Node,
+ &ScoreMtxReqSurrender_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+ ctx->Map.skip = false;
+
+ for (
+ ctx->Map.pci[ 0 ] = ScoreMtxReqSurrender_Pre_Protocol_None;
+ ctx->Map.pci[ 0 ] < ScoreMtxReqSurrender_Pre_Protocol_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = ScoreMtxReqSurrender_Pre_Discipline_FIFO;
+ ctx->Map.pci[ 1 ] < ScoreMtxReqSurrender_Pre_Discipline_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = ScoreMtxReqSurrender_Pre_Recursive_Allowed;
+ ctx->Map.pci[ 2 ] < ScoreMtxReqSurrender_Pre_Recursive_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = ScoreMtxReqSurrender_Pre_OwnerCheck_Yes;
+ ctx->Map.pci[ 3 ] < ScoreMtxReqSurrender_Pre_OwnerCheck_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = ScoreMtxReqSurrender_Pre_Owner_None;
+ ctx->Map.pci[ 4 ] < ScoreMtxReqSurrender_Pre_Owner_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ for (
+ ctx->Map.pci[ 5 ] = ScoreMtxReqSurrender_Pre_Nested_Yes;
+ ctx->Map.pci[ 5 ] < ScoreMtxReqSurrender_Pre_Nested_NA;
+ ++ctx->Map.pci[ 5 ]
+ ) {
+ for (
+ ctx->Map.pci[ 6 ] = ScoreMtxReqSurrender_Pre_Blocked_Yes;
+ ctx->Map.pci[ 6 ] < ScoreMtxReqSurrender_Pre_Blocked_NA;
+ ++ctx->Map.pci[ 6 ]
+ ) {
+ for (
+ ctx->Map.pci[ 7 ] = ScoreMtxReqSurrender_Pre_Priority_High;
+ ctx->Map.pci[ 7 ] < ScoreMtxReqSurrender_Pre_Priority_NA;
+ ++ctx->Map.pci[ 7 ]
+ ) {
+ ctx->Map.entry = ScoreMtxReqSurrender_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ ScoreMtxReqSurrender_SetPreConditionStates( ctx );
+ ScoreMtxReqSurrender_Prepare( ctx );
+ ScoreMtxReqSurrender_TestVariant( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ T_add_remark( &ScoreMtxReqSurrender_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-mtx-surrender.h b/testsuites/validation/tr-mtx-surrender.h
new file mode 100644
index 0000000000..1b732d5e73
--- /dev/null
+++ b/testsuites/validation/tr-mtx-surrender.h
@@ -0,0 +1,160 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreMtxReqSurrender
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_MTX_SURRENDER_H
+#define _TR_MTX_SURRENDER_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreMtxReqSurrender
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreMtxReqSurrender_Pre_Protocol_None,
+ ScoreMtxReqSurrender_Pre_Protocol_Inherit,
+ ScoreMtxReqSurrender_Pre_Protocol_Ceiling,
+ ScoreMtxReqSurrender_Pre_Protocol_MrsP,
+ ScoreMtxReqSurrender_Pre_Protocol_NA
+} ScoreMtxReqSurrender_Pre_Protocol;
+
+typedef enum {
+ ScoreMtxReqSurrender_Pre_Discipline_FIFO,
+ ScoreMtxReqSurrender_Pre_Discipline_Priority,
+ ScoreMtxReqSurrender_Pre_Discipline_NA
+} ScoreMtxReqSurrender_Pre_Discipline;
+
+typedef enum {
+ ScoreMtxReqSurrender_Pre_Recursive_Allowed,
+ ScoreMtxReqSurrender_Pre_Recursive_NotAllowed,
+ ScoreMtxReqSurrender_Pre_Recursive_NA
+} ScoreMtxReqSurrender_Pre_Recursive;
+
+typedef enum {
+ ScoreMtxReqSurrender_Pre_OwnerCheck_Yes,
+ ScoreMtxReqSurrender_Pre_OwnerCheck_No,
+ ScoreMtxReqSurrender_Pre_OwnerCheck_NA
+} ScoreMtxReqSurrender_Pre_OwnerCheck;
+
+typedef enum {
+ ScoreMtxReqSurrender_Pre_Owner_None,
+ ScoreMtxReqSurrender_Pre_Owner_Caller,
+ ScoreMtxReqSurrender_Pre_Owner_Other,
+ ScoreMtxReqSurrender_Pre_Owner_NA
+} ScoreMtxReqSurrender_Pre_Owner;
+
+typedef enum {
+ ScoreMtxReqSurrender_Pre_Nested_Yes,
+ ScoreMtxReqSurrender_Pre_Nested_No,
+ ScoreMtxReqSurrender_Pre_Nested_NA
+} ScoreMtxReqSurrender_Pre_Nested;
+
+typedef enum {
+ ScoreMtxReqSurrender_Pre_Blocked_Yes,
+ ScoreMtxReqSurrender_Pre_Blocked_No,
+ ScoreMtxReqSurrender_Pre_Blocked_NA
+} ScoreMtxReqSurrender_Pre_Blocked;
+
+typedef enum {
+ ScoreMtxReqSurrender_Pre_Priority_High,
+ ScoreMtxReqSurrender_Pre_Priority_Equal,
+ ScoreMtxReqSurrender_Pre_Priority_Low,
+ ScoreMtxReqSurrender_Pre_Priority_NA
+} ScoreMtxReqSurrender_Pre_Priority;
+
+typedef enum {
+ ScoreMtxReqSurrender_Post_Status_Ok,
+ ScoreMtxReqSurrender_Post_Status_NotOwner,
+ ScoreMtxReqSurrender_Post_Status_NA
+} ScoreMtxReqSurrender_Post_Status;
+
+typedef enum {
+ ScoreMtxReqSurrender_Post_Owner_None,
+ ScoreMtxReqSurrender_Post_Owner_Caller,
+ ScoreMtxReqSurrender_Post_Owner_Other,
+ ScoreMtxReqSurrender_Post_Owner_First,
+ ScoreMtxReqSurrender_Post_Owner_NA
+} ScoreMtxReqSurrender_Post_Owner;
+
+typedef enum {
+ ScoreMtxReqSurrender_Post_Surrender_Nop,
+ ScoreMtxReqSurrender_Post_Surrender_FIFO,
+ ScoreMtxReqSurrender_Post_Surrender_Priority,
+ ScoreMtxReqSurrender_Post_Surrender_PriorityInherit,
+ ScoreMtxReqSurrender_Post_Surrender_MrsP,
+ ScoreMtxReqSurrender_Post_Surrender_NA
+} ScoreMtxReqSurrender_Post_Surrender;
+
+typedef enum {
+ ScoreMtxReqSurrender_Post_Priority_Nop,
+ ScoreMtxReqSurrender_Post_Priority_Low,
+ ScoreMtxReqSurrender_Post_Priority_NA
+} ScoreMtxReqSurrender_Post_Priority;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue context.
+ */
+void ScoreMtxReqSurrender_Run( TQMtxContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_MTX_SURRENDER_H */
diff --git a/testsuites/validation/tr-object-ident-local.c b/testsuites/validation/tr-object-ident-local.c
new file mode 100644
index 0000000000..5cf521fbd6
--- /dev/null
+++ b/testsuites/validation/tr-object-ident-local.c
@@ -0,0 +1,394 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsReqIdentLocal
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident-local.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsReqIdentLocal spec:/rtems/req/ident-local
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Name_NA : 1;
+ uint8_t Pre_Id_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_Id : 2;
+} RtemsReqIdentLocal_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/req/ident-local test case.
+ */
+typedef struct {
+ rtems_status_code status;
+
+ rtems_name name;
+
+ rtems_id *id;
+
+ rtems_id id_value;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsReqIdentLocal_Run() parameter.
+ */
+ rtems_id id_local_object;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsReqIdentLocal_Run() parameter.
+ */
+ rtems_name name_local_object;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsReqIdentLocal_Run() parameter.
+ */
+ rtems_status_code ( *action )( rtems_name, rtems_id * );
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsReqIdentLocal_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsReqIdentLocal_Context;
+
+static RtemsReqIdentLocal_Context
+ RtemsReqIdentLocal_Instance;
+
+static const char * const RtemsReqIdentLocal_PreDesc_Name[] = {
+ "Invalid",
+ "Valid",
+ "NA"
+};
+
+static const char * const RtemsReqIdentLocal_PreDesc_Id[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsReqIdentLocal_PreDesc[] = {
+ RtemsReqIdentLocal_PreDesc_Name,
+ RtemsReqIdentLocal_PreDesc_Id,
+ NULL
+};
+
+static void RtemsReqIdentLocal_Pre_Name_Prepare(
+ RtemsReqIdentLocal_Context *ctx,
+ RtemsReqIdentLocal_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdentLocal_Pre_Name_Invalid: {
+ /*
+ * While the ``name`` parameter is not associated with an active object
+ * of the specified class .
+ */
+ ctx->name = 1;
+ break;
+ }
+
+ case RtemsReqIdentLocal_Pre_Name_Valid: {
+ /*
+ * While the ``name`` parameter is associated with an active object of
+ * the specified class .
+ */
+ ctx->name = ctx->name_local_object;
+ break;
+ }
+
+ case RtemsReqIdentLocal_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdentLocal_Pre_Id_Prepare(
+ RtemsReqIdentLocal_Context *ctx,
+ RtemsReqIdentLocal_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdentLocal_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter references an object of type rtems_id.
+ */
+ ctx->id_value = 0xffffffff;
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsReqIdentLocal_Pre_Id_Null: {
+ /*
+ * While the ``id`` parameter is NULL.
+ */
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsReqIdentLocal_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdentLocal_Post_Status_Check(
+ RtemsReqIdentLocal_Context *ctx,
+ RtemsReqIdentLocal_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdentLocal_Post_Status_Ok: {
+ /*
+ * The return status shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc( ctx->status, RTEMS_SUCCESSFUL );
+ break;
+ }
+
+ case RtemsReqIdentLocal_Post_Status_InvAddr: {
+ /*
+ * The return status shall be RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsReqIdentLocal_Post_Status_InvName: {
+ /*
+ * The return status shall be RTEMS_INVALID_NAME.
+ */
+ T_rsc( ctx->status, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsReqIdentLocal_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdentLocal_Post_Id_Check(
+ RtemsReqIdentLocal_Context *ctx,
+ RtemsReqIdentLocal_Post_Id state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdentLocal_Post_Id_Nop: {
+ /*
+ * The value of the object identifier referenced by the id parameter
+ * shall be the value before the action.
+ */
+ T_eq_ptr( ctx->id, &ctx->id_value );
+ T_eq_u32( ctx->id_value, 0xffffffff );
+ break;
+ }
+
+ case RtemsReqIdentLocal_Post_Id_Null: {
+ /*
+ * While the id is NULL.
+ */
+ T_null( ctx->id )
+ break;
+ }
+
+ case RtemsReqIdentLocal_Post_Id_Id: {
+ /*
+ * The value of the object identifier referenced by the id parameter
+ * shall be the identifier of a local object of the specified class with
+ * a name equal to the name parameter. If more than one local object of
+ * the specified class with such a name exists, then it shall be the
+ * identifier of the object with the lowest object index.
+ */
+ T_eq_ptr( ctx->id, &ctx->id_value );
+ T_eq_u32( ctx->id_value, ctx->id_local_object );
+ break;
+ }
+
+ case RtemsReqIdentLocal_Post_Id_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdentLocal_Action( RtemsReqIdentLocal_Context *ctx )
+{
+ ctx->status = ( *ctx->action )( ctx->name, ctx->id );
+}
+
+static const RtemsReqIdentLocal_Entry
+RtemsReqIdentLocal_Entries[] = {
+ { 0, 0, 0, RtemsReqIdentLocal_Post_Status_InvAddr,
+ RtemsReqIdentLocal_Post_Id_Null },
+ { 0, 0, 0, RtemsReqIdentLocal_Post_Status_InvName,
+ RtemsReqIdentLocal_Post_Id_Nop },
+ { 0, 0, 0, RtemsReqIdentLocal_Post_Status_Ok, RtemsReqIdentLocal_Post_Id_Id }
+};
+
+static const uint8_t
+RtemsReqIdentLocal_Map[] = {
+ 1, 0, 2, 0
+};
+
+static size_t RtemsReqIdentLocal_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsReqIdentLocal_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsReqIdentLocal_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsReqIdentLocal_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsReqIdentLocal_Scope,
+ .initial_context = &RtemsReqIdentLocal_Instance
+};
+
+static inline RtemsReqIdentLocal_Entry RtemsReqIdentLocal_PopEntry(
+ RtemsReqIdentLocal_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsReqIdentLocal_Entries[
+ RtemsReqIdentLocal_Map[ index ]
+ ];
+}
+
+static void RtemsReqIdentLocal_TestVariant( RtemsReqIdentLocal_Context *ctx )
+{
+ RtemsReqIdentLocal_Pre_Name_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsReqIdentLocal_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsReqIdentLocal_Action( ctx );
+ RtemsReqIdentLocal_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsReqIdentLocal_Post_Id_Check( ctx, ctx->Map.entry.Post_Id );
+}
+
+static T_fixture_node RtemsReqIdentLocal_Node;
+
+static T_remark RtemsReqIdentLocal_Remark = {
+ .next = NULL,
+ .remark = "RtemsReqIdentLocal"
+};
+
+void RtemsReqIdentLocal_Run(
+ rtems_id id_local_object,
+ rtems_name name_local_object,
+ rtems_status_code ( *action )( rtems_name, rtems_id * )
+)
+{
+ RtemsReqIdentLocal_Context *ctx;
+
+ ctx = &RtemsReqIdentLocal_Instance;
+ ctx->id_local_object = id_local_object;
+ ctx->name_local_object = name_local_object;
+ ctx->action = action;
+
+ ctx = T_push_fixture( &RtemsReqIdentLocal_Node, &RtemsReqIdentLocal_Fixture );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsReqIdentLocal_Pre_Name_Invalid;
+ ctx->Map.pcs[ 0 ] < RtemsReqIdentLocal_Pre_Name_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsReqIdentLocal_Pre_Id_Valid;
+ ctx->Map.pcs[ 1 ] < RtemsReqIdentLocal_Pre_Id_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ ctx->Map.entry = RtemsReqIdentLocal_PopEntry( ctx );
+ RtemsReqIdentLocal_TestVariant( ctx );
+ }
+ }
+
+ T_add_remark( &RtemsReqIdentLocal_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-object-ident-local.h b/testsuites/validation/tr-object-ident-local.h
new file mode 100644
index 0000000000..d3cf1c307a
--- /dev/null
+++ b/testsuites/validation/tr-object-ident-local.h
@@ -0,0 +1,115 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsReqIdentLocal
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_OBJECT_IDENT_LOCAL_H
+#define _TR_OBJECT_IDENT_LOCAL_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup RtemsReqIdentLocal
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsReqIdentLocal_Pre_Name_Invalid,
+ RtemsReqIdentLocal_Pre_Name_Valid,
+ RtemsReqIdentLocal_Pre_Name_NA
+} RtemsReqIdentLocal_Pre_Name;
+
+typedef enum {
+ RtemsReqIdentLocal_Pre_Id_Valid,
+ RtemsReqIdentLocal_Pre_Id_Null,
+ RtemsReqIdentLocal_Pre_Id_NA
+} RtemsReqIdentLocal_Pre_Id;
+
+typedef enum {
+ RtemsReqIdentLocal_Post_Status_Ok,
+ RtemsReqIdentLocal_Post_Status_InvAddr,
+ RtemsReqIdentLocal_Post_Status_InvName,
+ RtemsReqIdentLocal_Post_Status_NA
+} RtemsReqIdentLocal_Post_Status;
+
+typedef enum {
+ RtemsReqIdentLocal_Post_Id_Nop,
+ RtemsReqIdentLocal_Post_Id_Null,
+ RtemsReqIdentLocal_Post_Id_Id,
+ RtemsReqIdentLocal_Post_Id_NA
+} RtemsReqIdentLocal_Post_Id;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param id_local_object is the identifier of an active object of the class
+ * under test.
+ *
+ * @param name_local_object is the name of the active object of the class under
+ * test.
+ *
+ * @param action is the action handler.
+ */
+void RtemsReqIdentLocal_Run(
+ rtems_id id_local_object,
+ rtems_name name_local_object,
+ rtems_status_code ( *action )( rtems_name, rtems_id * )
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_OBJECT_IDENT_LOCAL_H */
diff --git a/testsuites/validation/tr-object-ident.c b/testsuites/validation/tr-object-ident.c
new file mode 100644
index 0000000000..df66d51437
--- /dev/null
+++ b/testsuites/validation/tr-object-ident.c
@@ -0,0 +1,504 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsReqIdent
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsReqIdent spec:/rtems/req/ident
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Name_NA : 1;
+ uint16_t Pre_Node_NA : 1;
+ uint16_t Pre_Id_NA : 1;
+ uint16_t Post_Status : 3;
+ uint16_t Post_Id : 3;
+} RtemsReqIdent_Entry;
+
+/**
+ * @brief Test context for spec:/rtems/req/ident test case.
+ */
+typedef struct {
+ rtems_status_code status;
+
+ rtems_name name;
+
+ uint32_t node;
+
+ rtems_id *id;
+
+ rtems_id id_value;
+
+ rtems_id id_remote_object;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsReqIdent_Run() parameter.
+ */
+ rtems_id id_local_object;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsReqIdent_Run() parameter.
+ */
+ rtems_name name_local_object;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsReqIdent_Run() parameter.
+ */
+ rtems_status_code ( *action )( rtems_name, uint32_t, rtems_id * );
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ RtemsReqIdent_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} RtemsReqIdent_Context;
+
+static RtemsReqIdent_Context
+ RtemsReqIdent_Instance;
+
+static const char * const RtemsReqIdent_PreDesc_Name[] = {
+ "Invalid",
+ "Valid",
+ "NA"
+};
+
+static const char * const RtemsReqIdent_PreDesc_Node[] = {
+ "Local",
+ "Remote",
+ "Invalid",
+ "SearchAll",
+ "SearchOther",
+ "SearchLocal",
+ "NA"
+};
+
+static const char * const RtemsReqIdent_PreDesc_Id[] = {
+ "Valid",
+ "Null",
+ "NA"
+};
+
+static const char * const * const RtemsReqIdent_PreDesc[] = {
+ RtemsReqIdent_PreDesc_Name,
+ RtemsReqIdent_PreDesc_Node,
+ RtemsReqIdent_PreDesc_Id,
+ NULL
+};
+
+static void RtemsReqIdent_Pre_Name_Prepare(
+ RtemsReqIdent_Context *ctx,
+ RtemsReqIdent_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdent_Pre_Name_Invalid: {
+ /*
+ * While the ``name`` parameter is not associated with an active object
+ * of the specified class .
+ */
+ ctx->name = 1;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Name_Valid: {
+ /*
+ * While the ``name`` parameter is associated with an active object of
+ * the specified class .
+ */
+ ctx->name = ctx->name_local_object;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdent_Pre_Node_Prepare(
+ RtemsReqIdent_Context *ctx,
+ RtemsReqIdent_Pre_Node state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdent_Pre_Node_Local: {
+ /*
+ * While the ``node`` parameter is the local node number.
+ */
+ ctx->node = 1;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Node_Remote: {
+ /*
+ * While the ``node`` parameter is a remote node number.
+ */
+ ctx->node = 2;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Node_Invalid: {
+ /*
+ * While the ``node`` parameter is an invalid node number.
+ */
+ ctx->node = 256;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Node_SearchAll: {
+ /*
+ * While the ``node`` parameter is RTEMS_SEARCH_ALL_NODES.
+ */
+ ctx->node = RTEMS_SEARCH_ALL_NODES;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Node_SearchOther: {
+ /*
+ * While the ``node`` parameter is RTEMS_SEARCH_OTHER_NODES.
+ */
+ ctx->node = RTEMS_SEARCH_OTHER_NODES;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Node_SearchLocal: {
+ /*
+ * While the ``node`` parameter is RTEMS_SEARCH_LOCAL_NODE.
+ */
+ ctx->node = RTEMS_SEARCH_LOCAL_NODE;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Node_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdent_Pre_Id_Prepare(
+ RtemsReqIdent_Context *ctx,
+ RtemsReqIdent_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdent_Pre_Id_Valid: {
+ /*
+ * While the ``id`` parameter references an object of type rtems_id.
+ */
+ ctx->id_value = 0xffffffff;
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Id_Null: {
+ /*
+ * While the ``id`` parameter is NULL.
+ */
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdent_Post_Status_Check(
+ RtemsReqIdent_Context *ctx,
+ RtemsReqIdent_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdent_Post_Status_Ok: {
+ /*
+ * The return status shall be RTEMS_SUCCESSFUL.
+ */
+ T_rsc(ctx->status, RTEMS_SUCCESSFUL);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Status_InvAddr: {
+ /*
+ * The return status shall be RTEMS_INVALID_ADDRESS.
+ */
+ T_rsc(ctx->status, RTEMS_INVALID_ADDRESS);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Status_InvName: {
+ /*
+ * The return status shall be RTEMS_INVALID_NAME.
+ */
+ T_rsc(ctx->status, RTEMS_INVALID_NAME);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Status_InvNode: {
+ /*
+ * The return status shall be RTEMS_INVALID_NODE.
+ */
+ T_rsc(ctx->status, RTEMS_INVALID_NODE);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdent_Post_Id_Check(
+ RtemsReqIdent_Context *ctx,
+ RtemsReqIdent_Post_Id state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdent_Post_Id_Nop: {
+ /*
+ * The value of the object identifier referenced by the id parameter
+ * shall be the value before the action.
+ */
+ T_eq_ptr(ctx->id, &ctx->id_value);
+ T_eq_u32(ctx->id_value, 0xffffffff);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Id_Null: {
+ /*
+ * While the id is NULL.
+ */
+ T_null(ctx->id)
+ break;
+ }
+
+ case RtemsReqIdent_Post_Id_LocalObj: {
+ /*
+ * The value of the object identifier referenced by the id parameter
+ * shall be the identifier of a local object of the specified class with
+ * a name equal to the name parameter. If more than one local object of
+ * the specified class with such a name exists, then it shall be the
+ * identifier of the object with the lowest object index.
+ */
+ T_eq_ptr(ctx->id, &ctx->id_value);
+ T_eq_u32(ctx->id_value, ctx->id_local_object);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Id_RemoteObj: {
+ /*
+ * The value of the object identifier referenced by the id parameter
+ * shall be the identifier of a remote object of the specified class on a
+ * eligible node defined by the node parameter with a name equal to the
+ * name parameter. If more than one local object of the specified class
+ * with such a name exists, then it shall be the identifier of the object
+ * with the lowest object index. Otherwise, if more than one object of
+ * the specified class with such a name exists on remote eligible nodes,
+ * then it shall be the identifier of the object with the lowest node
+ * index and the lowest object index on this node.
+ */
+ T_eq_ptr(ctx->id, &ctx->id_value);
+ T_eq_u32(ctx->id_value, ctx->id_remote_object);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Id_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdent_Action( RtemsReqIdent_Context *ctx )
+{
+ ctx->status = ( *ctx->action )( ctx->name, ctx->node, ctx->id );
+}
+
+static const RtemsReqIdent_Entry
+RtemsReqIdent_Entries[] = {
+ { 0, 0, 0, 0, RtemsReqIdent_Post_Status_InvAddr, RtemsReqIdent_Post_Id_Null },
+ { 0, 0, 0, 0, RtemsReqIdent_Post_Status_InvName, RtemsReqIdent_Post_Id_Nop },
+ { 0, 0, 0, 0, RtemsReqIdent_Post_Status_Ok, RtemsReqIdent_Post_Id_LocalObj },
+#if defined(RTEMS_MULTIPROCESSING)
+ { 0, 0, 0, 0, RtemsReqIdent_Post_Status_Ok, RtemsReqIdent_Post_Id_RemoteObj }
+#else
+ { 0, 0, 0, 0, RtemsReqIdent_Post_Status_InvName, RtemsReqIdent_Post_Id_Nop }
+#endif
+};
+
+static const uint8_t
+RtemsReqIdent_Map[] = {
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 3, 0, 1, 0, 2, 0, 3, 0, 2, 0
+};
+
+static size_t RtemsReqIdent_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsReqIdent_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( RtemsReqIdent_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsReqIdent_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsReqIdent_Scope,
+ .initial_context = &RtemsReqIdent_Instance
+};
+
+static inline RtemsReqIdent_Entry RtemsReqIdent_PopEntry(
+ RtemsReqIdent_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return RtemsReqIdent_Entries[
+ RtemsReqIdent_Map[ index ]
+ ];
+}
+
+static void RtemsReqIdent_TestVariant( RtemsReqIdent_Context *ctx )
+{
+ RtemsReqIdent_Pre_Name_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ RtemsReqIdent_Pre_Node_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ RtemsReqIdent_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ RtemsReqIdent_Action( ctx );
+ RtemsReqIdent_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ RtemsReqIdent_Post_Id_Check( ctx, ctx->Map.entry.Post_Id );
+}
+
+static T_fixture_node RtemsReqIdent_Node;
+
+static T_remark RtemsReqIdent_Remark = {
+ .next = NULL,
+ .remark = "RtemsReqIdent"
+};
+
+void RtemsReqIdent_Run(
+ rtems_id id_local_object,
+ rtems_name name_local_object,
+ rtems_status_code ( *action )( rtems_name, uint32_t, rtems_id * )
+)
+{
+ RtemsReqIdent_Context *ctx;
+
+ ctx = &RtemsReqIdent_Instance;
+ ctx->id_local_object = id_local_object;
+ ctx->name_local_object = name_local_object;
+ ctx->action = action;
+
+ ctx = T_push_fixture( &RtemsReqIdent_Node, &RtemsReqIdent_Fixture );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = RtemsReqIdent_Pre_Name_Invalid;
+ ctx->Map.pcs[ 0 ] < RtemsReqIdent_Pre_Name_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = RtemsReqIdent_Pre_Node_Local;
+ ctx->Map.pcs[ 1 ] < RtemsReqIdent_Pre_Node_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = RtemsReqIdent_Pre_Id_Valid;
+ ctx->Map.pcs[ 2 ] < RtemsReqIdent_Pre_Id_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ ctx->Map.entry = RtemsReqIdent_PopEntry( ctx );
+ RtemsReqIdent_TestVariant( ctx );
+ }
+ }
+ }
+
+ T_add_remark( &RtemsReqIdent_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-object-ident.h b/testsuites/validation/tr-object-ident.h
new file mode 100644
index 0000000000..404d56c707
--- /dev/null
+++ b/testsuites/validation/tr-object-ident.h
@@ -0,0 +1,127 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsReqIdent
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_OBJECT_IDENT_H
+#define _TR_OBJECT_IDENT_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup RtemsReqIdent
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsReqIdent_Pre_Name_Invalid,
+ RtemsReqIdent_Pre_Name_Valid,
+ RtemsReqIdent_Pre_Name_NA
+} RtemsReqIdent_Pre_Name;
+
+typedef enum {
+ RtemsReqIdent_Pre_Node_Local,
+ RtemsReqIdent_Pre_Node_Remote,
+ RtemsReqIdent_Pre_Node_Invalid,
+ RtemsReqIdent_Pre_Node_SearchAll,
+ RtemsReqIdent_Pre_Node_SearchOther,
+ RtemsReqIdent_Pre_Node_SearchLocal,
+ RtemsReqIdent_Pre_Node_NA
+} RtemsReqIdent_Pre_Node;
+
+typedef enum {
+ RtemsReqIdent_Pre_Id_Valid,
+ RtemsReqIdent_Pre_Id_Null,
+ RtemsReqIdent_Pre_Id_NA
+} RtemsReqIdent_Pre_Id;
+
+typedef enum {
+ RtemsReqIdent_Post_Status_Ok,
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Status_InvName,
+ RtemsReqIdent_Post_Status_InvNode,
+ RtemsReqIdent_Post_Status_NA
+} RtemsReqIdent_Post_Status;
+
+typedef enum {
+ RtemsReqIdent_Post_Id_Nop,
+ RtemsReqIdent_Post_Id_Null,
+ RtemsReqIdent_Post_Id_LocalObj,
+ RtemsReqIdent_Post_Id_RemoteObj,
+ RtemsReqIdent_Post_Id_NA
+} RtemsReqIdent_Post_Id;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param id_local_object is the identifier of an active object of the class
+ * under test.
+ *
+ * @param name_local_object is the name of the active object of the class under
+ * test.
+ *
+ * @param action is the action handler.
+ */
+void RtemsReqIdent_Run(
+ rtems_id id_local_object,
+ rtems_name name_local_object,
+ rtems_status_code ( *action )( rtems_name, uint32_t, rtems_id * )
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_OBJECT_IDENT_H */
diff --git a/testsuites/validation/tr-sem-seize-try.c b/testsuites/validation/tr-sem-seize-try.c
new file mode 100644
index 0000000000..3470f832fd
--- /dev/null
+++ b/testsuites/validation/tr-sem-seize-try.c
@@ -0,0 +1,329 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSemReqSeizeTry
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-sem-seize-try.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSemReqSeizeTry spec:/score/sem/req/seize-try
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Count_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_Count : 2;
+} ScoreSemReqSeizeTry_Entry;
+
+/**
+ * @brief Test context for spec:/score/sem/req/seize-try test case.
+ */
+typedef struct {
+ /**
+ * @brief This member specifies the semaphore count before the directive
+ * call.
+ */
+ uint32_t count_before;
+
+ /**
+ * @brief This member contains the return status of the directive call.
+ */
+ Status_Control status;
+
+ /**
+ * @brief This member contains the semaphore count after the directive call.
+ */
+ uint32_t count_after;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSemReqSeizeTry_Run() parameter.
+ */
+ TQSemContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreSemReqSeizeTry_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreSemReqSeizeTry_Context;
+
+static ScoreSemReqSeizeTry_Context
+ ScoreSemReqSeizeTry_Instance;
+
+static const char * const ScoreSemReqSeizeTry_PreDesc_Count[] = {
+ "Zero",
+ "Positive",
+ "NA"
+};
+
+static const char * const * const ScoreSemReqSeizeTry_PreDesc[] = {
+ ScoreSemReqSeizeTry_PreDesc_Count,
+ NULL
+};
+
+typedef ScoreSemReqSeizeTry_Context Context;
+
+static Status_Control Status( const Context *ctx, Status_Control status )
+{
+ return TQConvertStatus( &ctx->tq_ctx->base, status );
+}
+
+static void ScoreSemReqSeizeTry_Pre_Count_Prepare(
+ ScoreSemReqSeizeTry_Context *ctx,
+ ScoreSemReqSeizeTry_Pre_Count state
+)
+{
+ switch ( state ) {
+ case ScoreSemReqSeizeTry_Pre_Count_Zero: {
+ /*
+ * While the count of the semaphore is zero.
+ */
+ ctx->count_before = 0;
+ break;
+ }
+
+ case ScoreSemReqSeizeTry_Pre_Count_Positive: {
+ /*
+ * While the count of the semaphore is greater than zero.
+ */
+ ctx->count_before = 1;
+ break;
+ }
+
+ case ScoreSemReqSeizeTry_Pre_Count_NA:
+ break;
+ }
+}
+
+static void ScoreSemReqSeizeTry_Post_Status_Check(
+ ScoreSemReqSeizeTry_Context *ctx,
+ ScoreSemReqSeizeTry_Post_Status state
+)
+{
+ switch ( state ) {
+ case ScoreSemReqSeizeTry_Post_Status_Ok: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_SUCCESSFUL.
+ */
+ T_eq_int( ctx->status, Status( ctx, STATUS_SUCCESSFUL ) );
+ break;
+ }
+
+ case ScoreSemReqSeizeTry_Post_Status_Unsat: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_UNSATISFIED.
+ */
+ T_eq_int( ctx->status, Status( ctx, STATUS_UNSATISFIED ) );
+ break;
+ }
+
+ case ScoreSemReqSeizeTry_Post_Status_NA:
+ break;
+ }
+}
+
+static void ScoreSemReqSeizeTry_Post_Count_Check(
+ ScoreSemReqSeizeTry_Context *ctx,
+ ScoreSemReqSeizeTry_Post_Count state
+)
+{
+ switch ( state ) {
+ case ScoreSemReqSeizeTry_Post_Count_Nop: {
+ /*
+ * The count of the semaphore shall not be modified.
+ */
+ T_eq_u32( ctx->count_after, ctx->count_before );
+ break;
+ }
+
+ case ScoreSemReqSeizeTry_Post_Count_MinusOne: {
+ /*
+ * The count of the semaphore shall be decremented by one.
+ */
+ T_eq_u32( ctx->count_after, ctx->count_before - 1 );
+ break;
+ }
+
+ case ScoreSemReqSeizeTry_Post_Count_NA:
+ break;
+ }
+}
+
+static void ScoreSemReqSeizeTry_Action( ScoreSemReqSeizeTry_Context *ctx )
+{
+ TQSemSetCount( ctx->tq_ctx, ctx->count_before );
+ ctx->status = TQEnqueue( &ctx->tq_ctx->base, TQ_NO_WAIT );
+ ctx->count_after = TQSemGetCount( ctx->tq_ctx );
+}
+
+static const ScoreSemReqSeizeTry_Entry
+ScoreSemReqSeizeTry_Entries[] = {
+ { 0, 0, ScoreSemReqSeizeTry_Post_Status_Unsat,
+ ScoreSemReqSeizeTry_Post_Count_Nop },
+ { 0, 0, ScoreSemReqSeizeTry_Post_Status_Ok,
+ ScoreSemReqSeizeTry_Post_Count_MinusOne }
+};
+
+static const uint8_t
+ScoreSemReqSeizeTry_Map[] = {
+ 0, 1
+};
+
+static size_t ScoreSemReqSeizeTry_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreSemReqSeizeTry_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( ScoreSemReqSeizeTry_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreSemReqSeizeTry_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = ScoreSemReqSeizeTry_Scope,
+ .initial_context = &ScoreSemReqSeizeTry_Instance
+};
+
+static inline ScoreSemReqSeizeTry_Entry ScoreSemReqSeizeTry_PopEntry(
+ ScoreSemReqSeizeTry_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreSemReqSeizeTry_Entries[
+ ScoreSemReqSeizeTry_Map[ index ]
+ ];
+}
+
+static void ScoreSemReqSeizeTry_TestVariant( ScoreSemReqSeizeTry_Context *ctx )
+{
+ ScoreSemReqSeizeTry_Pre_Count_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ ScoreSemReqSeizeTry_Action( ctx );
+ ScoreSemReqSeizeTry_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ ScoreSemReqSeizeTry_Post_Count_Check( ctx, ctx->Map.entry.Post_Count );
+}
+
+static T_fixture_node ScoreSemReqSeizeTry_Node;
+
+static T_remark ScoreSemReqSeizeTry_Remark = {
+ .next = NULL,
+ .remark = "ScoreSemReqSeizeTry"
+};
+
+void ScoreSemReqSeizeTry_Run( TQSemContext *tq_ctx )
+{
+ ScoreSemReqSeizeTry_Context *ctx;
+
+ ctx = &ScoreSemReqSeizeTry_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreSemReqSeizeTry_Node,
+ &ScoreSemReqSeizeTry_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreSemReqSeizeTry_Pre_Count_Zero;
+ ctx->Map.pcs[ 0 ] < ScoreSemReqSeizeTry_Pre_Count_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = ScoreSemReqSeizeTry_PopEntry( ctx );
+ ScoreSemReqSeizeTry_TestVariant( ctx );
+ }
+
+ T_add_remark( &ScoreSemReqSeizeTry_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-sem-seize-try.h b/testsuites/validation/tr-sem-seize-try.h
new file mode 100644
index 0000000000..347c8aa61d
--- /dev/null
+++ b/testsuites/validation/tr-sem-seize-try.h
@@ -0,0 +1,97 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSemReqSeizeTry
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_SEM_SEIZE_TRY_H
+#define _TR_SEM_SEIZE_TRY_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreSemReqSeizeTry
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreSemReqSeizeTry_Pre_Count_Zero,
+ ScoreSemReqSeizeTry_Pre_Count_Positive,
+ ScoreSemReqSeizeTry_Pre_Count_NA
+} ScoreSemReqSeizeTry_Pre_Count;
+
+typedef enum {
+ ScoreSemReqSeizeTry_Post_Status_Ok,
+ ScoreSemReqSeizeTry_Post_Status_Unsat,
+ ScoreSemReqSeizeTry_Post_Status_NA
+} ScoreSemReqSeizeTry_Post_Status;
+
+typedef enum {
+ ScoreSemReqSeizeTry_Post_Count_Nop,
+ ScoreSemReqSeizeTry_Post_Count_MinusOne,
+ ScoreSemReqSeizeTry_Post_Count_NA
+} ScoreSemReqSeizeTry_Post_Count;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue context.
+ */
+void ScoreSemReqSeizeTry_Run( TQSemContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_SEM_SEIZE_TRY_H */
diff --git a/testsuites/validation/tr-sem-seize-wait.c b/testsuites/validation/tr-sem-seize-wait.c
new file mode 100644
index 0000000000..bbc1cfd252
--- /dev/null
+++ b/testsuites/validation/tr-sem-seize-wait.c
@@ -0,0 +1,404 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSemReqSeizeWait
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/statesimpl.h>
+
+#include "tr-sem-seize-wait.h"
+#include "tr-tq-enqueue-fifo.h"
+#include "tr-tq-enqueue-priority.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSemReqSeizeWait spec:/score/sem/req/seize-wait
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Count_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_Count : 2;
+ uint8_t Post_Timer : 2;
+} ScoreSemReqSeizeWait_Entry;
+
+/**
+ * @brief Test context for spec:/score/sem/req/seize-wait test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSemReqSeizeWait_Run() parameter.
+ */
+ TQSemContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreSemReqSeizeWait_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreSemReqSeizeWait_Context;
+
+static ScoreSemReqSeizeWait_Context
+ ScoreSemReqSeizeWait_Instance;
+
+static const char * const ScoreSemReqSeizeWait_PreDesc_Count[] = {
+ "Zero",
+ "Positive",
+ "NA"
+};
+
+static const char * const * const ScoreSemReqSeizeWait_PreDesc[] = {
+ ScoreSemReqSeizeWait_PreDesc_Count,
+ NULL
+};
+
+typedef ScoreSemReqSeizeWait_Context Context;
+
+static Status_Control Status( const Context *ctx, Status_Control status )
+{
+ return TQConvertStatus( &ctx->tq_ctx->base, status );
+}
+
+static void GetProperties( TQContext *base, TQWorkerKind enqueued_worker )
+{
+ TQSemContext *ctx;
+ T_thread_timer_state timer_state;
+
+ ctx = (TQSemContext *) base;
+ T_eq_u32(
+ ctx->base.worker_tcb[ enqueued_worker ]->current_state,
+ STATES_WAITING_FOR_SEMAPHORE
+ );
+
+ timer_state = T_get_thread_timer_state(
+ ctx->base.worker_id[ enqueued_worker ]
+ );
+
+ if ( base->wait == TQ_WAIT_TIMED ) {
+ T_eq_int( timer_state, T_THREAD_TIMER_SCHEDULED );
+ } else {
+ T_eq_int( timer_state, T_THREAD_TIMER_INACTIVE );
+ }
+
+ T_eq_u32( TQSemGetCount( ctx ), 0 );
+}
+
+static void ScoreSemReqSeizeWait_Pre_Count_Prepare(
+ ScoreSemReqSeizeWait_Context *ctx,
+ ScoreSemReqSeizeWait_Pre_Count state
+)
+{
+ switch ( state ) {
+ case ScoreSemReqSeizeWait_Pre_Count_Zero: {
+ /*
+ * While the count of the semaphore is zero.
+ */
+ /* Done by TQEnqueuePrepareDefault() */
+ break;
+ }
+
+ case ScoreSemReqSeizeWait_Pre_Count_Positive: {
+ /*
+ * While the count of the semaphore is greater than zero.
+ */
+ TQSemSetCount( ctx->tq_ctx, 1 );
+ break;
+ }
+
+ case ScoreSemReqSeizeWait_Pre_Count_NA:
+ break;
+ }
+}
+
+static void ScoreSemReqSeizeWait_Post_Status_Check(
+ ScoreSemReqSeizeWait_Context *ctx,
+ ScoreSemReqSeizeWait_Post_Status state
+)
+{
+ Status_Control status;
+
+ switch ( state ) {
+ case ScoreSemReqSeizeWait_Post_Status_Ok: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_SUCCESSFUL.
+ */
+ status = TQEnqueue( &ctx->tq_ctx->base, ctx->tq_ctx->base.wait );
+ T_eq_int( status, Status( ctx, STATUS_SUCCESSFUL ) );
+ break;
+ }
+
+ case ScoreSemReqSeizeWait_Post_Status_Enqueued: {
+ /*
+ * Where the thread queue uses the FIFO discipline, the calling thread
+ * shall be enqueued in FIFO order.
+ *
+ * Where the thread queue uses the priority discipline, the calling
+ * thread shall be enqueued in priority order.
+ */
+ switch ( ctx->tq_ctx->base.discipline ) {
+ case TQ_FIFO:
+ ScoreTqReqEnqueueFifo_Run( &ctx->tq_ctx->base );
+ break;
+ case TQ_PRIORITY:
+ ScoreTqReqEnqueuePriority_Run( &ctx->tq_ctx->base );
+ break;
+ default:
+ T_unreachable();
+ break;
+ }
+ break;
+ }
+
+ case ScoreSemReqSeizeWait_Post_Status_NA:
+ break;
+ }
+}
+
+static void ScoreSemReqSeizeWait_Post_Count_Check(
+ ScoreSemReqSeizeWait_Context *ctx,
+ ScoreSemReqSeizeWait_Post_Count state
+)
+{
+ switch ( state ) {
+ case ScoreSemReqSeizeWait_Post_Count_Nop: {
+ /*
+ * The count of the semaphore shall not be modified.
+ */
+ /* Checked by GetProperties() */
+ break;
+ }
+
+ case ScoreSemReqSeizeWait_Post_Count_MinusOne: {
+ /*
+ * The count of the semaphore shall be decremented by one.
+ */
+ T_eq_u32( TQSemGetCount( ctx->tq_ctx ), 0 );
+ break;
+ }
+
+ case ScoreSemReqSeizeWait_Post_Count_NA:
+ break;
+ }
+}
+
+static void ScoreSemReqSeizeWait_Post_Timer_Check(
+ ScoreSemReqSeizeWait_Context *ctx,
+ ScoreSemReqSeizeWait_Post_Timer state
+)
+{
+ switch ( state ) {
+ case ScoreSemReqSeizeWait_Post_Timer_Optional: {
+ /*
+ * Where the directive was called with a timeout in clock ticks, the
+ * thread timer of the calling task shall fire after the specified clock
+ * ticks.
+ *
+ * Where the directive was called without a timeout, the thread timer of
+ * the calling task shall be inactive.
+ */
+ /* Checked by GetProperties() */
+ break;
+ }
+
+ case ScoreSemReqSeizeWait_Post_Timer_No: {
+ /*
+ * The thread timer of the calling task shall be inactive.
+ */
+ T_eq_int(
+ T_get_thread_timer_state( RTEMS_SELF ),
+ T_THREAD_TIMER_INACTIVE
+ );
+ break;
+ }
+
+ case ScoreSemReqSeizeWait_Post_Timer_NA:
+ break;
+ }
+}
+
+static void ScoreSemReqSeizeWait_Prepare( ScoreSemReqSeizeWait_Context *ctx )
+{
+ ctx->tq_ctx->base.enqueue_prepare = TQEnqueuePrepareDefault;
+ ctx->tq_ctx->base.enqueue_done = TQEnqueueDoneDefault;
+ ctx->tq_ctx->base.get_properties = GetProperties;
+}
+
+static void ScoreSemReqSeizeWait_Action( ScoreSemReqSeizeWait_Context *ctx )
+{
+ /* Action performed by Status post-condition */
+}
+
+static const ScoreSemReqSeizeWait_Entry
+ScoreSemReqSeizeWait_Entries[] = {
+ { 0, 0, ScoreSemReqSeizeWait_Post_Status_Enqueued,
+ ScoreSemReqSeizeWait_Post_Count_Nop,
+ ScoreSemReqSeizeWait_Post_Timer_Optional },
+ { 0, 0, ScoreSemReqSeizeWait_Post_Status_Ok,
+ ScoreSemReqSeizeWait_Post_Count_MinusOne,
+ ScoreSemReqSeizeWait_Post_Timer_No }
+};
+
+static const uint8_t
+ScoreSemReqSeizeWait_Map[] = {
+ 0, 1
+};
+
+static size_t ScoreSemReqSeizeWait_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreSemReqSeizeWait_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( ScoreSemReqSeizeWait_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreSemReqSeizeWait_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = ScoreSemReqSeizeWait_Scope,
+ .initial_context = &ScoreSemReqSeizeWait_Instance
+};
+
+static inline ScoreSemReqSeizeWait_Entry ScoreSemReqSeizeWait_PopEntry(
+ ScoreSemReqSeizeWait_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreSemReqSeizeWait_Entries[
+ ScoreSemReqSeizeWait_Map[ index ]
+ ];
+}
+
+static void ScoreSemReqSeizeWait_TestVariant(
+ ScoreSemReqSeizeWait_Context *ctx
+)
+{
+ ScoreSemReqSeizeWait_Pre_Count_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ ScoreSemReqSeizeWait_Action( ctx );
+ ScoreSemReqSeizeWait_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ ScoreSemReqSeizeWait_Post_Count_Check( ctx, ctx->Map.entry.Post_Count );
+ ScoreSemReqSeizeWait_Post_Timer_Check( ctx, ctx->Map.entry.Post_Timer );
+}
+
+static T_fixture_node ScoreSemReqSeizeWait_Node;
+
+static T_remark ScoreSemReqSeizeWait_Remark = {
+ .next = NULL,
+ .remark = "ScoreSemReqSeizeWait"
+};
+
+void ScoreSemReqSeizeWait_Run( TQSemContext *tq_ctx )
+{
+ ScoreSemReqSeizeWait_Context *ctx;
+
+ ctx = &ScoreSemReqSeizeWait_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreSemReqSeizeWait_Node,
+ &ScoreSemReqSeizeWait_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreSemReqSeizeWait_Pre_Count_Zero;
+ ctx->Map.pcs[ 0 ] < ScoreSemReqSeizeWait_Pre_Count_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = ScoreSemReqSeizeWait_PopEntry( ctx );
+ ScoreSemReqSeizeWait_Prepare( ctx );
+ ScoreSemReqSeizeWait_TestVariant( ctx );
+ }
+
+ T_add_remark( &ScoreSemReqSeizeWait_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-sem-seize-wait.h b/testsuites/validation/tr-sem-seize-wait.h
new file mode 100644
index 0000000000..68156abbc7
--- /dev/null
+++ b/testsuites/validation/tr-sem-seize-wait.h
@@ -0,0 +1,103 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSemReqSeizeWait
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_SEM_SEIZE_WAIT_H
+#define _TR_SEM_SEIZE_WAIT_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreSemReqSeizeWait
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreSemReqSeizeWait_Pre_Count_Zero,
+ ScoreSemReqSeizeWait_Pre_Count_Positive,
+ ScoreSemReqSeizeWait_Pre_Count_NA
+} ScoreSemReqSeizeWait_Pre_Count;
+
+typedef enum {
+ ScoreSemReqSeizeWait_Post_Status_Ok,
+ ScoreSemReqSeizeWait_Post_Status_Enqueued,
+ ScoreSemReqSeizeWait_Post_Status_NA
+} ScoreSemReqSeizeWait_Post_Status;
+
+typedef enum {
+ ScoreSemReqSeizeWait_Post_Count_Nop,
+ ScoreSemReqSeizeWait_Post_Count_MinusOne,
+ ScoreSemReqSeizeWait_Post_Count_NA
+} ScoreSemReqSeizeWait_Post_Count;
+
+typedef enum {
+ ScoreSemReqSeizeWait_Post_Timer_Optional,
+ ScoreSemReqSeizeWait_Post_Timer_No,
+ ScoreSemReqSeizeWait_Post_Timer_NA
+} ScoreSemReqSeizeWait_Post_Timer;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the semaphore thread queue context.
+ */
+void ScoreSemReqSeizeWait_Run( TQSemContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_SEM_SEIZE_WAIT_H */
diff --git a/testsuites/validation/tr-sem-surrender.c b/testsuites/validation/tr-sem-surrender.c
new file mode 100644
index 0000000000..d554a33dd2
--- /dev/null
+++ b/testsuites/validation/tr-sem-surrender.c
@@ -0,0 +1,576 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSemReqSurrender
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-sem-surrender.h"
+#include "tr-tq-surrender.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreSemReqSurrender spec:/score/sem/req/surrender
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint16_t Skip : 1;
+ uint16_t Pre_Variant_NA : 1;
+ uint16_t Pre_Discipline_NA : 1;
+ uint16_t Pre_Count_NA : 1;
+ uint16_t Post_Status : 2;
+ uint16_t Post_Surrender : 2;
+ uint16_t Post_Count : 3;
+} ScoreSemReqSurrender_Entry;
+
+/**
+ * @brief Test context for spec:/score/sem/req/surrender test case.
+ */
+typedef struct {
+ /**
+ * @brief This member specifies the semaphore count before the directive
+ * call.
+ */
+ uint32_t count_before;
+
+ /**
+ * @brief This member contains the return status of the directive call.
+ */
+ Status_Control status;
+
+ /**
+ * @brief This member contains the semaphore count after the directive call.
+ */
+ uint32_t count_after;
+
+ /**
+ * @brief If this member is true, then there shall be threads blocked on the
+ * semaphore.
+ */
+ bool blocked;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreSemReqSurrender_Run() parameter.
+ */
+ TQSemContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreSemReqSurrender_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreSemReqSurrender_Context;
+
+static ScoreSemReqSurrender_Context
+ ScoreSemReqSurrender_Instance;
+
+static const char * const ScoreSemReqSurrender_PreDesc_Variant[] = {
+ "Binary",
+ "Counting",
+ "NA"
+};
+
+static const char * const ScoreSemReqSurrender_PreDesc_Discipline[] = {
+ "FIFO",
+ "Priority",
+ "NA"
+};
+
+static const char * const ScoreSemReqSurrender_PreDesc_Count[] = {
+ "LessMax",
+ "Max",
+ "Blocked",
+ "NA"
+};
+
+static const char * const * const ScoreSemReqSurrender_PreDesc[] = {
+ ScoreSemReqSurrender_PreDesc_Variant,
+ ScoreSemReqSurrender_PreDesc_Discipline,
+ ScoreSemReqSurrender_PreDesc_Count,
+ NULL
+};
+
+typedef ScoreSemReqSurrender_Context Context;
+
+static Status_Control Status( const Context *ctx, Status_Control status )
+{
+ return TQConvertStatus( &ctx->tq_ctx->base, status );
+}
+
+static void ScoreSemReqSurrender_Pre_Variant_Prepare(
+ ScoreSemReqSurrender_Context *ctx,
+ ScoreSemReqSurrender_Pre_Variant state
+)
+{
+ switch ( state ) {
+ case ScoreSemReqSurrender_Pre_Variant_Binary: {
+ /*
+ * Where the semaphore is a binary semaphore.
+ */
+ if ( ctx->tq_ctx->variant != TQ_SEM_BINARY ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreSemReqSurrender_Pre_Variant_Counting: {
+ /*
+ * Where the semaphore is a counting semaphore.
+ */
+ if ( ctx->tq_ctx->variant != TQ_SEM_COUNTING ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreSemReqSurrender_Pre_Variant_NA:
+ break;
+ }
+}
+
+static void ScoreSemReqSurrender_Pre_Discipline_Prepare(
+ ScoreSemReqSurrender_Context *ctx,
+ ScoreSemReqSurrender_Pre_Discipline state
+)
+{
+ switch ( state ) {
+ case ScoreSemReqSurrender_Pre_Discipline_FIFO: {
+ /*
+ * Where the thread queue of the semaphore uses the FIFO discipline.
+ */
+ if ( ctx->tq_ctx->base.discipline != TQ_FIFO ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreSemReqSurrender_Pre_Discipline_Priority: {
+ /*
+ * Where the thread queue of the semaphore uses the priority discipline.
+ */
+ if ( ctx->tq_ctx->base.discipline != TQ_PRIORITY ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreSemReqSurrender_Pre_Discipline_NA:
+ break;
+ }
+}
+
+static void ScoreSemReqSurrender_Pre_Count_Prepare(
+ ScoreSemReqSurrender_Context *ctx,
+ ScoreSemReqSurrender_Pre_Count state
+)
+{
+ switch ( state ) {
+ case ScoreSemReqSurrender_Pre_Count_LessMax: {
+ /*
+ * While the count of the semaphore is less than the maximum count.
+ */
+ ctx->blocked = false;
+
+ if ( ctx->tq_ctx->variant == TQ_SEM_BINARY ) {
+ ctx->count_before = 0;
+ } else {
+ ctx->count_before = UINT32_MAX - 1;
+ }
+ break;
+ }
+
+ case ScoreSemReqSurrender_Pre_Count_Max: {
+ /*
+ * While the count of the semaphore is equal to the maximum count.
+ */
+ ctx->blocked = false;
+
+ if ( ctx->tq_ctx->variant == TQ_SEM_BINARY ) {
+ ctx->count_before = 1;
+ } else {
+ ctx->count_before = UINT32_MAX;
+ }
+ break;
+ }
+
+ case ScoreSemReqSurrender_Pre_Count_Blocked: {
+ /*
+ * While the semaphore has threads blocked on the semaphore.
+ */
+ ctx->blocked = true;
+ ctx->count_before = 0;
+ break;
+ }
+
+ case ScoreSemReqSurrender_Pre_Count_NA:
+ break;
+ }
+}
+
+static void ScoreSemReqSurrender_Post_Status_Check(
+ ScoreSemReqSurrender_Context *ctx,
+ ScoreSemReqSurrender_Post_Status state
+)
+{
+ switch ( state ) {
+ case ScoreSemReqSurrender_Post_Status_Ok: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_SUCCESSFUL.
+ */
+ T_eq_int( ctx->status, Status( ctx, STATUS_SUCCESSFUL ) );
+ break;
+ }
+
+ case ScoreSemReqSurrender_Post_Status_MaxCountExceeded: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_MAXIMUM_COUNT_EXCEEDED.
+ */
+ T_eq_int( ctx->status, Status( ctx, STATUS_MAXIMUM_COUNT_EXCEEDED ) );
+ break;
+ }
+
+ case ScoreSemReqSurrender_Post_Status_NA:
+ break;
+ }
+}
+
+static void ScoreSemReqSurrender_Post_Surrender_Check(
+ ScoreSemReqSurrender_Context *ctx,
+ ScoreSemReqSurrender_Post_Surrender state
+)
+{
+ switch ( state ) {
+ case ScoreSemReqSurrender_Post_Surrender_FIFO: {
+ /*
+ * The thread queue of the semaphore shall be surrendered in FIFO order.
+ */
+ ScoreTqReqSurrender_Run( &ctx->tq_ctx->base );
+ break;
+ }
+
+ case ScoreSemReqSurrender_Post_Surrender_Priority: {
+ /*
+ * The thread queue of the semaphore shall be surrendered in priority
+ * order.
+ */
+ ScoreTqReqSurrender_Run( &ctx->tq_ctx->base );
+ break;
+ }
+
+ case ScoreSemReqSurrender_Post_Surrender_NA:
+ break;
+ }
+}
+
+static void ScoreSemReqSurrender_Post_Count_Check(
+ ScoreSemReqSurrender_Context *ctx,
+ ScoreSemReqSurrender_Post_Count state
+)
+{
+ switch ( state ) {
+ case ScoreSemReqSurrender_Post_Count_Zero: {
+ /*
+ * The count of the semaphore shall be zero.
+ */
+ T_eq_u32( ctx->count_after, 0 );
+ break;
+ }
+
+ case ScoreSemReqSurrender_Post_Count_One: {
+ /*
+ * The count of the semaphore shall be one.
+ */
+ T_eq_u32( ctx->count_after, 1 );
+ break;
+ }
+
+ case ScoreSemReqSurrender_Post_Count_PlusOne: {
+ /*
+ * The count of the semaphore shall be incremented by one.
+ */
+ T_eq_u32( ctx->count_after, ctx->count_before + 1 );
+ break;
+ }
+
+ case ScoreSemReqSurrender_Post_Count_Nop: {
+ /*
+ * The count of the semaphore shall not be modified.
+ */
+ T_eq_u32( ctx->count_after, ctx->count_before );
+ break;
+ }
+
+ case ScoreSemReqSurrender_Post_Count_NA:
+ break;
+ }
+}
+
+static void ScoreSemReqSurrender_Setup( ScoreSemReqSurrender_Context *ctx )
+{
+ ctx->tq_ctx->base.wait = TQ_WAIT_FOREVER;
+ TQReset( &ctx->tq_ctx->base );
+}
+
+static void ScoreSemReqSurrender_Setup_Wrap( void *arg )
+{
+ ScoreSemReqSurrender_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreSemReqSurrender_Setup( ctx );
+}
+
+static void ScoreSemReqSurrender_Action( ScoreSemReqSurrender_Context *ctx )
+{
+ TQSemSetCount( ctx->tq_ctx, ctx->count_before );
+
+ if ( ctx->blocked ) {
+ TQSend( &ctx->tq_ctx->base, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE );
+ }
+
+ ctx->status = TQSurrender( &ctx->tq_ctx->base );
+ ctx->count_after = TQSemGetCount( ctx->tq_ctx );
+ TQSemSetCount( ctx->tq_ctx, 1 );
+}
+
+static const ScoreSemReqSurrender_Entry
+ScoreSemReqSurrender_Entries[] = {
+ { 0, 0, 0, 0, ScoreSemReqSurrender_Post_Status_Ok,
+ ScoreSemReqSurrender_Post_Surrender_NA, ScoreSemReqSurrender_Post_Count_One },
+ { 0, 0, 0, 0, ScoreSemReqSurrender_Post_Status_Ok,
+ ScoreSemReqSurrender_Post_Surrender_FIFO,
+ ScoreSemReqSurrender_Post_Count_Zero },
+ { 0, 0, 0, 0, ScoreSemReqSurrender_Post_Status_Ok,
+ ScoreSemReqSurrender_Post_Surrender_Priority,
+ ScoreSemReqSurrender_Post_Count_Zero },
+ { 0, 0, 0, 0, ScoreSemReqSurrender_Post_Status_Ok,
+ ScoreSemReqSurrender_Post_Surrender_NA,
+ ScoreSemReqSurrender_Post_Count_PlusOne },
+ { 0, 0, 0, 0, ScoreSemReqSurrender_Post_Status_MaxCountExceeded,
+ ScoreSemReqSurrender_Post_Surrender_NA, ScoreSemReqSurrender_Post_Count_Nop }
+};
+
+static const uint8_t
+ScoreSemReqSurrender_Map[] = {
+ 0, 0, 1, 0, 0, 2, 3, 4, 1, 3, 4, 2
+};
+
+static size_t ScoreSemReqSurrender_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreSemReqSurrender_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( ScoreSemReqSurrender_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreSemReqSurrender_Fixture = {
+ .setup = ScoreSemReqSurrender_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = ScoreSemReqSurrender_Scope,
+ .initial_context = &ScoreSemReqSurrender_Instance
+};
+
+static const uint8_t ScoreSemReqSurrender_Weights[] = {
+ 6, 3, 1
+};
+
+static void ScoreSemReqSurrender_Skip(
+ ScoreSemReqSurrender_Context *ctx,
+ size_t index
+)
+{
+ switch ( index + 1 ) {
+ case 1:
+ ctx->Map.pcs[ 1 ] = ScoreSemReqSurrender_Pre_Discipline_NA - 1;
+ /* Fall through */
+ case 2:
+ ctx->Map.pcs[ 2 ] = ScoreSemReqSurrender_Pre_Count_NA - 1;
+ break;
+ }
+}
+
+static inline ScoreSemReqSurrender_Entry ScoreSemReqSurrender_PopEntry(
+ ScoreSemReqSurrender_Context *ctx
+)
+{
+ size_t index;
+
+ if ( ctx->Map.skip ) {
+ size_t i;
+
+ ctx->Map.skip = false;
+ index = 0;
+
+ for ( i = 0; i < 3; ++i ) {
+ index += ScoreSemReqSurrender_Weights[ i ] * ctx->Map.pcs[ i ];
+ }
+ } else {
+ index = ctx->Map.index;
+ }
+
+ ctx->Map.index = index + 1;
+
+ return ScoreSemReqSurrender_Entries[
+ ScoreSemReqSurrender_Map[ index ]
+ ];
+}
+
+static void ScoreSemReqSurrender_TestVariant(
+ ScoreSemReqSurrender_Context *ctx
+)
+{
+ ScoreSemReqSurrender_Pre_Variant_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreSemReqSurrender_Skip( ctx, 0 );
+ return;
+ }
+
+ ScoreSemReqSurrender_Pre_Discipline_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreSemReqSurrender_Skip( ctx, 1 );
+ return;
+ }
+
+ ScoreSemReqSurrender_Pre_Count_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ ScoreSemReqSurrender_Action( ctx );
+ ScoreSemReqSurrender_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ ScoreSemReqSurrender_Post_Surrender_Check(
+ ctx,
+ ctx->Map.entry.Post_Surrender
+ );
+ ScoreSemReqSurrender_Post_Count_Check( ctx, ctx->Map.entry.Post_Count );
+}
+
+static T_fixture_node ScoreSemReqSurrender_Node;
+
+static T_remark ScoreSemReqSurrender_Remark = {
+ .next = NULL,
+ .remark = "ScoreSemReqSurrender"
+};
+
+void ScoreSemReqSurrender_Run( TQSemContext *tq_ctx )
+{
+ ScoreSemReqSurrender_Context *ctx;
+
+ ctx = &ScoreSemReqSurrender_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreSemReqSurrender_Node,
+ &ScoreSemReqSurrender_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+ ctx->Map.skip = false;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreSemReqSurrender_Pre_Variant_Binary;
+ ctx->Map.pcs[ 0 ] < ScoreSemReqSurrender_Pre_Variant_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = ScoreSemReqSurrender_Pre_Discipline_FIFO;
+ ctx->Map.pcs[ 1 ] < ScoreSemReqSurrender_Pre_Discipline_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = ScoreSemReqSurrender_Pre_Count_LessMax;
+ ctx->Map.pcs[ 2 ] < ScoreSemReqSurrender_Pre_Count_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ ctx->Map.entry = ScoreSemReqSurrender_PopEntry( ctx );
+ ScoreSemReqSurrender_TestVariant( ctx );
+ }
+ }
+ }
+
+ T_add_remark( &ScoreSemReqSurrender_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-sem-surrender.h b/testsuites/validation/tr-sem-surrender.h
new file mode 100644
index 0000000000..d03fe56b54
--- /dev/null
+++ b/testsuites/validation/tr-sem-surrender.h
@@ -0,0 +1,118 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreSemReqSurrender
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_SEM_SURRENDER_H
+#define _TR_SEM_SURRENDER_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreSemReqSurrender
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreSemReqSurrender_Pre_Variant_Binary,
+ ScoreSemReqSurrender_Pre_Variant_Counting,
+ ScoreSemReqSurrender_Pre_Variant_NA
+} ScoreSemReqSurrender_Pre_Variant;
+
+typedef enum {
+ ScoreSemReqSurrender_Pre_Discipline_FIFO,
+ ScoreSemReqSurrender_Pre_Discipline_Priority,
+ ScoreSemReqSurrender_Pre_Discipline_NA
+} ScoreSemReqSurrender_Pre_Discipline;
+
+typedef enum {
+ ScoreSemReqSurrender_Pre_Count_LessMax,
+ ScoreSemReqSurrender_Pre_Count_Max,
+ ScoreSemReqSurrender_Pre_Count_Blocked,
+ ScoreSemReqSurrender_Pre_Count_NA
+} ScoreSemReqSurrender_Pre_Count;
+
+typedef enum {
+ ScoreSemReqSurrender_Post_Status_Ok,
+ ScoreSemReqSurrender_Post_Status_MaxCountExceeded,
+ ScoreSemReqSurrender_Post_Status_NA
+} ScoreSemReqSurrender_Post_Status;
+
+typedef enum {
+ ScoreSemReqSurrender_Post_Surrender_FIFO,
+ ScoreSemReqSurrender_Post_Surrender_Priority,
+ ScoreSemReqSurrender_Post_Surrender_NA
+} ScoreSemReqSurrender_Post_Surrender;
+
+typedef enum {
+ ScoreSemReqSurrender_Post_Count_Zero,
+ ScoreSemReqSurrender_Post_Count_One,
+ ScoreSemReqSurrender_Post_Count_PlusOne,
+ ScoreSemReqSurrender_Post_Count_Nop,
+ ScoreSemReqSurrender_Post_Count_NA
+} ScoreSemReqSurrender_Post_Count;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue context.
+ */
+void ScoreSemReqSurrender_Run( TQSemContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_SEM_SURRENDER_H */
diff --git a/testsuites/validation/tr-signal-constant.c b/testsuites/validation/tr-signal-constant.c
new file mode 100644
index 0000000000..c8aeb463fd
--- /dev/null
+++ b/testsuites/validation/tr-signal-constant.c
@@ -0,0 +1,206 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSignalValSignalConstant
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+#include "tr-signal-constant.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RtemsSignalValSignalConstant \
+ * spec:/rtems/signal/val/signal-constant
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @brief Tests a signal constant of the @ref RTEMSAPIClassicSignal using the
+ * signal set of the executing task.
+ *
+ * This test case performs the following actions:
+ *
+ * - Validate the signal constant.
+ *
+ * - Check that the signal constant is equal to the integer representation of
+ * the signal in the signal set.
+ *
+ * - Validate the signal delivery.
+ *
+ * - Check that the caught signal set represents exactly the sent signal.
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/rtems/signal/val/signal-constant test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the caught signal set.
+ */
+ rtems_signal_set signal_set;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsSignalValSignalConstant_Run() parameter.
+ */
+ rtems_signal_set signal;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsSignalValSignalConstant_Run() parameter.
+ */
+ int number;
+} RtemsSignalValSignalConstant_Context;
+
+static RtemsSignalValSignalConstant_Context
+ RtemsSignalValSignalConstant_Instance;
+
+typedef RtemsSignalValSignalConstant_Context Context;
+
+static void SignalHandler( rtems_signal_set signal_set )
+{
+ Context *ctx;
+
+ ctx = T_fixture_context();
+ ctx->signal_set = signal_set;
+}
+
+static T_fixture RtemsSignalValSignalConstant_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = NULL,
+ .initial_context = &RtemsSignalValSignalConstant_Instance
+};
+
+/**
+ * @brief Validate the signal constant.
+ */
+static void RtemsSignalValSignalConstant_Action_0(
+ RtemsSignalValSignalConstant_Context *ctx
+)
+{
+ /* No action */
+
+ /*
+ * Check that the signal constant is equal to the integer representation of
+ * the signal in the signal set.
+ */
+ T_step_eq_u32(
+ 0,
+ ctx->signal,
+ ( (rtems_signal_set) 1 ) << ctx->number
+ );
+}
+
+/**
+ * @brief Validate the signal delivery.
+ */
+static void RtemsSignalValSignalConstant_Action_1(
+ RtemsSignalValSignalConstant_Context *ctx
+)
+{
+ rtems_status_code sc;
+
+ ctx->signal_set = 0;
+
+ sc = rtems_signal_catch( NULL, RTEMS_DEFAULT_MODES );
+ T_step_rsc_success( 1, sc );
+
+ sc = rtems_signal_catch( SignalHandler, RTEMS_NO_ASR );
+ T_step_rsc_success( 2, sc );
+
+ sc = rtems_signal_send( RTEMS_SELF, ctx->signal );
+ T_step_rsc_success( 3, sc );
+
+ /*
+ * Check that the caught signal set represents exactly the sent signal.
+ */
+ T_step_eq_u32(
+ 4,
+ ctx->signal_set,
+ ctx->signal
+ );
+}
+
+static T_fixture_node RtemsSignalValSignalConstant_Node;
+
+static T_remark RtemsSignalValSignalConstant_Remark = {
+ .next = NULL,
+ .remark = "RtemsSignalValSignalConstant"
+};
+
+void RtemsSignalValSignalConstant_Run( rtems_signal_set signal, int number )
+{
+ RtemsSignalValSignalConstant_Context *ctx;
+
+ ctx = &RtemsSignalValSignalConstant_Instance;
+ ctx->signal = signal;
+ ctx->number = number;
+
+ ctx = T_push_fixture(
+ &RtemsSignalValSignalConstant_Node,
+ &RtemsSignalValSignalConstant_Fixture
+ );
+
+ T_plan( 5 );
+
+ RtemsSignalValSignalConstant_Action_0( ctx );
+ RtemsSignalValSignalConstant_Action_1( ctx );
+
+ T_add_remark( &RtemsSignalValSignalConstant_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-signal-constant.h b/testsuites/validation/tr-signal-constant.h
new file mode 100644
index 0000000000..a957426213
--- /dev/null
+++ b/testsuites/validation/tr-signal-constant.h
@@ -0,0 +1,81 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RtemsSignalValSignalConstant
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_SIGNAL_CONSTANT_H
+#define _TR_SIGNAL_CONSTANT_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup RtemsSignalValSignalConstant
+ *
+ * @{
+ */
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param signal is the signal constant.
+ *
+ * @param number is the signal number.
+ */
+void RtemsSignalValSignalConstant_Run( rtems_signal_set signal, int number );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_SIGNAL_CONSTANT_H */
diff --git a/testsuites/validation/tr-tq-enqueue-ceiling.c b/testsuites/validation/tr-tq-enqueue-ceiling.c
new file mode 100644
index 0000000000..a0b4077689
--- /dev/null
+++ b/testsuites/validation/tr-tq-enqueue-ceiling.c
@@ -0,0 +1,693 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqEnqueueCeiling
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-tq-enqueue-ceiling.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqEnqueueCeiling spec:/score/tq/req/enqueue-ceiling
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_EligibleScheduler_NA : 1;
+ uint8_t Pre_QueueEligible_NA : 1;
+ uint8_t Pre_QueueIneligible_NA : 1;
+ uint8_t Post_Position : 3;
+} ScoreTqReqEnqueueCeiling_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/enqueue-ceiling test case.
+ */
+typedef struct {
+ /**
+ * @brief This this member is true, then the enqueueing thread shall have at
+ * least one helping scheduler.
+ */
+ bool helping;
+
+ /**
+ * @brief This member specifies the priority of a thread with an eligible
+ * scheduler equal to an eligible scheduler of the enqueueing thread.
+ */
+ rtems_task_priority priority;
+
+ /**
+ * @brief If this member is true, then a thread those eligible schedulers are
+ * ineligible scheduler to the enqueueing task should be enqueued before a
+ * thread with an eligible scheduler equal to an eligible scheduler of the
+ * enqueueing thread.
+ */
+ size_t other_before;
+
+ /**
+ * @brief If this member is true, then a thread those eligible schedulers are
+ * ineligible scheduler to the enqueueing task should be enqueued after a
+ * thread with an eligible scheduler equal to an eligible scheduler of the
+ * enqueueing thread.
+ */
+ size_t other_after;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqEnqueueCeiling_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqEnqueueCeiling_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqEnqueueCeiling_Context;
+
+static ScoreTqReqEnqueueCeiling_Context
+ ScoreTqReqEnqueueCeiling_Instance;
+
+static const char * const ScoreTqReqEnqueueCeiling_PreDesc_EligibleScheduler[] = {
+ "Home",
+ "Helping",
+ "NA"
+};
+
+static const char * const ScoreTqReqEnqueueCeiling_PreDesc_QueueEligible[] = {
+ "None",
+ "Equal",
+ "Low",
+ "NA"
+};
+
+static const char * const ScoreTqReqEnqueueCeiling_PreDesc_QueueIneligible[] = {
+ "None",
+ "Before",
+ "After",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqEnqueueCeiling_PreDesc[] = {
+ ScoreTqReqEnqueueCeiling_PreDesc_EligibleScheduler,
+ ScoreTqReqEnqueueCeiling_PreDesc_QueueEligible,
+ ScoreTqReqEnqueueCeiling_PreDesc_QueueIneligible,
+ NULL
+};
+
+typedef ScoreTqReqEnqueueCeiling_Context Context;
+
+static const rtems_tcb *GetUnblock( Context *ctx, size_t *index )
+{
+ const rtems_tcb *thread;
+
+ do {
+ thread = TQGetNextUnblock( ctx->tq_ctx, index )->thread;
+ } while ( thread == ctx->tq_ctx->runner_tcb );
+
+ return thread;
+}
+
+static const rtems_tcb *GetTCB( Context *ctx, TQWorkerKind worker )
+{
+ return ctx->tq_ctx->worker_tcb[ worker ];
+}
+
+static void AddHelper( TQContext *tq_ctx, rtems_id scheduler_id )
+{
+ TQSend( tq_ctx, TQ_BLOCKER_C, TQ_EVENT_MUTEX_A_OBTAIN );
+ TQSetScheduler( tq_ctx, TQ_BLOCKER_E, scheduler_id, PRIO_LOW );
+ TQSendAndWaitForExecutionStop(
+ tq_ctx,
+ TQ_BLOCKER_E,
+ TQ_EVENT_MUTEX_A_OBTAIN | TQ_EVENT_MUTEX_A_RELEASE
+ );
+}
+
+static void RemoveHelper( TQContext *tq_ctx )
+{
+ TQSend( tq_ctx, TQ_BLOCKER_C, TQ_EVENT_MUTEX_A_RELEASE );
+ TQMutexObtain( tq_ctx, TQ_MUTEX_A );
+ TQMutexRelease( tq_ctx, TQ_MUTEX_A );
+}
+
+static void ScoreTqReqEnqueueCeiling_Pre_EligibleScheduler_Prepare(
+ ScoreTqReqEnqueueCeiling_Context *ctx,
+ ScoreTqReqEnqueueCeiling_Pre_EligibleScheduler state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueueCeiling_Pre_EligibleScheduler_Home: {
+ /*
+ * While the enqueueing thread has no helping scheduler.
+ */
+ ctx->helping = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Pre_EligibleScheduler_Helping: {
+ /*
+ * While the enqueueing thread has at least one helping scheduler.
+ */
+ ctx->helping = true;
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Pre_EligibleScheduler_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueueCeiling_Pre_QueueEligible_Prepare(
+ ScoreTqReqEnqueueCeiling_Context *ctx,
+ ScoreTqReqEnqueueCeiling_Pre_QueueEligible state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueueCeiling_Pre_QueueEligible_None: {
+ /*
+ * While all priority queues of the thread queue associated with eligible
+ * schedulers of the enqueueing thread are empty.
+ */
+ /* This is the default */
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Pre_QueueEligible_Equal: {
+ /*
+ * While a priority queue of the thread queue associated with an eligible
+ * scheduler of the enqueueing thread is non-empty, while the highest
+ * priority of the priority queue is equal to the priority of the
+ * enqueueing thread with respect to the eligible scheduler.
+ */
+ ctx->priority = PRIO_VERY_HIGH;
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Pre_QueueEligible_Low: {
+ /*
+ * While a priority queue of the thread queue associated with an eligible
+ * scheduler of the enqueueing thread is non-empty, while the highest
+ * priority of the priority queue is lower than the priority of the
+ * enqueueing thread with respect to the eligible scheduler.
+ */
+ ctx->priority = PRIO_HIGH;
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Pre_QueueEligible_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueueCeiling_Pre_QueueIneligible_Prepare(
+ ScoreTqReqEnqueueCeiling_Context *ctx,
+ ScoreTqReqEnqueueCeiling_Pre_QueueIneligible state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueueCeiling_Pre_QueueIneligible_None: {
+ /*
+ * While no priority queue of the thread queue exists which is not
+ * associated with an eligible scheduler of the enqueueing thread.
+ */
+ /* This is the default */
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Pre_QueueIneligible_Before: {
+ /*
+ * While a priority queue of the thread queue exists which is not
+ * associated with an eligible scheduler of the enqueueing thread, while
+ * this priority queue is positioned before all priority queues which are
+ * associated with eligible schedulers of the enqueueing thread.
+ */
+ ctx->other_before = true;
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Pre_QueueIneligible_After: {
+ /*
+ * While a priority queue of the thread queue exists which is not
+ * associated with an eligible scheduler of the enqueueing thread, while
+ * this priority queue is positioned after all priority queues which are
+ * associated with eligible schedulers of the enqueueing thread.
+ */
+ ctx->other_after = true;
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Pre_QueueIneligible_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueueCeiling_Post_Position_Check(
+ ScoreTqReqEnqueueCeiling_Context *ctx,
+ ScoreTqReqEnqueueCeiling_Post_Position state
+)
+{
+ size_t i;
+
+ i = 0;
+
+ /* Event receives */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) );
+
+ switch ( state ) {
+ case ScoreTqReqEnqueueCeiling_Post_Position_InitialFirst: {
+ /*
+ * A priority queue associated with the scheduler which contains exactly
+ * the enqueueing thread shall be created as the first priority queue of
+ * the thread queue.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Post_Position_First: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Post_Position_Second: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Post_Position_FirstFirst: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ *
+ * The position of the priority queue in the thread queue shall not
+ * change.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Post_Position_SecondFirst: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ *
+ * The position of the priority queue in the thread queue shall not
+ * change.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Post_Position_SecondQueue: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ *
+ * The position of the priority queue in the thread queue shall not
+ * change.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueueCeiling_Post_Position_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueueCeiling_Setup(
+ ScoreTqReqEnqueueCeiling_Context *ctx
+)
+{
+ rtems_id scheduler_id;
+
+ scheduler_id = SCHEDULER_A_ID;
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_A, scheduler_id, PRIO_VERY_HIGH );
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_B, scheduler_id, PRIO_VERY_HIGH );
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_C, scheduler_id, PRIO_VERY_HIGH );
+ #if defined( RTEMS_SMP )
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_D, SCHEDULER_B_ID, PRIO_LOW );
+ #endif
+}
+
+static void ScoreTqReqEnqueueCeiling_Setup_Wrap( void *arg )
+{
+ ScoreTqReqEnqueueCeiling_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqEnqueueCeiling_Setup( ctx );
+}
+
+static void ScoreTqReqEnqueueCeiling_Teardown(
+ ScoreTqReqEnqueueCeiling_Context *ctx
+)
+{
+ TQReset( ctx->tq_ctx );
+}
+
+static void ScoreTqReqEnqueueCeiling_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqEnqueueCeiling_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqEnqueueCeiling_Teardown( ctx );
+}
+
+static void ScoreTqReqEnqueueCeiling_Prepare(
+ ScoreTqReqEnqueueCeiling_Context *ctx
+)
+{
+ ctx->priority = PRIO_PSEUDO_ISR;
+ ctx->other_before = false;
+ ctx->other_after = false;
+}
+
+static void ScoreTqReqEnqueueCeiling_Action(
+ ScoreTqReqEnqueueCeiling_Context *ctx
+)
+{
+ Status_Control status;
+
+ if ( ctx->priority == PRIO_PSEUDO_ISR ) {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE );
+ } else {
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_B , ctx->priority );
+
+ if ( ctx->other_before || ctx->other_after ) {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_MUTEX_B_OBTAIN );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_D,
+ TQ_EVENT_MUTEX_B_OBTAIN | TQ_EVENT_MUTEX_B_RELEASE |
+ TQ_EVENT_RUNNER_SYNC
+ );
+
+ if ( ctx->other_before ) {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_C, TQ_EVENT_ENQUEUE );
+ }
+
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE );
+ TQSend(
+ ctx->tq_ctx,
+ TQ_BLOCKER_B,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER
+ );
+
+ if ( ctx->other_before ) {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_C, TQ_EVENT_SURRENDER );
+ }
+ } else {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE );
+ TQSend(
+ ctx->tq_ctx,
+ TQ_BLOCKER_B,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER
+ );
+ }
+ }
+
+ if ( ctx->helping ) {
+ if ( ctx->other_before || ctx->other_after ) {
+ if ( rtems_scheduler_get_processor_maximum() > 2 ) {
+ AddHelper( ctx->tq_ctx, SCHEDULER_C_ID );
+ }
+ } else {
+ AddHelper( ctx->tq_ctx, SCHEDULER_B_ID );
+ }
+ }
+
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_C, TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_SURRENDER );
+ status = TQEnqueue( ctx->tq_ctx, TQ_WAIT_FOREVER );
+ T_eq_int( status, TQConvertStatus( ctx->tq_ctx, STATUS_SUCCESSFUL ) );
+ TQSchedulerRecordStop( ctx->tq_ctx );
+ status = TQSurrender( ctx->tq_ctx );
+ T_eq_int( status, TQConvertStatus( ctx->tq_ctx, STATUS_SUCCESSFUL ) );
+
+ if (
+ ctx->priority != PRIO_PSEUDO_ISR &&
+ ( ctx->other_before || ctx->other_after )
+ ) {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_MUTEX_B_RELEASE );
+ TQSynchronizeRunner();
+ }
+
+ if ( ctx->helping ) {
+ if ( ctx->other_before || ctx->other_after ) {
+ if ( rtems_scheduler_get_processor_maximum() > 2 ) {
+ RemoveHelper( ctx->tq_ctx );
+ }
+ } else {
+ RemoveHelper( ctx->tq_ctx );
+ }
+ }
+}
+
+static const ScoreTqReqEnqueueCeiling_Entry
+ScoreTqReqEnqueueCeiling_Entries[] = {
+ { 1, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_NA },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_SecondQueue },
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_SecondFirst },
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_FirstFirst },
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_NA },
+#endif
+ { 0, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_InitialFirst },
+ { 0, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_Second },
+ { 0, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_First },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_InitialFirst },
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_Second },
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_First }
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueueCeiling_Post_Position_NA }
+#endif
+};
+
+static const uint8_t
+ScoreTqReqEnqueueCeiling_Map[] = {
+ 4, 0, 0, 5, 1, 2, 6, 1, 3, 7, 0, 0, 8, 1, 2, 9, 1, 3
+};
+
+static size_t ScoreTqReqEnqueueCeiling_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreTqReqEnqueueCeiling_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ ScoreTqReqEnqueueCeiling_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqEnqueueCeiling_Fixture = {
+ .setup = ScoreTqReqEnqueueCeiling_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqEnqueueCeiling_Teardown_Wrap,
+ .scope = ScoreTqReqEnqueueCeiling_Scope,
+ .initial_context = &ScoreTqReqEnqueueCeiling_Instance
+};
+
+static inline ScoreTqReqEnqueueCeiling_Entry ScoreTqReqEnqueueCeiling_PopEntry(
+ ScoreTqReqEnqueueCeiling_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreTqReqEnqueueCeiling_Entries[
+ ScoreTqReqEnqueueCeiling_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqEnqueueCeiling_TestVariant(
+ ScoreTqReqEnqueueCeiling_Context *ctx
+)
+{
+ ScoreTqReqEnqueueCeiling_Pre_EligibleScheduler_Prepare(
+ ctx,
+ ctx->Map.pcs[ 0 ]
+ );
+ ScoreTqReqEnqueueCeiling_Pre_QueueEligible_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ ScoreTqReqEnqueueCeiling_Pre_QueueIneligible_Prepare(
+ ctx,
+ ctx->Map.pcs[ 2 ]
+ );
+ ScoreTqReqEnqueueCeiling_Action( ctx );
+ ScoreTqReqEnqueueCeiling_Post_Position_Check(
+ ctx,
+ ctx->Map.entry.Post_Position
+ );
+}
+
+static T_fixture_node ScoreTqReqEnqueueCeiling_Node;
+
+static T_remark ScoreTqReqEnqueueCeiling_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqEnqueueCeiling"
+};
+
+void ScoreTqReqEnqueueCeiling_Run( TQContext *tq_ctx )
+{
+ ScoreTqReqEnqueueCeiling_Context *ctx;
+
+ ctx = &ScoreTqReqEnqueueCeiling_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqEnqueueCeiling_Node,
+ &ScoreTqReqEnqueueCeiling_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreTqReqEnqueueCeiling_Pre_EligibleScheduler_Home;
+ ctx->Map.pcs[ 0 ] < ScoreTqReqEnqueueCeiling_Pre_EligibleScheduler_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = ScoreTqReqEnqueueCeiling_Pre_QueueEligible_None;
+ ctx->Map.pcs[ 1 ] < ScoreTqReqEnqueueCeiling_Pre_QueueEligible_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = ScoreTqReqEnqueueCeiling_Pre_QueueIneligible_None;
+ ctx->Map.pcs[ 2 ] < ScoreTqReqEnqueueCeiling_Pre_QueueIneligible_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqEnqueueCeiling_PopEntry( ctx );
+ ScoreTqReqEnqueueCeiling_Prepare( ctx );
+ ScoreTqReqEnqueueCeiling_TestVariant( ctx );
+ }
+ }
+ }
+
+ T_add_remark( &ScoreTqReqEnqueueCeiling_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-enqueue-ceiling.h b/testsuites/validation/tr-tq-enqueue-ceiling.h
new file mode 100644
index 0000000000..3f61865791
--- /dev/null
+++ b/testsuites/validation/tr-tq-enqueue-ceiling.h
@@ -0,0 +1,109 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqEnqueueCeiling
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_ENQUEUE_CEILING_H
+#define _TR_TQ_ENQUEUE_CEILING_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqEnqueueCeiling
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqEnqueueCeiling_Pre_EligibleScheduler_Home,
+ ScoreTqReqEnqueueCeiling_Pre_EligibleScheduler_Helping,
+ ScoreTqReqEnqueueCeiling_Pre_EligibleScheduler_NA
+} ScoreTqReqEnqueueCeiling_Pre_EligibleScheduler;
+
+typedef enum {
+ ScoreTqReqEnqueueCeiling_Pre_QueueEligible_None,
+ ScoreTqReqEnqueueCeiling_Pre_QueueEligible_Equal,
+ ScoreTqReqEnqueueCeiling_Pre_QueueEligible_Low,
+ ScoreTqReqEnqueueCeiling_Pre_QueueEligible_NA
+} ScoreTqReqEnqueueCeiling_Pre_QueueEligible;
+
+typedef enum {
+ ScoreTqReqEnqueueCeiling_Pre_QueueIneligible_None,
+ ScoreTqReqEnqueueCeiling_Pre_QueueIneligible_Before,
+ ScoreTqReqEnqueueCeiling_Pre_QueueIneligible_After,
+ ScoreTqReqEnqueueCeiling_Pre_QueueIneligible_NA
+} ScoreTqReqEnqueueCeiling_Pre_QueueIneligible;
+
+typedef enum {
+ ScoreTqReqEnqueueCeiling_Post_Position_InitialFirst,
+ ScoreTqReqEnqueueCeiling_Post_Position_First,
+ ScoreTqReqEnqueueCeiling_Post_Position_Second,
+ ScoreTqReqEnqueueCeiling_Post_Position_FirstFirst,
+ ScoreTqReqEnqueueCeiling_Post_Position_SecondFirst,
+ ScoreTqReqEnqueueCeiling_Post_Position_SecondQueue,
+ ScoreTqReqEnqueueCeiling_Post_Position_NA
+} ScoreTqReqEnqueueCeiling_Post_Position;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue context.
+ */
+void ScoreTqReqEnqueueCeiling_Run( TQContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_ENQUEUE_CEILING_H */
diff --git a/testsuites/validation/tr-tq-enqueue-deadlock.c b/testsuites/validation/tr-tq-enqueue-deadlock.c
new file mode 100644
index 0000000000..7f61cbc444
--- /dev/null
+++ b/testsuites/validation/tr-tq-enqueue-deadlock.c
@@ -0,0 +1,447 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqEnqueueDeadlock
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-tq-enqueue-deadlock.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqEnqueueDeadlock spec:/score/tq/req/enqueue-deadlock
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Notification_NA : 1;
+ uint8_t Pre_Deadlock_NA : 1;
+ uint8_t Post_Result : 2;
+} ScoreTqReqEnqueueDeadlock_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/enqueue-deadlock test case.
+ */
+typedef struct {
+ /**
+ * @brief If this member is true, then more than one mutex shall be used for
+ * the deadlock scenario.
+ */
+ bool more;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqEnqueueDeadlock_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqEnqueueDeadlock_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqEnqueueDeadlock_Context;
+
+static ScoreTqReqEnqueueDeadlock_Context
+ ScoreTqReqEnqueueDeadlock_Instance;
+
+static const char * const ScoreTqReqEnqueueDeadlock_PreDesc_Notification[] = {
+ "Status",
+ "Fatal",
+ "NA"
+};
+
+static const char * const ScoreTqReqEnqueueDeadlock_PreDesc_Deadlock[] = {
+ "One",
+ "More",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqEnqueueDeadlock_PreDesc[] = {
+ ScoreTqReqEnqueueDeadlock_PreDesc_Notification,
+ ScoreTqReqEnqueueDeadlock_PreDesc_Deadlock,
+ NULL
+};
+
+static void ScoreTqReqEnqueueDeadlock_Pre_Notification_Prepare(
+ ScoreTqReqEnqueueDeadlock_Context *ctx,
+ ScoreTqReqEnqueueDeadlock_Pre_Notification state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueueDeadlock_Pre_Notification_Status: {
+ /*
+ * Where a detected deadlock results in a return with a status code.
+ */
+ if ( ctx->tq_ctx->deadlock != TQ_DEADLOCK_STATUS ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqEnqueueDeadlock_Pre_Notification_Fatal: {
+ /*
+ * Where a detected deadlock results in a fatal error.
+ */
+ if ( ctx->tq_ctx->deadlock != TQ_DEADLOCK_FATAL ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqEnqueueDeadlock_Pre_Notification_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueueDeadlock_Pre_Deadlock_Prepare(
+ ScoreTqReqEnqueueDeadlock_Context *ctx,
+ ScoreTqReqEnqueueDeadlock_Pre_Deadlock state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueueDeadlock_Pre_Deadlock_One: {
+ /*
+ * While the owner of the thread queue is enqueued on another thread
+ * queue owned by the calling thread.
+ */
+ ctx->more = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueueDeadlock_Pre_Deadlock_More: {
+ /*
+ * While the owner of the thread queue is enqueued on another thread
+ * queue owned by a thread other than the calling thread, and so on,
+ * while the owner of the last thread queue of this dependency chain is
+ * enqueued on a thread queue owned by the calling thread.
+ */
+ ctx->more = true;
+ break;
+ }
+
+ case ScoreTqReqEnqueueDeadlock_Pre_Deadlock_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueueDeadlock_Post_Result_Check(
+ ScoreTqReqEnqueueDeadlock_Context *ctx,
+ ScoreTqReqEnqueueDeadlock_Post_Result state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueueDeadlock_Post_Result_Status: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_DEADLOCK.
+ */
+ /* Checked by action */
+ break;
+ }
+
+ case ScoreTqReqEnqueueDeadlock_Post_Result_Fatal: {
+ /*
+ * The system shall terminate with the INTERNAL_ERROR_CORE fatal source
+ * and the INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK fatal code.
+ */
+ /* Checked by action */
+ break;
+ }
+
+ case ScoreTqReqEnqueueDeadlock_Post_Result_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueueDeadlock_Action(
+ ScoreTqReqEnqueueDeadlock_Context *ctx
+)
+{
+ Status_Control status;
+
+ if ( ctx->tq_ctx->enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_A, SCHEDULER_B_ID, PRIO_NORMAL );
+ } else {
+ TQSetScheduler(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ SCHEDULER_A_ID,
+ PRIO_VERY_HIGH
+ );
+ }
+
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_B, SCHEDULER_A_ID, PRIO_HIGH );
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_C, SCHEDULER_A_ID, PRIO_HIGH );
+
+ TQSortMutexesByID( ctx->tq_ctx );
+ TQMutexObtain( ctx->tq_ctx, TQ_MUTEX_C );
+ TQSendAndWaitForExecutionStop( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE );
+
+ if ( ctx->more ) {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_MUTEX_A_OBTAIN );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_MUTEX_C_OBTAIN );
+ Yield();
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_C, TQ_EVENT_MUTEX_B_OBTAIN );
+ Yield();
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_C, TQ_EVENT_MUTEX_A_OBTAIN );
+ Yield();
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ TQ_EVENT_MUTEX_B_OBTAIN
+ );
+ } else {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ TQ_EVENT_MUTEX_C_OBTAIN
+ );
+ }
+
+ if ( ctx->tq_ctx->deadlock == TQ_DEADLOCK_FATAL ) {
+ status = TQEnqueueFatal( ctx->tq_ctx );
+ T_eq_int( status, STATUS_DEADLOCK );
+ } else {
+ status = TQEnqueue( ctx->tq_ctx, TQ_WAIT_FOREVER );
+ T_eq_int( status, TQConvertStatus( ctx->tq_ctx, STATUS_DEADLOCK ) );
+ }
+
+ TQMutexRelease( ctx->tq_ctx, TQ_MUTEX_C );
+
+ if ( ctx->more ) {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_MUTEX_C_RELEASE );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_MUTEX_A_RELEASE );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_C, TQ_EVENT_MUTEX_A_RELEASE );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_C, TQ_EVENT_MUTEX_B_RELEASE );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_MUTEX_B_RELEASE );
+ } else {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_MUTEX_C_RELEASE );
+ }
+
+ if ( ctx->tq_ctx->enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ TQSend(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ TQ_EVENT_SURRENDER | TQ_EVENT_RUNNER_SYNC
+ );
+ TQSynchronizeRunner();
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_A, SCHEDULER_A_ID, PRIO_HIGH );
+ } else {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_SURRENDER );
+ }
+}
+
+static const ScoreTqReqEnqueueDeadlock_Entry
+ScoreTqReqEnqueueDeadlock_Entries[] = {
+ { 0, 0, 0, ScoreTqReqEnqueueDeadlock_Post_Result_Status },
+ { 0, 0, 0, ScoreTqReqEnqueueDeadlock_Post_Result_Fatal }
+};
+
+static const uint8_t
+ScoreTqReqEnqueueDeadlock_Map[] = {
+ 0, 0, 1, 1
+};
+
+static size_t ScoreTqReqEnqueueDeadlock_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreTqReqEnqueueDeadlock_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ ScoreTqReqEnqueueDeadlock_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqEnqueueDeadlock_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = ScoreTqReqEnqueueDeadlock_Scope,
+ .initial_context = &ScoreTqReqEnqueueDeadlock_Instance
+};
+
+static const uint8_t ScoreTqReqEnqueueDeadlock_Weights[] = {
+ 2, 1
+};
+
+static void ScoreTqReqEnqueueDeadlock_Skip(
+ ScoreTqReqEnqueueDeadlock_Context *ctx,
+ size_t index
+)
+{
+ switch ( index + 1 ) {
+ case 1:
+ ctx->Map.pcs[ 1 ] = ScoreTqReqEnqueueDeadlock_Pre_Deadlock_NA - 1;
+ break;
+ }
+}
+
+static inline ScoreTqReqEnqueueDeadlock_Entry
+ScoreTqReqEnqueueDeadlock_PopEntry( ScoreTqReqEnqueueDeadlock_Context *ctx )
+{
+ size_t index;
+
+ if ( ctx->Map.skip ) {
+ size_t i;
+
+ ctx->Map.skip = false;
+ index = 0;
+
+ for ( i = 0; i < 2; ++i ) {
+ index += ScoreTqReqEnqueueDeadlock_Weights[ i ] * ctx->Map.pcs[ i ];
+ }
+ } else {
+ index = ctx->Map.index;
+ }
+
+ ctx->Map.index = index + 1;
+
+ return ScoreTqReqEnqueueDeadlock_Entries[
+ ScoreTqReqEnqueueDeadlock_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqEnqueueDeadlock_TestVariant(
+ ScoreTqReqEnqueueDeadlock_Context *ctx
+)
+{
+ ScoreTqReqEnqueueDeadlock_Pre_Notification_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreTqReqEnqueueDeadlock_Skip( ctx, 0 );
+ return;
+ }
+
+ ScoreTqReqEnqueueDeadlock_Pre_Deadlock_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ ScoreTqReqEnqueueDeadlock_Action( ctx );
+ ScoreTqReqEnqueueDeadlock_Post_Result_Check(
+ ctx,
+ ctx->Map.entry.Post_Result
+ );
+}
+
+static T_fixture_node ScoreTqReqEnqueueDeadlock_Node;
+
+static T_remark ScoreTqReqEnqueueDeadlock_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqEnqueueDeadlock"
+};
+
+void ScoreTqReqEnqueueDeadlock_Run( TQContext *tq_ctx )
+{
+ ScoreTqReqEnqueueDeadlock_Context *ctx;
+
+ ctx = &ScoreTqReqEnqueueDeadlock_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqEnqueueDeadlock_Node,
+ &ScoreTqReqEnqueueDeadlock_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+ ctx->Map.skip = false;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreTqReqEnqueueDeadlock_Pre_Notification_Status;
+ ctx->Map.pcs[ 0 ] < ScoreTqReqEnqueueDeadlock_Pre_Notification_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = ScoreTqReqEnqueueDeadlock_Pre_Deadlock_One;
+ ctx->Map.pcs[ 1 ] < ScoreTqReqEnqueueDeadlock_Pre_Deadlock_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqEnqueueDeadlock_PopEntry( ctx );
+ ScoreTqReqEnqueueDeadlock_TestVariant( ctx );
+ }
+ }
+
+ T_add_remark( &ScoreTqReqEnqueueDeadlock_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-enqueue-deadlock.h b/testsuites/validation/tr-tq-enqueue-deadlock.h
new file mode 100644
index 0000000000..1fe580a19c
--- /dev/null
+++ b/testsuites/validation/tr-tq-enqueue-deadlock.h
@@ -0,0 +1,97 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqEnqueueDeadlock
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_ENQUEUE_DEADLOCK_H
+#define _TR_TQ_ENQUEUE_DEADLOCK_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqEnqueueDeadlock
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqEnqueueDeadlock_Pre_Notification_Status,
+ ScoreTqReqEnqueueDeadlock_Pre_Notification_Fatal,
+ ScoreTqReqEnqueueDeadlock_Pre_Notification_NA
+} ScoreTqReqEnqueueDeadlock_Pre_Notification;
+
+typedef enum {
+ ScoreTqReqEnqueueDeadlock_Pre_Deadlock_One,
+ ScoreTqReqEnqueueDeadlock_Pre_Deadlock_More,
+ ScoreTqReqEnqueueDeadlock_Pre_Deadlock_NA
+} ScoreTqReqEnqueueDeadlock_Pre_Deadlock;
+
+typedef enum {
+ ScoreTqReqEnqueueDeadlock_Post_Result_Status,
+ ScoreTqReqEnqueueDeadlock_Post_Result_Fatal,
+ ScoreTqReqEnqueueDeadlock_Post_Result_NA
+} ScoreTqReqEnqueueDeadlock_Post_Result;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue context.
+ */
+void ScoreTqReqEnqueueDeadlock_Run( TQContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_ENQUEUE_DEADLOCK_H */
diff --git a/testsuites/validation/tr-tq-enqueue-fifo.c b/testsuites/validation/tr-tq-enqueue-fifo.c
new file mode 100644
index 0000000000..27ac064797
--- /dev/null
+++ b/testsuites/validation/tr-tq-enqueue-fifo.c
@@ -0,0 +1,340 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqEnqueueFifo
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-tq-enqueue-fifo.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqEnqueueFifo spec:/score/tq/req/enqueue-fifo
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Queue_NA : 1;
+ uint8_t Post_Position : 2;
+} ScoreTqReqEnqueueFifo_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/enqueue-fifo test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqEnqueueFifo_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqEnqueueFifo_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqEnqueueFifo_Context;
+
+static ScoreTqReqEnqueueFifo_Context
+ ScoreTqReqEnqueueFifo_Instance;
+
+static const char * const ScoreTqReqEnqueueFifo_PreDesc_Queue[] = {
+ "Empty",
+ "NonEmpty",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqEnqueueFifo_PreDesc[] = {
+ ScoreTqReqEnqueueFifo_PreDesc_Queue,
+ NULL
+};
+
+typedef ScoreTqReqEnqueueFifo_Context Context;
+
+static const rtems_tcb *GetUnblock( Context *ctx, size_t *index )
+{
+ return TQGetNextUnblock( ctx->tq_ctx, index )->thread;
+}
+
+static const rtems_tcb *GetTCB( Context *ctx, TQWorkerKind worker )
+{
+ return ctx->tq_ctx->worker_tcb[ worker ];
+}
+
+static void ScoreTqReqEnqueueFifo_Pre_Queue_Prepare(
+ ScoreTqReqEnqueueFifo_Context *ctx,
+ ScoreTqReqEnqueueFifo_Pre_Queue state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueueFifo_Pre_Queue_Empty: {
+ /*
+ * While the queue is empty.
+ */
+ ctx->tq_ctx->how_many = 1;
+ break;
+ }
+
+ case ScoreTqReqEnqueueFifo_Pre_Queue_NonEmpty: {
+ /*
+ * While the queue is non-empty.
+ */
+ ctx->tq_ctx->how_many = 2;
+ break;
+ }
+
+ case ScoreTqReqEnqueueFifo_Pre_Queue_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueueFifo_Post_Position_Check(
+ ScoreTqReqEnqueueFifo_Context *ctx,
+ ScoreTqReqEnqueueFifo_Post_Position state
+)
+{
+ size_t i;
+
+ i = 0;
+
+ /* Event receives */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) );
+
+ switch ( state ) {
+ case ScoreTqReqEnqueueFifo_Post_Position_First: {
+ /*
+ * The thread shall be the first thread in the queue.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueueFifo_Post_Position_Last: {
+ /*
+ * The thread shall be the last thread in the queue.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueueFifo_Post_Position_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueueFifo_Setup( ScoreTqReqEnqueueFifo_Context *ctx )
+{
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_A, PRIO_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_B, PRIO_VERY_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_C, PRIO_ULTRA_HIGH );
+}
+
+static void ScoreTqReqEnqueueFifo_Setup_Wrap( void *arg )
+{
+ ScoreTqReqEnqueueFifo_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqEnqueueFifo_Setup( ctx );
+}
+
+static void ScoreTqReqEnqueueFifo_Teardown(
+ ScoreTqReqEnqueueFifo_Context *ctx
+)
+{
+ TQReset( ctx->tq_ctx );
+}
+
+static void ScoreTqReqEnqueueFifo_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqEnqueueFifo_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqEnqueueFifo_Teardown( ctx );
+}
+
+static void ScoreTqReqEnqueueFifo_Action( ScoreTqReqEnqueueFifo_Context *ctx )
+{
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE_PREPARE );
+
+ if ( ctx->tq_ctx->how_many >= 2 ) {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER );
+ }
+
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_C, TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE_DONE );
+ TQSchedulerRecordStop( ctx->tq_ctx );
+}
+
+static const ScoreTqReqEnqueueFifo_Entry
+ScoreTqReqEnqueueFifo_Entries[] = {
+ { 0, 0, ScoreTqReqEnqueueFifo_Post_Position_First },
+ { 0, 0, ScoreTqReqEnqueueFifo_Post_Position_Last }
+};
+
+static const uint8_t
+ScoreTqReqEnqueueFifo_Map[] = {
+ 0, 1
+};
+
+static size_t ScoreTqReqEnqueueFifo_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreTqReqEnqueueFifo_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( ScoreTqReqEnqueueFifo_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqEnqueueFifo_Fixture = {
+ .setup = ScoreTqReqEnqueueFifo_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqEnqueueFifo_Teardown_Wrap,
+ .scope = ScoreTqReqEnqueueFifo_Scope,
+ .initial_context = &ScoreTqReqEnqueueFifo_Instance
+};
+
+static inline ScoreTqReqEnqueueFifo_Entry ScoreTqReqEnqueueFifo_PopEntry(
+ ScoreTqReqEnqueueFifo_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreTqReqEnqueueFifo_Entries[
+ ScoreTqReqEnqueueFifo_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqEnqueueFifo_TestVariant(
+ ScoreTqReqEnqueueFifo_Context *ctx
+)
+{
+ ScoreTqReqEnqueueFifo_Pre_Queue_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ ScoreTqReqEnqueueFifo_Action( ctx );
+ ScoreTqReqEnqueueFifo_Post_Position_Check(
+ ctx,
+ ctx->Map.entry.Post_Position
+ );
+}
+
+static T_fixture_node ScoreTqReqEnqueueFifo_Node;
+
+static T_remark ScoreTqReqEnqueueFifo_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqEnqueueFifo"
+};
+
+void ScoreTqReqEnqueueFifo_Run( TQContext *tq_ctx )
+{
+ ScoreTqReqEnqueueFifo_Context *ctx;
+
+ ctx = &ScoreTqReqEnqueueFifo_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqEnqueueFifo_Node,
+ &ScoreTqReqEnqueueFifo_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreTqReqEnqueueFifo_Pre_Queue_Empty;
+ ctx->Map.pcs[ 0 ] < ScoreTqReqEnqueueFifo_Pre_Queue_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqEnqueueFifo_PopEntry( ctx );
+ ScoreTqReqEnqueueFifo_TestVariant( ctx );
+ }
+
+ T_add_remark( &ScoreTqReqEnqueueFifo_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-enqueue-fifo.h b/testsuites/validation/tr-tq-enqueue-fifo.h
new file mode 100644
index 0000000000..16a37ecf2b
--- /dev/null
+++ b/testsuites/validation/tr-tq-enqueue-fifo.h
@@ -0,0 +1,91 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqEnqueueFifo
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_ENQUEUE_FIFO_H
+#define _TR_TQ_ENQUEUE_FIFO_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqEnqueueFifo
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqEnqueueFifo_Pre_Queue_Empty,
+ ScoreTqReqEnqueueFifo_Pre_Queue_NonEmpty,
+ ScoreTqReqEnqueueFifo_Pre_Queue_NA
+} ScoreTqReqEnqueueFifo_Pre_Queue;
+
+typedef enum {
+ ScoreTqReqEnqueueFifo_Post_Position_First,
+ ScoreTqReqEnqueueFifo_Post_Position_Last,
+ ScoreTqReqEnqueueFifo_Post_Position_NA
+} ScoreTqReqEnqueueFifo_Post_Position;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue test context.
+ */
+void ScoreTqReqEnqueueFifo_Run( TQContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_ENQUEUE_FIFO_H */
diff --git a/testsuites/validation/tr-tq-enqueue-mrsp.c b/testsuites/validation/tr-tq-enqueue-mrsp.c
new file mode 100644
index 0000000000..14f1f17713
--- /dev/null
+++ b/testsuites/validation/tr-tq-enqueue-mrsp.c
@@ -0,0 +1,658 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqEnqueueMrsp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-tq-enqueue-mrsp.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqEnqueueMrsp spec:/score/tq/req/enqueue-mrsp
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_EligibleScheduler_NA : 1;
+ uint8_t Pre_QueueEligible_NA : 1;
+ uint8_t Pre_QueueIneligible_NA : 1;
+ uint8_t Post_Position : 3;
+} ScoreTqReqEnqueueMrsp_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/enqueue-mrsp test case.
+ */
+typedef struct {
+ /**
+ * @brief This this member is true, then the enqueueing thread shall have at
+ * least one helping scheduler which is an ineligible scheduler for the
+ * already enqueued threads.
+ */
+ bool helping;
+
+ /**
+ * @brief This member specifies the priority of an already enqueued thread
+ * with an eligible scheduler equal to an eligible scheduler of the
+ * enqueueing thread.
+ */
+ rtems_task_priority priority;
+
+ /**
+ * @brief If this member is true, then a thread those eligible schedulers are
+ * ineligible scheduler to the enqueueing task should be enqueued before a
+ * thread with an eligible scheduler equal to an eligible scheduler of the
+ * enqueueing thread.
+ */
+ size_t other_before;
+
+ /**
+ * @brief If this member is true, then a thread those eligible schedulers are
+ * ineligible scheduler to the enqueueing task should be enqueued after a
+ * thread with an eligible scheduler equal to an eligible scheduler of the
+ * enqueueing thread.
+ */
+ size_t other_after;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqEnqueueMrsp_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqEnqueueMrsp_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqEnqueueMrsp_Context;
+
+static ScoreTqReqEnqueueMrsp_Context
+ ScoreTqReqEnqueueMrsp_Instance;
+
+static const char * const ScoreTqReqEnqueueMrsp_PreDesc_EligibleScheduler[] = {
+ "Home",
+ "Helping",
+ "NA"
+};
+
+static const char * const ScoreTqReqEnqueueMrsp_PreDesc_QueueEligible[] = {
+ "None",
+ "Equal",
+ "Low",
+ "NA"
+};
+
+static const char * const ScoreTqReqEnqueueMrsp_PreDesc_QueueIneligible[] = {
+ "None",
+ "Only",
+ "Before",
+ "After",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqEnqueueMrsp_PreDesc[] = {
+ ScoreTqReqEnqueueMrsp_PreDesc_EligibleScheduler,
+ ScoreTqReqEnqueueMrsp_PreDesc_QueueEligible,
+ ScoreTqReqEnqueueMrsp_PreDesc_QueueIneligible,
+ NULL
+};
+
+/*
+ * The MrsP locking protocol uses a sticky thread queue enqueue. This means
+ * that threads waiting for the mutex ownership perform a busy wait and thus
+ * occupy the processor. For a full validation we need at least four
+ * processors.
+ */
+static bool CanDoFullValidation( void )
+{
+ return rtems_scheduler_get_processor_maximum() >= 4;
+}
+
+static void ScoreTqReqEnqueueMrsp_Pre_EligibleScheduler_Prepare(
+ ScoreTqReqEnqueueMrsp_Context *ctx,
+ ScoreTqReqEnqueueMrsp_Pre_EligibleScheduler state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueueMrsp_Pre_EligibleScheduler_Home: {
+ /*
+ * While the enqueueing thread has no helping scheduler.
+ */
+ ctx->helping = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Pre_EligibleScheduler_Helping: {
+ /*
+ * While the enqueueing thread has at least one helping scheduler.
+ */
+ ctx->helping = true;
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Pre_EligibleScheduler_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueueMrsp_Pre_QueueEligible_Prepare(
+ ScoreTqReqEnqueueMrsp_Context *ctx,
+ ScoreTqReqEnqueueMrsp_Pre_QueueEligible state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueueMrsp_Pre_QueueEligible_None: {
+ /*
+ * While all priority queues of the thread queue associated with eligible
+ * schedulers of the enqueueing thread are empty.
+ */
+ ctx->priority = PRIO_PSEUDO_ISR;
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Pre_QueueEligible_Equal: {
+ /*
+ * While a priority queue of the thread queue associated with an eligible
+ * scheduler of the enqueueing thread is non-empty, while the highest
+ * priority of the priority queue is equal to the priority of the
+ * enqueueing thread with respect to the eligible scheduler.
+ */
+ ctx->priority = PRIO_VERY_HIGH;
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Pre_QueueEligible_Low: {
+ /*
+ * While a priority queue of the thread queue associated with an eligible
+ * scheduler of the enqueueing thread is non-empty, while the highest
+ * priority of the priority queue is lower than the priority of the
+ * enqueueing thread with respect to the eligible scheduler.
+ */
+ ctx->priority = PRIO_HIGH;
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Pre_QueueEligible_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_Prepare(
+ ScoreTqReqEnqueueMrsp_Context *ctx,
+ ScoreTqReqEnqueueMrsp_Pre_QueueIneligible state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_None: {
+ /*
+ * While no priority queue of the thread queue exists which is not
+ * associated with an eligible scheduler of the enqueueing thread.
+ */
+ ctx->other_before = false;
+ ctx->other_after = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_Only: {
+ /*
+ * While exactly one priority queue of the thread queue exists which is
+ * not associated with an eligible scheduler of the enqueueing thread.
+ */
+ ctx->other_before = true;
+ ctx->other_after = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_Before: {
+ /*
+ * While a priority queue of the thread queue exists which is not
+ * associated with an eligible scheduler of the enqueueing thread, while
+ * this priority queue is positioned before all priority queues which are
+ * associated with eligible schedulers of the enqueueing thread.
+ */
+ ctx->other_before = true;
+ ctx->other_after = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_After: {
+ /*
+ * While a priority queue of the thread queue exists which is not
+ * associated with an eligible scheduler of the enqueueing thread, while
+ * this priority queue is positioned after all priority queues which are
+ * associated with eligible schedulers of the enqueueing thread.
+ */
+ ctx->other_before = false;
+ ctx->other_after = true;
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueueMrsp_Post_Position_Check(
+ ScoreTqReqEnqueueMrsp_Context *ctx,
+ ScoreTqReqEnqueueMrsp_Post_Position state
+)
+{
+ size_t i;
+
+ i = 0;
+
+ /* The enqueue is sticky, so no enqueued thread is blocked by the scheduler */
+ T_null( TQGetNextUnblock( ctx->tq_ctx, &i )->thread );
+
+ switch ( state ) {
+ case ScoreTqReqEnqueueMrsp_Post_Position_InitialFirst: {
+ /*
+ * A priority queue associated with the scheduler which contains exactly
+ * the enqueueing thread shall be created as the first priority queue of
+ * the thread queue.
+ */
+ T_eq_u32( 1, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_A ) );
+ T_eq_u32( 1, TQGetCounter( ctx->tq_ctx ) );
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Post_Position_InitialLast: {
+ /*
+ * A priority queue associated with the scheduler which contains exactly
+ * the enqueueing thread shall be created as the last priority queue of
+ * the thread queue.
+ */
+ if ( CanDoFullValidation() ) {
+ T_eq_u32( 1, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_C ) );
+ T_eq_u32( 2, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_A ) );
+ T_eq_u32( 2, TQGetCounter( ctx->tq_ctx ) );
+ } else {
+ T_eq_u32( 1, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_A ) );
+ T_eq_u32( 1, TQGetCounter( ctx->tq_ctx ) );
+ }
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Post_Position_Second: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ */
+ if ( CanDoFullValidation() ) {
+ T_eq_u32( 1, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_B ) );
+ T_eq_u32( 2, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_A ) );
+ T_eq_u32( 2, TQGetCounter( ctx->tq_ctx ) );
+ } else {
+ T_eq_u32( 1, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_A ) );
+ T_eq_u32( 1, TQGetCounter( ctx->tq_ctx ) );
+ }
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Post_Position_SecondFirst: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ *
+ * The position of the priority queue in the thread queue shall not
+ * change.
+ */
+ if ( CanDoFullValidation() ) {
+ T_eq_u32( 1, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_B ) );
+ T_eq_u32( 2, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_C ) );
+ T_eq_u32( 3, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_A ) );
+ T_eq_u32( 3, TQGetCounter( ctx->tq_ctx ) );
+ } else {
+ T_eq_u32( 1, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_A ) );
+ T_eq_u32( 1, TQGetCounter( ctx->tq_ctx ) );
+ }
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Post_Position_SecondLast: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ *
+ * The position of the priority queue in the thread queue shall not
+ * change.
+ */
+ if ( CanDoFullValidation() ) {
+ T_eq_u32( 1, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_C ) );
+ T_eq_u32( 2, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_B ) );
+ T_eq_u32( 3, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_A ) );
+ T_eq_u32( 3, TQGetCounter( ctx->tq_ctx ) );
+ } else {
+ T_eq_u32( 1, TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_A ) );
+ T_eq_u32( 1, TQGetCounter( ctx->tq_ctx ) );
+ }
+ break;
+ }
+
+ case ScoreTqReqEnqueueMrsp_Post_Position_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueueMrsp_Setup( ScoreTqReqEnqueueMrsp_Context *ctx )
+{
+ if ( CanDoFullValidation() ) {
+ RemoveProcessor( SCHEDULER_C_ID, 2 );
+ AddProcessor( SCHEDULER_B_ID, 2 );
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_C, SCHEDULER_C_ID, PRIO_LOW );
+ }
+
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_A, SCHEDULER_B_ID, PRIO_LOW );
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_B, SCHEDULER_B_ID, PRIO_LOW );
+ TQSetScheduler(
+ ctx->tq_ctx,
+ TQ_BLOCKER_D,
+ SCHEDULER_A_ID,
+ PRIO_ULTRA_HIGH
+ );
+}
+
+static void ScoreTqReqEnqueueMrsp_Setup_Wrap( void *arg )
+{
+ ScoreTqReqEnqueueMrsp_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqEnqueueMrsp_Setup( ctx );
+}
+
+static void ScoreTqReqEnqueueMrsp_Teardown(
+ ScoreTqReqEnqueueMrsp_Context *ctx
+)
+{
+ if ( CanDoFullValidation() ) {
+ RemoveProcessor( SCHEDULER_B_ID, 2 );
+ AddProcessor( SCHEDULER_C_ID, 2 );
+ }
+
+ TQReset( ctx->tq_ctx );
+}
+
+static void ScoreTqReqEnqueueMrsp_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqEnqueueMrsp_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqEnqueueMrsp_Teardown( ctx );
+}
+
+static void ScoreTqReqEnqueueMrsp_Action( ScoreTqReqEnqueueMrsp_Context *ctx )
+{
+ Status_Control status;
+
+ TQResetCounter( ctx->tq_ctx );
+ TQClearDone( ctx->tq_ctx, TQ_BLOCKER_A );
+ TQClearDone( ctx->tq_ctx, TQ_BLOCKER_B );
+ TQClearDone( ctx->tq_ctx, TQ_BLOCKER_C );
+
+ status = TQEnqueue( ctx->tq_ctx, TQ_WAIT_FOREVER );
+ T_eq_int( status, TQConvertStatus( ctx->tq_ctx, STATUS_SUCCESSFUL ) );
+
+ if ( ctx->helping ) {
+ TQSend(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ TQ_EVENT_MUTEX_A_OBTAIN | TQ_EVENT_RUNNER_SYNC
+ );
+ TQSynchronizeRunner();
+ TQSend(
+ ctx->tq_ctx,
+ TQ_BLOCKER_D,
+ TQ_EVENT_MUTEX_A_OBTAIN | TQ_EVENT_MUTEX_A_RELEASE |
+ TQ_EVENT_RUNNER_SYNC_2
+ );
+ }
+
+ if ( CanDoFullValidation() ) {
+ if ( ctx->other_before ) {
+ TQSendAndWaitForIntendToBlock(
+ ctx->tq_ctx,
+ TQ_BLOCKER_C,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER
+ );
+ }
+
+ if ( ctx->priority != PRIO_PSEUDO_ISR ) {
+ TQSendAndWaitForIntendToBlock(
+ ctx->tq_ctx,
+ TQ_BLOCKER_B,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER
+ );
+ }
+
+ if ( ctx->other_after ) {
+ TQSendAndWaitForIntendToBlock(
+ ctx->tq_ctx,
+ TQ_BLOCKER_C,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER
+ );
+ }
+ }
+
+ TQSendAndWaitForIntendToBlock(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER
+ );
+
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ status = TQSurrender( ctx->tq_ctx );
+ T_eq_int( status, TQConvertStatus( ctx->tq_ctx, STATUS_SUCCESSFUL ) );
+ TQWaitForDone( ctx->tq_ctx, TQ_BLOCKER_A );
+
+ if ( CanDoFullValidation() ) {
+ if ( ctx->priority != PRIO_PSEUDO_ISR ) {
+ TQWaitForDone( ctx->tq_ctx, TQ_BLOCKER_B );
+ }
+
+ if ( ctx->other_before || ctx->other_after ) {
+ TQWaitForDone( ctx->tq_ctx, TQ_BLOCKER_C );
+ }
+ }
+
+ TQSchedulerRecordStop( ctx->tq_ctx );
+
+ if ( ctx->helping ) {
+ TQSend(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ TQ_EVENT_MUTEX_A_RELEASE | TQ_EVENT_RUNNER_SYNC
+ );
+ TQSynchronizeRunner2();
+ }
+}
+
+static const ScoreTqReqEnqueueMrsp_Entry
+ScoreTqReqEnqueueMrsp_Entries[] = {
+ { 1, 0, 0, 0, ScoreTqReqEnqueueMrsp_Post_Position_NA },
+ { 0, 0, 0, 0, ScoreTqReqEnqueueMrsp_Post_Position_Second },
+ { 0, 0, 0, 0, ScoreTqReqEnqueueMrsp_Post_Position_SecondLast },
+ { 0, 0, 0, 0, ScoreTqReqEnqueueMrsp_Post_Position_SecondFirst },
+ { 0, 0, 0, 0, ScoreTqReqEnqueueMrsp_Post_Position_InitialFirst },
+ { 0, 0, 0, 0, ScoreTqReqEnqueueMrsp_Post_Position_InitialLast }
+};
+
+static const uint8_t
+ScoreTqReqEnqueueMrsp_Map[] = {
+ 4, 5, 0, 0, 1, 0, 2, 3, 1, 0, 2, 3, 4, 5, 0, 0, 1, 0, 2, 3, 1, 0, 2, 3
+};
+
+static size_t ScoreTqReqEnqueueMrsp_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreTqReqEnqueueMrsp_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( ScoreTqReqEnqueueMrsp_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqEnqueueMrsp_Fixture = {
+ .setup = ScoreTqReqEnqueueMrsp_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqEnqueueMrsp_Teardown_Wrap,
+ .scope = ScoreTqReqEnqueueMrsp_Scope,
+ .initial_context = &ScoreTqReqEnqueueMrsp_Instance
+};
+
+static inline ScoreTqReqEnqueueMrsp_Entry ScoreTqReqEnqueueMrsp_PopEntry(
+ ScoreTqReqEnqueueMrsp_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreTqReqEnqueueMrsp_Entries[
+ ScoreTqReqEnqueueMrsp_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqEnqueueMrsp_TestVariant(
+ ScoreTqReqEnqueueMrsp_Context *ctx
+)
+{
+ ScoreTqReqEnqueueMrsp_Pre_EligibleScheduler_Prepare(
+ ctx,
+ ctx->Map.pcs[ 0 ]
+ );
+ ScoreTqReqEnqueueMrsp_Pre_QueueEligible_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ ScoreTqReqEnqueueMrsp_Action( ctx );
+ ScoreTqReqEnqueueMrsp_Post_Position_Check(
+ ctx,
+ ctx->Map.entry.Post_Position
+ );
+}
+
+static T_fixture_node ScoreTqReqEnqueueMrsp_Node;
+
+static T_remark ScoreTqReqEnqueueMrsp_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqEnqueueMrsp"
+};
+
+void ScoreTqReqEnqueueMrsp_Run( TQContext *tq_ctx )
+{
+ ScoreTqReqEnqueueMrsp_Context *ctx;
+
+ ctx = &ScoreTqReqEnqueueMrsp_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqEnqueueMrsp_Node,
+ &ScoreTqReqEnqueueMrsp_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreTqReqEnqueueMrsp_Pre_EligibleScheduler_Home;
+ ctx->Map.pcs[ 0 ] < ScoreTqReqEnqueueMrsp_Pre_EligibleScheduler_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = ScoreTqReqEnqueueMrsp_Pre_QueueEligible_None;
+ ctx->Map.pcs[ 1 ] < ScoreTqReqEnqueueMrsp_Pre_QueueEligible_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_None;
+ ctx->Map.pcs[ 2 ] < ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqEnqueueMrsp_PopEntry( ctx );
+ ScoreTqReqEnqueueMrsp_TestVariant( ctx );
+ }
+ }
+ }
+
+ T_add_remark( &ScoreTqReqEnqueueMrsp_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-enqueue-mrsp.h b/testsuites/validation/tr-tq-enqueue-mrsp.h
new file mode 100644
index 0000000000..1c38b4b238
--- /dev/null
+++ b/testsuites/validation/tr-tq-enqueue-mrsp.h
@@ -0,0 +1,109 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqEnqueueMrsp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_ENQUEUE_MRSP_H
+#define _TR_TQ_ENQUEUE_MRSP_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqEnqueueMrsp
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqEnqueueMrsp_Pre_EligibleScheduler_Home,
+ ScoreTqReqEnqueueMrsp_Pre_EligibleScheduler_Helping,
+ ScoreTqReqEnqueueMrsp_Pre_EligibleScheduler_NA
+} ScoreTqReqEnqueueMrsp_Pre_EligibleScheduler;
+
+typedef enum {
+ ScoreTqReqEnqueueMrsp_Pre_QueueEligible_None,
+ ScoreTqReqEnqueueMrsp_Pre_QueueEligible_Equal,
+ ScoreTqReqEnqueueMrsp_Pre_QueueEligible_Low,
+ ScoreTqReqEnqueueMrsp_Pre_QueueEligible_NA
+} ScoreTqReqEnqueueMrsp_Pre_QueueEligible;
+
+typedef enum {
+ ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_None,
+ ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_Only,
+ ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_Before,
+ ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_After,
+ ScoreTqReqEnqueueMrsp_Pre_QueueIneligible_NA
+} ScoreTqReqEnqueueMrsp_Pre_QueueIneligible;
+
+typedef enum {
+ ScoreTqReqEnqueueMrsp_Post_Position_InitialFirst,
+ ScoreTqReqEnqueueMrsp_Post_Position_InitialLast,
+ ScoreTqReqEnqueueMrsp_Post_Position_Second,
+ ScoreTqReqEnqueueMrsp_Post_Position_SecondFirst,
+ ScoreTqReqEnqueueMrsp_Post_Position_SecondLast,
+ ScoreTqReqEnqueueMrsp_Post_Position_NA
+} ScoreTqReqEnqueueMrsp_Post_Position;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue test context.
+ */
+void ScoreTqReqEnqueueMrsp_Run( TQContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_ENQUEUE_MRSP_H */
diff --git a/testsuites/validation/tr-tq-enqueue-priority-inherit.c b/testsuites/validation/tr-tq-enqueue-priority-inherit.c
new file mode 100644
index 0000000000..160e2d7825
--- /dev/null
+++ b/testsuites/validation/tr-tq-enqueue-priority-inherit.c
@@ -0,0 +1,1742 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqEnqueuePriorityInherit
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-tq-enqueue-priority-inherit.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqEnqueuePriorityInherit \
+ * spec:/score/tq/req/enqueue-priority-inherit
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_Scheduler_NA : 1;
+ uint32_t Pre_QueueEligible_NA : 1;
+ uint32_t Pre_QueueIneligible_NA : 1;
+ uint32_t Pre_PriorityForOwner_NA : 1;
+ uint32_t Pre_SchedulerForOwner_NA : 1;
+ uint32_t Pre_OwnerState_NA : 1;
+ uint32_t Post_Position : 4;
+ uint32_t Post_OwnerPriority : 2;
+ uint32_t Post_OwnerScheduler : 2;
+ uint32_t Post_OwnerOwnerPriority : 2;
+ uint32_t Post_OwnerOwnerScheduler : 2;
+} ScoreTqReqEnqueuePriorityInherit_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/enqueue-priority-inherit test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member specifies the priority of a thread on the thread queue
+ * with an eligible scheduler equal to an eligible scheduler of the
+ * enqueueing thread.
+ */
+ rtems_task_priority queue_priority;
+
+ /**
+ * @brief If this member is true, then a thread those eligible schedulers are
+ * ineligible scheduler to the enqueueing task should be enqueued before a
+ * thread with an eligible scheduler equal to an eligible scheduler of the
+ * enqueueing thread.
+ */
+ size_t other_before;
+
+ /**
+ * @brief If this member is true, then a thread those eligible schedulers are
+ * ineligible scheduler to the enqueueing task should be enqueued after a
+ * thread with an eligible scheduler equal to an eligible scheduler of the
+ * enqueueing thread.
+ */
+ size_t other_after;
+
+ /**
+ * @brief This this member is true, then the priorities of the enqueueing
+ * thread shall be dispensable for the owner of the thread queue.
+ */
+ bool vital_priority;
+
+ /**
+ * @brief This this member is true, then the eligible scheduler of the
+ * enqueueing thread shall be dispensable for the owner of the thread
+ * queue.
+ */
+ bool vital_scheduler;
+
+ /**
+ * @brief This member contains the priorities of the thread queue owner after
+ * the enqueue.
+ */
+ rtems_task_priority owner_priority[ 4 ];
+
+ /**
+ * @brief This member contains the priorities of the owner of the thread
+ * queue on which the thread queue owner is blocked after the enqueue.
+ */
+ rtems_task_priority owner_owner_priority[ 4 ];
+
+ /**
+ * @brief This member specifies which mutex obtain event shall be used to
+ * block the thread queue owner.
+ */
+ rtems_event_set owner_obtain;
+
+ /**
+ * @brief This member specifies which mutex release event shall be used to
+ * unblock the thread queue owner.
+ */
+ rtems_event_set owner_release;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqEnqueuePriorityInherit_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 6 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqEnqueuePriorityInherit_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqEnqueuePriorityInherit_Context;
+
+static ScoreTqReqEnqueuePriorityInherit_Context
+ ScoreTqReqEnqueuePriorityInherit_Instance;
+
+static const char * const ScoreTqReqEnqueuePriorityInherit_PreDesc_Scheduler[] = {
+ "One",
+ "Two",
+ "Three",
+ "More",
+ "NA"
+};
+
+static const char * const ScoreTqReqEnqueuePriorityInherit_PreDesc_QueueEligible[] = {
+ "None",
+ "High",
+ "Equal",
+ "Low",
+ "NA"
+};
+
+static const char * const ScoreTqReqEnqueuePriorityInherit_PreDesc_QueueIneligible[] = {
+ "None",
+ "Only",
+ "Before",
+ "After",
+ "NA"
+};
+
+static const char * const ScoreTqReqEnqueuePriorityInherit_PreDesc_PriorityForOwner[] = {
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const ScoreTqReqEnqueuePriorityInherit_PreDesc_SchedulerForOwner[] = {
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const ScoreTqReqEnqueuePriorityInherit_PreDesc_OwnerState[] = {
+ "NotEnqueued",
+ "FIFO",
+ "Priority",
+ "PriorityInherit",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqEnqueuePriorityInherit_PreDesc[] = {
+ ScoreTqReqEnqueuePriorityInherit_PreDesc_Scheduler,
+ ScoreTqReqEnqueuePriorityInherit_PreDesc_QueueEligible,
+ ScoreTqReqEnqueuePriorityInherit_PreDesc_QueueIneligible,
+ ScoreTqReqEnqueuePriorityInherit_PreDesc_PriorityForOwner,
+ ScoreTqReqEnqueuePriorityInherit_PreDesc_SchedulerForOwner,
+ ScoreTqReqEnqueuePriorityInherit_PreDesc_OwnerState,
+ NULL
+};
+
+typedef ScoreTqReqEnqueuePriorityInherit_Context Context;
+
+static const rtems_tcb *GetUnblock( Context *ctx, size_t *index )
+{
+ const rtems_tcb *thread;
+
+ do {
+ thread = TQGetNextUnblock( ctx->tq_ctx, index )->thread;
+ } while ( thread == ctx->tq_ctx->runner_tcb );
+
+ return thread;
+}
+
+static const rtems_tcb *GetTCB( Context *ctx, TQWorkerKind worker )
+{
+ return ctx->tq_ctx->worker_tcb[ worker ];
+}
+
+static void CheckPriorityRaise(
+ const Context *ctx,
+ const rtems_task_priority *priority
+)
+{
+ if ( ctx->queue_priority == PRIO_ULTRA_HIGH ) {
+ T_eq_u32( priority[ 0 ], PRIO_ULTRA_HIGH );
+ } else {
+ T_eq_u32( priority[ 0 ], PRIO_VERY_HIGH );
+ }
+
+ if (
+ ctx->queue_priority == PRIO_VERY_HIGH ||
+ ctx->queue_priority == PRIO_ULTRA_HIGH
+ ) {
+ if ( ctx->other_before || ctx->other_after ) {
+ T_eq_u32( priority[ 1 ], PRIO_ULTRA_LOW );
+ T_eq_u32( priority[ 2 ], PRIO_NORMAL );
+ } else {
+ T_eq_u32( priority[ 1 ], PRIO_NORMAL );
+ }
+ }
+}
+
+static void CheckPriorityNop(
+ const Context *ctx,
+ const rtems_task_priority *priority
+)
+{
+ if ( ctx->queue_priority == PRIO_ULTRA_HIGH ) {
+ T_eq_u32( priority[ 0 ], PRIO_ULTRA_HIGH );
+ } else {
+ T_eq_u32( priority[ 0 ], PRIO_VERY_HIGH );
+ }
+}
+
+static void CheckSchedulerNewHelper(
+ const Context *ctx,
+ const rtems_task_priority *priority
+)
+{
+ if (
+ ctx->vital_priority &&
+ ( ctx->queue_priority == PRIO_VERY_HIGH ||
+ ctx->queue_priority == PRIO_ULTRA_HIGH )
+ ) {
+ if ( ctx->other_before || ctx->other_after ) {
+ T_eq_u32( priority[ 3 ], PRIO_VERY_LOW );
+ } else {
+ T_eq_u32( priority[ 2 ], PRIO_VERY_LOW );
+ T_eq_u32( priority[ 3 ], PRIO_INVALID );
+ }
+ } else {
+ if ( ctx->other_before || ctx->other_after ) {
+ T_eq_u32( priority[ 1 ], PRIO_ULTRA_LOW );
+ T_eq_u32( priority[ 2 ], PRIO_VERY_LOW );
+ } else {
+ T_eq_u32( priority[ 1 ], PRIO_VERY_LOW );
+ T_eq_u32( priority[ 2 ], PRIO_INVALID );
+ }
+
+ T_eq_u32( priority[ 3 ], PRIO_INVALID );
+ }
+}
+
+static void CheckSchedulerNop(
+ const Context *ctx,
+ const rtems_task_priority *priority
+)
+{
+ if (
+ ctx->vital_priority &&
+ ( ctx->queue_priority == PRIO_VERY_HIGH ||
+ ctx->queue_priority == PRIO_ULTRA_HIGH )
+ ) {
+ if ( !ctx->other_before && !ctx->other_after ) {
+ T_eq_u32( priority[ 2 ], PRIO_INVALID );
+ }
+
+ T_eq_u32( priority[ 3 ], PRIO_INVALID );
+ } else {
+ if ( ctx->other_before || ctx->other_after ) {
+ T_eq_u32( priority[ 1 ], PRIO_ULTRA_LOW );
+ } else {
+ T_eq_u32( priority[ 1 ], PRIO_INVALID );
+ }
+
+ T_eq_u32( priority[ 2 ], PRIO_INVALID );
+ T_eq_u32( priority[ 3 ], PRIO_INVALID );
+ }
+}
+
+static void GetPriorities(
+ const Context *ctx,
+ TQWorkerKind worker,
+ rtems_task_priority *priority
+)
+{
+ priority[ 0 ] = GetPriorityByScheduler(
+ ctx->tq_ctx->worker_id[ worker ],
+ SCHEDULER_A_ID
+ );
+ priority[ 1 ] = GetPriorityByScheduler(
+ ctx->tq_ctx->worker_id[ worker ],
+ SCHEDULER_B_ID
+ );
+ priority[ 2 ] = GetPriorityByScheduler(
+ ctx->tq_ctx->worker_id[ worker ],
+ SCHEDULER_C_ID
+ );
+ priority[ 3 ] = GetPriorityByScheduler(
+ ctx->tq_ctx->worker_id[ worker ],
+ SCHEDULER_D_ID
+ );
+}
+
+static void AddVitalPriority( Context *ctx, rtems_id scheduler_id )
+{
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_D, scheduler_id, PRIO_NORMAL );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_D,
+ TQ_EVENT_MUTEX_A_OBTAIN | TQ_EVENT_MUTEX_A_RELEASE
+ );
+}
+
+static void AddVitalPriorityHelper( Context *ctx, rtems_id scheduler_id )
+{
+ TQSetScheduler( ctx->tq_ctx, TQ_HELPER_B, scheduler_id, PRIO_LOW );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_HELPER_B,
+ TQ_EVENT_MUTEX_B_OBTAIN | TQ_EVENT_MUTEX_B_RELEASE
+ );
+}
+
+static void AddVitalScheduler( Context *ctx, rtems_id scheduler_id )
+{
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_E, scheduler_id, PRIO_VERY_LOW );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_E,
+ TQ_EVENT_MUTEX_A_OBTAIN | TQ_EVENT_MUTEX_A_RELEASE
+ );
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_Prepare(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx,
+ ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_One: {
+ /*
+ * Where the system has exactly one schedulers.
+ */
+ if ( rtems_scheduler_get_processor_maximum() != 1 ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_Two: {
+ /*
+ * Where the system has exactly two schedulers.
+ */
+ if ( rtems_scheduler_get_processor_maximum() != 2 ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_Three: {
+ /*
+ * Where the system has exactly three schedulers.
+ */
+ if ( rtems_scheduler_get_processor_maximum() != 3 ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_More: {
+ /*
+ * Where the system has at least three schedulers.
+ */
+ if ( rtems_scheduler_get_processor_maximum() < 4 ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_Prepare(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx,
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_None: {
+ /*
+ * While all priority queues of the thread queue associated with eligible
+ * schedulers of the enqueueing thread are empty.
+ */
+ ctx->queue_priority = PRIO_INVALID;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_High: {
+ /*
+ * While a priority queue of the thread queue associated with an eligible
+ * scheduler of the enqueueing thread is non-empty, while the highest
+ * priority of the priority queue is higher than the priority of the
+ * enqueueing thread with respect to the eligible scheduler.
+ */
+ ++ctx->tq_ctx->how_many;
+ ctx->queue_priority = PRIO_ULTRA_HIGH;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_Equal: {
+ /*
+ * While a priority queue of the thread queue associated with an eligible
+ * scheduler of the enqueueing thread is non-empty, while the highest
+ * priority of the priority queue is equal to the priority of the
+ * enqueueing thread with respect to the eligible scheduler.
+ */
+ ++ctx->tq_ctx->how_many;
+ ctx->queue_priority = PRIO_VERY_HIGH;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_Low: {
+ /*
+ * While a priority queue of the thread queue associated with an eligible
+ * scheduler of the enqueueing thread is non-empty, while the highest
+ * priority of the priority queue is lower than the priority of the
+ * enqueueing thread with respect to the eligible scheduler.
+ */
+ ++ctx->tq_ctx->how_many;
+ ctx->queue_priority = PRIO_HIGH;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_Prepare(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx,
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_None: {
+ /*
+ * While each priority queue of the thread queue is associated with an
+ * eligible scheduler of the enqueueing thread.
+ */
+ ctx->other_before = false;
+ ctx->other_after = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_Only: {
+ /*
+ * While exactly one priority queue of the thread queue exists which is
+ * not associated with an eligible scheduler of the enqueueing thread.
+ */
+ ++ctx->tq_ctx->how_many;
+ ctx->other_before = true;
+ ctx->other_after = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_Before: {
+ /*
+ * While a priority queue of the thread queue exists which is not
+ * associated with an eligible scheduler of the enqueueing thread, while
+ * the priority queue is positioned before all priority queues which are
+ * associated with eligible schedulers of the enqueueing thread.
+ */
+ ++ctx->tq_ctx->how_many;
+ ctx->other_before = true;
+ ctx->other_after = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_After: {
+ /*
+ * While a priority queue of the thread queue exists which is not
+ * associated with an eligible scheduler of the enqueueing thread, while
+ * the priority queue is positioned after all priority queues which are
+ * associated with eligible schedulers of the enqueueing thread.
+ */
+ ++ctx->tq_ctx->how_many;
+ ctx->other_before = false;
+ ctx->other_after = true;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Pre_PriorityForOwner_Prepare(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx,
+ ScoreTqReqEnqueuePriorityInherit_Pre_PriorityForOwner state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriorityInherit_Pre_PriorityForOwner_Vital: {
+ /*
+ * While at least one priority of the enqueueing thread is higher than
+ * the highest priority of the owner of the thread queue.
+ */
+ ctx->vital_priority = true;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_PriorityForOwner_Dispensable: {
+ /*
+ * While all priorities of the enqueueing thread are lower than or equal
+ * to the highest priority of the owner of the thread queue.
+ */
+ ctx->vital_priority = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_PriorityForOwner_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Pre_SchedulerForOwner_Prepare(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx,
+ ScoreTqReqEnqueuePriorityInherit_Pre_SchedulerForOwner state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriorityInherit_Pre_SchedulerForOwner_Vital: {
+ /*
+ * While at least one eligible scheduler of the enqueueing thread is not
+ * an eligible scheduler of the owner of the thread queue.
+ */
+ ctx->vital_scheduler = true;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_SchedulerForOwner_Dispensable: {
+ /*
+ * While all eligible schedulers of the enqueueing thread are an eligible
+ * scheduler of the owner of the thread queue.
+ */
+ ctx->vital_scheduler = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_SchedulerForOwner_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_Prepare(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx,
+ ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_NotEnqueued: {
+ /*
+ * While the owner of the thread queue is not enqueued on a thread queue.
+ */
+ ctx->owner_obtain = 0;
+ ctx->owner_release = 0;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_FIFO: {
+ /*
+ * While the owner of the thread queue is enqueued on a thread queue in
+ * FIFO order.
+ */
+ ctx->owner_obtain = TQ_EVENT_MUTEX_FIFO_OBTAIN;
+ ctx->owner_release = TQ_EVENT_MUTEX_FIFO_RELEASE;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_Priority: {
+ /*
+ * While the owner of the thread queue is enqueued on a thread queue in
+ * priority order.
+ */
+ ctx->owner_obtain = TQ_EVENT_MUTEX_NO_PROTOCOL_OBTAIN;
+ ctx->owner_release = TQ_EVENT_MUTEX_NO_PROTOCOL_RELEASE;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_PriorityInherit: {
+ /*
+ * While the owner of the thread queue is enqueued on a thread queue in
+ * priority order with priority inheritance.
+ */
+ ctx->owner_obtain = TQ_EVENT_MUTEX_C_OBTAIN;
+ ctx->owner_release = TQ_EVENT_MUTEX_C_RELEASE;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Post_Position_Check(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position state
+)
+{
+ size_t i;
+
+ i = 0;
+
+ /* Event receive */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_HELPER_A ) );
+
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialFirst: {
+ /*
+ * A priority queue associated with the scheduler which contains exactly
+ * the enqueueing thread shall be created as the first priority queue of
+ * the thread queue.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialLast: {
+ /*
+ * A priority queue associated with the scheduler which contains exactly
+ * the enqueueing thread shall be created as the last priority queue of
+ * the thread queue.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_Position_First: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_Position_Second: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstFirst: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ *
+ * The position of the priority queue in the thread queue shall not
+ * change.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondFirst: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ *
+ * The position of the priority queue in the thread queue shall not
+ * change.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstLast: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ *
+ * The position of the priority queue in the thread queue shall not
+ * change.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondLast: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ *
+ * The position of the priority queue in the thread queue shall not
+ * change.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_Position_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Check(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise: {
+ /*
+ * Each priority of the enqueueing thread which is higher than the
+ * highest priority of the owner of the thread queue shall be made the
+ * highest priority of the owner.
+ */
+ CheckPriorityRaise( ctx, ctx->owner_priority );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop: {
+ /*
+ * The priorities of the owner of the thread queue shall not change.
+ */
+ CheckPriorityNop( ctx, ctx->owner_priority );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Check(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper: {
+ /*
+ * Each eligible scheduler of the enqueueing thread which is not an
+ * eligible scheduler of the owner of the thread queue shall be made a
+ * helping scheduler of the owner with the priority of the enqueueing
+ * thread.
+ */
+ CheckSchedulerNewHelper( ctx, ctx->owner_priority );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop: {
+ /*
+ * The set of eligible schedulers of the owner of the thread queue shall
+ * not change.
+ */
+ CheckSchedulerNop( ctx, ctx->owner_priority );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Check(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise: {
+ /*
+ * Each priority of the enqueueing thread which is higher than the
+ * highest priority of the owner of the thread queue on which the owner
+ * of the thread queue is enqueued shall be made the highest priority of
+ * the owner.
+ */
+ CheckPriorityRaise( ctx, ctx->owner_owner_priority );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop: {
+ /*
+ * The priorities of the owner of the thread queue on which the owner of
+ * the thread queue is enqueued shall not change.
+ */
+ if ( ctx->owner_obtain == TQ_EVENT_MUTEX_C_OBTAIN ) {
+ CheckPriorityNop( ctx, ctx->owner_owner_priority );
+ } else {
+ if ( ctx->vital_priority ) {
+ T_eq_u32( ctx->owner_owner_priority[ 0 ], PRIO_HIGH );
+ } else {
+ T_eq_u32( ctx->owner_owner_priority[ 0 ], PRIO_VERY_HIGH );
+ }
+ }
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Check(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper: {
+ /*
+ * Each eligible scheduler of the enqueueing thread which is not an
+ * eligible scheduler of the owner of the thread queue on which the owner
+ * of the thread queue is enqueued shall be made a helping scheduler of
+ * the owner with the priority of the enqueueing thread.
+ */
+ CheckSchedulerNewHelper( ctx, ctx->owner_owner_priority );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop: {
+ /*
+ * The set of eligible schedulers of the owner of the thread queue on
+ * which the owner of the thread queue is enqueued shall not change.
+ */
+ if ( ctx->owner_obtain == TQ_EVENT_MUTEX_C_OBTAIN ) {
+ CheckSchedulerNop( ctx, ctx->owner_owner_priority );
+ } else {
+ T_eq_u32( ctx->owner_owner_priority[ 1 ], PRIO_INVALID );
+ T_eq_u32( ctx->owner_owner_priority[ 2 ], PRIO_INVALID );
+ T_eq_u32( ctx->owner_owner_priority[ 3 ], PRIO_INVALID );
+ }
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Setup(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx
+)
+{
+ TQReset( ctx->tq_ctx );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_A, PRIO_VERY_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_HELPER_C, PRIO_HIGH );
+
+ #if defined( RTEMS_SMP )
+ TQSetScheduler(
+ ctx->tq_ctx,
+ TQ_BLOCKER_C,
+ SCHEDULER_B_ID,
+ PRIO_ULTRA_LOW
+ );
+
+ if ( rtems_scheduler_get_processor_maximum() > 3 ) {
+ RemoveProcessor( SCHEDULER_C_ID, 3 );
+ AddProcessor( SCHEDULER_D_ID, 3 );
+ }
+ #endif
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Setup_Wrap( void *arg )
+{
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqEnqueuePriorityInherit_Setup( ctx );
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Teardown(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx
+)
+{
+ TQReset( ctx->tq_ctx );
+
+ #if defined( RTEMS_SMP )
+ if ( rtems_scheduler_get_processor_maximum() > 3 ) {
+ RemoveProcessor( SCHEDULER_D_ID, 3 );
+ AddProcessor( SCHEDULER_C_ID, 3 );
+ }
+ #endif
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqEnqueuePriorityInherit_Teardown( ctx );
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Prepare(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx
+)
+{
+ ctx->tq_ctx->how_many = 1;
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_Action(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx
+)
+{
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_MUTEX_A_OBTAIN );
+ TQSend(
+ ctx->tq_ctx,
+ TQ_HELPER_A,
+ TQ_EVENT_MUTEX_B_OBTAIN | TQ_EVENT_ENQUEUE_PREPARE
+ );
+
+ if ( ctx->owner_obtain != 0 ) {
+ TQSend( ctx->tq_ctx, TQ_HELPER_C, ctx->owner_obtain );
+ }
+
+ if ( ctx->other_before ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_C,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER | TQ_EVENT_RUNNER_SYNC_2
+ );
+ }
+
+ if ( ctx->queue_priority != PRIO_INVALID ) {
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_B , ctx->queue_priority );
+ TQSend(
+ ctx->tq_ctx,
+ TQ_BLOCKER_B,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER
+ );
+ }
+
+ if ( ctx->other_after ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_C,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER | TQ_EVENT_RUNNER_SYNC_2
+ );
+ }
+
+ if ( ctx->vital_priority ) {
+ TQSetPriority( ctx->tq_ctx, TQ_HELPER_A, PRIO_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_HELPER_C, PRIO_HIGH );
+
+ if (
+ ctx->queue_priority == PRIO_VERY_HIGH ||
+ ctx->queue_priority == PRIO_ULTRA_HIGH
+ ) {
+ if ( ctx->other_before || ctx->other_after ) {
+ AddVitalPriority( ctx, SCHEDULER_C_ID );
+ AddVitalPriorityHelper( ctx, SCHEDULER_C_ID );
+
+ if ( ctx->vital_scheduler ) {
+ AddVitalScheduler( ctx, SCHEDULER_D_ID );
+ }
+ } else {
+ AddVitalPriority( ctx, SCHEDULER_B_ID );
+ AddVitalPriorityHelper( ctx, SCHEDULER_B_ID );
+
+ if ( ctx->vital_scheduler ) {
+ AddVitalScheduler( ctx, SCHEDULER_C_ID );
+ }
+ }
+ } else {
+ if ( ctx->vital_scheduler ) {
+ if ( ctx->other_before || ctx->other_after ) {
+ AddVitalScheduler( ctx, SCHEDULER_C_ID );
+ } else {
+ AddVitalScheduler( ctx, SCHEDULER_B_ID );
+ }
+ }
+ }
+ } else {
+ TQSetPriority( ctx->tq_ctx, TQ_HELPER_A, PRIO_VERY_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_HELPER_C, PRIO_VERY_HIGH );
+
+ if ( ctx->vital_scheduler ) {
+ if ( ctx->other_before || ctx->other_after ) {
+ AddVitalScheduler( ctx, SCHEDULER_C_ID );
+ } else {
+ AddVitalScheduler( ctx, SCHEDULER_B_ID );
+ }
+ }
+ }
+
+ if ( ctx->owner_obtain != 0 ) {
+ TQClearDone( ctx->tq_ctx, TQ_HELPER_A );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_HELPER_A,
+ ctx->owner_obtain | ctx->owner_release
+ );
+ }
+
+ TQSend(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER | TQ_EVENT_RUNNER_SYNC
+ );
+
+ GetPriorities( ctx, TQ_HELPER_A, ctx->owner_priority );
+ GetPriorities( ctx, TQ_HELPER_C, ctx->owner_owner_priority );
+
+ if ( ctx->owner_obtain != 0 ) {
+ TQSend( ctx->tq_ctx, TQ_HELPER_C, ctx->owner_release );
+ TQWaitForDone( ctx->tq_ctx, TQ_HELPER_A );
+ TQWaitForExecutionStop( ctx->tq_ctx, TQ_HELPER_A );
+ }
+
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ TQSend( ctx->tq_ctx, TQ_HELPER_A, TQ_EVENT_ENQUEUE_DONE );
+
+ if ( ctx->other_before || ctx->other_after ) {
+ TQSynchronizeRunner2();
+ } else {
+ TQSynchronizeRunner();
+ }
+
+ TQSchedulerRecordStop( ctx->tq_ctx );
+
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_MUTEX_A_RELEASE );
+ TQMutexObtain( ctx->tq_ctx, TQ_MUTEX_A );
+ TQMutexRelease( ctx->tq_ctx, TQ_MUTEX_A );
+
+ TQSend( ctx->tq_ctx, TQ_HELPER_A, TQ_EVENT_MUTEX_B_RELEASE );
+ TQMutexObtain( ctx->tq_ctx, TQ_MUTEX_B );
+ TQMutexRelease( ctx->tq_ctx, TQ_MUTEX_B );
+}
+
+static const ScoreTqReqEnqueuePriorityInherit_Entry
+ScoreTqReqEnqueuePriorityInherit_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NA },
+ { 1, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NA },
+ { 1, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NA },
+ { 1, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NA },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_Second,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 1, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_NA,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NA },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_Second,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_Second,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_First,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_First,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_Second,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_First,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_First,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_Second,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_Second,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_First,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_Second,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_First,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqEnqueuePriorityInherit_Post_Position_First,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper },
+ { 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper }
+};
+
+static const uint8_t
+ScoreTqReqEnqueuePriorityInherit_Map[] = {
+ 0, 0, 0, 0, 12, 12, 12, 39, 0, 0, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0,
+ 0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13, 40, 0, 0, 0,
+ 0, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 22, 22, 22, 46, 12, 12, 12, 39, 23, 23, 23, 47, 10, 10, 10, 10, 3,
+ 3, 3, 3, 24, 24, 24, 48, 3, 3, 3, 3, 14, 14, 14, 14, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3,
+ 3, 3, 8, 8, 8, 29, 9, 9, 9, 30, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 5, 3, 3, 3, 3, 6, 6, 6, 6, 3, 3, 3, 3, 5,
+ 5, 5, 5, 3, 3, 3, 3, 7, 7, 7, 7, 3, 3, 3, 3, 8, 8, 8, 29, 9, 9, 9, 30, 4, 4,
+ 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 5,
+ 3, 3, 3, 3, 6, 6, 6, 6, 3, 3, 3, 3, 5, 5, 5, 5, 3, 3, 3, 3, 7, 7, 7, 7, 25,
+ 25, 25, 49, 13, 13, 13, 40, 26, 26, 26, 50, 11, 11, 11, 11, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 27, 27, 27, 51, 3, 3, 3, 3, 15, 15,
+ 15, 15, 3, 3, 3, 3, 28, 28, 28, 52, 3, 3, 3, 3, 16, 16, 16, 16, 22, 22, 22,
+ 46, 12, 12, 12, 39, 23, 23, 23, 47, 10, 10, 10, 10, 31, 31, 31, 53, 24, 24,
+ 24, 48, 32, 32, 32, 54, 14, 14, 14, 14, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 17, 17, 17, 41,
+ 8, 8, 8, 29, 9, 9, 9, 30, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 3, 3, 3, 3, 18, 18, 18, 42, 19, 19, 19, 43, 6, 6, 6, 6, 3, 3, 3, 3,
+ 20, 20, 20, 44, 21, 21, 21, 45, 7, 7, 7, 7, 17, 17, 17, 41, 8, 8, 8, 29, 9,
+ 9, 9, 30, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
+ 3, 3, 18, 18, 18, 42, 19, 19, 19, 43, 6, 6, 6, 6, 3, 3, 3, 3, 20, 20, 20, 44,
+ 21, 21, 21, 45, 7, 7, 7, 7, 25, 25, 25, 49, 13, 13, 13, 40, 26, 26, 26, 50,
+ 11, 11, 11, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 33, 33, 33,
+ 55, 27, 27, 27, 51, 34, 34, 34, 56, 15, 15, 15, 15, 35, 35, 35, 57, 28, 28,
+ 28, 52, 36, 36, 36, 58, 16, 16, 16, 16, 22, 22, 22, 46, 12, 12, 12, 39, 23,
+ 23, 23, 47, 10, 10, 10, 10, 31, 31, 31, 53, 24, 24, 24, 48, 32, 32, 32, 54,
+ 14, 14, 14, 14, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 17, 17, 17, 41, 8, 8, 8, 29, 9, 9, 9, 30,
+ 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 37, 37, 37, 59,
+ 18, 18, 18, 42, 19, 19, 19, 43, 6, 6, 6, 6, 38, 38, 38, 60, 20, 20, 20, 44,
+ 21, 21, 21, 45, 7, 7, 7, 7, 17, 17, 17, 41, 8, 8, 8, 29, 9, 9, 9, 30, 4, 4,
+ 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 37, 37, 37, 59, 18, 18,
+ 18, 42, 19, 19, 19, 43, 6, 6, 6, 6, 38, 38, 38, 60, 20, 20, 20, 44, 21, 21,
+ 21, 45, 7, 7, 7, 7, 25, 25, 25, 49, 13, 13, 13, 40, 26, 26, 26, 50, 11, 11,
+ 11, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 33, 33, 33, 55, 27,
+ 27, 27, 51, 34, 34, 34, 56, 15, 15, 15, 15, 35, 35, 35, 57, 28, 28, 28, 52,
+ 36, 36, 36, 58, 16, 16, 16, 16
+};
+
+static size_t ScoreTqReqEnqueuePriorityInherit_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ ScoreTqReqEnqueuePriorityInherit_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqEnqueuePriorityInherit_Fixture = {
+ .setup = ScoreTqReqEnqueuePriorityInherit_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqEnqueuePriorityInherit_Teardown_Wrap,
+ .scope = ScoreTqReqEnqueuePriorityInherit_Scope,
+ .initial_context = &ScoreTqReqEnqueuePriorityInherit_Instance
+};
+
+static const uint16_t ScoreTqReqEnqueuePriorityInherit_Weights[] = {
+ 256, 64, 16, 8, 4, 1
+};
+
+static void ScoreTqReqEnqueuePriorityInherit_Skip(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx,
+ size_t index
+)
+{
+ switch ( index + 1 ) {
+ case 1:
+ ctx->Map.pcs[ 1 ] = ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_NA - 1;
+ /* Fall through */
+ case 2:
+ ctx->Map.pcs[ 2 ] = ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_NA - 1;
+ /* Fall through */
+ case 3:
+ ctx->Map.pcs[ 3 ] = ScoreTqReqEnqueuePriorityInherit_Pre_PriorityForOwner_NA - 1;
+ /* Fall through */
+ case 4:
+ ctx->Map.pcs[ 4 ] = ScoreTqReqEnqueuePriorityInherit_Pre_SchedulerForOwner_NA - 1;
+ /* Fall through */
+ case 5:
+ ctx->Map.pcs[ 5 ] = ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_NA - 1;
+ break;
+ }
+}
+
+static inline ScoreTqReqEnqueuePriorityInherit_Entry
+ScoreTqReqEnqueuePriorityInherit_PopEntry(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx
+)
+{
+ size_t index;
+
+ if ( ctx->Map.skip ) {
+ size_t i;
+
+ ctx->Map.skip = false;
+ index = 0;
+
+ for ( i = 0; i < 6; ++i ) {
+ index += ScoreTqReqEnqueuePriorityInherit_Weights[ i ] * ctx->Map.pcs[ i ];
+ }
+ } else {
+ index = ctx->Map.index;
+ }
+
+ ctx->Map.index = index + 1;
+
+ return ScoreTqReqEnqueuePriorityInherit_Entries[
+ ScoreTqReqEnqueuePriorityInherit_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqEnqueuePriorityInherit_TestVariant(
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx
+)
+{
+ ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_Prepare(
+ ctx,
+ ctx->Map.pcs[ 0 ]
+ );
+
+ if ( ctx->Map.skip ) {
+ ScoreTqReqEnqueuePriorityInherit_Skip( ctx, 0 );
+ return;
+ }
+
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_Prepare(
+ ctx,
+ ctx->Map.pcs[ 1 ]
+ );
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_Prepare(
+ ctx,
+ ctx->Map.pcs[ 2 ]
+ );
+ ScoreTqReqEnqueuePriorityInherit_Pre_PriorityForOwner_Prepare(
+ ctx,
+ ctx->Map.pcs[ 3 ]
+ );
+ ScoreTqReqEnqueuePriorityInherit_Pre_SchedulerForOwner_Prepare(
+ ctx,
+ ctx->Map.pcs[ 4 ]
+ );
+ ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_Prepare(
+ ctx,
+ ctx->Map.pcs[ 5 ]
+ );
+ ScoreTqReqEnqueuePriorityInherit_Action( ctx );
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_Check(
+ ctx,
+ ctx->Map.entry.Post_Position
+ );
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Check(
+ ctx,
+ ctx->Map.entry.Post_OwnerPriority
+ );
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Check(
+ ctx,
+ ctx->Map.entry.Post_OwnerScheduler
+ );
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Check(
+ ctx,
+ ctx->Map.entry.Post_OwnerOwnerPriority
+ );
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Check(
+ ctx,
+ ctx->Map.entry.Post_OwnerOwnerScheduler
+ );
+}
+
+static T_fixture_node ScoreTqReqEnqueuePriorityInherit_Node;
+
+static T_remark ScoreTqReqEnqueuePriorityInherit_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqEnqueuePriorityInherit"
+};
+
+void ScoreTqReqEnqueuePriorityInherit_Run( TQContext *tq_ctx )
+{
+ ScoreTqReqEnqueuePriorityInherit_Context *ctx;
+
+ ctx = &ScoreTqReqEnqueuePriorityInherit_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqEnqueuePriorityInherit_Node,
+ &ScoreTqReqEnqueuePriorityInherit_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+ ctx->Map.skip = false;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_One;
+ ctx->Map.pcs[ 0 ] < ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_None;
+ ctx->Map.pcs[ 1 ] < ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_None;
+ ctx->Map.pcs[ 2 ] < ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = ScoreTqReqEnqueuePriorityInherit_Pre_PriorityForOwner_Vital;
+ ctx->Map.pcs[ 3 ] < ScoreTqReqEnqueuePriorityInherit_Pre_PriorityForOwner_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = ScoreTqReqEnqueuePriorityInherit_Pre_SchedulerForOwner_Vital;
+ ctx->Map.pcs[ 4 ] < ScoreTqReqEnqueuePriorityInherit_Pre_SchedulerForOwner_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_NotEnqueued;
+ ctx->Map.pcs[ 5 ] < ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqEnqueuePriorityInherit_PopEntry(
+ ctx
+ );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ ScoreTqReqEnqueuePriorityInherit_Prepare( ctx );
+ ScoreTqReqEnqueuePriorityInherit_TestVariant( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ T_add_remark( &ScoreTqReqEnqueuePriorityInherit_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-enqueue-priority-inherit.h b/testsuites/validation/tr-tq-enqueue-priority-inherit.h
new file mode 100644
index 0000000000..c2ffa59902
--- /dev/null
+++ b/testsuites/validation/tr-tq-enqueue-priority-inherit.h
@@ -0,0 +1,159 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqEnqueuePriorityInherit
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_ENQUEUE_PRIORITY_INHERIT_H
+#define _TR_TQ_ENQUEUE_PRIORITY_INHERIT_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqEnqueuePriorityInherit
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_One,
+ ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_Two,
+ ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_Three,
+ ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_More,
+ ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler_NA
+} ScoreTqReqEnqueuePriorityInherit_Pre_Scheduler;
+
+typedef enum {
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_None,
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_High,
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_Equal,
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_Low,
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible_NA
+} ScoreTqReqEnqueuePriorityInherit_Pre_QueueEligible;
+
+typedef enum {
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_None,
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_Only,
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_Before,
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_After,
+ ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible_NA
+} ScoreTqReqEnqueuePriorityInherit_Pre_QueueIneligible;
+
+typedef enum {
+ ScoreTqReqEnqueuePriorityInherit_Pre_PriorityForOwner_Vital,
+ ScoreTqReqEnqueuePriorityInherit_Pre_PriorityForOwner_Dispensable,
+ ScoreTqReqEnqueuePriorityInherit_Pre_PriorityForOwner_NA
+} ScoreTqReqEnqueuePriorityInherit_Pre_PriorityForOwner;
+
+typedef enum {
+ ScoreTqReqEnqueuePriorityInherit_Pre_SchedulerForOwner_Vital,
+ ScoreTqReqEnqueuePriorityInherit_Pre_SchedulerForOwner_Dispensable,
+ ScoreTqReqEnqueuePriorityInherit_Pre_SchedulerForOwner_NA
+} ScoreTqReqEnqueuePriorityInherit_Pre_SchedulerForOwner;
+
+typedef enum {
+ ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_NotEnqueued,
+ ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_FIFO,
+ ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_Priority,
+ ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_PriorityInherit,
+ ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState_NA
+} ScoreTqReqEnqueuePriorityInherit_Pre_OwnerState;
+
+typedef enum {
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_InitialLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_First,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_Second,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondFirst,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_FirstLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_SecondLast,
+ ScoreTqReqEnqueuePriorityInherit_Post_Position_NA
+} ScoreTqReqEnqueuePriorityInherit_Post_Position;
+
+typedef enum {
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority_NA
+} ScoreTqReqEnqueuePriorityInherit_Post_OwnerPriority;
+
+typedef enum {
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler_NA
+} ScoreTqReqEnqueuePriorityInherit_Post_OwnerScheduler;
+
+typedef enum {
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Raise,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority_NA
+} ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerPriority;
+
+typedef enum {
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NewHelper,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_Nop,
+ ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler_NA
+} ScoreTqReqEnqueuePriorityInherit_Post_OwnerOwnerScheduler;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue context.
+ */
+void ScoreTqReqEnqueuePriorityInherit_Run( TQContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_ENQUEUE_PRIORITY_INHERIT_H */
diff --git a/testsuites/validation/tr-tq-enqueue-priority.c b/testsuites/validation/tr-tq-enqueue-priority.c
new file mode 100644
index 0000000000..18818e34cd
--- /dev/null
+++ b/testsuites/validation/tr-tq-enqueue-priority.c
@@ -0,0 +1,751 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqEnqueuePriority
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-tq-enqueue-priority.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqEnqueuePriority spec:/score/tq/req/enqueue-priority
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_EligibleScheduler_NA : 1;
+ uint8_t Pre_QueueEligible_NA : 1;
+ uint8_t Pre_QueueIneligible_NA : 1;
+ uint8_t Post_Position : 4;
+} ScoreTqReqEnqueuePriority_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/enqueue-priority test case.
+ */
+typedef struct {
+ /**
+ * @brief This this member is true, then the enqueueing thread shall have at
+ * least one helping scheduler.
+ */
+ bool helping;
+
+ /**
+ * @brief This member specifies the priority of a thread with an eligible
+ * scheduler equal to an eligible scheduler of the enqueueing thread.
+ */
+ rtems_task_priority priority;
+
+ /**
+ * @brief If this member is true, then a thread those eligible schedulers are
+ * ineligible scheduler to the enqueueing task should be enqueued before a
+ * thread with an eligible scheduler equal to an eligible scheduler of the
+ * enqueueing thread.
+ */
+ size_t other_before;
+
+ /**
+ * @brief If this member is true, then a thread those eligible schedulers are
+ * ineligible scheduler to the enqueueing task should be enqueued after a
+ * thread with an eligible scheduler equal to an eligible scheduler of the
+ * enqueueing thread.
+ */
+ size_t other_after;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqEnqueuePriority_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqEnqueuePriority_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqEnqueuePriority_Context;
+
+static ScoreTqReqEnqueuePriority_Context
+ ScoreTqReqEnqueuePriority_Instance;
+
+static const char * const ScoreTqReqEnqueuePriority_PreDesc_EligibleScheduler[] = {
+ "Home",
+ "Helping",
+ "NA"
+};
+
+static const char * const ScoreTqReqEnqueuePriority_PreDesc_QueueEligible[] = {
+ "None",
+ "High",
+ "Equal",
+ "Low",
+ "NA"
+};
+
+static const char * const ScoreTqReqEnqueuePriority_PreDesc_QueueIneligible[] = {
+ "None",
+ "Only",
+ "Before",
+ "After",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqEnqueuePriority_PreDesc[] = {
+ ScoreTqReqEnqueuePriority_PreDesc_EligibleScheduler,
+ ScoreTqReqEnqueuePriority_PreDesc_QueueEligible,
+ ScoreTqReqEnqueuePriority_PreDesc_QueueIneligible,
+ NULL
+};
+
+typedef ScoreTqReqEnqueuePriority_Context Context;
+
+static const rtems_tcb *GetUnblock( Context *ctx, size_t *index )
+{
+ const rtems_tcb *thread;
+
+ do {
+ thread = TQGetNextUnblock( ctx->tq_ctx, index )->thread;
+ } while ( thread == ctx->tq_ctx->runner_tcb );
+
+ return thread;
+}
+
+static const rtems_tcb *GetTCB( Context *ctx, TQWorkerKind worker )
+{
+ return ctx->tq_ctx->worker_tcb[ worker ];
+}
+
+static void AddHelper( TQContext *tq_ctx, rtems_id scheduler_id )
+{
+ TQSend( tq_ctx, TQ_BLOCKER_C, TQ_EVENT_MUTEX_A_OBTAIN );
+ TQSetScheduler( tq_ctx, TQ_BLOCKER_E, scheduler_id, PRIO_LOW );
+ TQSendAndWaitForExecutionStop(
+ tq_ctx,
+ TQ_BLOCKER_E,
+ TQ_EVENT_MUTEX_A_OBTAIN | TQ_EVENT_MUTEX_A_RELEASE
+ );
+}
+
+static void RemoveHelper( TQContext *tq_ctx )
+{
+ TQSend( tq_ctx, TQ_BLOCKER_C, TQ_EVENT_MUTEX_A_RELEASE );
+ TQMutexObtain( tq_ctx, TQ_MUTEX_A );
+ TQMutexRelease( tq_ctx, TQ_MUTEX_A );
+}
+
+static void ScoreTqReqEnqueuePriority_Pre_EligibleScheduler_Prepare(
+ ScoreTqReqEnqueuePriority_Context *ctx,
+ ScoreTqReqEnqueuePriority_Pre_EligibleScheduler state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriority_Pre_EligibleScheduler_Home: {
+ /*
+ * While the enqueueing thread has no helping scheduler.
+ */
+ ctx->helping = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Pre_EligibleScheduler_Helping: {
+ /*
+ * While the enqueueing thread has at least one helping scheduler.
+ */
+ ctx->helping = true;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Pre_EligibleScheduler_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriority_Pre_QueueEligible_Prepare(
+ ScoreTqReqEnqueuePriority_Context *ctx,
+ ScoreTqReqEnqueuePriority_Pre_QueueEligible state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriority_Pre_QueueEligible_None: {
+ /*
+ * While all priority queues of the thread queue associated with eligible
+ * schedulers of the enqueueing thread are empty.
+ */
+ ctx->priority = PRIO_PSEUDO_ISR;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Pre_QueueEligible_High: {
+ /*
+ * While a priority queue of the thread queue associated with an eligible
+ * scheduler of the enqueueing thread is non-empty, while the highest
+ * priority of the priority queue is higher than the priority of the
+ * enqueueing thread with respect to the eligible scheduler.
+ */
+ ++ctx->tq_ctx->how_many;
+ ctx->priority = PRIO_ULTRA_HIGH;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Pre_QueueEligible_Equal: {
+ /*
+ * While a priority queue of the thread queue associated with an eligible
+ * scheduler of the enqueueing thread is non-empty, while the highest
+ * priority of the priority queue is equal to the priority of the
+ * enqueueing thread with respect to the eligible scheduler.
+ */
+ ++ctx->tq_ctx->how_many;
+ ctx->priority = PRIO_VERY_HIGH;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Pre_QueueEligible_Low: {
+ /*
+ * While a priority queue of the thread queue associated with an eligible
+ * scheduler of the enqueueing thread is non-empty, while the highest
+ * priority of the priority queue is lower than the priority of the
+ * enqueueing thread with respect to the eligible scheduler.
+ */
+ ++ctx->tq_ctx->how_many;
+ ctx->priority = PRIO_HIGH;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Pre_QueueEligible_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriority_Pre_QueueIneligible_Prepare(
+ ScoreTqReqEnqueuePriority_Context *ctx,
+ ScoreTqReqEnqueuePriority_Pre_QueueIneligible state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriority_Pre_QueueIneligible_None: {
+ /*
+ * While no priority queue of the thread queue exists which is not
+ * associated with an eligible scheduler of the enqueueing thread.
+ */
+ ctx->other_before = false;
+ ctx->other_after = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Pre_QueueIneligible_Only: {
+ /*
+ * While exactly one priority queue of the thread queue exists which is
+ * not associated with an eligible scheduler of the enqueueing thread.
+ */
+ ++ctx->tq_ctx->how_many;
+ ctx->other_before = true;
+ ctx->other_after = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Pre_QueueIneligible_Before: {
+ /*
+ * While a priority queue of the thread queue exists which is not
+ * associated with an eligible scheduler of the enqueueing thread, while
+ * this priority queue is positioned before all priority queues which are
+ * associated with eligible schedulers of the enqueueing thread.
+ */
+ ++ctx->tq_ctx->how_many;
+ ctx->other_before = true;
+ ctx->other_after = false;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Pre_QueueIneligible_After: {
+ /*
+ * While a priority queue of the thread queue exists which is not
+ * associated with an eligible scheduler of the enqueueing thread, while
+ * this priority queue is positioned after all priority queues which are
+ * associated with eligible schedulers of the enqueueing thread.
+ */
+ ++ctx->tq_ctx->how_many;
+ ctx->other_before = false;
+ ctx->other_after = true;
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Pre_QueueIneligible_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriority_Post_Position_Check(
+ ScoreTqReqEnqueuePriority_Context *ctx,
+ ScoreTqReqEnqueuePriority_Post_Position state
+)
+{
+ size_t i;
+
+ i = 0;
+
+ /* Event receives */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) );
+
+ switch ( state ) {
+ case ScoreTqReqEnqueuePriority_Post_Position_InitialFirst: {
+ /*
+ * A priority queue associated with the scheduler which contains exactly
+ * the enqueueing thread shall be created as the first priority queue of
+ * the thread queue.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Post_Position_InitialLast: {
+ /*
+ * A priority queue associated with the scheduler which contains exactly
+ * the enqueueing thread shall be created as the last priority queue of
+ * the thread queue.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_D ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Post_Position_First: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Post_Position_Second: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Post_Position_FirstFirst: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ *
+ * The position of the priority queue in the thread queue shall not
+ * change.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_D ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Post_Position_SecondFirst: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ *
+ * The position of the priority queue in the thread queue shall not
+ * change.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_D ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Post_Position_FirstLast: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ *
+ * The position of the priority queue in the thread queue shall not
+ * change.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_D ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Post_Position_SecondLast: {
+ /*
+ * The enqueueing thread shall be enqueued in the priority queue
+ * associated with the scheduler.
+ *
+ * The position of the priority queue in the thread queue shall not
+ * change.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_D ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_C ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqEnqueuePriority_Post_Position_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqEnqueuePriority_Setup(
+ ScoreTqReqEnqueuePriority_Context *ctx
+)
+{
+ TQReset( ctx->tq_ctx );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_A, PRIO_ULTRA_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_B, PRIO_LOW );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_C, PRIO_VERY_HIGH );
+
+ #if defined( RTEMS_SMP )
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_D, SCHEDULER_B_ID, PRIO_LOW );
+ #endif
+}
+
+static void ScoreTqReqEnqueuePriority_Setup_Wrap( void *arg )
+{
+ ScoreTqReqEnqueuePriority_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqEnqueuePriority_Setup( ctx );
+}
+
+static void ScoreTqReqEnqueuePriority_Teardown(
+ ScoreTqReqEnqueuePriority_Context *ctx
+)
+{
+ TQReset( ctx->tq_ctx );
+}
+
+static void ScoreTqReqEnqueuePriority_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqEnqueuePriority_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqEnqueuePriority_Teardown( ctx );
+}
+
+static void ScoreTqReqEnqueuePriority_Prepare(
+ ScoreTqReqEnqueuePriority_Context *ctx
+)
+{
+ ctx->tq_ctx->how_many = 1;
+}
+
+static void ScoreTqReqEnqueuePriority_Action(
+ ScoreTqReqEnqueuePriority_Context *ctx
+)
+{
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE_PREPARE );
+
+ if ( ctx->other_before ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_D,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER | TQ_EVENT_RUNNER_SYNC_2
+ );
+ }
+
+ if ( ctx->priority != PRIO_PSEUDO_ISR ) {
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_B , ctx->priority );
+ TQSend(
+ ctx->tq_ctx,
+ TQ_BLOCKER_B,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER
+ );
+ }
+
+ if ( ctx->other_after ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_D,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER | TQ_EVENT_RUNNER_SYNC_2
+ );
+ }
+
+ if ( ctx->helping ) {
+ if ( ctx->other_before || ctx->other_after ) {
+ if ( rtems_scheduler_get_processor_maximum() > 2 ) {
+ AddHelper( ctx->tq_ctx, SCHEDULER_C_ID );
+ }
+ } else {
+ AddHelper( ctx->tq_ctx, SCHEDULER_B_ID );
+ }
+ }
+
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ TQSend(
+ ctx->tq_ctx,
+ TQ_BLOCKER_C,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_SURRENDER | TQ_EVENT_RUNNER_SYNC
+ );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE_DONE );
+
+ if ( ctx->other_before || ctx->other_after ) {
+ TQSynchronizeRunner2();
+ } else {
+ TQSynchronizeRunner();
+ }
+
+ TQSchedulerRecordStop( ctx->tq_ctx );
+
+ if ( ctx->helping ) {
+ if ( ctx->other_before || ctx->other_after ) {
+ if ( rtems_scheduler_get_processor_maximum() > 2 ) {
+ RemoveHelper( ctx->tq_ctx );
+ }
+ } else {
+ RemoveHelper( ctx->tq_ctx );
+ }
+ }
+}
+
+static const ScoreTqReqEnqueuePriority_Entry
+ScoreTqReqEnqueuePriority_Entries[] = {
+ { 1, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_NA },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_SecondLast },
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_SecondFirst },
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_InitialLast },
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_NA },
+#endif
+ { 0, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_Second },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_FirstLast },
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_FirstFirst },
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_Second },
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_NA },
+#endif
+ { 0, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_InitialFirst },
+ { 0, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_First },
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_InitialFirst },
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_NA },
+#endif
+#if defined(RTEMS_SMP)
+ { 0, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_First }
+#else
+ { 1, 0, 0, 0, ScoreTqReqEnqueuePriority_Post_Position_NA }
+#endif
+};
+
+static const uint8_t
+ScoreTqReqEnqueuePriority_Map[] = {
+ 8, 3, 0, 0, 4, 0, 1, 2, 4, 0, 1, 2, 9, 0, 5, 6, 10, 3, 0, 0, 7, 0, 1, 2, 7,
+ 0, 1, 2, 11, 0, 5, 6
+};
+
+static size_t ScoreTqReqEnqueuePriority_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreTqReqEnqueuePriority_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ ScoreTqReqEnqueuePriority_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqEnqueuePriority_Fixture = {
+ .setup = ScoreTqReqEnqueuePriority_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqEnqueuePriority_Teardown_Wrap,
+ .scope = ScoreTqReqEnqueuePriority_Scope,
+ .initial_context = &ScoreTqReqEnqueuePriority_Instance
+};
+
+static inline ScoreTqReqEnqueuePriority_Entry
+ScoreTqReqEnqueuePriority_PopEntry( ScoreTqReqEnqueuePriority_Context *ctx )
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreTqReqEnqueuePriority_Entries[
+ ScoreTqReqEnqueuePriority_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqEnqueuePriority_TestVariant(
+ ScoreTqReqEnqueuePriority_Context *ctx
+)
+{
+ ScoreTqReqEnqueuePriority_Pre_EligibleScheduler_Prepare(
+ ctx,
+ ctx->Map.pcs[ 0 ]
+ );
+ ScoreTqReqEnqueuePriority_Pre_QueueEligible_Prepare(
+ ctx,
+ ctx->Map.pcs[ 1 ]
+ );
+ ScoreTqReqEnqueuePriority_Pre_QueueIneligible_Prepare(
+ ctx,
+ ctx->Map.pcs[ 2 ]
+ );
+ ScoreTqReqEnqueuePriority_Action( ctx );
+ ScoreTqReqEnqueuePriority_Post_Position_Check(
+ ctx,
+ ctx->Map.entry.Post_Position
+ );
+}
+
+static T_fixture_node ScoreTqReqEnqueuePriority_Node;
+
+static T_remark ScoreTqReqEnqueuePriority_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqEnqueuePriority"
+};
+
+void ScoreTqReqEnqueuePriority_Run( TQContext *tq_ctx )
+{
+ ScoreTqReqEnqueuePriority_Context *ctx;
+
+ ctx = &ScoreTqReqEnqueuePriority_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqEnqueuePriority_Node,
+ &ScoreTqReqEnqueuePriority_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreTqReqEnqueuePriority_Pre_EligibleScheduler_Home;
+ ctx->Map.pcs[ 0 ] < ScoreTqReqEnqueuePriority_Pre_EligibleScheduler_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = ScoreTqReqEnqueuePriority_Pre_QueueEligible_None;
+ ctx->Map.pcs[ 1 ] < ScoreTqReqEnqueuePriority_Pre_QueueEligible_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = ScoreTqReqEnqueuePriority_Pre_QueueIneligible_None;
+ ctx->Map.pcs[ 2 ] < ScoreTqReqEnqueuePriority_Pre_QueueIneligible_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqEnqueuePriority_PopEntry( ctx );
+ ScoreTqReqEnqueuePriority_Prepare( ctx );
+ ScoreTqReqEnqueuePriority_TestVariant( ctx );
+ }
+ }
+ }
+
+ T_add_remark( &ScoreTqReqEnqueuePriority_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-enqueue-priority.h b/testsuites/validation/tr-tq-enqueue-priority.h
new file mode 100644
index 0000000000..141c8a122c
--- /dev/null
+++ b/testsuites/validation/tr-tq-enqueue-priority.h
@@ -0,0 +1,113 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqEnqueuePriority
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_ENQUEUE_PRIORITY_H
+#define _TR_TQ_ENQUEUE_PRIORITY_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqEnqueuePriority
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqEnqueuePriority_Pre_EligibleScheduler_Home,
+ ScoreTqReqEnqueuePriority_Pre_EligibleScheduler_Helping,
+ ScoreTqReqEnqueuePriority_Pre_EligibleScheduler_NA
+} ScoreTqReqEnqueuePriority_Pre_EligibleScheduler;
+
+typedef enum {
+ ScoreTqReqEnqueuePriority_Pre_QueueEligible_None,
+ ScoreTqReqEnqueuePriority_Pre_QueueEligible_High,
+ ScoreTqReqEnqueuePriority_Pre_QueueEligible_Equal,
+ ScoreTqReqEnqueuePriority_Pre_QueueEligible_Low,
+ ScoreTqReqEnqueuePriority_Pre_QueueEligible_NA
+} ScoreTqReqEnqueuePriority_Pre_QueueEligible;
+
+typedef enum {
+ ScoreTqReqEnqueuePriority_Pre_QueueIneligible_None,
+ ScoreTqReqEnqueuePriority_Pre_QueueIneligible_Only,
+ ScoreTqReqEnqueuePriority_Pre_QueueIneligible_Before,
+ ScoreTqReqEnqueuePriority_Pre_QueueIneligible_After,
+ ScoreTqReqEnqueuePriority_Pre_QueueIneligible_NA
+} ScoreTqReqEnqueuePriority_Pre_QueueIneligible;
+
+typedef enum {
+ ScoreTqReqEnqueuePriority_Post_Position_InitialFirst,
+ ScoreTqReqEnqueuePriority_Post_Position_InitialLast,
+ ScoreTqReqEnqueuePriority_Post_Position_First,
+ ScoreTqReqEnqueuePriority_Post_Position_Second,
+ ScoreTqReqEnqueuePriority_Post_Position_FirstFirst,
+ ScoreTqReqEnqueuePriority_Post_Position_SecondFirst,
+ ScoreTqReqEnqueuePriority_Post_Position_FirstLast,
+ ScoreTqReqEnqueuePriority_Post_Position_SecondLast,
+ ScoreTqReqEnqueuePriority_Post_Position_NA
+} ScoreTqReqEnqueuePriority_Post_Position;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue context.
+ */
+void ScoreTqReqEnqueuePriority_Run( TQContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_ENQUEUE_PRIORITY_H */
diff --git a/testsuites/validation/tr-tq-flush-fifo.c b/testsuites/validation/tr-tq-flush-fifo.c
new file mode 100644
index 0000000000..785d7b37a1
--- /dev/null
+++ b/testsuites/validation/tr-tq-flush-fifo.c
@@ -0,0 +1,694 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqFlushFifo
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-tq-flush-fifo.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqFlushFifo spec:/score/tq/req/flush-fifo
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_MayStop_NA : 1;
+ uint8_t Pre_QueueEmpty_NA : 1;
+ uint8_t Pre_Stop_NA : 1;
+ uint8_t Pre_WaitState_NA : 1;
+ uint8_t Post_Operation : 2;
+} ScoreTqReqFlushFifo_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/flush-fifo test case.
+ */
+typedef struct {
+ /**
+ * @brief If this member is true, then the flush filter shall return NULL.
+ */
+ bool stop;
+
+ /**
+ * @brief If this member is true, then the least recently enqueued thread
+ * shall be in the intend to block wait state.
+ */
+ bool intend_to_block;
+
+ /**
+ * @brief This member contains the call within ISR request.
+ */
+ CallWithinISRRequest request;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqFlushFifo_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqFlushFifo_Run() parameter.
+ */
+ bool may_stop;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 4 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 4 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqFlushFifo_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqFlushFifo_Context;
+
+static ScoreTqReqFlushFifo_Context
+ ScoreTqReqFlushFifo_Instance;
+
+static const char * const ScoreTqReqFlushFifo_PreDesc_MayStop[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const ScoreTqReqFlushFifo_PreDesc_QueueEmpty[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const ScoreTqReqFlushFifo_PreDesc_Stop[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const ScoreTqReqFlushFifo_PreDesc_WaitState[] = {
+ "Blocked",
+ "IntendToBlock",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqFlushFifo_PreDesc[] = {
+ ScoreTqReqFlushFifo_PreDesc_MayStop,
+ ScoreTqReqFlushFifo_PreDesc_QueueEmpty,
+ ScoreTqReqFlushFifo_PreDesc_Stop,
+ ScoreTqReqFlushFifo_PreDesc_WaitState,
+ NULL
+};
+
+typedef ScoreTqReqFlushFifo_Context Context;
+
+static const T_scheduler_event *GetUnblock( Context *ctx, size_t *index )
+{
+ return TQGetNextUnblock( ctx->tq_ctx, index );
+}
+
+static const rtems_tcb *GetTCB( Context *ctx, TQWorkerKind worker )
+{
+ return ctx->tq_ctx->worker_tcb[ worker ];
+}
+
+static void BlockerAFlush( Context *ctx )
+{
+ TQSchedulerRecordStart( ctx->tq_ctx );
+
+ if ( ctx->stop ) {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_FLUSH_PARTIAL );
+ } else {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_FLUSH_ALL );
+ }
+}
+
+static void InterruptFlush( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ TQFlush( ctx->tq_ctx, !ctx->stop );
+}
+
+static void SchedulerEvent(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_BEFORE &&
+ event->operation == T_SCHEDULER_BLOCK
+ ) {
+ T_scheduler_set_event_handler( NULL, NULL );
+ ctx->request.handler = InterruptFlush;
+ CallWithinISRSubmit( &ctx->request );
+ }
+}
+
+static uint32_t CheckExtractions( Context *ctx )
+{
+ uint32_t extracted_threads;
+ size_t i;
+ const T_scheduler_event *event;
+
+ extracted_threads = 0;
+ i = 0;
+
+ if ( !ctx->intend_to_block ) {
+ /* Event receive */
+ T_eq_ptr( GetUnblock( ctx, &i )->thread, GetTCB( ctx, TQ_BLOCKER_A ) );
+ }
+
+ event = GetUnblock( ctx, &i );
+
+ if ( event != &T_scheduler_event_null ) {
+ if ( ctx->intend_to_block ) {
+ T_eq_ptr( event->executing, NULL );
+ } else {
+ T_eq_ptr( event->executing, GetTCB( ctx, TQ_BLOCKER_A ) );
+ }
+
+ T_eq_ptr( event->thread, GetTCB( ctx, TQ_BLOCKER_B ) );
+ ++extracted_threads;
+ }
+
+ event = GetUnblock( ctx, &i );
+
+ if ( event != &T_scheduler_event_null ) {
+ if ( ctx->intend_to_block ) {
+ T_eq_ptr( event->executing, NULL );
+ } else {
+ T_eq_ptr( event->executing, GetTCB( ctx, TQ_BLOCKER_A ) );
+ }
+
+ T_eq_ptr( event->thread, GetTCB( ctx, TQ_BLOCKER_C ) );
+ ++extracted_threads;
+ }
+
+ event = GetUnblock( ctx, &i );
+
+ if ( event != &T_scheduler_event_null ) {
+ if ( ctx->intend_to_block ) {
+ T_eq_ptr( event->executing, GetTCB( ctx, TQ_BLOCKER_D ) );
+ } else {
+ T_eq_ptr( event->executing, GetTCB( ctx, TQ_BLOCKER_A ) );
+ }
+
+ T_eq_ptr( event->thread, GetTCB( ctx, TQ_BLOCKER_D ) );
+ ++extracted_threads;
+ }
+
+ T_eq_ptr( GetUnblock( ctx, &i ), &T_scheduler_event_null );
+ T_eq_u32( extracted_threads, ctx->tq_ctx->flush_count );
+
+ return extracted_threads;
+}
+
+static void ScoreTqReqFlushFifo_Pre_MayStop_Prepare(
+ ScoreTqReqFlushFifo_Context *ctx,
+ ScoreTqReqFlushFifo_Pre_MayStop state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqFlushFifo_Pre_MayStop_Yes: {
+ /*
+ * Where the flush filter may return NULL.
+ */
+ if ( !ctx->may_stop ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqFlushFifo_Pre_MayStop_No: {
+ /*
+ * Where the flush filter does not return NULL.
+ */
+ if ( ctx->may_stop ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqFlushFifo_Pre_MayStop_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqFlushFifo_Pre_QueueEmpty_Prepare(
+ ScoreTqReqFlushFifo_Context *ctx,
+ ScoreTqReqFlushFifo_Pre_QueueEmpty state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqFlushFifo_Pre_QueueEmpty_Yes: {
+ /*
+ * While the thread queue is empty.
+ */
+ ctx->tq_ctx->how_many = 0;
+ break;
+ }
+
+ case ScoreTqReqFlushFifo_Pre_QueueEmpty_No: {
+ /*
+ * While the thread queue has at least one enqueued thread.
+ */
+ ctx->tq_ctx->how_many = 3;
+ break;
+ }
+
+ case ScoreTqReqFlushFifo_Pre_QueueEmpty_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqFlushFifo_Pre_Stop_Prepare(
+ ScoreTqReqFlushFifo_Context *ctx,
+ ScoreTqReqFlushFifo_Pre_Stop state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqFlushFifo_Pre_Stop_Yes: {
+ /*
+ * While the flush filter returns NULL for an enqueued thread.
+ */
+ ctx->stop = true;
+ break;
+ }
+
+ case ScoreTqReqFlushFifo_Pre_Stop_No: {
+ /*
+ * While the flush filter does not return NULL for an enqueued thread.
+ */
+ ctx->stop = false;
+ break;
+ }
+
+ case ScoreTqReqFlushFifo_Pre_Stop_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqFlushFifo_Pre_WaitState_Prepare(
+ ScoreTqReqFlushFifo_Context *ctx,
+ ScoreTqReqFlushFifo_Pre_WaitState state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqFlushFifo_Pre_WaitState_Blocked: {
+ /*
+ * While the least recently enqueued thread on the thread queue is in the
+ * blocked wait state.
+ */
+ ctx->intend_to_block = false;
+ break;
+ }
+
+ case ScoreTqReqFlushFifo_Pre_WaitState_IntendToBlock: {
+ /*
+ * While the least recently enqueued thread on the thread queue is in the
+ * intend to block wait state.
+ */
+ ctx->intend_to_block = true;
+ break;
+ }
+
+ case ScoreTqReqFlushFifo_Pre_WaitState_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqFlushFifo_Post_Operation_Check(
+ ScoreTqReqFlushFifo_Context *ctx,
+ ScoreTqReqFlushFifo_Post_Operation state
+)
+{
+ size_t i;
+ uint32_t extracted_threads;
+
+ switch ( state ) {
+ case ScoreTqReqFlushFifo_Post_Operation_Nop: {
+ /*
+ * No thread queue extraction operation shall be performed.
+ */
+ /* Event receive */
+ i = 0;
+ T_eq_ptr( GetUnblock( ctx, &i )->thread, GetTCB( ctx, TQ_BLOCKER_A ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), &T_scheduler_event_null );
+ break;
+ }
+
+ case ScoreTqReqFlushFifo_Post_Operation_ExtractAll: {
+ /*
+ * The enqueued threads shall be extracted from the thread queue in FIFO
+ * order.
+ */
+ extracted_threads = CheckExtractions( ctx );
+ T_eq_sz( extracted_threads, ctx->tq_ctx->how_many );
+ break;
+ }
+
+ case ScoreTqReqFlushFifo_Post_Operation_ExtractPartial: {
+ /*
+ * The enqueued threads which precede in FIFO order the enqueued thread
+ * for which the flush filter returned NULL shall be extracted from the
+ * thread queue in FIFO order.
+ */
+ extracted_threads = CheckExtractions( ctx );
+ T_lt_sz( extracted_threads, ctx->tq_ctx->how_many );
+ break;
+ }
+
+ case ScoreTqReqFlushFifo_Post_Operation_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqFlushFifo_Setup( ScoreTqReqFlushFifo_Context *ctx )
+{
+ ctx->request.arg = ctx;
+ TQReset( ctx->tq_ctx );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_A, PRIO_ULTRA_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_B, PRIO_VERY_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_C, PRIO_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_D, PRIO_HIGH );
+}
+
+static void ScoreTqReqFlushFifo_Setup_Wrap( void *arg )
+{
+ ScoreTqReqFlushFifo_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqFlushFifo_Setup( ctx );
+}
+
+static void ScoreTqReqFlushFifo_Teardown( ScoreTqReqFlushFifo_Context *ctx )
+{
+ TQReset( ctx->tq_ctx );
+}
+
+static void ScoreTqReqFlushFifo_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqFlushFifo_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqFlushFifo_Teardown( ctx );
+}
+
+static void ScoreTqReqFlushFifo_Action( ScoreTqReqFlushFifo_Context *ctx )
+{
+ uint32_t flush_count;
+
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE_PREPARE );
+
+ if ( ctx->tq_ctx->how_many > 0 ) {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_ENQUEUE );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_C, TQ_EVENT_ENQUEUE );
+
+ if ( ctx->intend_to_block ) {
+ T_scheduler_set_event_handler( SchedulerEvent, ctx );
+ }
+
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_D, TQ_EVENT_ENQUEUE );
+
+ if ( !ctx->intend_to_block ) {
+ BlockerAFlush( ctx );
+ }
+ } else {
+ BlockerAFlush( ctx );
+ }
+
+ flush_count = ctx->tq_ctx->flush_count;
+ TQSchedulerRecordStop( ctx->tq_ctx );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_FLUSH_ALL );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE_DONE );
+ ctx->tq_ctx->flush_count = flush_count;
+}
+
+static const ScoreTqReqFlushFifo_Entry
+ScoreTqReqFlushFifo_Entries[] = {
+ { 0, 0, 0, 1, 1, ScoreTqReqFlushFifo_Post_Operation_Nop },
+ { 0, 0, 0, 0, 0, ScoreTqReqFlushFifo_Post_Operation_ExtractAll },
+ { 0, 0, 0, 0, 0, ScoreTqReqFlushFifo_Post_Operation_ExtractPartial },
+ { 1, 0, 0, 0, 0, ScoreTqReqFlushFifo_Post_Operation_NA }
+};
+
+static const uint8_t
+ScoreTqReqFlushFifo_Map[] = {
+ 0, 0, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 3, 3, 1, 1
+};
+
+static size_t ScoreTqReqFlushFifo_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreTqReqFlushFifo_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( ScoreTqReqFlushFifo_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqFlushFifo_Fixture = {
+ .setup = ScoreTqReqFlushFifo_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqFlushFifo_Teardown_Wrap,
+ .scope = ScoreTqReqFlushFifo_Scope,
+ .initial_context = &ScoreTqReqFlushFifo_Instance
+};
+
+static const uint8_t ScoreTqReqFlushFifo_Weights[] = {
+ 8, 4, 2, 1
+};
+
+static void ScoreTqReqFlushFifo_Skip(
+ ScoreTqReqFlushFifo_Context *ctx,
+ size_t index
+)
+{
+ switch ( index + 1 ) {
+ case 1:
+ ctx->Map.pci[ 1 ] = ScoreTqReqFlushFifo_Pre_QueueEmpty_NA - 1;
+ /* Fall through */
+ case 2:
+ ctx->Map.pci[ 2 ] = ScoreTqReqFlushFifo_Pre_Stop_NA - 1;
+ /* Fall through */
+ case 3:
+ ctx->Map.pci[ 3 ] = ScoreTqReqFlushFifo_Pre_WaitState_NA - 1;
+ break;
+ }
+}
+
+static inline ScoreTqReqFlushFifo_Entry ScoreTqReqFlushFifo_PopEntry(
+ ScoreTqReqFlushFifo_Context *ctx
+)
+{
+ size_t index;
+
+ if ( ctx->Map.skip ) {
+ size_t i;
+
+ ctx->Map.skip = false;
+ index = 0;
+
+ for ( i = 0; i < 4; ++i ) {
+ index += ScoreTqReqFlushFifo_Weights[ i ] * ctx->Map.pci[ i ];
+ }
+ } else {
+ index = ctx->Map.index;
+ }
+
+ ctx->Map.index = index + 1;
+
+ return ScoreTqReqFlushFifo_Entries[
+ ScoreTqReqFlushFifo_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqFlushFifo_SetPreConditionStates(
+ ScoreTqReqFlushFifo_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+
+ if ( ctx->Map.entry.Pre_Stop_NA ) {
+ ctx->Map.pcs[ 2 ] = ScoreTqReqFlushFifo_Pre_Stop_NA;
+ } else {
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ }
+
+ if ( ctx->Map.entry.Pre_WaitState_NA ) {
+ ctx->Map.pcs[ 3 ] = ScoreTqReqFlushFifo_Pre_WaitState_NA;
+ } else {
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ }
+}
+
+static void ScoreTqReqFlushFifo_TestVariant( ScoreTqReqFlushFifo_Context *ctx )
+{
+ ScoreTqReqFlushFifo_Pre_MayStop_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreTqReqFlushFifo_Skip( ctx, 0 );
+ return;
+ }
+
+ ScoreTqReqFlushFifo_Pre_QueueEmpty_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ ScoreTqReqFlushFifo_Pre_Stop_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ ScoreTqReqFlushFifo_Pre_WaitState_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ ScoreTqReqFlushFifo_Action( ctx );
+ ScoreTqReqFlushFifo_Post_Operation_Check(
+ ctx,
+ ctx->Map.entry.Post_Operation
+ );
+}
+
+static T_fixture_node ScoreTqReqFlushFifo_Node;
+
+static T_remark ScoreTqReqFlushFifo_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqFlushFifo"
+};
+
+void ScoreTqReqFlushFifo_Run( TQContext *tq_ctx, bool may_stop )
+{
+ ScoreTqReqFlushFifo_Context *ctx;
+
+ ctx = &ScoreTqReqFlushFifo_Instance;
+ ctx->tq_ctx = tq_ctx;
+ ctx->may_stop = may_stop;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqFlushFifo_Node,
+ &ScoreTqReqFlushFifo_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+ ctx->Map.skip = false;
+
+ for (
+ ctx->Map.pci[ 0 ] = ScoreTqReqFlushFifo_Pre_MayStop_Yes;
+ ctx->Map.pci[ 0 ] < ScoreTqReqFlushFifo_Pre_MayStop_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = ScoreTqReqFlushFifo_Pre_QueueEmpty_Yes;
+ ctx->Map.pci[ 1 ] < ScoreTqReqFlushFifo_Pre_QueueEmpty_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = ScoreTqReqFlushFifo_Pre_Stop_Yes;
+ ctx->Map.pci[ 2 ] < ScoreTqReqFlushFifo_Pre_Stop_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = ScoreTqReqFlushFifo_Pre_WaitState_Blocked;
+ ctx->Map.pci[ 3 ] < ScoreTqReqFlushFifo_Pre_WaitState_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqFlushFifo_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ ScoreTqReqFlushFifo_SetPreConditionStates( ctx );
+ ScoreTqReqFlushFifo_TestVariant( ctx );
+ }
+ }
+ }
+ }
+
+ T_add_remark( &ScoreTqReqFlushFifo_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-flush-fifo.h b/testsuites/validation/tr-tq-flush-fifo.h
new file mode 100644
index 0000000000..8d5bb8b8d6
--- /dev/null
+++ b/testsuites/validation/tr-tq-flush-fifo.h
@@ -0,0 +1,112 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqFlushFifo
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_FLUSH_FIFO_H
+#define _TR_TQ_FLUSH_FIFO_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqFlushFifo
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqFlushFifo_Pre_MayStop_Yes,
+ ScoreTqReqFlushFifo_Pre_MayStop_No,
+ ScoreTqReqFlushFifo_Pre_MayStop_NA
+} ScoreTqReqFlushFifo_Pre_MayStop;
+
+typedef enum {
+ ScoreTqReqFlushFifo_Pre_QueueEmpty_Yes,
+ ScoreTqReqFlushFifo_Pre_QueueEmpty_No,
+ ScoreTqReqFlushFifo_Pre_QueueEmpty_NA
+} ScoreTqReqFlushFifo_Pre_QueueEmpty;
+
+typedef enum {
+ ScoreTqReqFlushFifo_Pre_Stop_Yes,
+ ScoreTqReqFlushFifo_Pre_Stop_No,
+ ScoreTqReqFlushFifo_Pre_Stop_NA
+} ScoreTqReqFlushFifo_Pre_Stop;
+
+typedef enum {
+ ScoreTqReqFlushFifo_Pre_WaitState_Blocked,
+ ScoreTqReqFlushFifo_Pre_WaitState_IntendToBlock,
+ ScoreTqReqFlushFifo_Pre_WaitState_NA
+} ScoreTqReqFlushFifo_Pre_WaitState;
+
+typedef enum {
+ ScoreTqReqFlushFifo_Post_Operation_Nop,
+ ScoreTqReqFlushFifo_Post_Operation_ExtractAll,
+ ScoreTqReqFlushFifo_Post_Operation_ExtractPartial,
+ ScoreTqReqFlushFifo_Post_Operation_NA
+} ScoreTqReqFlushFifo_Post_Operation;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue test context.
+ *
+ * @param may_stop is true, if a partial flush is supported.
+ */
+void ScoreTqReqFlushFifo_Run( TQContext *tq_ctx, bool may_stop );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_FLUSH_FIFO_H */
diff --git a/testsuites/validation/tr-tq-flush-priority-inherit.c b/testsuites/validation/tr-tq-flush-priority-inherit.c
new file mode 100644
index 0000000000..903dc20cf2
--- /dev/null
+++ b/testsuites/validation/tr-tq-flush-priority-inherit.c
@@ -0,0 +1,577 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqFlushPriorityInherit
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-tq-flush-priority-inherit.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqFlushPriorityInherit \
+ * spec:/score/tq/req/flush-priority-inherit
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Priority_NA : 1;
+ uint8_t Pre_Queue_NA : 1;
+ uint8_t Post_Extract : 2;
+ uint8_t Post_PriorityUpdate : 2;
+} ScoreTqReqFlushPriorityInherit_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/flush-priority-inherit test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the call within ISR request.
+ */
+ CallWithinISRRequest request;
+
+ /**
+ * @brief If this member is true, then a minimum priority of the owner of the
+ * thread queue shall be inherited from a thread enqueued on the thread
+ * queue.
+ */
+ bool minimum;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqFlushPriorityInherit_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 2 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqFlushPriorityInherit_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqFlushPriorityInherit_Context;
+
+static ScoreTqReqFlushPriorityInherit_Context
+ ScoreTqReqFlushPriorityInherit_Instance;
+
+static const char * const ScoreTqReqFlushPriorityInherit_PreDesc_Priority[] = {
+ "Minimum",
+ "NotMinimum",
+ "NA"
+};
+
+static const char * const ScoreTqReqFlushPriorityInherit_PreDesc_Queue[] = {
+ "Empty",
+ "NonEmpty",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqFlushPriorityInherit_PreDesc[] = {
+ ScoreTqReqFlushPriorityInherit_PreDesc_Priority,
+ ScoreTqReqFlushPriorityInherit_PreDesc_Queue,
+ NULL
+};
+
+typedef ScoreTqReqFlushPriorityInherit_Context Context;
+
+static const T_scheduler_event *GetUnblock( Context *ctx, size_t *index )
+{
+ return TQGetNextUnblock( ctx->tq_ctx, index );
+}
+
+static const T_scheduler_event *GetPriorityUpdate( Context *ctx, size_t *index )
+{
+ return T_scheduler_next(
+ &ctx->tq_ctx->scheduler_log.header,
+ T_SCHEDULER_UPDATE_PRIORITY,
+ index
+ );
+}
+
+static const rtems_tcb *GetTCB( Context *ctx, TQWorkerKind worker )
+{
+ return ctx->tq_ctx->worker_tcb[ worker ];
+}
+
+static void Flush( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ TQFlush( ctx->tq_ctx, true );
+}
+
+static void SchedulerEvent(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_BEFORE &&
+ event->operation == T_SCHEDULER_BLOCK
+ ) {
+ ctx->request.handler = Flush;
+ ctx->request.arg = ctx;
+ CallWithinISRSubmit( &ctx->request );
+ T_scheduler_set_event_handler( NULL, NULL );
+ }
+}
+
+static void ScoreTqReqFlushPriorityInherit_Pre_Priority_Prepare(
+ ScoreTqReqFlushPriorityInherit_Context *ctx,
+ ScoreTqReqFlushPriorityInherit_Pre_Priority state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqFlushPriorityInherit_Pre_Priority_Minimum: {
+ /*
+ * While a minimum priority of the owner of the thread queue is inherited
+ * from a thread enqueued on the thread queue.
+ */
+ ctx->minimum = true;
+ break;
+ }
+
+ case ScoreTqReqFlushPriorityInherit_Pre_Priority_NotMinimum: {
+ /*
+ * While no minimum priority of the owner of the thread queue is
+ * inherited from a thread enqueued on the thread queue.
+ */
+ ctx->minimum = false;
+ break;
+ }
+
+ case ScoreTqReqFlushPriorityInherit_Pre_Priority_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqFlushPriorityInherit_Pre_Queue_Prepare(
+ ScoreTqReqFlushPriorityInherit_Context *ctx,
+ ScoreTqReqFlushPriorityInherit_Pre_Queue state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqFlushPriorityInherit_Pre_Queue_Empty: {
+ /*
+ * While the thread queue is empty.
+ */
+ ctx->tq_ctx->how_many = 0;
+ break;
+ }
+
+ case ScoreTqReqFlushPriorityInherit_Pre_Queue_NonEmpty: {
+ /*
+ * While the thread queue has at least one enqueued thread.
+ */
+ ctx->tq_ctx->how_many = 3;
+ break;
+ }
+
+ case ScoreTqReqFlushPriorityInherit_Pre_Queue_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqFlushPriorityInherit_Post_Extract_Check(
+ ScoreTqReqFlushPriorityInherit_Context *ctx,
+ ScoreTqReqFlushPriorityInherit_Post_Extract state
+)
+{
+ size_t i;
+ const T_scheduler_event *event;
+
+ i = 0;
+
+ switch ( state ) {
+ case ScoreTqReqFlushPriorityInherit_Post_Extract_Nop: {
+ /*
+ * No operation shall be performed.
+ */
+ /* Event receive */
+ T_eq_ptr( GetUnblock( ctx, &i )->thread, GetTCB( ctx, TQ_BLOCKER_A ) );
+ T_eq_ptr( GetPriorityUpdate( ctx, &i ), &T_scheduler_event_null );
+ break;
+ }
+
+ case ScoreTqReqFlushPriorityInherit_Post_Extract_All: {
+ /*
+ * The enqueued threads of the thread queue shall be extracted in
+ * priority order for each priority queue associated with a scheduler.
+ * The priority queues of the thread queue shall be accessed in FIFO
+ * order.
+ */
+ event = GetUnblock( ctx, &i );
+ T_eq_ptr( event->executing, NULL );
+ T_eq_ptr( event->thread, GetTCB( ctx, TQ_BLOCKER_D ) );
+
+ event = GetUnblock( ctx, &i );
+ T_eq_ptr( event->executing, NULL );
+ T_eq_ptr( event->thread, GetTCB( ctx, TQ_BLOCKER_C ) );
+
+ if ( ctx->minimum ) {
+ /*
+ * This priority update is carried out by
+ * _Thread_queue_Flush_critical().
+ */
+ event = GetPriorityUpdate( ctx, &i );
+ T_eq_ptr( event->executing, NULL );
+ T_eq_ptr( event->thread, GetTCB( ctx, TQ_BLOCKER_A ) );
+ }
+
+ event = GetUnblock( ctx, &i );
+ T_eq_ptr( event->executing, GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( event->thread, GetTCB( ctx, TQ_BLOCKER_B ) );
+
+ if ( ctx->minimum && rtems_configuration_get_maximum_processors() > 1 ) {
+ /*
+ * This superfluous priority update is carried out by
+ * _Thread_queue_Enqueue() since TQ_BLOCKER_B would have inherited its
+ * priority for scheduler B to TQ_BLOCKER_A if it were not flushed from
+ * the thread queue.
+ */
+ event = GetPriorityUpdate( ctx, &i );
+ T_eq_ptr( event->executing, GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( event->thread, GetTCB( ctx, TQ_BLOCKER_A ) );
+ }
+
+ event = GetPriorityUpdate( ctx, &i );
+ T_eq_ptr( event, &T_scheduler_event_null );
+
+ T_eq_u32(
+ GetPriority( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] ),
+ PRIO_HIGH
+ );
+ break;
+ }
+
+ case ScoreTqReqFlushPriorityInherit_Post_Extract_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqFlushPriorityInherit_Post_PriorityUpdate_Check(
+ ScoreTqReqFlushPriorityInherit_Context *ctx,
+ ScoreTqReqFlushPriorityInherit_Post_PriorityUpdate state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqFlushPriorityInherit_Post_PriorityUpdate_No: {
+ /*
+ * The current priority of the owner of the thread queue shall not be
+ * updated by the thread queue flush operation.
+ */
+ /* Checked by ``Extract`` post-condition state ``Nop`` */
+ break;
+ }
+
+ case ScoreTqReqFlushPriorityInherit_Post_PriorityUpdate_Yes: {
+ /*
+ * The current priority of the owner of the thread queue shall be updated
+ * by the thread queue flush operation to reflect the loss of inherited
+ * priorities of the flushed threads.
+ */
+ /* Checked by ``Extract`` post-condition state ``All`` */
+ break;
+ }
+
+ case ScoreTqReqFlushPriorityInherit_Post_PriorityUpdate_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqFlushPriorityInherit_Setup(
+ ScoreTqReqFlushPriorityInherit_Context *ctx
+)
+{
+ TQReset( ctx->tq_ctx );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_A, PRIO_HIGH );
+}
+
+static void ScoreTqReqFlushPriorityInherit_Setup_Wrap( void *arg )
+{
+ ScoreTqReqFlushPriorityInherit_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqFlushPriorityInherit_Setup( ctx );
+}
+
+static void ScoreTqReqFlushPriorityInherit_Teardown(
+ ScoreTqReqFlushPriorityInherit_Context *ctx
+)
+{
+ TQReset( ctx->tq_ctx );
+}
+
+static void ScoreTqReqFlushPriorityInherit_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqFlushPriorityInherit_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqFlushPriorityInherit_Teardown( ctx );
+}
+
+static void ScoreTqReqFlushPriorityInherit_Action(
+ ScoreTqReqFlushPriorityInherit_Context *ctx
+)
+{
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE_PREPARE );
+
+ if ( ctx->tq_ctx->how_many > 0 ) {
+ if ( ctx->minimum ) {
+ if ( rtems_configuration_get_maximum_processors() > 1 ) {
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_B, SCHEDULER_B_ID, PRIO_HIGH );
+ } else {
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_B, SCHEDULER_A_ID, PRIO_HIGH );
+ }
+
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_C, PRIO_VERY_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_D, PRIO_ULTRA_HIGH );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_C, TQ_EVENT_ENQUEUE );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_D, TQ_EVENT_ENQUEUE );
+ } else {
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_B, SCHEDULER_A_ID, PRIO_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_C, PRIO_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_D, PRIO_HIGH );
+
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_D, TQ_EVENT_ENQUEUE );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_C, TQ_EVENT_ENQUEUE );
+ }
+
+ T_scheduler_set_event_handler( SchedulerEvent, ctx );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_B,
+ TQ_EVENT_ENQUEUE
+ );
+ } else {
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_FLUSH_ALL );
+ }
+
+ TQSchedulerRecordStop( ctx->tq_ctx );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE_DONE );
+}
+
+static const ScoreTqReqFlushPriorityInherit_Entry
+ScoreTqReqFlushPriorityInherit_Entries[] = {
+ { 0, 1, 0, ScoreTqReqFlushPriorityInherit_Post_Extract_Nop,
+ ScoreTqReqFlushPriorityInherit_Post_PriorityUpdate_No },
+ { 0, 0, 0, ScoreTqReqFlushPriorityInherit_Post_Extract_All,
+ ScoreTqReqFlushPriorityInherit_Post_PriorityUpdate_Yes },
+ { 0, 0, 0, ScoreTqReqFlushPriorityInherit_Post_Extract_All,
+ ScoreTqReqFlushPriorityInherit_Post_PriorityUpdate_No }
+};
+
+static const uint8_t
+ScoreTqReqFlushPriorityInherit_Map[] = {
+ 0, 1, 0, 2
+};
+
+static size_t ScoreTqReqFlushPriorityInherit_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ ScoreTqReqFlushPriorityInherit_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ ScoreTqReqFlushPriorityInherit_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqFlushPriorityInherit_Fixture = {
+ .setup = ScoreTqReqFlushPriorityInherit_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqFlushPriorityInherit_Teardown_Wrap,
+ .scope = ScoreTqReqFlushPriorityInherit_Scope,
+ .initial_context = &ScoreTqReqFlushPriorityInherit_Instance
+};
+
+static inline ScoreTqReqFlushPriorityInherit_Entry
+ScoreTqReqFlushPriorityInherit_PopEntry(
+ ScoreTqReqFlushPriorityInherit_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreTqReqFlushPriorityInherit_Entries[
+ ScoreTqReqFlushPriorityInherit_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqFlushPriorityInherit_SetPreConditionStates(
+ ScoreTqReqFlushPriorityInherit_Context *ctx
+)
+{
+ if ( ctx->Map.entry.Pre_Priority_NA ) {
+ ctx->Map.pcs[ 0 ] = ScoreTqReqFlushPriorityInherit_Pre_Priority_NA;
+ } else {
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ }
+
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+}
+
+static void ScoreTqReqFlushPriorityInherit_TestVariant(
+ ScoreTqReqFlushPriorityInherit_Context *ctx
+)
+{
+ ScoreTqReqFlushPriorityInherit_Pre_Priority_Prepare(
+ ctx,
+ ctx->Map.pcs[ 0 ]
+ );
+ ScoreTqReqFlushPriorityInherit_Pre_Queue_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ ScoreTqReqFlushPriorityInherit_Action( ctx );
+ ScoreTqReqFlushPriorityInherit_Post_Extract_Check(
+ ctx,
+ ctx->Map.entry.Post_Extract
+ );
+ ScoreTqReqFlushPriorityInherit_Post_PriorityUpdate_Check(
+ ctx,
+ ctx->Map.entry.Post_PriorityUpdate
+ );
+}
+
+static T_fixture_node ScoreTqReqFlushPriorityInherit_Node;
+
+static T_remark ScoreTqReqFlushPriorityInherit_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqFlushPriorityInherit"
+};
+
+void ScoreTqReqFlushPriorityInherit_Run( TQContext *tq_ctx )
+{
+ ScoreTqReqFlushPriorityInherit_Context *ctx;
+
+ ctx = &ScoreTqReqFlushPriorityInherit_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqFlushPriorityInherit_Node,
+ &ScoreTqReqFlushPriorityInherit_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = ScoreTqReqFlushPriorityInherit_Pre_Priority_Minimum;
+ ctx->Map.pci[ 0 ] < ScoreTqReqFlushPriorityInherit_Pre_Priority_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = ScoreTqReqFlushPriorityInherit_Pre_Queue_Empty;
+ ctx->Map.pci[ 1 ] < ScoreTqReqFlushPriorityInherit_Pre_Queue_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqFlushPriorityInherit_PopEntry( ctx );
+ ScoreTqReqFlushPriorityInherit_SetPreConditionStates( ctx );
+ ScoreTqReqFlushPriorityInherit_TestVariant( ctx );
+ }
+ }
+
+ T_add_remark( &ScoreTqReqFlushPriorityInherit_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-flush-priority-inherit.h b/testsuites/validation/tr-tq-flush-priority-inherit.h
new file mode 100644
index 0000000000..277084244c
--- /dev/null
+++ b/testsuites/validation/tr-tq-flush-priority-inherit.h
@@ -0,0 +1,103 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqFlushPriorityInherit
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_FLUSH_PRIORITY_INHERIT_H
+#define _TR_TQ_FLUSH_PRIORITY_INHERIT_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqFlushPriorityInherit
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqFlushPriorityInherit_Pre_Priority_Minimum,
+ ScoreTqReqFlushPriorityInherit_Pre_Priority_NotMinimum,
+ ScoreTqReqFlushPriorityInherit_Pre_Priority_NA
+} ScoreTqReqFlushPriorityInherit_Pre_Priority;
+
+typedef enum {
+ ScoreTqReqFlushPriorityInherit_Pre_Queue_Empty,
+ ScoreTqReqFlushPriorityInherit_Pre_Queue_NonEmpty,
+ ScoreTqReqFlushPriorityInherit_Pre_Queue_NA
+} ScoreTqReqFlushPriorityInherit_Pre_Queue;
+
+typedef enum {
+ ScoreTqReqFlushPriorityInherit_Post_Extract_Nop,
+ ScoreTqReqFlushPriorityInherit_Post_Extract_All,
+ ScoreTqReqFlushPriorityInherit_Post_Extract_NA
+} ScoreTqReqFlushPriorityInherit_Post_Extract;
+
+typedef enum {
+ ScoreTqReqFlushPriorityInherit_Post_PriorityUpdate_No,
+ ScoreTqReqFlushPriorityInherit_Post_PriorityUpdate_Yes,
+ ScoreTqReqFlushPriorityInherit_Post_PriorityUpdate_NA
+} ScoreTqReqFlushPriorityInherit_Post_PriorityUpdate;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue test context.
+ */
+void ScoreTqReqFlushPriorityInherit_Run( TQContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_FLUSH_PRIORITY_INHERIT_H */
diff --git a/testsuites/validation/tr-tq-flush-priority.c b/testsuites/validation/tr-tq-flush-priority.c
new file mode 100644
index 0000000000..b8a06c2340
--- /dev/null
+++ b/testsuites/validation/tr-tq-flush-priority.c
@@ -0,0 +1,424 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqFlushPriority
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-tq-flush-priority.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqFlushPriority spec:/score/tq/req/flush-priority
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Queue_NA : 1;
+ uint8_t Post_Operation : 2;
+} ScoreTqReqFlushPriority_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/flush-priority test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the call within ISR request.
+ */
+ CallWithinISRRequest request;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqFlushPriority_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqFlushPriority_Run() parameter.
+ */
+ bool supports_multiple_priority_queues;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqFlushPriority_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqFlushPriority_Context;
+
+static ScoreTqReqFlushPriority_Context
+ ScoreTqReqFlushPriority_Instance;
+
+static const char * const ScoreTqReqFlushPriority_PreDesc_Queue[] = {
+ "Empty",
+ "NonEmpty",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqFlushPriority_PreDesc[] = {
+ ScoreTqReqFlushPriority_PreDesc_Queue,
+ NULL
+};
+
+typedef ScoreTqReqFlushPriority_Context Context;
+
+static const T_scheduler_event *GetUnblock( Context *ctx, size_t *index )
+{
+ return TQGetNextUnblock( ctx->tq_ctx, index );
+}
+
+static const rtems_tcb *GetTCB( Context *ctx, TQWorkerKind worker )
+{
+ return ctx->tq_ctx->worker_tcb[ worker ];
+}
+
+static void Flush( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ TQFlush( ctx->tq_ctx, true );
+}
+
+static void SchedulerEvent(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_BEFORE &&
+ event->operation == T_SCHEDULER_BLOCK
+ ) {
+ ctx->request.handler = Flush;
+ ctx->request.arg = ctx;
+ CallWithinISRSubmit( &ctx->request );
+ T_scheduler_set_event_handler( NULL, NULL );
+ }
+}
+
+static void ScoreTqReqFlushPriority_Pre_Queue_Prepare(
+ ScoreTqReqFlushPriority_Context *ctx,
+ ScoreTqReqFlushPriority_Pre_Queue state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqFlushPriority_Pre_Queue_Empty: {
+ /*
+ * While the thread queue is empty.
+ */
+ ctx->tq_ctx->how_many = 0;
+ break;
+ }
+
+ case ScoreTqReqFlushPriority_Pre_Queue_NonEmpty: {
+ /*
+ * While the thread queue has at least one enqueued thread.
+ */
+ ctx->tq_ctx->how_many = 3;
+ break;
+ }
+
+ case ScoreTqReqFlushPriority_Pre_Queue_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqFlushPriority_Post_Operation_Check(
+ ScoreTqReqFlushPriority_Context *ctx,
+ ScoreTqReqFlushPriority_Post_Operation state
+)
+{
+ size_t i;
+ const T_scheduler_event *event;
+
+ i = 0;
+
+ switch ( state ) {
+ case ScoreTqReqFlushPriority_Post_Operation_Nop: {
+ /*
+ * No operation shall be performed.
+ */
+ /* Event receive */
+ T_eq_ptr( GetUnblock( ctx, &i )->thread, GetTCB( ctx, TQ_BLOCKER_A ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), &T_scheduler_event_null );
+ break;
+ }
+
+ case ScoreTqReqFlushPriority_Post_Operation_TryExtract: {
+ /*
+ * The enqueued threads of the thread queue may be extracted in priority
+ * order for each priority queue associated with a scheduler. The
+ * priority queues of the thread queue shall be accessed in FIFO order.
+ */
+ event = GetUnblock( ctx, &i );
+ T_eq_ptr( event->executing, NULL );
+ T_eq_ptr( event->thread, GetTCB( ctx, TQ_BLOCKER_D ) );
+
+ event = GetUnblock( ctx, &i );
+ T_eq_ptr( event->executing, NULL );
+ T_eq_ptr( event->thread, GetTCB( ctx, TQ_BLOCKER_C ) );
+
+ event = GetUnblock( ctx, &i );
+ T_eq_ptr( event->executing, GetTCB( ctx, TQ_BLOCKER_B ) );
+ T_eq_ptr( event->thread, GetTCB( ctx, TQ_BLOCKER_B ) );
+
+ T_eq_ptr( GetUnblock( ctx, &i ), &T_scheduler_event_null );
+ break;
+ }
+
+ case ScoreTqReqFlushPriority_Post_Operation_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqFlushPriority_Setup(
+ ScoreTqReqFlushPriority_Context *ctx
+)
+{
+ TQReset( ctx->tq_ctx );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_A, PRIO_ULTRA_HIGH );
+
+ if (
+ ctx->supports_multiple_priority_queues &&
+ rtems_configuration_get_maximum_processors() > 1
+ ) {
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_B, SCHEDULER_B_ID, PRIO_HIGH );
+ } else {
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_B, PRIO_HIGH );
+ }
+
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_C, PRIO_VERY_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_D, PRIO_ULTRA_HIGH );
+}
+
+static void ScoreTqReqFlushPriority_Setup_Wrap( void *arg )
+{
+ ScoreTqReqFlushPriority_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqFlushPriority_Setup( ctx );
+}
+
+static void ScoreTqReqFlushPriority_Teardown(
+ ScoreTqReqFlushPriority_Context *ctx
+)
+{
+ TQReset( ctx->tq_ctx );
+}
+
+static void ScoreTqReqFlushPriority_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqFlushPriority_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqFlushPriority_Teardown( ctx );
+}
+
+static void ScoreTqReqFlushPriority_Action(
+ ScoreTqReqFlushPriority_Context *ctx
+)
+{
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE_PREPARE );
+
+ if ( ctx->tq_ctx->how_many > 0 ) {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_C, TQ_EVENT_ENQUEUE );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_D, TQ_EVENT_ENQUEUE );
+ T_scheduler_set_event_handler( SchedulerEvent, ctx );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_B,
+ TQ_EVENT_ENQUEUE
+ );
+ } else {
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_FLUSH_ALL );
+ }
+
+ TQSchedulerRecordStop( ctx->tq_ctx );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE_DONE );
+}
+
+static const ScoreTqReqFlushPriority_Entry
+ScoreTqReqFlushPriority_Entries[] = {
+ { 0, 0, ScoreTqReqFlushPriority_Post_Operation_Nop },
+ { 0, 0, ScoreTqReqFlushPriority_Post_Operation_TryExtract }
+};
+
+static const uint8_t
+ScoreTqReqFlushPriority_Map[] = {
+ 0, 1
+};
+
+static size_t ScoreTqReqFlushPriority_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreTqReqFlushPriority_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ ScoreTqReqFlushPriority_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqFlushPriority_Fixture = {
+ .setup = ScoreTqReqFlushPriority_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqFlushPriority_Teardown_Wrap,
+ .scope = ScoreTqReqFlushPriority_Scope,
+ .initial_context = &ScoreTqReqFlushPriority_Instance
+};
+
+static inline ScoreTqReqFlushPriority_Entry ScoreTqReqFlushPriority_PopEntry(
+ ScoreTqReqFlushPriority_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreTqReqFlushPriority_Entries[
+ ScoreTqReqFlushPriority_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqFlushPriority_TestVariant(
+ ScoreTqReqFlushPriority_Context *ctx
+)
+{
+ ScoreTqReqFlushPriority_Pre_Queue_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ ScoreTqReqFlushPriority_Action( ctx );
+ ScoreTqReqFlushPriority_Post_Operation_Check(
+ ctx,
+ ctx->Map.entry.Post_Operation
+ );
+}
+
+static T_fixture_node ScoreTqReqFlushPriority_Node;
+
+static T_remark ScoreTqReqFlushPriority_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqFlushPriority"
+};
+
+void ScoreTqReqFlushPriority_Run(
+ TQContext *tq_ctx,
+ bool supports_multiple_priority_queues
+)
+{
+ ScoreTqReqFlushPriority_Context *ctx;
+
+ ctx = &ScoreTqReqFlushPriority_Instance;
+ ctx->tq_ctx = tq_ctx;
+ ctx->supports_multiple_priority_queues = supports_multiple_priority_queues;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqFlushPriority_Node,
+ &ScoreTqReqFlushPriority_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreTqReqFlushPriority_Pre_Queue_Empty;
+ ctx->Map.pcs[ 0 ] < ScoreTqReqFlushPriority_Pre_Queue_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqFlushPriority_PopEntry( ctx );
+ ScoreTqReqFlushPriority_TestVariant( ctx );
+ }
+
+ T_add_remark( &ScoreTqReqFlushPriority_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-flush-priority.h b/testsuites/validation/tr-tq-flush-priority.h
new file mode 100644
index 0000000000..ae700ca192
--- /dev/null
+++ b/testsuites/validation/tr-tq-flush-priority.h
@@ -0,0 +1,97 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqFlushPriority
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_FLUSH_PRIORITY_H
+#define _TR_TQ_FLUSH_PRIORITY_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqFlushPriority
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqFlushPriority_Pre_Queue_Empty,
+ ScoreTqReqFlushPriority_Pre_Queue_NonEmpty,
+ ScoreTqReqFlushPriority_Pre_Queue_NA
+} ScoreTqReqFlushPriority_Pre_Queue;
+
+typedef enum {
+ ScoreTqReqFlushPriority_Post_Operation_Nop,
+ ScoreTqReqFlushPriority_Post_Operation_TryExtract,
+ ScoreTqReqFlushPriority_Post_Operation_NA
+} ScoreTqReqFlushPriority_Post_Operation;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue test context.
+ *
+ * @param supports_multiple_priority_queues is true, if the object using the
+ * thread queue supports multiple priority queues, otherwise it is false.
+ */
+void ScoreTqReqFlushPriority_Run(
+ TQContext *tq_ctx,
+ bool supports_multiple_priority_queues
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_FLUSH_PRIORITY_H */
diff --git a/testsuites/validation/tr-tq-surrender-mrsp.c b/testsuites/validation/tr-tq-surrender-mrsp.c
new file mode 100644
index 0000000000..903146ccbe
--- /dev/null
+++ b/testsuites/validation/tr-tq-surrender-mrsp.c
@@ -0,0 +1,1041 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqSurrenderMrsp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/threadimpl.h>
+
+#include "tr-tq-surrender-mrsp.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqSurrenderMrsp spec:/score/tq/req/surrender-mrsp
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_InheritedPriority_NA : 1;
+ uint32_t Pre_PreviousHelping_NA : 1;
+ uint32_t Pre_Scheduler_NA : 1;
+ uint32_t Pre_NewHelping_NA : 1;
+ uint32_t Pre_Suspended_NA : 1;
+ uint32_t Pre_WaitState_NA : 1;
+ uint32_t Post_Dequeue : 1;
+ uint32_t Post_Unblock : 1;
+ uint32_t Post_PreviousOwnerPriority : 2;
+ uint32_t Post_RemoveHelper : 2;
+ uint32_t Post_AddHelper : 2;
+ uint32_t Post_Suspended : 2;
+} ScoreTqReqSurrenderMrsp_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/surrender-mrsp test case.
+ */
+typedef struct {
+ /**
+ * @brief If this member is true, then all priorities of the previous owner
+ * inherited from the thread queue thread shall be dispensable.
+ */
+ bool inherited_priorities_are_dispensible;
+
+ /**
+ * @brief If this member is true, then all helping schedulers of the previous
+ * owner thread gained through the thread queue shall be dispensable.
+ */
+ bool helping_schedules_are_dispensible;
+
+ /**
+ * @brief If this member is true, then the previous owner thread shall use
+ * helping scheduler.
+ */
+ bool use_helping_scheduler;
+
+ /**
+ * @brief If this member is true, then the new owner thread shall gain a
+ * vital helping scheduler.
+ */
+ bool gains_new_helping_scheduler;
+
+ /**
+ * @brief If this member is true, then the new owner thread shall be
+ * suspended.
+ */
+ bool suspended;
+
+ /**
+ * @brief If this member is true, then the new owner thread shall be in the
+ * intend to block wait state.
+ */
+ bool intend_to_block;
+
+ /**
+ * @brief This member contains the current priority of the previous owner
+ * thread before the thread queue surrender operation.
+ */
+ rtems_task_priority priority_before;
+
+ /**
+ * @brief This member contains the current priority of the previous owner
+ * thread after the thread queue surrender operation.
+ */
+ rtems_task_priority priority_after;
+
+ /**
+ * @brief This member contains the identifier of the previous owner thread.
+ */
+ rtems_id previous_owner;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqSurrenderMrsp_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 6 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqSurrenderMrsp_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqSurrenderMrsp_Context;
+
+static ScoreTqReqSurrenderMrsp_Context
+ ScoreTqReqSurrenderMrsp_Instance;
+
+static const char * const ScoreTqReqSurrenderMrsp_PreDesc_InheritedPriority[] = {
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrenderMrsp_PreDesc_PreviousHelping[] = {
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrenderMrsp_PreDesc_Scheduler[] = {
+ "Home",
+ "Helping",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrenderMrsp_PreDesc_NewHelping[] = {
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrenderMrsp_PreDesc_Suspended[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrenderMrsp_PreDesc_WaitState[] = {
+ "IntendToBlock",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqSurrenderMrsp_PreDesc[] = {
+ ScoreTqReqSurrenderMrsp_PreDesc_InheritedPriority,
+ ScoreTqReqSurrenderMrsp_PreDesc_PreviousHelping,
+ ScoreTqReqSurrenderMrsp_PreDesc_Scheduler,
+ ScoreTqReqSurrenderMrsp_PreDesc_NewHelping,
+ ScoreTqReqSurrenderMrsp_PreDesc_Suspended,
+ ScoreTqReqSurrenderMrsp_PreDesc_WaitState,
+ NULL
+};
+
+typedef ScoreTqReqSurrenderMrsp_Context Context;
+
+static const rtems_tcb *GetUnblock( Context *ctx, size_t *index )
+{
+ return TQGetNextUnblock( ctx->tq_ctx, index )->thread;
+}
+
+static void ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Prepare(
+ ScoreTqReqSurrenderMrsp_Context *ctx,
+ ScoreTqReqSurrenderMrsp_Pre_InheritedPriority state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Vital: {
+ /*
+ * While at least one priority inherited through the thread queue for the
+ * previous owner is the highest priority of the previous owner.
+ */
+ ctx->inherited_priorities_are_dispensible = false;
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Dispensable: {
+ /*
+ * While all priorities inherited through the thread queue for the
+ * previous owner are not the highest priority of the previous owner.
+ */
+ ctx->inherited_priorities_are_dispensible = true;
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Prepare(
+ ScoreTqReqSurrenderMrsp_Context *ctx,
+ ScoreTqReqSurrenderMrsp_Pre_PreviousHelping state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Vital: {
+ /*
+ * While at least one helping scheduler of the previous owner is only
+ * available due to a priority inherited through the thread queue.
+ */
+ ctx->helping_schedules_are_dispensible = false;
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Dispensable: {
+ /*
+ * While all helping scheduler of the previous owner are not only
+ * available due to a priority inherited through the thread queue.
+ */
+ ctx->helping_schedules_are_dispensible = true;
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderMrsp_Pre_Scheduler_Prepare(
+ ScoreTqReqSurrenderMrsp_Context *ctx,
+ ScoreTqReqSurrenderMrsp_Pre_Scheduler state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderMrsp_Pre_Scheduler_Home: {
+ /*
+ * While the previous owner executes in its home scheduler.
+ */
+ ctx->use_helping_scheduler = false;
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Pre_Scheduler_Helping: {
+ /*
+ * While the previous owner executes in a helping scheduler which is
+ * available due to a priority inherited through the thread queue.
+ */
+ ctx->use_helping_scheduler = true;
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Pre_Scheduler_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderMrsp_Pre_NewHelping_Prepare(
+ ScoreTqReqSurrenderMrsp_Context *ctx,
+ ScoreTqReqSurrenderMrsp_Pre_NewHelping state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderMrsp_Pre_NewHelping_Vital: {
+ /*
+ * While at least one helping scheduler of the new owner is only
+ * available due to a priority inherited through the thread queue.
+ */
+ ctx->gains_new_helping_scheduler = true;
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Pre_NewHelping_Dispensable: {
+ /*
+ * While all helping scheduler of the new owner are not only available
+ * due to a priority inherited through the thread queue.
+ */
+ ctx->gains_new_helping_scheduler = false;
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Pre_NewHelping_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderMrsp_Pre_Suspended_Prepare(
+ ScoreTqReqSurrenderMrsp_Context *ctx,
+ ScoreTqReqSurrenderMrsp_Pre_Suspended state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderMrsp_Pre_Suspended_Yes: {
+ /*
+ * While the new owner is suspended.
+ */
+ ctx->suspended = true;
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Pre_Suspended_No: {
+ /*
+ * While the new owner is not suspended.
+ */
+ ctx->suspended = false;
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Pre_Suspended_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderMrsp_Pre_WaitState_Prepare(
+ ScoreTqReqSurrenderMrsp_Context *ctx,
+ ScoreTqReqSurrenderMrsp_Pre_WaitState state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderMrsp_Pre_WaitState_IntendToBlock: {
+ /*
+ * While the new owner is in the intend to block wait state.
+ */
+ ctx->intend_to_block = true;
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Pre_WaitState_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderMrsp_Post_Dequeue_Check(
+ ScoreTqReqSurrenderMrsp_Context *ctx,
+ ScoreTqReqSurrenderMrsp_Post_Dequeue state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority: {
+ /*
+ * The first thread in priority order shall be dequeued from the thread
+ * queue.
+ */
+ /* Validation is done by spec:/score/tq/req/enqueue-priority */
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Post_Dequeue_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderMrsp_Post_Unblock_Check(
+ ScoreTqReqSurrenderMrsp_Context *ctx,
+ ScoreTqReqSurrenderMrsp_Post_Unblock state
+)
+{
+ size_t i;
+
+ i = 0;
+
+ switch ( state ) {
+ case ScoreTqReqSurrenderMrsp_Post_Unblock_No: {
+ /*
+ * The dequeued thread shall not be unblocked by the thread queue
+ * surrender operation.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Post_Unblock_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Check(
+ ScoreTqReqSurrenderMrsp_Context *ctx,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop: {
+ /*
+ * Each eligible priority of the previous owner which had the highest
+ * priority inherited through the thread queue shall be updated.
+ */
+ T_eq_u32( ctx->priority_after, PRIO_NORMAL );
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop: {
+ /*
+ * No eligible priority of the previous owner shall be updated.
+ */
+ T_eq_u32( ctx->priority_after, ctx->priority_before );
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Check(
+ ScoreTqReqSurrenderMrsp_Context *ctx,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper state
+)
+{
+ rtems_status_code sc;
+ rtems_task_priority priority;
+
+ switch ( state ) {
+ case ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes: {
+ /*
+ * Each helping scheduler of the previous owner which was only available
+ * due to a priority inherited through the thread queue shall be removed
+ * from the previous owner.
+ */
+ sc = rtems_task_get_priority(
+ ctx->previous_owner,
+ SCHEDULER_B_ID,
+ &priority
+ );
+ T_rsc( sc, RTEMS_NOT_DEFINED );
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No: {
+ /*
+ * No helping scheduler shall be removed from the previous owner.
+ */
+ sc = rtems_task_get_priority(
+ ctx->previous_owner,
+ SCHEDULER_B_ID,
+ &priority
+ );
+ #if defined(RTEMS_SMP)
+ T_rsc_success( sc );
+
+ if ( ctx->tq_ctx->enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ T_eq_u32( priority, PRIO_LOW );
+ } else {
+ T_eq_u32( priority, PRIO_HIGH );
+ }
+ #else
+ T_rsc( sc, RTEMS_INVALID_ID );
+ #endif
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Post_RemoveHelper_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderMrsp_Post_AddHelper_Check(
+ ScoreTqReqSurrenderMrsp_Context *ctx,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper state
+)
+{
+ rtems_status_code sc;
+ rtems_task_priority priority;
+
+ switch ( state ) {
+ case ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes: {
+ /*
+ * Each helping scheduler of the new owner which is only available due to
+ * a priority inherited through the thread queue shall be added to the
+ * new owner.
+ */
+ sc = rtems_task_get_priority(
+ ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ],
+ SCHEDULER_A_ID,
+ &priority
+ );
+ T_rsc_success( sc );
+
+ if ( ctx->tq_ctx->enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ T_eq_u32( priority, PRIO_VERY_HIGH );
+ } else {
+ T_eq_u32( priority, PRIO_LOW );
+ }
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Post_AddHelper_No: {
+ /*
+ * No helping scheduler shall added to the new owner.
+ */
+ sc = rtems_task_get_priority(
+ ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ],
+ SCHEDULER_A_ID,
+ &priority
+ );
+ #if defined(RTEMS_SMP)
+ T_rsc( sc, RTEMS_NOT_DEFINED );
+ #else
+ T_rsc_success( sc );
+ T_eq_u32( priority, PRIO_HIGH );
+ #endif
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Post_AddHelper_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderMrsp_Post_Suspended_Check(
+ ScoreTqReqSurrenderMrsp_Context *ctx,
+ ScoreTqReqSurrenderMrsp_Post_Suspended state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderMrsp_Post_Suspended_Yes: {
+ /*
+ * The new owner shall be suspended.
+ */
+ T_true( IsTaskSuspended( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] ) );
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Post_Suspended_No: {
+ /*
+ * The new owner shall be not suspended.
+ */
+ T_false( IsTaskSuspended( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] ) );
+ break;
+ }
+
+ case ScoreTqReqSurrenderMrsp_Post_Suspended_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderMrsp_Setup(
+ ScoreTqReqSurrenderMrsp_Context *ctx
+)
+{
+ TQReset( ctx->tq_ctx );
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_A, SCHEDULER_B_ID, PRIO_NORMAL );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_B, PRIO_VERY_HIGH );
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_C, SCHEDULER_B_ID, PRIO_LOW );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_D, PRIO_VERY_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_HELPER_A, PRIO_NORMAL );
+}
+
+static void ScoreTqReqSurrenderMrsp_Setup_Wrap( void *arg )
+{
+ ScoreTqReqSurrenderMrsp_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqSurrenderMrsp_Setup( ctx );
+}
+
+static void ScoreTqReqSurrenderMrsp_Teardown(
+ ScoreTqReqSurrenderMrsp_Context *ctx
+)
+{
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_NORMAL );
+}
+
+static void ScoreTqReqSurrenderMrsp_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqSurrenderMrsp_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqSurrenderMrsp_Teardown( ctx );
+}
+
+static void ScoreTqReqSurrenderMrsp_Prepare(
+ ScoreTqReqSurrenderMrsp_Context *ctx
+)
+{
+ ctx->inherited_priorities_are_dispensible = true;
+ ctx->helping_schedules_are_dispensible = true;
+ ctx->use_helping_scheduler = false;
+ ctx->gains_new_helping_scheduler = false;
+ ctx->intend_to_block = false;
+}
+
+static void ScoreTqReqSurrenderMrsp_Action(
+ ScoreTqReqSurrenderMrsp_Context *ctx
+)
+{
+ ctx->previous_owner = ctx->tq_ctx->worker_id[ TQ_HELPER_A ];
+
+ SetSelfPriority( PRIO_LOW );
+
+ if (
+ ctx->inherited_priorities_are_dispensible ||
+ ctx->helping_schedules_are_dispensible
+ ) {
+ TQSend( ctx->tq_ctx, TQ_HELPER_A, TQ_EVENT_MUTEX_A_OBTAIN );
+
+ if ( ctx->inherited_priorities_are_dispensible ) {
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_B, TQ_EVENT_MUTEX_A_OBTAIN );
+ }
+
+ if ( ctx->helping_schedules_are_dispensible ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_C,
+ TQ_EVENT_MUTEX_A_OBTAIN
+ );
+ }
+ }
+
+ /*
+ * Take only the priorities into account which are inherited from the
+ * priority inheritance mutex. This avoids having to deal with the ceiling
+ * priority.
+ */
+ ctx->priority_before = TQGetPriority( ctx->tq_ctx, TQ_HELPER_A );
+
+ SetSelfScheduler( SCHEDULER_B_ID, PRIO_ULTRA_HIGH );
+ ctx->tq_ctx->busy_wait[ TQ_HELPER_A ] = true;
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ TQ_HELPER_A,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_BUSY_WAIT
+ );
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH );
+
+ TQSendAndWaitForIntendToBlock(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ TQ_EVENT_ENQUEUE
+ );
+
+ SetSelfScheduler( SCHEDULER_B_ID, PRIO_ULTRA_HIGH );
+
+ if ( ctx->gains_new_helping_scheduler ) {
+ TQSend(
+ ctx->tq_ctx,
+ TQ_BLOCKER_D,
+ TQ_EVENT_ENQUEUE
+ );
+ YieldTask( ctx->tq_ctx->worker_id[ TQ_HELPER_A ] );
+ TQWaitForEventsReceived( ctx->tq_ctx, TQ_BLOCKER_D );
+ TQWaitForIntendToBlock( ctx->tq_ctx, TQ_BLOCKER_D );
+ YieldTask( ctx->tq_ctx->worker_id[ TQ_BLOCKER_D ] );
+ }
+
+ if ( ctx->use_helping_scheduler ) {
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH );
+ WaitForHeir( 1, ctx->tq_ctx->worker_id[ TQ_HELPER_A ] );
+ }
+
+ if ( ctx->suspended ) {
+ SuspendTask( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] );
+ }
+
+ ctx->tq_ctx->busy_wait[ TQ_HELPER_A ] = false;
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_HELPER_A,
+ TQ_EVENT_SCHEDULER_RECORD_START |
+ TQ_EVENT_SURRENDER
+ );
+ TQSchedulerRecordStop( ctx->tq_ctx );
+ T_eq_ptr(
+ TQGetOwner( ctx->tq_ctx ),
+ ctx->tq_ctx->worker_tcb[ TQ_BLOCKER_A ]
+ );
+ ctx->priority_after = TQGetPriority( ctx->tq_ctx, TQ_HELPER_A );
+}
+
+static void ScoreTqReqSurrenderMrsp_Cleanup(
+ ScoreTqReqSurrenderMrsp_Context *ctx
+)
+{
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH );
+
+ if ( ctx->suspended ) {
+ ResumeTask( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] );
+ }
+
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ TQ_EVENT_SURRENDER
+ );
+
+ if ( ctx->gains_new_helping_scheduler ) {
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ TQ_BLOCKER_D,
+ TQ_EVENT_SURRENDER
+ );
+ }
+
+ if (
+ ctx->inherited_priorities_are_dispensible ||
+ ctx->helping_schedules_are_dispensible
+ ) {
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ TQ_HELPER_A,
+ TQ_EVENT_MUTEX_A_RELEASE
+ );
+
+ if ( ctx->inherited_priorities_are_dispensible ) {
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ TQ_BLOCKER_B,
+ TQ_EVENT_MUTEX_A_RELEASE
+ );
+ }
+
+ if ( ctx->helping_schedules_are_dispensible ) {
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ TQ_BLOCKER_C,
+ TQ_EVENT_MUTEX_A_RELEASE
+ );
+ }
+ }
+
+ T_eq_u32( rtems_scheduler_get_processor(), 0 );
+}
+
+static const ScoreTqReqSurrenderMrsp_Entry
+ScoreTqReqSurrenderMrsp_Entries[] = {
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_Yes },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_No },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_Yes },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_No },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_Yes },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_No },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_Yes },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_No },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_Yes },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_No },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_Yes },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_No },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_Yes },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_No },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_Yes },
+ { 0, 0, 0, 0, 0, 0, 0, ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_No }
+};
+
+static const uint8_t
+ScoreTqReqSurrenderMrsp_Map[] = {
+ 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 9, 10, 11, 8, 9, 10, 11,
+ 12, 13, 14, 15, 12, 13, 14, 15
+};
+
+static size_t ScoreTqReqSurrenderMrsp_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreTqReqSurrenderMrsp_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ ScoreTqReqSurrenderMrsp_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqSurrenderMrsp_Fixture = {
+ .setup = ScoreTqReqSurrenderMrsp_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqSurrenderMrsp_Teardown_Wrap,
+ .scope = ScoreTqReqSurrenderMrsp_Scope,
+ .initial_context = &ScoreTqReqSurrenderMrsp_Instance
+};
+
+static inline ScoreTqReqSurrenderMrsp_Entry ScoreTqReqSurrenderMrsp_PopEntry(
+ ScoreTqReqSurrenderMrsp_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreTqReqSurrenderMrsp_Entries[
+ ScoreTqReqSurrenderMrsp_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqSurrenderMrsp_TestVariant(
+ ScoreTqReqSurrenderMrsp_Context *ctx
+)
+{
+ ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Prepare(
+ ctx,
+ ctx->Map.pcs[ 0 ]
+ );
+ ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Prepare(
+ ctx,
+ ctx->Map.pcs[ 1 ]
+ );
+ ScoreTqReqSurrenderMrsp_Pre_Scheduler_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ ScoreTqReqSurrenderMrsp_Pre_NewHelping_Prepare( ctx, ctx->Map.pcs[ 3 ] );
+ ScoreTqReqSurrenderMrsp_Pre_Suspended_Prepare( ctx, ctx->Map.pcs[ 4 ] );
+ ScoreTqReqSurrenderMrsp_Pre_WaitState_Prepare( ctx, ctx->Map.pcs[ 5 ] );
+ ScoreTqReqSurrenderMrsp_Action( ctx );
+ ScoreTqReqSurrenderMrsp_Post_Dequeue_Check(
+ ctx,
+ ctx->Map.entry.Post_Dequeue
+ );
+ ScoreTqReqSurrenderMrsp_Post_Unblock_Check(
+ ctx,
+ ctx->Map.entry.Post_Unblock
+ );
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Check(
+ ctx,
+ ctx->Map.entry.Post_PreviousOwnerPriority
+ );
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Check(
+ ctx,
+ ctx->Map.entry.Post_RemoveHelper
+ );
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_Check(
+ ctx,
+ ctx->Map.entry.Post_AddHelper
+ );
+ ScoreTqReqSurrenderMrsp_Post_Suspended_Check(
+ ctx,
+ ctx->Map.entry.Post_Suspended
+ );
+}
+
+static T_fixture_node ScoreTqReqSurrenderMrsp_Node;
+
+static T_remark ScoreTqReqSurrenderMrsp_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqSurrenderMrsp"
+};
+
+void ScoreTqReqSurrenderMrsp_Run( TQContext *tq_ctx )
+{
+ ScoreTqReqSurrenderMrsp_Context *ctx;
+
+ ctx = &ScoreTqReqSurrenderMrsp_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqSurrenderMrsp_Node,
+ &ScoreTqReqSurrenderMrsp_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Vital;
+ ctx->Map.pcs[ 0 ] < ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Vital;
+ ctx->Map.pcs[ 1 ] < ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = ScoreTqReqSurrenderMrsp_Pre_Scheduler_Home;
+ ctx->Map.pcs[ 2 ] < ScoreTqReqSurrenderMrsp_Pre_Scheduler_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = ScoreTqReqSurrenderMrsp_Pre_NewHelping_Vital;
+ ctx->Map.pcs[ 3 ] < ScoreTqReqSurrenderMrsp_Pre_NewHelping_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = ScoreTqReqSurrenderMrsp_Pre_Suspended_Yes;
+ ctx->Map.pcs[ 4 ] < ScoreTqReqSurrenderMrsp_Pre_Suspended_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = ScoreTqReqSurrenderMrsp_Pre_WaitState_IntendToBlock;
+ ctx->Map.pcs[ 5 ] < ScoreTqReqSurrenderMrsp_Pre_WaitState_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqSurrenderMrsp_PopEntry( ctx );
+ ScoreTqReqSurrenderMrsp_Prepare( ctx );
+ ScoreTqReqSurrenderMrsp_TestVariant( ctx );
+ ScoreTqReqSurrenderMrsp_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ T_add_remark( &ScoreTqReqSurrenderMrsp_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-surrender-mrsp.h b/testsuites/validation/tr-tq-surrender-mrsp.h
new file mode 100644
index 0000000000..eff865e612
--- /dev/null
+++ b/testsuites/validation/tr-tq-surrender-mrsp.h
@@ -0,0 +1,148 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqSurrenderMrsp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_SURRENDER_MRSP_H
+#define _TR_TQ_SURRENDER_MRSP_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqSurrenderMrsp
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Vital,
+ ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_Dispensable,
+ ScoreTqReqSurrenderMrsp_Pre_InheritedPriority_NA
+} ScoreTqReqSurrenderMrsp_Pre_InheritedPriority;
+
+typedef enum {
+ ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Vital,
+ ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_Dispensable,
+ ScoreTqReqSurrenderMrsp_Pre_PreviousHelping_NA
+} ScoreTqReqSurrenderMrsp_Pre_PreviousHelping;
+
+typedef enum {
+ ScoreTqReqSurrenderMrsp_Pre_Scheduler_Home,
+ ScoreTqReqSurrenderMrsp_Pre_Scheduler_Helping,
+ ScoreTqReqSurrenderMrsp_Pre_Scheduler_NA
+} ScoreTqReqSurrenderMrsp_Pre_Scheduler;
+
+typedef enum {
+ ScoreTqReqSurrenderMrsp_Pre_NewHelping_Vital,
+ ScoreTqReqSurrenderMrsp_Pre_NewHelping_Dispensable,
+ ScoreTqReqSurrenderMrsp_Pre_NewHelping_NA
+} ScoreTqReqSurrenderMrsp_Pre_NewHelping;
+
+typedef enum {
+ ScoreTqReqSurrenderMrsp_Pre_Suspended_Yes,
+ ScoreTqReqSurrenderMrsp_Pre_Suspended_No,
+ ScoreTqReqSurrenderMrsp_Pre_Suspended_NA
+} ScoreTqReqSurrenderMrsp_Pre_Suspended;
+
+typedef enum {
+ ScoreTqReqSurrenderMrsp_Pre_WaitState_IntendToBlock,
+ ScoreTqReqSurrenderMrsp_Pre_WaitState_NA
+} ScoreTqReqSurrenderMrsp_Pre_WaitState;
+
+typedef enum {
+ ScoreTqReqSurrenderMrsp_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderMrsp_Post_Dequeue_NA
+} ScoreTqReqSurrenderMrsp_Post_Dequeue;
+
+typedef enum {
+ ScoreTqReqSurrenderMrsp_Post_Unblock_No,
+ ScoreTqReqSurrenderMrsp_Post_Unblock_NA
+} ScoreTqReqSurrenderMrsp_Post_Unblock;
+
+typedef enum {
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority_NA
+} ScoreTqReqSurrenderMrsp_Post_PreviousOwnerPriority;
+
+typedef enum {
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_RemoveHelper_NA
+} ScoreTqReqSurrenderMrsp_Post_RemoveHelper;
+
+typedef enum {
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_No,
+ ScoreTqReqSurrenderMrsp_Post_AddHelper_NA
+} ScoreTqReqSurrenderMrsp_Post_AddHelper;
+
+typedef enum {
+ ScoreTqReqSurrenderMrsp_Post_Suspended_Yes,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_No,
+ ScoreTqReqSurrenderMrsp_Post_Suspended_NA
+} ScoreTqReqSurrenderMrsp_Post_Suspended;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue test context.
+ */
+void ScoreTqReqSurrenderMrsp_Run( TQContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_SURRENDER_MRSP_H */
diff --git a/testsuites/validation/tr-tq-surrender-priority-inherit.c b/testsuites/validation/tr-tq-surrender-priority-inherit.c
new file mode 100644
index 0000000000..d0a580f988
--- /dev/null
+++ b/testsuites/validation/tr-tq-surrender-priority-inherit.c
@@ -0,0 +1,2522 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqSurrenderPriorityInherit
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/smpbarrier.h>
+#include <rtems/score/threadimpl.h>
+
+#include "tr-tq-surrender-priority-inherit.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqSurrenderPriorityInherit \
+ * spec:/score/tq/req/surrender-priority-inherit
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_SchedulerCount_NA : 1;
+ uint32_t Pre_InheritedPriority_NA : 1;
+ uint32_t Pre_PreviousHelping_NA : 1;
+ uint32_t Pre_UsedScheduler_NA : 1;
+ uint32_t Pre_NewPriority_NA : 1;
+ uint32_t Pre_NewHelping_NA : 1;
+ uint32_t Pre_Suspended_NA : 1;
+ uint32_t Pre_WaitState_NA : 1;
+ uint32_t Post_Dequeue : 1;
+ uint32_t Post_Unblock : 2;
+ uint32_t Post_PreviousOwnerPriority : 2;
+ uint32_t Post_NewPriority : 2;
+ uint32_t Post_RemoveHelper : 2;
+ uint32_t Post_AddHelper : 2;
+ uint32_t Post_Suspended : 2;
+} ScoreTqReqSurrenderPriorityInherit_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/surrender-priority-inherit test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the call within ISR request.
+ */
+ CallWithinISRRequest request;
+
+ /**
+ * @brief This member contains the barrier to synchronize the runner and the
+ * worker.
+ */
+ SMP_barrier_Control barrier;
+
+ /**
+ * @brief If this member is true, then all priorities of the previous owner
+ * inherited from the thread queue thread shall be dispensable.
+ */
+ bool inherited_priorities_are_dispensible;
+
+ /**
+ * @brief If this member is true, then all helping schedulers of the previous
+ * owner thread gained through the thread queue shall be dispensable.
+ */
+ bool helping_schedules_are_dispensible;
+
+ /**
+ * @brief If this member is true, then the previous owner thread shall use
+ * helping scheduler.
+ */
+ bool use_helping_scheduler;
+
+ /**
+ * @brief If this member is true, then the new owner thread shall gain a
+ * vital priority.
+ */
+ bool gains_new_priority;
+
+ /**
+ * @brief If this member is true, then the new owner thread shall gain a
+ * vital helping scheduler.
+ */
+ bool gains_new_helping_scheduler;
+
+ /**
+ * @brief If this member is true, then the new owner thread shall be
+ * suspended.
+ */
+ bool suspended;
+
+ /**
+ * @brief If this member is true, then the new owner thread shall be in the
+ * intend to block wait state.
+ */
+ bool intend_to_block;
+
+ /**
+ * @brief If this member is true, then the action was performed.
+ */
+ bool action_performed;
+
+ /**
+ * @brief This member contains the current priority of the previous owner
+ * thread before the thread queue surrender operation.
+ */
+ rtems_task_priority priority_before;
+
+ /**
+ * @brief This member contains the current priority of the previous owner
+ * thread after the thread queue surrender operation.
+ */
+ rtems_task_priority priority_after;
+
+ /**
+ * @brief This member contains the identifier of the previous owner thread.
+ */
+ rtems_id previous_owner;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqSurrenderPriorityInherit_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 8 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqSurrenderPriorityInherit_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqSurrenderPriorityInherit_Context;
+
+static ScoreTqReqSurrenderPriorityInherit_Context
+ ScoreTqReqSurrenderPriorityInherit_Instance;
+
+static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_SchedulerCount[] = {
+ "One",
+ "Two",
+ "More",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_InheritedPriority[] = {
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_PreviousHelping[] = {
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_UsedScheduler[] = {
+ "Home",
+ "Helping",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_NewPriority[] = {
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_NewHelping[] = {
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_Suspended[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrenderPriorityInherit_PreDesc_WaitState[] = {
+ "Blocked",
+ "IntendToBlock",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqSurrenderPriorityInherit_PreDesc[] = {
+ ScoreTqReqSurrenderPriorityInherit_PreDesc_SchedulerCount,
+ ScoreTqReqSurrenderPriorityInherit_PreDesc_InheritedPriority,
+ ScoreTqReqSurrenderPriorityInherit_PreDesc_PreviousHelping,
+ ScoreTqReqSurrenderPriorityInherit_PreDesc_UsedScheduler,
+ ScoreTqReqSurrenderPriorityInherit_PreDesc_NewPriority,
+ ScoreTqReqSurrenderPriorityInherit_PreDesc_NewHelping,
+ ScoreTqReqSurrenderPriorityInherit_PreDesc_Suspended,
+ ScoreTqReqSurrenderPriorityInherit_PreDesc_WaitState,
+ NULL
+};
+
+typedef ScoreTqReqSurrenderPriorityInherit_Context Context;
+
+#define NEW_OWNER TQ_BLOCKER_A
+
+#define PREV_OWNER_HELPER_A TQ_BLOCKER_B
+
+#define PREV_OWNER_HELPER_B TQ_BLOCKER_C
+
+#define PREV_OWNER_HELPER_C TQ_BLOCKER_D
+
+#define NEW_OWNER_NEW_HELPER TQ_BLOCKER_E
+
+#define NEW_OWNER_NEW_PRIORITY TQ_WORKER_F
+
+#define NEW_OWNER_OLD_PRIORITY TQ_HELPER_C
+
+#define PREV_OWNER_MOVER TQ_HELPER_A
+
+#define PREV_OWNER TQ_HELPER_A
+
+static const rtems_tcb *GetUnblock( Context *ctx, size_t *index )
+{
+ return TQGetNextUnblock( ctx->tq_ctx, index )->thread;
+}
+
+static const rtems_tcb *GetTCB( Context *ctx, TQWorkerKind worker )
+{
+ return ctx->tq_ctx->worker_tcb[ worker ];
+}
+
+static void Surrender( Context *ctx )
+{
+ Status_Control status;
+
+ if ( ctx->suspended ) {
+ SuspendTask( ctx->tq_ctx->worker_id[ NEW_OWNER ] );
+ }
+
+ ctx->priority_before = GetSelfPriority();
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ status = TQSurrender( ctx->tq_ctx );
+ T_eq_int( status, TQConvertStatus( ctx->tq_ctx, STATUS_SUCCESSFUL ) );
+ TQSchedulerRecordStop( ctx->tq_ctx );
+ T_eq_ptr( TQGetOwner( ctx->tq_ctx ), ctx->tq_ctx->worker_tcb[ NEW_OWNER ] );
+ ctx->priority_after = GetSelfPriority();
+}
+
+#if defined(RTEMS_SMP)
+static void Delay( void *arg )
+{
+ Context *ctx;
+ SMP_barrier_State state;
+
+ ctx = arg;
+ _SMP_barrier_State_initialize( &state );
+
+ /* B0 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+
+ /* B1 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+}
+
+static void SchedulerBlock(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_BEFORE &&
+ event->operation == T_SCHEDULER_BLOCK
+ ) {
+ T_scheduler_set_event_handler( NULL, NULL );
+ ctx->request.handler = Delay;
+ CallWithinISRSubmit( &ctx->request );
+ }
+}
+#endif
+
+static void Setup( Context *ctx )
+{
+#if defined(RTEMS_SMP)
+ TQSetScheduler( ctx->tq_ctx, NEW_OWNER, SCHEDULER_B_ID, PRIO_NORMAL );
+ TQSetPriority( ctx->tq_ctx, PREV_OWNER_HELPER_A, PRIO_VERY_HIGH );
+ TQSetScheduler(
+ ctx->tq_ctx,
+ PREV_OWNER_HELPER_B,
+ SCHEDULER_B_ID,
+ PRIO_HIGH
+ );
+ TQSetPriority( ctx->tq_ctx, NEW_OWNER_OLD_PRIORITY, PRIO_VERY_LOW );
+ TQSetPriority( ctx->tq_ctx, NEW_OWNER_NEW_PRIORITY, PRIO_LOW );
+
+ TQSetPriority( ctx->tq_ctx, PREV_OWNER_MOVER, PRIO_ULTRA_HIGH );
+
+ if ( rtems_scheduler_get_processor_maximum() >= 3 ) {
+ TQSetScheduler(
+ ctx->tq_ctx,
+ PREV_OWNER_HELPER_C,
+ SCHEDULER_C_ID,
+ PRIO_HIGH
+ );
+ }
+#else
+ TQSetPriority( ctx->tq_ctx, NEW_OWNER, PRIO_HIGH );
+ TQSetPriority( ctx->tq_ctx, PREV_OWNER_HELPER_A, PRIO_HIGH );
+#endif
+
+ TQSetPriority( ctx->tq_ctx, TQ_HELPER_B, PRIO_ULTRA_LOW );
+}
+
+static void Action( Context *ctx )
+{
+ Status_Control status;
+#if defined(RTEMS_SMP)
+ SMP_barrier_State state;
+#endif
+
+ ctx->action_performed = true;
+ ctx->previous_owner = ctx->tq_ctx->runner_id;
+ TQMutexObtain( ctx->tq_ctx, TQ_MUTEX_A );
+#if defined(RTEMS_SMP)
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ NEW_OWNER,
+ TQ_EVENT_MUTEX_B_OBTAIN
+ );
+#endif
+
+ if ( ctx->inherited_priorities_are_dispensible ) {
+ TQSend(
+ ctx->tq_ctx,
+ PREV_OWNER_HELPER_A,
+ TQ_EVENT_MUTEX_A_OBTAIN | TQ_EVENT_MUTEX_A_RELEASE
+ );
+ }
+
+#if defined(RTEMS_SMP)
+ if ( ctx->helping_schedules_are_dispensible ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ PREV_OWNER_HELPER_B,
+ TQ_EVENT_MUTEX_A_OBTAIN | TQ_EVENT_MUTEX_A_RELEASE
+ );
+
+ if ( ctx->gains_new_priority && ctx->gains_new_helping_scheduler ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ PREV_OWNER_HELPER_C,
+ TQ_EVENT_MUTEX_A_OBTAIN | TQ_EVENT_MUTEX_A_RELEASE
+ );
+ }
+ }
+#endif
+
+ status = TQEnqueue( ctx->tq_ctx, TQ_NO_WAIT );
+ T_eq_int( status, TQConvertStatus( ctx->tq_ctx, STATUS_SUCCESSFUL ) );
+
+#if defined(RTEMS_SMP)
+ if ( ctx->intend_to_block ) {
+ _SMP_barrier_Control_initialize( &ctx->barrier );
+ _SMP_barrier_State_initialize( &state );
+
+ T_scheduler_set_event_handler( SchedulerBlock, ctx );
+ TQSend( ctx->tq_ctx, NEW_OWNER, TQ_EVENT_ENQUEUE );
+
+ /* B0 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+ } else {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ NEW_OWNER,
+ TQ_EVENT_ENQUEUE
+ );
+ }
+
+ if ( ctx->gains_new_priority ) {
+ TQSend(
+ ctx->tq_ctx,
+ NEW_OWNER_OLD_PRIORITY,
+ TQ_EVENT_HELPER_B_SYNC | TQ_EVENT_MUTEX_B_OBTAIN
+ );
+ TQSynchronizeRunner();
+ TQSend(
+ ctx->tq_ctx,
+ NEW_OWNER_NEW_PRIORITY,
+ TQ_EVENT_HELPER_B_SYNC | TQ_EVENT_ENQUEUE
+ );
+ TQSynchronizeRunner();
+
+ if ( ctx->gains_new_helping_scheduler ) {
+ TQSetScheduler(
+ ctx->tq_ctx,
+ NEW_OWNER_NEW_HELPER,
+ SCHEDULER_C_ID,
+ PRIO_LOW
+ );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ NEW_OWNER_NEW_HELPER,
+ TQ_EVENT_ENQUEUE
+ );
+ }
+ } else if ( ctx->gains_new_helping_scheduler ) {
+ TQSetScheduler(
+ ctx->tq_ctx,
+ NEW_OWNER_NEW_HELPER,
+ SCHEDULER_A_ID,
+ PRIO_LOW
+ );
+ TQSend(
+ ctx->tq_ctx,
+ NEW_OWNER_NEW_HELPER,
+ TQ_EVENT_HELPER_B_SYNC | TQ_EVENT_ENQUEUE
+ );
+ TQSynchronizeRunner();
+ }
+
+ /*
+ * In order to run the validation test variant also for the intend to block
+ * wait state, we would need at least three processors. Skip it for now.
+ */
+ if ( ctx->use_helping_scheduler && !ctx->intend_to_block ) {
+ ctx->tq_ctx->busy_wait[ PREV_OWNER_MOVER ] = true;
+ TQSend( ctx->tq_ctx, PREV_OWNER_MOVER, TQ_EVENT_BUSY_WAIT );
+
+ while ( rtems_scheduler_get_processor() != 1 ) {
+ /* Wait */
+ }
+
+ ctx->tq_ctx->busy_wait[ PREV_OWNER_MOVER ] = false;
+ }
+#else
+ TQSend(
+ ctx->tq_ctx,
+ NEW_OWNER,
+ TQ_EVENT_HELPER_B_SYNC | TQ_EVENT_ENQUEUE
+ );
+ TQSynchronizeRunner();
+#endif
+
+ Surrender( ctx );
+
+#if defined(RTEMS_SMP)
+ if ( ctx->intend_to_block ) {
+ /* B1 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+ }
+#endif
+}
+
+static void Cleanup( Context *ctx )
+{
+ if ( ctx->suspended ) {
+ ResumeTask( ctx->tq_ctx->worker_id[ NEW_OWNER ] );
+ }
+
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ NEW_OWNER,
+ TQ_EVENT_SURRENDER
+ );
+ TQWaitForExecutionStop( ctx->tq_ctx, NEW_OWNER );
+
+#if defined(RTEMS_SMP)
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ NEW_OWNER,
+ TQ_EVENT_MUTEX_B_RELEASE
+ );
+
+ if ( ctx->gains_new_priority ) {
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ NEW_OWNER_OLD_PRIORITY,
+ TQ_EVENT_MUTEX_B_RELEASE
+ );
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ NEW_OWNER_NEW_PRIORITY,
+ TQ_EVENT_SURRENDER
+ );
+ }
+
+ if ( ctx->gains_new_helping_scheduler ) {
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ NEW_OWNER_NEW_HELPER,
+ TQ_EVENT_SURRENDER
+ );
+ }
+#endif
+
+ TQMutexRelease( ctx->tq_ctx, TQ_MUTEX_A );
+ TQMutexObtain( ctx->tq_ctx, TQ_MUTEX_A );
+ TQMutexRelease( ctx->tq_ctx, TQ_MUTEX_A );
+
+ T_eq_u32( rtems_scheduler_get_processor(), 0 );
+}
+
+static void SetupSticky( Context *ctx )
+{
+#if defined(RTEMS_SMP)
+ TQSetScheduler( ctx->tq_ctx, NEW_OWNER, SCHEDULER_B_ID, PRIO_NORMAL );
+ TQSetPriority( ctx->tq_ctx, PREV_OWNER_HELPER_A, PRIO_VERY_HIGH );
+ TQSetScheduler( ctx->tq_ctx,
+ PREV_OWNER_HELPER_B,
+ SCHEDULER_B_ID,
+ PRIO_LOW
+ );
+ TQSetPriority( ctx->tq_ctx, NEW_OWNER_NEW_HELPER, PRIO_VERY_HIGH );
+ TQSetPriority( ctx->tq_ctx, PREV_OWNER, PRIO_NORMAL );
+#endif
+}
+
+static void ActionSticky( Context *ctx )
+{
+#if defined(RTEMS_SMP)
+ ctx->action_performed = true;
+ ctx->previous_owner = ctx->tq_ctx->worker_id[ PREV_OWNER ];
+
+ SetSelfPriority( PRIO_LOW );
+
+ if (
+ ctx->inherited_priorities_are_dispensible ||
+ ctx->helping_schedules_are_dispensible
+ ) {
+ TQSend( ctx->tq_ctx, PREV_OWNER, TQ_EVENT_MUTEX_A_OBTAIN );
+
+ if ( ctx->inherited_priorities_are_dispensible ) {
+ TQSend( ctx->tq_ctx, PREV_OWNER_HELPER_A, TQ_EVENT_MUTEX_A_OBTAIN );
+ }
+
+ if ( ctx->helping_schedules_are_dispensible ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ PREV_OWNER_HELPER_B,
+ TQ_EVENT_MUTEX_A_OBTAIN
+ );
+ }
+ }
+
+ /*
+ * Take only the priorities into account which are inherited from the
+ * priority inheritance mutex. This avoids having to deal with the ceiling
+ * priority.
+ */
+ ctx->priority_before = TQGetPriority( ctx->tq_ctx, PREV_OWNER );
+
+ SetSelfScheduler( SCHEDULER_B_ID, PRIO_ULTRA_HIGH );
+ ctx->tq_ctx->busy_wait[ PREV_OWNER ] = true;
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ PREV_OWNER,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_BUSY_WAIT
+ );
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH );
+
+ TQSendAndWaitForIntendToBlock(
+ ctx->tq_ctx,
+ NEW_OWNER,
+ TQ_EVENT_ENQUEUE
+ );
+
+ SetSelfScheduler( SCHEDULER_B_ID, PRIO_ULTRA_HIGH );
+
+ if ( ctx->gains_new_helping_scheduler ) {
+ TQSend(
+ ctx->tq_ctx,
+ NEW_OWNER_NEW_HELPER,
+ TQ_EVENT_ENQUEUE
+ );
+ YieldTask( ctx->tq_ctx->worker_id[ PREV_OWNER ] );
+ TQWaitForEventsReceived( ctx->tq_ctx, NEW_OWNER_NEW_HELPER );
+ TQWaitForIntendToBlock( ctx->tq_ctx, NEW_OWNER_NEW_HELPER );
+ YieldTask( ctx->tq_ctx->worker_id[ NEW_OWNER_NEW_HELPER ] );
+ }
+
+ if ( ctx->use_helping_scheduler ) {
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH );
+ }
+
+ if ( ctx->suspended ) {
+ SuspendTask( ctx->tq_ctx->worker_id[ NEW_OWNER ] );
+ }
+
+ ctx->tq_ctx->busy_wait[ PREV_OWNER ] = false;
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ PREV_OWNER,
+ TQ_EVENT_SCHEDULER_RECORD_START |
+ TQ_EVENT_SURRENDER
+ );
+ TQSchedulerRecordStop( ctx->tq_ctx );
+ T_eq_ptr(
+ TQGetOwner( ctx->tq_ctx ),
+ ctx->tq_ctx->worker_tcb[ NEW_OWNER ]
+ );
+ ctx->priority_after = TQGetPriority( ctx->tq_ctx, PREV_OWNER );
+#endif
+}
+
+static void CleanupSticky( Context *ctx )
+{
+#if defined(RTEMS_SMP)
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_ULTRA_HIGH );
+
+ if ( ctx->suspended ) {
+ ResumeTask( ctx->tq_ctx->worker_id[ NEW_OWNER ] );
+ }
+
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ NEW_OWNER,
+ TQ_EVENT_SURRENDER
+ );
+
+ if ( ctx->gains_new_helping_scheduler ) {
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ NEW_OWNER_NEW_HELPER,
+ TQ_EVENT_SURRENDER
+ );
+ }
+
+ if (
+ ctx->inherited_priorities_are_dispensible ||
+ ctx->helping_schedules_are_dispensible
+ ) {
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ PREV_OWNER,
+ TQ_EVENT_MUTEX_A_RELEASE
+ );
+
+ if ( ctx->inherited_priorities_are_dispensible ) {
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ PREV_OWNER_HELPER_A,
+ TQ_EVENT_MUTEX_A_RELEASE
+ );
+ }
+
+ if ( ctx->helping_schedules_are_dispensible ) {
+ TQSendAndSynchronizeRunner(
+ ctx->tq_ctx,
+ PREV_OWNER_HELPER_B,
+ TQ_EVENT_MUTEX_A_RELEASE
+ );
+ }
+ }
+
+ T_eq_u32( rtems_scheduler_get_processor(), 0 );
+#endif
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_Prepare(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_One: {
+ /*
+ * Where the system has exactly one schedulers.
+ */
+ if ( rtems_scheduler_get_processor_maximum() != 1 ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_Two: {
+ /*
+ * Where the system has exactly two schedulers.
+ */
+ if ( rtems_scheduler_get_processor_maximum() != 2 ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_More: {
+ /*
+ * Where the system has at least three schedulers.
+ */
+ if ( rtems_scheduler_get_processor_maximum() < 3 ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority_Prepare(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority_Vital: {
+ /*
+ * While at least one priority inherited through the thread queue for the
+ * previous owner is the highest priority of the previous owner.
+ */
+ ctx->inherited_priorities_are_dispensible = false;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority_Dispensable: {
+ /*
+ * While all priorities inherited through the thread queue for the
+ * previous owner are not the highest priority of the previous owner.
+ */
+ ctx->inherited_priorities_are_dispensible = true;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping_Prepare(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping_Vital: {
+ /*
+ * While at least one helping scheduler of the previous owner is only
+ * available due to a priority inherited through the thread queue.
+ */
+ ctx->helping_schedules_are_dispensible = false;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping_Dispensable: {
+ /*
+ * While all helping scheduler of the previous owner are not only
+ * available due to a priority inherited through the thread queue.
+ */
+ ctx->helping_schedules_are_dispensible = true;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Prepare(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Home: {
+ /*
+ * While the previous owner executes in its home scheduler.
+ */
+ ctx->use_helping_scheduler = false;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Helping: {
+ /*
+ * While the previous owner executes in a helping scheduler which is
+ * available due to a priority inherited through the thread queue.
+ */
+ ctx->use_helping_scheduler = true;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Prepare(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Vital: {
+ /*
+ * While at least one highest priority of the new owner is only available
+ * due to a priority inherited through the thread queue.
+ */
+ ctx->gains_new_priority = true;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Dispensable: {
+ /*
+ * While all highest priorities of the new owner are not only available
+ * due to a priority inherited through the thread queue.
+ */
+ ctx->gains_new_priority = false;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_Prepare(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_Vital: {
+ /*
+ * While at least one helping scheduler of the new owner is only
+ * available due to a priority inherited through the thread queue.
+ */
+ ctx->gains_new_helping_scheduler = true;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_Dispensable: {
+ /*
+ * While all helping scheduler of the new owner are not only available
+ * due to a priority inherited through the thread queue.
+ */
+ ctx->gains_new_helping_scheduler = false;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_Prepare(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Pre_Suspended state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_Yes: {
+ /*
+ * While the new owner is suspended.
+ */
+ ctx->suspended = true;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_No: {
+ /*
+ * While the new owner is not suspended.
+ */
+ ctx->suspended = false;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_Prepare(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Pre_WaitState state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_Blocked: {
+ /*
+ * While the new owner is in the blocked wait state.
+ */
+ ctx->intend_to_block = false;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_IntendToBlock: {
+ /*
+ * While the new owner is in the intend to block wait state.
+ */
+ ctx->intend_to_block = true;
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Check(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority: {
+ /*
+ * The first thread in priority order shall be dequeued from the thread
+ * queue.
+ */
+ /* Validation is done by spec:/score/tq/req/enqueue-priority */
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Check(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock state
+)
+{
+ size_t i;
+
+ i = 0;
+
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes: {
+ /*
+ * The dequeued thread shall be unblocked by the thread queue surrender
+ * operation.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, NEW_OWNER ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No: {
+ /*
+ * The dequeued thread shall not be unblocked by the thread queue
+ * surrender operation.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA:
+ break;
+ }
+}
+
+static void
+ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Check(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop: {
+ /*
+ * Each eligible priority of the previous owner which had the highest
+ * priority inherited through the thread queue shall be updated.
+ */
+ T_eq_u32( ctx->priority_after, PRIO_NORMAL );
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop: {
+ /*
+ * No eligible priority of the previous owner shall be updated.
+ */
+ T_eq_u32( ctx->priority_after, ctx->priority_before );
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Check(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority state
+)
+{
+ rtems_id scheduler_id;
+ rtems_task_priority priority;
+ rtems_status_code sc;
+
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise: {
+ /*
+ * Each eligible priority of the new owner which inherited the highest
+ * priority through the thread queue shall be updated.
+ */
+ sc = rtems_task_get_priority(
+ ctx->tq_ctx->worker_id[ NEW_OWNER ],
+ SCHEDULER_A_ID,
+ &priority
+ );
+ T_rsc_success( sc );
+ T_eq_u32( priority, PRIO_LOW );
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop: {
+ /*
+ * No highest priority of the new owner shall be changed.
+ */
+ if ( ctx->gains_new_helping_scheduler ) {
+ scheduler_id = SCHEDULER_C_ID;
+ } else {
+ scheduler_id = SCHEDULER_A_ID;
+ }
+
+ sc = rtems_task_get_priority(
+ ctx->tq_ctx->worker_id[ NEW_OWNER ],
+ scheduler_id,
+ &priority
+ );
+ #if defined(RTEMS_SMP)
+ T_rsc( sc, RTEMS_NOT_DEFINED );
+ #else
+ T_rsc_success( sc );
+ T_eq_u32( priority, PRIO_HIGH );
+ #endif
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Check(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper state
+)
+{
+ rtems_task_priority priority;
+ rtems_status_code sc;
+
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes: {
+ /*
+ * Each helping scheduler of the previous owner which was only available
+ * due to a priority inherited through the thread queue shall be removed
+ * from the previous owner.
+ */
+ sc = rtems_task_get_priority(
+ ctx->previous_owner,
+ SCHEDULER_B_ID,
+ &priority
+ );
+ T_rsc( sc, RTEMS_NOT_DEFINED );
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No: {
+ /*
+ * No helping scheduler shall be removed from the previous owner.
+ */
+ sc = rtems_task_get_priority(
+ ctx->previous_owner,
+ SCHEDULER_B_ID,
+ &priority
+ );
+ #if defined(RTEMS_SMP)
+ T_rsc_success( sc );
+
+ if ( ctx->tq_ctx->enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ T_eq_u32( priority, PRIO_LOW );
+ } else {
+ T_eq_u32( priority, PRIO_HIGH );
+ }
+ #else
+ T_rsc( sc, RTEMS_INVALID_ID );
+ #endif
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Check(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper state
+)
+{
+ rtems_id scheduler_id;
+ rtems_task_priority priority;
+ rtems_status_code sc;
+
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes: {
+ /*
+ * Each helping scheduler of the new owner which is only available due to
+ * a priority inherited through the thread queue shall be added to the
+ * new owner.
+ */
+ if ( ctx->gains_new_priority ) {
+ scheduler_id = SCHEDULER_C_ID;
+ } else {
+ scheduler_id = SCHEDULER_A_ID;
+ }
+
+ sc = rtems_task_get_priority(
+ ctx->tq_ctx->worker_id[ NEW_OWNER ],
+ scheduler_id,
+ &priority
+ );
+ T_rsc_success( sc );
+
+ if ( ctx->tq_ctx->enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ T_eq_u32( priority, PRIO_VERY_HIGH );
+ } else {
+ T_eq_u32( priority, PRIO_LOW );
+ }
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No: {
+ /*
+ * No helping scheduler shall added to the new owner.
+ */
+ if ( ctx->gains_new_priority ) {
+ scheduler_id = SCHEDULER_C_ID;
+ } else {
+ scheduler_id = SCHEDULER_A_ID;
+ }
+
+ sc = rtems_task_get_priority(
+ ctx->tq_ctx->worker_id[ NEW_OWNER ],
+ scheduler_id,
+ &priority
+ );
+ #if defined(RTEMS_SMP)
+ T_rsc( sc, RTEMS_NOT_DEFINED );
+ #else
+ T_rsc_success( sc );
+ T_eq_u32( priority, PRIO_HIGH );
+ #endif
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Check(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes: {
+ /*
+ * The new owner shall be suspended.
+ */
+ T_true( IsTaskSuspended( ctx->tq_ctx->worker_id[ NEW_OWNER ] ) );
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No: {
+ /*
+ * The new owner shall be not suspended.
+ */
+ T_false( IsTaskSuspended( ctx->tq_ctx->worker_id[ NEW_OWNER ] ) );
+ break;
+ }
+
+ case ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Setup(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx
+)
+{
+ ctx->request.arg = ctx;
+ TQReset( ctx->tq_ctx );
+
+ if ( ctx->tq_ctx->enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ SetupSticky( ctx );
+ } else {
+ Setup( ctx );
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Setup_Wrap( void *arg )
+{
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqSurrenderPriorityInherit_Setup( ctx );
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Teardown(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx
+)
+{
+ SetSelfScheduler( SCHEDULER_A_ID, PRIO_NORMAL );
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqSurrenderPriorityInherit_Teardown( ctx );
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Prepare(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx
+)
+{
+ ctx->action_performed = false;
+ ctx->inherited_priorities_are_dispensible = true;
+ ctx->helping_schedules_are_dispensible = true;
+ ctx->use_helping_scheduler = false;
+ ctx->gains_new_priority = false;
+ ctx->gains_new_helping_scheduler = false;
+ ctx->intend_to_block = false;
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Action(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx
+)
+{
+ if ( ctx->tq_ctx->enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ ActionSticky( ctx );
+ } else {
+ Action( ctx );
+ }
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_Cleanup(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx
+)
+{
+ if ( ctx->action_performed ) {
+ if ( ctx->tq_ctx->enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ CleanupSticky( ctx );
+ } else {
+ Cleanup( ctx );
+ }
+ }
+}
+
+static const ScoreTqReqSurrenderPriorityInherit_Entry
+ScoreTqReqSurrenderPriorityInherit_Entries[] = {
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#endif
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA }
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No }
+#endif
+};
+
+static const uint8_t
+ScoreTqReqSurrenderPriorityInherit_Map[] = {
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 4, 5, 6, 7, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 8, 9, 10, 11, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2,
+ 3, 2, 3, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 2, 3, 2, 3, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 2, 3, 2, 3, 24, 25, 26, 27, 28, 29,
+ 30, 31, 4, 5, 6, 7, 2, 3, 2, 3, 24, 25, 26, 27, 28, 29, 30, 31, 4, 5, 6, 7,
+ 2, 3, 2, 3, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 2, 3, 2, 3, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 2, 3, 2, 3, 44, 45, 46, 47, 48,
+ 49, 50, 51, 8, 9, 10, 11, 2, 3, 2, 3, 44, 45, 46, 47, 48, 49, 50, 51, 8, 9,
+ 10, 11, 52, 53, 54, 55, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 52,
+ 53, 54, 55, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 56, 57, 58, 59,
+ 24, 25, 26, 27, 28, 29, 30, 31, 4, 5, 6, 7, 56, 57, 58, 59, 24, 25, 26, 27,
+ 28, 29, 30, 31, 4, 5, 6, 7, 60, 61, 62, 63, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 60, 61, 62, 63, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 64, 65, 66, 67, 44, 45, 46, 47, 48, 49, 50, 51, 8, 9, 10, 11, 64, 65, 66,
+ 67, 44, 45, 46, 47, 48, 49, 50, 51, 8, 9, 10, 11
+};
+
+static size_t ScoreTqReqSurrenderPriorityInherit_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ ScoreTqReqSurrenderPriorityInherit_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqSurrenderPriorityInherit_Fixture = {
+ .setup = ScoreTqReqSurrenderPriorityInherit_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqSurrenderPriorityInherit_Teardown_Wrap,
+ .scope = ScoreTqReqSurrenderPriorityInherit_Scope,
+ .initial_context = &ScoreTqReqSurrenderPriorityInherit_Instance
+};
+
+static const uint8_t ScoreTqReqSurrenderPriorityInherit_Weights[] = {
+ 128, 64, 32, 16, 8, 4, 2, 1
+};
+
+static void ScoreTqReqSurrenderPriorityInherit_Skip(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx,
+ size_t index
+)
+{
+ switch ( index + 1 ) {
+ case 1:
+ ctx->Map.pcs[ 1 ] = ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority_NA - 1;
+ /* Fall through */
+ case 2:
+ ctx->Map.pcs[ 2 ] = ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping_NA - 1;
+ /* Fall through */
+ case 3:
+ ctx->Map.pcs[ 3 ] = ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_NA - 1;
+ /* Fall through */
+ case 4:
+ ctx->Map.pcs[ 4 ] = ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_NA - 1;
+ /* Fall through */
+ case 5:
+ ctx->Map.pcs[ 5 ] = ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_NA - 1;
+ /* Fall through */
+ case 6:
+ ctx->Map.pcs[ 6 ] = ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_NA - 1;
+ /* Fall through */
+ case 7:
+ ctx->Map.pcs[ 7 ] = ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_NA - 1;
+ break;
+ }
+}
+
+static inline ScoreTqReqSurrenderPriorityInherit_Entry
+ScoreTqReqSurrenderPriorityInherit_PopEntry(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx
+)
+{
+ size_t index;
+
+ if ( ctx->Map.skip ) {
+ size_t i;
+
+ ctx->Map.skip = false;
+ index = 0;
+
+ for ( i = 0; i < 8; ++i ) {
+ index += ScoreTqReqSurrenderPriorityInherit_Weights[ i ] * ctx->Map.pcs[ i ];
+ }
+ } else {
+ index = ctx->Map.index;
+ }
+
+ ctx->Map.index = index + 1;
+
+ return ScoreTqReqSurrenderPriorityInherit_Entries[
+ ScoreTqReqSurrenderPriorityInherit_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqSurrenderPriorityInherit_TestVariant(
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx
+)
+{
+ ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_Prepare(
+ ctx,
+ ctx->Map.pcs[ 0 ]
+ );
+
+ if ( ctx->Map.skip ) {
+ ScoreTqReqSurrenderPriorityInherit_Skip( ctx, 0 );
+ return;
+ }
+
+ ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority_Prepare(
+ ctx,
+ ctx->Map.pcs[ 1 ]
+ );
+ ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping_Prepare(
+ ctx,
+ ctx->Map.pcs[ 2 ]
+ );
+ ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Prepare(
+ ctx,
+ ctx->Map.pcs[ 3 ]
+ );
+ ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Prepare(
+ ctx,
+ ctx->Map.pcs[ 4 ]
+ );
+ ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_Prepare(
+ ctx,
+ ctx->Map.pcs[ 5 ]
+ );
+ ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_Prepare(
+ ctx,
+ ctx->Map.pcs[ 6 ]
+ );
+ ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_Prepare(
+ ctx,
+ ctx->Map.pcs[ 7 ]
+ );
+ ScoreTqReqSurrenderPriorityInherit_Action( ctx );
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Check(
+ ctx,
+ ctx->Map.entry.Post_Dequeue
+ );
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Check(
+ ctx,
+ ctx->Map.entry.Post_Unblock
+ );
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Check(
+ ctx,
+ ctx->Map.entry.Post_PreviousOwnerPriority
+ );
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Check(
+ ctx,
+ ctx->Map.entry.Post_NewPriority
+ );
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Check(
+ ctx,
+ ctx->Map.entry.Post_RemoveHelper
+ );
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Check(
+ ctx,
+ ctx->Map.entry.Post_AddHelper
+ );
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Check(
+ ctx,
+ ctx->Map.entry.Post_Suspended
+ );
+}
+
+static T_fixture_node ScoreTqReqSurrenderPriorityInherit_Node;
+
+static T_remark ScoreTqReqSurrenderPriorityInherit_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqSurrenderPriorityInherit"
+};
+
+void ScoreTqReqSurrenderPriorityInherit_Run( TQContext *tq_ctx )
+{
+ ScoreTqReqSurrenderPriorityInherit_Context *ctx;
+
+ ctx = &ScoreTqReqSurrenderPriorityInherit_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqSurrenderPriorityInherit_Node,
+ &ScoreTqReqSurrenderPriorityInherit_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+ ctx->Map.skip = false;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_One;
+ ctx->Map.pcs[ 0 ] < ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority_Vital;
+ ctx->Map.pcs[ 1 ] < ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping_Vital;
+ ctx->Map.pcs[ 2 ] < ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 3 ] = ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Home;
+ ctx->Map.pcs[ 3 ] < ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_NA;
+ ++ctx->Map.pcs[ 3 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 4 ] = ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Vital;
+ ctx->Map.pcs[ 4 ] < ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_NA;
+ ++ctx->Map.pcs[ 4 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 5 ] = ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_Vital;
+ ctx->Map.pcs[ 5 ] < ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_NA;
+ ++ctx->Map.pcs[ 5 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 6 ] = ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_Yes;
+ ctx->Map.pcs[ 6 ] < ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_NA;
+ ++ctx->Map.pcs[ 6 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 7 ] = ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_Blocked;
+ ctx->Map.pcs[ 7 ] < ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_NA;
+ ++ctx->Map.pcs[ 7 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqSurrenderPriorityInherit_PopEntry(
+ ctx
+ );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ ScoreTqReqSurrenderPriorityInherit_Prepare( ctx );
+ ScoreTqReqSurrenderPriorityInherit_TestVariant( ctx );
+ ScoreTqReqSurrenderPriorityInherit_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ T_add_remark( &ScoreTqReqSurrenderPriorityInherit_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-surrender-priority-inherit.h b/testsuites/validation/tr-tq-surrender-priority-inherit.h
new file mode 100644
index 0000000000..941e9eb545
--- /dev/null
+++ b/testsuites/validation/tr-tq-surrender-priority-inherit.h
@@ -0,0 +1,169 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqSurrenderPriorityInherit
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_SURRENDER_PRIORITY_INHERIT_H
+#define _TR_TQ_SURRENDER_PRIORITY_INHERIT_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqSurrenderPriorityInherit
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_One,
+ ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_Two,
+ ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_More,
+ ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount_NA
+} ScoreTqReqSurrenderPriorityInherit_Pre_SchedulerCount;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority_Vital,
+ ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority_Dispensable,
+ ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority_NA
+} ScoreTqReqSurrenderPriorityInherit_Pre_InheritedPriority;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping_Vital,
+ ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping_Dispensable,
+ ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping_NA
+} ScoreTqReqSurrenderPriorityInherit_Pre_PreviousHelping;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Home,
+ ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_Helping,
+ ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler_NA
+} ScoreTqReqSurrenderPriorityInherit_Pre_UsedScheduler;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Vital,
+ ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_Dispensable,
+ ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority_NA
+} ScoreTqReqSurrenderPriorityInherit_Pre_NewPriority;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_Vital,
+ ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_Dispensable,
+ ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping_NA
+} ScoreTqReqSurrenderPriorityInherit_Pre_NewHelping;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_No,
+ ScoreTqReqSurrenderPriorityInherit_Pre_Suspended_NA
+} ScoreTqReqSurrenderPriorityInherit_Pre_Suspended;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_Blocked,
+ ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_IntendToBlock,
+ ScoreTqReqSurrenderPriorityInherit_Pre_WaitState_NA
+} ScoreTqReqSurrenderPriorityInherit_Pre_WaitState;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_Priority,
+ ScoreTqReqSurrenderPriorityInherit_Post_Dequeue_NA
+} ScoreTqReqSurrenderPriorityInherit_Post_Dequeue;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Unblock_NA
+} ScoreTqReqSurrenderPriorityInherit_Post_Unblock;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Drop,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority_NA
+} ScoreTqReqSurrenderPriorityInherit_Post_PreviousOwnerPriority;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Raise,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_Nop,
+ ScoreTqReqSurrenderPriorityInherit_Post_NewPriority_NA
+} ScoreTqReqSurrenderPriorityInherit_Post_NewPriority;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper_NA
+} ScoreTqReqSurrenderPriorityInherit_Post_RemoveHelper;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_AddHelper_NA
+} ScoreTqReqSurrenderPriorityInherit_Post_AddHelper;
+
+typedef enum {
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_Yes,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_No,
+ ScoreTqReqSurrenderPriorityInherit_Post_Suspended_NA
+} ScoreTqReqSurrenderPriorityInherit_Post_Suspended;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue test context.
+ */
+void ScoreTqReqSurrenderPriorityInherit_Run( TQContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_SURRENDER_PRIORITY_INHERIT_H */
diff --git a/testsuites/validation/tr-tq-surrender.c b/testsuites/validation/tr-tq-surrender.c
new file mode 100644
index 0000000000..ce680d71d2
--- /dev/null
+++ b/testsuites/validation/tr-tq-surrender.c
@@ -0,0 +1,690 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqSurrender
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/smpbarrier.h>
+#include <rtems/score/threadimpl.h>
+
+#include "tr-tq-surrender.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqSurrender spec:/score/tq/req/surrender
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_HasOwner_NA : 1;
+ uint8_t Pre_Discipline_NA : 1;
+ uint8_t Pre_WaitState_NA : 1;
+ uint8_t Post_Dequeue : 2;
+ uint8_t Post_Unblock : 2;
+} ScoreTqReqSurrender_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/surrender test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the call within ISR request.
+ */
+ CallWithinISRRequest request;
+
+ /**
+ * @brief This member contains the barrier to synchronize the runner and the
+ * worker.
+ */
+ SMP_barrier_Control barrier;
+
+ /**
+ * @brief If this member is true, then the dequeued thread shall be in the
+ * intend to block wait state.
+ */
+ bool intend_to_block;
+
+ /**
+ * @brief If this member contains the expected counter of worker B.
+ */
+ uint32_t expected_blocker_b_counter;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqSurrender_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 3 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqSurrender_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqSurrender_Context;
+
+static ScoreTqReqSurrender_Context
+ ScoreTqReqSurrender_Instance;
+
+static const char * const ScoreTqReqSurrender_PreDesc_HasOwner[] = {
+ "Yes",
+ "No",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrender_PreDesc_Discipline[] = {
+ "FIFO",
+ "Priority",
+ "NA"
+};
+
+static const char * const ScoreTqReqSurrender_PreDesc_WaitState[] = {
+ "Blocked",
+ "IntendToBlock",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqSurrender_PreDesc[] = {
+ ScoreTqReqSurrender_PreDesc_HasOwner,
+ ScoreTqReqSurrender_PreDesc_Discipline,
+ ScoreTqReqSurrender_PreDesc_WaitState,
+ NULL
+};
+
+typedef ScoreTqReqSurrender_Context Context;
+
+static const rtems_tcb *GetUnblock( Context *ctx, size_t *index )
+{
+ return TQGetNextUnblock( ctx->tq_ctx, index )->thread;
+}
+
+static const rtems_tcb *GetTCB( Context *ctx, TQWorkerKind worker )
+{
+ return ctx->tq_ctx->worker_tcb[ worker ];
+}
+
+static void Surrender( void *arg )
+{
+ Context *ctx;
+ Status_Control status;
+
+ ctx = arg;
+ TQSchedulerRecordStart( ctx->tq_ctx );
+
+ status = TQSurrender( ctx->tq_ctx );
+ T_eq_int( status, TQConvertStatus( ctx->tq_ctx, STATUS_SUCCESSFUL ) );
+
+ TQSchedulerRecordStop( ctx->tq_ctx );
+}
+
+#if defined(RTEMS_SMP)
+static void Delay( void *arg )
+{
+ Context *ctx;
+ SMP_barrier_State state;
+
+ ctx = arg;
+ _SMP_barrier_State_initialize( &state );
+
+ /* B0 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+
+ /* B1 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+}
+#endif
+
+static void SchedulerBlock(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_BEFORE &&
+ event->operation == T_SCHEDULER_BLOCK
+ ) {
+ T_scheduler_set_event_handler( NULL, NULL );
+#if defined(RTEMS_SMP)
+ ctx->request.handler = Delay;
+#else
+ ctx->request.handler = Surrender;
+#endif
+ CallWithinISRSubmit( &ctx->request );
+ }
+}
+
+static void ScoreTqReqSurrender_Pre_HasOwner_Prepare(
+ ScoreTqReqSurrender_Context *ctx,
+ ScoreTqReqSurrender_Pre_HasOwner state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrender_Pre_HasOwner_Yes: {
+ /*
+ * Where the thread queue has a previous owner thread.
+ */
+ if ( ctx->tq_ctx->get_owner == NULL ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqSurrender_Pre_HasOwner_No: {
+ /*
+ * Where the thread queue has no owner threads.
+ */
+ if ( ctx->tq_ctx->get_owner != NULL ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqSurrender_Pre_HasOwner_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrender_Pre_Discipline_Prepare(
+ ScoreTqReqSurrender_Context *ctx,
+ ScoreTqReqSurrender_Pre_Discipline state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrender_Pre_Discipline_FIFO: {
+ /*
+ * Where the thread queue uses the FIFO discipline.
+ */
+ if ( ctx->tq_ctx->discipline != TQ_FIFO ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqSurrender_Pre_Discipline_Priority: {
+ /*
+ * Where the thread queue uses the priority discipline.
+ */
+ if ( ctx->tq_ctx->discipline != TQ_PRIORITY ) {
+ ctx->Map.skip = true;
+ }
+ break;
+ }
+
+ case ScoreTqReqSurrender_Pre_Discipline_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrender_Pre_WaitState_Prepare(
+ ScoreTqReqSurrender_Context *ctx,
+ ScoreTqReqSurrender_Pre_WaitState state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrender_Pre_WaitState_Blocked: {
+ /*
+ * While the dequeued thread is in the blocked wait state.
+ */
+ ctx->intend_to_block = false;
+ break;
+ }
+
+ case ScoreTqReqSurrender_Pre_WaitState_IntendToBlock: {
+ /*
+ * While the dequeued thread is in the intend to block wait state.
+ */
+ ctx->intend_to_block = true;
+ break;
+ }
+
+ case ScoreTqReqSurrender_Pre_WaitState_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrender_Post_Dequeue_Check(
+ ScoreTqReqSurrender_Context *ctx,
+ ScoreTqReqSurrender_Post_Dequeue state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqSurrender_Post_Dequeue_FIFO: {
+ /*
+ * The first thread in FIFO order shall be dequeued from the thread
+ * queue.
+ */
+ T_eq_u32( TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_A ), 1 );
+ T_eq_u32(
+ TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_B ),
+ ctx->expected_blocker_b_counter
+ );
+ break;
+ }
+
+ case ScoreTqReqSurrender_Post_Dequeue_Priority: {
+ /*
+ * The first thread in priority order shall be dequeued from the thread
+ * queue.
+ */
+ T_eq_u32( TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_A ), 1 );
+ T_eq_u32( TQGetWorkerCounter( ctx->tq_ctx, TQ_BLOCKER_B ), 2 );
+ break;
+ }
+
+ case ScoreTqReqSurrender_Post_Dequeue_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrender_Post_Unblock_Check(
+ ScoreTqReqSurrender_Context *ctx,
+ ScoreTqReqSurrender_Post_Unblock state
+)
+{
+ size_t i;
+
+ i = 0;
+
+ switch ( state ) {
+ case ScoreTqReqSurrender_Post_Unblock_Yes: {
+ /*
+ * The dequeued thread shall be unblocked by surrender operation.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqSurrender_Post_Unblock_No: {
+ /*
+ * The dequeued thread shall not be unblocked by surrender operation.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqSurrender_Post_Unblock_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqSurrender_Setup( ScoreTqReqSurrender_Context *ctx )
+{
+ ctx->request.arg = ctx;
+ TQReset( ctx->tq_ctx );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_A, PRIO_VERY_HIGH );
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_B, PRIO_HIGH );
+
+ #if defined(RTEMS_SMP)
+ /*
+ * For the mutexes with priority ceiling protocol, we need a scheduler with
+ * two processors to set up the intend to block wait state.
+ */
+ RemoveProcessor( SCHEDULER_B_ID, 1 );
+ AddProcessor( SCHEDULER_A_ID, 1 );
+ #endif
+}
+
+static void ScoreTqReqSurrender_Setup_Wrap( void *arg )
+{
+ ScoreTqReqSurrender_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqSurrender_Setup( ctx );
+}
+
+static void ScoreTqReqSurrender_Teardown( ScoreTqReqSurrender_Context *ctx )
+{
+ TQReset( ctx->tq_ctx );
+
+ #if defined(RTEMS_SMP)
+ RemoveProcessor( SCHEDULER_A_ID, 1 );
+ AddProcessor( SCHEDULER_B_ID, 1 );
+ #endif
+}
+
+static void ScoreTqReqSurrender_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqSurrender_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqSurrender_Teardown( ctx );
+}
+
+static void ScoreTqReqSurrender_Action( ScoreTqReqSurrender_Context *ctx )
+{
+ Status_Control status;
+
+ TQResetCounter( ctx->tq_ctx );
+ ctx->expected_blocker_b_counter = 0;
+
+ status = TQEnqueue( ctx->tq_ctx, TQ_NO_WAIT );
+ T_eq_int( status, TQConvertStatus( ctx->tq_ctx, STATUS_SUCCESSFUL ) );
+
+ if ( ctx->intend_to_block ) {
+ #if defined(RTEMS_SMP)
+ SMP_barrier_State state;
+ #endif
+
+ /*
+ * In uniprocessor configurations, it is impossible to dequeue a thread
+ * in FIFO order which is in the intend to block wait state. Run this
+ * test with just one worker.
+ */
+ if ( ctx->tq_ctx->discipline != TQ_FIFO ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_B,
+ TQ_EVENT_ENQUEUE
+ );
+ ctx->expected_blocker_b_counter = 2;
+ }
+
+
+ #if defined(RTEMS_SMP)
+ _SMP_barrier_Control_initialize( &ctx->barrier );
+ _SMP_barrier_State_initialize( &state );
+ #endif
+
+ T_scheduler_set_event_handler( SchedulerBlock, ctx );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE );
+
+ #if defined(RTEMS_SMP)
+ /* B0 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+
+ Surrender( ctx );
+
+ /* B1 */
+ _SMP_barrier_Wait( &ctx->barrier, &state, 2 );
+ #endif
+ } else {
+ TQSend(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ TQ_EVENT_HELPER_A_SYNC | TQ_EVENT_ENQUEUE
+ );
+ TQSynchronizeRunner();
+ TQWaitForExecutionStop( ctx->tq_ctx, TQ_BLOCKER_A );
+
+ TQSend(
+ ctx->tq_ctx,
+ TQ_BLOCKER_B,
+ TQ_EVENT_HELPER_A_SYNC | TQ_EVENT_ENQUEUE
+ );
+ TQSynchronizeRunner();
+ TQWaitForExecutionStop( ctx->tq_ctx, TQ_BLOCKER_B );
+ ctx->expected_blocker_b_counter = 2;
+
+ Surrender( ctx );
+ }
+
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ TQ_EVENT_SURRENDER
+ );
+
+ if ( ctx->expected_blocker_b_counter != 0 ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ TQ_BLOCKER_B,
+ TQ_EVENT_SURRENDER
+ );
+ }
+}
+
+static const ScoreTqReqSurrender_Entry
+ScoreTqReqSurrender_Entries[] = {
+ { 0, 0, 0, 0, ScoreTqReqSurrender_Post_Dequeue_FIFO,
+ ScoreTqReqSurrender_Post_Unblock_Yes },
+ { 0, 0, 0, 0, ScoreTqReqSurrender_Post_Dequeue_Priority,
+ ScoreTqReqSurrender_Post_Unblock_Yes },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, ScoreTqReqSurrender_Post_Dequeue_NA,
+ ScoreTqReqSurrender_Post_Unblock_NA },
+#else
+ { 0, 0, 0, 0, ScoreTqReqSurrender_Post_Dequeue_FIFO,
+ ScoreTqReqSurrender_Post_Unblock_No },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, ScoreTqReqSurrender_Post_Dequeue_NA,
+ ScoreTqReqSurrender_Post_Unblock_NA },
+#else
+ { 0, 0, 0, 0, ScoreTqReqSurrender_Post_Dequeue_Priority,
+ ScoreTqReqSurrender_Post_Unblock_No },
+#endif
+ { 0, 0, 0, 0, ScoreTqReqSurrender_Post_Dequeue_FIFO,
+ ScoreTqReqSurrender_Post_Unblock_No },
+ { 0, 0, 0, 0, ScoreTqReqSurrender_Post_Dequeue_Priority,
+ ScoreTqReqSurrender_Post_Unblock_No }
+};
+
+static const uint8_t
+ScoreTqReqSurrender_Map[] = {
+ 0, 2, 1, 3, 0, 4, 1, 5
+};
+
+static size_t ScoreTqReqSurrender_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreTqReqSurrender_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( ScoreTqReqSurrender_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqSurrender_Fixture = {
+ .setup = ScoreTqReqSurrender_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqSurrender_Teardown_Wrap,
+ .scope = ScoreTqReqSurrender_Scope,
+ .initial_context = &ScoreTqReqSurrender_Instance
+};
+
+static const uint8_t ScoreTqReqSurrender_Weights[] = {
+ 4, 2, 1
+};
+
+static void ScoreTqReqSurrender_Skip(
+ ScoreTqReqSurrender_Context *ctx,
+ size_t index
+)
+{
+ switch ( index + 1 ) {
+ case 1:
+ ctx->Map.pcs[ 1 ] = ScoreTqReqSurrender_Pre_Discipline_NA - 1;
+ /* Fall through */
+ case 2:
+ ctx->Map.pcs[ 2 ] = ScoreTqReqSurrender_Pre_WaitState_NA - 1;
+ break;
+ }
+}
+
+static inline ScoreTqReqSurrender_Entry ScoreTqReqSurrender_PopEntry(
+ ScoreTqReqSurrender_Context *ctx
+)
+{
+ size_t index;
+
+ if ( ctx->Map.skip ) {
+ size_t i;
+
+ ctx->Map.skip = false;
+ index = 0;
+
+ for ( i = 0; i < 3; ++i ) {
+ index += ScoreTqReqSurrender_Weights[ i ] * ctx->Map.pcs[ i ];
+ }
+ } else {
+ index = ctx->Map.index;
+ }
+
+ ctx->Map.index = index + 1;
+
+ return ScoreTqReqSurrender_Entries[
+ ScoreTqReqSurrender_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqSurrender_TestVariant( ScoreTqReqSurrender_Context *ctx )
+{
+ ScoreTqReqSurrender_Pre_HasOwner_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreTqReqSurrender_Skip( ctx, 0 );
+ return;
+ }
+
+ ScoreTqReqSurrender_Pre_Discipline_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+
+ if ( ctx->Map.skip ) {
+ ScoreTqReqSurrender_Skip( ctx, 1 );
+ return;
+ }
+
+ ScoreTqReqSurrender_Pre_WaitState_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ ScoreTqReqSurrender_Action( ctx );
+ ScoreTqReqSurrender_Post_Dequeue_Check( ctx, ctx->Map.entry.Post_Dequeue );
+ ScoreTqReqSurrender_Post_Unblock_Check( ctx, ctx->Map.entry.Post_Unblock );
+}
+
+static T_fixture_node ScoreTqReqSurrender_Node;
+
+static T_remark ScoreTqReqSurrender_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqSurrender"
+};
+
+void ScoreTqReqSurrender_Run( TQContext *tq_ctx )
+{
+ ScoreTqReqSurrender_Context *ctx;
+
+ ctx = &ScoreTqReqSurrender_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqSurrender_Node,
+ &ScoreTqReqSurrender_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+ ctx->Map.skip = false;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreTqReqSurrender_Pre_HasOwner_Yes;
+ ctx->Map.pcs[ 0 ] < ScoreTqReqSurrender_Pre_HasOwner_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = ScoreTqReqSurrender_Pre_Discipline_FIFO;
+ ctx->Map.pcs[ 1 ] < ScoreTqReqSurrender_Pre_Discipline_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 2 ] = ScoreTqReqSurrender_Pre_WaitState_Blocked;
+ ctx->Map.pcs[ 2 ] < ScoreTqReqSurrender_Pre_WaitState_NA;
+ ++ctx->Map.pcs[ 2 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqSurrender_PopEntry( ctx );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ ScoreTqReqSurrender_TestVariant( ctx );
+ }
+ }
+ }
+
+ T_add_remark( &ScoreTqReqSurrender_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-surrender.h b/testsuites/validation/tr-tq-surrender.h
new file mode 100644
index 0000000000..8155387069
--- /dev/null
+++ b/testsuites/validation/tr-tq-surrender.h
@@ -0,0 +1,109 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqSurrender
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_SURRENDER_H
+#define _TR_TQ_SURRENDER_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqSurrender
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqSurrender_Pre_HasOwner_Yes,
+ ScoreTqReqSurrender_Pre_HasOwner_No,
+ ScoreTqReqSurrender_Pre_HasOwner_NA
+} ScoreTqReqSurrender_Pre_HasOwner;
+
+typedef enum {
+ ScoreTqReqSurrender_Pre_Discipline_FIFO,
+ ScoreTqReqSurrender_Pre_Discipline_Priority,
+ ScoreTqReqSurrender_Pre_Discipline_NA
+} ScoreTqReqSurrender_Pre_Discipline;
+
+typedef enum {
+ ScoreTqReqSurrender_Pre_WaitState_Blocked,
+ ScoreTqReqSurrender_Pre_WaitState_IntendToBlock,
+ ScoreTqReqSurrender_Pre_WaitState_NA
+} ScoreTqReqSurrender_Pre_WaitState;
+
+typedef enum {
+ ScoreTqReqSurrender_Post_Dequeue_FIFO,
+ ScoreTqReqSurrender_Post_Dequeue_Priority,
+ ScoreTqReqSurrender_Post_Dequeue_NA
+} ScoreTqReqSurrender_Post_Dequeue;
+
+typedef enum {
+ ScoreTqReqSurrender_Post_Unblock_Yes,
+ ScoreTqReqSurrender_Post_Unblock_No,
+ ScoreTqReqSurrender_Post_Unblock_NA
+} ScoreTqReqSurrender_Post_Unblock;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue test context.
+ */
+void ScoreTqReqSurrender_Run( TQContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_SURRENDER_H */
diff --git a/testsuites/validation/tr-tq-timeout-mrsp.c b/testsuites/validation/tr-tq-timeout-mrsp.c
new file mode 100644
index 0000000000..7362e1943b
--- /dev/null
+++ b/testsuites/validation/tr-tq-timeout-mrsp.c
@@ -0,0 +1,482 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqTimeoutMrsp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/smpimpl.h>
+#include <rtems/score/threadimpl.h>
+
+#include "tr-tq-timeout-mrsp.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqTimeoutMrsp spec:/score/tq/req/timeout-mrsp
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Scheduler_NA : 1;
+ uint8_t Pre_WaitState_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_Unblock : 1;
+} ScoreTqReqTimeoutMrsp_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/timeout-mrsp test case.
+ */
+typedef struct {
+ /**
+ * @brief If this member is true, then the enqueued thread shall use a home
+ * scheduler other than the home scheduler of the owner.
+ */
+ bool other_scheduler;
+
+ /**
+ * @brief If this member is true, then the processor set of the schedulers
+ * shall be restored.
+ */
+ bool restore_scheduler;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqTimeoutMrsp_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 2 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqTimeoutMrsp_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqTimeoutMrsp_Context;
+
+static ScoreTqReqTimeoutMrsp_Context
+ ScoreTqReqTimeoutMrsp_Instance;
+
+static const char * const ScoreTqReqTimeoutMrsp_PreDesc_Scheduler[] = {
+ "Same",
+ "Other",
+ "NA"
+};
+
+static const char * const ScoreTqReqTimeoutMrsp_PreDesc_WaitState[] = {
+ "IntendToBlock",
+ "ReadyAgain",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqTimeoutMrsp_PreDesc[] = {
+ ScoreTqReqTimeoutMrsp_PreDesc_Scheduler,
+ ScoreTqReqTimeoutMrsp_PreDesc_WaitState,
+ NULL
+};
+
+typedef ScoreTqReqTimeoutMrsp_Context Context;
+
+static const rtems_tcb *GetUnblock( Context *ctx, size_t *index )
+{
+ return TQGetNextUnblock( ctx->tq_ctx, index )->thread;
+}
+
+static void Tick( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ FinalClockTick();
+ TQSchedulerRecordStop( ctx->tq_ctx );
+}
+
+static void ScoreTqReqTimeoutMrsp_Pre_Scheduler_Prepare(
+ ScoreTqReqTimeoutMrsp_Context *ctx,
+ ScoreTqReqTimeoutMrsp_Pre_Scheduler state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutMrsp_Pre_Scheduler_Same: {
+ /*
+ * While the home scheduler of the thread is equal to the home scheduler
+ * of the thread queue owner.
+ */
+ ctx->other_scheduler = false;
+
+ TQSetScheduler(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ SCHEDULER_A_ID,
+ PRIO_LOW
+ );
+ RemoveProcessor( SCHEDULER_B_ID, 1 );
+ AddProcessor( SCHEDULER_A_ID, 1 );
+ ctx->restore_scheduler = true;
+ break;
+ }
+
+ case ScoreTqReqTimeoutMrsp_Pre_Scheduler_Other: {
+ /*
+ * While the home scheduler of the thread is not equal to the home
+ * scheduler of the thread queue owner.
+ */
+ ctx->other_scheduler = true;
+
+ TQSetScheduler(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ SCHEDULER_B_ID,
+ PRIO_NORMAL
+ );
+ break;
+ }
+
+ case ScoreTqReqTimeoutMrsp_Pre_Scheduler_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutMrsp_Pre_WaitState_Prepare(
+ ScoreTqReqTimeoutMrsp_Context *ctx,
+ ScoreTqReqTimeoutMrsp_Pre_WaitState state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutMrsp_Pre_WaitState_IntendToBlock: {
+ /*
+ * While the thread of the timeout operation is in the intend to block
+ * wait state.
+ */
+ Per_CPU_Control *cpu;
+
+ TQEnqueuePrepare( ctx->tq_ctx );
+ TQSendAndWaitForIntendToBlock(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ TQ_EVENT_ENQUEUE
+ );
+ cpu = _Thread_Get_CPU( ctx->tq_ctx->worker_tcb[ TQ_BLOCKER_A ] );
+
+ /*
+ * We have to make sure that the worker thread inserted its thread
+ * timer. Checking the intend to block wait state is not enough to
+ * ensure this.
+ */
+ while ( cpu->thread_dispatch_disable_level != 0 ) {
+ /* Wait */
+ }
+
+ Tick( ctx );
+ WaitForExecutionStop( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] );
+ TQEnqueueDone( ctx->tq_ctx );
+ break;
+ }
+
+ case ScoreTqReqTimeoutMrsp_Pre_WaitState_ReadyAgain: {
+ /*
+ * While the thread of the timeout operation is in the ready again wait
+ * state.
+ */
+ TQEnqueuePrepare( ctx->tq_ctx );
+ TQSendAndWaitForIntendToBlock(
+ ctx->tq_ctx,
+ TQ_BLOCKER_A,
+ TQ_EVENT_ENQUEUE | TQ_EVENT_TIMEOUT | TQ_EVENT_SURRENDER |
+ TQ_EVENT_SCHEDULER_RECORD_STOP
+ );
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ TQEnqueueDone( ctx->tq_ctx );
+ WaitForExecutionStop( ctx->tq_ctx->worker_id[ TQ_BLOCKER_A ] );
+ break;
+ }
+
+ case ScoreTqReqTimeoutMrsp_Pre_WaitState_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutMrsp_Post_Status_Check(
+ ScoreTqReqTimeoutMrsp_Context *ctx,
+ ScoreTqReqTimeoutMrsp_Post_Status state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutMrsp_Post_Status_Ok: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_SUCCESSFUL.
+ */
+ T_eq_int(
+ ctx->tq_ctx->status[ TQ_BLOCKER_A ],
+ TQConvertStatus( ctx->tq_ctx, STATUS_SUCCESSFUL )
+ );
+ break;
+ }
+
+ case ScoreTqReqTimeoutMrsp_Post_Status_Timeout: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_TIMEOUT.
+ */
+ T_eq_int(
+ ctx->tq_ctx->status[ TQ_BLOCKER_A ],
+ TQConvertStatus( ctx->tq_ctx, STATUS_TIMEOUT )
+ );
+ break;
+ }
+
+ case ScoreTqReqTimeoutMrsp_Post_Status_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutMrsp_Post_Unblock_Check(
+ ScoreTqReqTimeoutMrsp_Context *ctx,
+ ScoreTqReqTimeoutMrsp_Post_Unblock state
+)
+{
+ size_t i;
+
+ i = 0;
+
+ switch ( state ) {
+ case ScoreTqReqTimeoutMrsp_Post_Unblock_No: {
+ /*
+ * The thread of the timeout operation shall not be unblocked by the
+ * timeout operation.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqTimeoutMrsp_Post_Unblock_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutMrsp_Setup( ScoreTqReqTimeoutMrsp_Context *ctx )
+{
+ TQReset( ctx->tq_ctx );
+}
+
+static void ScoreTqReqTimeoutMrsp_Setup_Wrap( void *arg )
+{
+ ScoreTqReqTimeoutMrsp_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqTimeoutMrsp_Setup( ctx );
+}
+
+static void ScoreTqReqTimeoutMrsp_Teardown(
+ ScoreTqReqTimeoutMrsp_Context *ctx
+)
+{
+ TQReset( ctx->tq_ctx );
+}
+
+static void ScoreTqReqTimeoutMrsp_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqTimeoutMrsp_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqTimeoutMrsp_Teardown( ctx );
+}
+
+static void ScoreTqReqTimeoutMrsp_Prepare( ScoreTqReqTimeoutMrsp_Context *ctx )
+{
+ ctx->restore_scheduler = false;
+}
+
+static void ScoreTqReqTimeoutMrsp_Action( ScoreTqReqTimeoutMrsp_Context *ctx )
+{
+ /*
+ * The action is performed by the ``WaitState`` pre-condition preparation.
+ */
+}
+
+static void ScoreTqReqTimeoutMrsp_Cleanup( ScoreTqReqTimeoutMrsp_Context *ctx )
+{
+ if ( ctx->restore_scheduler ) {
+ RemoveProcessor( SCHEDULER_A_ID, 1 );
+ AddProcessor( SCHEDULER_B_ID, 1 );
+ }
+}
+
+static const ScoreTqReqTimeoutMrsp_Entry
+ScoreTqReqTimeoutMrsp_Entries[] = {
+ { 0, 0, 0, ScoreTqReqTimeoutMrsp_Post_Status_Timeout,
+ ScoreTqReqTimeoutMrsp_Post_Unblock_No },
+ { 0, 0, 0, ScoreTqReqTimeoutMrsp_Post_Status_Ok,
+ ScoreTqReqTimeoutMrsp_Post_Unblock_No }
+};
+
+static const uint8_t
+ScoreTqReqTimeoutMrsp_Map[] = {
+ 0, 1, 0, 1
+};
+
+static size_t ScoreTqReqTimeoutMrsp_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreTqReqTimeoutMrsp_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( ScoreTqReqTimeoutMrsp_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqTimeoutMrsp_Fixture = {
+ .setup = ScoreTqReqTimeoutMrsp_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqTimeoutMrsp_Teardown_Wrap,
+ .scope = ScoreTqReqTimeoutMrsp_Scope,
+ .initial_context = &ScoreTqReqTimeoutMrsp_Instance
+};
+
+static inline ScoreTqReqTimeoutMrsp_Entry ScoreTqReqTimeoutMrsp_PopEntry(
+ ScoreTqReqTimeoutMrsp_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreTqReqTimeoutMrsp_Entries[
+ ScoreTqReqTimeoutMrsp_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqTimeoutMrsp_TestVariant(
+ ScoreTqReqTimeoutMrsp_Context *ctx
+)
+{
+ ScoreTqReqTimeoutMrsp_Pre_Scheduler_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ ScoreTqReqTimeoutMrsp_Pre_WaitState_Prepare( ctx, ctx->Map.pcs[ 1 ] );
+ ScoreTqReqTimeoutMrsp_Action( ctx );
+ ScoreTqReqTimeoutMrsp_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ ScoreTqReqTimeoutMrsp_Post_Unblock_Check( ctx, ctx->Map.entry.Post_Unblock );
+}
+
+static T_fixture_node ScoreTqReqTimeoutMrsp_Node;
+
+static T_remark ScoreTqReqTimeoutMrsp_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqTimeoutMrsp"
+};
+
+void ScoreTqReqTimeoutMrsp_Run( TQContext *tq_ctx )
+{
+ ScoreTqReqTimeoutMrsp_Context *ctx;
+
+ ctx = &ScoreTqReqTimeoutMrsp_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqTimeoutMrsp_Node,
+ &ScoreTqReqTimeoutMrsp_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreTqReqTimeoutMrsp_Pre_Scheduler_Same;
+ ctx->Map.pcs[ 0 ] < ScoreTqReqTimeoutMrsp_Pre_Scheduler_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ for (
+ ctx->Map.pcs[ 1 ] = ScoreTqReqTimeoutMrsp_Pre_WaitState_IntendToBlock;
+ ctx->Map.pcs[ 1 ] < ScoreTqReqTimeoutMrsp_Pre_WaitState_NA;
+ ++ctx->Map.pcs[ 1 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqTimeoutMrsp_PopEntry( ctx );
+ ScoreTqReqTimeoutMrsp_Prepare( ctx );
+ ScoreTqReqTimeoutMrsp_TestVariant( ctx );
+ ScoreTqReqTimeoutMrsp_Cleanup( ctx );
+ }
+ }
+
+ T_add_remark( &ScoreTqReqTimeoutMrsp_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-timeout-mrsp.h b/testsuites/validation/tr-tq-timeout-mrsp.h
new file mode 100644
index 0000000000..56df23d88b
--- /dev/null
+++ b/testsuites/validation/tr-tq-timeout-mrsp.h
@@ -0,0 +1,102 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqTimeoutMrsp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_TIMEOUT_MRSP_H
+#define _TR_TQ_TIMEOUT_MRSP_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqTimeoutMrsp
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqTimeoutMrsp_Pre_Scheduler_Same,
+ ScoreTqReqTimeoutMrsp_Pre_Scheduler_Other,
+ ScoreTqReqTimeoutMrsp_Pre_Scheduler_NA
+} ScoreTqReqTimeoutMrsp_Pre_Scheduler;
+
+typedef enum {
+ ScoreTqReqTimeoutMrsp_Pre_WaitState_IntendToBlock,
+ ScoreTqReqTimeoutMrsp_Pre_WaitState_ReadyAgain,
+ ScoreTqReqTimeoutMrsp_Pre_WaitState_NA
+} ScoreTqReqTimeoutMrsp_Pre_WaitState;
+
+typedef enum {
+ ScoreTqReqTimeoutMrsp_Post_Status_Ok,
+ ScoreTqReqTimeoutMrsp_Post_Status_Timeout,
+ ScoreTqReqTimeoutMrsp_Post_Status_NA
+} ScoreTqReqTimeoutMrsp_Post_Status;
+
+typedef enum {
+ ScoreTqReqTimeoutMrsp_Post_Unblock_No,
+ ScoreTqReqTimeoutMrsp_Post_Unblock_NA
+} ScoreTqReqTimeoutMrsp_Post_Unblock;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue test context.
+ */
+void ScoreTqReqTimeoutMrsp_Run( TQContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_TIMEOUT_MRSP_H */
diff --git a/testsuites/validation/tr-tq-timeout-priority-inherit.c b/testsuites/validation/tr-tq-timeout-priority-inherit.c
new file mode 100644
index 0000000000..12ac70df90
--- /dev/null
+++ b/testsuites/validation/tr-tq-timeout-priority-inherit.c
@@ -0,0 +1,2160 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqTimeoutPriorityInherit
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/smpimpl.h>
+#include <rtems/score/threadimpl.h>
+
+#include "tr-tq-timeout-priority-inherit.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqTimeoutPriorityInherit \
+ * spec:/score/tq/req/timeout-priority-inherit
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint32_t Skip : 1;
+ uint32_t Pre_HomeScheduler_NA : 1;
+ uint32_t Pre_EligibleScheduler_NA : 1;
+ uint32_t Pre_Queue_NA : 1;
+ uint32_t Pre_OwnerPriority_NA : 1;
+ uint32_t Pre_OwnerState_NA : 1;
+ uint32_t Pre_OwnerQueue_NA : 1;
+ uint32_t Pre_OwnerOwnerPriority_NA : 1;
+ uint32_t Pre_WaitState_NA : 1;
+ uint32_t Post_Status : 2;
+ uint32_t Post_Unblock : 2;
+ uint32_t Post_OwnerPriority : 2;
+ uint32_t Post_OwnerOwnerPriority : 2;
+} ScoreTqReqTimeoutPriorityInherit_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/timeout-priority-inherit test
+ * case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the call within ISR request.
+ */
+ CallWithinISRRequest request;
+
+ /**
+ * @brief This member specifies the scheduler of the thread.
+ */
+ rtems_id scheduler_id;
+
+ /**
+ * @brief If this member is true, then the thread shall have at least two
+ * eligible scheduler.
+ */
+ bool other_scheduler;
+
+ /**
+ * @brief This member specifies the queue node kind.
+ */
+ TQNodeKind queue_node;
+
+ /**
+ * @brief This member specifies the owner priority node kind.
+ */
+ TQNodeKind owner_node;
+
+ /**
+ * @brief This member specifies which mutex obtain event shall be used to
+ * block the thread queue owner.
+ */
+ rtems_event_set owner_obtain;
+
+ /**
+ * @brief This member specifies which mutex release event shall be used to
+ * unblock the thread queue owner.
+ */
+ rtems_event_set owner_release;
+
+ /**
+ * @brief This member specifies the owner queue node kind.
+ */
+ TQNodeKind owner_queue_node;
+
+ /**
+ * @brief This member specifies the kind of the priority node of the owner of
+ * the thread queue on which the owner of the thread queue is blocked.
+ */
+ TQNodeKind owner_owner_node;
+
+ /**
+ * @brief This member specifies the wait state.
+ */
+ TQWaitState wait_state;
+
+ /**
+ * @brief This member contains the thread queue priority.
+ */
+ rtems_task_priority queue_priority;
+
+ /**
+ * @brief This member contains the owner priority.
+ */
+ rtems_task_priority owner_priority;
+
+ /**
+ * @brief This member contains the owner priority after the timeout or
+ * surrender.
+ */
+ rtems_task_priority owner_priority_after;
+
+ /**
+ * @brief This member contains the priority of the thread queue on which the
+ * owner is enqueued.
+ */
+ rtems_task_priority owner_queue_priority;
+
+ /**
+ * @brief This member contains the priority of the owner of the thread queue
+ * on which the owner is enqueued.
+ */
+ rtems_task_priority owner_owner_priority;
+
+ /**
+ * @brief This member contains the priority after the timeout or surrender of
+ * the owner of the thread queue on which the owner is enqueued.
+ */
+ rtems_task_priority owner_owner_priority_after;
+
+ /**
+ * @brief If this member is true, then the queue helper shall surrender the
+ * thread queue.
+ */
+ bool queue_helper_surrender;
+
+ /**
+ * @brief If this member is true, then the owner helper shall release mutex
+ * A.
+ */
+ bool owner_helper_release;
+
+ /**
+ * @brief If this member is true, then the owner queue helper shall release
+ * the mutex on which the owner is blocked.
+ */
+ bool owner_queue_helper_release;
+
+ /**
+ * @brief If this member is true, then helper of the owner of the mutex which
+ * the owner blocked shall release mutex B.
+ */
+ bool owner_owner_helper_release;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqTimeoutPriorityInherit_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition indices for the next
+ * action.
+ */
+ size_t pci[ 8 ];
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 8 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqTimeoutPriorityInherit_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqTimeoutPriorityInherit_Context;
+
+static ScoreTqReqTimeoutPriorityInherit_Context
+ ScoreTqReqTimeoutPriorityInherit_Instance;
+
+static const char * const ScoreTqReqTimeoutPriorityInherit_PreDesc_HomeScheduler[] = {
+ "Home",
+ "Helping",
+ "NA"
+};
+
+static const char * const ScoreTqReqTimeoutPriorityInherit_PreDesc_EligibleScheduler[] = {
+ "One",
+ "More",
+ "NA"
+};
+
+static const char * const ScoreTqReqTimeoutPriorityInherit_PreDesc_Queue[] = {
+ "Only",
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const ScoreTqReqTimeoutPriorityInherit_PreDesc_OwnerPriority[] = {
+ "Only",
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const ScoreTqReqTimeoutPriorityInherit_PreDesc_OwnerState[] = {
+ "NotEnqueued",
+ "FIFO",
+ "Priority",
+ "PriorityInherit",
+ "NA"
+};
+
+static const char * const ScoreTqReqTimeoutPriorityInherit_PreDesc_OwnerQueue[] = {
+ "Only",
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const ScoreTqReqTimeoutPriorityInherit_PreDesc_OwnerOwnerPriority[] = {
+ "Only",
+ "Vital",
+ "Dispensable",
+ "NA"
+};
+
+static const char * const ScoreTqReqTimeoutPriorityInherit_PreDesc_WaitState[] = {
+ "Blocked",
+ "IntendToBlock",
+ "ReadyAgain",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqTimeoutPriorityInherit_PreDesc[] = {
+ ScoreTqReqTimeoutPriorityInherit_PreDesc_HomeScheduler,
+ ScoreTqReqTimeoutPriorityInherit_PreDesc_EligibleScheduler,
+ ScoreTqReqTimeoutPriorityInherit_PreDesc_Queue,
+ ScoreTqReqTimeoutPriorityInherit_PreDesc_OwnerPriority,
+ ScoreTqReqTimeoutPriorityInherit_PreDesc_OwnerState,
+ ScoreTqReqTimeoutPriorityInherit_PreDesc_OwnerQueue,
+ ScoreTqReqTimeoutPriorityInherit_PreDesc_OwnerOwnerPriority,
+ ScoreTqReqTimeoutPriorityInherit_PreDesc_WaitState,
+ NULL
+};
+
+typedef ScoreTqReqTimeoutPriorityInherit_Context Context;
+
+#define THREAD TQ_BLOCKER_A
+
+#define THREAD_HELPER_A TQ_HELPER_B
+
+#define THREAD_HELPER_B TQ_HELPER_C
+
+#define QUEUE_HELPER TQ_BLOCKER_B
+
+#define OWNER TQ_BLOCKER_C
+
+#define OWNER_HELPER TQ_BLOCKER_D
+
+#define OWNER_QUEUE_HELPER TQ_BLOCKER_E
+
+#define OWNER_OWNER TQ_WORKER_F
+
+#define OWNER_OWNER_HELPER TQ_HELPER_A
+
+static bool GetUnblock( const Context *ctx, size_t *index )
+{
+ while ( true ) {
+ const T_scheduler_event *event;
+
+ event = TQGetNextUnblock( ctx->tq_ctx, index );
+
+ if ( event == &T_scheduler_event_null ) {
+ return false;
+ }
+
+ if ( event->thread == ctx->tq_ctx->worker_tcb[ THREAD ] ) {
+ return true;
+ }
+ }
+}
+
+static void Tick( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ FinalClockTick();
+ TQSchedulerRecordStop( ctx->tq_ctx );
+}
+
+static void SchedulerBlock(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_BEFORE &&
+ event->operation == T_SCHEDULER_BLOCK &&
+ event->thread == ctx->tq_ctx->worker_tcb[ THREAD ]
+ ) {
+ T_scheduler_set_event_handler( NULL, NULL );
+ ctx->request.handler = Tick;
+ CallWithinISRSubmit( &ctx->request );
+ }
+}
+
+static void ThreadTimeout( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ _Thread_Timeout(
+ &ctx->tq_ctx->worker_tcb[ THREAD ]->Timer.Watchdog
+ );
+ TQSchedulerRecordStop( ctx->tq_ctx );
+}
+
+static void SchedulerUnblock(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_BEFORE &&
+ event->operation == T_SCHEDULER_UNBLOCK &&
+ event->thread == ctx->tq_ctx->worker_tcb[ THREAD ]
+ ) {
+ T_scheduler_set_event_handler( NULL, NULL );
+
+ if ( ctx->scheduler_id == SCHEDULER_B_ID ) {
+#if defined(RTEMS_SMP)
+ _SMP_Unicast_action( 1, ThreadTimeout, ctx );
+#else
+ T_unreachable();
+#endif
+ } else {
+ ctx->request.handler = ThreadTimeout;
+ CallWithinISRSubmit( &ctx->request );
+ }
+ }
+}
+
+static void GetPriorities( Context *ctx )
+{
+ ctx->owner_priority_after = GetPriorityByScheduler(
+ ctx->tq_ctx->worker_id[ OWNER ],
+ ctx->scheduler_id
+ );
+ ctx->owner_owner_priority_after = GetPriorityByScheduler(
+ ctx->tq_ctx->worker_id[ OWNER_OWNER ],
+ ctx->scheduler_id
+ );
+}
+
+static void PrepareThread( const Context *ctx )
+{
+ if ( ctx->other_scheduler ) {
+ rtems_id other_scheduler_id;
+
+ if ( ctx->scheduler_id == SCHEDULER_A_ID ) {
+ other_scheduler_id = SCHEDULER_B_ID;
+ } else {
+ other_scheduler_id = SCHEDULER_B_ID;
+ }
+
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ THREAD,
+ TQ_EVENT_MUTEX_D_OBTAIN
+ );
+
+ TQSetScheduler(
+ ctx->tq_ctx,
+ THREAD_HELPER_A,
+ other_scheduler_id,
+ PRIO_NEARLY_IDLE - 1
+ );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ THREAD_HELPER_A,
+ TQ_EVENT_MUTEX_D_OBTAIN
+ );
+
+ if ( rtems_scheduler_get_processor_maximum() >= 3 ) {
+ TQSetScheduler(
+ ctx->tq_ctx,
+ THREAD_HELPER_B,
+ SCHEDULER_C_ID,
+ PRIO_NORMAL
+ );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ THREAD_HELPER_B,
+ TQ_EVENT_MUTEX_D_OBTAIN
+ );
+ }
+ }
+}
+
+static rtems_task_priority PrepareQueue(
+ Context *ctx,
+ rtems_task_priority priority
+)
+{
+ switch ( ctx->queue_node ) {
+ case TQ_NODE_ONLY:
+ ctx->queue_helper_surrender = false;
+ break;
+ case TQ_NODE_VITAL:
+ ctx->queue_helper_surrender = true;
+ TQSetScheduler(
+ ctx->tq_ctx,
+ QUEUE_HELPER,
+ ctx->scheduler_id,
+ priority + 1
+ );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ QUEUE_HELPER,
+ TQ_EVENT_ENQUEUE
+ );
+ break;
+ case TQ_NODE_DISPENSABLE:
+ ctx->queue_helper_surrender = true;
+ --priority;
+ TQSetScheduler(
+ ctx->tq_ctx,
+ QUEUE_HELPER,
+ ctx->scheduler_id,
+ priority
+ );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ QUEUE_HELPER,
+ TQ_EVENT_ENQUEUE
+ );
+ break;
+ }
+
+ ctx->queue_priority = priority;
+
+ return priority;
+}
+
+static rtems_task_priority PrepareOwner(
+ Context *ctx,
+ rtems_task_priority priority
+)
+{
+ switch ( ctx->owner_node ) {
+ case TQ_NODE_ONLY:
+ ctx->owner_helper_release = false;
+ TQSetPriority( ctx->tq_ctx, OWNER, PRIO_FLEXIBLE );
+ break;
+ case TQ_NODE_VITAL:
+ if ( ctx->scheduler_id == SCHEDULER_A_ID ) {
+ ctx->owner_helper_release = false;
+ TQSetPriority( ctx->tq_ctx, OWNER, priority + 1 );
+ } else {
+ ctx->owner_helper_release = true;
+ TQSetPriority( ctx->tq_ctx, OWNER, PRIO_FLEXIBLE );
+ TQSetScheduler(
+ ctx->tq_ctx,
+ OWNER_HELPER,
+ ctx->scheduler_id,
+ priority + 1
+ );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ OWNER_HELPER,
+ TQ_EVENT_MUTEX_A_OBTAIN
+ );
+ }
+ break;
+ case TQ_NODE_DISPENSABLE:
+ --priority;
+
+ if ( ctx->scheduler_id == SCHEDULER_A_ID ) {
+ ctx->owner_helper_release = false;
+ TQSetPriority( ctx->tq_ctx, OWNER, priority );
+ } else {
+ ctx->owner_helper_release = true;
+ TQSetPriority( ctx->tq_ctx, OWNER, PRIO_FLEXIBLE );
+ TQSetScheduler(
+ ctx->tq_ctx,
+ OWNER_HELPER,
+ ctx->scheduler_id,
+ priority
+ );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ OWNER_HELPER,
+ TQ_EVENT_MUTEX_A_OBTAIN
+ );
+ }
+ break;
+ }
+
+ ctx->owner_priority = priority;
+
+ return priority;
+}
+
+static rtems_task_priority PrepareOwnerQueue(
+ Context *ctx,
+ rtems_task_priority priority
+)
+{
+ if ( ctx->owner_obtain != 0 ) {
+ switch ( ctx->owner_queue_node ) {
+ case TQ_NODE_ONLY:
+ ctx->owner_queue_helper_release = false;
+ break;
+ case TQ_NODE_VITAL:
+ ctx->owner_queue_helper_release = true;
+ TQSetScheduler(
+ ctx->tq_ctx,
+ OWNER_QUEUE_HELPER,
+ ctx->scheduler_id,
+ priority + 1
+ );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ OWNER_QUEUE_HELPER,
+ ctx->owner_obtain
+ );
+ break;
+ case TQ_NODE_DISPENSABLE:
+ ctx->owner_queue_helper_release = true;
+ --priority;
+ TQSetScheduler(
+ ctx->tq_ctx,
+ OWNER_QUEUE_HELPER,
+ ctx->scheduler_id,
+ priority
+ );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ OWNER_QUEUE_HELPER,
+ ctx->owner_obtain
+ );
+ break;
+ }
+
+ ctx->owner_queue_priority = priority;
+ } else {
+ ctx->owner_queue_helper_release = false;
+ ctx->owner_queue_priority = PRIO_INVALID;
+ }
+
+ return priority;
+}
+
+static void PrepareOwnerOwner( Context *ctx, rtems_task_priority priority )
+{
+ if ( ctx->owner_obtain != 0 ) {
+ switch ( ctx->owner_owner_node ) {
+ case TQ_NODE_ONLY:
+ ctx->owner_owner_helper_release = false;
+ TQSetPriority( ctx->tq_ctx, OWNER_OWNER, PRIO_FLEXIBLE );
+ break;
+ case TQ_NODE_VITAL:
+ if ( ctx->scheduler_id == SCHEDULER_A_ID ) {
+ ctx->owner_owner_helper_release = false;
+ TQSetPriority( ctx->tq_ctx, OWNER_OWNER, priority + 1 );
+ } else {
+ ctx->owner_owner_helper_release = true;
+ TQSetPriority( ctx->tq_ctx, OWNER_OWNER, PRIO_FLEXIBLE );
+ TQSetScheduler(
+ ctx->tq_ctx,
+ OWNER_OWNER_HELPER,
+ ctx->scheduler_id,
+ priority + 1
+ );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ OWNER_OWNER_HELPER,
+ TQ_EVENT_MUTEX_B_OBTAIN
+ );
+ }
+ break;
+ case TQ_NODE_DISPENSABLE:
+ --priority;
+
+ if ( ctx->scheduler_id == SCHEDULER_A_ID ) {
+ ctx->owner_owner_helper_release = false;
+ TQSetPriority( ctx->tq_ctx, OWNER_OWNER, priority );
+ } else {
+ ctx->owner_owner_helper_release = true;
+ TQSetPriority( ctx->tq_ctx, OWNER_OWNER, PRIO_FLEXIBLE );
+ TQSetScheduler(
+ ctx->tq_ctx,
+ OWNER_OWNER_HELPER,
+ ctx->scheduler_id,
+ priority
+ );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ OWNER_OWNER_HELPER,
+ TQ_EVENT_MUTEX_B_OBTAIN
+ );
+ }
+ break;
+ }
+
+ ctx->owner_owner_priority = priority;
+ } else {
+ ctx->owner_owner_helper_release = false;
+ ctx->owner_owner_priority = PRIO_INVALID;
+ }
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Pre_HomeScheduler_Prepare(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx,
+ ScoreTqReqTimeoutPriorityInherit_Pre_HomeScheduler state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutPriorityInherit_Pre_HomeScheduler_Home: {
+ /*
+ * While the home scheduler of the thread is the home scheduler of the
+ * thread queue owner.
+ */
+ ctx->scheduler_id = SCHEDULER_A_ID;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_HomeScheduler_Helping: {
+ /*
+ * While the home scheduler of the thread is a helping scheduler of the
+ * thread queue owner.
+ */
+ ctx->scheduler_id = SCHEDULER_B_ID;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_HomeScheduler_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Pre_EligibleScheduler_Prepare(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx,
+ ScoreTqReqTimeoutPriorityInherit_Pre_EligibleScheduler state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutPriorityInherit_Pre_EligibleScheduler_One: {
+ /*
+ * While the thread has exactly one eligible scheduler.
+ */
+ ctx->other_scheduler = false;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_EligibleScheduler_More: {
+ /*
+ * While the thread has at least two eligible scheduler.
+ */
+ ctx->other_scheduler = true;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_EligibleScheduler_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Pre_Queue_Prepare(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx,
+ ScoreTqReqTimeoutPriorityInherit_Pre_Queue state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutPriorityInherit_Pre_Queue_Only: {
+ /*
+ * While the priority node of the thread is the only priority node in the
+ * priority queue associated with the scheduler of the thread queue.
+ */
+ ctx->queue_node = TQ_NODE_ONLY;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_Queue_Vital: {
+ /*
+ * While the priority node of the thread is not the only priority node in
+ * the priority queue associated with the scheduler of the thread queue,
+ * while the priority node of the thread is the highest priority node in
+ * the priority queue.
+ */
+ ctx->queue_node = TQ_NODE_VITAL;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_Queue_Dispensable: {
+ /*
+ * While the priority node of the thread is not the only priority node in
+ * the priority queue associated with the scheduler of the thread queue,
+ * while the priority node of the thread is not the highest priority node
+ * in the priority queue.
+ */
+ ctx->queue_node = TQ_NODE_DISPENSABLE;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_Queue_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority_Prepare(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority_Only: {
+ /*
+ * While the priority node of the thread queue is the only priority node
+ * associated with the scheduler available to the owner.
+ */
+ ctx->owner_node = TQ_NODE_ONLY;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority_Vital: {
+ /*
+ * While the priority node of the thread queue is not the only priority
+ * node associated with the scheduler available to the owner, while the
+ * priority node of the thread queue is the highest priority node
+ * available to the owner.
+ */
+ ctx->owner_node = TQ_NODE_VITAL;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority_Dispensable: {
+ /*
+ * While the priority node of the thread queue is not the only priority
+ * node associated with the scheduler available to the owner, while the
+ * priority node of the thread queue is not the highest priority node
+ * available to the owner.
+ */
+ ctx->owner_node = TQ_NODE_DISPENSABLE;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_Prepare(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_NotEnqueued: {
+ /*
+ * While the owner of the thread queue is not enqueued on a thread queue.
+ */
+ ctx->owner_obtain = 0;
+ ctx->owner_release = 0;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_FIFO: {
+ /*
+ * While the owner of the thread queue is enqueued on a thread queue in
+ * FIFO order.
+ */
+ ctx->owner_obtain = TQ_EVENT_MUTEX_FIFO_OBTAIN;
+ ctx->owner_release = TQ_EVENT_MUTEX_FIFO_RELEASE;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_Priority: {
+ /*
+ * While the owner of the thread queue is enqueued on a thread queue in
+ * priority order.
+ */
+ ctx->owner_obtain = TQ_EVENT_MUTEX_NO_PROTOCOL_OBTAIN;
+ ctx->owner_release = TQ_EVENT_MUTEX_NO_PROTOCOL_RELEASE;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_PriorityInherit: {
+ /*
+ * While the owner of the thread queue is enqueued on a thread queue in
+ * priority order with priority inheritance.
+ */
+ ctx->owner_obtain = TQ_EVENT_MUTEX_C_OBTAIN;
+ ctx->owner_release = TQ_EVENT_MUTEX_C_RELEASE;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue_Prepare(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue_Only: {
+ /*
+ * While the priority node of the owner is the only priority node in the
+ * priority queue associated with the scheduler of the thread queue on
+ * which the owner is enqueued.
+ */
+ ctx->owner_queue_node = TQ_NODE_ONLY;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue_Vital: {
+ /*
+ * While the priority node of the owner is not the only priority node in
+ * the priority queue associated with the scheduler of the thread queue
+ * on which the owner is enqueued, while the priority node of the owner
+ * is the highest priority node in the priority queue.
+ */
+ ctx->owner_queue_node = TQ_NODE_VITAL;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue_Dispensable: {
+ /*
+ * While the priority node of the owner is not the only priority node in
+ * the priority queue associated with the scheduler of the thread queue
+ * on which the owner is enqueued, while the priority node of the owner
+ * is not the highest priority node in the priority queue.
+ */
+ ctx->owner_queue_node = TQ_NODE_DISPENSABLE;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority_Prepare(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority_Only: {
+ /*
+ * While the priority node of the thread queue on which the owner is
+ * enqueued is the only priority node associated with the scheduler
+ * available to the owner of the thread queue on which the owner is
+ * enqueued.
+ */
+ ctx->owner_owner_node = TQ_NODE_ONLY;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority_Vital: {
+ /*
+ * While the priority node of the thread queue on which the owner is
+ * enqueued is not the only priority node associated with the scheduler
+ * available to the owner of the thread queue on which the owner is
+ * enqueued, while the priority node of the thread queue on which the
+ * owner is enqueued is the highest priority node available to the owner
+ * of the thread queue on which the owner is enqueued.
+ */
+ ctx->owner_owner_node = TQ_NODE_VITAL;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority_Dispensable: {
+ /*
+ * While the priority node of the thread queue on which the owner is
+ * enqueued is not the only priority node associated with the scheduler
+ * available to the owner of the thread queue on which the owner is
+ * enqueued, while the priority node of the thread queue is on which the
+ * owner is enqueued not the highest priority node available to the owner
+ * of the thread queue on which the owner is enqueued.
+ */
+ ctx->owner_owner_node = TQ_NODE_DISPENSABLE;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Pre_WaitState_Prepare(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx,
+ ScoreTqReqTimeoutPriorityInherit_Pre_WaitState state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutPriorityInherit_Pre_WaitState_Blocked: {
+ /*
+ * While the thread is in the blocked wait state.
+ */
+ ctx->wait_state = TQ_WAIT_STATE_BLOCKED;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_WaitState_IntendToBlock: {
+ /*
+ * While the thread is in the intend to block wait state.
+ */
+ ctx->wait_state = TQ_WAIT_STATE_INTEND_TO_BLOCK;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_WaitState_ReadyAgain: {
+ /*
+ * While the thread is in the ready again wait state.
+ */
+ ctx->wait_state = TQ_WAIT_STATE_READY_AGAIN;
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Pre_WaitState_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Post_Status_Check(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutPriorityInherit_Post_Status_Ok: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_SUCCESSFUL.
+ */
+ T_eq_int(
+ ctx->tq_ctx->status[ THREAD ],
+ TQConvertStatus( ctx->tq_ctx, STATUS_SUCCESSFUL )
+ );
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_TIMEOUT.
+ */
+ T_eq_int(
+ ctx->tq_ctx->status[ THREAD ],
+ TQConvertStatus( ctx->tq_ctx, STATUS_TIMEOUT )
+ );
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Post_Status_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Check(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock state
+)
+{
+ size_t i;
+
+ i = 0;
+
+ switch ( state ) {
+ case ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes: {
+ /*
+ * The thread shall be unblocked by the timeout operation.
+ */
+ T_true( GetUnblock( ctx, &i ) );
+ T_false( GetUnblock( ctx, &i ) );
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No: {
+ /*
+ * The thread shall not be unblocked by the timeout operation.
+ */
+ T_false( GetUnblock( ctx, &i ) );
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Check(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop: {
+ /*
+ * The priority of the owner with respect to the scheduler shall not
+ * change by the timeout operation.
+ */
+ T_eq_u32( ctx->owner_priority_after, ctx->owner_priority );
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower: {
+ /*
+ * The priority of the owner with respect to the scheduler shall be
+ * lowered to the next highest priority.
+ */
+ T_eq_u32( ctx->owner_priority_after, ctx->owner_priority + 1 );
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Drop: {
+ /*
+ * The owner shall not have a priority with respect to the scheduler.
+ */
+ T_eq_u32( ctx->owner_priority_after, PRIO_INVALID );
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Check(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Nop: {
+ /*
+ * The priority of the owner of the thread queue on which the owner is
+ * enqueued with respect to the scheduler shall not change by the timeout
+ * operation.
+ */
+ T_eq_u32( ctx->owner_owner_priority_after, ctx->owner_owner_priority );
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Lower: {
+ /*
+ * The priority of the owner of the thread queue on which the owner is
+ * enqueued with respect to the scheduler shall be lowered to the next
+ * highest priority.
+ */
+ T_eq_u32( ctx->owner_owner_priority_after, ctx->owner_owner_priority + 1 );
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Drop: {
+ /*
+ * The owner of the thread queue on which the owner is enqueued shall not
+ * have a priority with respect to the scheduler.
+ */
+ T_eq_u32( ctx->owner_owner_priority_after, PRIO_INVALID );
+ break;
+ }
+
+ case ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Setup(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx
+)
+{
+ ctx->request.arg = ctx;
+ TQReset( ctx->tq_ctx );
+ SetSelfPriority( PRIO_NEARLY_IDLE );
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Setup_Wrap( void *arg )
+{
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqTimeoutPriorityInherit_Setup( ctx );
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Teardown(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx
+)
+{
+ TQReset( ctx->tq_ctx );
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqTimeoutPriorityInherit_Teardown( ctx );
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Prepare(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx
+)
+{
+ ctx->queue_helper_surrender = false;
+ ctx->owner_helper_release = false;
+ ctx->owner_queue_helper_release = false;
+ ctx->owner_owner_helper_release = false;
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Action(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx
+)
+{
+ rtems_task_priority priority;
+
+ priority = PRIO_FLEXIBLE;
+ TQSetScheduler( ctx->tq_ctx, THREAD, ctx->scheduler_id, priority );
+
+ TQSend(
+ ctx->tq_ctx,
+ OWNER,
+ TQ_EVENT_MUTEX_A_OBTAIN | TQ_EVENT_ENQUEUE
+ );
+
+ if ( ctx->owner_obtain != 0 ) {
+ TQSend(
+ ctx->tq_ctx,
+ OWNER_OWNER,
+ TQ_EVENT_MUTEX_B_OBTAIN | ctx->owner_obtain
+ );
+ TQSend( ctx->tq_ctx, OWNER, ctx->owner_obtain | ctx->owner_release );
+ }
+
+ PrepareThread( ctx );
+ priority = PrepareQueue( ctx, priority );
+ priority = PrepareOwner( ctx, priority );
+ priority = PrepareOwnerQueue( ctx, priority );
+ PrepareOwnerOwner( ctx, priority );
+
+ TQClearDone( ctx->tq_ctx, THREAD );
+
+ switch ( ctx->wait_state ) {
+ case TQ_WAIT_STATE_BLOCKED:
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ THREAD,
+ TQ_EVENT_ENQUEUE_TIMED
+ );
+ Tick( ctx );
+ GetPriorities( ctx );
+ TQSend( ctx->tq_ctx, OWNER, TQ_EVENT_SURRENDER );
+ break;
+ case TQ_WAIT_STATE_INTEND_TO_BLOCK:
+ T_scheduler_set_event_handler( SchedulerBlock, ctx );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ THREAD,
+ TQ_EVENT_ENQUEUE_TIMED
+ );
+ GetPriorities( ctx );
+ TQSend( ctx->tq_ctx, OWNER, TQ_EVENT_SURRENDER );
+ break;
+ case TQ_WAIT_STATE_READY_AGAIN:
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ THREAD,
+ TQ_EVENT_ENQUEUE_TIMED
+ );
+ T_scheduler_set_event_handler( SchedulerUnblock, ctx );
+ TQSend( ctx->tq_ctx, OWNER, TQ_EVENT_SURRENDER );
+ GetPriorities( ctx );
+ TQSend( ctx->tq_ctx, THREAD, TQ_EVENT_SURRENDER );
+ break;
+ }
+
+ TQWaitForDone( ctx->tq_ctx, THREAD );
+ TQWaitForExecutionStop( ctx->tq_ctx, THREAD );
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_Cleanup(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx
+)
+{
+ if ( ctx->owner_obtain != 0 ) {
+ TQSend(
+ ctx->tq_ctx,
+ OWNER_OWNER,
+ TQ_EVENT_MUTEX_B_RELEASE | ctx->owner_release
+ );
+
+ if ( ctx->owner_queue_helper_release ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ OWNER_QUEUE_HELPER,
+ ctx->owner_release
+ );
+ }
+
+ if ( ctx->owner_owner_helper_release ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ OWNER_OWNER_HELPER,
+ TQ_EVENT_MUTEX_B_RELEASE
+ );
+ }
+ }
+
+ TQSend( ctx->tq_ctx, OWNER, TQ_EVENT_MUTEX_A_RELEASE );
+
+ if ( ctx->queue_helper_surrender ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ QUEUE_HELPER,
+ TQ_EVENT_SURRENDER
+ );
+ }
+
+ if ( ctx->owner_helper_release ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ OWNER_HELPER,
+ TQ_EVENT_MUTEX_A_RELEASE
+ );
+ }
+
+ if ( ctx->other_scheduler ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ THREAD,
+ TQ_EVENT_MUTEX_D_RELEASE
+ );
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ THREAD_HELPER_A,
+ TQ_EVENT_MUTEX_D_RELEASE
+ );
+
+ if ( rtems_scheduler_get_processor_maximum() >= 3 ) {
+ TQSendAndWaitForExecutionStop(
+ ctx->tq_ctx,
+ THREAD_HELPER_B,
+ TQ_EVENT_MUTEX_D_RELEASE
+ );
+ }
+ }
+}
+
+static const ScoreTqReqTimeoutPriorityInherit_Entry
+ScoreTqReqTimeoutPriorityInherit_Entries[] = {
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_Ok,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Nop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Nop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Drop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Drop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_Ok,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Drop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Nop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Nop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Lower },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Lower },
+#endif
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_Ok,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Drop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Drop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#endif
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_Ok,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Drop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Nop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Drop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Nop },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Nop },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Nop },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Drop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Lower },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Drop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Lower },
+#endif
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Lower },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Lower },
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_Ok,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA },
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Drop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Drop },
+#endif
+#if !defined(RTEMS_SMP)
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, ScoreTqReqTimeoutPriorityInherit_Post_Status_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA }
+#else
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Drop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Drop }
+#endif
+};
+
+static const uint8_t
+ScoreTqReqTimeoutPriorityInherit_Map[] = {
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1,
+ 1, 2, 2, 2, 2, 2, 2, 24, 25, 31, 24, 25, 31, 2, 2, 2, 24, 25, 31, 24, 25, 31,
+ 2, 2, 2, 1, 1, 1, 24, 25, 31, 2, 2, 2, 24, 25, 11, 24, 25, 11, 2, 2, 2, 24,
+ 25, 11, 24, 25, 11, 2, 2, 2, 1, 1, 1, 24, 25, 11, 2, 2, 2, 32, 33, 11, 32,
+ 33, 11, 2, 2, 2, 32, 33, 11, 32, 33, 11, 2, 2, 2, 1, 1, 1, 32, 33, 11, 2, 2,
+ 2, 44, 45, 11, 36, 37, 11, 2, 2, 2, 44, 45, 11, 36, 37, 11, 2, 2, 2, 1, 1, 1,
+ 36, 37, 11, 2, 2, 2, 1, 1, 1, 29, 30, 46, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
+ 1, 1, 1, 29, 30, 46, 2, 2, 2, 1, 1, 1, 29, 30, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 1, 1, 1, 29, 30, 11, 2, 2, 2, 1, 1, 1, 38, 39, 11, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 2, 2, 1, 1, 1, 38, 39, 11, 2, 2, 2, 1, 1, 1, 40, 41, 11, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 40, 41, 11, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 24, 25,
+ 31, 24, 25, 31, 2, 2, 2, 24, 25, 31, 24, 25, 31, 2, 2, 2, 1, 1, 1, 24, 25,
+ 31, 2, 2, 2, 24, 25, 11, 24, 25, 11, 2, 2, 2, 24, 25, 11, 24, 25, 11, 2, 2,
+ 2, 1, 1, 1, 24, 25, 11, 2, 2, 2, 32, 33, 11, 32, 33, 11, 2, 2, 2, 32, 33, 11,
+ 32, 33, 11, 2, 2, 2, 1, 1, 1, 32, 33, 11, 2, 2, 2, 44, 45, 11, 36, 37, 11, 2,
+ 2, 2, 44, 45, 11, 36, 37, 11, 2, 2, 2, 1, 1, 1, 36, 37, 11, 2, 2, 2, 1, 1, 1,
+ 29, 30, 46, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 29, 30, 46, 2, 2, 2,
+ 1, 1, 1, 29, 30, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 29, 30, 11,
+ 2, 2, 2, 1, 1, 1, 38, 39, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1,
+ 38, 39, 11, 2, 2, 2, 1, 1, 1, 40, 41, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
+ 1, 1, 1, 40, 41, 11, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 29, 30, 11, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 29, 30, 11, 2, 2, 2, 1, 1, 1, 29,
+ 30, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 29, 30, 11, 2, 2, 2, 1,
+ 1, 1, 38, 39, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 38, 39, 11, 2,
+ 2, 2, 1, 1, 1, 40, 41, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 40,
+ 41, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0,
+ 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0,
+ 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 0, 0, 0, 3, 3, 3, 3, 3, 3, 5, 6, 12, 5, 6, 12, 3, 3, 3, 5, 6, 12, 5, 6,
+ 12, 3, 3, 3, 0, 0, 0, 5, 6, 12, 3, 3, 3, 5, 6, 4, 5, 6, 4, 3, 3, 3, 5, 6, 4,
+ 5, 6, 4, 3, 3, 3, 0, 0, 0, 5, 6, 4, 3, 3, 3, 9, 10, 4, 9, 10, 4, 3, 3, 3, 9,
+ 10, 4, 9, 10, 4, 3, 3, 3, 0, 0, 0, 9, 10, 4, 3, 3, 3, 22, 23, 4, 20, 21, 4,
+ 3, 3, 3, 22, 23, 4, 20, 21, 4, 3, 3, 3, 0, 0, 0, 20, 21, 4, 3, 3, 3, 0, 0, 0,
+ 7, 8, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 7, 8, 26, 3, 3, 3, 0,
+ 0, 0, 7, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 7, 8, 4, 3, 3, 3,
+ 0, 0, 0, 13, 14, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 13, 14, 4,
+ 3, 3, 3, 0, 0, 0, 15, 16, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 15,
+ 16, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0,
+ 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0,
+ 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 0, 0, 0, 3, 3, 3, 3, 3, 3, 5, 6, 12, 5, 6, 12, 3, 3, 3, 5, 6, 12, 5, 6,
+ 12, 3, 3, 3, 0, 0, 0, 5, 6, 12, 3, 3, 3, 5, 6, 4, 5, 6, 4, 3, 3, 3, 5, 6, 4,
+ 5, 6, 4, 3, 3, 3, 0, 0, 0, 5, 6, 4, 3, 3, 3, 9, 10, 4, 9, 10, 4, 3, 3, 3, 9,
+ 10, 4, 9, 10, 4, 3, 3, 3, 0, 0, 0, 9, 10, 4, 3, 3, 3, 22, 23, 4, 20, 21, 4,
+ 3, 3, 3, 22, 23, 4, 20, 21, 4, 3, 3, 3, 0, 0, 0, 20, 21, 4, 3, 3, 3, 0, 0, 0,
+ 7, 8, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 7, 8, 26, 3, 3, 3, 0,
+ 0, 0, 7, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 7, 8, 4, 3, 3, 3,
+ 0, 0, 0, 13, 14, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 13, 14, 4,
+ 3, 3, 3, 0, 0, 0, 15, 16, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 15,
+ 16, 4, 3, 3, 3, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0,
+ 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0,
+ 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3,
+ 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3,
+ 3, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 7, 8, 4, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3, 3, 3, 0, 0, 0, 7, 8, 4, 3, 3, 3, 0, 0, 0, 7, 8, 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 7, 8, 4, 3, 3, 3, 0, 0, 0, 13, 14, 4, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 13, 14, 4, 3, 3, 3, 0, 0, 0, 15, 16, 4,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 15, 16, 4, 17, 18, 19, 17, 18,
+ 19, 17, 18, 19, 17, 18, 19, 17, 18, 19, 17, 18, 19, 17, 18, 19, 0, 0, 0, 17,
+ 18, 19, 17, 18, 4, 17, 18, 4, 17, 18, 4, 17, 18, 4, 17, 18, 4, 17, 18, 4, 17,
+ 18, 4, 0, 0, 0, 17, 18, 4, 27, 28, 4, 27, 28, 4, 27, 28, 4, 27, 28, 4, 27,
+ 28, 4, 27, 28, 4, 27, 28, 4, 0, 0, 0, 27, 28, 4, 47, 48, 4, 42, 43, 4, 34,
+ 35, 4, 42, 43, 4, 42, 43, 4, 34, 35, 4, 34, 35, 4, 0, 0, 0, 34, 35, 4, 5, 6,
+ 12, 5, 6, 12, 5, 6, 12, 5, 6, 12, 5, 6, 12, 5, 6, 12, 5, 6, 12, 0, 0, 0, 5,
+ 6, 12, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 0, 0,
+ 0, 5, 6, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9,
+ 10, 4, 0, 0, 0, 9, 10, 4, 22, 23, 4, 22, 23, 4, 20, 21, 4, 22, 23, 4, 22, 23,
+ 4, 20, 21, 4, 20, 21, 4, 0, 0, 0, 20, 21, 4, 7, 8, 26, 0, 0, 0, 7, 8, 26, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 26, 0, 0, 0, 7, 8, 26, 7, 8, 4, 0, 0, 0, 7, 8,
+ 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 13, 14, 4, 0, 0, 0,
+ 13, 14, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 4, 0, 0, 0, 13, 14, 4, 15, 16,
+ 4, 0, 0, 0, 15, 16, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, 4, 0, 0, 0, 15, 16,
+ 4, 5, 6, 19, 5, 6, 19, 5, 6, 19, 5, 6, 19, 5, 6, 19, 5, 6, 19, 5, 6, 19, 0,
+ 0, 0, 5, 6, 19, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6,
+ 4, 0, 0, 0, 5, 6, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10,
+ 4, 9, 10, 4, 0, 0, 0, 9, 10, 4, 22, 23, 4, 22, 23, 4, 20, 21, 4, 22, 23, 4,
+ 22, 23, 4, 20, 21, 4, 20, 21, 4, 0, 0, 0, 20, 21, 4, 5, 6, 12, 5, 6, 12, 5,
+ 6, 12, 5, 6, 12, 5, 6, 12, 5, 6, 12, 5, 6, 12, 0, 0, 0, 5, 6, 12, 5, 6, 4, 5,
+ 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 0, 0, 0, 5, 6, 4, 9, 10,
+ 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 0, 0, 0, 9,
+ 10, 4, 22, 23, 4, 22, 23, 4, 20, 21, 4, 22, 23, 4, 22, 23, 4, 20, 21, 4, 20,
+ 21, 4, 0, 0, 0, 20, 21, 4, 7, 8, 26, 0, 0, 0, 7, 8, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 7, 8, 26, 0, 0, 0, 7, 8, 26, 7, 8, 4, 0, 0, 0, 7, 8, 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 13, 14, 4, 0, 0, 0, 13, 14, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 13, 14, 4, 0, 0, 0, 13, 14, 4, 15, 16, 4, 0, 0, 0, 15,
+ 16, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, 4, 0, 0, 0, 15, 16, 4, 7, 8, 4, 0,
+ 0, 0, 7, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 7, 8, 4,
+ 0, 0, 0, 7, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 13,
+ 14, 4, 0, 0, 0, 13, 14, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 4, 0, 0, 0, 13,
+ 14, 4, 15, 16, 4, 0, 0, 0, 15, 16, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, 4,
+ 0, 0, 0, 15, 16, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 7, 8, 4, 0, 0, 0, 7, 8, 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 13, 14, 4, 0, 0, 0, 13, 14, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 13, 14, 4, 0, 0, 0, 13, 14, 4, 15, 16, 4, 0, 0, 0, 15,
+ 16, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, 4, 0, 0, 0, 15, 16, 4, 17, 18, 19,
+ 17, 18, 19, 17, 18, 19, 17, 18, 19, 17, 18, 19, 17, 18, 19, 17, 18, 19, 0, 0,
+ 0, 17, 18, 19, 17, 18, 4, 17, 18, 4, 17, 18, 4, 17, 18, 4, 17, 18, 4, 17, 18,
+ 4, 17, 18, 4, 0, 0, 0, 17, 18, 4, 27, 28, 4, 27, 28, 4, 27, 28, 4, 27, 28, 4,
+ 27, 28, 4, 27, 28, 4, 27, 28, 4, 0, 0, 0, 27, 28, 4, 47, 48, 4, 42, 43, 4,
+ 34, 35, 4, 42, 43, 4, 42, 43, 4, 34, 35, 4, 34, 35, 4, 0, 0, 0, 34, 35, 4, 5,
+ 6, 12, 5, 6, 12, 5, 6, 12, 5, 6, 12, 5, 6, 12, 5, 6, 12, 5, 6, 12, 0, 0, 0,
+ 5, 6, 12, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 0,
+ 0, 0, 5, 6, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9,
+ 10, 4, 0, 0, 0, 9, 10, 4, 22, 23, 4, 22, 23, 4, 20, 21, 4, 22, 23, 4, 22, 23,
+ 4, 20, 21, 4, 20, 21, 4, 0, 0, 0, 20, 21, 4, 7, 8, 26, 0, 0, 0, 7, 8, 26, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 26, 0, 0, 0, 7, 8, 26, 7, 8, 4, 0, 0, 0, 7, 8,
+ 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 13, 14, 4, 0, 0, 0,
+ 13, 14, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 4, 0, 0, 0, 13, 14, 4, 15, 16,
+ 4, 0, 0, 0, 15, 16, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, 4, 0, 0, 0, 15, 16,
+ 4, 5, 6, 19, 5, 6, 19, 5, 6, 19, 5, 6, 19, 5, 6, 19, 5, 6, 19, 5, 6, 19, 0,
+ 0, 0, 5, 6, 19, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6,
+ 4, 0, 0, 0, 5, 6, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10,
+ 4, 9, 10, 4, 0, 0, 0, 9, 10, 4, 22, 23, 4, 22, 23, 4, 20, 21, 4, 22, 23, 4,
+ 22, 23, 4, 20, 21, 4, 20, 21, 4, 0, 0, 0, 20, 21, 4, 5, 6, 12, 5, 6, 12, 5,
+ 6, 12, 5, 6, 12, 5, 6, 12, 5, 6, 12, 5, 6, 12, 0, 0, 0, 5, 6, 12, 5, 6, 4, 5,
+ 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 0, 0, 0, 5, 6, 4, 9, 10,
+ 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 9, 10, 4, 0, 0, 0, 9,
+ 10, 4, 22, 23, 4, 22, 23, 4, 20, 21, 4, 22, 23, 4, 22, 23, 4, 20, 21, 4, 20,
+ 21, 4, 0, 0, 0, 20, 21, 4, 7, 8, 26, 0, 0, 0, 7, 8, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 7, 8, 26, 0, 0, 0, 7, 8, 26, 7, 8, 4, 0, 0, 0, 7, 8, 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 13, 14, 4, 0, 0, 0, 13, 14, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 13, 14, 4, 0, 0, 0, 13, 14, 4, 15, 16, 4, 0, 0, 0, 15,
+ 16, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, 4, 0, 0, 0, 15, 16, 4, 7, 8, 4, 0,
+ 0, 0, 7, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 7, 8, 4,
+ 0, 0, 0, 7, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 13,
+ 14, 4, 0, 0, 0, 13, 14, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 4, 0, 0, 0, 13,
+ 14, 4, 15, 16, 4, 0, 0, 0, 15, 16, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, 4,
+ 0, 0, 0, 15, 16, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 7, 8, 4, 0, 0, 0, 7, 8, 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 7, 8, 4, 0, 0, 0, 7, 8, 4, 13, 14, 4, 0, 0, 0, 13, 14, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 13, 14, 4, 0, 0, 0, 13, 14, 4, 15, 16, 4, 0, 0, 0, 15,
+ 16, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, 4, 0, 0, 0, 15, 16, 4
+};
+
+static size_t ScoreTqReqTimeoutPriorityInherit_Scope(
+ void *arg,
+ char *buf,
+ size_t n
+)
+{
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope(
+ ScoreTqReqTimeoutPriorityInherit_PreDesc,
+ buf,
+ n,
+ ctx->Map.pcs
+ );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqTimeoutPriorityInherit_Fixture = {
+ .setup = ScoreTqReqTimeoutPriorityInherit_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqTimeoutPriorityInherit_Teardown_Wrap,
+ .scope = ScoreTqReqTimeoutPriorityInherit_Scope,
+ .initial_context = &ScoreTqReqTimeoutPriorityInherit_Instance
+};
+
+static inline ScoreTqReqTimeoutPriorityInherit_Entry
+ScoreTqReqTimeoutPriorityInherit_PopEntry(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreTqReqTimeoutPriorityInherit_Entries[
+ ScoreTqReqTimeoutPriorityInherit_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_SetPreConditionStates(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx
+)
+{
+ ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
+ ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
+ ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
+ ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
+ ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
+
+ if ( ctx->Map.entry.Pre_OwnerQueue_NA ) {
+ ctx->Map.pcs[ 5 ] = ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue_NA;
+ } else {
+ ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
+ }
+
+ if ( ctx->Map.entry.Pre_OwnerOwnerPriority_NA ) {
+ ctx->Map.pcs[ 6 ] = ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority_NA;
+ } else {
+ ctx->Map.pcs[ 6 ] = ctx->Map.pci[ 6 ];
+ }
+
+ ctx->Map.pcs[ 7 ] = ctx->Map.pci[ 7 ];
+}
+
+static void ScoreTqReqTimeoutPriorityInherit_TestVariant(
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx
+)
+{
+ ScoreTqReqTimeoutPriorityInherit_Pre_HomeScheduler_Prepare(
+ ctx,
+ ctx->Map.pcs[ 0 ]
+ );
+ ScoreTqReqTimeoutPriorityInherit_Pre_EligibleScheduler_Prepare(
+ ctx,
+ ctx->Map.pcs[ 1 ]
+ );
+ ScoreTqReqTimeoutPriorityInherit_Pre_Queue_Prepare( ctx, ctx->Map.pcs[ 2 ] );
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority_Prepare(
+ ctx,
+ ctx->Map.pcs[ 3 ]
+ );
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_Prepare(
+ ctx,
+ ctx->Map.pcs[ 4 ]
+ );
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue_Prepare(
+ ctx,
+ ctx->Map.pcs[ 5 ]
+ );
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority_Prepare(
+ ctx,
+ ctx->Map.pcs[ 6 ]
+ );
+ ScoreTqReqTimeoutPriorityInherit_Pre_WaitState_Prepare(
+ ctx,
+ ctx->Map.pcs[ 7 ]
+ );
+ ScoreTqReqTimeoutPriorityInherit_Action( ctx );
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Check(
+ ctx,
+ ctx->Map.entry.Post_Status
+ );
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Check(
+ ctx,
+ ctx->Map.entry.Post_Unblock
+ );
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Check(
+ ctx,
+ ctx->Map.entry.Post_OwnerPriority
+ );
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Check(
+ ctx,
+ ctx->Map.entry.Post_OwnerOwnerPriority
+ );
+}
+
+static T_fixture_node ScoreTqReqTimeoutPriorityInherit_Node;
+
+static T_remark ScoreTqReqTimeoutPriorityInherit_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqTimeoutPriorityInherit"
+};
+
+void ScoreTqReqTimeoutPriorityInherit_Run( TQContext *tq_ctx )
+{
+ ScoreTqReqTimeoutPriorityInherit_Context *ctx;
+
+ ctx = &ScoreTqReqTimeoutPriorityInherit_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture(
+ &ScoreTqReqTimeoutPriorityInherit_Node,
+ &ScoreTqReqTimeoutPriorityInherit_Fixture
+ );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pci[ 0 ] = ScoreTqReqTimeoutPriorityInherit_Pre_HomeScheduler_Home;
+ ctx->Map.pci[ 0 ] < ScoreTqReqTimeoutPriorityInherit_Pre_HomeScheduler_NA;
+ ++ctx->Map.pci[ 0 ]
+ ) {
+ for (
+ ctx->Map.pci[ 1 ] = ScoreTqReqTimeoutPriorityInherit_Pre_EligibleScheduler_One;
+ ctx->Map.pci[ 1 ] < ScoreTqReqTimeoutPriorityInherit_Pre_EligibleScheduler_NA;
+ ++ctx->Map.pci[ 1 ]
+ ) {
+ for (
+ ctx->Map.pci[ 2 ] = ScoreTqReqTimeoutPriorityInherit_Pre_Queue_Only;
+ ctx->Map.pci[ 2 ] < ScoreTqReqTimeoutPriorityInherit_Pre_Queue_NA;
+ ++ctx->Map.pci[ 2 ]
+ ) {
+ for (
+ ctx->Map.pci[ 3 ] = ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority_Only;
+ ctx->Map.pci[ 3 ] < ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority_NA;
+ ++ctx->Map.pci[ 3 ]
+ ) {
+ for (
+ ctx->Map.pci[ 4 ] = ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_NotEnqueued;
+ ctx->Map.pci[ 4 ] < ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_NA;
+ ++ctx->Map.pci[ 4 ]
+ ) {
+ for (
+ ctx->Map.pci[ 5 ] = ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue_Only;
+ ctx->Map.pci[ 5 ] < ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue_NA;
+ ++ctx->Map.pci[ 5 ]
+ ) {
+ for (
+ ctx->Map.pci[ 6 ] = ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority_Only;
+ ctx->Map.pci[ 6 ] < ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority_NA;
+ ++ctx->Map.pci[ 6 ]
+ ) {
+ for (
+ ctx->Map.pci[ 7 ] = ScoreTqReqTimeoutPriorityInherit_Pre_WaitState_Blocked;
+ ctx->Map.pci[ 7 ] < ScoreTqReqTimeoutPriorityInherit_Pre_WaitState_NA;
+ ++ctx->Map.pci[ 7 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqTimeoutPriorityInherit_PopEntry(
+ ctx
+ );
+
+ if ( ctx->Map.entry.Skip ) {
+ continue;
+ }
+
+ ScoreTqReqTimeoutPriorityInherit_SetPreConditionStates(
+ ctx
+ );
+ ScoreTqReqTimeoutPriorityInherit_Prepare( ctx );
+ ScoreTqReqTimeoutPriorityInherit_TestVariant( ctx );
+ ScoreTqReqTimeoutPriorityInherit_Cleanup( ctx );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ T_add_remark( &ScoreTqReqTimeoutPriorityInherit_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-timeout-priority-inherit.h b/testsuites/validation/tr-tq-timeout-priority-inherit.h
new file mode 100644
index 0000000000..149ca69755
--- /dev/null
+++ b/testsuites/validation/tr-tq-timeout-priority-inherit.h
@@ -0,0 +1,160 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqTimeoutPriorityInherit
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_TIMEOUT_PRIORITY_INHERIT_H
+#define _TR_TQ_TIMEOUT_PRIORITY_INHERIT_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqTimeoutPriorityInherit
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqTimeoutPriorityInherit_Pre_HomeScheduler_Home,
+ ScoreTqReqTimeoutPriorityInherit_Pre_HomeScheduler_Helping,
+ ScoreTqReqTimeoutPriorityInherit_Pre_HomeScheduler_NA
+} ScoreTqReqTimeoutPriorityInherit_Pre_HomeScheduler;
+
+typedef enum {
+ ScoreTqReqTimeoutPriorityInherit_Pre_EligibleScheduler_One,
+ ScoreTqReqTimeoutPriorityInherit_Pre_EligibleScheduler_More,
+ ScoreTqReqTimeoutPriorityInherit_Pre_EligibleScheduler_NA
+} ScoreTqReqTimeoutPriorityInherit_Pre_EligibleScheduler;
+
+typedef enum {
+ ScoreTqReqTimeoutPriorityInherit_Pre_Queue_Only,
+ ScoreTqReqTimeoutPriorityInherit_Pre_Queue_Vital,
+ ScoreTqReqTimeoutPriorityInherit_Pre_Queue_Dispensable,
+ ScoreTqReqTimeoutPriorityInherit_Pre_Queue_NA
+} ScoreTqReqTimeoutPriorityInherit_Pre_Queue;
+
+typedef enum {
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority_Only,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority_Vital,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority_Dispensable,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority_NA
+} ScoreTqReqTimeoutPriorityInherit_Pre_OwnerPriority;
+
+typedef enum {
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_NotEnqueued,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_FIFO,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_Priority,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_PriorityInherit,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState_NA
+} ScoreTqReqTimeoutPriorityInherit_Pre_OwnerState;
+
+typedef enum {
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue_Only,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue_Vital,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue_Dispensable,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue_NA
+} ScoreTqReqTimeoutPriorityInherit_Pre_OwnerQueue;
+
+typedef enum {
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority_Only,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority_Vital,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority_Dispensable,
+ ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority_NA
+} ScoreTqReqTimeoutPriorityInherit_Pre_OwnerOwnerPriority;
+
+typedef enum {
+ ScoreTqReqTimeoutPriorityInherit_Pre_WaitState_Blocked,
+ ScoreTqReqTimeoutPriorityInherit_Pre_WaitState_IntendToBlock,
+ ScoreTqReqTimeoutPriorityInherit_Pre_WaitState_ReadyAgain,
+ ScoreTqReqTimeoutPriorityInherit_Pre_WaitState_NA
+} ScoreTqReqTimeoutPriorityInherit_Pre_WaitState;
+
+typedef enum {
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Ok,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_Timeout,
+ ScoreTqReqTimeoutPriorityInherit_Post_Status_NA
+} ScoreTqReqTimeoutPriorityInherit_Post_Status;
+
+typedef enum {
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_Yes,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_No,
+ ScoreTqReqTimeoutPriorityInherit_Post_Unblock_NA
+} ScoreTqReqTimeoutPriorityInherit_Post_Unblock;
+
+typedef enum {
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_Drop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority_NA
+} ScoreTqReqTimeoutPriorityInherit_Post_OwnerPriority;
+
+typedef enum {
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Nop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Lower,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_Drop,
+ ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority_NA
+} ScoreTqReqTimeoutPriorityInherit_Post_OwnerOwnerPriority;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue test context.
+ */
+void ScoreTqReqTimeoutPriorityInherit_Run( TQContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_TIMEOUT_PRIORITY_INHERIT_H */
diff --git a/testsuites/validation/tr-tq-timeout.c b/testsuites/validation/tr-tq-timeout.c
new file mode 100644
index 0000000000..c9bc13a937
--- /dev/null
+++ b/testsuites/validation/tr-tq-timeout.c
@@ -0,0 +1,459 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqTimeout
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/threadimpl.h>
+
+#include "tr-tq-timeout.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup ScoreTqReqTimeout spec:/score/tq/req/timeout
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ *
+ * @{
+ */
+
+typedef struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_WaitState_NA : 1;
+ uint8_t Post_Status : 2;
+ uint8_t Post_Unblock : 2;
+} ScoreTqReqTimeout_Entry;
+
+/**
+ * @brief Test context for spec:/score/tq/req/timeout test case.
+ */
+typedef struct {
+ /**
+ * @brief This member contains the call within ISR request.
+ */
+ CallWithinISRRequest request;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * ScoreTqReqTimeout_Run() parameter.
+ */
+ TQContext *tq_ctx;
+
+ struct {
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief If this member is true, then the test action loop is executed.
+ */
+ bool in_action_loop;
+
+ /**
+ * @brief This member contains the next transition map index.
+ */
+ size_t index;
+
+ /**
+ * @brief This member contains the current transition map entry.
+ */
+ ScoreTqReqTimeout_Entry entry;
+
+ /**
+ * @brief If this member is true, then the current transition variant
+ * should be skipped.
+ */
+ bool skip;
+ } Map;
+} ScoreTqReqTimeout_Context;
+
+static ScoreTqReqTimeout_Context
+ ScoreTqReqTimeout_Instance;
+
+static const char * const ScoreTqReqTimeout_PreDesc_WaitState[] = {
+ "Blocked",
+ "IntendToBlock",
+ "ReadyAgain",
+ "NA"
+};
+
+static const char * const * const ScoreTqReqTimeout_PreDesc[] = {
+ ScoreTqReqTimeout_PreDesc_WaitState,
+ NULL
+};
+
+typedef ScoreTqReqTimeout_Context Context;
+
+static const rtems_tcb *GetUnblock( Context *ctx, size_t *index )
+{
+ return TQGetNextUnblock( ctx->tq_ctx, index )->thread;
+}
+
+static const rtems_tcb *GetTCB( Context *ctx, TQWorkerKind worker )
+{
+ return ctx->tq_ctx->worker_tcb[ worker ];
+}
+
+static void Tick( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ FinalClockTick();
+ TQSchedulerRecordStop( ctx->tq_ctx );
+}
+
+static void SchedulerBlock(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_BEFORE &&
+ event->operation == T_SCHEDULER_BLOCK
+ ) {
+ T_scheduler_set_event_handler( NULL, NULL );
+ ctx->request.handler = Tick;
+ CallWithinISRSubmit( &ctx->request );
+ }
+}
+
+static void ThreadTimeout( void *arg )
+{
+ Context *ctx;
+
+ ctx = arg;
+ TQSchedulerRecordStart( ctx->tq_ctx );
+ _Thread_Timeout(
+ &ctx->tq_ctx->worker_tcb[ TQ_BLOCKER_A ]->Timer.Watchdog
+ );
+ TQSchedulerRecordStop( ctx->tq_ctx );
+}
+
+static void SchedulerUnblock(
+ void *arg,
+ const T_scheduler_event *event,
+ T_scheduler_when when
+)
+{
+ Context *ctx;
+
+ ctx = arg;
+
+ if (
+ when == T_SCHEDULER_BEFORE &&
+ event->operation == T_SCHEDULER_UNBLOCK
+ ) {
+ T_scheduler_set_event_handler( NULL, NULL );
+ ctx->request.handler = ThreadTimeout;
+ CallWithinISRSubmit( &ctx->request );
+ }
+}
+
+static void ScoreTqReqTimeout_Pre_WaitState_Prepare(
+ ScoreTqReqTimeout_Context *ctx,
+ ScoreTqReqTimeout_Pre_WaitState state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeout_Pre_WaitState_Blocked: {
+ /*
+ * While the thread of the timeout operation is in the blocked wait
+ * state.
+ */
+ TQEnqueuePrepare( ctx->tq_ctx );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE );
+ Yield();
+ Tick( ctx );
+ TQEnqueueDone( ctx->tq_ctx );
+ break;
+ }
+
+ case ScoreTqReqTimeout_Pre_WaitState_IntendToBlock: {
+ /*
+ * While the thread of the timeout operation is in the intend to block
+ * wait state.
+ */
+ TQEnqueuePrepare( ctx->tq_ctx );
+ T_scheduler_set_event_handler( SchedulerBlock, ctx );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE );
+ Yield();
+ TQEnqueueDone( ctx->tq_ctx );
+ break;
+ }
+
+ case ScoreTqReqTimeout_Pre_WaitState_ReadyAgain: {
+ /*
+ * While the thread of the timeout operation is in the ready again wait
+ * state.
+ */
+ TQEnqueuePrepare( ctx->tq_ctx );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_ENQUEUE );
+ Yield();
+ T_scheduler_set_event_handler( SchedulerUnblock, ctx );
+ TQEnqueueDone( ctx->tq_ctx );
+ TQSend( ctx->tq_ctx, TQ_BLOCKER_A, TQ_EVENT_SURRENDER );
+ break;
+ }
+
+ case ScoreTqReqTimeout_Pre_WaitState_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeout_Post_Status_Check(
+ ScoreTqReqTimeout_Context *ctx,
+ ScoreTqReqTimeout_Post_Status state
+)
+{
+ switch ( state ) {
+ case ScoreTqReqTimeout_Post_Status_Ok: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_SUCCESSFUL.
+ */
+ T_eq_int(
+ ctx->tq_ctx->status[ TQ_BLOCKER_A ],
+ TQConvertStatus( ctx->tq_ctx, STATUS_SUCCESSFUL )
+ );
+ break;
+ }
+
+ case ScoreTqReqTimeout_Post_Status_Timeout: {
+ /*
+ * The return status of the directive call shall be derived from
+ * STATUS_TIMEOUT.
+ */
+ T_eq_int(
+ ctx->tq_ctx->status[ TQ_BLOCKER_A ],
+ TQConvertStatus( ctx->tq_ctx, STATUS_TIMEOUT )
+ );
+ break;
+ }
+
+ case ScoreTqReqTimeout_Post_Status_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeout_Post_Unblock_Check(
+ ScoreTqReqTimeout_Context *ctx,
+ ScoreTqReqTimeout_Post_Unblock state
+)
+{
+ size_t i;
+
+ i = 0;
+
+ switch ( state ) {
+ case ScoreTqReqTimeout_Post_Unblock_Yes: {
+ /*
+ * The thread of the timeout operation shall be unblocked by the timeout
+ * operation.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), GetTCB( ctx, TQ_BLOCKER_A ) );
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqTimeout_Post_Unblock_No: {
+ /*
+ * The thread of the timeout operation shall not be unblocked by the
+ * timeout operation.
+ */
+ T_eq_ptr( GetUnblock( ctx, &i ), NULL );
+ break;
+ }
+
+ case ScoreTqReqTimeout_Post_Unblock_NA:
+ break;
+ }
+}
+
+static void ScoreTqReqTimeout_Setup( ScoreTqReqTimeout_Context *ctx )
+{
+ ctx->request.arg = ctx;
+ TQReset( ctx->tq_ctx );
+
+ if ( ctx->tq_ctx->enqueue_variant == TQ_ENQUEUE_STICKY ) {
+ TQSetScheduler( ctx->tq_ctx, TQ_BLOCKER_A, SCHEDULER_B_ID, PRIO_NORMAL );
+ } else {
+ TQSetPriority( ctx->tq_ctx, TQ_BLOCKER_A, PRIO_HIGH );
+ }
+}
+
+static void ScoreTqReqTimeout_Setup_Wrap( void *arg )
+{
+ ScoreTqReqTimeout_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqTimeout_Setup( ctx );
+}
+
+static void ScoreTqReqTimeout_Teardown( ScoreTqReqTimeout_Context *ctx )
+{
+ TQReset( ctx->tq_ctx );
+}
+
+static void ScoreTqReqTimeout_Teardown_Wrap( void *arg )
+{
+ ScoreTqReqTimeout_Context *ctx;
+
+ ctx = arg;
+ ctx->Map.in_action_loop = false;
+ ScoreTqReqTimeout_Teardown( ctx );
+}
+
+static void ScoreTqReqTimeout_Action( ScoreTqReqTimeout_Context *ctx )
+{
+ /*
+ * The action is performed by the ``WaitState`` pre-condition preparation.
+ */
+}
+
+static const ScoreTqReqTimeout_Entry
+ScoreTqReqTimeout_Entries[] = {
+ { 0, 0, ScoreTqReqTimeout_Post_Status_Timeout,
+ ScoreTqReqTimeout_Post_Unblock_Yes },
+ { 0, 0, ScoreTqReqTimeout_Post_Status_Timeout,
+ ScoreTqReqTimeout_Post_Unblock_No },
+ { 0, 0, ScoreTqReqTimeout_Post_Status_Ok, ScoreTqReqTimeout_Post_Unblock_No }
+};
+
+static const uint8_t
+ScoreTqReqTimeout_Map[] = {
+ 0, 1, 2
+};
+
+static size_t ScoreTqReqTimeout_Scope( void *arg, char *buf, size_t n )
+{
+ ScoreTqReqTimeout_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->Map.in_action_loop ) {
+ return T_get_scope( ScoreTqReqTimeout_PreDesc, buf, n, ctx->Map.pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture ScoreTqReqTimeout_Fixture = {
+ .setup = ScoreTqReqTimeout_Setup_Wrap,
+ .stop = NULL,
+ .teardown = ScoreTqReqTimeout_Teardown_Wrap,
+ .scope = ScoreTqReqTimeout_Scope,
+ .initial_context = &ScoreTqReqTimeout_Instance
+};
+
+static inline ScoreTqReqTimeout_Entry ScoreTqReqTimeout_PopEntry(
+ ScoreTqReqTimeout_Context *ctx
+)
+{
+ size_t index;
+
+ index = ctx->Map.index;
+ ctx->Map.index = index + 1;
+ return ScoreTqReqTimeout_Entries[
+ ScoreTqReqTimeout_Map[ index ]
+ ];
+}
+
+static void ScoreTqReqTimeout_TestVariant( ScoreTqReqTimeout_Context *ctx )
+{
+ ScoreTqReqTimeout_Pre_WaitState_Prepare( ctx, ctx->Map.pcs[ 0 ] );
+ ScoreTqReqTimeout_Action( ctx );
+ ScoreTqReqTimeout_Post_Status_Check( ctx, ctx->Map.entry.Post_Status );
+ ScoreTqReqTimeout_Post_Unblock_Check( ctx, ctx->Map.entry.Post_Unblock );
+}
+
+static T_fixture_node ScoreTqReqTimeout_Node;
+
+static T_remark ScoreTqReqTimeout_Remark = {
+ .next = NULL,
+ .remark = "ScoreTqReqTimeout"
+};
+
+void ScoreTqReqTimeout_Run( TQContext *tq_ctx )
+{
+ ScoreTqReqTimeout_Context *ctx;
+
+ ctx = &ScoreTqReqTimeout_Instance;
+ ctx->tq_ctx = tq_ctx;
+
+ ctx = T_push_fixture( &ScoreTqReqTimeout_Node, &ScoreTqReqTimeout_Fixture );
+ ctx->Map.in_action_loop = true;
+ ctx->Map.index = 0;
+
+ for (
+ ctx->Map.pcs[ 0 ] = ScoreTqReqTimeout_Pre_WaitState_Blocked;
+ ctx->Map.pcs[ 0 ] < ScoreTqReqTimeout_Pre_WaitState_NA;
+ ++ctx->Map.pcs[ 0 ]
+ ) {
+ ctx->Map.entry = ScoreTqReqTimeout_PopEntry( ctx );
+ ScoreTqReqTimeout_TestVariant( ctx );
+ }
+
+ T_add_remark( &ScoreTqReqTimeout_Remark );
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-tq-timeout.h b/testsuites/validation/tr-tq-timeout.h
new file mode 100644
index 0000000000..825ba798ea
--- /dev/null
+++ b/testsuites/validation/tr-tq-timeout.h
@@ -0,0 +1,98 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup ScoreTqReqTimeout
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifndef _TR_TQ_TIMEOUT_H
+#define _TR_TQ_TIMEOUT_H
+
+#include "tx-thread-queue.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreTqReqTimeout
+ *
+ * @{
+ */
+
+typedef enum {
+ ScoreTqReqTimeout_Pre_WaitState_Blocked,
+ ScoreTqReqTimeout_Pre_WaitState_IntendToBlock,
+ ScoreTqReqTimeout_Pre_WaitState_ReadyAgain,
+ ScoreTqReqTimeout_Pre_WaitState_NA
+} ScoreTqReqTimeout_Pre_WaitState;
+
+typedef enum {
+ ScoreTqReqTimeout_Post_Status_Ok,
+ ScoreTqReqTimeout_Post_Status_Timeout,
+ ScoreTqReqTimeout_Post_Status_NA
+} ScoreTqReqTimeout_Post_Status;
+
+typedef enum {
+ ScoreTqReqTimeout_Post_Unblock_Yes,
+ ScoreTqReqTimeout_Post_Unblock_No,
+ ScoreTqReqTimeout_Post_Unblock_NA
+} ScoreTqReqTimeout_Post_Unblock;
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param[in,out] tq_ctx is the thread queue test context.
+ */
+void ScoreTqReqTimeout_Run( TQContext *tq_ctx );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_TQ_TIMEOUT_H */
diff --git a/testsuites/validation/ts-acfg.h b/testsuites/validation/ts-acfg.h
new file mode 100644
index 0000000000..60d1833857
--- /dev/null
+++ b/testsuites/validation/ts-acfg.h
@@ -0,0 +1,83 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This header file provides a validation test suite runner for
+ * validation test cases specific to the application configuration.
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#include <rtems.h>
+#include <rtems/bspIo.h>
+#include <rtems/test.h>
+#include <rtems/test-info.h>
+#include <rtems/testopts.h>
+
+static char buffer[ 512 ];
+
+static const T_action actions[] = {
+ T_report_hash_sha256
+};
+
+static const T_config test_config = {
+ .name = rtems_test_name,
+ .buf = buffer,
+ .buf_size = sizeof( buffer ),
+ .putchar = rtems_put_char,
+ .verbosity = RTEMS_TEST_VERBOSITY,
+ .now = T_now_tick,
+ .allocate = T_memory_allocate,
+ .deallocate = T_memory_deallocate,
+ .action_count = T_ARRAY_SIZE( actions ),
+ .actions = actions
+};
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0
+
+#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
+
+#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
+
+RTEMS_NO_RETURN static void RunTestSuite( void )
+{
+ int exit_code;
+
+ rtems_test_begin( rtems_test_name, TEST_STATE );
+ T_register();
+ exit_code = T_main( &test_config );
+
+ if ( exit_code == 0 ) {
+ rtems_test_end( rtems_test_name );
+ }
+
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, (uint32_t) exit_code );
+}
diff --git a/testsuites/validation/ts-config.h b/testsuites/validation/ts-config.h
new file mode 100644
index 0000000000..f5f46738f0
--- /dev/null
+++ b/testsuites/validation/ts-config.h
@@ -0,0 +1,126 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This header file provides the constants used by the test suite
+ * configuration.
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifndef _TS_CONFIG_H
+#define _TS_CONFIG_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup RTEMSTestSuitesValidation
+ *
+ * @{
+ */
+
+#define TEST_MICROSECONDS_PER_TICK 1000
+
+#define TEST_RUNNER_NAME rtems_build_name( 'R', 'U', 'N', ' ' )
+
+#define TEST_RUNNER_ARGUMENT 123456789
+
+#define TEST_RUNNER_INITIAL_MODES RTEMS_NO_ASR
+
+#define TEST_SCHEDULER_A_NAME rtems_build_name( 'A', ' ', ' ', ' ' )
+
+#define TEST_SCHEDULER_B_NAME rtems_build_name( 'B', ' ', ' ', ' ' )
+
+#define TEST_SCHEDULER_C_NAME rtems_build_name( 'C', ' ', ' ', ' ' )
+
+#define TEST_SCHEDULER_D_NAME rtems_build_name( 'D', ' ', ' ', ' ' )
+
+#if defined( __OPTIMIZE__ ) && !defined( RTEMS_GCOV_COVERAGE )
+#define TEST_BASE_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE
+#else
+#define TEST_BASE_STACK_SIZE ( 4 * RTEMS_MINIMUM_STACK_SIZE )
+#endif
+
+#define TEST_MAXIMUM_TLS_SIZE \
+ RTEMS_ALIGN_UP( 64, RTEMS_TASK_STORAGE_ALIGNMENT )
+
+#define TEST_MINIMUM_STACK_SIZE \
+ ( TEST_BASE_STACK_SIZE + CPU_STACK_ALIGNMENT )
+
+#define TEST_IDLE_STACK_SIZE \
+ ( TEST_BASE_STACK_SIZE + 2 * CPU_STACK_ALIGNMENT )
+
+#define TEST_INTERRUPT_STACK_SIZE \
+ ( TEST_BASE_STACK_SIZE + 4 * CPU_INTERRUPT_STACK_ALIGNMENT )
+
+#define TEST_MAXIMUM_BARRIERS 7
+
+#define TEST_MAXIMUM_MESSAGE_QUEUES 3
+
+#define TEST_MAXIMUM_PARTITIONS 4
+
+#define TEST_MAXIMUM_PERIODS 2
+
+#define TEST_MAXIMUM_SEMAPHORES 7
+
+#define TEST_MAXIMUM_TASKS 32
+
+#define TEST_MAXIMUM_TIMERS 10
+
+#define TEST_MAXIMUM_USER_EXTENSIONS 5
+
+/*
+ * Use at least two so that the CPU time budget decrement in
+ * _Scheduler_default_Tick() does not always result in a zero.
+ */
+#define TEST_TICKS_PER_TIMESLICE 2
+
+void *test_task_stack_allocate( size_t size );
+
+void test_task_stack_deallocate( void *stack );
+
+void *test_idle_task_stack_allocate( uint32_t cpu_index, size_t *size );
+
+extern rtems_task_argument test_runner_argument;
+
+extern rtems_task_priority test_runner_initial_priority;
+
+extern rtems_mode test_runner_initial_modes;
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TS_CONFIG_H */
diff --git a/testsuites/validation/ts-default.h b/testsuites/validation/ts-default.h
index addf1866f5..86c0b4e345 100644
--- a/testsuites/validation/ts-default.h
+++ b/testsuites/validation/ts-default.h
@@ -3,12 +3,14 @@
/**
* @file
*
+ * @ingroup RTEMSTestSuitesValidation
+ *
* @brief This header file provides the default validation test suite runner
* and application configuration.
*/
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,23 +34,29 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <rtems.h>
+#include <bsp.h>
#include <rtems/bspIo.h>
#include <rtems/chain.h>
#include <rtems/test-info.h>
#include <rtems/testopts.h>
#include <rtems/test.h>
+#include <rtems/test-scheduler.h>
+
+#include "ts-config.h"
+#include "tx-support.h"
-#define MAX_TLS_SIZE RTEMS_ALIGN_UP( 64, RTEMS_TASK_STORAGE_ALIGNMENT )
+#if !defined( MAX_TLS_SIZE )
+#define MAX_TLS_SIZE TEST_MAXIMUM_TLS_SIZE
+#endif
-#define MAX_TASKS 32
+#define MAX_TASKS ( TEST_MAXIMUM_TASKS - 1 )
#define TASK_ATTRIBUTES RTEMS_FLOATING_POINT
#define TASK_STORAGE_SIZE \
RTEMS_TASK_STORAGE_SIZE( \
- MAX_TLS_SIZE + RTEMS_MINIMUM_STACK_SIZE + \
+ MAX_TLS_SIZE + TEST_MINIMUM_STACK_SIZE + \
CPU_STACK_ALIGNMENT - CPU_HEAP_ALIGNMENT, \
TASK_ATTRIBUTES \
)
@@ -75,7 +83,11 @@ static const T_config test_config = {
.buf_size = sizeof( buffer ),
.putchar = rtems_put_char,
.verbosity = RTEMS_TEST_VERBOSITY,
+#if defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER)
.now = T_now_clock,
+#else
+ .now = T_now_tick,
+#endif
.allocate = T_memory_allocate,
.deallocate = T_memory_deallocate,
.action_count = T_ARRAY_SIZE( actions ),
@@ -91,11 +103,29 @@ static union {
rtems_chain_node node;
} task_storage[ MAX_TASKS ];
-static void Init( rtems_task_argument arg )
+rtems_task_argument test_runner_argument;
+
+rtems_task_priority test_runner_initial_priority;
+
+rtems_mode test_runner_initial_modes;
+
+static void Runner( rtems_task_argument arg )
{
int exit_code;
- (void) arg;
+ test_runner_argument = arg;
+
+ (void) rtems_task_mode(
+ RTEMS_ASR,
+ RTEMS_ASR_MASK,
+ &test_runner_initial_modes
+ );
+
+ (void) rtems_task_set_priority(
+ RTEMS_SELF,
+ PRIO_DEFAULT,
+ &test_runner_initial_priority
+ );
rtems_chain_initialize(
&free_task_storage,
@@ -115,16 +145,18 @@ static void Init( rtems_task_argument arg )
rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, (uint32_t) exit_code );
}
-static void *task_stack_allocate( size_t size )
+void *test_task_stack_allocate( size_t size )
{
if ( size > sizeof( task_storage[ 0 ] ) ) {
return NULL;
}
+ T_quiet_ge_sz( size, TEST_MINIMUM_STACK_SIZE );
+
return rtems_chain_get_unprotected( &free_task_storage );
}
-static void task_stack_deallocate( void *stack )
+void test_task_stack_deallocate( void *stack )
{
rtems_chain_append_unprotected(
&free_task_storage,
@@ -132,28 +164,36 @@ static void task_stack_deallocate( void *stack )
);
}
+#if !defined( CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER )
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#endif
-#define CONFIGURE_MAXIMUM_BARRIERS 3
+#define CONFIGURE_MINIMUM_TASK_STACK_SIZE TEST_MINIMUM_STACK_SIZE
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 3
+#define CONFIGURE_INTERRUPT_STACK_SIZE TEST_INTERRUPT_STACK_SIZE
-#define CONFIGURE_MAXIMUM_PARTITIONS 3
+#define CONFIGURE_MAXIMUM_BARRIERS TEST_MAXIMUM_BARRIERS
-#define CONFIGURE_MAXIMUM_PERIODS 3
+#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES TEST_MAXIMUM_MESSAGE_QUEUES
-#define CONFIGURE_MAXIMUM_SEMAPHORES 3
+#define CONFIGURE_MAXIMUM_PARTITIONS TEST_MAXIMUM_PARTITIONS
-#define CONFIGURE_MAXIMUM_TASKS ( 1 + MAX_TASKS )
+#define CONFIGURE_MAXIMUM_PERIODS TEST_MAXIMUM_PERIODS
+
+#define CONFIGURE_MAXIMUM_SEMAPHORES TEST_MAXIMUM_SEMAPHORES
+
+#define CONFIGURE_MAXIMUM_TASKS TEST_MAXIMUM_TASKS
#define CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE \
CONFIGURE_MAXIMUM_TASKS
-#define CONFIGURE_MAXIMUM_TIMERS 3
+#define CONFIGURE_MAXIMUM_TIMERS TEST_MAXIMUM_TIMERS
-#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 3
+#define CONFIGURE_MAXIMUM_USER_EXTENSIONS TEST_MAXIMUM_USER_EXTENSIONS
-#define CONFIGURE_MICROSECONDS_PER_TICK 1000
+#define CONFIGURE_MICROSECONDS_PER_TICK TEST_MICROSECONDS_PER_TICK
+
+#define CONFIGURE_TICKS_PER_TIMESLICE TEST_TICKS_PER_TIMESLICE
#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0
@@ -165,35 +205,67 @@ static void task_stack_deallocate( void *stack )
#define CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE
-#define CONFIGURE_TASK_STACK_ALLOCATOR task_stack_allocate
+#define CONFIGURE_TASK_STACK_ALLOCATOR test_task_stack_allocate
-#define CONFIGURE_TASK_STACK_DEALLOCATOR task_stack_deallocate
+#define CONFIGURE_TASK_STACK_DEALLOCATOR test_task_stack_deallocate
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_ATTRIBUTES TASK_ATTRIBUTES
+#define CONFIGURE_INIT_TASK_ARGUMENTS TEST_RUNNER_ARGUMENT
-#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
+#define CONFIGURE_INIT_TASK_ATTRIBUTES ( RTEMS_SYSTEM_TASK | TASK_ATTRIBUTES )
#define CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZE TASK_STORAGE_SIZE
+#define CONFIGURE_INIT_TASK_ENTRY_POINT Runner
+
+#define CONFIGURE_INIT_TASK_INITIAL_MODES TEST_RUNNER_INITIAL_MODES
+
+#define CONFIGURE_INIT_TASK_NAME TEST_RUNNER_NAME
+
+#define CONFIGURE_INIT_TASK_PRIORITY 0
+
+#if !defined( CONFIGURE_INITIAL_EXTENSIONS )
+#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = FatalInitialExtension }
+#endif
+
#if defined( RTEMS_SMP ) && \
( CONFIGURE_MAXIMUM_PROCESSORS == 4 || CONFIGURE_MAXIMUM_PROCESSORS == 5 )
+#include <rtems/score/scheduleredfsmp.h>
+
+const Scheduler_Operations
+T_scheduler_operations[ CONFIGURE_MAXIMUM_PROCESSORS ] = {
+ SCHEDULER_EDF_SMP_ENTRY_POINTS,
+ SCHEDULER_EDF_SMP_ENTRY_POINTS,
+ SCHEDULER_EDF_SMP_ENTRY_POINTS,
+#if CONFIGURE_MAXIMUM_PROCESSORS >= 5
+ SCHEDULER_EDF_SMP_ENTRY_POINTS,
+#endif
+ SCHEDULER_EDF_SMP_ENTRY_POINTS
+};
+
+#undef SCHEDULER_EDF_SMP_ENTRY_POINTS
+
+#define SCHEDULER_EDF_SMP_ENTRY_POINTS T_SCHEDULER_ENTRY_POINTS
+
#define CONFIGURE_SCHEDULER_EDF_SMP
#include <rtems/scheduler.h>
-RTEMS_SCHEDULER_EDF_SMP(a);
+RTEMS_SCHEDULER_EDF_SMP( a );
+
+RTEMS_SCHEDULER_EDF_SMP( b );
-RTEMS_SCHEDULER_EDF_SMP(b);
+RTEMS_SCHEDULER_EDF_SMP( c );
-RTEMS_SCHEDULER_EDF_SMP(c);
+RTEMS_SCHEDULER_EDF_SMP( d );
#define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
- RTEMS_SCHEDULER_TABLE_EDF_SMP(a, rtems_build_name('A', ' ', ' ', ' ')), \
- RTEMS_SCHEDULER_TABLE_EDF_SMP(b, rtems_build_name('B', ' ', ' ', ' ')), \
- RTEMS_SCHEDULER_TABLE_EDF_SMP(c, rtems_build_name('C', ' ', ' ', ' '))
+ RTEMS_SCHEDULER_TABLE_EDF_SMP( a, TEST_SCHEDULER_A_NAME ), \
+ RTEMS_SCHEDULER_TABLE_EDF_SMP( b, TEST_SCHEDULER_B_NAME ), \
+ RTEMS_SCHEDULER_TABLE_EDF_SMP( c, TEST_SCHEDULER_C_NAME ), \
+ RTEMS_SCHEDULER_TABLE_EDF_SMP( d, TEST_SCHEDULER_D_NAME )
#if CONFIGURE_MAXIMUM_PROCESSORS == 5
#define CONFIGURE_SCHEDULER_ASSIGNMENTS \
@@ -210,7 +282,61 @@ RTEMS_SCHEDULER_EDF_SMP(c);
RTEMS_SCHEDULER_ASSIGN(2, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL)
#endif
-#endif /* RTEMS_SMP */
+#elif !defined( CONFIGURE_SCHEDULER_ASSIGNMENTS )
+
+#include <rtems/score/schedulerpriority.h>
+
+#undef CONFIGURE_MAXIMUM_PROCESSORS
+#define CONFIGURE_MAXIMUM_PROCESSORS 1
+
+const Scheduler_Operations
+T_scheduler_operations[ CONFIGURE_MAXIMUM_PROCESSORS ] = {
+ SCHEDULER_PRIORITY_ENTRY_POINTS
+};
+
+#undef SCHEDULER_PRIORITY_ENTRY_POINTS
+
+#define SCHEDULER_PRIORITY_ENTRY_POINTS T_SCHEDULER_ENTRY_POINTS
+
+#define CONFIGURE_SCHEDULER_PRIORITY
+
+#if defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES)
+
+#include <rtems/scheduler.h>
+
+RTEMS_SCHEDULER_PRIORITY( a, 64 );
+
+#else /* CONFIGURE_SCHEDULER_TABLE_ENTRIES */
+
+#define CONFIGURE_SCHEDULER_NAME TEST_SCHEDULER_A_NAME
+
+#define CONFIGURE_MAXIMUM_PRIORITY 127
+
+#endif /* CONFIGURE_SCHEDULER_TABLE_ENTRIES */
+
+#endif
+
+#define CONFIGURE_IDLE_TASK_STACK_SIZE TEST_IDLE_STACK_SIZE
+
+static char test_idle_stacks[ CONFIGURE_MAXIMUM_PROCESSORS ][
+ RTEMS_ALIGN_UP(
+ MAX_TLS_SIZE + TEST_IDLE_STACK_SIZE + CPU_IDLE_TASK_IS_FP * CONTEXT_FP_SIZE,
+ CPU_INTERRUPT_STACK_ALIGNMENT
+ )
+]
+RTEMS_ALIGNED( CPU_INTERRUPT_STACK_ALIGNMENT )
+RTEMS_SECTION( ".rtemsstack.idle" );
+
+void *test_idle_task_stack_allocate( uint32_t cpu_index, size_t *size )
+{
+ if ( *size > sizeof( test_idle_stacks[ 0 ] ) ) {
+ rtems_fatal( RTEMS_FATAL_SOURCE_APPLICATION, 0xABAD1DEA );
+ }
+
+ return &test_idle_stacks[ cpu_index ][0];
+}
+
+#define CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE test_idle_task_stack_allocate
#define CONFIGURE_INIT
diff --git a/testsuites/validation/ts-fatal-boot-processor-not-assigned-to-scheduler.c b/testsuites/validation/ts-fatal-boot-processor-not-assigned-to-scheduler.c
new file mode 100644
index 0000000000..c983cfd406
--- /dev/null
+++ b/testsuites/validation/ts-fatal-boot-processor-not-assigned-to-scheduler.c
@@ -0,0 +1,98 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesFatalBootProcessorNotAssignedToScheduler
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-boot-processor-not-assigned-to-scheduler.h"
+#include "ts-config.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesFatalBootProcessorNotAssignedToScheduler \
+ * spec:/testsuites/fatal-boot-processor-not-assigned-to-scheduler
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite uses an application configuration which
+ * triggers a fatal error during system initialization.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesFatalBootProcessorNotAssignedToScheduler";
+
+#define FATAL_SYSINIT_RUN \
+ ScoreSmpValFatalBootProcessorNotAssignedToScheduler_Run
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+#include <rtems/score/scheduleredfsmp.h>
+
+#define CONFIGURE_SCHEDULER_EDF_SMP
+
+#include <rtems/scheduler.h>
+
+RTEMS_SCHEDULER_EDF_SMP( a );
+
+#define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
+ RTEMS_SCHEDULER_TABLE_EDF_SMP( a, TEST_SCHEDULER_A_NAME )
+
+#define CONFIGURE_SCHEDULER_ASSIGNMENTS \
+ RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER, \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL )
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-fatal-idle-thread-create-failed.c b/testsuites/validation/ts-fatal-idle-thread-create-failed.c
new file mode 100644
index 0000000000..fb7a36c11a
--- /dev/null
+++ b/testsuites/validation/ts-fatal-idle-thread-create-failed.c
@@ -0,0 +1,90 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesFatalIdleThreadCreateFailed
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-idle-thread-create-failed.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesFatalIdleThreadCreateFailed \
+ * spec:/testsuites/fatal-idle-thread-create-failed
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case which is triggered by
+ * a fatal error during system initialization.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesFatalIdleThreadCreateFailed";
+
+static bool CreateTask( rtems_tcb *executing, rtems_tcb *created )
+{
+ (void) executing;
+ (void) created;
+ return false;
+}
+
+#define FATAL_SYSINIT_RUN ScoreThreadValFatalIdleThreadCreateFailed_Run
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
+
+#define FATAL_SYSINIT_INITIAL_EXTENSION { .thread_create = CreateTask }
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-fatal-idle-thread-stack-too-small.c b/testsuites/validation/ts-fatal-idle-thread-stack-too-small.c
new file mode 100644
index 0000000000..ddfe59df13
--- /dev/null
+++ b/testsuites/validation/ts-fatal-idle-thread-stack-too-small.c
@@ -0,0 +1,97 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesFatalIdleThreadStackTooSmall
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-idle-thread-stack-too-small.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesFatalIdleThreadStackTooSmall \
+ * spec:/testsuites/fatal-idle-thread-stack-too-small
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case which triggers a
+ * fatal error during system initialization.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesFatalIdleThreadStackTooSmall";
+
+#define FATAL_SYSINIT_RUN ScoreThreadValFatalIdleThreadStackTooSmall_Run
+
+static _Thread_local volatile uint8_t zero[ RTEMS_MINIMUM_STACK_SIZE ];
+
+static void Init( rtems_task_argument arg )
+{
+ (void) arg;
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, zero[ 0 ] + 1 );
+}
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE 1
+
+#define CONFIGURE_INIT_TASK_PRIORITY 0
+
+#define CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZE RTEMS_MINIMUM_STACK_SIZE
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-fatal-init-task-construct-failed.c b/testsuites/validation/ts-fatal-init-task-construct-failed.c
new file mode 100644
index 0000000000..d8c87428e8
--- /dev/null
+++ b/testsuites/validation/ts-fatal-init-task-construct-failed.c
@@ -0,0 +1,95 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesFatalInitTaskConstructFailed
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-init-task-construct-failed.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesFatalInitTaskConstructFailed \
+ * spec:/testsuites/fatal-init-task-construct-failed
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case which triggers a
+ * fatal error during system initialization.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesFatalInitTaskConstructFailed";
+
+#define FATAL_SYSINIT_RUN AcfgValFatalInitTaskConstructFailed_Run
+
+static void Init( rtems_task_argument arg )
+{
+ (void) arg;
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, 1 );
+}
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE 1
+
+#define CONFIGURE_INIT_TASK_PRIORITY 0
+
+#define CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZE RTEMS_MINIMUM_STACK_SIZE
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-fatal-mandatory-processor-not-present.c b/testsuites/validation/ts-fatal-mandatory-processor-not-present.c
new file mode 100644
index 0000000000..f9629d9699
--- /dev/null
+++ b/testsuites/validation/ts-fatal-mandatory-processor-not-present.c
@@ -0,0 +1,127 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesFatalMandatoryProcessorNotPresent
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-mandatory-processor-not-present.h"
+#include "ts-config.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesFatalMandatoryProcessorNotPresent \
+ * spec:/testsuites/fatal-mandatory-processor-not-present
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case which triggers a
+ * fatal error during system initialization.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesFatalMandatoryProcessorNotPresent";
+
+#define FATAL_SYSINIT_RUN ScoreSmpValFatalMandatoryProcessorNotPresent_Run
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 32
+
+#include <rtems/score/scheduleredfsmp.h>
+
+#define CONFIGURE_SCHEDULER_EDF_SMP
+
+#include <rtems/scheduler.h>
+
+RTEMS_SCHEDULER_EDF_SMP( a );
+
+#define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
+ RTEMS_SCHEDULER_TABLE_EDF_SMP( a, TEST_SCHEDULER_A_NAME )
+
+#define CONFIGURE_SCHEDULER_ASSIGNMENTS \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY )
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-fatal-scheduler-requires-exactly-one-processor.c b/testsuites/validation/ts-fatal-scheduler-requires-exactly-one-processor.c
new file mode 100644
index 0000000000..d1de45d836
--- /dev/null
+++ b/testsuites/validation/ts-fatal-scheduler-requires-exactly-one-processor.c
@@ -0,0 +1,98 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesFatalSchedulerRequiresExactlyOneProcessor
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-scheduler-requires-exactly-one-processor.h"
+#include "ts-config.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesFatalSchedulerRequiresExactlyOneProcessor \
+ * spec:/testsuites/fatal-scheduler-requires-exactly-one-processor
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite uses an application configuration which
+ * triggers a fatal error during system initialization.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesFatalSchedulerRequiresExactlyOneProcessor";
+
+#define FATAL_SYSINIT_RUN \
+ ScoreSmpValFatalSchedulerRequiresExactlyOneProcessor_Run
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+#include <rtems/score/schedulerpriority.h>
+
+#define CONFIGURE_SCHEDULER_PRIORITY
+
+#include <rtems/scheduler.h>
+
+RTEMS_SCHEDULER_PRIORITY( a, 256 );
+
+#define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
+ RTEMS_SCHEDULER_TABLE_PRIORITY( a, TEST_SCHEDULER_A_NAME )
+
+#define CONFIGURE_SCHEDULER_ASSIGNMENTS \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY )
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-fatal-smp.c b/testsuites/validation/ts-fatal-smp.c
new file mode 100644
index 0000000000..ff6fd19d42
--- /dev/null
+++ b/testsuites/validation/ts-fatal-smp.c
@@ -0,0 +1,97 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesFatalSmp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-smp.h"
+#include "ts-config.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesFatalSmp spec:/testsuites/fatal-smp
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case which triggers
+ * SMP-specific fatal errors.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesFatalSmp";
+
+#define FATAL_SYSINIT_RUN ScoreSmpValFatal_Run
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 3
+
+#include <rtems/score/scheduleredfsmp.h>
+
+#define CONFIGURE_SCHEDULER_EDF_SMP
+
+#include <rtems/scheduler.h>
+
+RTEMS_SCHEDULER_EDF_SMP( a );
+
+#define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
+ RTEMS_SCHEDULER_TABLE_EDF_SMP( a, TEST_SCHEDULER_A_NAME )
+
+#define CONFIGURE_SCHEDULER_ASSIGNMENTS \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-fatal-start-of-mandatory-processor-failed.c b/testsuites/validation/ts-fatal-start-of-mandatory-processor-failed.c
new file mode 100644
index 0000000000..8ab860eea2
--- /dev/null
+++ b/testsuites/validation/ts-fatal-start-of-mandatory-processor-failed.c
@@ -0,0 +1,97 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesFatalStartOfMandatoryProcessorFailed
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-start-of-mandatory-processor-failed.h"
+#include "ts-config.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesFatalStartOfMandatoryProcessorFailed \
+ * spec:/testsuites/fatal-start-of-mandatory-processor-failed
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case which triggers a
+ * fatal error during system initialization.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesFatalStartOfMandatoryProcessorFailed";
+
+#define FATAL_SYSINIT_RUN ScoreSmpValFatalStartOfMandatoryProcessorFailed_Run
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+#include <rtems/score/scheduleredfsmp.h>
+
+#define CONFIGURE_SCHEDULER_EDF_SMP
+
+#include <rtems/scheduler.h>
+
+RTEMS_SCHEDULER_EDF_SMP( a );
+
+#define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
+ RTEMS_SCHEDULER_TABLE_EDF_SMP( a, TEST_SCHEDULER_A_NAME )
+
+#define CONFIGURE_SCHEDULER_ASSIGNMENTS \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY )
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-fatal-start-on-not-online-processor.c b/testsuites/validation/ts-fatal-start-on-not-online-processor.c
new file mode 100644
index 0000000000..794983823c
--- /dev/null
+++ b/testsuites/validation/ts-fatal-start-on-not-online-processor.c
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesFatalStartOnNotOnlineProcessor
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-start-on-not-online-processor.h"
+#include "ts-config.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesFatalStartOnNotOnlineProcessor \
+ * spec:/testsuites/fatal-start-on-not-online-processor
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case which triggers a
+ * fatal error during system initialization.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesFatalStartOnNotOnlineProcessor";
+
+#define FATAL_SYSINIT_RUN ScoreSmpValFatalStartOnNotOnlineProcessor_Run
+
+#define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-fatal-sysinit.h b/testsuites/validation/ts-fatal-sysinit.h
new file mode 100644
index 0000000000..0b8f735f54
--- /dev/null
+++ b/testsuites/validation/ts-fatal-sysinit.h
@@ -0,0 +1,161 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This header file provides a configurable validation test suite runner
+ * and application configuration for fatal error tests which occur during
+ * system initialization.
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#include <rtems.h>
+#include <rtems/bspIo.h>
+#include <rtems/sysinit.h>
+#include <rtems/test-info.h>
+#include <rtems/testopts.h>
+#include <rtems/score/atomic.h>
+
+#include <rtems/test.h>
+
+#include "tx-support.h"
+
+static char buffer[ 512 ];
+
+static const T_action actions[] = {
+ T_report_hash_sha256
+};
+
+static const T_config test_config = {
+ .name = rtems_test_name,
+ .buf = buffer,
+ .buf_size = sizeof( buffer ),
+ .putchar = rtems_put_char,
+ .verbosity = RTEMS_TEST_VERBOSITY,
+#if defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER)
+ .now = T_now_clock,
+#else
+ .now = T_now_tick,
+#endif
+ .allocate = T_memory_allocate,
+ .deallocate = T_memory_deallocate,
+ .action_count = T_ARRAY_SIZE( actions ),
+ .actions = actions
+};
+
+static Atomic_Uint counter;
+
+static void TestSuiteFatalExtension(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+)
+{
+ rtems_fatal_code exit_code;
+
+ (void) always_set_to_false;
+
+ if ( source == RTEMS_FATAL_SOURCE_EXIT ) {
+ return;
+ }
+
+ if ( _Atomic_Fetch_add_uint( &counter, 1, ATOMIC_ORDER_RELAXED ) != 0 ) {
+ return;
+ }
+
+ T_make_runner();
+ FATAL_SYSINIT_RUN( source, code );
+
+ if ( T_run_finalize() ) {
+ rtems_test_end( rtems_test_name );
+ exit_code = 0;
+ } else {
+ exit_code = 1;
+ }
+
+#if defined(FATAL_SYSINIT_EXIT)
+ FATAL_SYSINIT_EXIT( exit_code );
+#else
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, exit_code );
+#endif
+}
+
+static void TestRunInitialize( void )
+{
+ rtems_test_begin( rtems_test_name, TEST_STATE );
+ T_run_initialize( &test_config );
+}
+
+RTEMS_SYSINIT_ITEM(
+ TestRunInitialize,
+ RTEMS_SYSINIT_BSP_EARLY,
+ RTEMS_SYSINIT_ORDER_FIRST
+);
+
+#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0
+
+#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
+
+#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
+
+#ifdef FATAL_SYSINIT_INITIAL_EXTENSION
+#define OPTIONAL_FATAL_SYSINIT_INITIAL_EXTENSION FATAL_SYSINIT_INITIAL_EXTENSION,
+#else
+#define OPTIONAL_FATAL_SYSINIT_INITIAL_EXTENSION
+#endif
+
+#define CONFIGURE_INITIAL_EXTENSIONS \
+ OPTIONAL_FATAL_SYSINIT_INITIAL_EXTENSION \
+ { .fatal = FatalInitialExtension }, \
+ { .fatal = TestSuiteFatalExtension }
+
+#define CONFIGURE_IDLE_TASK_STORAGE_SIZE RTEMS_MINIMUM_STACK_SIZE
+
+#if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE)
+
+#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
+
+#if !defined(CONFIGURE_IDLE_TASK_BODY)
+
+#define CONFIGURE_IDLE_TASK_BODY IdleBody
+
+void *IdleBody( uintptr_t ignored )
+{
+ (void) ignored;
+
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, 1 );
+}
+
+#endif /* CONFIGURE_IDLE_TASK_BODY */
+
+#endif /* CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION */
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/validation/ts-fatal-too-large-tls-size.c b/testsuites/validation/ts-fatal-too-large-tls-size.c
new file mode 100644
index 0000000000..ba2cc512df
--- /dev/null
+++ b/testsuites/validation/ts-fatal-too-large-tls-size.c
@@ -0,0 +1,82 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesFatalTooLargeTlsSize
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-fatal-too-large-tls-size.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesFatalTooLargeTlsSize \
+ * spec:/testsuites/fatal-too-large-tls-size
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case which triggers a
+ * fatal error during system initialization.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesFatalTooLargeTlsSize";
+
+#define FATAL_SYSINIT_RUN AcfgValFatalTooLargeTlsSize_Run
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE \
+ RTEMS_TASK_STORAGE_ALIGNMENT
+
+#include "ts-fatal-sysinit.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-idle.h b/testsuites/validation/ts-idle.h
new file mode 100644
index 0000000000..6c4c8955f1
--- /dev/null
+++ b/testsuites/validation/ts-idle.h
@@ -0,0 +1,104 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This header file provides a configurable validation test suite runner
+ * and application configuration for tests which should run within an idle
+ * task without a user initialization task.
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#include <rtems.h>
+#include <rtems/bspIo.h>
+#include <rtems/test-info.h>
+#include <rtems/testopts.h>
+
+#include <rtems/test.h>
+
+#include "tx-support.h"
+
+static char buffer[ 512 ];
+
+static const T_action actions[] = {
+ T_report_hash_sha256
+};
+
+static const T_config test_config = {
+ .name = rtems_test_name,
+ .buf = buffer,
+ .buf_size = sizeof( buffer ),
+ .putchar = rtems_put_char,
+ .verbosity = RTEMS_TEST_VERBOSITY,
+ .now = T_now_tick,
+ .allocate = T_memory_allocate,
+ .deallocate = T_memory_deallocate,
+ .action_count = T_ARRAY_SIZE( actions ),
+ .actions = actions
+};
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0
+
+#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
+
+#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
+
+#define CONFIGURE_INITIAL_EXTENSIONS \
+ { .fatal = FatalInitialExtension }
+
+#ifndef CONFIGURE_IDLE_TASK_STORAGE_SIZE
+#define CONFIGURE_IDLE_TASK_STORAGE_SIZE RTEMS_MINIMUM_STACK_SIZE
+#endif
+
+#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
+
+void *IdleBody( uintptr_t ignored )
+{
+ int exit_code;
+
+ (void) ignored;
+
+ rtems_test_begin( rtems_test_name, TEST_STATE );
+ T_register();
+ exit_code = T_main( &test_config );
+
+ if ( exit_code == 0 ) {
+ rtems_test_end( rtems_test_name );
+ }
+
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, (uint32_t) exit_code );
+}
+
+#define CONFIGURE_IDLE_TASK_BODY IdleBody
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/validation/ts-performance-0.c b/testsuites/validation/ts-performance-0.c
deleted file mode 100644
index 1fb15ecfce..0000000000
--- a/testsuites/validation/ts-performance-0.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSTestSuiteTestsuitesPerformance0
- */
-
-/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
- *
- * 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 OWNER 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.
- */
-
-/*
- * This file is part of the RTEMS quality process and was automatically
- * generated. If you find something that needs to be fixed or
- * worded better please post a report or patch to an RTEMS mailing list
- * or raise a bug report:
- *
- * https://www.rtems.org/bugs.html
- *
- * For information on updating and regenerating please refer to the How-To
- * section in the Software Requirements Engineering chapter of the
- * RTEMS Software Engineering manual. The manual is provided as a part of
- * a release. For development sources please refer to the online
- * documentation at:
- *
- * https://docs.rtems.org
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/test-info.h>
-
-#include <rtems/test.h>
-
-/**
- * @defgroup RTEMSTestSuiteTestsuitesPerformance0 \
- * spec:/testsuites/performance-0
- *
- * @ingroup RTEMSTestSuites
- *
- * @brief This general purpose performance test suite provides enough resources
- * to run basic performance tests for all specified managers and functions.
- *
- * In SMP configurations, up to three scheduler instances using the SMP EDF
- * scheduler are provided using up to four processors.
- *
- * @{
- */
-
-const char rtems_test_name[] = "Performance0";
-
-#include "ts-default.h"
-
-/** @} */
diff --git a/testsuites/validation/ts-performance-no-clock-0.c b/testsuites/validation/ts-performance-no-clock-0.c
new file mode 100644
index 0000000000..b50276a46e
--- /dev/null
+++ b/testsuites/validation/ts-performance-no-clock-0.c
@@ -0,0 +1,82 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesPerformanceNoClock0
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test-info.h>
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesPerformanceNoClock0 \
+ * spec:/testsuites/performance-no-clock-0
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This general purpose performance test suite provides enough resources
+ * to run basic performance tests for all specified managers and functions.
+ *
+ * In SMP configurations, up to three scheduler instances using the SMP EDF
+ * scheduler are provided using up to four processors.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesPerformanceNoClock0";
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 4
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-terminate.c b/testsuites/validation/ts-terminate.c
new file mode 100644
index 0000000000..670c7ec6a2
--- /dev/null
+++ b/testsuites/validation/ts-terminate.c
@@ -0,0 +1,82 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesTerminate
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tc-userext.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesTerminate spec:/testsuites/terminate
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test case for the system
+ * termination procedure.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesTerminate";
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+#define CONFIGURE_INITIAL_EXTENSIONS \
+ { .fatal = FatalExtension0 }, \
+ { .fatal = FatalExtension1 }
+
+#define CONFIGURE_DISABLE_BSP_SETTINGS
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-userext.c b/testsuites/validation/ts-userext.c
new file mode 100644
index 0000000000..461a1ddc0e
--- /dev/null
+++ b/testsuites/validation/ts-userext.c
@@ -0,0 +1,99 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesUserext
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tc-userext.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesUserext spec:/testsuites/userext
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains a test cases related to the
+ * invocation of user extensions.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesUserext";
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+#define CONFIGURE_INITIAL_EXTENSIONS \
+ { \
+ .thread_begin = ThreadBeginExtension0, \
+ .thread_create = ThreadCreateExtension0, \
+ .thread_delete = ThreadDeleteExtension0, \
+ .thread_exitted = ThreadExittedExtension0, \
+ .thread_restart = ThreadRestartExtension0, \
+ .thread_start = ThreadStartExtension0, \
+ .thread_switch = ThreadSwitchExtension0, \
+ .thread_terminate = ThreadTerminateExtension0 \
+ }, { \
+ .thread_begin = ThreadBeginExtension1, \
+ .thread_create = ThreadCreateExtension1, \
+ .thread_delete = ThreadDeleteExtension1, \
+ .thread_exitted = ThreadExittedExtension1, \
+ .thread_restart = ThreadRestartExtension1, \
+ .thread_start = ThreadStartExtension1, \
+ .thread_switch = ThreadSwitchExtension1, \
+ .thread_terminate = ThreadTerminateExtension1 \
+ }
+
+#define CONFIGURE_IDLE_TASK_BODY IdleBody
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-0.c b/testsuites/validation/ts-validation-0.c
index b80c09d47f..7f7dfb9215 100644
--- a/testsuites/validation/ts-validation-0.c
+++ b/testsuites/validation/ts-validation-0.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ * @ingroup TestsuitesValidation0
*/
/*
- * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -55,9 +55,9 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestSuiteTestsuitesValidation0 spec:/testsuites/validation-0
+ * @defgroup TestsuitesValidation0 spec:/testsuites/validation-0
*
- * @ingroup RTEMSTestSuites
+ * @ingroup RTEMSTestSuitesValidation
*
* @brief This general purpose validation test suite provides enough resources
* to run basic tests for all specified managers and functions.
@@ -68,7 +68,7 @@
* @{
*/
-const char rtems_test_name[] = "Validation0";
+const char rtems_test_name[] = "TestsuitesValidation0";
#define CONFIGURE_MAXIMUM_PROCESSORS 5
diff --git a/testsuites/validation/ts-validation-1.c b/testsuites/validation/ts-validation-1.c
index 11bef51fb7..a33593afb1 100644
--- a/testsuites/validation/ts-validation-1.c
+++ b/testsuites/validation/ts-validation-1.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestSuiteTestsuitesValidation1
+ * @ingroup TestsuitesValidation1
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -55,20 +55,22 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestSuiteTestsuitesValidation1 spec:/testsuites/validation-1
+ * @defgroup TestsuitesValidation1 spec:/testsuites/validation-1
*
- * @ingroup RTEMSTestSuites
+ * @ingroup RTEMSTestSuitesValidation
*
* @brief This general purpose validation test suite provides enough resources
- * to run basic tests for all specified managers and functions in a
- * configuration with exactly one processor.
+ * to run basic tests for all specified managers and functions.
+ *
+ * In SMP configurations, up to three scheduler instances using the SMP EDF
+ * scheduler are provided using up to four processors.
*
* @{
*/
-const char rtems_test_name[] = "Validation1";
+const char rtems_test_name[] = "TestsuitesValidation1";
-#define CONFIGURE_MAXIMUM_PROCESSORS 1
+#define CONFIGURE_MAXIMUM_PROCESSORS 5
#include "ts-default.h"
diff --git a/testsuites/validation/ts-validation-acfg-0.c b/testsuites/validation/ts-validation-acfg-0.c
new file mode 100644
index 0000000000..2afd0dae86
--- /dev/null
+++ b/testsuites/validation/ts-validation-acfg-0.c
@@ -0,0 +1,90 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationAcfg0
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ts-acfg.h"
+#include "tx-support.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationAcfg0 spec:/testsuites/validation-acfg-0
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite is used to validate the default value of
+ * application configuration options taking the optional BSP provided
+ * settings into account.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationAcfg0";
+
+#define CONFIGURE_IDLE_TASK_STORAGE_SIZE RTEMS_MINIMUM_STACK_SIZE
+
+#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
+
+void *IdleBody( uintptr_t ignored )
+{
+ (void) ignored;
+ RunTestSuite();
+}
+
+#define CONFIGURE_IDLE_TASK_BODY IdleBody
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-acfg-1.c b/testsuites/validation/ts-validation-acfg-1.c
new file mode 100644
index 0000000000..d1b44cf1ec
--- /dev/null
+++ b/testsuites/validation/ts-validation-acfg-1.c
@@ -0,0 +1,112 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationAcfg1
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp.h>
+
+#include "ts-acfg.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationAcfg1 spec:/testsuites/validation-acfg-1
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite is used to validate the default value of
+ * application configuration options where all optional BSP provided settings
+ * are disabled.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationAcfg1";
+
+static void FatalExtension(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+)
+{
+ rtems_extensions_table bsp = BSP_INITIAL_EXTENSION;
+
+ ( *bsp.fatal )( source, always_set_to_false, code );
+}
+
+static void Init( rtems_task_argument arg )
+{
+ (void) arg;
+ RunTestSuite();
+}
+
+#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = FatalExtension }
+
+#define CONFIGURE_DISABLE_BSP_SETTINGS
+
+#define CONFIGURE_IDLE_TASK_STORAGE_SIZE RTEMS_MINIMUM_STACK_SIZE
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZE \
+ RTEMS_TASK_STORAGE_SIZE( \
+ RTEMS_MINIMUM_STACK_SIZE, \
+ RTEMS_DEFAULT_ATTRIBUTES \
+ )
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-cache.c b/testsuites/validation/ts-validation-cache.c
new file mode 100644
index 0000000000..3522c02db7
--- /dev/null
+++ b/testsuites/validation/ts-validation-cache.c
@@ -0,0 +1,77 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationCache
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationCache spec:/testsuites/validation-cache
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite provides enough resources to run tests for
+ * the directives of the @ref RTEMSAPIClassicCache.
+ *
+ * In SMP configurations, up to three scheduler instances using the SMP EDF
+ * scheduler are provided using up to four processors.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationCache";
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 4
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-intr.c b/testsuites/validation/ts-validation-intr.c
new file mode 100644
index 0000000000..74f849441a
--- /dev/null
+++ b/testsuites/validation/ts-validation-intr.c
@@ -0,0 +1,80 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationIntr
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationIntr spec:/testsuites/validation-intr
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite provides enough resources to run tests for
+ * the interrupt controller related directives of the @ref
+ * RTEMSAPIClassicIntr.
+ *
+ * In SMP configurations, up to three scheduler instances using the SMP EDF
+ * scheduler are provided using up to four processors.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationIntr";
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 5
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-io-kernel.c b/testsuites/validation/ts-validation-io-kernel.c
new file mode 100644
index 0000000000..35779f6060
--- /dev/null
+++ b/testsuites/validation/ts-validation-io-kernel.c
@@ -0,0 +1,150 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationIoKernel
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <bsp/bootcard.h>
+#include <rtems/test-info.h>
+#include <rtems/test.h>
+#include <rtems/testopts.h>
+
+#include "tr-io-kernel.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationIoKernel spec:/testsuites/validation-io-kernel
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains test cases which test the kernel
+ * character input/output device provided by the BSP before the system
+ * initialization is performed.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationIoKernel";
+
+static char buffer[ 512 ];
+
+static const T_action actions[] = {
+ T_report_hash_sha256
+};
+
+static const T_config test_config = {
+ .name = rtems_test_name,
+ .buf = buffer,
+ .buf_size = sizeof( buffer ),
+ .putchar = rtems_put_char,
+ .verbosity = RTEMS_TEST_VERBOSITY,
+ .now = T_now_tick,
+ .action_count = T_ARRAY_SIZE( actions ),
+ .actions = actions
+};
+
+void boot_card( const char *cmdline )
+{
+ uint32_t exit_code;
+
+ (void) cmdline;
+
+ rtems_test_begin( rtems_test_name, TEST_STATE );
+ T_run_initialize( &test_config );
+ RtemsIoValKernel_Run();
+
+ if ( T_run_finalize() ) {
+ rtems_test_end( rtems_test_name );
+ exit_code = 0;
+ } else {
+ exit_code = 1;
+ }
+
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, exit_code );
+}
+
+static void *IdleBody( uintptr_t ignored )
+{
+ (void) ignored;
+
+ while ( true ) {
+ /* Do nothing */
+ }
+
+ return NULL;
+}
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0
+
+#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
+
+#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
+
+#define CONFIGURE_SCHEDULER_USER
+
+#define CONFIGURE_SCHEDULER
+
+#define CONFIGURE_SCHEDULER_TABLE_ENTRIES { }
+
+#define CONFIGURE_IDLE_TASK_STORAGE_SIZE RTEMS_MINIMUM_STACK_SIZE
+
+#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
+
+#define CONFIGURE_IDLE_TASK_BODY IdleBody
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-no-clock-0.c b/testsuites/validation/ts-validation-no-clock-0.c
new file mode 100644
index 0000000000..1fa610a3b4
--- /dev/null
+++ b/testsuites/validation/ts-validation-no-clock-0.c
@@ -0,0 +1,81 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationNoClock0
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationNoClock0 \
+ * spec:/testsuites/validation-no-clock-0
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This general purpose validation test suite provides enough resources
+ * to run basic tests without a Clock Driver for all specified managers and
+ * functions.
+ *
+ * In SMP configurations, up to three scheduler instances using the SMP EDF
+ * scheduler are provided using up to four processors.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationNoClock0";
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 5
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-non-smp.c b/testsuites/validation/ts-validation-non-smp.c
new file mode 100644
index 0000000000..b7460222b5
--- /dev/null
+++ b/testsuites/validation/ts-validation-non-smp.c
@@ -0,0 +1,74 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationNonSmp
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationNonSmp spec:/testsuites/validation-non-smp
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This test suite for non-SMP test cases provides enough resources to
+ * run basic tests for all specified managers and functions.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationNonSmp";
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 1
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-one-cpu-0.c b/testsuites/validation/ts-validation-one-cpu-0.c
new file mode 100644
index 0000000000..6eefe21b15
--- /dev/null
+++ b/testsuites/validation/ts-validation-one-cpu-0.c
@@ -0,0 +1,79 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationOneCpu0
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationOneCpu0 spec:/testsuites/validation-one-cpu-0
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This general purpose validation test suite provides enough resources
+ * to run basic tests with exactly one processor and without a Clock Driver.
+ *
+ * Two test suites of this configuration are provided to limit test run
+ * duration.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationOneCpu0";
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 1
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-one-cpu-1.c b/testsuites/validation/ts-validation-one-cpu-1.c
new file mode 100644
index 0000000000..29288686b1
--- /dev/null
+++ b/testsuites/validation/ts-validation-one-cpu-1.c
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationOneCpu1
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ts-config.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationOneCpu1 spec:/testsuites/validation-one-cpu-1
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This general purpose validation test suite provides enough resources
+ * to run basic tests with exactly one processor and without a Clock Driver.
+ *
+ * Two test suites of this configuration are provided to limit test run
+ * duration.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationOneCpu1";
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 1
+
+#define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
+ RTEMS_SCHEDULER_TABLE_PRIORITY( a, TEST_SCHEDULER_A_NAME )
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-smp-one-cpu-0.c b/testsuites/validation/ts-validation-smp-one-cpu-0.c
new file mode 100644
index 0000000000..c5be91fb9e
--- /dev/null
+++ b/testsuites/validation/ts-validation-smp-one-cpu-0.c
@@ -0,0 +1,76 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationSmpOneCpu0
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationSmpOneCpu0 \
+ * spec:/testsuites/validation-smp-one-cpu-0
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This general purpose validation test suite provides enough resources
+ * to run basic tests for all specified managers and functions in a
+ * configuration with exactly one processor and an uniprocessor scheduler.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationSmpOneCpu0";
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 1
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-smp-only-0.c b/testsuites/validation/ts-validation-smp-only-0.c
new file mode 100644
index 0000000000..30b1f705ed
--- /dev/null
+++ b/testsuites/validation/ts-validation-smp-only-0.c
@@ -0,0 +1,78 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationSmpOnly0
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationSmpOnly0 \
+ * spec:/testsuites/validation-smp-only-0
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This test suite for SMP-only test cases provides enough resources to
+ * run basic tests for all specified managers and functions.
+ *
+ * Up to three scheduler instances using the SMP EDF scheduler are provided
+ * using up to four processors.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationSmpOnly0";
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 5
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-smp-only-2.c b/testsuites/validation/ts-validation-smp-only-2.c
new file mode 100644
index 0000000000..62f0cd95d6
--- /dev/null
+++ b/testsuites/validation/ts-validation-smp-only-2.c
@@ -0,0 +1,102 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationSmpOnly2
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ts-config.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationSmpOnly2 \
+ * spec:/testsuites/validation-smp-only-2
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This SMP-only test suite validates the clustered scheduler
+ * configuration through an application configuration with a processor
+ * maximum of two. The second processor has a optional scheduler assigned
+ * and fails to start.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationSmpOnly2";
+
+bool __wrap__CPU_SMP_Start_processor( uint32_t cpu_index );
+
+bool __wrap__CPU_SMP_Start_processor( uint32_t cpu_index )
+{
+ (void) cpu_index;
+ return false;
+}
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+#include <rtems/score/scheduleredfsmp.h>
+
+#define CONFIGURE_SCHEDULER_EDF_SMP
+
+#include <rtems/scheduler.h>
+
+RTEMS_SCHEDULER_EDF_SMP( a );
+
+#define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
+ RTEMS_SCHEDULER_TABLE_EDF_SMP( a, TEST_SCHEDULER_A_NAME )
+
+#define CONFIGURE_SCHEDULER_ASSIGNMENTS \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL )
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-timecounter-0.c b/testsuites/validation/ts-validation-timecounter-0.c
new file mode 100644
index 0000000000..7a042c75ae
--- /dev/null
+++ b/testsuites/validation/ts-validation-timecounter-0.c
@@ -0,0 +1,77 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationTimecounter0
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationTimecounter0 \
+ * spec:/testsuites/validation-timecounter-0
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite is intended test cases related to the
+ * installation of timecouters. The Clock Driver is disabled.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationTimecounter0";
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 1
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-timecounter-1.c b/testsuites/validation/ts-validation-timecounter-1.c
new file mode 100644
index 0000000000..918d6d093c
--- /dev/null
+++ b/testsuites/validation/ts-validation-timecounter-1.c
@@ -0,0 +1,75 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationTimecounter1
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationTimecounter1 \
+ * spec:/testsuites/validation-timecounter-1
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite is intended test cases related to the use
+ * of timecouters. The Clock Driver is enabled.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationTimecounter1";
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 4
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-timecounter-smp-0.c b/testsuites/validation/ts-validation-timecounter-smp-0.c
new file mode 100644
index 0000000000..849a64d94b
--- /dev/null
+++ b/testsuites/validation/ts-validation-timecounter-smp-0.c
@@ -0,0 +1,77 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationTimecounterSmp0
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationTimecounterSmp0 \
+ * spec:/testsuites/validation-timecounter-smp-0
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite is intended test cases related to the use
+ * of timecouters. The Clock Driver is disabled.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationTimecounterSmp0";
+
+#define CONFIGURE_MAXIMUM_PROCESSORS 4
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-tls-0.c b/testsuites/validation/ts-validation-tls-0.c
new file mode 100644
index 0000000000..fe32bf35bd
--- /dev/null
+++ b/testsuites/validation/ts-validation-tls-0.c
@@ -0,0 +1,74 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationTls0
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationTls0 spec:/testsuites/validation-tls-0
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains test cases related to the
+ * thread-local storage support.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationTls0";
+
+#define MAX_TLS_SIZE 1024
+
+#include "ts-default.h"
+
+/** @} */
diff --git a/testsuites/validation/ts-validation-tls-1.c b/testsuites/validation/ts-validation-tls-1.c
new file mode 100644
index 0000000000..00b74008b2
--- /dev/null
+++ b/testsuites/validation/ts-validation-tls-1.c
@@ -0,0 +1,75 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup TestsuitesValidationTls1
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+/*
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
+ *
+ * https://docs.rtems.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup TestsuitesValidationTls1 spec:/testsuites/validation-tls-1
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This validation test suite contains test cases related to the
+ * thread-local storage support.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "TestsuitesValidationTls1";
+
+#define CONFIGURE_IDLE_TASK_STORAGE_SIZE \
+ ( RTEMS_MINIMUM_STACK_SIZE + 4096 )
+
+#include "ts-idle.h"
+
+/** @} */
diff --git a/testsuites/validation/tx-call-within-isr.c b/testsuites/validation/tx-call-within-isr.c
index 226647c0bc..8bbe0e7c29 100644
--- a/testsuites/validation/tx-call-within-isr.c
+++ b/testsuites/validation/tx-call-within-isr.c
@@ -3,14 +3,15 @@
/**
* @file
*
- * @ingroup RTEMSTestSuites
+ * @ingroup RTEMSTestSuitesValidation
*
- * @brief This source file contains the implementation of CallWithinISR(),
+ * @brief This source file contains the implementation of CallWithinISRClear(),
+ * CallWithinISRGetVector(), CallWithinISR(), CallWithinISRRaise(),
* CallWithinISRSubmit(), and CallWithinISRWait().
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021, 2022 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -44,6 +45,7 @@
#include <rtems/score/chainimpl.h>
#include <bsp.h>
+#include <bsp/irq-generic.h>
/* Some target architectures need this variable for <tm27.h> */
uint32_t Interrupt_nest;
@@ -64,13 +66,29 @@ static CallWithinISRContext CallWithinISRInstance = {
.pending = CHAIN_INITIALIZER_EMPTY( CallWithinISRInstance.pending )
};
-static void CallWithinISRHandler( rtems_vector_number vector )
+void CallWithinISRRaise( void )
+{
+ Cause_tm27_intr();
+}
+
+void CallWithinISRClear( void )
+{
+ Clear_tm27_intr();
+}
+
+#ifdef TM27_USE_VECTOR_HANDLER
+static rtems_isr CallWithinISRHandler( rtems_vector_number arg )
+#else
+static void CallWithinISRHandler( void *arg )
+#endif
{
CallWithinISRContext *ctx;
- (void) vector;
+ (void) arg;
ctx = &CallWithinISRInstance;
+ CallWithinISRClear();
+
while ( true ) {
rtems_interrupt_lock_context lock_context;
CallWithinISRRequest *request;
@@ -112,7 +130,7 @@ void CallWithinISRSubmit( CallWithinISRRequest *request )
_Chain_Append_unprotected( &ctx->pending, &request->node );
rtems_interrupt_lock_release( &ctx->lock, &lock_context );
- Cause_tm27_intr();
+ CallWithinISRRaise();
}
void CallWithinISRWait( const CallWithinISRRequest *request )
@@ -122,6 +140,82 @@ void CallWithinISRWait( const CallWithinISRRequest *request )
}
}
+#if !defined( TM27_INTERRUPT_VECTOR_DEFAULT )
+static void CallWithinISRIsHandlerInstalled(
+ void *arg,
+ const char *info,
+ rtems_option option,
+ rtems_interrupt_handler handler,
+ void *handler_arg
+)
+{
+ (void) info;
+ (void) option;
+ (void) handler_arg;
+
+ if ( handler == CallWithinISRHandler && handler_arg == NULL ) {
+ *(bool *) arg = true;
+ }
+}
+#endif
+
+rtems_vector_number CallWithinISRGetVector( void )
+{
+#if defined( TM27_INTERRUPT_VECTOR_DEFAULT )
+ return TM27_INTERRUPT_VECTOR_DEFAULT;
+#else
+ rtems_vector_number vector;
+
+ for ( vector = 0; vector < BSP_INTERRUPT_VECTOR_COUNT; ++vector ) {
+ bool installed;
+
+ installed = false;
+ (void) rtems_interrupt_handler_iterate(
+ vector,
+ CallWithinISRIsHandlerInstalled,
+ &installed
+ );
+
+ if ( installed ) {
+ return vector;
+ }
+ }
+
+ return UINT32_MAX;
+#endif
+}
+
+rtems_vector_number GetSoftwareInterruptVector( void )
+{
+#if defined( TM27_INTERRUPT_VECTOR_ALTERNATIVE )
+ return TM27_INTERRUPT_VECTOR_ALTERNATIVE;
+#else
+ return UINT32_MAX;
+#endif
+}
+
+rtems_status_code RaiseSoftwareInterrupt( rtems_vector_number vector )
+{
+#if defined( TM27_INTERRUPT_VECTOR_ALTERNATIVE )
+ if ( vector == TM27_INTERRUPT_VECTOR_ALTERNATIVE ) {
+ return _TM27_Raise_alternative();
+ }
+#endif
+
+ return rtems_interrupt_raise( vector );
+}
+
+rtems_status_code ClearSoftwareInterrupt( rtems_vector_number vector )
+{
+#if defined( TM27_INTERRUPT_VECTOR_ALTERNATIVE )
+ if ( vector == TM27_INTERRUPT_VECTOR_ALTERNATIVE ) {
+ return _TM27_Clear_alternative();
+ }
+#endif
+
+ return rtems_interrupt_clear( vector );
+}
+
static void CallWithinISRInitialize( void )
{
Install_tm27_vector( CallWithinISRHandler );
diff --git a/testsuites/validation/tx-default-task-config.c b/testsuites/validation/tx-default-task-config.c
new file mode 100644
index 0000000000..0facc78298
--- /dev/null
+++ b/testsuites/validation/tx-default-task-config.c
@@ -0,0 +1,61 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This source file contains the definition of ::DefaultTaskConfig.
+ */
+
+/*
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tx-support.h"
+#include "ts-config.h"
+
+#define TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
+
+RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT )
+static char DefaultTaskStorage[
+ RTEMS_TASK_STORAGE_SIZE(
+ TEST_MAXIMUM_TLS_SIZE + TEST_MINIMUM_STACK_SIZE,
+ TASK_ATTRIBUTES
+ )
+];
+
+const rtems_task_config DefaultTaskConfig = {
+ .name = rtems_build_name( 'D', 'T', 'S', 'K' ),
+ .initial_priority = 1,
+ .storage_area = DefaultTaskStorage,
+ .storage_size = sizeof( DefaultTaskStorage ),
+ .maximum_thread_local_storage_size = TEST_MAXIMUM_TLS_SIZE,
+ .initial_modes = RTEMS_DEFAULT_MODES,
+ .attributes = TASK_ATTRIBUTES
+};
diff --git a/testsuites/validation/tx-interrupt.c b/testsuites/validation/tx-interrupt.c
index e75c7a2aa0..c5ea4142c2 100644
--- a/testsuites/validation/tx-interrupt.c
+++ b/testsuites/validation/tx-interrupt.c
@@ -3,14 +3,14 @@
/**
* @file
*
- * @ingroup RTEMSTestSuites
+ * @ingroup RTEMSTestSuitesValidation
*
* @brief This source file contains the implementation of
* HasInterruptVectorEntriesInstalled().
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -45,6 +45,30 @@
#include <bsp/irq-generic.h>
+static bool HasRequiredAttributes(
+ const rtems_interrupt_attributes *required,
+ const rtems_interrupt_attributes *actual
+)
+{
+ if ( required == NULL ) {
+ return true;
+ }
+
+ if ( required->can_get_affinity && !actual->can_get_affinity ) {
+ return false;
+ }
+
+ if ( required->can_raise && !actual->can_raise ) {
+ return false;
+ }
+
+ if ( required->can_raise_on && !actual->can_raise_on ) {
+ return false;
+ }
+
+ return true;
+}
+
rtems_vector_number GetValidInterruptVectorNumber(
const rtems_interrupt_attributes *required
)
@@ -57,11 +81,7 @@ rtems_vector_number GetValidInterruptVectorNumber(
sc = rtems_interrupt_get_attributes( vector, &attr );
- if (
- sc == RTEMS_SUCCESSFUL &&
- ( required == NULL ||
- !required->can_get_affinity || attr.can_get_affinity )
- ) {
+ if ( sc == RTEMS_SUCCESSFUL && HasRequiredAttributes( required, &attr ) ) {
break;
}
}
@@ -69,7 +89,9 @@ rtems_vector_number GetValidInterruptVectorNumber(
return vector;
}
-rtems_vector_number GetTestableInterruptVector( void )
+rtems_vector_number GetTestableInterruptVector(
+ const rtems_interrupt_attributes *required
+)
{
rtems_vector_number vector;
@@ -87,6 +109,10 @@ rtems_vector_number GetTestableInterruptVector( void )
continue;
}
+ if ( !HasRequiredAttributes( required, &attr ) ) {
+ continue;
+ }
+
if ( HasInterruptVectorEntriesInstalled( vector ) ) {
continue;
}
@@ -113,6 +139,10 @@ rtems_vector_number GetTestableInterruptVector( void )
}
}
+ if ( vector == BSP_INTERRUPT_VECTOR_COUNT ) {
+ vector = GetSoftwareInterruptVector();
+ }
+
return vector;
}
diff --git a/testsuites/validation/tx-io-relax.c b/testsuites/validation/tx-io-relax.c
new file mode 100644
index 0000000000..30cc097b3a
--- /dev/null
+++ b/testsuites/validation/tx-io-relax.c
@@ -0,0 +1,67 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This source file contains the implementation of SetIORelaxHandler().
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tx-support.h"
+
+void __real__IO_Relax( void );
+
+void __wrap__IO_Relax( void );
+
+static void ( *io_relax_handler )( void * );
+
+static void *io_relax_arg;
+
+void __wrap__IO_Relax( void )
+{
+ void ( *handler )( void * );
+
+ handler = io_relax_handler;
+
+ if ( handler != NULL ) {
+ ( *handler )( io_relax_arg );
+ }
+
+ __real__IO_Relax();
+}
+
+void SetIORelaxHandler( void ( *handler )( void * ), void *arg )
+{
+ io_relax_handler = handler;
+ io_relax_arg = arg;
+}
diff --git a/testsuites/validation/tx-memory-alloc.c b/testsuites/validation/tx-memory-alloc.c
new file mode 100644
index 0000000000..8959dbbdc5
--- /dev/null
+++ b/testsuites/validation/tx-memory-alloc.c
@@ -0,0 +1,79 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This source file contains the implementation of
+ * MemoryAllocationFailWhen() and __wrap_rtems_malloc().
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tx-support.h"
+
+void *__real_rtems_malloc( size_t );
+
+void *__wrap_rtems_malloc( size_t );
+
+static uint32_t fail_when_counter;
+
+void MemoryAllocationFailWhen( uint32_t counter )
+{
+ fail_when_counter = counter;
+}
+
+static bool IsFail( void )
+{
+ uint32_t counter;
+
+ counter = fail_when_counter;
+
+ if ( counter == 1 ) {
+ fail_when_counter = 0;
+ return true;
+ }
+
+ if ( counter > 1 ) {
+ fail_when_counter = counter - 1;
+ }
+
+ return false;
+}
+
+void *__wrap_rtems_malloc( size_t size )
+{
+ if ( IsFail() ) {
+ return NULL;
+ }
+
+ return __real_rtems_malloc( size );
+}
diff --git a/testsuites/validation/tx-preemption-intervention.c b/testsuites/validation/tx-preemption-intervention.c
new file mode 100644
index 0000000000..f66ab839e5
--- /dev/null
+++ b/testsuites/validation/tx-preemption-intervention.c
@@ -0,0 +1,155 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This source file contains the implementation of
+ * SetPreemptionIntervention().
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tx-support.h"
+
+#include <rtems/sysinit.h>
+#include <rtems/score/chainimpl.h>
+#include <rtems/score/percpu.h>
+#include <rtems/score/threadimpl.h>
+
+#include <rtems/test.h>
+
+#if defined(RTEMS_SMP)
+typedef struct {
+ void ( *handler )( void * );
+ void *arg;
+ Scheduler_Context scheduler_context;
+ Scheduler_Node scheduler_node;
+ Thread_Control thread;
+} PreemptionInterventionContext;
+
+static PreemptionInterventionContext preemption_intervention_instance;
+
+static bool PreemptionInterventionAskForHelp(
+ const Scheduler_Control *scheduler,
+ Thread_Control *thread,
+ Scheduler_Node *node
+)
+{
+ PreemptionInterventionContext *ctx;
+ void ( *handler )( void * );
+ void *arg;
+
+ (void) scheduler;
+ (void) thread;
+ (void) node;
+
+ ctx = &preemption_intervention_instance;
+ handler = ctx->handler;
+ arg = ctx->arg;
+ ctx->handler = NULL;
+ ctx->arg = NULL;
+ ( *handler )( arg );
+
+ return true;
+}
+
+static const Scheduler_Control preemption_intervention_scheduler = {
+ .context = &preemption_intervention_instance.scheduler_context,
+ .Operations = {
+ .ask_for_help = PreemptionInterventionAskForHelp
+ }
+};
+
+static void PreemptionInterventionInitialize( void )
+{
+ PreemptionInterventionContext *ctx;
+
+ ctx = &preemption_intervention_instance;
+
+ _Chain_Initialize_node( &ctx->thread.Scheduler.Help_node );
+ _Thread_queue_Initialize(
+ &ctx->thread.Join_queue,
+ "Preemption Intervention"
+ );
+ _ISR_lock_Initialize(
+ &ctx->scheduler_context.Lock,
+ "Preemption Intervention"
+ );
+ _Scheduler_Node_do_initialize(
+ &preemption_intervention_scheduler,
+ &ctx->scheduler_node,
+ &ctx->thread,
+ 0
+ );
+ _Chain_Initialize_one(
+ &ctx->thread.Scheduler.Scheduler_nodes,
+ &ctx->scheduler_node.Thread.Scheduler_node.Chain
+ );
+}
+
+RTEMS_SYSINIT_ITEM(
+ PreemptionInterventionInitialize,
+ RTEMS_SYSINIT_DEVICE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+#endif
+
+void SetPreemptionIntervention(
+ struct Per_CPU_Control *cpu,
+ void ( *handler )( void * ),
+ void *arg
+)
+{
+#if defined(RTEMS_SMP)
+ PreemptionInterventionContext *ctx;
+ rtems_interrupt_level level;
+ ISR_lock_Context lock_context;
+
+ ctx = &preemption_intervention_instance;
+ T_quiet_assert_null( ctx->handler );
+ ctx->handler = handler;
+ ctx->arg = arg;
+
+ rtems_interrupt_local_disable( level );
+ _Per_CPU_Acquire( cpu, &lock_context );
+ _Chain_Append_unprotected(
+ &cpu->Threads_in_need_for_help,
+ &ctx->thread.Scheduler.Help_node
+ );
+ _Per_CPU_Release( cpu, &lock_context );
+ rtems_interrupt_local_enable( level );
+#else
+ (void) cpu;
+ (void) handler;
+ (void) arg;
+#endif
+}
diff --git a/testsuites/validation/tx-support.c b/testsuites/validation/tx-support.c
index dcb7603832..64ebe260f6 100644
--- a/testsuites/validation/tx-support.c
+++ b/testsuites/validation/tx-support.c
@@ -3,17 +3,14 @@
/**
* @file
*
- * @ingroup RTEMSTestSuites
+ * @ingroup RTEMSTestSuitesValidation
*
- * @brief This source file contains the definition of DeleteTask(),
- * DoCreateTask(), GetMode(), GetPriority(), GetSelfPriority(),
- * ReceiveAnyEvents(), RestoreRunnerASR(), RestoreRunnerMode(),
- * RestoreRunnerPriority(), SendEvents(), SetMode(), SetSelfPriority(),
- * SetPriority(), and StartTask().
+ * @brief This source file contains the implementation of support functions for
+ * the validation test cases.
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,8 +39,16 @@
#endif
#include "tx-support.h"
+#include "ts-config.h"
#include <rtems/test.h>
+#include <rtems/score/percpu.h>
+#include <rtems/score/smpimpl.h>
+#include <rtems/score/threaddispatch.h>
+#include <rtems/score/threadimpl.h>
+#include <rtems/rtems/semimpl.h>
+
+#include <string.h>
rtems_id DoCreateTask( rtems_name name, rtems_task_priority priority )
{
@@ -53,7 +58,7 @@ rtems_id DoCreateTask( rtems_name name, rtems_task_priority priority )
sc = rtems_task_create(
name,
priority,
- RTEMS_MINIMUM_STACK_SIZE,
+ TEST_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&id
@@ -77,33 +82,115 @@ void DeleteTask( rtems_id id )
rtems_status_code sc;
sc = rtems_task_delete( id );
- T_rsc_success( sc );
+ T_quiet_rsc_success( sc );
}
}
-rtems_event_set ReceiveAnyEvents( void )
+void SuspendTask( rtems_id id )
+{
+ rtems_status_code sc;
+
+ sc = rtems_task_suspend( id );
+ T_quiet_rsc_success( sc );
+}
+
+void SuspendSelf( void )
+{
+ SuspendTask( RTEMS_SELF );
+}
+
+void ResumeTask( rtems_id id )
+{
+ rtems_status_code sc;
+
+ sc = rtems_task_resume( id );
+ T_quiet_rsc_success( sc );
+}
+
+bool IsTaskSuspended( rtems_id id )
+{
+ rtems_status_code sc;
+
+ sc = rtems_task_is_suspended( id );
+ T_quiet_true( sc == RTEMS_SUCCESSFUL || sc == RTEMS_ALREADY_SUSPENDED );
+
+ return sc == RTEMS_ALREADY_SUSPENDED;
+}
+
+rtems_event_set QueryPendingEvents( void )
{
rtems_status_code sc;
rtems_event_set events;
events = 0;
sc = rtems_event_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_EVENT_ALL | RTEMS_NO_WAIT,
+ 0,
+ &events
+ );
+ T_quiet_rsc_success( sc );
+
+ return events;
+}
+
+rtems_event_set PollAnyEvents( void )
+{
+ rtems_event_set events;
+
+ events = 0;
+ (void) rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_EVENT_ANY | RTEMS_NO_WAIT,
+ 0,
+ &events
+ );
+
+ return events;
+}
+
+rtems_event_set ReceiveAnyEvents( void )
+{
+ return ReceiveAnyEventsTimed( RTEMS_NO_TIMEOUT );
+}
+
+rtems_event_set ReceiveAnyEventsTimed( rtems_interval ticks )
+{
+ rtems_event_set events;
+
+ events = 0;
+ (void) rtems_event_receive(
RTEMS_ALL_EVENTS,
RTEMS_EVENT_ANY | RTEMS_WAIT,
- RTEMS_NO_TIMEOUT,
+ ticks,
&events
);
- T_rsc_success( sc );
return events;
}
+void ReceiveAllEvents( rtems_event_set events )
+{
+ rtems_status_code sc;
+ rtems_event_set received;
+
+ received = 0;
+ sc = rtems_event_receive(
+ events,
+ RTEMS_EVENT_ALL | RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT,
+ &received
+ );
+ T_quiet_rsc_success( sc );
+ T_quiet_eq_u32( received, events );
+}
+
void SendEvents( rtems_id id, rtems_event_set events )
{
rtems_status_code sc;
sc = rtems_event_send( id, events );
- T_rsc_success( sc );
+ T_quiet_rsc_success( sc );
}
rtems_mode GetMode( void )
@@ -117,7 +204,7 @@ rtems_mode SetMode( rtems_mode set, rtems_mode mask )
rtems_mode previous;
sc = rtems_task_mode( set, mask, &previous );
- T_rsc_success( sc );
+ T_quiet_rsc_success( sc );
return previous;
}
@@ -127,13 +214,32 @@ rtems_task_priority GetPriority( rtems_id id )
return SetPriority( id, RTEMS_CURRENT_PRIORITY );
}
+rtems_task_priority GetPriorityByScheduler(
+ rtems_id task_id,
+ rtems_id scheduler_id
+)
+{
+ rtems_status_code sc;
+ rtems_task_priority priority;
+
+ priority = PRIO_INVALID;
+ sc = rtems_task_get_priority( task_id, scheduler_id, &priority );
+
+ if ( sc != RTEMS_SUCCESSFUL ) {
+ return PRIO_INVALID;
+ }
+
+ return priority;
+}
+
rtems_task_priority SetPriority( rtems_id id, rtems_task_priority priority )
{
rtems_status_code sc;
rtems_task_priority previous;
+ previous = PRIO_INVALID;
sc = rtems_task_set_priority( id, priority, &previous );
- T_rsc_success( sc );
+ T_quiet_rsc_success( sc );
return previous;
}
@@ -148,12 +254,293 @@ rtems_task_priority SetSelfPriority( rtems_task_priority priority )
return SetPriority( RTEMS_SELF, priority );
}
+rtems_task_priority SetSelfPriorityNoYield( rtems_task_priority priority )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ /*
+ * If the priority is lowered, then this sequence ensures that we do not
+ * carry out an implicit yield.
+ */
+
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'T', 'E', 'M', 'P' ),
+ 0,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_PRIORITY_CEILING,
+ 1,
+ &id
+ );
+ T_quiet_rsc_success( sc );
+
+ priority = SetSelfPriority( priority );
+ ReleaseMutex( id );
+ DeleteMutex( id );
+
+ return priority;
+}
+
+rtems_id GetScheduler( rtems_id id )
+{
+ rtems_status_code sc;
+ rtems_id scheduler_id;
+
+ scheduler_id = 0xffffffff;
+ sc = rtems_task_get_scheduler( id, &scheduler_id );
+ T_quiet_rsc_success( sc );
+
+ return scheduler_id;
+}
+
+rtems_id GetSelfScheduler( void )
+{
+ return GetScheduler( RTEMS_SELF );
+}
+
+void SetScheduler(
+ rtems_id task_id,
+ rtems_id scheduler_id,
+ rtems_task_priority priority
+)
+{
+ rtems_status_code sc;
+
+ sc = rtems_task_set_scheduler( task_id, scheduler_id, priority );
+ T_quiet_rsc_success( sc );
+}
+
+void SetSelfScheduler( rtems_id scheduler_id, rtems_task_priority priority )
+{
+ SetScheduler( RTEMS_SELF, scheduler_id, priority );
+}
+
+void GetAffinity( rtems_id id, cpu_set_t *set )
+{
+ rtems_status_code sc;
+
+ CPU_ZERO( set );
+ sc = rtems_task_get_affinity( id, sizeof( *set ), set );
+ T_quiet_rsc_success( sc );
+}
+
+void GetSelfAffinity( cpu_set_t *set )
+{
+ GetAffinity( RTEMS_SELF, set );
+}
+
+void SetAffinity( rtems_id id, const cpu_set_t *set )
+{
+ rtems_status_code sc;
+
+ sc = rtems_task_set_affinity( id, sizeof( *set ), set );
+ T_quiet_rsc_success( sc );
+}
+
+void SetSelfAffinity( const cpu_set_t *set )
+{
+ SetAffinity( RTEMS_SELF, set );
+}
+
+void SetAffinityOne( rtems_id id, uint32_t cpu_index )
+{
+ cpu_set_t set;
+
+ CPU_ZERO( &set );
+ CPU_SET( (int) cpu_index, &set );
+ SetAffinity( id, &set );
+}
+
+void SetSelfAffinityOne( uint32_t cpu_index )
+{
+ SetAffinityOne( RTEMS_SELF, cpu_index );
+}
+
+void SetAffinityAll( rtems_id id )
+{
+ cpu_set_t set;
+
+ CPU_FILL( &set );
+ SetAffinity( id, &set );
+}
+
+void SetSelfAffinityAll( void )
+{
+ SetAffinityAll( RTEMS_SELF );
+}
+
+void Yield( void )
+{
+ rtems_status_code sc;
+
+ sc = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+ T_quiet_rsc_success( sc );
+}
+
+void YieldTask( rtems_id id )
+{
+ Thread_Control *the_thread;
+ ISR_lock_Context lock_context;
+ Per_CPU_Control *cpu_self;
+
+ the_thread = _Thread_Get( id, &lock_context );
+
+ if ( the_thread == NULL ) {
+ return;
+ }
+
+ cpu_self = _Thread_Dispatch_disable_critical( &lock_context );
+ _ISR_lock_ISR_enable( &lock_context);
+ _Thread_Yield( the_thread );
+ _Thread_Dispatch_direct( cpu_self );
+}
+
+void AddProcessor( rtems_id scheduler_id, uint32_t cpu_index )
+{
+ rtems_status_code sc;
+
+ sc = rtems_scheduler_add_processor( scheduler_id, cpu_index );
+ T_quiet_rsc_success( sc );
+}
+
+void RemoveProcessor( rtems_id scheduler_id, uint32_t cpu_index )
+{
+ rtems_status_code sc;
+
+ sc = rtems_scheduler_remove_processor( scheduler_id, cpu_index );
+ T_quiet_rsc_success( sc );
+}
+
+rtems_id CreateMutex( void )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ id = INVALID_ID;
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'U', 'T', 'X' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_INHERIT_PRIORITY,
+ 0,
+ &id
+ );
+ T_rsc_success( sc );
+
+ return id;
+}
+
+rtems_id CreateMutexNoProtocol( void )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ id = INVALID_ID;
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'U', 'T', 'X' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY,
+ 0,
+ &id
+ );
+ T_rsc_success( sc );
+
+ return id;
+}
+
+rtems_id CreateMutexFIFO( void )
+{
+ rtems_status_code sc;
+ rtems_id id;
+
+ id = INVALID_ID;
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'U', 'T', 'X' ),
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
+ 0,
+ &id
+ );
+ T_rsc_success( sc );
+
+ return id;
+}
+
+void DeleteMutex( rtems_id id )
+{
+ if ( id != INVALID_ID ) {
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_delete( id );
+ T_rsc_success( sc );
+ }
+}
+
+bool IsMutexOwner( rtems_id id )
+{
+ Semaphore_Control *the_semaphore;
+ Thread_queue_Context queue_context;
+
+ the_semaphore = _Semaphore_Get( id, &queue_context );
+ if ( the_semaphore == NULL ) {
+ return false;
+ }
+
+ _ISR_lock_ISR_enable( &queue_context.Lock_context.Lock_context );
+ return the_semaphore->Core_control.Wait_queue.Queue.owner ==
+ _Thread_Get_executing();
+}
+
+void ObtainMutex( rtems_id id )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_obtain( id, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
+ T_rsc_success( sc );
+}
+
+void ObtainMutexTimed( rtems_id id, rtems_interval ticks )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_obtain( id, RTEMS_WAIT, ticks );
+ T_rsc_success( sc );
+}
+
+void ObtainMutexDeadlock( rtems_id id )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_obtain( id, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
+ T_rsc( sc, RTEMS_INCORRECT_STATE );
+}
+
+void ReleaseMutex( rtems_id id )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_release( id );
+ T_rsc_success( sc );
+}
+
+Thread_queue_Queue *GetMutexThreadQueue( rtems_id id )
+{
+ Semaphore_Control *the_semaphore;
+ Thread_queue_Context queue_context;
+
+ the_semaphore = _Semaphore_Get( id, &queue_context );
+ if ( the_semaphore == NULL ) {
+ return NULL;
+ }
+
+ _ISR_lock_ISR_enable( &queue_context.Lock_context.Lock_context );
+ return &the_semaphore->Core_control.Wait_queue.Queue;
+}
+
void RestoreRunnerASR( void )
{
rtems_status_code sc;
sc = rtems_signal_catch( NULL, RTEMS_DEFAULT_MODES );
- T_rsc_success( sc );
+ T_quiet_rsc_success( sc );
}
void RestoreRunnerMode( void )
@@ -162,10 +549,485 @@ void RestoreRunnerMode( void )
rtems_mode mode;
sc = rtems_task_mode( RTEMS_DEFAULT_MODES, RTEMS_ALL_MODE_MASKS, &mode );
- T_rsc_success( sc );
+ T_quiet_rsc_success( sc );
}
void RestoreRunnerPriority( void )
{
- SetSelfPriority( PRIO_ULTRA_HIGH );
+ SetSelfPriority( 1 );
+}
+
+void RestoreRunnerScheduler( void )
+{
+ SetSelfScheduler( SCHEDULER_A_ID, 1 );
+}
+
+Thread_Control *GetThread( rtems_id id )
+{
+ Thread_Control *the_thread;
+ ISR_lock_Context lock_context;
+
+ the_thread = _Thread_Get( id, &lock_context );
+
+ if ( the_thread == NULL ) {
+ return NULL;
+ }
+
+ _ISR_lock_ISR_enable( &lock_context);
+ return the_thread;
+}
+
+Thread_Control *GetExecuting( void )
+{
+ return _Thread_Get_executing();
+}
+
+void KillZombies( void )
+{
+ _RTEMS_Lock_allocator();
+ _Thread_Kill_zombies();
+ _RTEMS_Unlock_allocator();
+}
+
+void WaitForExecutionStop( rtems_id task_id )
+{
+#if defined( RTEMS_SMP )
+ Thread_Control *the_thread;
+
+ the_thread = GetThread( task_id );
+ T_assert_not_null( the_thread );
+
+ while ( _Thread_Is_executing_on_a_processor( the_thread ) ) {
+ /* Wait */
+ }
+#else
+ (void) task_id;
+#endif
+}
+
+void WaitForIntendToBlock( rtems_id task_id )
+{
+#if defined( RTEMS_SMP )
+ Thread_Control *the_thread;
+ Thread_Wait_flags intend_to_block;
+
+ the_thread = GetThread( task_id );
+ T_assert_not_null( the_thread );
+
+ intend_to_block = THREAD_WAIT_CLASS_OBJECT |
+ THREAD_WAIT_STATE_INTEND_TO_BLOCK;
+
+ while ( _Thread_Wait_flags_get_acquire( the_thread ) != intend_to_block ) {
+ /* Wait */
+ }
+#else
+ (void) task_id;
+#endif
+}
+
+void WaitForHeir( uint32_t cpu_index, rtems_id task_id )
+{
+ Per_CPU_Control *cpu;
+
+ cpu = _Per_CPU_Get_by_index( cpu_index );
+
+ while ( cpu->heir->Object.id != task_id ) {
+ RTEMS_COMPILER_MEMORY_BARRIER();
+ }
+}
+
+void WaitForNextTask( uint32_t cpu_index, rtems_id task_id )
+{
+ Per_CPU_Control *cpu;
+
+ cpu = _Per_CPU_Get_by_index( cpu_index );
+
+ while ( cpu->heir->Object.id == task_id ) {
+ RTEMS_COMPILER_MEMORY_BARRIER();
+ }
+
+ while ( cpu->thread_dispatch_disable_level != 0 ) {
+ RTEMS_COMPILER_MEMORY_BARRIER();
+ }
+}
+
+void GetTaskTimerInfo( rtems_id id, TaskTimerInfo *info )
+{
+ GetTaskTimerInfoByThread( GetThread( id ), info );
+}
+
+void GetTaskTimerInfoByThread(
+ struct _Thread_Control *thread,
+ TaskTimerInfo *info
+)
+{
+ info->expire_ticks = 0;
+ info->expire_timespec.tv_sec = -1;
+ info->expire_timespec.tv_nsec = -1;
+
+ if ( thread != NULL ) {
+ ISR_lock_Context lock_context;
+ ISR_lock_Context lock_context_2;
+ Per_CPU_Control *cpu;
+
+ _ISR_lock_ISR_disable_and_acquire( &thread->Timer.Lock, &lock_context );
+ info->expire_ticks = thread->Timer.Watchdog.expire;
+#if defined( RTEMS_SMP )
+ cpu = thread->Timer.Watchdog.cpu;
+#else
+ cpu = _Per_CPU_Get();
+#endif
+ _Watchdog_Per_CPU_acquire_critical( cpu, &lock_context_2 );
+
+ if ( _Watchdog_Is_scheduled( &thread->Timer.Watchdog ) ) {
+ const Watchdog_Header *hdr;
+
+ hdr = thread->Timer.header;
+
+ if ( hdr == &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_TICKS ] ) {
+ info->state = TASK_TIMER_TICKS;
+ } else {
+ _Watchdog_Ticks_to_timespec(
+ info->expire_ticks,
+ &info->expire_timespec
+ );
+
+ if ( hdr == &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ] ) {
+ info->state = TASK_TIMER_REALTIME;
+ } else {
+ T_quiet_eq_ptr(
+ hdr,
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ]
+ );
+ info->state = TASK_TIMER_MONOTONIC;
+ }
+ }
+ } else {
+ info->state = TASK_TIMER_INACTIVE;
+ }
+
+ _Watchdog_Per_CPU_release_critical( cpu, &lock_context_2 );
+ _ISR_lock_Release_and_ISR_enable( &thread->Timer.Lock, &lock_context );
+ } else {
+ info->state = TASK_TIMER_INVALID;
+ }
+}
+
+#if defined( RTEMS_SMP )
+static void DoWatchdogTick( void *arg )
+{
+ (void) arg;
+ _Watchdog_Tick( _Per_CPU_Get() );
+}
+#endif
+
+void ClockTick( void )
+{
+ Per_CPU_Control *cpu_self;
+
+ cpu_self = _Thread_Dispatch_disable();
+#if defined( RTEMS_SMP )
+ DoWatchdogTick( NULL );
+ _SMP_Othercast_action( DoWatchdogTick, NULL );
+#else
+ _Watchdog_Tick( cpu_self );
+#endif
+ _Thread_Dispatch_enable( cpu_self );
+}
+
+static void FinalWatchdogTick( Per_CPU_Control *cpu )
+{
+ ISR_lock_Context lock_context;
+ Watchdog_Header *header;
+ Watchdog_Control *first;
+
+ _ISR_lock_ISR_disable_and_acquire( &cpu->Watchdog.Lock, &lock_context );
+
+ header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_TICKS ];
+ first = _Watchdog_Header_first( header );
+
+ if ( first != NULL ) {
+ _Watchdog_Tickle(
+ header,
+ first,
+ UINT64_MAX,
+ &cpu->Watchdog.Lock,
+ &lock_context
+ );
+ }
+
+ header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ];
+ first = _Watchdog_Header_first( header );
+
+ if ( first != NULL ) {
+ _Watchdog_Tickle(
+ header,
+ first,
+ UINT64_MAX,
+ &cpu->Watchdog.Lock,
+ &lock_context
+ );
+ }
+
+ header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ];
+ first = _Watchdog_Header_first( header );
+
+ if ( first != NULL ) {
+ _Watchdog_Tickle(
+ header,
+ first,
+ UINT64_MAX,
+ &cpu->Watchdog.Lock,
+ &lock_context
+ );
+ }
+
+ _ISR_lock_Release_and_ISR_enable( &cpu->Watchdog.Lock, &lock_context );
+}
+
+#if defined( RTEMS_SMP )
+static void DoFinalWatchdogTick( void *arg )
+{
+ (void) arg;
+ FinalWatchdogTick( _Per_CPU_Get() );
+}
+#endif
+
+void FinalClockTick( void )
+{
+ Per_CPU_Control *cpu_self;
+
+ cpu_self = _Thread_Dispatch_disable();
+#if defined( RTEMS_SMP )
+ DoFinalWatchdogTick( NULL );
+ _SMP_Othercast_action( DoFinalWatchdogTick, NULL );
+#else
+ FinalWatchdogTick( cpu_self );
+#endif
+ _Thread_Dispatch_enable( cpu_self );
+}
+
+static FatalHandler fatal_handler;
+
+static void *fatal_arg;
+
+void FatalInitialExtension(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+)
+{
+ FatalHandler fatal;
+
+ T_quiet_false( always_set_to_false );
+ fatal = fatal_handler;
+
+ if ( fatal != NULL ) {
+ ( *fatal )( source, code, fatal_arg );
+ }
+}
+
+void SetFatalHandler( FatalHandler fatal, void *arg )
+{
+ fatal_handler = fatal;
+ fatal_arg = arg;
+}
+
+static rtems_id task_switch_id;
+
+static rtems_task_switch_extension task_switch_extension;
+
+static void TaskSwitchExtension( rtems_tcb *executing, rtems_tcb *heir )
+{
+ ( *task_switch_extension )( executing, heir );
+}
+
+void SetTaskSwitchExtension( rtems_task_switch_extension task_switch )
+{
+ rtems_task_switch_extension last;
+ rtems_status_code sc;
+
+ last = task_switch_extension;
+
+ if ( task_switch == NULL ) {
+ if ( last != NULL ) {
+ sc = rtems_extension_delete( task_switch_id );
+ T_quiet_rsc_success( sc );
+
+ task_switch_extension = NULL;
+ }
+ } else {
+ task_switch_extension = task_switch;
+
+ if ( last == NULL ) {
+ rtems_extensions_table table = {
+ .thread_switch = TaskSwitchExtension
+ };
+
+ sc = rtems_extension_create(
+ rtems_build_name( 'T', 'S', 'W', 'I' ),
+ &table,
+ &task_switch_id
+ );
+ T_quiet_rsc_success( sc );
+ }
+ }
+}
+
+void ClearExtensionCalls( ExtensionCalls *calls )
+{
+ memset( calls, 0, sizeof( *calls ) );
+}
+
+void CopyExtensionCalls( const ExtensionCalls *from, ExtensionCalls *to )
+{
+ memcpy( to, from, sizeof( *to ) );
+}
+
+#if defined(RTEMS_SMP)
+static volatile bool delay_thread_dispatch;
+
+static void DelayThreadDispatchHandler( void *arg )
+{
+ (void) arg;
+
+ while ( delay_thread_dispatch ) {
+ /* Wait */
+ }
+}
+
+static const Per_CPU_Job_context delay_thread_dispatch_context = {
+ .handler = DelayThreadDispatchHandler
+};
+
+static Per_CPU_Job delay_thread_dispatch_job = {
+ .context = &delay_thread_dispatch_context
+};
+#endif
+
+void StartDelayThreadDispatch( uint32_t cpu_index )
+{
+#if defined(RTEMS_SMP)
+ if ( rtems_configuration_get_maximum_processors() > cpu_index ) {
+ delay_thread_dispatch = true;
+ _Per_CPU_Submit_job(
+ _Per_CPU_Get_by_index( cpu_index ),
+ &delay_thread_dispatch_job
+ );
+ }
+#endif
+}
+
+void StopDelayThreadDispatch( uint32_t cpu_index )
+{
+#if defined(RTEMS_SMP)
+ if ( rtems_configuration_get_maximum_processors() > cpu_index ) {
+ Per_CPU_Control *cpu_self;
+
+ cpu_self = _Thread_Dispatch_disable();
+ delay_thread_dispatch = false;
+ _Per_CPU_Wait_for_job(
+ _Per_CPU_Get_by_index( cpu_index ),
+ &delay_thread_dispatch_job
+ );
+ _Thread_Dispatch_enable( cpu_self );
+ }
+#endif
+}
+
+bool AreInterruptsEnabled( void )
+{
+ return _ISR_Get_level() == 0;
+}
+
+static bool IsWhiteSpace( char c )
+{
+ return c == ' ' || c == '\t';
}
+
+bool IsWhiteSpaceOnly( const char *s )
+{
+ char c;
+
+ while ( ( c = *s ) != '\0' ) {
+ if ( !IsWhiteSpace( c ) ) {
+ return false;
+ }
+
+ ++s;
+ }
+
+ return true;
+}
+
+static const char *EatWhiteSpace( const char *s )
+{
+ char c;
+
+ while ( ( c = *s ) != '\0' ) {
+ if ( !IsWhiteSpace( c ) ) {
+ break;
+ }
+
+ ++s;
+ }
+
+ return s;
+}
+
+bool IsEqualIgnoreWhiteSpace( const char *a, const char *b )
+{
+ while ( true ) {
+ a = EatWhiteSpace( a );
+ b = EatWhiteSpace( b );
+
+ if ( *a != *b ) {
+ return false;
+ }
+
+ if ( *a == '\0' ) {
+ return true;
+ }
+
+ ++a;
+ ++b;
+ }
+
+ return true;
+}
+
+#if defined(RTEMS_SMP)
+bool TicketLockIsAvailable( const SMP_ticket_lock_Control *lock )
+{
+ unsigned int now_serving;
+ unsigned int next_ticket;
+
+ now_serving = _Atomic_Load_uint( &lock->now_serving, ATOMIC_ORDER_RELAXED );
+ next_ticket = _Atomic_Load_uint( &lock->next_ticket, ATOMIC_ORDER_RELAXED );
+
+ return now_serving == next_ticket;
+}
+
+void TicketLockWaitForOwned( const SMP_ticket_lock_Control *lock )
+{
+ while ( TicketLockIsAvailable( lock ) ) {
+ /* Wait */
+ }
+}
+
+void TicketLockWaitForOthers(
+ const SMP_ticket_lock_Control *lock,
+ unsigned int others
+)
+{
+ unsigned int expected;
+ unsigned int actual;
+
+ expected = _Atomic_Load_uint( &lock->now_serving, ATOMIC_ORDER_RELAXED );
+ expected += others + 1;
+
+ do {
+ actual = _Atomic_Load_uint( &lock->next_ticket, ATOMIC_ORDER_RELAXED );
+ } while ( expected != actual );
+}
+#endif
diff --git a/testsuites/validation/tx-support.h b/testsuites/validation/tx-support.h
index b0e466fda1..378bc4c466 100644
--- a/testsuites/validation/tx-support.h
+++ b/testsuites/validation/tx-support.h
@@ -3,14 +3,14 @@
/**
* @file
*
- * @ingroup RTEMSTestSuites
+ * @ingroup RTEMSTestSuitesValidation
*
* @brief This header file provides the support functions for the validation
* test cases.
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -40,19 +40,21 @@
#include <rtems.h>
#include <rtems/irq-extension.h>
#include <rtems/score/atomic.h>
+#include <rtems/score/threadq.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
- * @addtogroup RTEMSTestSuites
+ * @addtogroup RTEMSTestSuitesValidation
*
* @{
*/
typedef enum {
PRIO_PSEUDO_ISR,
+ PRIO_VERY_ULTRA_HIGH,
PRIO_ULTRA_HIGH,
PRIO_VERY_HIGH,
PRIO_HIGH,
@@ -63,24 +65,84 @@ typedef enum {
} Priority;
/**
+ * @brief This constants represents the default priority of the runner task.
+ */
+#define PRIO_DEFAULT 1
+
+/**
+ * @brief This constants represents an invalid RTEMS task priority value.
+ *
+ * It should be an invalid priority value which is not equal to
+ * RTEMS_CURRENT_PRIORITY and RTEMS_TIMER_SERVER_DEFAULT_PRIORITY.
+ */
+#define PRIO_INVALID 0xfffffffe
+
+/**
+ * @brief This constants represents a priority which is close to the priority
+ * of the idle thread.
+ *
+ * It may be used for the runner thread together with PRIO_FLEXIBLE for worker
+ * threads.
+ */
+#define PRIO_NEARLY_IDLE 126
+
+/**
+ * @brief This constants represents a priority with a wider range of higher and
+ * lower priorities around it.
+ *
+ * It may be used for the worker threads together with PRIO_NEARLY_IDLE for the
+ * runner thread.
+ */
+#define PRIO_FLEXIBLE 64
+
+/**
* @brief This constants represents an invalid RTEMS object identifier.
*/
#define INVALID_ID 0xfffffffd
+/**
+ * @brief This constants represents an object name for tests.
+ */
+#define OBJECT_NAME rtems_build_name( 'T', 'E', 'S', 'T' )
+
#define CreateTask( name, priority ) \
DoCreateTask( \
rtems_build_name( name[ 0 ], name[ 1 ], name[ 2 ], name[ 3 ] ), \
priority \
)
+#define SCHEDULER_A_ID 0xf010001
+
+#define SCHEDULER_B_ID 0xf010002
+
+#define SCHEDULER_C_ID 0xf010003
+
+#define SCHEDULER_D_ID 0xf010004
+
rtems_id DoCreateTask( rtems_name name, rtems_task_priority priority );
void StartTask( rtems_id id, rtems_task_entry entry, void *arg );
void DeleteTask( rtems_id id );
+void SuspendTask( rtems_id id );
+
+void SuspendSelf( void );
+
+void ResumeTask( rtems_id id );
+
+bool IsTaskSuspended( rtems_id id );
+
+rtems_event_set QueryPendingEvents( void );
+
+rtems_event_set PollAnyEvents( void );
+
rtems_event_set ReceiveAnyEvents( void );
+rtems_event_set ReceiveAnyEventsTimed( rtems_interval ticks );
+
+void ReceiveAllEvents( rtems_event_set events );
+
void SendEvents( rtems_id id, rtems_event_set events );
rtems_mode GetMode( void );
@@ -89,18 +151,232 @@ rtems_mode SetMode( rtems_mode set, rtems_mode mask );
rtems_task_priority GetPriority( rtems_id id );
+rtems_task_priority GetPriorityByScheduler(
+ rtems_id task_id,
+ rtems_id scheduler_id
+);
+
rtems_task_priority SetPriority( rtems_id id, rtems_task_priority priority );
rtems_task_priority GetSelfPriority( void );
rtems_task_priority SetSelfPriority( rtems_task_priority priority );
+rtems_task_priority SetSelfPriorityNoYield( rtems_task_priority priority );
+
+rtems_id GetScheduler( rtems_id id );
+
+rtems_id GetSelfScheduler( void );
+
+void SetScheduler(
+ rtems_id task_id,
+ rtems_id scheduler_id,
+ rtems_task_priority priority
+);
+
+void SetSelfScheduler( rtems_id scheduler_id, rtems_task_priority priority );
+
+void GetAffinity( rtems_id id, cpu_set_t *set );
+
+void GetSelfAffinity( cpu_set_t *set );
+
+void SetAffinity( rtems_id id, const cpu_set_t *set );
+
+void SetSelfAffinity( const cpu_set_t *set );
+
+void SetAffinityOne( rtems_id id, uint32_t cpu_index );
+
+void SetSelfAffinityOne( uint32_t cpu_index );
+
+void SetAffinityAll( rtems_id id );
+
+void SetSelfAffinityAll( void );
+
+void Yield( void );
+
+void YieldTask( rtems_id id );
+
+void AddProcessor( rtems_id scheduler_id, uint32_t cpu_index );
+
+void RemoveProcessor( rtems_id scheduler_id, uint32_t cpu_index );
+
+rtems_id CreateMutex( void );
+
+rtems_id CreateMutexNoProtocol( void );
+
+rtems_id CreateMutexFIFO( void );
+
+bool IsMutexOwner( rtems_id id );
+
+void DeleteMutex( rtems_id id );
+
+void ObtainMutex( rtems_id id );
+
+void ObtainMutexTimed( rtems_id id, rtems_interval ticks );
+
+void ObtainMutexDeadlock( rtems_id id );
+
+void ReleaseMutex( rtems_id id );
+
+struct Thread_queue_Queue;
+
+struct Thread_queue_Queue *GetMutexThreadQueue( rtems_id id );
+
void RestoreRunnerASR( void );
void RestoreRunnerMode( void );
void RestoreRunnerPriority( void );
+void RestoreRunnerScheduler( void );
+
+struct _Thread_Control;
+
+struct _Thread_Control *GetThread( rtems_id id );
+
+struct _Thread_Control *GetExecuting( void );
+
+void KillZombies( void );
+
+void WaitForExecutionStop( rtems_id task_id );
+
+void WaitForIntendToBlock( rtems_id task_id );
+
+void WaitForHeir( uint32_t cpu_index, rtems_id task_id );
+
+void WaitForNextTask( uint32_t cpu_index, rtems_id task_id );
+
+typedef enum {
+ TASK_TIMER_INVALID,
+ TASK_TIMER_INACTIVE,
+ TASK_TIMER_TICKS,
+ TASK_TIMER_REALTIME,
+ TASK_TIMER_MONOTONIC
+} TaskTimerState;
+
+typedef struct {
+ TaskTimerState state;
+ uint64_t expire_ticks;
+ struct timespec expire_timespec;
+} TaskTimerInfo;
+
+void GetTaskTimerInfo( rtems_id id, TaskTimerInfo *info );
+
+void GetTaskTimerInfoByThread(
+ struct _Thread_Control *thread,
+ TaskTimerInfo *info
+);
+
+void ClockTick( void );
+
+/**
+ * @brief Simulates a clock tick with the final expire time point of
+ * UINT64_MAX for all clocks.
+ *
+ * This function does not update the clock ticks counter.
+ */
+void FinalClockTick( void );
+
+/**
+ * @brief Simulates a single clock tick using the software timecounter.
+ *
+ * In contrast to ClockTick(), this function updates also CLOCK_MONOTONIC and
+ * CLOCK_REALTIME to the next software timecounter clock tick time point.
+ *
+ * This function is designed for test suites not having a clock driver.
+ */
+void TimecounterTick( void );
+
+typedef uint32_t ( *GetTimecountHandler )( void );
+
+/**
+ * @brief Sets the get timecount handler.
+ *
+ * Using this function will replace the timecounter of the clock driver.
+ *
+ * @return Returns the previous get timecount handler.
+ */
+GetTimecountHandler SetGetTimecountHandler( GetTimecountHandler handler );
+
+/**
+ * @brief This constant represents the fake frequency of the software
+ * timecounter.
+ */
+#define SOFTWARE_TIMECOUNTER_FREQUENCY 1000000
+
+/**
+ * @brief Gets the software timecount counter value.
+ *
+ * @return Returns the current software timecounter counter value.
+ */
+uint32_t GetTimecountCounter( void );
+
+/**
+ * @brief Sets and gets the software timecount counter value.
+ *
+ * @param counter is the new software timecounter counter value.
+ *
+ * @return Returns the previous software timecounter counter value.
+ */
+uint32_t SetTimecountCounter( uint32_t counter );
+
+/**
+ * @brief Return the task id of the timer server task
+ *
+ * This function is an attempt to avoid using RTEMS internal global
+ * _Timer_server throughout the validation test code.
+ *
+ * @return Returns the task id of the timer server task, if
+ * rtems_timer_initiate_server() has been invoked before,
+ * otherwise - if the timer server task does not exist -
+ * RTEMS_INVALID_ID is returned.
+ */
+rtems_id GetTimerServerTaskId( void );
+
+/**
+ * @brief Undo the effects of rtems_timer_initiate_server()
+ *
+ * If rtems_timer_initiate_server() was never called before,
+ * nothing is done.
+ *
+ * If rtems_timer_initiate_server() was called before, the
+ * created thread and other resources are freed so that
+ * rtems_timer_initiate_server() can be called again.
+ * There should be no pending timers which are not yet executed
+ * by the server task. Naturally, there should be no
+ * timer server timers scheduled for execution.
+ *
+ * @return Returns true, if rtems_timer_initiate_server() has been
+ * invoked before and the timer server task has indeed been deleted,
+ * otherwise false.
+ */
+bool DeleteTimerServer( void );
+
+typedef struct {
+ struct {
+ const void *begin;
+ void *free_begin;
+ const void *end;
+ } areas[ 2 ];
+ size_t count;
+} MemoryContext;
+
+void MemorySave( MemoryContext *ctx );
+
+void MemoryRestore( const MemoryContext *ctx );
+
+/**
+ * @brief Fails a dynamic memory allocation when the counter reaches zero.
+ *
+ * This function initializes an internal counter which is decremented before
+ * each dynamic memory allocation though the rtems_malloc() directive. When
+ * the counter decrements from one to zero, the allocation fails and NULL will
+ * be returned.
+ *
+ * @param counter is the initial counter value.
+ */
+void MemoryAllocationFailWhen( uint32_t counter );
+
typedef struct {
Chain_Node node;
void ( *handler )( void * );
@@ -114,14 +390,229 @@ void CallWithinISRSubmit( CallWithinISRRequest *request );
void CallWithinISRWait( const CallWithinISRRequest *request );
+void CallWithinISRRaise( void );
+
+void CallWithinISRClear( void );
+
+rtems_vector_number CallWithinISRGetVector( void );
+
+rtems_vector_number GetSoftwareInterruptVector( void );
+
+typedef struct {
+ Thread_queue_Operations tq_ops;
+ const Thread_queue_Operations *wrapped_ops;
+ Thread_queue_Control thread_queue;
+ CallWithinISRRequest isr_request;
+} WrapThreadQueueContext;
+
+void WrapThreadQueueInitialize(
+ WrapThreadQueueContext *ctx,
+ void ( *handler )( void * ),
+ void *arg
+);
+
+void WrapThreadQueueExtract(
+ WrapThreadQueueContext *ctx,
+ struct _Thread_Control *thread
+);
+
+void WrapThreadQueueExtractDirect(
+ WrapThreadQueueContext *ctx,
+ Thread_Control *thread
+);
+
+void WrapThreadQueueDestroy( WrapThreadQueueContext *ctx );
+
+struct Per_CPU_Control;
+
+void SetPreemptionIntervention(
+ struct Per_CPU_Control *cpu,
+ void ( *handler )( void * ),
+ void *arg
+);
+
rtems_vector_number GetValidInterruptVectorNumber(
const rtems_interrupt_attributes *required
);
-rtems_vector_number GetTestableInterruptVector( void );
+rtems_vector_number GetTestableInterruptVector(
+ const rtems_interrupt_attributes *required
+);
+
+rtems_status_code RaiseSoftwareInterrupt( rtems_vector_number vector );
+
+rtems_status_code ClearSoftwareInterrupt( rtems_vector_number vector );
bool HasInterruptVectorEntriesInstalled( rtems_vector_number vector );
+/**
+ * @brief Get the clock and context of a timer from RTEMS internal data.
+ *
+ * With exception of TIMER_DORMANT, the return values are bits or-ed together.
+ *
+ * @param id The timer ID.
+ *
+ * @retval TIMER_DORMANT Either the id argument is invalid or the timer has
+ * never been used before.
+ * @return The TIMER_CLASS_BIT_ON_TASK is set, if the timer server routine
+ * was or will be executed in task context, otherwise it was or will be
+ * executed in interrupt context.
+ *
+ * The TIMER_CLASS_BIT_TIME_OF_DAY is set, if the clock used is or was the
+ * ${/glossary/clock-realtime:/term}, otherwise the
+ * ${/glossary/clock-tick:/term} based clock is or was used.
+ */
+Timer_Classes GetTimerClass( rtems_id id );
+
+/**
+ * @brief This structure provides data used by RTEMS to schedule a timer
+ * service routine.
+ */
+typedef struct {
+ /**
+ * @brief This member contains a reference to the timer service routine.
+ */
+ rtems_timer_service_routine_entry routine;
+ /**
+ * @brief This member contains a reference to the user data to be provided
+ * to the timer service routine.
+ */
+ void *user_data;
+ /**
+ * @brief This member contains the timer interval in ticks or seconds.
+ */
+ Watchdog_Interval interval;
+} Timer_Scheduling_Data;
+
+/**
+ * @brief Get data related to scheduling a timer service routine
+ * from RTEMS internal structures.
+ *
+ * @param id The timer ID.
+ * @param[out] data If the reference is not NULL, the data retrieved from
+ * internal RTEMS structures is stored here.
+ */
+void GetTimerSchedulingData(
+ rtems_id id,
+ Timer_Scheduling_Data *data
+);
+
+/**
+ * @brief The various states of a timer.
+ */
+typedef enum {
+ TIMER_INVALID,
+ TIMER_INACTIVE,
+ TIMER_SCHEDULED,
+ TIMER_PENDING
+} Timer_States;
+
+/**
+ * @brief Get the state of a timer from RTEMS internal data.
+ *
+ * @param id The timer ID.
+ *
+ * @retval TIMER_INVALID The id argument is invalid.
+ * @retval TIMER_INACTIVE The timer is not scheduled (i.e. it is
+ * new, run off, or canceled).
+ * @retval TIMER_SCHEDULED The timer is scheduled.
+ * @retval TIMER_PENDING The timer is pending.
+ */
+Timer_States GetTimerState( rtems_id id );
+
+/**
+ * @brief Mark the realtime clock as never set.
+ *
+ * This function manipulates RTEMS internal data structures to undo the
+ * effect of rtems_clock_set(). If the clock is not set, the function has no
+ * effect.
+ */
+void UnsetClock( void );
+
+void FatalInitialExtension(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+);
+
+typedef void ( *FatalHandler )(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+);
+
+void SetFatalHandler( FatalHandler fatal, void *arg );
+
+void SetTaskSwitchExtension( rtems_task_switch_extension task_switch );
+
+typedef struct {
+ uint32_t fatal;
+ uint32_t thread_begin;
+ uint32_t thread_create;
+ uint32_t thread_delete;
+ uint32_t thread_exitted;
+ uint32_t thread_restart;
+ uint32_t thread_start;
+ uint32_t thread_switch;
+ uint32_t thread_terminate;
+} ExtensionCalls;
+
+void ClearExtensionCalls( ExtensionCalls *calls );
+
+void CopyExtensionCalls( const ExtensionCalls *from, ExtensionCalls *to );
+
+void SetIORelaxHandler( void ( *handler )( void * ), void *arg );
+
+void StartDelayThreadDispatch( uint32_t cpu_index );
+
+void StopDelayThreadDispatch( uint32_t cpu_index );
+
+bool AreInterruptsEnabled( void );
+
+bool IsWhiteSpaceOnly( const char *s );
+
+bool IsEqualIgnoreWhiteSpace( const char *a, const char *b );
+
+#if defined(RTEMS_SMP)
+bool TicketLockIsAvailable( const SMP_ticket_lock_Control *lock );
+
+void TicketLockWaitForOwned( const SMP_ticket_lock_Control *lock );
+
+void TicketLockWaitForOthers(
+ const SMP_ticket_lock_Control *lock,
+ unsigned int others
+);
+
+static inline bool ISRLockIsAvailable( const ISR_lock_Control *lock )
+{
+ return TicketLockIsAvailable( &lock->Lock.Ticket_lock );
+}
+
+static inline void ISRLockWaitForOwned( const ISR_lock_Control *lock )
+{
+ TicketLockWaitForOwned( &lock->Lock.Ticket_lock );
+}
+
+static inline void ISRLockWaitForOthers(
+ const ISR_lock_Control *lock,
+ unsigned int others
+)
+{
+ TicketLockWaitForOthers( &lock->Lock.Ticket_lock, others );
+}
+#endif
+
+void *IdleBody( uintptr_t ignored );
+
+/**
+ * @brief This task configurations may be used to construct a task during
+ * tests.
+ *
+ * Only one task shall use this configuration at a time, otherwise two tasks
+ * would share a stack.
+ */
+extern const rtems_task_config DefaultTaskConfig;
+
/** @} */
#ifdef __cplusplus
diff --git a/testsuites/validation/tx-thread-queue.c b/testsuites/validation/tx-thread-queue.c
new file mode 100644
index 0000000000..ee9d2cf96d
--- /dev/null
+++ b/testsuites/validation/tx-thread-queue.c
@@ -0,0 +1,858 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This source file contains the implementation of the thread queue test
+ * support.
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tx-thread-queue.h"
+#include "tx-support.h"
+#include "ts-config.h"
+
+#include <rtems/score/threadimpl.h>
+#include <rtems/rtems/semimpl.h>
+
+void TQSend(
+ TQContext *ctx,
+ TQWorkerKind worker,
+ rtems_event_set events
+)
+{
+#if defined( RTEMS_SMP )
+ ctx->event_received[ worker ] = false;
+#endif
+
+ SendEvents( ctx->worker_id[ worker ], events );
+}
+
+void TQWaitForEventsReceived( const TQContext *ctx, TQWorkerKind worker )
+{
+#if defined( RTEMS_SMP )
+ while ( !ctx->event_received[ worker ] ) {
+ /* Wait */
+ }
+#endif
+}
+
+void TQWaitForExecutionStop( const TQContext *ctx, TQWorkerKind worker )
+{
+#if defined( RTEMS_SMP )
+ WaitForExecutionStop( ctx->worker_id[ worker ] );
+#endif
+}
+
+void TQSendAndWaitForExecutionStop(
+ TQContext *ctx,
+ TQWorkerKind worker,
+ rtems_event_set events
+)
+{
+ TQSend( ctx, worker, events );
+
+#if defined( RTEMS_SMP )
+ TQWaitForEventsReceived( ctx, worker );
+ WaitForExecutionStop( ctx->worker_id[ worker ] );
+#endif
+}
+
+void TQWaitForIntendToBlock( const TQContext *ctx, TQWorkerKind worker )
+{
+ const rtems_tcb *thread;
+ Thread_Wait_flags intend_to_block;
+
+ thread = ctx->worker_tcb[ worker ];
+ intend_to_block = THREAD_WAIT_CLASS_OBJECT |
+ THREAD_WAIT_STATE_INTEND_TO_BLOCK;
+
+ while ( _Thread_Wait_flags_get_acquire( thread ) != intend_to_block ) {
+ /* Wait */
+ }
+}
+
+void TQSendAndWaitForIntendToBlock(
+ TQContext *ctx,
+ TQWorkerKind worker,
+ rtems_event_set events
+)
+{
+ TQSend( ctx, worker, events );
+
+#if defined( RTEMS_SMP )
+ TQWaitForEventsReceived( ctx, worker );
+ TQWaitForIntendToBlock( ctx, worker );
+#endif
+}
+
+void TQSendAndWaitForExecutionStopOrIntendToBlock(
+ TQContext *ctx,
+ TQWorkerKind worker,
+ rtems_event_set events
+)
+{
+#if defined( RTEMS_SMP )
+ const rtems_tcb *thread;
+ Thread_Wait_flags intend_to_block;
+#endif
+
+ TQSend( ctx, worker, events );
+
+#if defined( RTEMS_SMP )
+ TQWaitForEventsReceived( ctx, worker );
+ thread = ctx->worker_tcb[ worker ];
+ intend_to_block = THREAD_WAIT_CLASS_OBJECT |
+ THREAD_WAIT_STATE_INTEND_TO_BLOCK;
+
+ while (
+ _Thread_Is_executing_on_a_processor( thread ) &&
+ _Thread_Wait_flags_get_acquire( thread ) != intend_to_block
+ ) {
+ /* Wait */
+ }
+#endif
+}
+
+void TQSendAndSynchronizeRunner(
+ TQContext *ctx,
+ TQWorkerKind worker,
+ rtems_event_set events
+)
+{
+ T_quiet_eq_u32( QueryPendingEvents() & TQ_EVENT_RUNNER_SYNC, 0 );
+ TQSend( ctx, worker, events | TQ_EVENT_RUNNER_SYNC );
+ TQSynchronizeRunner();
+}
+
+void TQClearDone( TQContext *ctx, TQWorkerKind worker )
+{
+ ctx->done[ worker ] = false;
+}
+
+void TQWaitForDone( const TQContext *ctx, TQWorkerKind worker )
+{
+ while ( !ctx->done[ worker ] ) {
+ /* Wait */
+ }
+}
+
+void TQSynchronizeRunner( void )
+{
+ ReceiveAllEvents( TQ_EVENT_RUNNER_SYNC );
+}
+
+void TQSynchronizeRunner2( void )
+{
+ ReceiveAllEvents( TQ_EVENT_RUNNER_SYNC | TQ_EVENT_RUNNER_SYNC_2 );
+}
+
+void TQResetCounter( TQContext *ctx )
+{
+ ctx->counter = 0;
+ memset( &ctx->worker_counter, 0, sizeof( ctx->worker_counter ) );
+}
+
+uint32_t TQGetCounter( const TQContext *ctx )
+{
+ return ctx->counter;
+}
+
+uint32_t TQGetWorkerCounter( const TQContext *ctx, TQWorkerKind worker )
+{
+ return ctx->worker_counter[ worker ];
+}
+
+void TQMutexObtain( const TQContext *ctx, TQMutex mutex )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_obtain(
+ ctx->mutex_id[ mutex ],
+ RTEMS_WAIT,
+ RTEMS_NO_TIMEOUT
+ );
+ T_rsc_success( sc );
+}
+
+void TQMutexRelease( const TQContext *ctx, TQMutex mutex )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_release( ctx->mutex_id[ mutex ] );
+ T_rsc_success( sc );
+}
+
+void TQSetPriority(
+ const TQContext *ctx,
+ TQWorkerKind worker,
+ Priority priority
+)
+{
+ SetPriority( ctx->worker_id[ worker ], priority );
+}
+
+Priority TQGetPriority( const TQContext *ctx, TQWorkerKind worker )
+{
+ return GetPriority( ctx->worker_id[ worker ] );
+}
+
+void TQSetScheduler(
+ const TQContext *ctx,
+ TQWorkerKind worker,
+ rtems_id scheduler_id,
+ Priority priority
+)
+{
+#if defined( RTEMS_SMP )
+ rtems_status_code sc;
+
+ sc = rtems_task_set_scheduler(
+ ctx->worker_id[ worker ],
+ scheduler_id,
+ priority
+ );
+ T_rsc_success( sc );
+#else
+ (void) scheduler_id;
+ SetPriority( ctx->worker_id[ worker ], priority );
+#endif
+}
+
+static void Count( TQContext *ctx, TQWorkerKind worker )
+{
+ unsigned int counter;
+
+ counter = _Atomic_Fetch_add_uint( &ctx->counter, 1, ATOMIC_ORDER_RELAXED );
+ ctx->worker_counter[ worker ] = counter + 1;
+}
+
+static void Enqueue( TQContext *ctx, TQWorkerKind worker, TQWait wait )
+{
+ ctx->status[ worker ] = TQEnqueue( ctx, wait );
+ Count( ctx, worker );
+}
+
+static void ThreadQueueDeadlock(
+ rtems_fatal_source source,
+ rtems_fatal_code code,
+ void *arg
+)
+{
+ TQContext *ctx;
+
+ ctx = arg;
+ T_eq_int( source, INTERNAL_ERROR_CORE );
+ T_eq_int( code, INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK );
+ SetFatalHandler( NULL, NULL );
+ longjmp( ctx->before_enqueue, 1 );
+}
+
+static void Worker( rtems_task_argument arg, TQWorkerKind worker )
+{
+ TQContext *ctx;
+
+ ctx = (TQContext *) arg;
+
+ while ( true ) {
+ rtems_event_set events;
+
+ events = ReceiveAnyEvents();
+ ctx->event_received[ worker ] = true;
+
+ if ( ( events & TQ_EVENT_HELPER_A_SYNC ) != 0 ) {
+ SendEvents( ctx->worker_id[ TQ_HELPER_A ], TQ_EVENT_RUNNER_SYNC );
+ }
+
+ if ( ( events & TQ_EVENT_HELPER_B_SYNC ) != 0 ) {
+ SendEvents( ctx->worker_id[ TQ_HELPER_B ], TQ_EVENT_RUNNER_SYNC );
+ }
+
+ if ( ( events & TQ_EVENT_SCHEDULER_RECORD_START ) != 0 ) {
+ TQSchedulerRecordStart( ctx );
+ }
+
+ if ( ( events & TQ_EVENT_ENQUEUE_PREPARE ) != 0 ) {
+ TQEnqueuePrepare( ctx );
+ }
+
+ if ( ( events & TQ_EVENT_ENQUEUE ) != 0 ) {
+ Enqueue( ctx, worker, ctx->wait );
+ }
+
+ if ( ( events & TQ_EVENT_ENQUEUE_TIMED ) != 0 ) {
+ Enqueue( ctx, worker, TQ_WAIT_TIMED );
+ }
+
+ if ( ( events & TQ_EVENT_ENQUEUE_FATAL ) != 0 ) {
+ SetFatalHandler( ThreadQueueDeadlock, ctx );
+
+ if ( setjmp( ctx->before_enqueue ) == 0 ) {
+ ctx->status[ worker ] = STATUS_MINUS_ONE;
+ Enqueue( ctx, worker, ctx->wait );
+ } else {
+ ctx->status[ worker ] = STATUS_DEADLOCK;
+ }
+ }
+
+ if ( ( events & TQ_EVENT_TIMEOUT ) != 0 ) {
+ Per_CPU_Control *cpu_self;
+
+ cpu_self = _Thread_Dispatch_disable();
+ _Thread_Timeout( &ctx->worker_tcb[ worker ]->Timer.Watchdog );
+ _Thread_Dispatch_direct( cpu_self );
+ }
+
+ if ( ( events & TQ_EVENT_FLUSH_ALL ) != 0 ) {
+ TQFlush( ctx, true );
+ }
+
+ if ( ( events & TQ_EVENT_FLUSH_PARTIAL ) != 0 ) {
+ TQFlush( ctx, false );
+ }
+
+ if ( ( events & TQ_EVENT_ENQUEUE_DONE ) != 0 ) {
+ TQEnqueueDone( ctx );
+ }
+
+ if ( ( events & TQ_EVENT_SURRENDER ) != 0 ) {
+ Status_Control status;
+
+ status = TQSurrender( ctx );
+ T_eq_int( status, TQConvertStatus( ctx, STATUS_SUCCESSFUL ) );
+ }
+
+ if ( ( events & TQ_EVENT_MUTEX_A_OBTAIN ) != 0 ) {
+ TQMutexObtain( ctx, TQ_MUTEX_A );
+ }
+
+ if ( ( events & TQ_EVENT_MUTEX_A_RELEASE ) != 0 ) {
+ TQMutexRelease( ctx, TQ_MUTEX_A );
+ }
+
+ if ( ( events & TQ_EVENT_MUTEX_B_OBTAIN ) != 0 ) {
+ TQMutexObtain( ctx, TQ_MUTEX_B );
+ }
+
+ if ( ( events & TQ_EVENT_MUTEX_B_RELEASE ) != 0 ) {
+ TQMutexRelease( ctx, TQ_MUTEX_B );
+ }
+
+ if ( ( events & TQ_EVENT_MUTEX_C_OBTAIN ) != 0 ) {
+ TQMutexObtain( ctx, TQ_MUTEX_C );
+ }
+
+ if ( ( events & TQ_EVENT_MUTEX_C_RELEASE ) != 0 ) {
+ TQMutexRelease( ctx, TQ_MUTEX_C );
+ }
+
+ if ( ( events & TQ_EVENT_MUTEX_D_OBTAIN ) != 0 ) {
+ TQMutexObtain( ctx, TQ_MUTEX_D );
+ }
+
+ if ( ( events & TQ_EVENT_MUTEX_D_RELEASE ) != 0 ) {
+ TQMutexRelease( ctx, TQ_MUTEX_D );
+ }
+
+ if ( ( events & TQ_EVENT_MUTEX_NO_PROTOCOL_OBTAIN ) != 0 ) {
+ TQMutexObtain( ctx, TQ_MUTEX_NO_PROTOCOL );
+ }
+
+ if ( ( events & TQ_EVENT_MUTEX_NO_PROTOCOL_RELEASE ) != 0 ) {
+ TQMutexRelease( ctx, TQ_MUTEX_NO_PROTOCOL );
+ }
+
+ if ( ( events & TQ_EVENT_MUTEX_FIFO_OBTAIN ) != 0 ) {
+ TQMutexObtain( ctx, TQ_MUTEX_FIFO );
+ }
+
+ if ( ( events & TQ_EVENT_MUTEX_FIFO_RELEASE ) != 0 ) {
+ TQMutexRelease( ctx, TQ_MUTEX_FIFO );
+ }
+
+ if ( ( events & TQ_EVENT_PIN ) != 0 ) {
+ _Thread_Pin( _Thread_Get_executing() );
+ }
+
+ if ( ( events & TQ_EVENT_UNPIN ) != 0 ) {
+ Per_CPU_Control *cpu_self;
+
+ cpu_self = _Thread_Dispatch_disable();
+ _Thread_Unpin( _Thread_Get_executing(), cpu_self );
+ _Thread_Dispatch_direct( cpu_self );
+ }
+
+ if ( ( events & TQ_EVENT_SCHEDULER_RECORD_STOP ) != 0 ) {
+ TQSchedulerRecordStop( ctx );
+ }
+
+ if ( ( events & TQ_EVENT_RUNNER_SYNC ) != 0 ) {
+ SendEvents( ctx->runner_id, TQ_EVENT_RUNNER_SYNC );
+ }
+
+ if ( ( events & TQ_EVENT_COUNT ) != 0 ) {
+ Count( ctx, worker );
+ }
+
+ if ( ( events & TQ_EVENT_BUSY_WAIT ) != 0 ) {
+ while ( ctx->busy_wait[ worker ] ) {
+ /* Wait */
+ }
+ }
+
+ if ( ( events & TQ_EVENT_RUNNER_SYNC_2 ) != 0 ) {
+ SendEvents( ctx->runner_id, TQ_EVENT_RUNNER_SYNC_2 );
+ }
+
+ ctx->done[ worker ] = true;
+ }
+}
+
+static void BlockerA( rtems_task_argument arg )
+{
+ Worker( arg, TQ_BLOCKER_A );
+}
+
+static void BlockerB( rtems_task_argument arg )
+{
+ Worker( arg, TQ_BLOCKER_B );
+}
+
+static void BlockerC( rtems_task_argument arg )
+{
+ Worker( arg, TQ_BLOCKER_C );
+}
+
+static void BlockerD( rtems_task_argument arg )
+{
+ Worker( arg, TQ_BLOCKER_D );
+}
+
+static void BlockerE( rtems_task_argument arg )
+{
+ Worker( arg, TQ_BLOCKER_E );
+}
+
+static void WorkerF( rtems_task_argument arg )
+{
+ Worker( arg, TQ_WORKER_F );
+}
+
+static void HelperA( rtems_task_argument arg )
+{
+ Worker( arg, TQ_HELPER_A );
+}
+
+static void HelperB( rtems_task_argument arg )
+{
+ Worker( arg, TQ_HELPER_B );
+}
+
+static void HelperC( rtems_task_argument arg )
+{
+ Worker( arg, TQ_HELPER_C );
+}
+
+void TQInitialize( TQContext *ctx )
+{
+ rtems_status_code sc;
+ size_t i;
+
+ ctx->runner_id = rtems_task_self();
+ ctx->runner_tcb = GetThread( RTEMS_SELF );
+
+ /*
+ * Use a lower priority than all started worker tasks to make sure they wait
+ * for events.
+ */
+ SetSelfPriority( PRIO_VERY_LOW );
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( ctx->mutex_id ); ++i ) {
+ rtems_attribute attributes;
+
+ attributes = RTEMS_BINARY_SEMAPHORE;
+
+ if ( i == TQ_MUTEX_NO_PROTOCOL ) {
+ attributes |= RTEMS_PRIORITY;
+ } else if ( i == TQ_MUTEX_FIFO ) {
+ attributes |= RTEMS_FIFO;
+ } else {
+ attributes |= RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY;
+ }
+
+ sc = rtems_semaphore_create(
+ rtems_build_name( 'M', 'T', 'X', 'A' + i ),
+ 1,
+ attributes,
+ 0,
+ &ctx->mutex_id[ i ]
+ );
+ T_rsc_success( sc );
+ }
+
+ ctx->worker_id[ TQ_BLOCKER_A ] = CreateTask( "BLKA", PRIO_HIGH );
+ StartTask( ctx->worker_id[ TQ_BLOCKER_A ], BlockerA, ctx );
+ ctx->worker_id[ TQ_BLOCKER_B ] = CreateTask( "BLKB", PRIO_VERY_HIGH );
+ StartTask( ctx->worker_id[ TQ_BLOCKER_B ], BlockerB, ctx );
+ ctx->worker_id[ TQ_BLOCKER_C ] = CreateTask( "BLKC", PRIO_ULTRA_HIGH );
+ StartTask( ctx->worker_id[ TQ_BLOCKER_C ], BlockerC, ctx );
+ ctx->worker_id[ TQ_BLOCKER_D ] = CreateTask( "BLKD", PRIO_LOW );
+ StartTask( ctx->worker_id[ TQ_BLOCKER_D ], BlockerD, ctx );
+ ctx->worker_id[ TQ_BLOCKER_E ] = CreateTask( "BLKE", PRIO_LOW );
+ StartTask( ctx->worker_id[ TQ_BLOCKER_E ], BlockerE, ctx );
+ ctx->worker_id[ TQ_WORKER_F ] = CreateTask( "WRKF", PRIO_LOW );
+ StartTask( ctx->worker_id[ TQ_WORKER_F ], WorkerF, ctx );
+ ctx->worker_id[ TQ_HELPER_A ] = CreateTask( "HLPA", PRIO_LOW );
+ StartTask( ctx->worker_id[ TQ_HELPER_A ], HelperA, ctx );
+ ctx->worker_id[ TQ_HELPER_B ] = CreateTask( "HLPB", PRIO_LOW );
+ StartTask( ctx->worker_id[ TQ_HELPER_B ], HelperB, ctx );
+ ctx->worker_id[ TQ_HELPER_C ] = CreateTask( "HLPC", PRIO_LOW );
+ StartTask( ctx->worker_id[ TQ_HELPER_C ], HelperC, ctx );
+
+ for (i = 0; i < RTEMS_ARRAY_SIZE( ctx->worker_tcb ); ++i) {
+ ctx->worker_tcb[ i ] = GetThread( ctx->worker_id[ i ] );
+ }
+
+ SetSelfPriority( PRIO_NORMAL );
+}
+
+void TQDestroy( TQContext *ctx )
+{
+ size_t i;
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( ctx->worker_id ); ++i ) {
+ DeleteTask( ctx->worker_id[ i ] );
+ }
+
+ for ( i = 0; i < RTEMS_ARRAY_SIZE( ctx->mutex_id ); ++i ) {
+ if ( ctx->mutex_id[ i ] != 0 ) {
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_delete( ctx->mutex_id[ i ] );
+ T_rsc_success( sc );
+ }
+ }
+
+ RestoreRunnerPriority();
+}
+
+void TQReset( TQContext *ctx )
+{
+ rtems_id scheduler_id;
+
+ scheduler_id = SCHEDULER_A_ID;
+ SetScheduler( ctx->runner_id, scheduler_id, PRIO_NORMAL );
+ TQSetScheduler( ctx, TQ_BLOCKER_A, scheduler_id, PRIO_HIGH );
+ TQSetScheduler( ctx, TQ_BLOCKER_B, scheduler_id, PRIO_VERY_HIGH );
+ TQSetScheduler( ctx, TQ_BLOCKER_C, scheduler_id, PRIO_ULTRA_HIGH );
+ TQSetScheduler( ctx, TQ_BLOCKER_D, scheduler_id, PRIO_LOW );
+ TQSetScheduler( ctx, TQ_BLOCKER_E, scheduler_id, PRIO_LOW );
+ TQSetScheduler( ctx, TQ_HELPER_A, scheduler_id, PRIO_LOW );
+ TQSetScheduler( ctx, TQ_HELPER_B, scheduler_id, PRIO_LOW );
+ TQSetScheduler( ctx, TQ_HELPER_C, scheduler_id, PRIO_LOW );
+}
+
+void TQSortMutexesByID( TQContext *ctx )
+{
+ size_t i;
+ size_t n;
+
+ n = 3;
+
+ /* Bubble sort */
+ for ( i = 1; i < n ; ++i ) {
+ size_t j;
+
+ for ( j = 0; j < n - i; ++j ) {
+ if ( ctx->mutex_id[ j ] > ctx->mutex_id[ j + 1 ] ) {
+ rtems_id tmp;
+
+ tmp = ctx->mutex_id[ j ];
+ ctx->mutex_id[ j ] = ctx->mutex_id[ j + 1 ];
+ ctx->mutex_id[ j + 1 ] = tmp;
+ }
+ }
+ }
+}
+
+void TQGetProperties( TQContext *ctx, TQWorkerKind enqueued_worker )
+{
+ ( *ctx->get_properties )( ctx, enqueued_worker );
+}
+
+Status_Control TQConvertStatus( TQContext *ctx, Status_Control status )
+{
+ return ( *ctx->convert_status )( status );
+}
+
+void TQEnqueuePrepare( TQContext *ctx )
+{
+ ( *ctx->enqueue_prepare )( ctx );
+}
+
+Status_Control TQEnqueue( TQContext *ctx, TQWait wait )
+{
+ return ( *ctx->enqueue )( ctx, wait );
+}
+
+Status_Control TQEnqueueFatal( TQContext *ctx )
+{
+ Status_Control status;
+
+ SetFatalHandler( ThreadQueueDeadlock, ctx );
+ status = STATUS_MINUS_ONE;
+
+ if ( setjmp( ctx->before_enqueue ) == 0 ) {
+ status = TQEnqueue( ctx, ctx->wait );
+ } else {
+ status = STATUS_DEADLOCK;
+ }
+
+ return status;
+}
+
+void TQEnqueueDone( TQContext *ctx )
+{
+ ( *ctx->enqueue_done )( ctx );
+}
+
+Status_Control TQSurrender( TQContext *ctx )
+{
+ return ( *ctx->surrender )( ctx );
+}
+
+void TQFlush( TQContext *ctx, bool flush_all )
+{
+ ctx->flush_count = ( *ctx->flush )( ctx, ctx->how_many, flush_all );
+}
+
+rtems_tcb *TQGetOwner( TQContext *ctx )
+{
+ rtems_tcb *( *get_owner )( TQContext * );
+
+ get_owner = ctx->get_owner;
+
+ if ( get_owner == NULL ) {
+ return NULL;
+ }
+
+ return ( *get_owner )( ctx );
+}
+
+void TQSchedulerRecordStart( TQContext *ctx )
+{
+ T_scheduler_log *log;
+
+ log = T_scheduler_record_40( &ctx->scheduler_log );
+ T_null( log );
+}
+
+void TQSchedulerRecordStop( TQContext *ctx )
+{
+ T_scheduler_log *log;
+
+ log = T_scheduler_record( NULL );
+ T_eq_ptr( &log->header, &ctx->scheduler_log.header );
+}
+
+const T_scheduler_event *TQGetNextAny( TQContext *ctx, size_t *index )
+{
+ return T_scheduler_next_any(
+ &ctx->scheduler_log.header,
+ index
+ );
+}
+
+const T_scheduler_event *TQGetNextBlock( TQContext *ctx, size_t *index )
+{
+ return T_scheduler_next(
+ &ctx->scheduler_log.header,
+ T_SCHEDULER_BLOCK,
+ index
+ );
+}
+
+const T_scheduler_event *TQGetNextUnblock( TQContext *ctx, size_t *index )
+{
+ return T_scheduler_next(
+ &ctx->scheduler_log.header,
+ T_SCHEDULER_UNBLOCK,
+ index
+ );
+}
+
+const T_scheduler_event *TQGetNextUpdatePriority(
+ TQContext *ctx,
+ size_t *index
+)
+{
+ return T_scheduler_next(
+ &ctx->scheduler_log.header,
+ T_SCHEDULER_UPDATE_PRIORITY,
+ index
+ );
+}
+
+const T_scheduler_event *TQGetNextAskForHelp(
+ TQContext *ctx,
+ size_t *index
+)
+{
+ return T_scheduler_next(
+ &ctx->scheduler_log.header,
+ T_SCHEDULER_ASK_FOR_HELP,
+ index
+ );
+}
+
+void TQDoNothing( TQContext *ctx )
+{
+ (void) ctx;
+}
+
+Status_Control TQDoNothingSuccessfully( TQContext *ctx )
+{
+ (void) ctx;
+
+ return STATUS_SUCCESSFUL;
+}
+
+Status_Control TQConvertStatusClassic( Status_Control status )
+{
+ return STATUS_BUILD( STATUS_GET_CLASSIC( status ), 0 );
+}
+
+Status_Control TQConvertStatusPOSIX( Status_Control status )
+{
+ return STATUS_BUILD( 0, STATUS_GET_POSIX( status ) );
+}
+
+void TQEnqueuePrepareDefault( TQContext *ctx )
+{
+ Status_Control status;
+
+ status = TQEnqueue( ctx, TQ_NO_WAIT );
+ T_eq_int( status, TQConvertStatus( ctx, STATUS_SUCCESSFUL ) );
+}
+
+void TQEnqueueDoneDefault( TQContext *ctx )
+{
+ Status_Control status;
+
+ status = TQSurrender( ctx );
+ T_eq_int( status, TQConvertStatus( ctx, STATUS_SUCCESSFUL ) );
+}
+
+Status_Control TQEnqueueClassicSem( TQContext *ctx, TQWait wait )
+{
+ rtems_status_code sc;
+ rtems_option option;
+ rtems_option timeout;
+
+ switch ( wait ) {
+ case TQ_WAIT_FOREVER:
+ option = RTEMS_WAIT;
+ timeout = RTEMS_NO_TIMEOUT;
+ break;
+ case TQ_WAIT_TIMED:
+ option = RTEMS_WAIT;
+ timeout = UINT32_MAX;
+ break;
+ default:
+ option = RTEMS_NO_WAIT;
+ timeout = 0;
+ break;
+ }
+
+ sc = rtems_semaphore_obtain( ctx->thread_queue_id, option, timeout );
+
+ return STATUS_BUILD( sc, 0 );
+}
+
+Status_Control TQSurrenderClassicSem( TQContext *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_semaphore_release( ctx->thread_queue_id );
+
+ return STATUS_BUILD( sc, 0 );
+}
+
+rtems_tcb *TQGetOwnerClassicSem( TQContext *ctx )
+{
+ Semaphore_Control *semaphore;
+ Thread_queue_Context queue_context;
+ rtems_tcb *thread;
+
+ semaphore = _Semaphore_Get( ctx->thread_queue_id, &queue_context );
+ T_assert_not_null( semaphore );
+ thread = semaphore->Core_control.Wait_queue.Queue.owner;
+ _ISR_lock_ISR_enable( &queue_context.Lock_context.Lock_context );
+
+ return thread;
+}
+
+uint32_t TQSemGetCount( TQSemContext *ctx )
+{
+ return ( *ctx->get_count )( ctx );
+}
+
+void TQSemSetCount( TQSemContext *ctx, uint32_t count )
+{
+ ( *ctx->set_count )( ctx, count );
+}
+
+uint32_t TQSemGetCountClassic( TQSemContext *ctx )
+{
+ Semaphore_Control *semaphore;
+ Thread_queue_Context queue_context;
+ uint32_t count;
+
+ semaphore = _Semaphore_Get( ctx->base.thread_queue_id, &queue_context );
+ T_assert_not_null( semaphore );
+ count = semaphore->Core_control.Semaphore.count;
+ _ISR_lock_ISR_enable( &queue_context.Lock_context.Lock_context );
+
+ return count;
+}
+
+void TQSemSetCountClassic( TQSemContext *ctx, uint32_t count )
+{
+ Semaphore_Control *semaphore;
+ Thread_queue_Context queue_context;
+
+ semaphore = _Semaphore_Get( ctx->base.thread_queue_id, &queue_context );
+ T_assert_not_null( semaphore );
+ semaphore->Core_control.Semaphore.count = count;
+ _ISR_lock_ISR_enable( &queue_context.Lock_context.Lock_context );
+}
diff --git a/testsuites/validation/tx-thread-queue.h b/testsuites/validation/tx-thread-queue.h
new file mode 100644
index 0000000000..f95fcb790b
--- /dev/null
+++ b/testsuites/validation/tx-thread-queue.h
@@ -0,0 +1,537 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This header file provides the functions to test the
+ * @ref RTEMSScoreThreadQueue.
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifndef _TX_THREAD_QUEUE_H
+#define _TX_THREAD_QUEUE_H
+
+#include "tx-support.h"
+
+#include <rtems/test-scheduler.h>
+#include <rtems/score/atomic.h>
+#include <rtems/score/status.h>
+
+#include <setjmp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup RTEMSTestSuitesValidation
+ *
+ * @{
+ */
+
+typedef enum {
+ TQ_NODE_ONLY,
+ TQ_NODE_VITAL,
+ TQ_NODE_DISPENSABLE
+} TQNodeKind;
+
+typedef enum {
+ TQ_WAIT_STATE_BLOCKED,
+ TQ_WAIT_STATE_INTEND_TO_BLOCK,
+ TQ_WAIT_STATE_READY_AGAIN
+} TQWaitState;
+
+typedef enum {
+ TQ_BLOCKER_A,
+ TQ_BLOCKER_B,
+ TQ_BLOCKER_C,
+ TQ_BLOCKER_D,
+ TQ_BLOCKER_E,
+ TQ_WORKER_F,
+ TQ_HELPER_A,
+ TQ_HELPER_B,
+ TQ_HELPER_C,
+ TQ_WORKER_COUNT
+} TQWorkerKind;
+
+typedef enum {
+ TQ_MUTEX_A,
+ TQ_MUTEX_B,
+ TQ_MUTEX_C,
+ TQ_MUTEX_D,
+ TQ_MUTEX_NO_PROTOCOL,
+ TQ_MUTEX_FIFO,
+ TQ_MUTEX_COUNT
+} TQMutex;
+
+typedef enum {
+ TQ_FIFO,
+ TQ_PRIORITY
+} TQDiscipline;
+
+typedef enum {
+ TQ_NO_WAIT,
+ TQ_WAIT_FOREVER,
+ TQ_WAIT_TIMED
+} TQWait;
+
+typedef enum {
+ TQ_DEADLOCK_STATUS,
+ TQ_DEADLOCK_FATAL
+} TQDeadlock;
+
+typedef enum {
+ TQ_EVENT_ENQUEUE_PREPARE = RTEMS_EVENT_0,
+ TQ_EVENT_ENQUEUE = RTEMS_EVENT_1,
+ TQ_EVENT_ENQUEUE_DONE = RTEMS_EVENT_2,
+ TQ_EVENT_SURRENDER = RTEMS_EVENT_3,
+ TQ_EVENT_RUNNER_SYNC = RTEMS_EVENT_4,
+ TQ_EVENT_RUNNER_SYNC_2 = RTEMS_EVENT_5,
+ TQ_EVENT_HELPER_A_SYNC = RTEMS_EVENT_6,
+ TQ_EVENT_HELPER_B_SYNC = RTEMS_EVENT_7,
+ TQ_EVENT_MUTEX_A_OBTAIN = RTEMS_EVENT_8,
+ TQ_EVENT_MUTEX_A_RELEASE = RTEMS_EVENT_9,
+ TQ_EVENT_MUTEX_B_OBTAIN = RTEMS_EVENT_10,
+ TQ_EVENT_MUTEX_B_RELEASE = RTEMS_EVENT_11,
+ TQ_EVENT_BUSY_WAIT = RTEMS_EVENT_12,
+ TQ_EVENT_FLUSH_ALL = RTEMS_EVENT_13,
+ TQ_EVENT_FLUSH_PARTIAL = RTEMS_EVENT_14,
+ TQ_EVENT_SCHEDULER_RECORD_START = RTEMS_EVENT_15,
+ TQ_EVENT_SCHEDULER_RECORD_STOP = RTEMS_EVENT_16,
+ TQ_EVENT_TIMEOUT = RTEMS_EVENT_17,
+ TQ_EVENT_MUTEX_NO_PROTOCOL_OBTAIN = RTEMS_EVENT_18,
+ TQ_EVENT_MUTEX_NO_PROTOCOL_RELEASE = RTEMS_EVENT_19,
+ TQ_EVENT_ENQUEUE_FATAL = RTEMS_EVENT_20,
+ TQ_EVENT_MUTEX_C_OBTAIN = RTEMS_EVENT_21,
+ TQ_EVENT_MUTEX_C_RELEASE = RTEMS_EVENT_22,
+ TQ_EVENT_MUTEX_FIFO_OBTAIN = RTEMS_EVENT_23,
+ TQ_EVENT_MUTEX_FIFO_RELEASE = RTEMS_EVENT_24,
+ TQ_EVENT_ENQUEUE_TIMED = RTEMS_EVENT_25,
+ TQ_EVENT_MUTEX_D_OBTAIN = RTEMS_EVENT_26,
+ TQ_EVENT_MUTEX_D_RELEASE = RTEMS_EVENT_27,
+ TQ_EVENT_PIN = RTEMS_EVENT_28,
+ TQ_EVENT_UNPIN = RTEMS_EVENT_29,
+ TQ_EVENT_COUNT = RTEMS_EVENT_30
+} TQEvent;
+
+typedef enum {
+ TQ_ENQUEUE_BLOCKS,
+ TQ_ENQUEUE_STICKY
+} TQEnqueueVariant;
+
+typedef struct TQContext {
+ /**
+ * @brief This member defines the thread queue discipline.
+ */
+ TQDiscipline discipline;
+
+ /**
+ * @brief This member defines the enqueue wait behaviour.
+ *
+ * If TQ_NO_WAIT is used, then no thread queue enqueue shall be performed.
+ */
+ TQWait wait;
+
+ /**
+ * @brief This member defines the enqueue variant.
+ */
+ TQEnqueueVariant enqueue_variant;
+
+ /**
+ * @brief This member defines the deadlock enqueue behaviour.
+ */
+ TQDeadlock deadlock;
+
+ /**
+ * @brief This member contains the runner task identifier.
+ */
+ rtems_id runner_id;
+
+ /**
+ * @brief This member contains a reference to the runner task control block.
+ */
+ rtems_tcb *runner_tcb;
+
+ /**
+ * @brief This member contains the worker task identifiers.
+ */
+ rtems_id worker_id[ TQ_WORKER_COUNT ];
+
+ /**
+ * @brief This member contains references to the worker task control
+ * blocks.
+ */
+ rtems_tcb *worker_tcb[ TQ_WORKER_COUNT ];
+
+ /**
+ * @brief When a worker received an event, the corresponding element shall be
+ * set to true.
+ */
+ volatile bool event_received[ TQ_WORKER_COUNT ];
+
+ /**
+ * @brief If this member is true, then the worker shall busy wait on request.
+ */
+ volatile bool busy_wait[ TQ_WORKER_COUNT ];
+
+ /**
+ * @brief When a worker is done processing its current event set, the
+ * corresponding element shall be set to true.
+ */
+ volatile bool done[ TQ_WORKER_COUNT ];
+
+ /**
+ * @brief This member provides the counter used for the worker counters.
+ */
+ Atomic_Uint counter;
+
+ /**
+ * @brief When a worker returned from TQEnqueue() the counter is incremented
+ * and stored in this member.
+ */
+ uint32_t worker_counter[ TQ_WORKER_COUNT ];
+
+ /**
+ * @brief This member contains the last return status of a TQEnqueue() of the
+ * corresponding worker.
+ */
+ Status_Control status[ TQ_WORKER_COUNT ];
+
+ union {
+ /**
+ * @brief This member contains the identifier of an object providing the
+ * thread queue under test.
+ */
+ rtems_id thread_queue_id;
+
+ /**
+ * @brief This member contains the reference to object containing the
+ * thread queue under test.
+ */
+ void *thread_queue_object;
+ };
+
+ /**
+ * @brief This member contains the identifier of priority inheritance
+ * mutexes.
+ */
+ rtems_id mutex_id[ TQ_MUTEX_COUNT ];
+
+ /**
+ * @brief This member provides the scheduler log.
+ */
+ T_scheduler_log_40 scheduler_log;
+
+ /**
+ * @brief This member provides the get properties handler.
+ */
+ void ( *get_properties )( struct TQContext *, TQWorkerKind );
+
+ /**
+ * @brief This member provides the status convert handler.
+ */
+ Status_Control ( *convert_status )( Status_Control );
+
+ /**
+ * @brief This this member specifies how many threads shall be enqueued.
+ */
+ uint32_t how_many;
+
+ /**
+ * @brief This this member contains the count of the least recently flushed
+ * threads.
+ */
+ uint32_t flush_count;
+
+ /**
+ * @brief This this member provides a context to jump back to before the
+ * enqueue.
+ */
+ jmp_buf before_enqueue;
+
+ /**
+ * @brief This member provides the thread queue enqueue prepare handler.
+ */
+ void ( *enqueue_prepare )( struct TQContext * );
+
+ /**
+ * @brief This member provides the thread queue enqueue handler.
+ */
+ Status_Control ( *enqueue )( struct TQContext *, TQWait );
+
+ /**
+ * @brief This member provides the thread queue enqueue done handler.
+ */
+ void ( *enqueue_done )( struct TQContext * );
+
+ /**
+ * @brief This member provides the thread queue surrender handler.
+ */
+ Status_Control ( *surrender )( struct TQContext * );
+
+ /**
+ * @brief This member provides the thread queue flush handler.
+ *
+ * The second parameter specifies the count of enqueued threads. While the
+ * third parameter is true, all enqueued threads shall be extracted,
+ * otherwise the thread queue shall be partially flushed. The handler shall
+ * return the count of flushed threads.
+ */
+ uint32_t ( *flush )( struct TQContext *, uint32_t, bool );
+
+ /**
+ * @brief This member provides the get owner handler.
+ */
+ rtems_tcb *( *get_owner )( struct TQContext * );
+} TQContext;
+
+void TQSend(
+ TQContext *ctx,
+ TQWorkerKind worker,
+ rtems_event_set events
+);
+
+void TQSendAndWaitForExecutionStop(
+ TQContext *ctx,
+ TQWorkerKind worker,
+ rtems_event_set events
+);
+
+void TQSendAndWaitForIntendToBlock(
+ TQContext *ctx,
+ TQWorkerKind worker,
+ rtems_event_set events
+);
+
+void TQSendAndWaitForExecutionStopOrIntendToBlock(
+ TQContext *ctx,
+ TQWorkerKind worker,
+ rtems_event_set events
+);
+
+void TQSendAndSynchronizeRunner(
+ TQContext *ctx,
+ TQWorkerKind worker,
+ rtems_event_set events
+);
+
+void TQWaitForEventsReceived( const TQContext *ctx, TQWorkerKind worker );
+
+void TQWaitForIntendToBlock( const TQContext *ctx, TQWorkerKind worker );
+
+void TQWaitForExecutionStop( const TQContext *ctx, TQWorkerKind worker );
+
+void TQClearDone( TQContext *ctx, TQWorkerKind worker );
+
+void TQWaitForDone( const TQContext *ctx, TQWorkerKind worker );
+
+void TQSynchronizeRunner( void );
+
+void TQSynchronizeRunner2( void );
+
+void TQResetCounter( TQContext *ctx );
+
+uint32_t TQGetCounter( const TQContext *ctx );
+
+uint32_t TQGetWorkerCounter( const TQContext *ctx, TQWorkerKind worker );
+
+void TQMutexObtain( const TQContext *ctx, TQMutex mutex );
+
+void TQMutexRelease( const TQContext *ctx, TQMutex mutex );
+
+void TQSetPriority(
+ const TQContext *ctx,
+ TQWorkerKind worker,
+ Priority priority
+);
+
+Priority TQGetPriority( const TQContext *ctx, TQWorkerKind worker );
+
+void TQSetScheduler(
+ const TQContext *ctx,
+ TQWorkerKind worker,
+ rtems_id scheduler_id,
+ Priority priority
+);
+
+void TQInitialize( TQContext *ctx );
+
+void TQDestroy( TQContext *ctx );
+
+void TQReset( TQContext *ctx );
+
+void TQSortMutexesByID( TQContext *ctx );
+
+void TQGetProperties( TQContext *ctx, TQWorkerKind enqueued_worker );
+
+Status_Control TQConvertStatus( TQContext *ctx, Status_Control status );
+
+void TQEnqueuePrepare( TQContext *ctx );
+
+Status_Control TQEnqueue( TQContext *ctx, TQWait wait );
+
+Status_Control TQEnqueueFatal( TQContext *ctx );
+
+void TQEnqueueDone( TQContext *ctx );
+
+Status_Control TQSurrender( TQContext *ctx );
+
+void TQFlush( TQContext *ctx, bool flush_all );
+
+rtems_tcb *TQGetOwner( TQContext *ctx );
+
+void TQSchedulerRecordStart( TQContext *ctx );
+
+void TQSchedulerRecordStop( TQContext *ctx );
+
+const T_scheduler_event *TQGetNextAny( TQContext *ctx, size_t *index );
+
+const T_scheduler_event *TQGetNextBlock( TQContext *ctx, size_t *index );
+
+const T_scheduler_event *TQGetNextUnblock( TQContext *ctx, size_t *index );
+
+const T_scheduler_event *TQGetNextUpdatePriority(
+ TQContext *ctx,
+ size_t *index
+);
+
+const T_scheduler_event *TQGetNextAskForHelp( TQContext *ctx, size_t *index );
+
+void TQDoNothing( TQContext *ctx );
+
+Status_Control TQDoNothingSuccessfully( TQContext *ctx );
+
+Status_Control TQConvertStatusClassic( Status_Control status );
+
+Status_Control TQConvertStatusPOSIX( Status_Control status );
+
+void TQEnqueuePrepareDefault( TQContext *ctx );
+
+void TQEnqueueDoneDefault( TQContext *ctx );
+
+Status_Control TQEnqueueClassicSem( TQContext *ctx, TQWait wait );
+
+Status_Control TQSurrenderClassicSem( TQContext *ctx );
+
+rtems_tcb *TQGetOwnerClassicSem( TQContext *ctx );
+
+typedef enum {
+ TQ_SEM_BINARY,
+ TQ_SEM_COUNTING
+} TQSemVariant;
+
+typedef struct TQSemContext {
+ /**
+ * @brief This member contains the base thread queue test context.
+ */
+ TQContext base;
+
+ /**
+ * @brief This member defines the semaphore variant.
+ */
+ TQSemVariant variant;
+
+ /**
+ * @brief This member provides the semaphore get count handler.
+ */
+ uint32_t ( *get_count )( struct TQSemContext * );
+
+ /**
+ * @brief This member provides the semaphore set count handler.
+ */
+ void ( *set_count )( struct TQSemContext *, uint32_t );
+} TQSemContext;
+
+Status_Control TQSemSurrender( TQSemContext *ctx );
+
+uint32_t TQSemGetCount( TQSemContext *ctx );
+
+void TQSemSetCount( TQSemContext *ctx, uint32_t count );
+
+Status_Control TQSemSurrenderClassic( TQSemContext *ctx );
+
+uint32_t TQSemGetCountClassic( TQSemContext *ctx );
+
+void TQSemSetCountClassic( TQSemContext *ctx, uint32_t count );
+
+typedef enum {
+ TQ_MTX_NO_PROTOCOL,
+ TQ_MTX_PRIORITY_INHERIT,
+ TQ_MTX_PRIORITY_CEILING,
+ TQ_MTX_MRSP
+} TQMtxProtocol;
+
+typedef enum {
+ TQ_MTX_RECURSIVE_ALLOWED,
+ TQ_MTX_RECURSIVE_DEADLOCK,
+ TQ_MTX_RECURSIVE_UNAVAILABLE
+} TQMtxRecursive;
+
+typedef enum {
+ TQ_MTX_NO_OWNER_CHECK,
+ TQ_MTX_CHECKS_OWNER
+} TQMtxOwnerCheck;
+
+typedef struct TQMtxContext {
+ /**
+ * @brief This member contains the base thread queue test context.
+ */
+ TQContext base;
+
+ /**
+ * @brief This member defines the locking protocol.
+ */
+ TQMtxProtocol protocol;
+
+ /**
+ * @brief This member defines the recursive seize behaviour.
+ */
+ TQMtxRecursive recursive;
+
+ /**
+ * @brief This member defines the owner check behaviour.
+ */
+ TQMtxOwnerCheck owner_check;
+
+ /**
+ * @brief This member defines the priority ceiling of the mutex.
+ *
+ * Use PRIO_INVALID to indicate that the mutex does not provide a priority
+ * ceiling.
+ */
+ rtems_task_priority priority_ceiling;
+} TQMtxContext;
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TX_THREAD_QUEUE_H */
diff --git a/testsuites/validation/tx-timecounter.c b/testsuites/validation/tx-timecounter.c
new file mode 100644
index 0000000000..01b55f2578
--- /dev/null
+++ b/testsuites/validation/tx-timecounter.c
@@ -0,0 +1,160 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This source file contains the definition of SetGetTimecountHandler(),
+ * GetTimecountCounter(), and SetTimecountCounter().
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tx-support.h"
+
+#include <rtems/sysinit.h>
+#include <rtems/timecounter.h>
+#include <rtems/score/atomic.h>
+#include <rtems/score/percpu.h>
+#include <rtems/score/smpimpl.h>
+#include <rtems/score/threaddispatch.h>
+
+typedef struct {
+ struct timecounter base;
+ GetTimecountHandler handler;
+ Atomic_Ulong counter;
+} TimecounterControl;
+
+static TimecounterControl TimecounterInstance;
+
+GetTimecountHandler SetGetTimecountHandler( GetTimecountHandler handler )
+{
+ GetTimecountHandler previous;
+
+ previous = TimecounterInstance.handler;
+ TimecounterInstance.handler = handler;
+ return previous;
+}
+
+uint32_t GetTimecountCounter( void )
+{
+ return (uint32_t) _Atomic_Load_ulong(
+ &TimecounterInstance.counter,
+ ATOMIC_ORDER_RELAXED
+ );
+}
+
+uint32_t SetTimecountCounter( uint32_t counter )
+{
+ return (uint32_t) _Atomic_Exchange_ulong(
+ &TimecounterInstance.counter,
+ counter,
+ ATOMIC_ORDER_RELAXED
+ );
+}
+
+static uint32_t GetTimecountSoftware( void )
+{
+ return (uint32_t) _Atomic_Fetch_add_ulong(
+ &TimecounterInstance.counter,
+ 1,
+ ATOMIC_ORDER_RELAXED
+ );
+}
+
+static uint32_t GetTimecountWrapper( struct timecounter *tc )
+{
+ TimecounterControl *self;
+
+ self = (TimecounterControl *) tc;
+ return ( *self->handler )();
+}
+
+static void InstallTimecounter( void )
+{
+ TimecounterControl *self;
+
+ self = &TimecounterInstance;
+ self->handler = GetTimecountSoftware;
+ self->base.tc_get_timecount = GetTimecountWrapper;
+ self->base.tc_counter_mask = 0xffffffff;
+ self->base.tc_frequency = SOFTWARE_TIMECOUNTER_FREQUENCY;
+ self->base.tc_quality = RTEMS_TIMECOUNTER_QUALITY_CLOCK_DRIVER + 1;
+ rtems_timecounter_install( &self->base );
+}
+
+RTEMS_SYSINIT_ITEM(
+ InstallTimecounter,
+ RTEMS_SYSINIT_DEVICE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_LAST
+);
+
+static void DoTimecounterTick( void *arg )
+{
+ (void) arg;
+ _Timecounter_Tick();
+}
+
+void TimecounterTick( void )
+{
+ unsigned long counter_ticks_per_clock_tick;
+ Per_CPU_Control *cpu_self;
+ bool success;
+
+ counter_ticks_per_clock_tick =
+ SOFTWARE_TIMECOUNTER_FREQUENCY / rtems_clock_get_ticks_per_second();
+ cpu_self = _Thread_Dispatch_disable();
+
+ do {
+ unsigned long old_counter;
+ unsigned long new_counter;
+
+ old_counter = _Atomic_Load_ulong(
+ &TimecounterInstance.counter,
+ ATOMIC_ORDER_RELAXED
+ );
+ new_counter = old_counter + counter_ticks_per_clock_tick -
+ ( old_counter % counter_ticks_per_clock_tick );
+ success = _Atomic_Compare_exchange_ulong(
+ &TimecounterInstance.counter,
+ &old_counter,
+ new_counter,
+ ATOMIC_ORDER_RELAXED,
+ ATOMIC_ORDER_RELAXED
+ );
+ } while ( !success );
+
+ DoTimecounterTick( NULL );
+#if defined( RTEMS_SMP )
+ _SMP_Othercast_action( DoTimecounterTick, NULL );
+#endif
+ _Thread_Dispatch_enable( cpu_self );
+}
diff --git a/testsuites/validation/tx-timer-server.c b/testsuites/validation/tx-timer-server.c
new file mode 100644
index 0000000000..29575eb490
--- /dev/null
+++ b/testsuites/validation/tx-timer-server.c
@@ -0,0 +1,150 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This source file contains the definition of DeleteTimerServer().
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tx-support.h"
+
+#include <rtems/test.h>
+#include <rtems/rtems/timerimpl.h>
+#include <rtems/score/todimpl.h>
+
+rtems_id GetTimerServerTaskId( void )
+{
+ if ( _Timer_server == NULL ) {
+ return RTEMS_INVALID_ID;
+ }
+ return _Timer_server->server_id;
+}
+
+bool DeleteTimerServer( void )
+{
+ Timer_server_Control *server;
+
+ server = _Timer_server;
+
+ if ( server == NULL ) {
+ return false;
+ }
+
+ DeleteTask( server->server_id );
+ _ISR_lock_Destroy( &server->Lock );
+ T_true( _Chain_Is_empty( &server->Pending ) );
+ _Timer_server = NULL;
+
+ return true;
+}
+
+Timer_Classes GetTimerClass( rtems_id id )
+{
+ /* This code is derived from rtems_timer_get_information() */
+ Timer_Classes result = TIMER_DORMANT;
+ Timer_Control *the_timer;
+ ISR_lock_Context lock_context;
+ Per_CPU_Control *cpu;
+
+ the_timer = _Timer_Get( id, &lock_context );
+ if ( the_timer != NULL ) {
+ cpu = _Timer_Acquire_critical( the_timer, &lock_context );
+ result = the_timer->the_class;
+ _Timer_Release( cpu, &lock_context );
+ }
+
+ return result;
+}
+
+void GetTimerSchedulingData(
+ rtems_id id,
+ Timer_Scheduling_Data *data
+)
+{
+ /* This code is derived from rtems_timer_get_information() */
+ Timer_Control *the_timer;
+ ISR_lock_Context lock_context;
+ Per_CPU_Control *cpu;
+
+ if ( data == NULL ) {
+ return;
+ }
+
+ the_timer = _Timer_Get( id, &lock_context );
+ if ( the_timer != NULL ) {
+ cpu = _Timer_Acquire_critical( the_timer, &lock_context );
+ data->routine = the_timer->routine;
+ data->user_data = the_timer->user_data;
+ data->interval = the_timer->initial;
+ _Timer_Release( cpu, &lock_context );
+ }
+}
+
+Timer_States GetTimerState( rtems_id id )
+{
+ /* This code is derived from rtems_timer_cancel() and _timer_cancel() */
+ Timer_States result = TIMER_INVALID;
+ Timer_Control *the_timer;
+ ISR_lock_Context lock_context;
+ Per_CPU_Control *cpu;
+ Timer_Classes the_class;
+ Timer_server_Control *timer_server = _Timer_server;
+ ISR_lock_Context lock_context_server;
+
+ the_timer = _Timer_Get( id, &lock_context );
+ if ( the_timer != NULL ) {
+ result = TIMER_INACTIVE;
+ cpu = _Timer_Acquire_critical( the_timer, &lock_context );
+ the_class = the_timer->the_class;
+
+ if ( _Watchdog_Is_scheduled( &the_timer->Ticker ) ) {
+ result = TIMER_SCHEDULED;
+ } else if ( _Timer_Is_on_task_class( the_class ) ) {
+ _Assert( timer_server != NULL );
+ _Timer_server_Acquire_critical( timer_server, &lock_context_server );
+ if ( _Watchdog_Get_state( &the_timer->Ticker ) == WATCHDOG_PENDING ) {
+ result = TIMER_PENDING;
+ }
+ _Timer_server_Release_critical( timer_server, &lock_context_server );
+ }
+ _Timer_Release( cpu, &lock_context );
+ }
+
+ return result;
+}
+
+void UnsetClock( void )
+{
+ _TOD.is_set = false;
+}
diff --git a/testsuites/validation/tx-wrap-thread-queue.c b/testsuites/validation/tx-wrap-thread-queue.c
new file mode 100644
index 0000000000..39d7b38129
--- /dev/null
+++ b/testsuites/validation/tx-wrap-thread-queue.c
@@ -0,0 +1,144 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuitesValidation
+ *
+ * @brief This source file contains the implementation of the thread queue
+ * wrapper.
+ */
+
+/*
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
+ *
+ * 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 OWNER 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tx-support.h"
+
+#include <rtems/score/threadimpl.h>
+#include <rtems/score/threadqimpl.h>
+
+#include <string.h>
+
+void WrapThreadQueueInitialize(
+ WrapThreadQueueContext *ctx,
+ void ( *handler )( void * ),
+ void *arg
+)
+{
+ memset( ctx, 0, sizeof( *ctx ) );
+ ctx->isr_request.handler = handler;
+ ctx->isr_request.arg = arg;
+ _Thread_queue_Initialize( &ctx->thread_queue, "Wrap" );
+}
+
+static void Prepare(
+ WrapThreadQueueContext *ctx,
+ Thread_Control *thread
+)
+{
+ if ( thread->Wait.queue != NULL ) {
+ ctx->wrapped_ops = thread->Wait.operations;
+ thread->Wait.operations = &ctx->tq_ops;
+ } else {
+ Thread_queue_Context queue_context;
+
+ ctx->wrapped_ops = NULL;
+ _Thread_queue_Context_initialize( &queue_context );
+ _Thread_queue_Acquire( &ctx->thread_queue, &queue_context );
+ _Thread_Wait_flags_set(
+ thread,
+ THREAD_WAIT_CLASS_OBJECT | THREAD_WAIT_STATE_INTEND_TO_BLOCK
+ );
+ _Thread_Wait_claim( thread, &ctx->thread_queue.Queue );
+ _Thread_Wait_claim_finalize( thread, &ctx->tq_ops );
+ _Thread_queue_Release( &ctx->thread_queue, &queue_context );
+ }
+}
+
+static void WrappedExtract(
+ WrapThreadQueueContext *ctx,
+ Thread_queue_Queue *queue,
+ Thread_Control *thread,
+ Thread_queue_Context *queue_context
+)
+{
+ if ( ctx->wrapped_ops ) {
+ thread->Wait.operations = ctx->wrapped_ops;
+ ( *thread->Wait.operations->extract )( queue, thread, queue_context );
+ }
+}
+
+static void Extract(
+ Thread_queue_Queue *queue,
+ Thread_Control *thread,
+ Thread_queue_Context *queue_context
+)
+{
+ WrapThreadQueueContext *ctx;
+
+ ctx = (WrapThreadQueueContext *) thread->Wait.operations;
+ CallWithinISRSubmit( &ctx->isr_request );
+ WrappedExtract( ctx, queue, thread, queue_context );
+}
+
+void WrapThreadQueueExtract(
+ WrapThreadQueueContext *ctx,
+ Thread_Control *thread
+)
+{
+ ctx->tq_ops.extract = Extract;
+ Prepare( ctx, thread );
+}
+
+static void ExtractDirect(
+ Thread_queue_Queue *queue,
+ Thread_Control *thread,
+ Thread_queue_Context *queue_context
+)
+{
+ WrapThreadQueueContext *ctx;
+
+ ctx = (WrapThreadQueueContext *) thread->Wait.operations;
+ ( *ctx->isr_request.handler )( ctx->isr_request.arg );
+ WrappedExtract( ctx, queue, thread, queue_context );
+}
+
+void WrapThreadQueueExtractDirect(
+ WrapThreadQueueContext *ctx,
+ Thread_Control *thread
+)
+{
+ ctx->tq_ops.extract = ExtractDirect;
+ Prepare( ctx, thread );
+}
+
+void WrapThreadQueueDestroy( WrapThreadQueueContext *ctx )
+{
+ _Thread_queue_Destroy( &ctx->thread_queue );
+}