Re: [PATCH 1/2] Confstr Port for RTEMS

2020-08-13 Thread Chris Johns
On 13/8/20 3:54 pm, Sebastian Huber wrote: > On 12/08/2020 21:07, Gedare Bloom wrote: > >> Chris, Christian, Sebastian: >> >> I think it would be best if one of you may have insight on this touching >> libbsd. > Is libbsd really the right place for this function? Do we need the ability to > synch

[PATCH 0/8] Test Framework: Support Fixture Test Plans

2020-08-13 Thread Sebastian Huber
The functions T_push_fixture() and T_pop_fixture() were added to support nested fixtures. This enables test building blocks. The patch set adds fixture-specific test plans to allow the use of test plans with nested fixtures. Sebastian Huber (8): libtest: Change fixture scope method libtest:

[PATCH 5/8] libtest: Use line buffer in T_check()

2020-08-13 Thread Sebastian Huber
Update #3199. --- cpukit/libtest/t-test.c | 117 +--- 1 file changed, 86 insertions(+), 31 deletions(-) diff --git a/cpukit/libtest/t-test.c b/cpukit/libtest/t-test.c index ce9af0498b..26fe988b11 100644 --- a/cpukit/libtest/t-test.c +++ b/cpukit/libtest/t-test.

[PATCH 1/8] libtest: Change fixture scope method

2020-08-13 Thread Sebastian Huber
Return the produced character count. There is no need for a NUL termination. Update #3199. --- cpukit/include/rtems/test.h| 9 +- cpukit/libtest/t-test.c| 136 - testsuites/libtests/ttest01/test-fixture.c | 8 +- 3 files changed, 86 ins

[PATCH 6/8] libtest: Add T_check_steps()

2020-08-13 Thread Sebastian Huber
Update #3199. --- cpukit/libtest/t-test.c | 31 +-- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/cpukit/libtest/t-test.c b/cpukit/libtest/t-test.c index 26fe988b11..21e9afe190 100644 --- a/cpukit/libtest/t-test.c +++ b/cpukit/libtest/t-test.c @@ -49,8

[PATCH 8/8] libtest: Change T_step() and T_assert_step()

2020-08-13 Thread Sebastian Huber
Normally, the expected test step must be a compile time constant. Allow variable expected test steps for the T_step() and T_assert_step(). This can be used in for parameterized test loops with individual fixtures. Remove the ability to use custom failure messages due to some implementation const

[PATCH 2/8] libtest: Add output buffer drain and fill

2020-08-13 Thread Sebastian Huber
Update #3199. --- cpukit/libtest/t-test.c | 60 - 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/cpukit/libtest/t-test.c b/cpukit/libtest/t-test.c index b1b5253bb5..e8d0542c31 100644 --- a/cpukit/libtest/t-test.c +++ b/cpukit/libtest/t-test.

[PATCH 7/8] libtest: Add fixture steps

2020-08-13 Thread Sebastian Huber
Support a new test plan for each nested fixture. Update #3199. --- cpukit/include/rtems/test.h| 3 + cpukit/libtest/t-test.c| 83 ++ testsuites/libtests/ttest01/init.c | 2 +- testsuites/libtests/ttest01/test-fixture.c | 34 ---

[PATCH 4/8] libtest: Add T_puts()

2020-08-13 Thread Sebastian Huber
Update #3199. --- cpukit/include/rtems/test.h | 2 ++ cpukit/libtest/t-test.c | 24 2 files changed, 26 insertions(+) diff --git a/cpukit/include/rtems/test.h b/cpukit/include/rtems/test.h index a3900c1285..212d4a5ae2 100644 --- a/cpukit/include/rtems/test.h +++ b/cp

[PATCH 3/8] libtest: Add T_do_is_runner()

2020-08-13 Thread Sebastian Huber
Update #3199. --- cpukit/libtest/t-test.c | 64 ++--- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/cpukit/libtest/t-test.c b/cpukit/libtest/t-test.c index e8d0542c31..92aed62b9b 100644 --- a/cpukit/libtest/t-test.c +++ b/cpukit/libtest/t-test.

Re: [PATCH] bsps/shared/ofw: Added and Documented RTEMS OFW interface

