summaryrefslogtreecommitdiffstats
path: root/callouts/callout_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'callouts/callout_test.cpp')
-rw-r--r--callouts/callout_test.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/callouts/callout_test.cpp b/callouts/callout_test.cpp
new file mode 100644
index 0000000..2af6dc0
--- /dev/null
+++ b/callouts/callout_test.cpp
@@ -0,0 +1,32 @@
+#include <iostream>
+#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/elog-errors.hpp>
+#include "elog_meta.hpp"
+
+using namespace phosphor::logging;
+
+int main(int argc, char** argv)
+{
+ if(2 != argc)
+ {
+ std::cerr << "usage: callout-test <sysfs path>" << std::endl;
+ return -1;
+ }
+
+ using namespace example::xyz::openbmc_project::Example::Elog;
+ try
+ {
+ elog<TestCallout>(
+ TestCallout::DEV_ADDR(0xDEADEAD),
+ TestCallout::CALLOUT_ERRNO_TEST(0),
+ TestCallout::CALLOUT_DEVICE_PATH_TEST(argv[1]));
+ }
+ catch (elogException<TestCallout>& e)
+ {
+ commit(e.name());
+ }
+
+ return 0;
+}
+
+
OpenPOWER on IntegriCloud