Deepak Kodihalli | 739e925 | 2017-03-05 23:23:50 -0600 | [diff] [blame] | 1 | #include <iostream> |
Deepak Kodihalli | 1533110 | 2017-03-09 23:50:43 -0600 | [diff] [blame] | 2 | #include <sdbusplus/exception.hpp> |
Deepak Kodihalli | 739e925 | 2017-03-05 23:23:50 -0600 | [diff] [blame] | 3 | #include <phosphor-logging/elog.hpp> |
| 4 | #include <phosphor-logging/elog-errors.hpp> |
| 5 | #include "elog_meta.hpp" |
| 6 | |
| 7 | using namespace phosphor::logging; |
| 8 | |
| 9 | int main(int argc, char** argv) |
| 10 | { |
| 11 | if(2 != argc) |
| 12 | { |
| 13 | std::cerr << "usage: callout-test <sysfs path>" << std::endl; |
| 14 | return -1; |
| 15 | } |
| 16 | |
| 17 | using namespace example::xyz::openbmc_project::Example::Elog; |
| 18 | try |
| 19 | { |
| 20 | elog<TestCallout>( |
| 21 | TestCallout::DEV_ADDR(0xDEADEAD), |
| 22 | TestCallout::CALLOUT_ERRNO_TEST(0), |
| 23 | TestCallout::CALLOUT_DEVICE_PATH_TEST(argv[1])); |
| 24 | } |
Deepak Kodihalli | 1533110 | 2017-03-09 23:50:43 -0600 | [diff] [blame] | 25 | catch (TestCallout& e) |
Deepak Kodihalli | 739e925 | 2017-03-05 23:23:50 -0600 | [diff] [blame] | 26 | { |
| 27 | commit(e.name()); |
| 28 | } |
| 29 | |
| 30 | return 0; |
| 31 | } |
| 32 | |
| 33 | |