Re: [PATCH v6 2/2] Update smpstrongapa01; Add smpstrongapa02,smpstrongapa03

2021-06-29 Thread Richi Dubey
I have sent a new patch, hopefully, it captures the important things we
need to check for Strong APA working properly. (Task shifting during task
arrival/departure).

On Fri, Jun 25, 2021 at 6:44 PM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> On 25/06/2021 14:19, Richi Dubey wrote:
> > Why can't the test cases of the additional two test programs be
> merged
> > into the existing test program smpstrongapa01?
> >
> > Good point. I am looking into this right now. The original idea behind
> > having multiple test programs was to have more testing - and be more
> > confident that the task-shifting works. I will see if the tests can be
> > merged safely.
>
> I don't want to reduce the number of test cases. I just wonder why we
> need three copy and paste variants of the same generic test program
> which executes table based test cases.
>
> --
> 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 v6 2/2] Update smpstrongapa01; Add smpstrongapa02,smpstrongapa03

2021-06-25 Thread Sebastian Huber

On 25/06/2021 14:19, Richi Dubey wrote:

Why can't the test cases of the additional two test programs be merged
into the existing test program smpstrongapa01?

Good point. I am looking into this right now. The original idea behind 
having multiple test programs was to have more testing - and be more 
confident that the task-shifting works. I will see if the tests can be 
merged safely.


I don't want to reduce the number of test cases. I just wonder why we 
need three copy and paste variants of the same generic test program 
which executes table based test cases.


--
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 v6 2/2] Update smpstrongapa01; Add smpstrongapa02,smpstrongapa03

2021-06-25 Thread Richi Dubey
Hi,

Great! Thanks a lot for the review process and the merge :)

Why can't the test cases of the additional two test programs be merged
> into the existing test program smpstrongapa01?

Good point. I am looking into this right now. The original idea behind
having multiple test programs was to have more testing - and be more
confident that the task-shifting works. I will see if the tests can be
merged safely.

On Thu, Jun 24, 2021 at 5:50 PM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> On 16/06/2021 08:00, Richi Dubey wrote:
> > Update smpstrongapa01 to account for task shifting.
> > ---
> >   spec/build/testsuites/smptests/grp.yml|   4 +
> >   .../testsuites/smptests/smpstrongapa02.yml|  21 +
> >   .../testsuites/smptests/smpstrongapa03.yml|  21 +
> >   testsuites/smptests/smpstrongapa01/init.c |  72 ++--
> >   testsuites/smptests/smpstrongapa02/init.c | 373 ++
> >   .../smpstrongapa02/smpstrongapa02.doc |  11 +
> >   .../smpstrongapa02/smpstrongapa02.scn |   2 +
> >   testsuites/smptests/smpstrongapa03/init.c | 358 +
> >   .../smpstrongapa03/smpstrongapa03.doc |  11 +
> >   .../smpstrongapa03/smpstrongapa03.scn |   2 +
> >   10 files changed, 846 insertions(+), 29 deletions(-)
> >   create mode 100644 spec/build/testsuites/smptests/smpstrongapa02.yml
> >   create mode 100644 spec/build/testsuites/smptests/smpstrongapa03.yml
> >   create mode 100644 testsuites/smptests/smpstrongapa02/init.c
> >   create mode 100644
> testsuites/smptests/smpstrongapa02/smpstrongapa02.doc
> >   create mode 100644
> testsuites/smptests/smpstrongapa02/smpstrongapa02.scn
> >   create mode 100644 testsuites/smptests/smpstrongapa03/init.c
> >   create mode 100644
> testsuites/smptests/smpstrongapa03/smpstrongapa03.doc
> >   create mode 100644
> testsuites/smptests/smpstrongapa03/smpstrongapa03.scn
>
> I checked in the first patch with a small modification to be in line
> with the file header template.
>
> Why can't the test cases of the additional two test programs be merged
> into the existing test program smpstrongapa01?
>
> --
> 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 v6 2/2] Update smpstrongapa01; Add smpstrongapa02,smpstrongapa03

2021-06-24 Thread Sebastian Huber

On 16/06/2021 08:00, Richi Dubey wrote:

