Changeset b27799c in rtems


Ignore:
Timestamp:
Nov 12, 2009, 3:34:09 PM (10 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, master
Children:
d949482
Parents:
c0e0a928
Message:

New test case

Location:
testsuites/libtests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • testsuites/libtests/ChangeLog

    rc0e0a928 rb27799c  
     12009-11-10      Sebastian Huber <Sebastian.Huber@embedded-brains.de>
     2
     3        * block07/init.c: New test case.
     4
    152009-11-09      Sebastian Huber <Sebastian.Huber@embedded-brains.de>
    26
  • testsuites/libtests/block07/init.c

    rc0e0a928 rb27799c  
    3737#define PRIORITY_HIGH 2
    3838
    39 #define PRIORITY_LOW 3
    40 
    41 #define PRIORITY_SWAPOUT 4
    42 
    43 #define PRIORITY_IDLE 5
     39#define PRIORITY_MID 3
     40
     41#define PRIORITY_LOW 4
     42
     43#define PRIORITY_SWAPOUT 5
     44
     45#define PRIORITY_IDLE 6
    4446
    4547#define BLOCK_SIZE_A 1
     
    5254
    5355static rtems_id task_id_low;
     56
     57static rtems_id task_id_mid;
    5458
    5559static rtems_id task_id_high;
     
    9195  printk("L: release done: 0\n");
    9296
     97  printk("*** END OF TEST BLOCK 7 ***\n");
     98
     99  exit(0);
     100}
     101
     102static void task_mid(rtems_task_argument arg)
     103{
     104  rtems_status_code sc = RTEMS_SUCCESSFUL;
     105  rtems_bdbuf_buffer *bd = NULL;
     106
     107  printk("M: try access: 0\n");
     108
     109  sc = rtems_bdbuf_get(dev, 0, &bd);
     110  ASSERT_SC(sc);
     111
     112  printk("M: access: 0\n");
     113
     114  assert(bd->group->bds_per_group == 1);
     115
     116  printk("M: release: 0\n");
     117
     118  sc = rtems_bdbuf_release(bd);
     119  ASSERT_SC(sc);
     120
     121  printk("M: release done: 0\n");
     122
    93123  rtems_task_delete(RTEMS_SELF);
    94124}
     
    117147  printk("H: release done: 0\n");
    118148
    119   printk("*** END OF TEST BLOCK 7 ***\n");
    120 
    121   exit(0);
     149  rtems_task_delete(RTEMS_SELF);
    122150}
    123151
     
    150178
    151179  sc = rtems_task_create(
     180    rtems_build_name(' ', 'M', 'I', 'D'),
     181    PRIORITY_MID,
     182    0,
     183    RTEMS_DEFAULT_MODES,
     184    RTEMS_DEFAULT_ATTRIBUTES,
     185    &task_id_mid
     186  );
     187  ASSERT_SC(sc);
     188
     189  sc = rtems_task_start(task_id_mid, task_mid, 0);
     190  ASSERT_SC(sc);
     191
     192  sc = rtems_task_create(
    152193    rtems_build_name('H', 'I', 'G', 'H'),
    153194    PRIORITY_HIGH,
     
    162203  ASSERT_SC(sc);
    163204
     205  sc = rtems_task_suspend(task_id_mid);
     206  ASSERT_SC(sc);
     207
    164208  sc = rtems_task_suspend(task_id_high);
    165209  ASSERT_SC(sc);
     
    182226
    183227  sc = rtems_task_resume(task_id_high);
     228  ASSERT_SC(sc);
     229
     230  sc = rtems_task_resume(task_id_mid);
    184231  ASSERT_SC(sc);
    185232
     
    206253#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
    207254
    208 #define CONFIGURE_MAXIMUM_TASKS 5
     255#define CONFIGURE_MAXIMUM_TASKS 6
    209256#define CONFIGURE_MAXIMUM_DRIVERS 2
    210257#define CONFIGURE_MAXIMUM_SEMAPHORES 5
Note: See TracChangeset for help on using the changeset viewer.