summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/mdia/test
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@us.ibm.com>2012-09-11 10:13:49 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-09-16 14:47:56 -0500
commit2a66f783f18d627788922e8a22502af9aff0abc9 (patch)
tree1c95f2cb9cb35d6e1a472c974a493fdd2bd10f4c /src/usr/diag/mdia/test
parentd529059e6f21842c7ee74edd91c7abb33ca1eb35 (diff)
downloadtalos-hostboot-2a66f783f18d627788922e8a22502af9aff0abc9.tar.gz
talos-hostboot-2a66f783f18d627788922e8a22502af9aff0abc9.zip
MDIA interface for PRD to determine MDIA is running.
Change-Id: I3d23b584fb28a66eb2c92cb7c272b5fde59983f4 RTC: 45395 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1718 Tested-by: Jenkins Server Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-by: Christopher T. Phan <cphan@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag/mdia/test')
-rw-r--r--src/usr/diag/mdia/test/mdiatestsm.H99
1 files changed, 77 insertions, 22 deletions
diff --git a/src/usr/diag/mdia/test/mdiatestsm.H b/src/usr/diag/mdia/test/mdiatestsm.H
index dcfd04085..5d95975c0 100644
--- a/src/usr/diag/mdia/test/mdiatestsm.H
+++ b/src/usr/diag/mdia/test/mdiatestsm.H
@@ -1,25 +1,25 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/diag/mdia/test/mdiatestsm.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 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 other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/mdia/test/mdiatestsm.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 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 */
#ifndef __TEST_MDIATESTSM_H
#define __TEST_MDIATESTSM_H
@@ -34,6 +34,9 @@
#include "../mdiasmimpl.H"
#include <diag/mdia/mdiamevent.H>
+using namespace MDIA;
+using namespace TARGETING;
+
class MdiaSmTest : public CxxTest::TestSuite
{
private:
@@ -630,5 +633,57 @@ class MdiaSmTest : public CxxTest::TestSuite
TS_TRACE(EXIT_MRK "testSmDoMaintCommand");
}
+
+ void testSmRunning(void)
+ {
+ TS_TRACE(ENTER_MRK "testSmRunning");
+
+ StateMachine s;
+
+ bool running = false;
+
+ do {
+
+ s.running(running);
+
+ if(running)
+ {
+ TS_FAIL("unexpected result calling running (1)");
+ break;
+ }
+
+ WorkFlowAssocMap wkFlentries;
+
+ TargetHandleList targets;
+ getTargets(1, targets);
+
+ wkFlentries[targets[0]].push_back(START_SCRUB);
+
+ s.setup(wkFlentries);
+
+ s.running(running);
+
+ if(!running)
+ {
+ TS_FAIL("unexpected result calling running (2)");
+ break;
+ }
+
+ s.reset();
+
+ s.run(wkFlentries);
+
+ s.running(running);
+
+ if(running)
+ {
+ TS_FAIL("unexpected result calling running (3)");
+ break;
+ }
+
+ } while(0);
+
+ TS_TRACE(EXIT_MRK "testSmRunning");
+ }
};
#endif
OpenPOWER on IntegriCloud