Update log collection method scp for core dump

Changes:
   - Change the file ownership to user requested for
     log collection for user defined /tmp core dump
     files.

Tested:
   - Ran from sandbox.

Change-Id: Ib720ecef1e8c114a67bbeda2cfe0ce70d44984bc
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/openbmc_ffdc_methods.robot b/lib/openbmc_ffdc_methods.robot
index 0a3b1ea..360a3bb 100755
--- a/lib/openbmc_ffdc_methods.robot
+++ b/lib/openbmc_ffdc_methods.robot
@@ -531,6 +531,10 @@
     ...  ignore_err=${1}
     Run Keyword If  '${rc}' != '${0}'  Return From Keyword  ${ffdc_file_list}
 
+    # Core dumps if configured to dump on /tmp via /proc/sys/kernel/core_pattern
+    Run Keyword and Ignore Error
+    ...  BMC Execute Command  chown ${OPENBMC_USERNAME}:${OPENBMC_USERNAME} /tmp/core_*
+
     @{core_list}=  Split String  ${core_files}
     # Copy the core files
     Run Key U  Open Connection for SCP