summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/mdia/test/mdiafakesm.H
diff options
context:
space:
mode:
authorLarina DSouza <larsouza@in.ibm.com>2012-06-13 22:53:59 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-09-24 11:10:07 -0500
commitb52c81900043f02fe05d9313cebbde4fe805640c (patch)
treef3c24624f02927b068e72ff1a9f20231b2f021a0 /src/usr/diag/mdia/test/mdiafakesm.H
parentf754a2a6f0079f3424e2368ae3c3635ac8440612 (diff)
downloadtalos-hostboot-b52c81900043f02fe05d9313cebbde4fe805640c.tar.gz
talos-hostboot-b52c81900043f02fe05d9313cebbde4fe805640c.zip
Process Maintenance Command timeout
When a maintenance cmd timesout, set the target/s WorkFlowStatus to the appropriate state such that the state machine can take further action. RTC: 41894 Change-Id: Iaf5b2b5ab07f9269379b011b720df760e92e178f Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1200 Tested-by: Jenkins Server Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag/mdia/test/mdiafakesm.H')
-rw-r--r--src/usr/diag/mdia/test/mdiafakesm.H42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/usr/diag/mdia/test/mdiafakesm.H b/src/usr/diag/mdia/test/mdiafakesm.H
index 61947736a..78e402a38 100644
--- a/src/usr/diag/mdia/test/mdiafakesm.H
+++ b/src/usr/diag/mdia/test/mdiafakesm.H
@@ -25,6 +25,8 @@
#define __TEST_MDIAFAKESM_H
#include "../mdiasm.H"
+#include "../mdiamonitor.H"
+#include "../mdiafwd.H"
namespace MDIA
{
@@ -155,5 +157,45 @@ class FakeStateMachine1 : public StateMachine
*/
mutex_t *iv_mutex;
};
+
+/**
+ * @brief FakeStateMachine2
+ *
+ * Used to test processing a maint command timeout
+ * from the StateMachine perspective
+ */
+class FakeStateMachine2 : public StateMachine
+{
+ public:
+
+ /**
+ * @brief doMaintCommand maint command work item handler
+ *
+ * determine correct comman and issue it. Does not support
+ * polling/processing fake events.
+ *
+ * @param[in] i_wfp the target for which a command should be issued
+ */
+ errlHndl_t doMaintCommand(WorkFlowProperties & i_wfp);
+
+ /**
+ * @brief ctor
+ */
+ FakeStateMachine2(){}
+
+ /**
+ * @brief dtor
+ */
+ ~FakeStateMachine2(){}
+
+ private:
+
+ /**
+ * @brief getMonitor Create and start the FakeMdiaCMTest
+ *
+ * @retval CommandMonitor reference
+ */
+ CommandMonitor & getMonitor();
+};
}
#endif
OpenPOWER on IntegriCloud