source: rtems/testsuites/libtests/dl04/init.c @ d2e31f7

4.11
Last change on this file since d2e31f7 was d2e31f7, checked in by Chris Johns <chrisj@…>, on 03/28/17 at 06:23:05

libdl: Back port C++ exception throw and catch from 4.12.

Closes #2956.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/*
2 * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>.  All rights reserved.
3 *
4 * The license and distribution terms for this file may be
5 * found in the file LICENSE in this distribution or at
6 * http://www.rtems.org/license/LICENSE.
7 */
8
9#ifdef HAVE_CONFIG_H
10  #include "config.h"
11#endif
12
13#include "tmacros.h"
14
15#include <errno.h>
16#include <string.h>
17#include <stdint.h>
18#include <unistd.h>
19
20#include <rtems/rtl/rtl.h>
21#include <rtems/untar.h>
22
23#include "dl-load.h"
24
25const char rtems_test_name[] = "libdl (RTL) 4";
26
27/* forward declarations to avoid warnings */
28static rtems_task Init(rtems_task_argument argument);
29
30#include "dl-tar.h"
31
32#define TARFILE_START dl_tar
33#define TARFILE_SIZE  dl_tar_size
34
35static int test(void)
36{
37  int ret;
38  ret = dl_load_test();
39  if (ret)
40    rtems_test_exit(ret);
41  return 0;
42}
43
44static void Init(rtems_task_argument arg)
45{
46  int te;
47
48  TEST_BEGIN();
49
50  te = Untar_FromMemory((void *)TARFILE_START, (size_t)TARFILE_SIZE);
51  if (te != 0)
52  {
53    printf("untar failed: %d\n", te);
54    rtems_test_exit(1);
55    exit (1);
56  }
57
58  test();
59
60  TEST_END();
61
62  rtems_test_exit(0);
63}
64
65#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
66#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
67
68#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
69
70#define CONFIGURE_MAXIMUM_TASKS 1
71
72#define CONFIGURE_MINIMUM_TASK_STACK_SIZE (8U * 1024U)
73
74#define CONFIGURE_EXTRA_TASK_STACKS (8 * 1024)
75
76#define CONFIGURE_MAXIMUM_SEMAPHORES 1
77
78#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
79
80#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
81
82#define CONFIGURE_INIT
83
84#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.