Changeset f9925bc in rtems


Ignore:
Timestamp:
Nov 30, 2009, 12:41:10 PM (9 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, master
Children:
2feeb26
Parents:
47c2327
Message:

added documentation
corrections in block tests
added Makefile.am

Location:
testsuites/libtests
Files:
7 added
10 edited

Legend:

Unmodified
Added
Removed
  • testsuites/libtests/ChangeLog

    r47c2327 rf9925bc  
     12009-11-30      Sebastian Huber <Sebastian.Huber@embedded-brains.de>
     2
     3        * block05/init.c: Check block size. Improved output.
     4        * block01/init.c: Free ramdisk before exit.
     5        * block01/block01.doc, block02/block02.doc, block03/block03.doc,
     6        block04/block04.doc, block05/block05.doc, block06/block06.doc,
     7        block07/block07.doc: New files.
     8        * block01/Makefile.am, block02/Makefile.am, block03/Makefile.am,
     9        block04/Makefile.am, block05/Makefile.am, block06/Makefile.am,
     10        block07/Makefile.am: Add new files.
     11
    1122009-11-21      Joel Sherrill <joel.sherrill@oarcorp.com>
    213
  • testsuites/libtests/block01/Makefile.am

    r47c2327 rf9925bc  
    88block01_SOURCES = init.c
    99
    10 dist_rtems_tests_DATA = block01.scn
     10dist_rtems_tests_DATA = block01.scn block01.doc
    1111
    1212include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
  • testsuites/libtests/block01/init.c

    r47c2327 rf9925bc  
    1818 * found in the file LICENSE in this distribution or at
    1919 * http://www.rtems.com/license/LICENSE.
     20 *
     21 * $Id$
    2022 */
    2123
     
    154156  ASSERT_SC(sc);
    155157
     158  ramdisk_free(rd);
     159
    156160  sc = rtems_disk_io_done();
    157161  ASSERT_SC(sc);
  • testsuites/libtests/block02/Makefile.am

    r47c2327 rf9925bc  
    88block02_SOURCES = init.c
    99
    10 dist_rtems_tests_DATA = block02.scn
     10dist_rtems_tests_DATA = block02.scn block02.doc
    1111
    1212include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
  • testsuites/libtests/block03/Makefile.am

    r47c2327 rf9925bc  
    88block03_SOURCES = init.c
    99
    10 dist_rtems_tests_DATA = block03.scn
     10dist_rtems_tests_DATA = block03.scn block03.doc
    1111
    1212include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
  • testsuites/libtests/block04/Makefile.am

    r47c2327 rf9925bc  
    88block04_SOURCES = init.c
    99
    10 dist_rtems_tests_DATA = block04.scn
     10dist_rtems_tests_DATA = block04.scn block04.doc
    1111
    1212include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
  • testsuites/libtests/block05/Makefile.am

    r47c2327 rf9925bc  
    88block05_SOURCES = init.c
    99
    10 dist_rtems_tests_DATA = block05.scn
     10dist_rtems_tests_DATA = block05.scn block05.doc
    1111
    1212include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
  • testsuites/libtests/block05/init.c

    r47c2327 rf9925bc  
    5050#define BLOCK_COUNT_B 1
    5151
     52/* In case of trouble change this to 1 or 2 for more output */
    5253static unsigned output_level = 0;
    5354
     
    7475
    7576static volatile enum trig_style {
    76   SUSP,
    77   NO_SUSP
     77  SUSP = 0,
     78  CONT
    7879} trig;
    7980
    8081static volatile enum get_type {
    81   GET,
     82  GET = 0,
    8283  READ
    8384} trig_get, low_get, high_get;
    8485
    8586static volatile enum blk_kind {
    86   BLK_A0,
     87  BLK_A0 = 0,
    8788  BLK_A1,
    8889  BLK_B0
     
    9091
    9192static volatile enum rel_type {
    92   REL,
     93  REL = 0,
    9394  REL_MOD,
    9495  SYNC
    9596} trig_rel, low_rel, high_rel;
     97
     98static const char trig_style_desc [] = {
     99  'S',
     100  'C'
     101};
     102
     103static const char get_type_desc [] = {
     104  'G',
     105  'R'
     106};
     107
     108static const char *blk_kind_desc [] = {
     109  "A0",
     110  "A1",
     111  "B0"
     112};
     113
     114static const char rel_type_desc [] = {
     115  'R',
     116  'M',
     117  'S'
     118};
    96119
    97120static void print(unsigned level, const char *fmt, ...)
     
    123146    = NULL;
    124147  dev_t dev = 0;
     148  size_t bds_per_group = 0;
    125149
    126150  switch (kind) {
     
    128152      dev = dev_a;
    129153      blk_index = 0;
     154      bds_per_group = 2;
    130155      break;
    131156    case BLK_A1:
    132157      dev = dev_a;
    133158      blk_index = 1;
     159      bds_per_group = 2;
    134160      break;
    135161    case BLK_B0:
    136162      dev = dev_b;
    137163      blk_index = 0;
     164      bds_per_group = 1;
    138165      break;
    139166    default:
     
    155182
    156183  sc = (*get_bd)(dev, blk_index, &bd);
    157   assert(sc == RTEMS_SUCCESSFUL && bd->dev == dev && bd->block == blk_index);
     184  assert(
     185    sc == RTEMS_SUCCESSFUL
     186      && bd->dev == dev
     187      && bd->block == blk_index
     188      && bd->group->bds_per_group == bds_per_group
     189   );
    158190
    159191  return bd;
     
    253285  print(
    254286    1,
    255     "[%05u]T%i,TG%i,TB%i,TR%i,LG%i,LB%i,LR%i,HG%i,HB%i,HR%i\n",
    256     i, trig, trig_get, trig_blk, trig_rel,
    257     low_get, low_blk, low_rel,
    258     high_get, high_blk, high_rel
     287    "[%05u]T(%c,%c,%s,%c)L(%c,%s,%c)H(%c,%s,%c)\n",
     288    i,
     289    trig_style_desc [trig],
     290    get_type_desc [trig_get],
     291    blk_kind_desc [trig_blk],
     292    rel_type_desc [trig_rel],
     293    get_type_desc [low_get],
     294    blk_kind_desc [low_blk],
     295    rel_type_desc [low_rel],
     296    get_type_desc [high_get],
     297    blk_kind_desc [high_blk],
     298    rel_type_desc [high_rel]
    259299  );
    260300
     
    280320      suspend = true;
    281321      break;
    282     case NO_SUSP:
     322    case CONT:
    283323      suspend = false;
    284324      break;
     
    433473  ASSERT_SC(sc);
    434474
    435   for (trig = SUSP; trig <= NO_SUSP; ++trig) {
     475  for (trig = SUSP; trig <= CONT; ++trig) {
    436476    for (trig_get = GET; trig_get <= READ; ++trig_get) {
    437477      for (low_get = GET; low_get <= READ; ++low_get) {
  • testsuites/libtests/block06/Makefile.am

    r47c2327 rf9925bc  
    88block06_SOURCES = init.c
    99
    10 dist_rtems_tests_DATA = block06.scn
     10dist_rtems_tests_DATA = block06.scn block06.doc
    1111
    1212include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
  • testsuites/libtests/block07/Makefile.am

    r47c2327 rf9925bc  
    88block07_SOURCES = init.c
    99
    10 dist_rtems_tests_DATA = block07.scn
     10dist_rtems_tests_DATA = block07.scn block07.doc
    1111
    1212include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
Note: See TracChangeset for help on using the changeset viewer.