forked from Imagelibrary/rtems
tests/fstests: Use <rtems/test.h>
This commit is contained in:
@@ -27,6 +27,8 @@
|
|||||||
#include <rtems/ramdisk.h>
|
#include <rtems/ramdisk.h>
|
||||||
#include <rtems/libcsupport.h>
|
#include <rtems/libcsupport.h>
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSBDPART 1";
|
||||||
|
|
||||||
#define ASSERT_SC(sc) rtems_test_assert((sc) == RTEMS_SUCCESSFUL)
|
#define ASSERT_SC(sc) rtems_test_assert((sc) == RTEMS_SUCCESSFUL)
|
||||||
|
|
||||||
#define PARTITION_COUNT 9
|
#define PARTITION_COUNT 9
|
||||||
@@ -206,13 +208,12 @@ static void test_ide_part_table(void)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
printf("\n\n*** TEST FSBDPART 1 ***\n");
|
TEST_BEGIN();
|
||||||
|
|
||||||
test_bdpart();
|
test_bdpart();
|
||||||
test_ide_part_table();
|
test_ide_part_table();
|
||||||
|
|
||||||
printf("*** END OF TEST FSBDPART 1 ***\n");
|
TEST_END();
|
||||||
|
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,6 +236,8 @@ size_t rtems_ramdisk_configuration_size = 1;
|
|||||||
|
|
||||||
#define CONFIGURE_INIT_TASK_STACK_SIZE (32 * 1024)
|
#define CONFIGURE_INIT_TASK_STACK_SIZE (32 * 1024)
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define CONFIGURE_INIT
|
#define CONFIGURE_INIT
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSDOSFSFORMAT 1";
|
||||||
|
|
||||||
#define MAX_PATH_LENGTH 100 /* Maximum number of characters per path */
|
#define MAX_PATH_LENGTH 100 /* Maximum number of characters per path */
|
||||||
#define SECTOR_SIZE 512 /* sector size (bytes) */
|
#define SECTOR_SIZE 512 /* sector size (bytes) */
|
||||||
#define FAT12_MAX_CLN 4085 /* maximum + 1 number of clusters for FAT12 */
|
#define FAT12_MAX_CLN 4085 /* maximum + 1 number of clusters for FAT12 */
|
||||||
@@ -471,12 +473,11 @@ static void test( void )
|
|||||||
|
|
||||||
static void Init( rtems_task_argument arg )
|
static void Init( rtems_task_argument arg )
|
||||||
{
|
{
|
||||||
puts( "\n\n*** TEST FSDOSFSFORMAT 1 ***" );
|
TEST_BEGIN();
|
||||||
|
|
||||||
test();
|
test();
|
||||||
|
|
||||||
puts( "*** END OF TEST FSDOSFSFORMAT 1 ***" );
|
TEST_END();
|
||||||
|
|
||||||
rtems_test_exit( 0 );
|
rtems_test_exit( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -496,6 +497,8 @@ static void Init( rtems_task_argument arg )
|
|||||||
|
|
||||||
#define CONFIGURE_INIT_TASK_STACK_SIZE ( 32 * 1024 )
|
#define CONFIGURE_INIT_TASK_STACK_SIZE ( 32 * 1024 )
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define CONFIGURE_BDBUF_BUFFER_MAX_SIZE ( 32 * 1024 )
|
#define CONFIGURE_BDBUF_BUFFER_MAX_SIZE ( 32 * 1024 )
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSDOSFSNAME 1";
|
||||||
|
|
||||||
#define PRINT_DISK_IMAGE 0
|
#define PRINT_DISK_IMAGE 0
|
||||||
|
|
||||||
#define MOUNT_DIR "/mnt"
|
#define MOUNT_DIR "/mnt"
|
||||||
@@ -1287,12 +1289,11 @@ static void test( void )
|
|||||||
|
|
||||||
static void Init( rtems_task_argument arg )
|
static void Init( rtems_task_argument arg )
|
||||||
{
|
{
|
||||||
puts( "\n\n*** TEST fsdosfsname01 ***" );
|
TEST_BEGIN();
|
||||||
|
|
||||||
test();
|
test();
|
||||||
|
|
||||||
puts( "*** END OF TEST fsdosfsname01 ***" );
|
TEST_END();
|
||||||
|
|
||||||
rtems_test_exit( 0 );
|
rtems_test_exit( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1323,6 +1324,8 @@ size_t rtems_ramdisk_configuration_size = RTEMS_ARRAY_SIZE(rtems_ramdisk_configu
|
|||||||
|
|
||||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define CONFIGURE_INIT
|
#define CONFIGURE_INIT
|
||||||
|
|||||||
@@ -30,6 +30,8 @@
|
|||||||
#include <rtems/dosfs.h>
|
#include <rtems/dosfs.h>
|
||||||
#include <rtems/ramdisk.h>
|
#include <rtems/ramdisk.h>
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSDOSFSSYNC 1";
|
||||||
|
|
||||||
static void create_file(const char *file)
|
static void create_file(const char *file)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
@@ -139,12 +141,11 @@ static void test(const char *rda, const char *mnt, const char *file)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
puts("\n\n*** TEST FSDOSFSSYNC 1 ***");
|
TEST_BEGIN();
|
||||||
|
|
||||||
test("/dev/rda", "/mnt", "/mnt/file");
|
test("/dev/rda", "/mnt", "/mnt/file");
|
||||||
|
|
||||||
puts("*** END OF TEST FSDOSFSSYNC 1 ***");
|
TEST_END();
|
||||||
|
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,6 +170,8 @@ size_t rtems_ramdisk_configuration_size = 1;
|
|||||||
|
|
||||||
#define CONFIGURE_EXTRA_TASK_STACKS (8 * 1024)
|
#define CONFIGURE_EXTRA_TASK_STACKS (8 * 1024)
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define CONFIGURE_INIT
|
#define CONFIGURE_INIT
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
#include <rtems/blkdev.h>
|
#include <rtems/blkdev.h>
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSDOSFSWRITE 1";
|
||||||
|
|
||||||
#define MAX_PATH_LENGTH 100 /* Maximum number of characters per path */
|
#define MAX_PATH_LENGTH 100 /* Maximum number of characters per path */
|
||||||
#define SECTOR_SIZE 512 /* sector size (bytes) */
|
#define SECTOR_SIZE 512 /* sector size (bytes) */
|
||||||
#define FAT16_MAX_CLN 65525 /* maximum + 1 number of clusters for FAT16 */
|
#define FAT16_MAX_CLN 65525 /* maximum + 1 number of clusters for FAT16 */
|
||||||
@@ -262,12 +264,11 @@ static void test( void )
|
|||||||
|
|
||||||
static void Init( rtems_task_argument arg )
|
static void Init( rtems_task_argument arg )
|
||||||
{
|
{
|
||||||
puts( "\n\n*** TEST FSDOSFSWRITE 1 ***" );
|
TEST_BEGIN();
|
||||||
|
|
||||||
test();
|
test();
|
||||||
|
|
||||||
puts( "*** END OF TEST FSDOSFSWRITE 1 ***" );
|
TEST_END();
|
||||||
|
|
||||||
rtems_test_exit( 0 );
|
rtems_test_exit( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -287,10 +288,12 @@ static void Init( rtems_task_argument arg )
|
|||||||
|
|
||||||
#define CONFIGURE_INIT_TASK_STACK_SIZE ( 32 * 1024 )
|
#define CONFIGURE_INIT_TASK_STACK_SIZE ( 32 * 1024 )
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define CONFIGURE_BDBUF_BUFFER_MAX_SIZE ( 32 * 1024 )
|
#define CONFIGURE_BDBUF_BUFFER_MAX_SIZE ( 32 * 1024 )
|
||||||
|
|
||||||
#define CONFIGURE_INIT
|
#define CONFIGURE_INIT
|
||||||
|
|
||||||
#include <rtems/confdefs.h>
|
#include <rtems/confdefs.h>
|
||||||
|
|||||||
@@ -22,8 +22,11 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "fstest.h"
|
#include "fstest.h"
|
||||||
|
#include "fs_config.h"
|
||||||
#include "pmacros.h"
|
#include "pmacros.h"
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSERROR " FILESYSTEM;
|
||||||
|
|
||||||
static void open_mkdir_error (void)
|
static void open_mkdir_error (void)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|||||||
@@ -25,8 +25,11 @@
|
|||||||
#include <rtems/libcsupport.h>
|
#include <rtems/libcsupport.h>
|
||||||
|
|
||||||
#include "fstest.h"
|
#include "fstest.h"
|
||||||
|
#include "fs_config.h"
|
||||||
#include "tmacros.h"
|
#include "tmacros.h"
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSFPATHCONF " FILESYSTEM;
|
||||||
|
|
||||||
static void fpathconf_test(void){
|
static void fpathconf_test(void){
|
||||||
|
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSFSEEKO 1";
|
||||||
|
|
||||||
static void test(void)
|
static void test(void)
|
||||||
{
|
{
|
||||||
FILE *file;
|
FILE *file;
|
||||||
@@ -78,12 +80,11 @@ static void test(void)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
puts("\n\n*** TEST FSFSEEKO 1 ***");
|
TEST_BEGIN();
|
||||||
|
|
||||||
test();
|
test();
|
||||||
|
|
||||||
puts("*** END OF TEST FSFSEEKO 1 ***");
|
TEST_END();
|
||||||
|
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,6 +97,8 @@ static void Init(rtems_task_argument arg)
|
|||||||
|
|
||||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define CONFIGURE_INIT
|
#define CONFIGURE_INIT
|
||||||
|
|||||||
@@ -29,6 +29,8 @@
|
|||||||
#include <rtems/malloc.h>
|
#include <rtems/malloc.h>
|
||||||
#include <rtems/libcsupport.h>
|
#include <rtems/libcsupport.h>
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSIMFSGENERIC 1";
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
TEST_NEW,
|
TEST_NEW,
|
||||||
TEST_INITIALIZED,
|
TEST_INITIALIZED,
|
||||||
@@ -474,13 +476,12 @@ static void test_imfs_make_generic_node_errors(void)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
printf("\n\n*** TEST FSIMFSGENERIC 1 ***\n");
|
TEST_BEGIN();
|
||||||
|
|
||||||
test_imfs_make_generic_node();
|
test_imfs_make_generic_node();
|
||||||
test_imfs_make_generic_node_errors();
|
test_imfs_make_generic_node_errors();
|
||||||
|
|
||||||
printf("*** END OF TEST FSIMFSGENERIC 1 ***\n");
|
TEST_END();
|
||||||
|
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -493,6 +494,8 @@ static void Init(rtems_task_argument arg)
|
|||||||
|
|
||||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define CONFIGURE_INIT
|
#define CONFIGURE_INIT
|
||||||
|
|||||||
@@ -23,8 +23,11 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "fstest.h"
|
#include "fstest.h"
|
||||||
|
#include "fs_config.h"
|
||||||
#include "pmacros.h"
|
#include "pmacros.h"
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSLINK " FILESYSTEM;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Test if the successful call works as expect
|
* Test if the successful call works as expect
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
|
|
||||||
#include <rtems/libio_.h>
|
#include <rtems/libio_.h>
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSNOFS 1";
|
||||||
|
|
||||||
static int node_count(const rtems_chain_control *chain)
|
static int node_count(const rtems_chain_control *chain)
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
@@ -333,7 +335,7 @@ static void test_user_env(void)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
printk("\n\n*** TEST FSNOFS 1 ***\n");
|
rtems_test_begink();
|
||||||
|
|
||||||
rtems_libio_init();
|
rtems_libio_init();
|
||||||
|
|
||||||
@@ -345,8 +347,7 @@ static void Init(rtems_task_argument arg)
|
|||||||
test_path_ops();
|
test_path_ops();
|
||||||
test_user_env();
|
test_user_env();
|
||||||
|
|
||||||
printk("*** END OF TEST FSNOFS 1 ***\n");
|
rtems_test_endk();
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,6 +357,8 @@ static void Init(rtems_task_argument arg)
|
|||||||
|
|
||||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define CONFIGURE_INIT
|
#define CONFIGURE_INIT
|
||||||
|
|||||||
@@ -21,10 +21,13 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "fstest.h"
|
#include "fstest.h"
|
||||||
|
#include "fs_config.h"
|
||||||
#include "pmacros.h"
|
#include "pmacros.h"
|
||||||
|
|
||||||
#define BUF_SIZE 100
|
#define BUF_SIZE 100
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSPATHEVAL " FILESYSTEM;
|
||||||
|
|
||||||
static void make_multiple_files (char **files,int is_directory)
|
static void make_multiple_files (char **files,int is_directory)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
@@ -22,8 +22,11 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "fstest.h"
|
#include "fstest.h"
|
||||||
|
#include "fs_config.h"
|
||||||
#include "pmacros.h"
|
#include "pmacros.h"
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSPERMISSION " FILESYSTEM;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Test the umask
|
* Test the umask
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -23,8 +23,11 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "fstest.h"
|
#include "fstest.h"
|
||||||
|
#include "fs_config.h"
|
||||||
#include "pmacros.h"
|
#include "pmacros.h"
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSRDWR " FILESYSTEM;
|
||||||
|
|
||||||
static const mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO;
|
static const mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO;
|
||||||
|
|
||||||
static const char databuf [] =
|
static const char databuf [] =
|
||||||
|
|||||||
@@ -25,9 +25,12 @@
|
|||||||
#include <rtems/rfs/rtems-rfs-file-system.h>
|
#include <rtems/rfs/rtems-rfs-file-system.h>
|
||||||
|
|
||||||
#include "fstest.h"
|
#include "fstest.h"
|
||||||
|
#include "fs_config.h"
|
||||||
#include "tmacros.h"
|
#include "tmacros.h"
|
||||||
#include <rtems/malloc.h>
|
#include <rtems/malloc.h>
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSRFSBITMAP 1";
|
||||||
|
|
||||||
#define rtems_rfs_exit_on_error(_rc, _r, _c, _b) \
|
#define rtems_rfs_exit_on_error(_rc, _r, _c, _b) \
|
||||||
if ((_rc > 0) || _r) { free (_b); rtems_rfs_bitmap_close (_c); return; }
|
if ((_rc > 0) || _r) { free (_b); rtems_rfs_bitmap_close (_c); return; }
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
#include <rtems/rtems-rfs-format.h>
|
#include <rtems/rtems-rfs-format.h>
|
||||||
#include <rtems/ramdisk.h>
|
#include <rtems/ramdisk.h>
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSROFS 1";
|
||||||
|
|
||||||
static const rtems_rfs_format_config rfs_config;
|
static const rtems_rfs_format_config rfs_config;
|
||||||
|
|
||||||
static const char rda [] = "/dev/rda";
|
static const char rda [] = "/dev/rda";
|
||||||
@@ -151,13 +153,12 @@ static void test_rofs(void)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
printf("\n\n*** TEST FSROFS 1 ***\n");
|
TEST_BEGIN():
|
||||||
|
|
||||||
test_create_file_system();
|
test_create_file_system();
|
||||||
test_rofs();
|
test_rofs();
|
||||||
|
|
||||||
printf("*** END OF TEST FSROFS 1 ***\n");
|
TEST_END():
|
||||||
|
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,6 +182,8 @@ size_t rtems_ramdisk_configuration_size = 1;
|
|||||||
|
|
||||||
#define CONFIGURE_EXTRA_TASK_STACKS (8 * 1024)
|
#define CONFIGURE_EXTRA_TASK_STACKS (8 * 1024)
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define CONFIGURE_INIT
|
#define CONFIGURE_INIT
|
||||||
|
|||||||
@@ -15,8 +15,11 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include "fstest.h"
|
#include "fstest.h"
|
||||||
|
#include "fs_config.h"
|
||||||
#include "pmacros.h"
|
#include "pmacros.h"
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSSTATVFS " FILESYSTEM;
|
||||||
|
|
||||||
static void statvfs_validate(struct statvfs *stat)
|
static void statvfs_validate(struct statvfs *stat)
|
||||||
{
|
{
|
||||||
rtems_test_assert(stat->f_bsize > 0);
|
rtems_test_assert(stat->f_bsize > 0);
|
||||||
|
|||||||
@@ -23,8 +23,11 @@
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
|
||||||
#include "fstest.h"
|
#include "fstest.h"
|
||||||
|
#include "fs_config.h"
|
||||||
#include "pmacros.h"
|
#include "pmacros.h"
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSSYMLINK " FILESYSTEM;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Test the function of symlink
|
* Test the function of symlink
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -24,7 +24,10 @@
|
|||||||
|
|
||||||
#ifdef __rtems__
|
#ifdef __rtems__
|
||||||
#include "fstest.h"
|
#include "fstest.h"
|
||||||
|
#include "fs_config.h"
|
||||||
#include "pmacros.h"
|
#include "pmacros.h"
|
||||||
|
|
||||||
|
const char rtems_test_name[] = "FSTIME " FILESYSTEM;
|
||||||
#else
|
#else
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#define rtems_test_assert(x) assert(x)
|
#define rtems_test_assert(x) assert(x)
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ test_shutdown_filesystem (void)
|
|||||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define CONFIGURE_MAXIMUM_TASKS 10
|
#define CONFIGURE_MAXIMUM_TASKS 10
|
||||||
|
|||||||
@@ -154,6 +154,9 @@ void test_shutdown_filesystem(void)
|
|||||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||||
|
|
||||||
#define CONFIGURE_INIT_TASK_STACK_SIZE (32 * 1024)
|
#define CONFIGURE_INIT_TASK_STACK_SIZE (32 * 1024)
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define CONFIGURE_INIT
|
#define CONFIGURE_INIT
|
||||||
|
|||||||
@@ -80,6 +80,9 @@ void test_shutdown_filesystem(void)
|
|||||||
/**
|
/**
|
||||||
* Configure base RTEMS resources.
|
* Configure base RTEMS resources.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define CONFIGURE_MAXIMUM_SEMAPHORES RTEMS_DOSFS_SEMAPHORES_PER_INSTANCE
|
#define CONFIGURE_MAXIMUM_SEMAPHORES RTEMS_DOSFS_SEMAPHORES_PER_INSTANCE
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ test_shutdown_filesystem (void)
|
|||||||
/**
|
/**
|
||||||
* Configure base RTEMS resources.
|
* Configure base RTEMS resources.
|
||||||
*/
|
*/
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ test_shutdown_filesystem (void)
|
|||||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||||
|
|
||||||
|
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define CONFIGURE_MAXIMUM_TASKS 10
|
#define CONFIGURE_MAXIMUM_TASKS 10
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ rtems_task Init(
|
|||||||
rtems_task_argument ignored)
|
rtems_task_argument ignored)
|
||||||
{
|
{
|
||||||
int rc=0;
|
int rc=0;
|
||||||
puts( "\n\n*** FILE SYSTEM TEST ( " FILESYSTEM " ) ***" );
|
|
||||||
|
TEST_BEGIN();
|
||||||
|
|
||||||
puts( "Initializing filesystem " FILESYSTEM );
|
puts( "Initializing filesystem " FILESYSTEM );
|
||||||
test_initialize_filesystem();
|
test_initialize_filesystem();
|
||||||
@@ -71,6 +72,6 @@ rtems_task Init(
|
|||||||
puts( "\n\nShutting down filesystem " FILESYSTEM );
|
puts( "\n\nShutting down filesystem " FILESYSTEM );
|
||||||
test_shutdown_filesystem();
|
test_shutdown_filesystem();
|
||||||
|
|
||||||
puts( "*** END OF FILE SYSTEM TEST ( " FILESYSTEM " ) ***" );
|
TEST_END();
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user