Added test cases for BMC core dump.

Testcases added:
    - Verify core dump size.

Resolves openbmc/openbmc-test-automation#920

Change-Id: I6ad832463ed3e52aa9f16a171e1db3dad2e5d98e
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/lib/dump_utils.robot b/lib/dump_utils.robot
index 8607195..23bf0dd 100644
--- a/lib/dump_utils.robot
+++ b/lib/dump_utils.robot
@@ -1,6 +1,7 @@
 *** Settings ***
 Documentation  This module provides general keywords for dump.
 
+Library         bmc_ssh_utils.py
 
 *** Variables ***
 
@@ -109,3 +110,22 @@
     ${file_there}  ${stderr}  ${rc}=  BMC Execute Command
     ...  ${dump_check_cmd}/${dump_id}
     Should End With  ${file_there}  tar.xz  msg=BMC dump file not found.
+
+Get Dump Entries
+    [Documentation]  Return dump entries list.
+
+    ${dump_entries}=  Get URL List  ${DUMP_ENTRY_URI}
+    [Return]  ${dump_entries}
+
+
+Trigger Core Dump
+    [Documentation]  Trigger core dump.
+
+    # Find the pid of the active ipmid and kill it.
+    ${cmd_buf}=  Catenate  kill -s SEGV $(ps -ef | egrep ' ipmid$' |
+    ...  egrep -v grep | \ cut -c1-6)
+
+    ${cmd_output}  ${stderr}  ${rc}=  BMC Execute Command  ${cmd_buf}
+    Should Be Empty  ${stderr}  msg=BMC execute command error.
+    Should Be Equal As Integers  ${rc}  ${0}
+    ...  msg=BMC execute command return code is not zero.