diff options
author | CamVan Nguyen <ctnguyen@us.ibm.com> | 2011-06-29 12:33:45 -0500 |
---|---|---|
committer | CAMVAN T. NGUYEN <ctnguyen@us.ibm.com> | 2011-07-12 17:20:10 -0500 |
commit | 038a9a46895333b86da8ca83c8effd29ff3e76e9 (patch) | |
tree | bb7dc0a50338419eb1b3ae80045bdd2d54ce7481 /src/usr | |
parent | e3fc77c59a071c009e13acdf4c4b2ce6a718a570 (diff) | |
download | talos-hostboot-038a9a46895333b86da8ca83c8effd29ff3e76e9.tar.gz talos-hostboot-038a9a46895333b86da8ca83c8effd29ff3e76e9.zip |
Define additional trace macros.
Change-Id: Ife9c116413537ff39bc37db47515d1f955dfdcc8
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/161
Tested-by: Jenkins Server
Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/trace/test/tracetest.H | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/usr/trace/test/tracetest.H b/src/usr/trace/test/tracetest.H index 5b8e3d29b..06c9f9ea3 100644 --- a/src/usr/trace/test/tracetest.H +++ b/src/usr/trace/test/tracetest.H @@ -146,6 +146,48 @@ public: } /** + * @test Test trace macros + */ + void testTracMacros(void) + { + trace_desc_t *g_trac_test = NULL; + char l_comp[] = "TEST"; + + #define __COMP_TD__ g_trac_test + #define __COMP_NAMESPACE__ "TRACE" + #define __COMP_CLASS__ "TraceTest" + #define __COMP_FN__ "testTracMacros" + + TRAC_INIT_BUFFER(&g_trac_test, l_comp, 4096); + + if(g_trac_test == NULL) + { + TS_FAIL("g_trac_test was returned as NULL!"); + } + else + { + TRAC_ENTER("testTracMacros"); + TRAC_ENTER_(); + TRAC_INF("Testing Info Mark"); + TRAC_ERR("Testing Error Mark"); + TRAC_EXIT("testTracMacros"); + TRAC_EXIT_(); + + DTRAC_ENTER("testTracMacros - Debug Trace"); + DTRAC_ENTER_(" - Debug Trace"); + DTRAC_INF("Testing Debug Info Mark"); + DTRAC_ERR("Testing Debug Error Mark"); + DTRAC_EXIT("testTracMacros - Debug Trace"); + DTRAC_EXIT_(" - Debug Trace"); + } + + #undef __COMP_FN__ + #undef __COMP_CLASS__ + #undef __COMP_NAMESPACE__ + #undef __COMP_TD__ + } + + /** * @test Test max number of buffers */ void testTracMaxBuffers(void) |