summaryrefslogtreecommitdiffstats
path: root/testsuites/fstests/mimfs_support/fs_support.c
blob: dcebd9be49bd4139a8333c0c108259d2c8d950d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
 *  $Id$
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pmacros.h"

#include "fs_config.h"

#include <sys/stat.h>
#include <sys/types.h>

#include <rtems/libio.h>



void test_initialize_filesystem(void)
{
  int rc=0;
  rc=mkdir(BASE_FOR_TEST,0777);
  rtems_test_assert(rc==0);


  rc=mount(NULL,
      BASE_FOR_TEST,
      "imfs",
      RTEMS_FILESYSTEM_READ_WRITE,
      NULL);
  rtems_test_assert(rc==0);
}


void test_shutdown_filesystem(void)
{
  int rc=0;
  rc=unmount(BASE_FOR_TEST) ;
  rtems_test_assert(rc==0);
}

/* configuration information */

/* drivers */
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER

/**
 * Configure base RTEMS resources.
 */
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_MEMORY_OVERHEAD                  512
#define CONFIGURE_MAXIMUM_TASKS                    rtems_resource_unlimited (10)
#define CONFIGURE_MAXIMUM_SEMAPHORES               rtems_resource_unlimited (10)
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES           rtems_resource_unlimited (6)
#define CONFIGURE_MAXIMUM_PARTITIONS               rtems_resource_unlimited (4)
#define CONFIGURE_MAXIMUM_TIMERS                   10


/**
 * Configure file system and libblock.
 */
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS  100
#define CONFIGURE_MAXIMUM_DRIVERS                  100
#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK


#define CONFIGURE_INIT
#include <rtems/confdefs.h>