Update smpstrongapa01 to account for task shifting.
---
  spec/build/testsuites/smptests/grp.yml|   4 +
  .../testsuites/smptests/smpstrongapa02.yml|  21 +
  .../testsuites/smptests/smpstrongapa03.yml|  21 +
  testsuites/smptests/smpstrongapa01/init.c |  72 ++--
  testsuites/smptests/smpstrongapa02/init.c | 373 ++
  .../smpstrongapa02/smpstrongapa02.doc |  11 +
  .../smpstrongapa02/smpstrongapa02.scn |   2 +
  testsuites/smptests/smpstrongapa03/init.c | 358 +
  .../smpstrongapa03/smpstrongapa03.doc |  11 +
  .../smpstrongapa03/smpstrongapa03.scn |   2 +
  10 files changed, 846 insertions(+), 29 deletions(-)
  create mode 100644 spec/build/testsuites/smptests/smpstrongapa02.yml
  create mode 100644 spec/build/testsuites/smptests/smpstrongapa03.yml
  create mode 100644 testsuites/smptests/smpstrongapa02/init.c
  create mode 100644 testsuites/smptests/smpstrongapa02/smpstrongapa02.doc
  create mode 100644 testsuites/smptests/smpstrongapa02/smpstrongapa02.scn
  create mode 100644 testsuites/smptests/smpstrongapa03/init.c
  create mode 100644 testsuites/smptests/smpstrongapa03/smpstrongapa03.doc
  create mode 100644 testsuites/smptests/smpstrongapa03/smpstrongapa03.scn


I checked in the first patch with a small modification to be in line 
with the file header template.


Why can't the test cases of the additional two test programs be merged 
into the existing test program smpstrongapa01?


--
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

[PATCH v6 2/2] Update smpstrongapa01; Add smpstrongapa02,smpstrongapa03

2021-06-16 Thread Richi Dubey
Update smpstrongapa01 to account for task shifting.
---
 spec/build/testsuites/smptests/grp.yml|   4 +
 .../testsuites/smptests/smpstrongapa02.yml|  21 +
 .../testsuites/smptests/smpstrongapa03.yml|  21 +
 testsuites/smptests/smpstrongapa01/init.c |  72 ++--
 testsuites/smptests/smpstrongapa02/init.c | 373 ++
 .../smpstrongapa02/smpstrongapa02.doc |  11 +
 .../smpstrongapa02/smpstrongapa02.scn |   2 +
 testsuites/smptests/smpstrongapa03/init.c | 358 +
 .../smpstrongapa03/smpstrongapa03.doc |  11 +
 .../smpstrongapa03/smpstrongapa03.scn |   2 +
 10 files changed, 846 insertions(+), 29 deletions(-)
 create mode 100644 spec/build/testsuites/smptests/smpstrongapa02.yml
 create mode 100644 spec/build/testsuites/smptests/smpstrongapa03.yml
 create mode 100644 testsuites/smptests/smpstrongapa02/init.c
 create mode 100644 testsuites/smptests/smpstrongapa02/smpstrongapa02.doc
 create mode 100644 testsuites/smptests/smpstrongapa02/smpstrongapa02.scn
 create mode 100644 testsuites/smptests/smpstrongapa03/init.c
 create mode 100644 testsuites/smptests/smpstrongapa03/smpstrongapa03.doc
 create mode 100644 testsuites/smptests/smpstrongapa03/smpstrongapa03.scn

diff --git a/spec/build/testsuites/smptests/grp.yml 
b/spec/build/testsuites/smptests/grp.yml
index 771708503e..14b575e058 100644
--- a/spec/build/testsuites/smptests/grp.yml
+++ b/spec/build/testsuites/smptests/grp.yml
@@ -125,6 +125,10 @@ links:
   uid: smpsignal01
 - role: build-dependency
   uid: smpstrongapa01
+- role: build-dependency
+  uid: smpstrongapa02
+- role: build-dependency
+  uid: smpstrongapa03
 - role: build-dependency
   uid: smpswitchextension01
 - role: build-dependency
