diff --git a/test/json_config/json_config.sh b/test/json_config/json_config.sh index e51910cb7..e269fc50e 100755 --- a/test/json_config/json_config.sh +++ b/test/json_config/json_config.sh @@ -45,12 +45,11 @@ function tgt_check_notification_types() { timing_enter "${FUNCNAME[0]}" local ret=0 - local enabled_types="bdev_register - bdev_unregister " + local enabled_types=("bdev_register" "bdev_unregister") - get_types=$(tgt_rpc notify_get_types | jq -r '.[]') - if [ $enabled_types != $get_types ]; then - echo "ERROR: expected types:" $enabled_types ", but got:" $get_types + local get_types=($(tgt_rpc notify_get_types | jq -r '.[]')) + if [[ ${enabled_types[*]} != "${get_types[*]}" ]]; then + echo "ERROR: expected types: ${enabled_types[*]}, but got: ${get_types[*]}" ret=1 fi