source: rtems/testsuites/sptests/sp10/init.c @ bd894e54

4.104.115
Last change on this file since bd894e54 was bd894e54, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 21, 2009 at 7:32:30 PM

2009-07-21 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, configure.ac: Add new test to exercise Debug Manager.
  • sp10/.cvsignore, sp10/Makefile.am, sp10/init.c, sp10/sp10.doc, sp10/sp10.scn: New files.
  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2009.
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.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#include <tmacros.h>
13
14rtems_task Init(
15  rtems_task_argument ignored
16)
17{
18  rtems_status_code     sc;
19  bool                  is_set;
20
21  puts( "\n\n*** TEST 10 ***" );
22
23  puts( "Init - clear debug level" );
24  _Debug_Level = 0;
25
26  puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" );
27  is_set = rtems_debug_is_enabled( 0x1 );
28  rtems_test_assert(is_set == false);
29 
30  puts( "Init - rtems_debug_enable - set 0x1" );
31  rtems_debug_enable(0x1);
32  rtems_test_assert(_Debug_Level == 0x1);
33
34  puts( "Init - rtems_debug_is_enabled - is 0x1 set? Yes" );
35  is_set = rtems_debug_is_enabled( 0x1 );
36  rtems_test_assert(is_set == true);
37 
38  puts( "Init - rtems_debug_disable - clear 0x1" );
39  rtems_debug_disable(0x1);
40  rtems_test_assert(_Debug_Level == 0x0);
41
42  puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" );
43  is_set = rtems_debug_is_enabled( 0x1 );
44  rtems_test_assert(is_set == false);
45 
46  puts( "*** END OF TEST 10 ***" );
47  rtems_test_exit(0);
48}
49
50/* configuration information */
51
52#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
53#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
54
55#define CONFIGURE_MAXIMUM_TASKS         1
56#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
57
58#define CONFIGURE_INIT
59#include <rtems/confdefs.h>
60
61/* global variables */
Note: See TracBrowser for help on using the repository browser.