Skip to content

Commit

Permalink
idxd: fix coding style checking issue.
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Sun <[email protected]>
  • Loading branch information
ysun committed May 30, 2024
1 parent eb69414 commit 6c7634c
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions BM/dsa/dsa_user_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@
# Copyright (C) 2021 Intel Corporation
#
# Description: Call dsa_test to run dsa user test

source "$PWD/$DIRNAME/../common/common.sh"

set -x

DIRNAME=`dirname $0`
DSA_DIR=$PWD/$DIRNAME
CONFIG_DIR=$DSA_DIR/configs
DIRNAME=$(dirname "$0")
DSA_DIR="$PWD/$DIRNAME"
CONFIG_DIR="$DSA_DIR/configs"
ACCFG=/usr/bin/accel-config
TEST_DIR=/usr/libexec/accel-config/test
DSATEST=$TEST_DIR/dsa_test

source "$PWD/$DIRNAME/../common/common.sh"
############################# FUNCTIONS #######################################

# Global variables
Expand Down Expand Up @@ -172,12 +170,12 @@ disable_all() {
DSA_DEVICE_PATH="/sys/bus/dsa/devices"
fi
# Get available devices
for device_path in ${DSA_DEVICE_PATH}/${device_type}* ; do
for device_path in "${DSA_DEVICE_PATH}"/"${device_type}"* ; do
[[ $(echo "$device_path" | grep -c '!') -eq 0 ]] && {
# Get wqs and disable it if the status is enabled
for wqp in ${device_path}/wq* ; do
for wqp in "${device_path}"/wq* ; do
[[ $( cat "${wqp}"/state ) == "enabled" ]] && {
wq=${wqp##${DSA_DEVICE_PATH}/}
wq=${wqp##"${DSA_DEVICE_PATH}"/}
test_print_trc "info:disable wq $wq"
"$ACCFG" disable-wq "${wq}"
echo "-1" > "${wqp}"/group_id
Expand All @@ -189,7 +187,7 @@ disable_all() {
"$ACCFG" disable-device "${device_path##${DSA_DEVICE_PATH}/}"
}
# Remove group id of engine
for engine in ${device_path}/engine* ; do
for engine in "${device_path}"/engine* ; do
echo -1 > "$engine"/group_id
done
}
Expand Down Expand Up @@ -243,7 +241,7 @@ test_op_batch()
local wq_mode_name
local xfer_size

if [ $opcode == "0x2" ];then
if [ "$opcode" == "0x2" ];then
return 0
fi

Expand Down Expand Up @@ -374,5 +372,5 @@ while getopts :c:g:o:h arg; do
done

dsa_user_test
teardown_handler="dsa_user_teardown"
#teardown_handler="dsa_user_teardown"
exec_teardown

0 comments on commit 6c7634c

Please sign in to comment.