summaryrefslogtreecommitdiffstats
path: root/callouts/callout_test.cpp
blob: 2eff6a02095e57b4e5f6e76bd38049d42edf21ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <iostream>
#include <sdbusplus/exception.hpp>
#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 (TestCallout& e)
    {
        commit(e.name());
    }

    return 0;
}


OpenPOWER on IntegriCloud