2020-08-13 Thread Niteesh G. S.
Hello, On Thu, Aug 13, 2020 at 12:09 PM Christian Mauderer < christian.maude...@embedded-brains.de> wrote: > Hello Niteesh, > > On 13/08/2020 07:05, Niteesh G. S. wrote: > > On Thu, Aug 13, 2020 at 12:36 AM Gedare Bloom > > wrote: > > > > I make a few comments below f

[PATCH v3] Psxtest : Fix String Turncation warning

2020-08-13 Thread Aschref Ben-Thabet
From: Aschref Ben Thabet replace strncpy with strdup to silence this warning since it tries to allocate enough memory to hold the old string (plus a '\0' character to mark the end of the string). ddd --- testsuites/psxtests/psxndbm01/init.c | 5 + 1 file changed, 1 insertion(+), 4 deletions

Re: [PATCH v3] Psxtest : Fix String Turncation warning

2020-08-13 Thread Sebastian Huber
On 13/08/2020 13:44, Aschref Ben-Thabet wrote: diff --git a/testsuites/psxtests/psxndbm01/init.c b/testsuites/psxtests/psxndbm01/init.c index b524aff0df..cb4d1aca66 100644 --- a/testsuites/psxtests/psxndbm01/init.c +++ b/testsuites/psxtests/psxndbm01/init.c @@ -217,10 +217,7 @@ rtems_task Init(

Need help in figuring out how to allocate sizes to the array

2020-08-13 Thread Richi Dubey
Hi, I want to use arrays with size _CONFIGURE_MAXIMUM_PROCESSORS. Is it okay if I define the arrays with this size while writing the scheduler strong APA header file? I am asking this because the value of this header gets defined at the time the test case runs while the scheduler gets linked to th

Re: Need help in figuring out how to allocate sizes to the array

2020-08-13 Thread Sebastian Huber
On 13/08/2020 14:42, Richi Dubey wrote: I want to use arrays with size _CONFIGURE_MAXIMUM_PROCESSORS. Is it okay if I define the arrays with this size while writing the scheduler strong APA header file? I am asking this because the value of this header gets defined at the time the test case runs

Re: crypt and POSIX

2020-08-13 Thread Joel Sherrill
On Wed, Aug 12, 2020 at 11:56 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 13/08/2020 00:41, Joel Sherrill wrote: > > > Hi > > > > I was poking at updating the Compliance Spreadsheet to track what > > Eshan has been doing this summer. POSIX requires crypt with crypt_r > > b

Re: crypt and POSIX

2020-08-13 Thread Sebastian Huber
On 13/08/2020 14:49, Joel Sherrill wrote: Why was crypt() removed? It is in the FreeBSD version at the bottom of the file. https://github.com/freebsd/freebsd/blob/master/lib/libcrypt/crypt.c It is not thread-safe. ___ devel mailing list devel@rtems.

Re: [PATCH 1/2] Confstr Port for RTEMS

2020-08-13 Thread Joel Sherrill
I don't care where we provide it. The list of names varies a bit based on the version of POSIX you are based on. We probably can just use the FreeBSD version minus the standard path which makes no sense on RTEMS. They just detect you are running on a supported environment or not. They only suppor

Re: crypt and POSIX

2020-08-13 Thread Joel Sherrill
On Thu, Aug 13, 2020 at 7:52 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 13/08/2020 14:49, Joel Sherrill wrote: > > > Why was crypt() removed? It is in the FreeBSD version at the bottom of > > the file. > > > > https://github.com/freebsd/freebsd/blob/master/lib/libcrypt/cr

Re: [PATCH] bsps/shared/ofw: Added and Documented RTEMS OFW interface

2020-08-13 Thread Gedare Bloom
On Thu, Aug 13, 2020 at 4:31 AM Niteesh G. S. wrote: > > Hello, > On Thu, Aug 13, 2020 at 12:09 PM Christian Mauderer > wrote: >> >> Hello Niteesh, >> >> On 13/08/2020 07:05, Niteesh G. S. wrote: >> > On Thu, Aug 13, 2020 at 12:36 AM Gedare Bloom > > > wrote: >> > >> >

Re: Need help in figuring out how to allocate sizes to the array

2020-08-13 Thread Richi Dubey
Thanks, I am assuming this is the code that allocates space: #define RTEMS_SCHEDULER_EDF_SMP( name ) \ > static struct { \ >Scheduler_EDF_SMP_Context Base; \ >Scheduler_EDF_SMP_Ready_queue Ready[ CONFIGURE_MAXIMUM_PROCESSORS > + 1 ]; \ > } SCHEDULER_EDF_SMP_CONTEXT_NAME

Strict thread stack isolation and sharing

2020-08-13 Thread Utkarsh Rai
Following is the complete set of changes for thread stack isolation and sharing. Configuration for thread stack isolation. > The configuration for thread stack isolation is based upon the new build system. > The RTEMS_THREAD_STACK_PROTECTION option needs to be specified and set to 'True' for en

[PATCH] Strict thread-stack isolation and thread-stack sharing.

2020-08-13 Thread Utkarsh Rai
-This patch provides thread-stack isolation and thread-stack sharing mechanism for a POSIX thread. -The patches are based on sebastian's build-2 branch of sebastian's repo https://git.rtems.org/sebh -Configurations options are provided by using the new-build system. Refer to https://ftp.rtems.

Re: Need help in figuring out how to allocate sizes to the array

2020-08-13 Thread Gedare Bloom
On Thu, Aug 13, 2020 at 8:34 AM Richi Dubey wrote: > > Thanks, > I am assuming this is the code that allocates space: > >> #define RTEMS_SCHEDULER_EDF_SMP( name ) \ >> static struct { \ >>Scheduler_EDF_SMP_Context Base; \ >>Scheduler_EDF_SMP_Ready_queue Ready[ CONFIGURE_MAXI

[PATCH v2] cpukit: Edit String Warninng

2020-08-13 Thread Aschref Ben-Thabet
From: Aschref Ben Thabet Using FILENAME_MAX as a parameter in strncpy function can gererate warnings of type: -Wstringop-truncation. Replacing it with sizeof (distination_buffer) can avoid this warning. --- cpukit/libmisc/shell/main_edit.c | 11 ++- 1 file changed, 6 insertions(+), 5 del

Re: Need help in figuring out how to allocate sizes to the array

2020-08-13 Thread Richi Dubey
Thanks, But I still can't find the code that links the 'Ready' in this >> #define RTEMS_SCHEDULER_EDF_SMP( name ) \ >> static struct { \ >>Scheduler_EDF_SMP_Context Base; \ >>Scheduler_EDF_SMP_Ready_queue Ready[ CONFIGURE_MAXIMUM_PROCESSORS >> + 1 ]; \ to the 'Ready' in sch

[PATCH v3] cpukit: Edit String Warninng

2020-08-13 Thread Aschref Ben-Thabet
From: Aschref Ben Thabet Using FILENAME_MAX as a parameter in strncpy function can gererate warnings of type: -Wstringop-truncation. Replacing it with sizeof (distination_buffer) can avoid this warning. --- cpukit/libmisc/shell/main_edit.c | 9 + 1 file changed, 5 insertions(+), 4 deleti

Re: [PATCH v2] cpukit: Edit String Warninng

2020-08-13 Thread Aschref Ben-Thabet
Sorry it was not against master ! i send then V3 for this patch. On 8/13/20 5:19 PM, Aschref Ben-Thabet wrote: From: Aschref Ben Thabet Using FILENAME_MAX as a parameter in strncpy function can gererate warnings of type: -Wstringop-truncation. Replacing it with sizeof (distination_buffer) can

[PATCH v4] Psxtest : Fix String Turncation warning

2020-08-13 Thread Aschref Ben-Thabet
From: Aschref Ben Thabet replace strncpy with strdup to silence this warning since it tries to allocate enough memory to hold the old string (plus a '\0' character to mark the end of the string). --- testsuites/psxtests/psxndbm01/init.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-)

