Index: testsuites/libtests/ChangeLog
===================================================================
--- testsuites/libtests/ChangeLog	(revision 47c23279bde0ae8bb045b458dc4d107c97f9a646)
+++ testsuites/libtests/ChangeLog	(revision f9925bcc246e3d923259d5816d9bfe8f1d0714fd)
@@ -1,2 +1,13 @@
+2009-11-30	Sebastian Huber <Sebastian.Huber@embedded-brains.de>
+
+	* block05/init.c: Check block size. Improved output.
+	* block01/init.c: Free ramdisk before exit.
+	* block01/block01.doc, block02/block02.doc, block03/block03.doc,
+	block04/block04.doc, block05/block05.doc, block06/block06.doc,
+	block07/block07.doc: New files.
+	* block01/Makefile.am, block02/Makefile.am, block03/Makefile.am,
+	block04/Makefile.am, block05/Makefile.am, block06/Makefile.am,
+	block07/Makefile.am: Add new files.
+
 2009-11-21	Joel Sherrill <joel.sherrill@oarcorp.com>
 
Index: testsuites/libtests/block01/Makefile.am
===================================================================
--- testsuites/libtests/block01/Makefile.am	(revision 47c23279bde0ae8bb045b458dc4d107c97f9a646)
+++ testsuites/libtests/block01/Makefile.am	(revision f9925bcc246e3d923259d5816d9bfe8f1d0714fd)
@@ -8,5 +8,5 @@
 block01_SOURCES = init.c
 
-dist_rtems_tests_DATA = block01.scn
+dist_rtems_tests_DATA = block01.scn block01.doc
 
 include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
Index: testsuites/libtests/block01/init.c
===================================================================
--- testsuites/libtests/block01/init.c	(revision 47c23279bde0ae8bb045b458dc4d107c97f9a646)
+++ testsuites/libtests/block01/init.c	(revision f9925bcc246e3d923259d5816d9bfe8f1d0714fd)
@@ -18,4 +18,6 @@
  * found in the file LICENSE in this distribution or at
  * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
  */
 
@@ -154,4 +156,6 @@
   ASSERT_SC(sc);
 
+  ramdisk_free(rd);
+
   sc = rtems_disk_io_done();
   ASSERT_SC(sc);
Index: testsuites/libtests/block02/Makefile.am
===================================================================
--- testsuites/libtests/block02/Makefile.am	(revision 47c23279bde0ae8bb045b458dc4d107c97f9a646)
+++ testsuites/libtests/block02/Makefile.am	(revision f9925bcc246e3d923259d5816d9bfe8f1d0714fd)
@@ -8,5 +8,5 @@
 block02_SOURCES = init.c
 
-dist_rtems_tests_DATA = block02.scn
+dist_rtems_tests_DATA = block02.scn block02.doc
 
 include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
Index: testsuites/libtests/block03/Makefile.am
===================================================================
--- testsuites/libtests/block03/Makefile.am	(revision 47c23279bde0ae8bb045b458dc4d107c97f9a646)
+++ testsuites/libtests/block03/Makefile.am	(revision f9925bcc246e3d923259d5816d9bfe8f1d0714fd)
@@ -8,5 +8,5 @@
 block03_SOURCES = init.c
 
-dist_rtems_tests_DATA = block03.scn
+dist_rtems_tests_DATA = block03.scn block03.doc
 
 include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
Index: testsuites/libtests/block04/Makefile.am
===================================================================
--- testsuites/libtests/block04/Makefile.am	(revision 47c23279bde0ae8bb045b458dc4d107c97f9a646)
+++ testsuites/libtests/block04/Makefile.am	(revision f9925bcc246e3d923259d5816d9bfe8f1d0714fd)
@@ -8,5 +8,5 @@
 block04_SOURCES = init.c
 
-dist_rtems_tests_DATA = block04.scn
+dist_rtems_tests_DATA = block04.scn block04.doc
 
 include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
Index: testsuites/libtests/block05/Makefile.am
===================================================================
--- testsuites/libtests/block05/Makefile.am	(revision 47c23279bde0ae8bb045b458dc4d107c97f9a646)
+++ testsuites/libtests/block05/Makefile.am	(revision f9925bcc246e3d923259d5816d9bfe8f1d0714fd)
@@ -8,5 +8,5 @@
 block05_SOURCES = init.c
 
-dist_rtems_tests_DATA = block05.scn
+dist_rtems_tests_DATA = block05.scn block05.doc
 
 include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
Index: testsuites/libtests/block05/init.c
===================================================================
--- testsuites/libtests/block05/init.c	(revision 47c23279bde0ae8bb045b458dc4d107c97f9a646)
+++ testsuites/libtests/block05/init.c	(revision f9925bcc246e3d923259d5816d9bfe8f1d0714fd)
@@ -50,4 +50,5 @@
 #define BLOCK_COUNT_B 1
 
