[rtems commit] sptests: Avoid a dependency on errno

Sebastian Huber sebh at rtems.org
Fri Jan 28 07:35:54 UTC 2022


Module:    rtems
Branch:    master
Commit:    b519e509a953c25894700531c321f7213fa11e70
Changeset: http://git.rtems.org/rtems/commit/?id=b519e509a953c25894700531c321f7213fa11e70

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Jan 27 14:16:55 2022 +0100

sptests: Avoid a dependency on errno

Avoid a dependency on errno which might be a thread-local object.  The tests
sp01, spstkalloc02, and sptls03 assume that no thread-local storage object is
present.

Update #4560.

---

 testsuites/sptests/sp01/init.c                   | 2 ++
 testsuites/sptests/sp01/sp01.doc                 | 2 ++
 testsuites/sptests/sp01/system.h                 | 7 ++++++-
 testsuites/sptests/spstkalloc02/init.c           | 7 ++++++-
 testsuites/sptests/spstkalloc02/spstkalloc02.doc | 2 ++
 testsuites/sptests/sptls03/init.c                | 7 ++++++-
 testsuites/sptests/sptls03/sptls03.doc           | 2 ++
 7 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/testsuites/sptests/sp01/init.c b/testsuites/sptests/sp01/init.c
index e0072a6..a630184 100644
--- a/testsuites/sptests/sp01/init.c
+++ b/testsuites/sptests/sp01/init.c
@@ -25,6 +25,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 43c8ee0..46109a7 100644
--- a/testsuites/sptests/sp01/sp01.doc
+++ b/testsuites/sptests/sp01/sp01.doc
@@ -8,6 +8,8 @@
 
 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 d7990ae..82354b8 100644
--- a/testsuites/sptests/sp01/system.h
+++ b/testsuites/sptests/sp01/system.h
@@ -21,9 +21,14 @@ 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
+
 #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/sptests/spstkalloc02/init.c b/testsuites/sptests/spstkalloc02/init.c
index a2805d1..6115b06 100644
--- a/testsuites/sptests/spstkalloc02/init.c
+++ b/testsuites/sptests/spstkalloc02/init.c
@@ -117,9 +117,14 @@ 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
+
 #define CONFIGURE_MAXIMUM_TASKS TASK_COUNT
 
 #define CONFIGURE_TASK_STACK_ALLOCATOR_INIT task_stack_init
diff --git a/testsuites/sptests/spstkalloc02/spstkalloc02.doc b/testsuites/sptests/spstkalloc02/spstkalloc02.doc
index a5e4e27..54d45eb 100644
--- a/testsuites/sptests/spstkalloc02/spstkalloc02.doc
+++ b/testsuites/sptests/spstkalloc02/spstkalloc02.doc
@@ -9,6 +9,8 @@ This file describes the directives and concepts tested by this test set.
 
 test set name:  spstkalloc01
 
+The test expects that no thread-local object is present.
+
 directives:
 
 concepts:
diff --git a/testsuites/sptests/sptls03/init.c b/testsuites/sptests/sptls03/init.c
index ac46f06..d0aa607 100644
--- a/testsuites/sptests/sptls03/init.c
+++ b/testsuites/sptests/sptls03/init.c
@@ -48,7 +48,12 @@ static void Init(rtems_task_argument arg)
 }
 
 #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
 
 #define CONFIGURE_MAXIMUM_TASKS 1
 
diff --git a/testsuites/sptests/sptls03/sptls03.doc b/testsuites/sptests/sptls03/sptls03.doc
index 2b92bcd..a51e9c9 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()



More information about the vc mailing list