source: rtems/testsuites/support/include/test_support.h

Last change on this file was 03e86553, checked in by Sebastian Huber <sebastian.huber@…>, on Dec 5, 2018 at 7:05:54 AM

tests: Fix rtems_test_spin_until_next_tick()

This bug surfaced due to sporadic failures in sptimecounter02. Adjust
rtems_test_spin_for_ticks() to include the partial tick in the argument
value.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2011.
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#ifndef __TEST_SUPPORT_h
11#define __TEST_SUPPORT_h
12
13#include <stdarg.h>
14#include <rtems.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/*
21 *  Return a pointer to the POSIX name that is slightly
22 *  beyond the legal limit.
23 */
24const char *Get_Too_Long_Name(void);
25
26/*
27 *  Return a pointer to the longest legal POSIX name.
28 */
29const char *Get_Longest_Name(void);
30
31/*
32 *  Spin for specified number of ticks.  The first tick we spin through is a
33 *  partial one.
34 */
35void rtems_test_spin_for_ticks(rtems_interval ticks);
36
37/*
38 *  Spin until the next clock tick
39 */
40void rtems_test_spin_until_next_tick( void );
41
42/*********************************************************************/
43/*********************************************************************/
44/**************              TMTEST SUPPORT             **************/
45/*********************************************************************/
46/*********************************************************************/
47
48/*
49 *  Type of method used for timing operations
50 */
51typedef void (*rtems_time_test_method_t)(
52  int    iteration,
53  void  *argument
54);
55
56/*
57 *  Obtain baseline timing information for benchmark tests.
58 */
59void rtems_time_test_measure_operation(
60  const char               *description,
61  rtems_time_test_method_t  operation,
62  void                     *argument,
63  int                       iterations,
64  int                       overhead
65);
66
67/*********************************************************************/
68/*********************************************************************/
69/**************              TEST SUPPORT               **************/
70/*********************************************************************/
71/*********************************************************************/
72
73void locked_print_initialize(void);
74
75int locked_printf(const char *fmt, ...);
76
77int locked_vprintf(const char *fmt, va_list ap);
78
79#ifdef __cplusplus
80};
81#endif
82
83#endif
Note: See TracBrowser for help on using the repository browser.