diff --git a/scripts/ceph/start.sh b/scripts/ceph/start.sh index a55601f37..88a93563a 100755 --- a/scripts/ceph/start.sh +++ b/scripts/ceph/start.sh @@ -63,7 +63,7 @@ echo -e "\t[mon.a]" >> "$ceph_conf" echo -e "\tmon addr = ${mon_ip}:12046" >> "$ceph_conf" # create mon -rm -rf ${mon_dir}/* +rm -rf "${mon_dir:?}/"* mkdir -p ${mon_dir} mkdir -p ${pid_dir} rm -f /etc/ceph/ceph.client.admin.keyring diff --git a/scripts/check_format.sh b/scripts/check_format.sh index 71ae445d7..dc626c2b9 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -242,7 +242,7 @@ if hash shellcheck 2>/dev/null; then # This SHCK_EXCLUDE list is out "to do" and we work to fix all of this errors. SHCK_EXCLUDE="SC1083,SC2002,SC2004,\ SC2010,SC2012,SC2016,SC2034,SC2045,SC2046,SC2068,SC2086,SC2089,SC2090,\ -SC2097,SC2098,SC2115,SC2119,SC2120,SC2121,SC2124,SC2126,SC2128,\ +SC2097,SC2098,SC2119,SC2120,SC2121,SC2124,SC2126,SC2128,\ SC2129,SC2140,SC2142,SC2143,SC2148,SC2152,SC2153,SC2154,SC2155,\ SC2162,SC2164,SC2165,SC2166,SC2167,\ SC2230" diff --git a/test/vhost/migration/migration-tc3a.sh b/test/vhost/migration/migration-tc3a.sh index 8576096af..e45fd541c 100644 --- a/test/vhost/migration/migration-tc3a.sh +++ b/test/vhost/migration/migration-tc3a.sh @@ -100,7 +100,7 @@ function host1_start_nvmf() notice "Starting nvmf_tgt instance on local server" mkdir -p $nvmf_dir - rm -rf $nvmf_dir/* + rm -rf "${nvmf_dir:?}/"* trap 'host1_cleanup_nvmf SIGKILL; error_exit "${FUNCNAME}" "${LINENO}"' INT ERR EXIT $rootdir/app/nvmf_tgt/nvmf_tgt -s 512 -m 0xF -r $nvmf_dir/nvmf_rpc.sock --wait-for-rpc & diff --git a/test/vhost/readonly/delete_partition_vm.sh b/test/vhost/readonly/delete_partition_vm.sh index 0a68f2e75..01e230d0e 100755 --- a/test/vhost/readonly/delete_partition_vm.sh +++ b/test/vhost/readonly/delete_partition_vm.sh @@ -16,7 +16,7 @@ function error() trap - ERR set +e umount "$test_folder_name" - rm -rf "$testdir/$test_folder_name" + rm -rf "${testdir:?}/${test_folder_name:?}" exit 1 } @@ -37,7 +37,7 @@ mount /dev/$disk_name"1" $test_folder_name echo "INFO: Removing folder and unmounting $test_folder_name" umount "$test_folder_name" -rm -rf "$testdir/$test_folder_name" +rm -rf "${testdir:?}/${test_folder_name:?}" echo "INFO: Deleting partition" echo -e "d\n1\nw" | fdisk /dev/$disk_name diff --git a/test/vhost/readonly/disabled_readonly_vm.sh b/test/vhost/readonly/disabled_readonly_vm.sh index 57956aaf0..61c664be5 100755 --- a/test/vhost/readonly/disabled_readonly_vm.sh +++ b/test/vhost/readonly/disabled_readonly_vm.sh @@ -16,7 +16,7 @@ function error() trap - ERR set +e umount "$test_folder_name" - rm -rf "$testdir/$test_folder_name" + rm -rf "${testdir:?}/${test_folder_name:?}" exit 1 } @@ -45,4 +45,4 @@ mount /dev/$disk_name"1" $test_folder_name echo "INFO: Creating a test file $test_file_name" truncate -s "200M" $test_folder_name/$test_file_name umount "$test_folder_name" -rm -rf "$testdir/$test_folder_name" +rm -rf "${testdir:?}/${test_folder_name:?}" diff --git a/test/vhost/readonly/enabled_readonly_vm.sh b/test/vhost/readonly/enabled_readonly_vm.sh index b34b7d309..75369da66 100755 --- a/test/vhost/readonly/enabled_readonly_vm.sh +++ b/test/vhost/readonly/enabled_readonly_vm.sh @@ -14,7 +14,7 @@ function error() echo -e "ERROR: $*" echo "===========" umount "$test_folder_name" - rm -rf "$testdir/$test_folder_name" + rm -rf "${testdir:?}/${test_folder_name:?}" exit 1 } @@ -61,7 +61,7 @@ if ! rm $testdir/$test_file_name; then fi umount "$test_folder_name" -rm -rf "$testdir/$test_folder_name" +rm -rf "${testdir:?}/${test_folder_name:?}" echo "INFO: Trying to create file system on a readonly disk" if mkfs.ext4 -F /dev/$disk_name"1"; then error "Created file system on a readonly disk!"