summaryrefslogtreecommitdiffstats
path: root/src/usr/example
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2011-05-16 07:21:33 -0500
committerAndrew J. Geissler <andrewg@us.ibm.com>2011-05-18 10:14:35 -0500
commit5f28dffa51ef4fe402e1e8609fd8afa44e834db6 (patch)
treecd61f8be390ccbf8e6df49e8d82b339c70e24232 /src/usr/example
parent82fa0190a4ad346500a9b5d75abc9f85c23b08e8 (diff)
downloadtalos-hostboot-5f28dffa51ef4fe402e1e8609fd8afa44e834db6.tar.gz
talos-hostboot-5f28dffa51ef4fe402e1e8609fd8afa44e834db6.zip
Updated per trace code review comments.
- Fixed merge issue with src/makefile - Updated per second code review - Got trace tests up and running Change-Id: I932ac4eb6d2389e39ce5efb1dd2f5cfa97f7b70b Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'src/usr/example')
-rw-r--r--src/usr/example/example.C29
-rw-r--r--src/usr/example/test/exampletest.H23
2 files changed, 24 insertions, 28 deletions
diff --git a/src/usr/example/example.C b/src/usr/example/example.C
index 69291325b..803f719b0 100644
--- a/src/usr/example/example.C
+++ b/src/usr/example/example.C
@@ -1,11 +1,3 @@
-/*
- * Change Log ******************************************************************
- * Flag Defect/Feature User Date Description
- * ------ -------------- ---------- ----------- ----------------------------
- * $ag000 andrewg 04/01/2011 Updated
- *
-*/
-
#include <kernel/console.H>
#include <sys/mutex.h>
#include <sys/vfs.h>
@@ -22,25 +14,6 @@ void _start(void*)
{
printk("Executing example module.\n");
- // Component trace tests
- //for(uint32_t i=0;i<100;i++)
- //{
- uint32_t i=0;
- TRACFCOMP(g_trac_test, "Executing example module: %d", task_gettid());
- TRACFCOMP(g_trac_test, "Test 2: %d %u %c", i,i+1,'a');
- TRACFCOMP(g_trac_test, "Test 3: %d %u 0x%X", i+2,i+3,
- 0x123456789ABCDEF0);
- //}
-
- // Pointer trace
- //TRACFCOMP(g_trac_test, "Pointer Test: %llp",g_trac_test);
-
- // Binary Trace
- TRACFBIN(g_trac_test,"Binary dump of trace descriptor",
- g_trac_test,sizeof(trace_desc_t));
-
-
-
task_end();
}
@@ -48,7 +21,7 @@ uint64_t example1_function()
{
uint64_t l_rc = 0;
- TRACFCOMP(g_trac_test, "Someone Called example1_function!");
+ //TRACFCOMP(g_trac_test, "Someone Called example1_function!");
return l_rc;
}
diff --git a/src/usr/example/test/exampletest.H b/src/usr/example/test/exampletest.H
index c45aaf4f7..ec2e60dba 100644
--- a/src/usr/example/test/exampletest.H
+++ b/src/usr/example/test/exampletest.H
@@ -1,9 +1,22 @@
+#ifndef __TEST_EXAMPLETEST_H
+#define __TEST_EXAMPLETEST_H
+
+/**
+ * @file exampletest.H
+ *
+ * @brief Example for people to use when writing test cases for their module.
+*/
+
#include <cxxtest/TestSuite.H>
#include <example/example.H>
class ExampleTest: public CxxTest::TestSuite
{
public:
+
+ /**
+ * @test Test Description
+ */
void testExample1(void)
{
uint64_t l_rc = 0;
@@ -13,11 +26,19 @@ public:
TS_FAIL("Call to example1_function1 failed!");
}
}
+
+ /**
+ * @test Test Description
+ */
void testExample2(void)
{
// Call functions and validate results
// TS_FAIL("Failed test call to example2 function");
}
+
+ /**
+ * @test Test Description
+ */
void testExample3(void)
{
// Call functions and validate results
@@ -36,3 +57,5 @@ public:
};
+#endif
+
OpenPOWER on IntegriCloud