2011-08-02 Xiang Cui <medivhc@gmail.com>

* configure.ac, fserror/test.c, fslink/test.c, fspermission/test.c,
	fsrdwr/init.c, fssymlink/test.c, fstime/test.c,
	mdosfs_support/fs_config.h, mdosfs_support/fs_support.c,
	mimfs_support/fs_support.c, mrfs_support/fs_config.h,
	support/fstest.h, support/fstest_support.c,
	support/ramdisk_support.c, support/ramdisk_support.h: Perform first
	phase of clean up.
This commit is contained in:
Joel Sherrill
2011-08-02 14:24:59 +00:00
parent f8d760bc96
commit 6fed43eabc
16 changed files with 378 additions and 352 deletions

View File

@@ -1,3 +1,13 @@
2011-08-02 Xiang Cui <medivhc@gmail.com>
* configure.ac, fserror/test.c, fslink/test.c, fspermission/test.c,
fsrdwr/init.c, fssymlink/test.c, fstime/test.c,
mdosfs_support/fs_config.h, mdosfs_support/fs_support.c,
mimfs_support/fs_support.c, mrfs_support/fs_config.h,
support/fstest.h, support/fstest_support.c,
support/ramdisk_support.c, support/ramdisk_support.h: Perform first
phase of clean up.
2011-08-01 Xiang Cui <medivhc@gmail.com>
* imfs_fslink/Makefile.am, imfs_fssymlink/Makefile.am,

View File

@@ -256,7 +256,8 @@ void rmdir_unlink_error (void)
/*
* The path argument names a directory that is not an empty directory,
* or there are hard links to the directory other than dot or a single entry in dot-dot.
* or there are hard links to the directory other than
* dot or a single entry in dot-dot.
*/
EXPECT_ERROR (ENOTEMPTY, rmdir, "..");
@@ -273,7 +274,8 @@ void rmdir_unlink_error (void)
/*
* A component of path does not name an existing file,
* or the path argument names a nonexistent directory or points to an empty string
* or the path argument names a nonexistent directory or
* points to an empty string
*/
EXPECT_ERROR (ENOENT, rmdir, "");
EXPECT_ERROR (ENOENT, rmdir, nonexistence);

View File

@@ -26,7 +26,8 @@ const char *databuf =
"4Happy days are here again.5Happy days are here again.6Happy days are here "
"again.7Happy days are here again.";
void read_write_test (void)
void
read_write_test (void)
{
int fd;
@@ -177,7 +178,8 @@ void read_write_test (void)
rtems_test_assert (status == 0);
}
void truncate_test03(void )
void
truncate_test03 (void)
{
int fd;
@@ -274,7 +276,8 @@ void truncate_test03(void )
rtems_test_assert (status == 0);
}
void lseek_test(void)
void
lseek_test (void)
{
int fd;
int status;
@@ -512,7 +515,9 @@ void lseek_test(void)
rtems_test_assert (status == 0);
}
void test(void )
void
test (void)
{
read_write_test ();
lseek_test ();

View File

@@ -15,6 +15,5 @@
#define MDOSFS_TEST
#define FILESYSTEM "MOUNTED DOSFS"
#define BASE_FOR_TEST "/mnt/"
#endif

View File

@@ -20,7 +20,9 @@
#include <rtems/libio.h>
#include <rtems/dosfs.h>
#include "ramdisk_support.h"
#include "fstest.h"
#define BLOCK_SIZE 512

View File

@@ -1,5 +1,12 @@
/*
* $Id$
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id Exp $
*/
#ifndef __MIMFS_SUPPORT_h

View File

@@ -22,7 +22,9 @@
#define FS_PASS() do {puts("PASS");} while (0)
#define FS_FAIL() do {printf( "FAIL %s: %d \n", __FILE__, __LINE__ ); } while (0)
#define FS_FAIL() do {\
printf( "FAIL %s: %d \n", __FILE__, __LINE__ );\
} while (0)
#define SHOW_MESSAGE(e, func, ...) printf(\

View File

@@ -8,7 +8,6 @@
*
* $Id Exp $
*/
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
@@ -53,7 +52,8 @@ void break_out_of_chroot(void)
}
if ((dir_fd=open(".",O_RDONLY))<0) {
fprintf(stderr,"Failed to open \".\" for reading - %s\n", strerror(errno));
fprintf(stderr,"Failed to open ""."
" for reading - %s\n", strerror(errno));
exit(1);
}
@@ -74,7 +74,6 @@ void break_out_of_chroot(void)
}
/*
* Main entry point of every filesystem test
*/
@@ -103,5 +102,4 @@ rtems_task Init(
puts( "*** END OF FILE SYSTEM TEST ( " FILESYSTEM " ) ***" );
rtems_test_exit(0);
}

View File

@@ -20,20 +20,23 @@
dev_t dev = 0;
void init_ramdisk(void)
void
init_ramdisk (void)
{
int rc = 0;
rc = rtems_disk_io_initialize ();
rtems_test_assert (rc == 0);
rc =ramdisk_register(RAMDISK_BLOCK_SIZE,RAMDISK_BLOCK_COUNT,\
rc = ramdisk_register (RAMDISK_BLOCK_SIZE, RAMDISK_BLOCK_COUNT,
false, RAMDISK_PATH, &dev);
rtems_test_assert (rc == 0);
}
void del_ramdisk(void )
void
del_ramdisk (void)
{
int rc = 0;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
@@ -48,9 +51,7 @@ void del_ramdisk(void )
rc = rtems_io_unregister_driver (major);
rtems_test_assert (rc == 0);
rc = rtems_disk_io_done ();
rtems_test_assert (rc == 0);
}