[PATCH] build: Exclude performance test if RTEMS_GCOV_COVERAGE

2023-10-26 Thread Sebastian Huber
The code coverage build is usually done without compiler optimizations.
This results in long performance test runtimes and useless performance
results.
---
 spec/build/testsuites/validation/performance-no-clock-0.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/spec/build/testsuites/validation/performance-no-clock-0.yml 
b/spec/build/testsuites/validation/performance-no-clock-0.yml
index 28d1ff7592..af47b308fa 100644
--- a/spec/build/testsuites/validation/performance-no-clock-0.yml
+++ b/spec/build/testsuites/validation/performance-no-clock-0.yml
@@ -5,7 +5,8 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by: true
+enabled-by:
+  not: RTEMS_GCOV_COVERAGE
 features: c cprogram
 includes: []
 ldflags: []
-- 
2.35.3

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] build: Improve testsuite build selection

2023-10-26 Thread Sebastian Huber
Enable an individual testsuite only through the corresponding enable.
Use BUILD_TESTS to change the default value of the individual testsuite
enable options.  This allows the user to enable all testsuites with
specific exceptions.

For example, this builds all testsuites except the benchmarks:

[arch/bsp]
BUILD_TESTS = True
BUILD_BENCHMARKS = False
---
 spec/build/testsuites/ada/grp.yml| 4 +---
 spec/build/testsuites/benchmarks/grp.yml | 4 +---
 spec/build/testsuites/fstests/grp.yml| 4 +---
 spec/build/testsuites/grp.yml| 4 ++--
 spec/build/testsuites/libtests/grp.yml   | 4 +---
 spec/build/testsuites/mptests/grp.yml| 4 +---
 spec/build/testsuites/optada.yml | 2 ++
 spec/build/testsuites/optbenchmarks.yml  | 2 ++
 spec/build/testsuites/optfs.yml  | 2 ++
 spec/build/testsuites/optlib.yml | 2 ++
 spec/build/testsuites/optmp.yml  | 2 ++
 spec/build/testsuites/optpsx.yml | 2 ++
 spec/build/testsuites/optpsxtm.yml   | 2 ++
 spec/build/testsuites/optrhs.yml | 2 ++
 spec/build/testsuites/optsmp.yml | 2 ++
 spec/build/testsuites/optsp.yml  | 2 ++
 spec/build/testsuites/opttm.yml  | 2 ++
 spec/build/testsuites/optunit.yml| 2 ++
 spec/build/testsuites/optvalidation.yml  | 2 ++
 spec/build/testsuites/psxtests/grp.yml   | 4 +---
 spec/build/testsuites/psxtmtests/grp.yml | 4 +---
 spec/build/testsuites/rhealstone/grp.yml | 4 +---
 spec/build/testsuites/samples/grp.yml| 4 +---
 spec/build/testsuites/smptests/grp.yml   | 6 ++
 spec/build/testsuites/sptests/grp.yml| 4 +---
 spec/build/testsuites/tmtests/grp.yml| 4 +---
 spec/build/testsuites/unit/grp.yml   | 4 +---
 spec/build/testsuites/validation/grp.yml | 4 +---
 28 files changed, 43 insertions(+), 45 deletions(-)

diff --git a/spec/build/testsuites/ada/grp.yml 
b/spec/build/testsuites/ada/grp.yml
index e4867c15db..fce42dfd9e 100644
--- a/spec/build/testsuites/ada/grp.yml
+++ b/spec/build/testsuites/ada/grp.yml
@@ -8,9 +8,7 @@ cxxflags: []
 enabled-by:
 - and:
   - __RTEMS_ADA__
-  - or:
-- BUILD_TESTS
-- BUILD_ADATESTS
+  - BUILD_ADATESTS
 includes: []
 install: []
 ldflags:
diff --git a/spec/build/testsuites/benchmarks/grp.yml 
b/spec/build/testsuites/benchmarks/grp.yml
index 33961bbec9..94705fa063 100644
--- a/spec/build/testsuites/benchmarks/grp.yml
+++ b/spec/build/testsuites/benchmarks/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_BENCHMARKS
+enabled-by: BUILD_BENCHMARKS
 includes:
 - testsuites/support/include
 install: []
diff --git a/spec/build/testsuites/fstests/grp.yml 
b/spec/build/testsuites/fstests/grp.yml
index 16006bd09a..9f089fc68a 100644
--- a/spec/build/testsuites/fstests/grp.yml
+++ b/spec/build/testsuites/fstests/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_FSTESTS
+enabled-by: BUILD_FSTESTS
 includes:
 - testsuites/support/include
 - testsuites/fstests/support
