source: rtems/testsuites/libtests/block17/init.c @ 30c3898

5
Last change on this file since 30c3898 was 30c3898, checked in by Sebastian Huber <sebastian.huber@…>, on 03/03/18 at 12:24:42

libblock: Init deps in rtems_blkdev_create()

Update #3358.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 * Copyright (c) 2013, 2018 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#ifdef HAVE_CONFIG_H
16  #include "config.h"
17#endif
18
19#include <rtems/bdbuf.h>
20#include <rtems/blkdev.h>
21
22#include "tmacros.h"
23
24const char rtems_test_name[] = "BLOCK 17";
25
26static void test(void)
27{
28  rtems_status_code sc;
29
30  sc = rtems_bdbuf_init();
31  rtems_test_assert(sc == RTEMS_INVALID_NUMBER);
32
33  sc = rtems_blkdev_create(NULL, 0, 0, NULL, NULL);
34  rtems_test_assert(sc == RTEMS_INCORRECT_STATE);
35}
36
37static void Init(rtems_task_argument arg)
38{
39  TEST_BEGIN();
40
41  test();
42
43  TEST_END();
44
45  rtems_test_exit(0);
46}
47
48#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
49#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
50
51#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
52#define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS (64UL * 1024UL)
53
54#define CONFIGURE_MAXIMUM_TASKS 1
55
56#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
57
58#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
59
60#define CONFIGURE_INIT
61
62#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.