diff --git a/spec/build/testsuites/smptests/smpstrongapa02.yml 
b/spec/build/testsuites/smptests/smpstrongapa02.yml
new file mode 100644
index 00..56673c1cf0
--- /dev/null
+++ b/spec/build/testsuites/smptests/smpstrongapa02.yml
@@ -0,0 +1,21 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+build-type: test-program
+cflags: []
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+- Copyright (C) 2020 Richi Dubey (richidu...@gmail.com)
+cppflags: []
+cxxflags: []
+enabled-by:
+- RTEMS_SMP
+features: c cprogram
+includes: []
+ldflags: []
+links: []
+source:
+- testsuites/smptests/smpstrongapa02/init.c
+stlib: []
+target: testsuites/smptests/smpstrongapa02.exe
+type: build
+use-after: []
+use-before: []
diff --git a/spec/build/testsuites/smptests/smpstrongapa03.yml 
b/spec/build/testsuites/smptests/smpstrongapa03.yml
new file mode 100644
index 00..50d08216b8
--- /dev/null
+++ b/spec/build/testsuites/smptests/smpstrongapa03.yml
@@ -0,0 +1,21 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+build-type: test-program
+cflags: []
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+- Copyright (C) 2020 Richi Dubey (richidu...@gmail.com)
+cppflags: []
+cxxflags: []
+enabled-by:
+- RTEMS_SMP
+features: c cprogram
+includes: []
+ldflags: []
+links: []
+source:
+- testsuites/smptests/smpstrongapa03/init.c
+stlib: []
+target: testsuites/smptests/smpstrongapa03.exe
+type: build
+use-after: []
+use-before: []
diff --git a/testsuites/smptests/smpstrongapa01/init.c 
b/testsuites/smptests/smpstrongapa01/init.c
index bf8bc05231..e7abacd519 100644
--- a/testsuites/smptests/smpstrongapa01/init.c
+++ b/testsuites/smptests/smpstrongapa01/init.c
@@ -1,4 +1,5 @@
 /*
+ * Copyright (c) 2020 Richi Dubey ( richidu...@gmail.com )
  * Copyright (c) 2016, 2017 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
@@ -16,23 +17,28 @@
 #include "config.h"
 #endif
 
-#include "tmacros.h"
+#include 
 
 #include 
 
 const char rtems_test_name[] = "SMPSTRONGAPA 1";
 
-#define CPU_COUNT 4
+#define CPU_COUNT 2
 
-#define TASK_COUNT (3 * CPU_COUNT)
+#define TASK_COUNT 3
 
 #define P(i) (UINT32_C(2) + i)
 
 #define ALL ((UINT32_C(1) << CPU_COUNT) - 1)
 
-#define IDLE UINT8_C(255)
+#define A(cpu0, cpu1) ( (cpu1 << 1) | cpu0 )
 
-#define NAME rtems_build_name('S', 'A', 'P', 'A')
+typedef enum {
+  T0,
+  T1,
+  T2,
+  IDLE
+} task_index;
 
 typedef struct {
   enum {
@@ -43,7 +49,7 @@ typedef struct {
 KIND_UNBLOCK
   } kind;
 
-  size_t index;
+  task_index index;
 
   struct {
 rtems_task_priority priority;
@@ -65,54 +71,59 @@ typedef struct {
 KIND_RESET, \
 0, \
 { 0 }, \
-{ IDLE, IDLE, IDLE, IDLE } \
+{ IDLE, IDLE} \
   }
 
-#define SET_PRIORITY(index, prio, cpu0, cpu1, cpu2, cpu3) \
+#define SET_PRIORITY(index, prio, cpu0, cpu1) \
   { \
 KIND_SET_PRIORITY, \
 index, \
 { .priority = prio }, \
-{ cpu0, cpu1, cpu2, cpu3 } \
+{ cpu0, cpu1} \
   }
 
-#define SET_AFFINITY(index, aff, cpu0, cpu1, cpu2, cpu3) \
+#define SET_AFFINITY(index, aff, cpu0, cpu1) \
   { \
 KIND_SET_AFFINITY, \
 index, \
 { .cpu_set = aff }, \
-{ cpu0, cpu1, cpu2,