summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1997-07-31 19:48:23 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1997-07-31 19:48:23 +0000
commit13f09e64e56cb2bda93cbcdd3c71afc361a6ab6d (patch)
tree48bcba5392282cf70fbee0a5c4513668ba1db0e5 /testsuites
parente7d8b5882699d0a44ab51c5547bbcd6b21d96b52 (diff)
downloadrtems-13f09e64e56cb2bda93cbcdd3c71afc361a6ab6d.tar.bz2
Added support for rtems_message_queue_get_number_pending.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/sptests/sp09/screen07.c8
-rw-r--r--testsuites/sptests/sp09/sp09.scn1
-rw-r--r--testsuites/sptests/sp13/sp13.scn4
-rw-r--r--testsuites/sptests/sp13/task1.c8
4 files changed, 21 insertions, 0 deletions
diff --git a/testsuites/sptests/sp09/screen07.c b/testsuites/sptests/sp09/screen07.c
index 9fb884b45e..87e423f38c 100644
--- a/testsuites/sptests/sp09/screen07.c
+++ b/testsuites/sptests/sp09/screen07.c
@@ -112,6 +112,14 @@ void Screen7()
);
puts( "TA1 - rtems_message_queue_ident - RTEMS_INVALID_NAME" );
+ status = rtems_message_queue_get_number_pending( 100, &count );
+ fatal_directive_status(
+ status,
+ RTEMS_INVALID_ID,
+ "rtems_message_queue_get_number_pending with illegal id"
+ );
+ puts( "TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ID" );
+
status = rtems_message_queue_flush( 100, &count );
fatal_directive_status(
status,
diff --git a/testsuites/sptests/sp09/sp09.scn b/testsuites/sptests/sp09/sp09.scn
index e1c59f6397..4a2693a2f3 100644
--- a/testsuites/sptests/sp09/sp09.scn
+++ b/testsuites/sptests/sp09/sp09.scn
@@ -101,6 +101,7 @@ TA1 - rtems_message_queue_create - Q 2 - RTEMS_TOO_MANY
TA1 - rtems_message_queue_delete - unknown RTEMS_INVALID_ID
TA1 - rtems_message_queue_delete - local RTEMS_INVALID_ID
TA1 - rtems_message_queue_ident - RTEMS_INVALID_NAME
+TA1 - rtems_message_queue_get_number_pending - RTEMS_INVALID_ID
TA1 - rtems_message_queue_flush - RTEMS_INVALID_ID
TA1 - rtems_message_queue_receive - RTEMS_INVALID_ID
TA1 - rtems_message_queue_receive - Q 1 - RTEMS_UNSATISFIED
diff --git a/testsuites/sptests/sp13/sp13.scn b/testsuites/sptests/sp13/sp13.scn
index 11adfb8eb3..cb34131eb9 100644
--- a/testsuites/sptests/sp13/sp13.scn
+++ b/testsuites/sptests/sp13/sp13.scn
@@ -52,10 +52,14 @@ TA1 - buffer received: BUFFER 3 TO Q 2
TA1 - rtems_message_queue_delete - delete queue 1
TA1 - rtems_message_queue_urgent - BUFFER 3 TO Q 2
TA1 - rtems_message_queue_delete - delete queue 2
+TA1 - rtems_message_queue_get_number_pending - SUCCESSFUL
+TA1 - 0 messages are pending on Q 3
TA1 - rtems_message_queue_flush - empty Q 3
TA1 - 0 messages were flushed from Q 3
TA1 - rtems_message_queue_send - BUFFER 1 TO Q 3
TA1 - rtems_message_queue_send - BUFFER 2 TO Q 3
+TA1 - rtems_message_queue_get_number_pending - SUCCESSFUL
+TA1 - 2 messages are pending on Q 3
TA1 - rtems_message_queue_send - BUFFER 3 TO Q 3
TA1 - rtems_message_queue_flush - Q 3
TA1 - 3 messages were flushed from Q 3
diff --git a/testsuites/sptests/sp13/task1.c b/testsuites/sptests/sp13/task1.c
index 080d4608a7..bfd43c3dd8 100644
--- a/testsuites/sptests/sp13/task1.c
+++ b/testsuites/sptests/sp13/task1.c
@@ -198,6 +198,10 @@ rtems_test_pause();
status = rtems_message_queue_delete( Queue_id[ 2 ] );
directive_failed( status, "rtems_message_queue_delete" );
+ puts( "TA1 - rtems_message_queue_get_number_pending - SUCCESSFUL\n" );
+ status = rtems_message_queue_get_number_pending( Queue_id[ 3 ], &count );
+ printf( "TA1 - %d messages are pending on Q 3\n", count );
+
puts( "TA1 - rtems_message_queue_flush - empty Q 3" );
status = rtems_message_queue_flush( Queue_id[ 3 ], &count );
printf( "TA1 - %d messages were flushed from Q 3\n", count );
@@ -212,6 +216,10 @@ rtems_test_pause();
status = rtems_message_queue_send( Queue_id[ 3 ], buffer, 16 );
directive_failed( status, "rtems_message_queue_send" );
+ puts( "TA1 - rtems_message_queue_get_number_pending - SUCCESSFUL\n" );
+ status = rtems_message_queue_get_number_pending( Queue_id[ 3 ], &count );
+ printf( "TA1 - %d messages are pending on Q 3\n", count );
+
Fill_buffer( "BUFFER 3 TO Q 3", buffer );
puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 3" );
status = rtems_message_queue_send( Queue_id[ 3 ], buffer, 16 );