summaryrefslogtreecommitdiffstats
path: root/testsuites/fstests/mimfs_support/fs_support.c
blob: ee8a904060b621d4d3c8ef66cc1e3f48485897fc (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
/*
 *  $Id$
 */

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

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

#include "pmacros.h"
#include "fs_config.h"

#include <rtems/libio.h>

void test_initialize_filesystem(void)
{
  int rc;

  rc = mkdir( BASE_FOR_TEST, 0777 );
  rtems_test_assert( rc == 0 );

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

void test_shutdown_filesystem(void)
{
  int rc;

  rc = unmount( BASE_FOR_TEST );
  rtems_test_assert( rc == 0 );

}