I'm ok with this as long as the doc file makes it clear that you have
to be careful to avoid any TLS slipping in.

Is there anyway to validate the size of the TLS area is 0? Perhaps in
the test. I suppose it also could be done via inspection of the
executable on the host but that would require a special post-link
check. But it would avoid going to the target.

Anyway, it would be awesome if that assumption could be verified.
Otherwise, it is an error lurking.

--joel

On Thu, Jan 27, 2022 at 7:21 AM Sebastian Huber
<sebastian.hu...@embedded-brains.de> wrote:
>
> 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/system.h       | 7 ++++++-
>  testsuites/sptests/spstkalloc02/init.c | 7 ++++++-
>  testsuites/sptests/sptls03/init.c      | 7 ++++++-
>  3 files changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/testsuites/sptests/sp01/system.h 
> b/testsuites/sptests/sp01/system.h
> index d7990aeca8..82354b801e 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 a2805d1164..6115b06413 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/sptls03/init.c 
> b/testsuites/sptests/sptls03/init.c
> index ac46f068eb..d0aa60758d 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
>
> --
> 2.26.2
>
> _______________________________________________
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to