Re: [PATCH] Strict thread-stack isolation and thread-stack sharing.

2020-08-13 Thread Gedare Bloom
On Thu, Aug 13, 2020 at 9:06 AM Utkarsh Rai wrote: > > -This patch provides thread-stack isolation and thread-stack sharing > mechanism for a POSIX thread. > Monster patch! think to yourself whether or not it makes sense to split these up. The main constraint is that every patch in the series sho

Re: Need help in figuring out how to allocate sizes to the array

2020-08-13 Thread Gedare Bloom
On Thu, Aug 13, 2020 at 9:28 AM Richi Dubey wrote: > > Thanks, > > But I still can't find the code that links the 'Ready' in this > > >> #define RTEMS_SCHEDULER_EDF_SMP( name ) \ > >> static struct { \ > >>Scheduler_EDF_SMP_Context Base; \ This 'Base' will be an instance of the struc

Re: Need help in figuring out how to allocate sizes to the array

2020-08-13 Thread Gedare Bloom
Resending without some stray words On Thu, Aug 13, 2020 at 10:10 AM Gedare Bloom wrote: > > On Thu, Aug 13, 2020 at 9:28 AM Richi Dubey wrote: > > > > Thanks, > > > > But I still can't find the code that links the 'Ready' in this > > > > >> #define RTEMS_SCHEDULER_EDF_SMP( name ) \ > > >>

