source: rtems/testsuites/fstests/mrfs_support/fs_support.c @ c4b8b147

Last change on this file since c4b8b147 was c4b8b147, checked in by Sebastian Huber <sebastian.huber@…>, on Nov 3, 2017 at 7:35:38 AM

tests: Use simple console driver

Update #3170.
Update #3199.

  • Property mode set to 100644
File size: 1.8 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.org/license/LICENSE.
8 */
9
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13#include "pmacros.h"
14
15#include <sys/stat.h>
16#include <sys/types.h>
17
18#include <rtems/libio.h>
19#include <rtems/rtems-rfs-format.h>
20
21#include "ramdisk_support.h"
22
23#include "fstest.h"
24#include "fstest_support.h"
25
26#define BLOCK_SIZE (512)
27
28rtems_rfs_format_config rfs_config = {
29block_size:BLOCK_SIZE
30};
31
32
33void
34test_initialize_filesystem (void)
35{
36  int rc = 0;
37  rc = mkdir (BASE_FOR_TEST,S_IRWXU|S_IRWXG|S_IRWXO);
38  rtems_test_assert (rc == 0);
39
40  init_ramdisk ();
41
42  rc = rtems_rfs_format (RAMDISK_PATH, &rfs_config);
43  rtems_test_assert (rc == 0);
44
45  rc = mount (RAMDISK_PATH,
46              BASE_FOR_TEST, "rfs", RTEMS_FILESYSTEM_READ_WRITE, NULL);
47  rtems_test_assert (rc == 0);
48}
49
50
51void
52test_shutdown_filesystem (void)
53{
54  int rc = 0;
55  rc = unmount (BASE_FOR_TEST);
56  rtems_test_assert (rc == 0);
57  del_ramdisk ();
58}
59
60/* configuration information */
61#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
62#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
63
64#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
65
66#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
67
68#define CONFIGURE_MAXIMUM_TASKS                     10
69#define CONFIGURE_MAXIMUM_DRIVERS                   10
70#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS    40
71#define CONFIGURE_INIT_TASK_STACK_SIZE (32 * 1024)
72#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
73#define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS     1
74
75#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
76
77#define CONFIGURE_FILESYSTEM_RFS
78
79#define CONFIGURE_INIT
80#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.