[rtems commit] sptests/sp07: Fix test case

Sebastian Huber sebh at rtems.org
Mon Jan 4 09:23:38 UTC 2016


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Jan  4 10:21:53 2016 +0100

sptests/sp07: Fix test case

Fix things broken by commit d5154d0f6a04f3b7ed59d9a09038576fe2640756.

Update #2493.

---

 testsuites/sptests/sp07/task1.c |  8 --------
 testsuites/sptests/sp07/task2.c | 12 +++++++-----
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/testsuites/sptests/sp07/task1.c b/testsuites/sptests/sp07/task1.c
index c03bea2..25831af 100644
--- a/testsuites/sptests/sp07/task1.c
+++ b/testsuites/sptests/sp07/task1.c
@@ -13,11 +13,6 @@
 
 #include "system.h"
 
-/*
- * We know this is deprecated and don't want a warning on every BSP built.
- */
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
 rtems_task Task_1(
   rtems_task_argument argument
 )
@@ -25,9 +20,6 @@ rtems_task Task_1(
   rtems_status_code   status;
   rtems_task_priority the_priority;
   rtems_task_priority previous_priority;
-  rtems_id            my_id;
-
-  my_id = rtems_task_self();
 
   rtems_test_pause();
 
diff --git a/testsuites/sptests/sp07/task2.c b/testsuites/sptests/sp07/task2.c
index 4254a94..7baee1b 100644
--- a/testsuites/sptests/sp07/task2.c
+++ b/testsuites/sptests/sp07/task2.c
@@ -13,11 +13,6 @@
 
 #include "system.h"
 
-/*
- * We know this is deprecated and don't want a warning on every BSP built.
- */
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
 rtems_task Task_2(
   rtems_task_argument argument
 )
@@ -26,6 +21,13 @@ rtems_task Task_2(
   rtems_task_priority the_priority;
   rtems_task_priority previous_priority;
 
+  status = rtems_task_set_priority(
+    RTEMS_SELF,
+    RTEMS_CURRENT_PRIORITY,
+    &the_priority
+  );
+  directive_failed( status, "rtems_task_set_priority" );
+
   while( FOREVER ) {
     if ( --the_priority == 0 ) {
       puts( "TA2 - rtems_task_suspend - suspend TA1" );




More information about the vc mailing list