This repository was archived by the owner on Jul 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
hcdiag/src/tests/chk-ib-pcispeed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,10 @@ check_return_flag_value $? 0 "Test Case 26: chk-os"
177177${HC_DIAG_PATH} /bin/hcdiag_run.py --test chk-temp --target ${COMPUTE_NODES} > ${TEMP_LOG} 2>&1
178178check_return_flag_value $? 0 " Test Case 27: chk-temp"
179179
180+ # Test Case 28: chk-ib-pcispeed
181+ ${HC_DIAG_PATH} /bin/hcdiag_run.py --test chk-ib-pcispeed --target ${COMPUTE_NODES} > ${TEMP_LOG} 2>&1
182+ check_return_flag_value $? 0 " Test Case 28: chk-ib-pcispeed"
183+
180184rm -f ${TEMP_LOG}
181185
182186# Clean up the scripts if exists (default configuration templates)
Original file line number Diff line number Diff line change 33#
44# hcdiag/src/tests/chk-ib-pcispeed/chk-ib-pcispeed.sh
55#
6- # © Copyright IBM Corporation 2015,2016 . All Rights Reserved
6+ # © Copyright IBM Corporation 2015-2022 . All Rights Reserved
77#
88# This program is licensed under the terms of the Eclipse Public License
99# v1.0 as published by the Eclipse Foundation and available at
@@ -45,8 +45,8 @@ count=0
4545err=0
4646for a in ` lspci | grep ${VENDOR} | awk ' {print $1}' ` ; do
4747 line=` sudo lspci -s $a -vv | grep " LnkSta:" `
48- speed=` echo ${line} | awk ' {print substr($3,1,length($3)-1)} ' `
49- width=` echo ${line} | awk ' {print substr($5,1,length($5)-1)} ' `
48+ speed=" $( echo " ${line} " | awk ' match($0, /Speed\s*([0-9]+GT\/s)/, a) {print a[1]} ' ) "
49+ width=" $( echo " ${line} " | awk ' match($0, /Width\s*(x[0-9]+)/, a) {print a[1]} ' ) "
5050 echo " Adapter: $a , $speed , $width ."
5151 if [ " $SPEED " != " $speed " ]; then
5252 echo " Error, expecting: $SPEED , got: $speed "
You can’t perform that action at this time.
0 commit comments