Re: Need help in figuring out how to allocate sizes to the array

2020-08-13 Thread Richi Dubey
Great explanation. I feel stupid to miss this :p. Thanks! On Thu, Aug 13, 2020 at 9:40 PM Gedare Bloom wrote: > On Thu, Aug 13, 2020 at 9:28 AM Richi Dubey wrote: > > > > Thanks, > > > > But I still can't find the code that links the 'Ready' in this > > > > >> #define RTEMS_SCHEDULER_EDF_SMP(

Quick question: How do I get the name of the scheduler from _Scheduler_Control

2020-08-13 Thread Richi Dubey
Hi, It's hard to find this with the help of cscope and I would appreciate your help in this. Is there a way to print the 'name' in : -- struct _Scheduler_Control { /** * @brief Reference to a statically allocated scheduler context.

Re: Need help finding the cause of an ARM4 Exception

2020-08-13 Thread Richi Dubey
Thanks for your detailed reply. All this helped. You should be able to print the exception context and see what are the > values of some different registers. This might be helpful. How do I do this? Right now I am printing individual variables that I find important by using 'p'. typedef struct >

Re: Quick question: How do I get the name of the scheduler from _Scheduler_Control

2020-08-13 Thread Gedare Bloom
cpukit/include/rtems/rtems/support.h:RTEMS_INLINE_ROUTINE void rtems_name_to_characters( On Thu, Aug 13, 2020 at 1:15 PM Richi Dubey wrote: > > Hi, > > It's hard to find this with the help of cscope and I would appreciate your > help in this. > > Is there a way to print the 'name' in : > ---

Re: crypt and POSIX

2020-08-13 Thread Chris Johns
On 13/8/20 11:47 pm, Joel Sherrill wrote: > On Thu, Aug 13, 2020 at 7:52 AM Sebastian Huber > > > wrote: > > On 13/08/2020 14:49, Joel Sherrill wrote: > > > Why was crypt() removed? It is in the FreeBSD version at the bottom of > > the file.

[GSoC 2020]: Need help in writing sed alternative in Python for RSB recipes

2020-08-13 Thread Mritunjay Sharma
Hello everyone, Based on the input received by Gedare, I have started working on finding a 'sed' alternative to be used in the RSB recipes to do streamline text replacements. I have gone through the Python Development Guidelines ( https://docs.rtems.org/branches/master/eng/python-devel.html) and

about FAST_IDLE in Clock_isr

2020-08-13 Thread 朱忠杰
Hi, everyone Is there any consideration why the FAST_IDLE is separated from normal path,can I change the FAST_IDLE like the following? #if defined(BSP_FEATURE_IRQ_EXTENSION) || \ (CPU_SIMPLE_VECTORED_INTERRUPTS != TRUE) void Clock_isr(void *arg); void Clock_isr(void *arg) { #else rtems_isr Cl

Re: crypt and POSIX

2020-08-13 Thread Sebastian Huber
On 13/08/2020 21:52, Chris Johns wrote: On 13/8/20 11:47 pm, Joel Sherrill wrote: On Thu, Aug 13, 2020 at 7:52 AM Sebastian Huber mailto:sebastian.hu...@embedded-brains.de>> wrote: On 13/08/2020 14:49, Joel Sherrill wrote: > Why was crypt() removed? It is in the FreeBSD version at t