source: rtems/testsuites/fstests/mrfs_support/fs_support.c @ 3cec2df

5
Last change on this file since 3cec2df was 3cec2df, checked in by Sebastian Huber <sebastian.huber@…>, on 12/17/19 at 08:17:43

config: CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS

Rename CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS into
CONFIGURE_MAXIMUM_FILE_DESCRIPTORS.

Update #3753.

  • Property mode set to 100644
File size: 1.7 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 <tmacros.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_FILE_DESCRIPTORS    40
70#define CONFIGURE_INIT_TASK_STACK_SIZE (32 * 1024)
71#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
72#define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS     1
73
74#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
75
76#define CONFIGURE_FILESYSTEM_RFS
77
78#define CONFIGURE_INIT
79#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.