RTEMS 6.1-rc4
Loading...
Searching...
No Matches
ts-idle.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
13/*
14 * Copyright (C) 2021 embedded brains GmbH & Co. KG
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#include <rtems.h>
39#include <rtems/bspIo.h>
40#include <rtems/test-info.h>
41#include <rtems/testopts.h>
42
43#include <rtems/test.h>
44
45#include "tx-support.h"
46
47static char buffer[ 512 ];
48
49static const T_action actions[] = {
50 T_report_hash_sha256
51};
52
53static const T_config test_config = {
54 .name = rtems_test_name,
55 .buf = buffer,
56 .buf_size = sizeof( buffer ),
57 .putchar = rtems_put_char,
58 .verbosity = RTEMS_TEST_VERBOSITY,
59 .now = T_now_tick,
60 .allocate = T_memory_allocate,
61 .deallocate = T_memory_deallocate,
62 .action_count = T_ARRAY_SIZE( actions ),
63 .actions = actions
64};
65
66#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
67
68#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0
69
70#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
71
72#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
73
74#define CONFIGURE_INITIAL_EXTENSIONS \
75 { .fatal = FatalInitialExtension }
76
77#ifndef CONFIGURE_IDLE_TASK_STORAGE_SIZE
78#define CONFIGURE_IDLE_TASK_STORAGE_SIZE RTEMS_MINIMUM_STACK_SIZE
79#endif
80
81#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
82
83void *IdleBody( uintptr_t ignored )
84{
85 int exit_code;
86
87 (void) ignored;
88
89 rtems_test_begin( rtems_test_name, TEST_STATE );
90 T_register();
91 exit_code = T_main( &test_config );
92
93 if ( exit_code == 0 ) {
95 }
96
97 rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, (uint32_t) exit_code );
98}
99
100#define CONFIGURE_IDLE_TASK_BODY IdleBody
101
102#define CONFIGURE_INIT
103
104#include <rtems/confdefs.h>
This header file provides the kernel character input/output support API.
This header file evaluates the application configuration options defined by the application.
void rtems_put_char(int c, void *unused)
Puts the character using rtems_putc()
Definition: rtems_put_char.c:42
@ RTEMS_FATAL_SOURCE_EXIT
Fatal source of exit().
Definition: interr.h:100
const char rtems_test_name[]
Each test must define a test name string.
Definition: init.c:6899
int rtems_test_begin(const char *name, const RTEMS_TEST_STATE state)
Prints a begin of test message using printf().
Definition: testbeginend.c:56
int rtems_test_end(const char *name)
Prints an end of test message using printf().
Definition: testbeginend.c:93
This header file defines the RTEMS Classic API.
Definition: test.h:2295
This header file provides interfaces of the RTEMS Test Support.
This header file provides interfaces of the RTEMS Test Framework.
This header file provides the support functions for the validation test cases.