diff --git a/spec/build/testsuites/grp.yml b/spec/build/testsuites/grp.yml
index c50693420c..2c69cdd312 100644
--- a/spec/build/testsuites/grp.yml
+++ b/spec/build/testsuites/grp.yml
@@ -14,10 +14,10 @@ install: []
 ldflags:
 - ${COVERAGE_LINKER_FLAGS}
 links:
-- role: build-dependency
-  uid: optada
 - role: build-dependency
   uid: optall
+- role: build-dependency
+  uid: optada
 - role: build-dependency
   uid: optbenchmarks
 - role: build-dependency
diff --git a/spec/build/testsuites/libtests/grp.yml 
b/spec/build/testsuites/libtests/grp.yml
index eaf21751c4..fae2396a2f 100644
--- a/spec/build/testsuites/libtests/grp.yml
+++ b/spec/build/testsuites/libtests/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_LIBTESTS
+enabled-by: BUILD_LIBTESTS
 includes:
 - testsuites/support/include
 install: []
diff --git a/spec/build/testsuites/mptests/grp.yml 
b/spec/build/testsuites/mptests/grp.yml
index 3a5351bf33..699de87970 100644
--- a/spec/build/testsuites/mptests/grp.yml
+++ b/spec/build/testsuites/mptests/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_MPTESTS
+enabled-by: BUILD_MPTESTS
 includes:
 - testsuites/support/include
 install: []
diff --git a/spec/build/testsuites/optada.yml b/spec/build/testsuites/optada.yml
index fcf4effac1..a2b2b791c5 100644
--- a/spec/build/testsuites/optada.yml
+++ b/spec/build/testsuites/optada.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/optbenchmarks.yml 
b/spec/build/testsuites/optbenchmarks.yml
index 0ea75df53f

Re: [PATCH] fixed warning related to spstdc17

2023-10-26 Thread zack leung
ping

On Tue, 24 Oct 2023 at 22:17, zack leung  wrote:

> that didn't work but i'm thinking of defining a char array that is  equal
> to the size of the processor lock and the isr lock? i figured  that the
> processor lock is 64 bits and isr lock is a one bit?
> I'm confused on how to make an api define do you have a file i can look
> at?
>
>
>
> On Tue, 24 Oct 2023 at 08:31, Sebastian Huber <
> sebastian.hu...@embedded-brains.de> wrote:
>
>> On 24.10.23 14:02, zack leung wrote:
>> > hi! sabestian did you mean the size of the structure?
>>
>> Yes, one option to get rid of the empty structures is to just provide
>> typedefs, for example:
>>
>> #if defined(RTEMS_SMP)
>> typedef struct Scheduler_Context {
>> ...
>> } Scheduler_Context;
>> #else
>> typedef struct Scheduler_Context Scheduler_Context;
>> #endif
>>
>> Then you have to make sure that #if !defined(RTEMS_SMP) no objects of
>> this type are used.
>>
>> For the ISR locks we can do something similar. However, in this case
>> this affects also the API, so we probably need an API define for this as
>> well.  Suggestion: RTEMS_HAVE_INTERRUPT_LOCK_OBJECTS.
>>
>> The user can then do something like this:
>>
>> struct app {
>>...
>> #if defined(RTEMS_HAVE_INTERRUPT_LOCK_OBJECTS)
>>rtems_interrupt_lock lock;
>> #endif
>>...
>> }
>>
>> --
>> embedded brains GmbH
>> Herr Sebastian HUBER
>> Dornierstr. 4
>> 82178 Puchheim
>> Germany
>> email: sebastian.hu...@embedded-brains.de
>> phone: +49-89-18 94 741 - 16
>> fax:   +49-89-18 94 741 - 08
>>
>> Registergericht: Amtsgericht München
>> Registernummer: HRB 157899
>> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
>> Unsere Datenschutzerklärung finden Sie hier:
>> https://embedded-brains.de/datenschutzerklaerung/
>>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] fixed warning related to spstdc17

2023-10-26 Thread Sebastian Huber



On 27.10.23 03:43, zack leung wrote:

ping

On Tue, 24 Oct 2023 at 22:17, zack leung > wrote:


that didn't work but i'm thinking of defining a char array that is 
equal to the size of the processor lock and the isr lock? 


This is a bit complicated and still leads to a size increase.

i figured 
that the processor lock is 64 bits and isr lock is a one bit?

I'm confused on how to make an api define do you have a file i can
look at?


Maybe you try to fix the Scheduler_Context warning first. It is easier 
to fix. I am pretty sure that this approach works:


Get rid of the empty structures is to just provide typedefs, for example:

#if defined(RTEMS_SMP)
typedef struct Scheduler_Context {
   ...
} Scheduler_Context;
#else
typedef struct Scheduler_Context Scheduler_Context;
#endif

Then you have to make sure that #if !defined(RTEMS_SMP) no objects of 
this type are used.


--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel