Commit b76ab502 authored by Carolina Pinto dos Santos Serra's avatar Carolina Pinto dos Santos Serra Committed by Daniel Silveira

Reinstated latest rtems48i commit

Added 5 ticks margin in TEST-DEF-0009
Cleaner testcheck.py
Correct schedule of TEST-DEF-00012
Added hello world test
Set hello word example running only in single-core
Added TEST-DEF-00600

Solves #61
parent f2539c38
......@@ -32,6 +32,7 @@ stages:
- sconfig-sparc
- sbuild-sparc
- sclean-build-sparc
- test_hello_world_sparc
- test_00009_sparc
- test_00010_sparc
- test_00012_sparc
......@@ -42,9 +43,11 @@ stages:
- test_00510_sparc
- test_00540_sparc
- test_00560_sparc
- test_00600_sparc
- sconfig-arm
- sclean-build-arm
- sbuild-arm
- test_hello_world_arm
- test_00001_arm
#Build SPARC
......@@ -104,6 +107,19 @@ build_arm:
########################
#Tests for SPARC #
########################
hello_sparc:
# tags:
# - sparc
stage: test_hello_world_sparc
script:
- cd $AIR/examples/hello_world
- cp $AIR/../utils/gitlab-runner/* .
- ./do_leon4_grmon.bash
- cd $AIR
environment:
name: SPARC LEON4
00009_sparc:
# tags:
# - sparc
......@@ -226,11 +242,41 @@ build_arm:
environment:
name: SPARC LEON4
00600_sparc:
# tags:
# - sparc
stage: test_00600_sparc
script:
- cd $AIR/examples/validation/TEST-DEF-00600
- cp $AIR/../utils/gitlab-runner/* .
- ./do_leon4_grmon.bash
- cd $AIR
environment:
name: SPARC LEON4
########################
#Tests for ARM #
########################
# tags:
# - arm_qemu
#hello_world_arm:
# stage: test_hello_world_arm
# script:
# - cd $AIR/examples/hello_world
# - configure
# - make clean
# - make
# - cp $AIR/../utils/gitlab-runner/* .
# - ls
# - ./do_zynqz1_qemu.bash#
# - ./testcheck.py
# - cd $AIR
# environment:
# name: ARM ZYNQZ1
00001_arm:
stage: test_00001_arm
script:
......
......@@ -12,12 +12,12 @@
<Partition PartitionIdentifier="1" PartitionName="part0"
Criticality="LEVEL_A" EntryPoint="entry_point" SystemPartition="false">
<PartitionConfiguration Personality="RTEMS5" Cores="1" Mode="source">
<Libs>LIBAIR; LIBPRINTF</Libs>
<Libs>LIBAIR; LIBPRINTF; IMASPEX</Libs>
<Devices></Devices>
<Cache>CODE; DATA</Cache>
<Memory Size="0x100000" />
<Permissions>
FPU_CONTROL; GLOBAL_TIME; CACHE_CONTROL;
FPU_CONTROL; CACHE_CONTROL; GLOBAL_TIME; SET_TOD; SET_PARTITION_MODE; MODULE_CONTROL;
</Permissions>
</PartitionConfiguration>
</Partition>
......@@ -25,24 +25,24 @@
<Partition PartitionIdentifier="2" PartitionName="part1"
Criticality="LEVEL_A" EntryPoint="entry_point" SystemPartition="false">
<PartitionConfiguration Personality="RTEMS5" Cores="1">
<Libs>LIBAIR; LIBPRINTF</Libs>
<Libs>LIBAIR; LIBPRINTF; IMASPEX</Libs>
<Devices></Devices>
<Cache>CODE; DATA</Cache>
<Memory Size="0x100000" />
<Permissions>
FPU_CONTROL; GLOBAL_TIME; CACHE_CONTROL;
FPU_CONTROL; CACHE_CONTROL; GLOBAL_TIME; SET_TOD; SET_PARTITION_MODE; MODULE_CONTROL;
</Permissions>
</PartitionConfiguration>
</Partition>
<Partition PartitionIdentifier="3" PartitionName="part2"
Criticality="LEVEL_A" EntryPoint="entry_point" SystemPartition="false">
<PartitionConfiguration Personality="RTEMS5" Cores="1">
<Libs>LIBAIR; LIBPRINTF</Libs>
<Libs>LIBAIR; LIBPRINTF; IMASPEX</Libs>
<Devices></Devices>
<Cache>CODE; DATA</Cache>
<Memory Size="0x100000" />
<Permissions>
FPU_CONTROL; GLOBAL_TIME; CACHE_CONTROL;
FPU_CONTROL; CACHE_CONTROL; GLOBAL_TIME; SET_TOD; SET_PARTITION_MODE; MODULE_CONTROL;
</Permissions>
</PartitionConfiguration>
</Partition>
......@@ -59,13 +59,13 @@
PeriodDurationSeconds="0.3" PeriodSeconds="1.0">
<Window_Schedule WindowIdentifier="2" PartitionPeriodStart="true"
WindowDurationSeconds="0.3" WindowStartSeconds="0.3" />
<WindowConfiguration WindowIdentifier="2" Cores="1" />
<WindowConfiguration WindowIdentifier="2" Cores="0" />
</Partition_Schedule>
<Partition_Schedule PartitionIdentifier="3" PartitionName="part2"
PeriodDurationSeconds="0.3" PeriodSeconds="1.0">
<Window_Schedule WindowIdentifier="3" PartitionPeriodStart="true"
WindowDurationSeconds="0.3" WindowStartSeconds="0.6" />
<WindowConfiguration WindowIdentifier="3" Cores="2" />
<WindowConfiguration WindowIdentifier="3" Cores="0" />
</Partition_Schedule>
</Module_Schedule>
......
......@@ -31,7 +31,7 @@ void entry_point(void)
struct timespec start;
int ticks_per_sec = 1000000 / air_syscall_get_us_per_tick();
while(1)
for (int i= 0; i < 10; i++)
{
#ifdef RTEMS48I
rtems_clock_get_uptime( &start );
......
......@@ -31,7 +31,7 @@ void entry_point(void)
struct timespec start;
int ticks_per_sec = 1000000 / air_syscall_get_us_per_tick();
while(1)
for (int i= 0; i < 10; i++)
{
#ifdef RTEMS48I
rtems_clock_get_uptime( &start );
......
......@@ -31,7 +31,7 @@ void entry_point(void)
struct timespec start;
int ticks_per_sec = 1000000 / air_syscall_get_us_per_tick();
while(1)
for (int i= 0; i < 10; i++)
{
#ifdef RTEMS48I
rtems_clock_get_uptime( &start );
......@@ -47,4 +47,5 @@ void entry_point(void)
rtems_task_wake_after(ticks_per_sec/10);
}
air_syscall_shutdown_module();
}
......@@ -269,7 +269,7 @@ int test_main(void) {
t2 - t1);
}
// schedule push to end of windows.
rtems_task_wake_after(240);
rtems_task_wake_after(245);
/* Test Step 7
......
......@@ -15,7 +15,7 @@
mtf="0.3"
ms_per_tick="2"
type="TEST_GMV_VAL"
personality="RTEMS5">
personality="RTEMS48I">
<description>
Call the pal_schedule_change function from an authorized partition
and check that the partitioning schedule is altered starting at the next
......
......@@ -277,7 +277,7 @@ int test_main(void) {
t2 - t1);
}
// schedule push to end of windows.
rtems_task_wake_after(240);
rtems_task_wake_after(245);
/* Test Step 7
......
......@@ -15,7 +15,7 @@
mtf="0.3"
ms_per_tick="2"
type="TEST_GMV_VAL"
personality="RTEMS5">
personality="RTEMS48I">
<description>
Call the SET_MODULE_SCHEDULE function from an authorized partition
and check that the partitioning schedule is altered starting at the next
......
......@@ -158,7 +158,7 @@
Criticality="LEVEL_A"
SystemPartition="false"
EntryPoint="test_main">
<PartitionConfiguration Personality="RTEMS5" Cores="1">
<PartitionConfiguration Personality="RTEMS48I" Cores="1">
<Libs>LIBAIR;LIBPRINTF;IMASPEX;LIBTEST</Libs>
<Cache>CODE; DATA</Cache>
<Memory Size="0x500000" />
......@@ -173,7 +173,7 @@
Criticality="LEVEL_A"
SystemPartition="false"
EntryPoint="test_main">
<PartitionConfiguration Personality="RTEMS5" Cores="1">
<PartitionConfiguration Personality="RTEMS48I" Cores="1">
<Libs>LIBAIR;LIBPRINTF;IMASPEX;LIBTEST</Libs>
<Cache>CODE; DATA</Cache>
<Memory Size="0x500000" />
......@@ -190,7 +190,7 @@
Criticality="LEVEL_A"
SystemPartition="false"
EntryPoint="test_printf">
<PartitionConfiguration Personality="RTEMS5" Cores="1">
<PartitionConfiguration Personality="RTEMS48I" Cores="1">
<Libs>LIBAIR;LIBPRINTF;IMASPEX;LIBTEST</Libs>
<Cache>CODE; DATA</Cache>
<Memory Size="0x500000" />
......@@ -212,22 +212,26 @@
========================================================================================= -->
<!-- module schedule 1 -->
<Module_Schedule ScheduleIdentifier="0" ScheduleName="test_sched" InitialModuleSchedule="true" MajorFrameSeconds="0.3">
<Module_Schedule ScheduleIdentifier="0" ScheduleName="test_sched" InitialModuleSchedule="true" MajorFrameSeconds="0.4">
<Partition_Schedule PartitionIdentifier="0"
PartitionName="p0"
PeriodSeconds="0.3"
PeriodDurationSeconds="0.1"
PeriodSeconds="0.4"
PeriodDurationSeconds="0.2"
SetModuleSchedule="true">
<Window_Schedule WindowIdentifier="001"
WindowStartSeconds="0.0"
WindowDurationSeconds="0.1"
PartitionPeriodStart="true"/>
<Window_Schedule WindowIdentifier="002"
WindowStartSeconds="0.2"
WindowDurationSeconds="0.1"
PartitionPeriodStart="false"/>
</Partition_Schedule>
<Partition_Schedule PartitionIdentifier="1"
PartitionName="p1"
PeriodSeconds="0.3"
PeriodSeconds="0.4"
PeriodDurationSeconds="0.1"
SetModuleSchedule="false">
<Window_Schedule WindowIdentifier="101"
......@@ -238,11 +242,11 @@
<Partition_Schedule PartitionIdentifier="2"
PartitionName="p2"
PeriodSeconds="0.3"
PeriodSeconds="0.4"
PeriodDurationSeconds="0.1"
SetModuleSchedule="false">
<Window_Schedule WindowIdentifier="201"
WindowStartSeconds="0.2"
WindowStartSeconds="0.3"
WindowDurationSeconds="0.1"
PartitionPeriodStart="true"/>
</Partition_Schedule>
......@@ -256,7 +260,7 @@
PeriodSeconds="1.5"
PeriodDurationSeconds="0.5"
SetModuleSchedule="true">
<Window_Schedule WindowIdentifier="001"
<Window_Schedule WindowIdentifier="501"
WindowStartSeconds="0.0"
WindowDurationSeconds="0.5"
PartitionPeriodStart="true"/>
......@@ -267,7 +271,7 @@
PeriodSeconds="1.5"
PeriodDurationSeconds="0.5"
SetModuleSchedule="false">
<Window_Schedule WindowIdentifier="101"
<Window_Schedule WindowIdentifier="601"
WindowStartSeconds="0.5"
WindowDurationSeconds="0.5"
PartitionPeriodStart="true"/>
......@@ -278,7 +282,7 @@
PeriodSeconds="1.5"
PeriodDurationSeconds="0.5"
SetModuleSchedule="false">
<Window_Schedule WindowIdentifier="201"
<Window_Schedule WindowIdentifier="701"
WindowStartSeconds="1.0"
WindowDurationSeconds="0.5"
PartitionPeriodStart="true"/>
......
......@@ -72,6 +72,11 @@ int test_main(void) {
/* Test Start ****************************************************** */
test_enter(12);
/* since we are measuring execution windows, we should not use the
* current one, since it was already partially occupied by the
* partition rtems boot-up, so let's wait until the next one */
rtems_task_wake_after(wait >> 1);
/* Test Steps ******************************************************* */
/* Test Step 0
Get the current time, sleep for one tick, get the time again and
......@@ -110,7 +115,7 @@ int test_main(void) {
/* Test Step 2
Check that the last step differs (MTF - P0) ticks execution window from
* * test_step_announce is blocked waiting for steip 1,1
* Execution time: (50-19) of P0w1 + 50 of P2 = 81!
* Execution time: (50-19) of P0w1 + 50 of P2 + 50P1 + 50P0w2 = 81!
* the previously stored value. */
test_step_announce(2, 1);
......@@ -121,7 +126,7 @@ int test_main(void) {
The rtems_clock_get function call should be successfull */
ret |= _rtems_clock_get(&t1);
ret |= t1 == t2 + 81 ? RTEMS_SUCCESSFUL : 1;
ret |= t1 == t2 + 181 ? RTEMS_SUCCESSFUL : 1;
/* EXPECTED: */
......@@ -265,7 +270,7 @@ int test_main(void) {
test_step_announce(7, 1);
// push to end of window
rtems_task_wake_after(241);
rtems_task_wake_after(245);
/* Test step 7 code */
/* The rtems_clock_get function call should be successfull */
......
......@@ -15,7 +15,7 @@
mtf="0.3"
ms_per_tick="2"
type="TEST_GMV_VAL"
personality="RTEMS5">
personality="RTEMS48I">
<description>
Repeat test TEST-DEF-00009 with more than one execution window for
partition 0.
......
......@@ -158,12 +158,12 @@
Criticality="LEVEL_A"
SystemPartition="false"
EntryPoint="test_main">
<PartitionConfiguration Personality="RTEMS5" Cores="1">
<PartitionConfiguration Personality="RTEMS48I" Cores="1">
<Libs>LIBAIR;LIBPRINTF;IMASPEX;LIBTEST</Libs>
<Cache>CODE; DATA</Cache>
<Memory Size="0x500000" />
<Permissions>
FPU_CONTROL; CACHE_CONTROL; GLOBAL_TIME; SET_TOD; SET_PARTITION_MODE;
FPU_CONTROL; CACHE_CONTROL; GLOBAL_TIME; SET_TOD; SET_PARTITION_MODE; MODULE_CONTROL;
</Permissions>
</PartitionConfiguration>
</Partition>
......@@ -173,7 +173,7 @@
Criticality="LEVEL_A"
SystemPartition="false"
EntryPoint="test_main">
<PartitionConfiguration Personality="RTEMS5" Cores="1">
<PartitionConfiguration Personality="RTEMS48I" Cores="1">
<Libs>LIBAIR;LIBPRINTF;IMASPEX;LIBTEST</Libs>
<Cache>CODE; DATA</Cache>
<Memory Size="0x500000" />
......@@ -190,7 +190,7 @@
Criticality="LEVEL_A"
SystemPartition="false"
EntryPoint="test_printf">
<PartitionConfiguration Personality="RTEMS5" Cores="1">
<PartitionConfiguration Personality="RTEMS48I" Cores="1">
<Libs>LIBAIR;LIBPRINTF;IMASPEX;LIBTEST</Libs>
<Cache>CODE; DATA</Cache>
<Memory Size="0x500000" />
......@@ -337,7 +337,7 @@
<Partition_HM_Table PartitionIdentifier="1" PartitionName="p1" PartitionCallback="partition_HM_callback">
<System_State_Entry Description="Partition is Running" SystemState="2">
<Error_ID_Action Action="IGNORE" Description="Power Interrupt" ErrorIdentifier="0"/>
<Error_ID_Action Action="COLD_START" Description="Illegal Instruction" ErrorIdentifier="1"/>
<Error_ID_Action Action="IGNORE" Description="Illegal Instruction" ErrorIdentifier="1"/>
<Error_ID_Action Action="IGNORE" Description="Segmentation Error" ErrorIdentifier="2"/>
<Error_ID_Action Action="IGNORE" Description="Unimplemented Error" ErrorIdentifier="3"/>
<Error_ID_Action Action="IGNORE" Description="Floating Point Error" ErrorIdentifier="4"/>
......
......@@ -60,20 +60,19 @@ int test_main (void) {
/* function to test return code */
rtems_status_code ret = RTEMS_SUCCESSFUL;
/* total test result */
int res = TEST_SUCCESS;
int res = TEST_SUCCESS;
/* Test specific variables ****************************************** */
unsigned int i=0;
/* Test Start ****************************************************** */
test_enter(600);
/* Test Steps ******************************************************* */
/* Test Step 0
Execute a supervisor instruction [e.g. lda instruction]. Verify that
the HM is not raised. */
test_step_announce(0,1);
read_psr_register();
/* Test step 0 code */
......
......@@ -61,11 +61,13 @@ int test_main (void) {
/* function to test return code */
rtems_status_code ret = RTEMS_SUCCESSFUL;
/* total test result */
int res = TEST_SUCCESS;
int res = TEST_SUCCESS;
/* Test specific variables ****************************************** */
unsigned int i=0;
/* Test Start ****************************************************** */
test_enter(600);
/* Test Steps ******************************************************* */
/* Test Step 2
Execute a regular operation. */
......@@ -95,7 +97,7 @@ int test_main (void) {
read_psr_register();
/* EXPECTED: */
if ((RTEMS_SUCCESSFUL == ret) && (PMK_VIOL_ERR == unexp_error)) {
if ((RTEMS_SUCCESSFUL == ret) && (AIR_VIOLATION_ERROR == unexp_error)) {
res &= test_report(__FILE__, __LINE__, TEST_SUCCESS,
RESULT_EQUAL | RESULT_TYPE_VALUE,
ret);
......
......@@ -15,7 +15,7 @@
mtf="0.3"
ms_per_tick="10"
type="TEST_GMV_VAL"
personality="RTEMS5">
personality="RTEMS48I">
<!-- trap number should be in hexadecimal format -->
<registered_traps async="" sync="0x03" />
<description>
......
......@@ -228,97 +228,97 @@
========================================================================================= -->
<!-- module schedule 1 -->
<Module_Schedule ScheduleIdentifier="0" ScheduleName="test_sched" InitialModuleSchedule="true" MajorFrameSeconds="0.3">
<Module_Schedule ScheduleIdentifier="0" ScheduleName="test_sched" InitialModuleSchedule="true" MajorFrameSeconds="0.4">
<Partition_Schedule PartitionIdentifier="0"
PartitionName="p0"
PeriodSeconds="0.3"
PeriodDurationSeconds="0.075"
PeriodSeconds="0.4"
PeriodDurationSeconds="0.1"
SetModuleSchedule="true">
<Window_Schedule WindowIdentifier="001"
WindowStartSeconds="0.0"
WindowDurationSeconds="0.075"
WindowDurationSeconds="0.1"
PartitionPeriodStart="true"/>
</Partition_Schedule>
<Partition_Schedule PartitionIdentifier="1"
PartitionName="p1"
PeriodSeconds="0.3"
PeriodDurationSeconds="0.075"
PeriodSeconds="0.4"
PeriodDurationSeconds="0.1"
SetModuleSchedule="false">
<Window_Schedule WindowIdentifier="101"
WindowStartSeconds="0.075"
WindowDurationSeconds="0.075"
WindowStartSeconds="0.1"
WindowDurationSeconds="0.1"
PartitionPeriodStart="true"/>
</Partition_Schedule>
<Partition_Schedule PartitionIdentifier="2"
PartitionName="p2"
PeriodSeconds="0.3"
PeriodDurationSeconds="0.075"
PeriodSeconds="0.4"
PeriodDurationSeconds="0.1"
SetModuleSchedule="false">
<Window_Schedule WindowIdentifier="201"
WindowStartSeconds="0.15"
WindowDurationSeconds="0.075"
WindowStartSeconds="0.2"
WindowDurationSeconds="0.1"
PartitionPeriodStart="true"/>
</Partition_Schedule>
<Partition_Schedule PartitionIdentifier="3"
PartitionName="p3"
PeriodSeconds="0.3"
PeriodDurationSeconds="0.075"
PeriodSeconds="0.4"
PeriodDurationSeconds="0.1"
SetModuleSchedule="false">
<Window_Schedule WindowIdentifier="301"
WindowStartSeconds="0.225"
WindowDurationSeconds="0.075"
WindowStartSeconds="0.3"
WindowDurationSeconds="0.1"
PartitionPeriodStart="true"/>
</Partition_Schedule>
</Module_Schedule>
<!-- module schedule 2 -->
<Module_Schedule ScheduleIdentifier="1" ScheduleName="test_sched2" InitialModuleSchedule="false" MajorFrameSeconds="1.5">
<Module_Schedule ScheduleIdentifier="1" ScheduleName="test_sched2" InitialModuleSchedule="false" MajorFrameSeconds="2.0">
<Partition_Schedule PartitionIdentifier="0"
PartitionName="p0"
PeriodSeconds="1.5"
PeriodDurationSeconds="0.375"
PeriodSeconds="2.0"
PeriodDurationSeconds="0.5"
SetModuleSchedule="true">
<Window_Schedule WindowIdentifier="001"
WindowStartSeconds="0.0"
WindowDurationSeconds="0.375"
WindowDurationSeconds="0.5"
PartitionPeriodStart="true"/>
</Partition_Schedule>
<Partition_Schedule PartitionIdentifier="1"
PartitionName="p1"
PeriodSeconds="1.5"
PeriodDurationSeconds="0.375"
PeriodSeconds="2.0"
PeriodDurationSeconds="0.5"
SetModuleSchedule="false">
<Window_Schedule WindowIdentifier="101"
WindowStartSeconds="0.375"
WindowDurationSeconds="0.375"
WindowStartSeconds="0.5"
WindowDurationSeconds="0.5"
PartitionPeriodStart="true"/>
</Partition_Schedule>
<Partition_Schedule PartitionIdentifier="2"
PartitionName="p2"
PeriodSeconds="1.5"
PeriodDurationSeconds="0.375"
PeriodSeconds="2.0"
PeriodDurationSeconds="0.5"
SetModuleSchedule="false">
<Window_Schedule WindowIdentifier="201"
WindowStartSeconds="0.75"
WindowDurationSeconds="0.375"
WindowStartSeconds="1.0"
WindowDurationSeconds="0.5"
PartitionPeriodStart="true"/>
</Partition_Schedule>
<Partition_Schedule PartitionIdentifier="3"
PartitionName="p3"
PeriodSeconds="1.5"
PeriodDurationSeconds="0.375"
PeriodSeconds="2.0"
PeriodDurationSeconds="0.5"
SetModuleSchedule="false">
<Window_Schedule WindowIdentifier="301"
WindowStartSeconds="1.125"
WindowDurationSeconds="0.375"
WindowStartSeconds="1.5"
WindowDurationSeconds="0.5"
PartitionPeriodStart="true"/>
</Partition_Schedule>
</Module_Schedule>
......
......@@ -219,7 +219,7 @@ int test_main (void) {
test_step_announce(4,1);
/* Test step 4 code */
if (PMK_SEG_ERR == unexp_error) {
if (AIR_SEGMENTATION_ERROR == unexp_error) {
ret = RTEMS_SUCCESSFUL;
unexp_error = 0;
}
......@@ -260,7 +260,7 @@ int test_main (void) {
test_step_announce(7,1);
/* Test step 7 code */
if (PMK_SEG_ERR == unexp_error) {
if (AIR_SEGMENTATION_ERROR == unexp_error) {
ret = RTEMS_SUCCESSFUL;
unexp_error = 0;
}
......
......@@ -16,8 +16,6 @@
#include <rtems.h>
#include <pmk_linkcmd_vars.h>
#include <pmk_segregation.h>
#include <air.h>
#include <air_test.h>
......
......@@ -12,7 +12,7 @@
partitions="3"
test_end_partition="0"
repeat="1"
mtf="0.3"
mtf="0.4"
ms_per_tick="10"
type="TEST_GMV_VAL"
personality="RTEMS5">
......
......@@ -41,6 +41,8 @@ static __inline__ void ASM_UNIMP(void) {
void partition_HM_callback(air_state_e state_id,air_error_e i_error) {
/* signal error ocurrence */