source: rtems/testsuites/libtests/tar03/init.c @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2012.
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
14#include <tmacros.h>
15#include "test_support.h"
16
17#include <rtems/imfs.h>
18#include <rtems/untar.h>
19#include <rtems/error.h>
20
21const char rtems_test_name[] = "TAR 3";
22
23/* forward declarations to avoid warnings */
24rtems_task Init(rtems_task_argument argument);
25void test_tarfs_error(void);
26
27void test_tarfs_error(void)
28{
29  int sc;
30
31  puts("Loading tarfs image at non-root - ERROR");
32  sc = rtems_tarfs_load("x",(void *)rtems_task_create, 72);
33  if (sc != -1) {
34    printf ("error: untar failed returned %d\n", sc);
35    rtems_test_exit(1);
36  }
37
38  puts("Loading tarfs image with miniIMFS as root filesystem - ERROR");
39  sc = rtems_tarfs_load("/",(void *)rtems_task_create, 72);
40  if (sc != -1) {
41    printf ("error: untar failed returned %d\n", sc);
42    rtems_test_exit(1);
43  }
44}
45
46rtems_task Init(
47  rtems_task_argument argument
48)
49{
50  TEST_BEGIN();
51
52  test_tarfs_error();
53 
54  TEST_END();
55  rtems_test_exit(0);
56}
57
58/* configuration information */
59
60#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
61#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
62
63#define CONFIGURE_MAXIMUM_TASKS             1
64#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
65
66#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
67
68#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
69
70#define CONFIGURE_INIT
71#include <rtems/confdefs.h>
72/* end of file */
Note: See TracBrowser for help on using the repository browser.