source: rtems/testsuites/fstests/mdosfs_support/fs_support.c @ 23c6f93a

4.115
Last change on this file since 23c6f93a was 23c6f93a, checked in by Sebastian Huber <sebastian.huber@…>, on 02/09/12 at 09:55:25

Increase stack size for symbolic link loop test

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2011.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11#ifdef HAVE_CONFIG_H
12#include "config.h"
13#endif
14#include "pmacros.h"
15
16#include "fs_config.h"
17
18#include <sys/stat.h>
19#include <sys/types.h>
20
21#include <rtems/libio.h>
22#include <rtems/dosfs.h>
23
24#include "ramdisk_support.h"
25#include "fstest.h"
26#include "fstest_support.h"
27
28#define BLOCK_SIZE 512
29
30msdos_format_request_param_t rqdata = {
31    OEMName:             "RTEMS",
32    VolLabel:            "RTEMSDisk",
33    sectors_per_cluster: 0,
34    fat_num:             0,
35    files_per_root_dir:  0,
36    fattype:             MSDOS_FMT_FATANY,
37    media:               0,
38    quick_format:        FALSE,
39    cluster_align:       0,
40    info_level:          0
41};
42
43void test_initialize_filesystem(void)
44{
45  int rc=0;
46  rc = mkdir (BASE_FOR_TEST,S_IRWXU|S_IRWXG|S_IRWXO);
47  rtems_test_assert(rc==0);
48
49  init_ramdisk();
50
51  rc=msdos_format(RAMDISK_PATH,&rqdata);
52  rtems_test_assert(rc==0);
53
54  rc=mount(RAMDISK_PATH,
55      BASE_FOR_TEST,
56      "dosfs",
57      RTEMS_FILESYSTEM_READ_WRITE,
58      NULL);
59  rtems_test_assert(rc==0);
60}
61
62
63void test_shutdown_filesystem(void)
64{
65  int rc=0;
66  rc=unmount(BASE_FOR_TEST) ;
67  rtems_test_assert(rc==0);
68  del_ramdisk();
69}
70
71/* configuration information */
72
73/* drivers */
74#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
75#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
76
77/**
78 * Configure base RTEMS resources.
79 */
80#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
81
82#define CONFIGURE_MAXIMUM_TASKS                     10
83#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
84#define CONFIGURE_MAXIMUM_DRIVERS                   10
85#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS    40
86#define CONFIGURE_INIT_TASK_STACK_SIZE (16 * 1024)
87
88#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
89
90#define CONFIGURE_FILESYSTEM_DOSFS
91
92#define CONFIGURE_INIT
93#include <rtems/confdefs.h>
94
Note: See TracBrowser for help on using the repository browser.