Changeset 6ae309ec in rtems


Ignore:
Timestamp:
Sep 9, 2016, 8:01:06 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
8123cae8
Parents:
266d383
git-author:
Sebastian Huber <sebastian.huber@…> (09/09/16 08:01:06)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/21/16 06:59:33)
Message:

smptests/smpmutex01: Use test case functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/smptests/smpmutex01/init.c

    r266d383 r6ae309ec  
    216216}
    217217
    218 static void test(void)
    219 {
    220   test_context *ctx = &test_instance;
     218static void test_init(test_context *ctx)
     219{
    221220  rtems_status_code sc;
    222221
     
    239238  );
    240239  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
    241 
     240}
     241
     242static void test_simple_inheritance(test_context *ctx)
     243{
    242244  obtain(ctx);
    243245  request(ctx, A_1, REQ_MTX_OBTAIN);
     
    249251  request(ctx, A_1, REQ_MTX_RELEASE);
    250252  check_generations(ctx, A_1, NONE);
    251 
     253}
     254
     255static void test_dequeue_order_one_scheduler_instance(test_context *ctx)
     256{
    252257  obtain(ctx);
    253258  request(ctx, A_2_0, REQ_MTX_OBTAIN);
     
    266271  request(ctx, A_2_1, REQ_MTX_RELEASE);
    267272  check_generations(ctx, A_2_1, NONE);
    268 
     273}
     274
     275static void test_simple_boosting(test_context *ctx)
     276{
    269277  obtain(ctx);
    270278  request(ctx, B_5_0, REQ_MTX_OBTAIN);
     
    283291  request(ctx, B_5_1, REQ_MTX_RELEASE);
    284292  check_generations(ctx, B_5_1, NONE);
    285 
     293}
     294
     295static void test_dequeue_order_two_scheduler_instances(test_context *ctx)
     296{
    286297  obtain(ctx);
    287298  request(ctx, A_2_0, REQ_MTX_OBTAIN);
     
    325336}
    326337
     338static void test(void)
     339{
     340  test_context *ctx = &test_instance;
     341
     342  test_init(ctx);
     343  test_simple_inheritance(ctx);
     344  test_dequeue_order_one_scheduler_instance(ctx);
     345  test_simple_boosting(ctx);
     346  test_dequeue_order_two_scheduler_instances(ctx);
     347}
     348
    327349static void Init(rtems_task_argument arg)
    328350{
Note: See TracChangeset for help on using the changeset viewer.