summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/sp12
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-07 15:26:46 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-07 15:26:46 +0000
commit14a64dc59e3a8000e8809407075e118e23cbeb61 (patch)
tree5f989fb4c34b4c185d3900e9cc46e9f2aca767a4 /testsuites/sptests/sp12
parentConvert to UNIX CR/LF. (diff)
downloadrtems-14a64dc59e3a8000e8809407075e118e23cbeb61.tar.bz2
2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp09/screen07.c, sp09/screen12.c, sp09/screen14.c, sp09/sp09.scn Add test cases for: + message queue create requesting too many message buffers for the available memory + region extend with address inside existing heap + timer server initiate too large a stack, create error * sp12/pritask.c, sp12/sp12.scn: Add test cases for: + task set priority while holding resource
Diffstat (limited to 'testsuites/sptests/sp12')
-rw-r--r--testsuites/sptests/sp12/pritask.c19
-rw-r--r--testsuites/sptests/sp12/sp12.scn3
2 files changed, 20 insertions, 2 deletions
diff --git a/testsuites/sptests/sp12/pritask.c b/testsuites/sptests/sp12/pritask.c
index 47c74d6e1d..8aa3a0aea4 100644
--- a/testsuites/sptests/sp12/pritask.c
+++ b/testsuites/sptests/sp12/pritask.c
@@ -7,7 +7,7 @@
*
* Output parameters: NONE
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -51,6 +51,23 @@ rtems_task Priority_task(
rtems_test_exit( 0 );
}
+ /* special case of setting priority while holding a resource */
+ {
+ rtems_task_priority priority;
+ rtems_task_priority old_priority;
+
+ puts( "Set priority of self while holding resource" );
+ status =
+ rtems_task_set_priority( RTEMS_SELF, RTEMS_CURRENT_PRIORITY, &priority );
+ directive_failed( status, "rtems_task_set_priority get current" );
+ status = rtems_task_set_priority( RTEMS_SELF, priority, &old_priority );
+ directive_failed( status, "rtems_task_set_priority with resource" );
+ if ( priority != old_priority ) {
+ printf( "priority != old_priority (%d != %d)\n", priority, old_priority );
+ rtems_test_exit(0);
+ }
+ }
+
if ( its_index == 5 )
puts( "PRI5 - rtems_task_suspend - until all priority tasks blocked" );
status = rtems_task_suspend( RTEMS_SELF );
diff --git a/testsuites/sptests/sp12/sp12.scn b/testsuites/sptests/sp12/sp12.scn
index e75a804b0c..180aa04395 100644
--- a/testsuites/sptests/sp12/sp12.scn
+++ b/testsuites/sptests/sp12/sp12.scn
@@ -17,6 +17,7 @@ INIT - rtems_semaphore_create - allocated binary semaphore
INIT - rtems_semaphore_release - allocated binary semaphore
INIT - rtems_semaphore_delete - allocated binary semaphore
PRI5 - rtems_semaphore_obtain - wait forever on SM2
+Set priority of self while holding resource
PRI5 - rtems_task_suspend - until all priority tasks blocked
PDRV - priority of PRI5 is 67
PRI4 - rtems_semaphore_obtain - wait forever on SM2
@@ -35,7 +36,7 @@ PRI5 - rtems_semaphore_release - nested
PRI5 - rtems_semaphore_release - restore priority
PRI5 - priority of PRI5 is 68
<pause>
-TA1 - rtems_semaphore_ident - smid => 18010002
+TA1 - rtems_semaphore_ident - smid => 1a010009
TA1 - rtems_semaphore_obtain - wait forever on SM2
TA1 - got SM2
TA1 - rtems_semaphore_obtain - wait forever on SM3