summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-08-04 07:53:09 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-15 07:50:49 +0200
commitcbf4c887cbb507342b6d16aafe1c8b210f319b2b (patch)
tree711c3a1c7f46121a2ab45b9260ce91ba296beb8e
parentef7661d665174a9f7103e861e9a25acb4a46a42a (diff)
validation: Add second SMP-only test suite
-rw-r--r--spec/build/testsuites/validation/grp.yml4
-rw-r--r--spec/build/testsuites/validation/validation-smp-only-0.yml (renamed from spec/build/testsuites/validation/validation-smp-only.yml)4
-rw-r--r--spec/build/testsuites/validation/validation-smp-only-1.yml20
-rw-r--r--testsuites/validation/tc-bsp-interrupt-spurious.c2
-rw-r--r--testsuites/validation/tc-scheduler-smp-only.c2
-rw-r--r--testsuites/validation/ts-default.h4
-rw-r--r--testsuites/validation/ts-validation-smp-only-0.c (renamed from testsuites/validation/ts-validation-smp-only.c)8
-rw-r--r--testsuites/validation/ts-validation-smp-only-1.c94
8 files changed, 127 insertions, 11 deletions
diff --git a/spec/build/testsuites/validation/grp.yml b/spec/build/testsuites/validation/grp.yml
index 1157d37674..7f53735f32 100644
--- a/spec/build/testsuites/validation/grp.yml
+++ b/spec/build/testsuites/validation/grp.yml
@@ -55,7 +55,9 @@ links:
- role: build-dependency
uid: validation-non-smp
- role: build-dependency
- uid: validation-smp-only
+ uid: validation-smp-only-0
+- role: build-dependency
+ uid: validation-smp-only-1
type: build
use-after:
- rtemstest
diff --git a/spec/build/testsuites/validation/validation-smp-only.yml b/spec/build/testsuites/validation/validation-smp-only-0.yml
index 78b1d3c8f7..cfae6dfabb 100644
--- a/spec/build/testsuites/validation/validation-smp-only.yml
+++ b/spec/build/testsuites/validation/validation-smp-only-0.yml
@@ -14,9 +14,9 @@ links: []
source:
- testsuites/validation/tc-bsp-interrupt-spurious.c
- testsuites/validation/tc-scheduler-smp-only.c
-- testsuites/validation/ts-validation-smp-only.c
+- testsuites/validation/ts-validation-smp-only-0.c
stlib: []
-target: testsuites/validation/ts-validation-smp-only.exe
+target: testsuites/validation/ts-validation-smp-only-0.exe
type: build
use-after:
- validation
diff --git a/spec/build/testsuites/validation/validation-smp-only-1.yml b/spec/build/testsuites/validation/validation-smp-only-1.yml
new file mode 100644
index 0000000000..3ed3d8db03
--- /dev/null
+++ b/spec/build/testsuites/validation/validation-smp-only-1.yml
@@ -0,0 +1,20 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+build-type: test-program
+cflags: []
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+cppflags: []
+cxxflags: []
+enabled-by: RTEMS_SMP
+features: c cprogram
+includes: []
+ldflags: []
+links: []
+source:
+- testsuites/validation/ts-validation-smp-only-1.c
+stlib: []
+target: testsuites/validation/ts-validation-smp-only-1.exe
+type: build
+use-after:
+- validation
+use-before: []
diff --git a/testsuites/validation/tc-bsp-interrupt-spurious.c b/testsuites/validation/tc-bsp-interrupt-spurious.c
index e38a24a566..9d2242d0ec 100644
--- a/testsuites/validation/tc-bsp-interrupt-spurious.c
+++ b/testsuites/validation/tc-bsp-interrupt-spurious.c
@@ -63,7 +63,7 @@
* @defgroup RTEMSTestCaseBspReqInterruptSpurious \
* spec:/bsp/req/interrupt-spurious
*
- * @ingroup RTEMSTestSuiteTestsuitesValidationSmpOnly
+ * @ingroup RTEMSTestSuiteTestsuitesValidationSmpOnly0
*
* @{
*/
diff --git a/testsuites/validation/tc-scheduler-smp-only.c b/testsuites/validation/tc-scheduler-smp-only.c
index 9b95040fed..56968f6b81 100644
--- a/testsuites/validation/tc-scheduler-smp-only.c
+++ b/testsuites/validation/tc-scheduler-smp-only.c
@@ -62,7 +62,7 @@
* @defgroup RTEMSTestCaseRtemsSchedulerValSmpOnly \
* spec:/rtems/scheduler/val/smp-only
*
- * @ingroup RTEMSTestSuiteTestsuitesValidationSmpOnly
+ * @ingroup RTEMSTestSuiteTestsuitesValidationSmpOnly0
*
* @brief This test case collection provides validation test cases for SMP-only
* requirements of the @ref RTEMSAPIClassicScheduler.
diff --git a/testsuites/validation/ts-default.h b/testsuites/validation/ts-default.h
index f608811319..3723e72ada 100644
--- a/testsuites/validation/ts-default.h
+++ b/testsuites/validation/ts-default.h
@@ -242,7 +242,7 @@ RTEMS_SCHEDULER_EDF_SMP( d );
RTEMS_SCHEDULER_ASSIGN(2, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL)
#endif
-#else /* RTEMS_SMP */
+#elif !defined( CONFIGURE_SCHEDULER_ASSIGNMENTS )
#include <rtems/score/schedulerpriority.h>
@@ -260,7 +260,7 @@ T_scheduler_operations[ CONFIGURE_MAXIMUM_PROCESSORS ] = {
#define CONFIGURE_SCHEDULER_NAME TEST_SCHEDULER_A_NAME
-#endif /* RTEMS_SMP */
+#endif
#define CONFIGURE_INIT
diff --git a/testsuites/validation/ts-validation-smp-only.c b/testsuites/validation/ts-validation-smp-only-0.c
index 3b656c01ba..9907365cd9 100644
--- a/testsuites/validation/ts-validation-smp-only.c
+++ b/testsuites/validation/ts-validation-smp-only-0.c
@@ -3,7 +3,7 @@
/**
* @file
*
- * @ingroup RTEMSTestSuiteTestsuitesValidationSmpOnly
+ * @ingroup RTEMSTestSuiteTestsuitesValidationSmpOnly0
*/
/*
@@ -55,8 +55,8 @@
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestSuiteTestsuitesValidationSmpOnly \
- * spec:/testsuites/validation-smp-only
+ * @defgroup RTEMSTestSuiteTestsuitesValidationSmpOnly0 \
+ * spec:/testsuites/validation-smp-only-0
*
* @ingroup RTEMSTestSuites
*
@@ -69,7 +69,7 @@
* @{
*/
-const char rtems_test_name[] = "ValidationSMPOnly";
+const char rtems_test_name[] = "ValidationSMPOnly0";
#define CONFIGURE_MAXIMUM_PROCESSORS 5
diff --git a/testsuites/validation/ts-validation-smp-only-1.c b/testsuites/validation/ts-validation-smp-only-1.c
new file mode 100644
index 0000000000..a1f9eeb413
--- /dev/null
+++ b/testsuites/validation/ts-validation-smp-only-1.c
@@ -0,0 +1,94 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestSuiteTestsuitesValidationSmpOnly1
+ */
+
+/*
+ * Copyright (C) 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 "ts-config.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RTEMSTestSuiteTestsuitesValidationSmpOnly1 \
+ * spec:/testsuites/validation-smp-only-1
+ *
+ * @ingroup RTEMSTestSuites
+ *
+ * @brief This SMP-only test suite validates the clustered scheduler
+ * configuration through an application configuration with a processor
+ * maximum of two, however, only the first processor has a scheduler
+ * assigned.
+ *
+ * @{
+ */
+
+const char rtems_test_name[] = "ValidationSMPOnly1";
+
+#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_NO_SCHEDULER
+
+#include "ts-default.h"
+
+/** @} */