+/* In case of trouble change this to 1 or 2 for more output */
 static unsigned output_level = 0;
 
@@ -74,15 +75,15 @@
 
 static volatile enum trig_style {
-  SUSP,
-  NO_SUSP
+  SUSP = 0,
+  CONT
 } trig;
 
 static volatile enum get_type {
-  GET,
+  GET = 0,
   READ
 } trig_get, low_get, high_get;
 
 static volatile enum blk_kind {
-  BLK_A0,
+  BLK_A0 = 0,
   BLK_A1,
   BLK_B0
@@ -90,8 +91,30 @@
 
 static volatile enum rel_type {
-  REL,
+  REL = 0,
   REL_MOD,
   SYNC
 } trig_rel, low_rel, high_rel;
+
+static const char trig_style_desc [] = {
+  'S',
+  'C'
+};
+
+static const char get_type_desc [] = {
+  'G',
+  'R'
+};
+
+static const char *blk_kind_desc [] = {
+  "A0",
+  "A1",
+  "B0"
+};
+
+static const char rel_type_desc [] = {
+  'R',
+  'M',
+  'S'
+};
 
 static void print(unsigned level, const char *fmt, ...)
@@ -123,4 +146,5 @@
     = NULL;
   dev_t dev = 0;
+  size_t bds_per_group = 0;
 
   switch (kind) {
@@ -128,12 +152,15 @@
       dev = dev_a;
       blk_index = 0;
+      bds_per_group = 2;
       break;
     case BLK_A1:
       dev = dev_a;
       blk_index = 1;
+      bds_per_group = 2;
       break;
     case BLK_B0:
       dev = dev_b;
       blk_index = 0;
+      bds_per_group = 1;
       break;
     default:
@@ -155,5 +182,10 @@
 
   sc = (*get_bd)(dev, blk_index, &bd);
-  assert(sc == RTEMS_SUCCESSFUL && bd->dev == dev && bd->block == blk_index);
+  assert(
+    sc == RTEMS_SUCCESSFUL
+      && bd->dev == dev
+      && bd->block == blk_index
+      && bd->group->bds_per_group == bds_per_group
+   );
 
   return bd;
@@ -253,8 +285,16 @@
   print(
     1,
-    "[%05u]T%i,TG%i,TB%i,TR%i,LG%i,LB%i,LR%i,HG%i,HB%i,HR%i\n",
-    i, trig, trig_get, trig_blk, trig_rel,
-    low_get, low_blk, low_rel,
-    high_get, high_blk, high_rel
+    "[%05u]T(%c,%c,%s,%c)L(%c,%s,%c)H(%c,%s,%c)\n",
+    i,
+    trig_style_desc [trig],
+    get_type_desc [trig_get],
+    blk_kind_desc [trig_blk],
+    rel_type_desc [trig_rel],
+    get_type_desc [low_get],
+    blk_kind_desc [low_blk],
+    rel_type_desc [low_rel],
+    get_type_desc [high_get],
+    blk_kind_desc [high_blk],
+    rel_type_desc [high_rel]
   );
 
@@ -280,5 +320,5 @@
       suspend = true;
       break;
-    case NO_SUSP:
+    case CONT:
       suspend = false;
       break;
@@ -433,5 +473,5 @@
   ASSERT_SC(sc);
 
-  for (trig = SUSP; trig <= NO_SUSP; ++trig) {
+  for (trig = SUSP; trig <= CONT; ++trig) {
     for (trig_get = GET; trig_get <= READ; ++trig_get) {
       for (low_get = GET; low_get <= READ; ++low_get) {
Index: testsuites/libtests/block06/Makefile.am
===================================================================
--- testsuites/libtests/block06/Makefile.am	(revision 47c23279bde0ae8bb045b458dc4d107c97f9a646)
+++ testsuites/libtests/block06/Makefile.am	(revision f9925bcc246e3d923259d5816d9bfe8f1d0714fd)
@@ -8,5 +8,5 @@
 block06_SOURCES = init.c
 
-dist_rtems_tests_DATA = block06.scn
+dist_rtems_tests_DATA = block06.scn block06.doc
 
 include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
Index: testsuites/libtests/block07/Makefile.am
===================================================================
--- testsuites/libtests/block07/Makefile.am	(revision 47c23279bde0ae8bb045b458dc4d107c97f9a646)
+++ testsuites/libtests/block07/Makefile.am	(revision f9925bcc246e3d923259d5816d9bfe8f1d0714fd)
@@ -8,5 +8,5 @@
 block07_SOURCES = init.c
 
-dist_rtems_tests_DATA = block07.scn
+dist_rtems_tests_DATA = block07.scn block07.doc
 
 include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
