diff --git a/test/vhost/fiotest/fio.sh b/test/vhost/fiotest/fio.sh index a395ae0c5..bdd992473 100755 --- a/test/vhost/fiotest/fio.sh +++ b/test/vhost/fiotest/fio.sh @@ -119,7 +119,7 @@ rpc_py="$rootdir/scripts/rpc.py -s $(get_vhost_dir 0)/rpc.sock" for vm_conf in "${vms[@]}"; do IFS=',' read -ra conf <<< "$vm_conf" - if [[ x"${conf[0]}" == x"" ]] || ! assert_number ${conf[0]}; then + if [[ -z ${conf[0]} ]] || ! assert_number ${conf[0]}; then fail "invalid VM configuration syntax $vm_conf" fi diff --git a/test/vhost/hotplug/common.sh b/test/vhost/hotplug/common.sh index f89b601b4..edf22fae4 100644 --- a/test/vhost/hotplug/common.sh +++ b/test/vhost/hotplug/common.sh @@ -88,7 +88,7 @@ function print_test_fio_header() { function vms_setup() { for vm_conf in "${vms[@]}"; do IFS=',' read -ra conf <<< "$vm_conf" - if [[ x"${conf[0]}" == x"" ]] || ! assert_number ${conf[0]}; then + if [[ -z ${conf[0]} ]] || ! assert_number ${conf[0]}; then fail "invalid VM configuration syntax $vm_conf" fi