Index: testsuites/fstests/Makefile.am
===================================================================
--- testsuites/fstests/Makefile.am	(revision 1becaa953e9728c792526983ee76be5ddd47c3fd)
+++ testsuites/fstests/Makefile.am	(revision ccd4a7f397e44ebf867789a790ad0416e275410f)
@@ -7,4 +7,5 @@
 _SUBDIRS += fsimfsconfig01
 _SUBDIRS += fsdosfsname01
+_SUBDIRS += fsdosfsname02
 _SUBDIRS += fsdosfswrite01
 _SUBDIRS += fsdosfsformat01
Index: testsuites/fstests/configure.ac
===================================================================
--- testsuites/fstests/configure.ac	(revision 1becaa953e9728c792526983ee76be5ddd47c3fd)
+++ testsuites/fstests/configure.ac	(revision ccd4a7f397e44ebf867789a790ad0416e275410f)
@@ -83,4 +83,5 @@
 fsimfsconfig01/Makefile
 fsdosfsname01/Makefile
+fsdosfsname02/Makefile
 fsdosfswrite01/Makefile
 fsdosfsformat01/Makefile
Index: testsuites/fstests/fsdosfsname02/Makefile.am
===================================================================
--- testsuites/fstests/fsdosfsname02/Makefile.am	(revision ccd4a7f397e44ebf867789a790ad0416e275410f)
+++ testsuites/fstests/fsdosfsname02/Makefile.am	(revision ccd4a7f397e44ebf867789a790ad0416e275410f)
@@ -0,0 +1,19 @@
+rtems_tests_PROGRAMS = fsdosfsname02
+fsdosfsname02_SOURCES = init.c
+
+dist_rtems_tests_DATA = fsdosfsname02.scn fsdosfsname02.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(fsdosfsname02_OBJECTS)
+LINK_LIBS = $(fsdosfsname02_LDLIBS)
+
+fsdosfsname02$(EXEEXT): $(fsdosfsname02_OBJECTS) $(fsdosfsname02_DEPENDENCIES)
+	@rm -f fsdosfsname02$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am
Index: testsuites/fstests/fsdosfsname02/fsdosfsname02.scn
===================================================================
--- testsuites/fstests/fsdosfsname02/fsdosfsname02.scn	(revision ccd4a7f397e44ebf867789a790ad0416e275410f)
+++ testsuites/fstests/fsdosfsname02/fsdosfsname02.scn	(revision ccd4a7f397e44ebf867789a790ad0416e275410f)
@@ -0,0 +1,2 @@
+*** BEGIN OF TEST FSDOSFSNAME 2 ***
+*** END OF TEST FSDOSFSNAME 2 ***
Index: testsuites/fstests/fsdosfsname02/init.c
===================================================================
--- testsuites/fstests/fsdosfsname02/init.c	(revision ccd4a7f397e44ebf867789a790ad0416e275410f)
+++ testsuites/fstests/fsdosfsname02/init.c	(revision ccd4a7f397e44ebf867789a790ad0416e275410f)
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2017 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Dornierstr. 4
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <rtems/dosfs.h>
+#include <rtems/ramdisk.h>
+
+#include "tmacros.h"
+
+const char rtems_test_name[] = "FSDOSFSNAME 2";
+
+#define RAMDISK_PATH "/dev/rda"
+
+#define MOUNT_PATH "/mnt"
+
+static const char * const dir_paths[] = {
+  MOUNT_PATH "/cpukit",
+  MOUNT_PATH "/cpukit/or1k-exception-frame-print.c",
+  MOUNT_PATH "/cpukit/preinstall.am",
+  MOUNT_PATH "/cpukit/Makefile.in",
+  MOUNT_PATH "/cpukit/Makefile.am",
+  MOUNT_PATH "/cpukit/rtems",
+  MOUNT_PATH "/cpukit/or1k-context-switch.S",
+  MOUNT_PATH "/cpukit/or1k-exception-default.c",
+  MOUNT_PATH "/cpukit/or1k-context-initialize.c",
+  MOUNT_PATH "/cpukit/or1k-context-volatile-clobber.S",
+  MOUNT_PATH "/cpukit/or1k-context-validate.S",
+  MOUNT_PATH "/cpukit/or1k-exception-handler-low.S",
+  MOUNT_PATH "/cpukit/cpu.c"
+};
+
+static void test(void)
+{
+  int rv;
+  size_t i;
+
+  rv = msdos_format(RAMDISK_PATH, NULL);
+  rtems_test_assert(rv == 0);
+
+  rv = mount_and_make_target_path(
+    RAMDISK_PATH,
+    MOUNT_PATH,
+    RTEMS_FILESYSTEM_TYPE_DOSFS,
+    RTEMS_FILESYSTEM_READ_WRITE,
+    NULL
+  );
+  rtems_test_assert(rv == 0);
+
+  for (i = 0; i < RTEMS_ARRAY_SIZE(dir_paths); ++i) {
+    rv = mkdir(dir_paths[i], S_IRWXU | S_IRWXG | S_IRWXO);
+    rtems_test_assert(rv == 0);
+  }
+
+  for (i = RTEMS_ARRAY_SIZE(dir_paths); i > 0; --i) {
+    rv = unlink(dir_paths[i - 1]);
+    rtems_test_assert(rv == 0);
+  }
+}
+
+static void Init(rtems_task_argument arg)
+{
+  TEST_BEGIN();
+
+  test();
+
+  TEST_END();
+  rtems_test_exit(0);
+}
+
+rtems_ramdisk_config rtems_ramdisk_configuration[] = {
+  { .block_size = 512, .block_num = 64 }
+};
+
+size_t rtems_ramdisk_configuration_size = RTEMS_ARRAY_SIZE(rtems_ramdisk_configuration);
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
+
+#define CONFIGURE_APPLICATION_EXTRA_DRIVERS RAMDISK_DRIVER_TABLE_ENTRY
+
+#define CONFIGURE_FILESYSTEM_DOSFS
+
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32
+
+#define CONFIGURE_BDBUF_CACHE_MEMORY_SIZE 512
+#define CONFIGURE_BDBUF_BUFFER_MIN_SIZE 512
+#define CONFIGURE_BDBUF_BUFFER_MAX_SIZE 512
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_MAXIMUM_SEMAPHORES 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
Index: testsuites/fstests/fsdosfswrite01/init.c
===================================================================
--- testsuites/fstests/fsdosfswrite01/init.c	(revision 1becaa953e9728c792526983ee76be5ddd47c3fd)
+++ testsuites/fstests/fsdosfswrite01/init.c	(revision ccd4a7f397e44ebf867789a790ad0416e275410f)
@@ -126,5 +126,5 @@
   const char *file_name )
 {
-  static const rtems_blkdev_stats complete_block_stats = {
+  static const rtems_blkdev_stats complete_existing_block_stats = {
     .read_hits            = 0,
     .read_misses          = 0,
@@ -136,6 +136,6 @@
     .write_errors         = 0
   };
-  static const rtems_blkdev_stats new_block_stats = {
-    .read_hits            = 8,
+  static const rtems_blkdev_stats complete_new_block_stats = {
+    .read_hits            = 3,
     .read_misses          = 2,
     .read_ahead_transfers = 0,
@@ -143,5 +143,15 @@
     .read_errors          = 0,
     .write_transfers      = 1,
-    .write_blocks         = 4,
+    .write_blocks         = 3,
+    .write_errors         = 0
+  };
+  static const rtems_blkdev_stats partial_new_block_stats = {
+    .read_hits            = 3,
+    .read_misses          = 3,
+    .read_ahead_transfers = 0,
+    .read_blocks          = 3,
+    .read_errors          = 0,
+    .write_transfers      = 1,
+    .write_blocks         = 3,
     .write_errors         = 0
   };
@@ -175,9 +185,13 @@
   rtems_test_assert( (ssize_t) cluster_size == num_bytes );
 
-  check_block_stats( dev_name, mount_dir, &complete_block_stats );
+  check_block_stats( dev_name, mount_dir, &complete_existing_block_stats );
   reset_block_stats( dev_name, mount_dir );
 
+  /* Write a complete cluster into a new file space */
   num_bytes = write( fd, cluster_buf, cluster_size );
   rtems_test_assert( (ssize_t) cluster_size == num_bytes );
+
+  check_block_stats( dev_name, mount_dir, &complete_new_block_stats );
+  reset_block_stats( dev_name, mount_dir );
 
   /* Write a new partial cluster into a new file space */
@@ -185,5 +199,5 @@
   rtems_test_assert( num_bytes == 1 );
 
-  check_block_stats( dev_name, mount_dir, &new_block_stats );
+  check_block_stats( dev_name, mount_dir, &partial_new_block_stats );
 
   rv = close( fd );
