From 765d72673aa7e03e4af1ae11777917028d28a6ae Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 1 Aug 2011 16:15:45 +0000 Subject: [PATCH] 2011-08-01 Joel Sherrill * sp75/init.c, sp75/sp75.doc, sp75/sp75.scn: Correct test and supporting documentation. --- testsuites/sptests/ChangeLog | 5 +++++ testsuites/sptests/sp75/init.c | 12 ++++++++---- testsuites/sptests/sp75/sp75.doc | 5 +++-- testsuites/sptests/sp75/sp75.scn | 4 +++- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 4ab11b2365..4c6ef88ac2 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,8 @@ +2011-08-01 Joel Sherrill + + * sp75/init.c, sp75/sp75.doc, sp75/sp75.scn: Correct test and + supporting documentation. + 2011-07-28 Pawel Zagorski PR 1857/tests diff --git a/testsuites/sptests/sp75/init.c b/testsuites/sptests/sp75/init.c index 0ce2da2f4c..c0d16ea3cd 100644 --- a/testsuites/sptests/sp75/init.c +++ b/testsuites/sptests/sp75/init.c @@ -31,13 +31,17 @@ rtems_task Init( ); directive_failed(sc, "rtems_semaphore_create"); + /* + * Call semaphore obtain with dispatching disabled. Reenable + * dispatching before checking the status returned since + * directive_failed() checks for dispatching being enabled. + */ + puts( "rtems_semaphore_obtain - with dispatching disabled" ); _Thread_Disable_dispatch(); - - sc = rtems_semaphore_obtain(mutex, RTEMS_NO_WAIT, RTEMS_NO_TIMEOUT); + sc = rtems_semaphore_obtain(mutex, RTEMS_NO_WAIT, RTEMS_NO_TIMEOUT); + _Thread_Enable_dispatch(); directive_failed(sc, "rtems_semaphore_obtain"); - _Thread_Enable_dispatch(); - puts( "*** END OF TEST SP75 ***" ); rtems_test_exit(0); } diff --git a/testsuites/sptests/sp75/sp75.doc b/testsuites/sptests/sp75/sp75.doc index bfc62e7bd0..d7a23d46b7 100644 --- a/testsuites/sptests/sp75/sp75.doc +++ b/testsuites/sptests/sp75/sp75.doc @@ -15,8 +15,9 @@ test set name: sp75 directives: - XXX list them + rtems_semaphore_obtain concepts: -+ XXX list them ++ obtain semaphore in no wait mode with dispatching disabled. This is +logically the same as performing the same operation from an ISR. diff --git a/testsuites/sptests/sp75/sp75.scn b/testsuites/sptests/sp75/sp75.scn index a63612096b..17441b4b0e 100644 --- a/testsuites/sptests/sp75/sp75.scn +++ b/testsuites/sptests/sp75/sp75.scn @@ -1 +1,3 @@ -XXX fill in with test output +*** TEST SP75 *** +rtems_semaphore_obtain - with dispatching disabled +*** END OF TEST SP75 ***