summaryrefslogtreecommitdiffstats
path: root/src/usr/example
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2013-10-03 17:07:20 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-10-10 13:08:56 -0500
commitc9343d971c4410c80ff92bd554d61740cd39b8dd (patch)
tree3d1cfe2c369e7b0a664019d305e6cfd41b0a8523 /src/usr/example
parentcb4b721956f9a0a347db3b838608ffc0b08fd7e5 (diff)
downloadblackbird-hostboot-c9343d971c4410c80ff92bd554d61740cd39b8dd.tar.gz
blackbird-hostboot-c9343d971c4410c80ff92bd554d61740cd39b8dd.zip
Added common header file for reason code
Change-Id: Ifea8a00b9a36817e0b42054dfb9ce13dad8f15a6 RTC: 76269 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6478 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/example')
-rw-r--r--src/usr/example/example.C79
-rw-r--r--src/usr/example/makefile30
-rw-r--r--src/usr/example/test/exampletest.H123
-rw-r--r--src/usr/example/test/makefile28
4 files changed, 0 insertions, 260 deletions
diff --git a/src/usr/example/example.C b/src/usr/example/example.C
deleted file mode 100644
index bb8cef2a3..000000000
--- a/src/usr/example/example.C
+++ /dev/null
@@ -1,79 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/example/example.C $ */
-/* */
-/* IBM CONFIDENTIAL */
-/* */
-/* COPYRIGHT International Business Machines Corp. 2010,2012 */
-/* */
-/* p1 */
-/* */
-/* Object Code Only (OCO) source materials */
-/* Licensed Internal Code Source Materials */
-/* IBM HostBoot Licensed Internal Code */
-/* */
-/* The source code for this program is not published or otherwise */
-/* divested of its trade secrets, irrespective of what has been */
-/* deposited with the U.S. Copyright Office. */
-/* */
-/* Origin: 30 */
-/* */
-/* IBM_PROLOG_END_TAG */
-#include <kernel/console.H>
-#include <sys/sync.h>
-#include <sys/vfs.h>
-#include <sys/task.h>
-#include <trace/interface.H>
-#include <example/example.H>
-#include <example/examplerc.H>
-#include <errl/errlentry.H>
-
-#if 0
-//static mutex_t value = MUTEX_INITIALIZER;
-trace_desc_t *g_trac_test = NULL;
-TRAC_INIT(&g_trac_test, "EXAMPLE", 4096);
-#endif
-
-extern "C"
-void* _start(void *ptr)
-{
- /**
- * @todo fix printk to accept (NULL)
- */
- printk( "Executing Example module, arg=%s\n", ( (ptr==NULL) ? "(NULL)" : (char*)ptr ) );
-
- return NULL;
-}
-
-uint64_t example1_function()
-{
- uint64_t l_rc = 0;
-
- //TRACFCOMP(g_trac_test, "Someone Called example1_function!");
-
- return l_rc;
-}
-
-// This example shows how to create an error log with passed-in
-// defined parameters
-void example2_create_errorlog_function()
-{
- /*@
- * @errortype
- * @moduleid MY_MODULE_ID_1
- * @reasoncode MY_REASON_CODE_1
- * @userdata1 Meaning of userdata1 value
- * @userdata2 Meaning of userdata2 value
- * @devdesc Example of creating an error log
- */
- errlHndl_t l_err = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
- MY_MODULE_ID_1,
- MY_REASON_CODE_1,
- 0x8000000000000001,
- 0x9000000000000003);
- delete l_err;
- l_err = NULL;
- return;
-}
diff --git a/src/usr/example/makefile b/src/usr/example/makefile
deleted file mode 100644
index 88d8ef436..000000000
--- a/src/usr/example/makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
-#
-# $Source: src/usr/example/makefile $
-#
-# IBM CONFIDENTIAL
-#
-# COPYRIGHT International Business Machines Corp. 2010 - 2011
-#
-# p1
-#
-# Object Code Only (OCO) source materials
-# Licensed Internal Code Source Materials
-# IBM HostBoot Licensed Internal Code
-#
-# The source code for this program is not published or other-
-# wise divested of its trade secrets, irrespective of what has
-# been deposited with the U.S. Copyright Office.
-#
-# Origin: 30
-#
-# IBM_PROLOG_END
-ROOTPATH = ../../..
-MODULE = example
-
-OBJS = example.o
-
-SUBDIRS = test.d
-
-include ${ROOTPATH}/config.mk
diff --git a/src/usr/example/test/exampletest.H b/src/usr/example/test/exampletest.H
deleted file mode 100644
index c08a30db5..000000000
--- a/src/usr/example/test/exampletest.H
+++ /dev/null
@@ -1,123 +0,0 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/example/test/exampletest.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
-#ifndef __TEST_EXAMPLETEST_H
-#define __TEST_EXAMPLETEST_H
-
-/**
- * @file exampletest.H
- *
- * @brief Example for people to use when writing test cases for their module.
- * @todo add more doxygen blocks
- */
-
-#include <cxxtest/TestSuite.H>
-#include <example/example.H>
-
-
-class ExampleTest: public CxxTest::TestSuite
-{
-public:
-
-
- /**
- * @test TS_WARN will run if the testExampleWarn_function FAILS
- */
- void testExampleWarn(void)
- {
- uint64_t l_rc = 0;
- l_rc = example1_function();
- if(l_rc)
- {
- TS_WARN("Warning, Call to testExampleWarn returned bad value.\n");
- }
- }
-
-
- /**
- * @test TS_TRACE will run if the testExampleTrace function FAILS
- *
- */
- void testExampleTrace(void)
- {
- uint64_t l_rc = 0;
- l_rc = example1_function();
- if(l_rc)
- {
- TS_TRACE("Tracing a failure in testExampleTrace function1\n");
- }
- }
-
- /**
- * @test TS_FAIL will run if the testExampleFail function FAILS
- */
- void testExampleFail(void)
- {
- uint64_t l_rc = 0;
- l_rc = example1_function();
- if(l_rc)
- {
- TS_FAIL("Call to testExampleFail failed!\n");
- }
- }
- /**
- * @test this will always run TS_FAIL
- */
- void testExampleForceFail(void)
- {
-
- TS_FAIL("Run TS_FAIL() as part of the example test.\n" );
- }
-
- /**
- * @test this will always run TS_WARN
- */
- void testExampleForceWarn(void)
- {
-
- TS_WARN("Run TS_WARN() as part of the example test\n" );
- }
- /**
- * @test this will always run TS_TRACE
- */
- void testExampleForceTrace(void)
- {
- uint32_t i_32test = 0xdeadbeef;
- i_32test--; i_32test++;
- uint64_t i_64test = 0xbadc0ffee0ddf00d;
- i_64test--; i_64test++;
-
- TS_TRACE("Run TS_TRACE() as part of the example test\n" );
-
- TS_TRACE("Run TS_TRACE() with one print parameter: %d\n", 5 );
-
- TS_TRACE("Run TS_TRACE() with 2 parameters: 0x%x 0x%x \n", i_32test, 0x78 );
-
- TS_TRACE("Run TS_TRACE() with 3 parameters: %d, 0x%llx, %p", 328, i_64test, &i_64test );
- }
-
-
-
-};
-
-#endif
-
diff --git a/src/usr/example/test/makefile b/src/usr/example/test/makefile
deleted file mode 100644
index d47937b3b..000000000
--- a/src/usr/example/test/makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
-#
-# $Source: src/usr/example/test/makefile $
-#
-# IBM CONFIDENTIAL
-#
-# COPYRIGHT International Business Machines Corp. 2011
-#
-# p1
-#
-# Object Code Only (OCO) source materials
-# Licensed Internal Code Source Materials
-# IBM HostBoot Licensed Internal Code
-#
-# The source code for this program is not published or other-
-# wise divested of its trade secrets, irrespective of what has
-# been deposited with the U.S. Copyright Office.
-#
-# Origin: 30
-#
-# IBM_PROLOG_END
-ROOTPATH = ../../../..
-
-MODULE = testexample
-TESTS = *.H
-
-include ${ROOTPATH}/config.mk
OpenPOWER on IntegriCloud