On 11/12/2014 9:10 AM, Gedare Bloom wrote:
> Are there still tests for when the lock would be held despite the
> context switch? Just want to make sure we're not removing some
> test-case.
That wasn't the purpose of this test. It was to abuse the affinity
algorithm and cause migrations. Daniel Cederman found a bug
in the semaphore used to protect the data used to control the
threads and migration.

If you have another scenario in mind, please post it so we
can at least file a PR to add the case.

--joel
> On Wed, Nov 12, 2014 at 9:48 AM, Jennifer Averett
> <jennifer.aver...@oarcorp.com> wrote:
>> Change semaphore attributes to resolve problem where semaphore is not
>> released upon a context switch.
>> ---
>>  testsuites/smptests/smpschedaffinity05/init.c | 9 +++------
>>  1 file changed, 3 insertions(+), 6 deletions(-)
>>
>> diff --git a/testsuites/smptests/smpschedaffinity05/init.c 
>> b/testsuites/smptests/smpschedaffinity05/init.c
>> index 754c226..9fddb58 100644
>> --- a/testsuites/smptests/smpschedaffinity05/init.c
>> +++ b/testsuites/smptests/smpschedaffinity05/init.c
>> @@ -145,14 +145,11 @@ static void test(void)
>>    sc = rtems_semaphore_create(
>>      rtems_build_name('S', 'E', 'M', '0'),
>>      1,                                               /* initial count = 1 */
>> -    RTEMS_LOCAL                   |
>> -    RTEMS_SIMPLE_BINARY_SEMAPHORE |
>> -    RTEMS_NO_INHERIT_PRIORITY     |
>> -    RTEMS_NO_PRIORITY_CEILING     |
>> -    RTEMS_FIFO,
>> +    RTEMS_BINARY_SEMAPHORE |
>> +    RTEMS_MULTIPROCESSOR_RESOURCE_SHARING,
>>      0,
>>      &task_sem
>> -  );
>> +  );
>>    rtems_test_assert(sc == RTEMS_SUCCESSFUL);
>>
>>
>> --
>> 1.8.1.4
>>
>> _______________________________________________
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
> _______________________________________________
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherr...@oarcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to