test: add callout-test

Add test program which can create callouts based on an input device
path. It creates an error, with callouts, with name TestCallout.

Change-Id: I96b66b73ae4a9c00daff06222841a13747c07408
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/tools/example/xyz/openbmc_project/Example/Device.errors.yaml b/tools/example/xyz/openbmc_project/Example/Device.errors.yaml
new file mode 100644
index 0000000..fbcf78c
--- /dev/null
+++ b/tools/example/xyz/openbmc_project/Example/Device.errors.yaml
@@ -0,0 +1,2 @@
+- name: Callout
+  description: Generic device callout
diff --git a/tools/example/xyz/openbmc_project/Example/Device.metadata.yaml b/tools/example/xyz/openbmc_project/Example/Device.metadata.yaml
new file mode 100644
index 0000000..e5d6508
--- /dev/null
+++ b/tools/example/xyz/openbmc_project/Example/Device.metadata.yaml
@@ -0,0 +1,7 @@
+- name: Callout
+  meta:
+    - str: "CALLOUT_ERRNO_TEST=%d"
+      type: int32
+    - str: "CALLOUT_DEVICE_PATH_TEST=%s"
+      type: string
+      process: true
diff --git a/tools/example/xyz/openbmc_project/Example/Elog.errors.yaml b/tools/example/xyz/openbmc_project/Example/Elog.errors.yaml
index d968823..77dacdb 100644
--- a/tools/example/xyz/openbmc_project/Example/Elog.errors.yaml
+++ b/tools/example/xyz/openbmc_project/Example/Elog.errors.yaml
@@ -6,3 +6,6 @@
 
 - name: AutoTestSimple
   description: This is a simple test error.
+
+- name: TestCallout
+  description: This is test error TestCallout
diff --git a/tools/example/xyz/openbmc_project/Example/Elog.metadata.yaml b/tools/example/xyz/openbmc_project/Example/Elog.metadata.yaml
index 64db7fc..cb1dc7a 100644
--- a/tools/example/xyz/openbmc_project/Example/Elog.metadata.yaml
+++ b/tools/example/xyz/openbmc_project/Example/Elog.metadata.yaml
@@ -26,3 +26,11 @@
   meta:
     - str: STRING=%s
       type: string
+
+- name: TestCallout
+  level: ERR
+  meta:
+        - str: DEV_ADDR=0x%.8X
+          type: uint32
+  inherits:
+    - example.xyz.openbmc_project.Example.Device.Callout