Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1022 from besawn/hcdiag_fix
Browse files Browse the repository at this point in the history
Fixed hcdiag chk-ib-pcispeed test for RHEL 8.4 #1017
  • Loading branch information
besawn authored Feb 17, 2022
2 parents 3d56e5b + d2af073 commit a5f3900
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions csmtest/buckets/basic/hcdiag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ check_return_flag_value $? 0 "Test Case 26: chk-os"
${HC_DIAG_PATH}/bin/hcdiag_run.py --test chk-temp --target ${COMPUTE_NODES} > ${TEMP_LOG} 2>&1
check_return_flag_value $? 0 "Test Case 27: chk-temp"

# Test Case 28: chk-ib-pcispeed
${HC_DIAG_PATH}/bin/hcdiag_run.py --test chk-ib-pcispeed --target ${COMPUTE_NODES} > ${TEMP_LOG} 2>&1
check_return_flag_value $? 0 "Test Case 28: chk-ib-pcispeed"

rm -f ${TEMP_LOG}

# Clean up the scripts if exists (default configuration templates)
Expand Down
6 changes: 3 additions & 3 deletions hcdiag/src/tests/chk-ib-pcispeed/chk-ib-pcispeed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# hcdiag/src/tests/chk-ib-pcispeed/chk-ib-pcispeed.sh
#
# © Copyright IBM Corporation 2015,2016. All Rights Reserved
# © Copyright IBM Corporation 2015-2022. All Rights Reserved
#
# This program is licensed under the terms of the Eclipse Public License
# v1.0 as published by the Eclipse Foundation and available at
Expand Down Expand Up @@ -45,8 +45,8 @@ count=0
err=0
for a in `lspci |grep ${VENDOR} | awk '{print $1}'`; do
line=`sudo lspci -s $a -vv | grep "LnkSta:"`
speed=`echo ${line} | awk '{print substr($3,1,length($3)-1)}'`
width=`echo ${line} | awk '{print substr($5,1,length($5)-1)}'`
speed="$(echo "${line}" | awk 'match($0, /Speed\s*([0-9]+GT\/s)/, a) {print a[1]}')"
width="$(echo "${line}" | awk 'match($0, /Width\s*(x[0-9]+)/, a) {print a[1]}')"
echo "Adapter: $a, $speed, $width."
if [ "$SPEED" != "$speed" ]; then
echo "Error, expecting: $SPEED, got: $speed"
Expand Down

0 comments on commit a5f3900

Please sign in to comment.