Skip to content

Commit 7de9305

Browse files
dgsudharsanyxieca
authored andcommitted
[generate dump]Added error message when saisdkdump fails (#2356)
- What I did Added error message when saisdkdump fails and cont to gather the rest. This is done to provide more readable information to the user when it cannot be avaialble (syncd for example is not running, during restart, etc). - How I did it Checked error code and print log - How to verify it Simulate saisdkdump error and verify the console output.
1 parent c5b0a6d commit 7de9305

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/generate_dump

+4
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,10 @@ collect_mellanox() {
885885
${CMD_PREFIX}docker exec syncd mkdir -p $sai_dump_folder
886886
${CMD_PREFIX}docker exec syncd saisdkdump -f $sai_dump_filename
887887

888+
if [ $? != 0 ]; then
889+
echo "Failed to collect saisdkdump."
890+
fi
891+
888892
copy_from_docker syncd $sai_dump_folder $sai_dump_folder
889893
echo "$sai_dump_folder"
890894
for file in `ls $sai_dump_folder`; do

0 commit comments

Comments
 (0)