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

Fixed hcdiag chk-ib-pcispeed test for RHEL 8.4 #1017 #1022

Merged
merged 2 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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