diff --git a/test/ocf/integrity/fio-modes.sh b/test/ocf/integrity/fio-modes.sh index b3801d33c53..cf9aa42f257 100755 --- a/test/ocf/integrity/fio-modes.sh +++ b/test/ocf/integrity/fio-modes.sh @@ -60,7 +60,9 @@ for ((d = 0, c = 1; d <= ${#ocf_names[@]} + 2; d += 2, c++)); do "name": "${ocf_names[c]}", "mode": "${ocf_modes[c]}", "cache_bdev_name": "Nvme0n1p$d", - "core_bdev_name": "Nvme0n1p$((d + 1))" + "core_bdev_name": "Nvme0n1p$((d + 1))", + "create": true, + "force": true } } JSON diff --git a/test/ocf/integrity/mallocs.conf b/test/ocf/integrity/mallocs.conf index 245dd23cf7f..60a2c955558 100644 --- a/test/ocf/integrity/mallocs.conf +++ b/test/ocf/integrity/mallocs.conf @@ -36,7 +36,9 @@ gen_malloc_ocf_json () { "name": "MalCache$ocf", "mode": "${ocf_mode[ocf]}", "cache_bdev_name": "${ocf_cache[ocf]}", - "core_bdev_name": "${ocf_core[ocf]}" + "core_bdev_name": "${ocf_core[ocf]}", + "create": true, + "force": true } } JSON diff --git a/test/ocf/management/configuration-change.sh b/test/ocf/management/configuration-change.sh index faccebc9db9..4d68fdcc4b0 100755 --- a/test/ocf/management/configuration-change.sh +++ b/test/ocf/management/configuration-change.sh @@ -17,7 +17,7 @@ waitforlisten $spdk_pid for cache_line_size in "${cache_line_sizes[@]}"; do $rpc_py bdev_malloc_create 101 512 -b Malloc0 $rpc_py bdev_malloc_create 101 512 -b Malloc1 - $rpc_py bdev_ocf_create Cache0 wt Malloc0 Malloc1 --cache-line-size $cache_line_size + $rpc_py bdev_ocf_create Cache0 wt Malloc0 Malloc1 --cache-line-size $cache_line_size --create --force $rpc_py bdev_ocf_get_bdevs | jq -e \ '.[0] | .started and .cache.attached and .core.attached' @@ -36,7 +36,7 @@ done # Prepare OCF cache for dynamic configuration switching $rpc_py bdev_malloc_create 101 512 -b Malloc0 $rpc_py bdev_malloc_create 101 512 -b Malloc1 -$rpc_py bdev_ocf_create Cache0 wt Malloc0 Malloc1 +$rpc_py bdev_ocf_create Cache0 wt Malloc0 Malloc1 --create --force $rpc_py bdev_ocf_get_bdevs | jq -e \ '.[0] | .started and .cache.attached and .core.attached' diff --git a/test/ocf/management/create-destruct.sh b/test/ocf/management/create-destruct.sh index 162f7a67926..78dc6b11708 100755 --- a/test/ocf/management/create-destruct.sh +++ b/test/ocf/management/create-destruct.sh @@ -24,7 +24,7 @@ waitforlisten $spdk_pid $rpc_py bdev_malloc_create 101 512 -b Malloc0 $rpc_py bdev_malloc_create 101 512 -b Malloc1 -$rpc_py bdev_ocf_create PartCache wt Malloc0 NonExisting +$rpc_py bdev_ocf_create PartCache wt Malloc0 NonExisting --create --force $rpc_py bdev_ocf_get_bdevs PartCache | jq -e \ '.[0] | .started == false and .cache.attached and .core.attached == false' @@ -43,7 +43,7 @@ if bdev_check_claimed Malloc0; then exit 1 fi -$rpc_py bdev_ocf_create FullCache wt Malloc0 Malloc1 +$rpc_py bdev_ocf_create FullCache wt Malloc0 Malloc1 --create --force $rpc_py bdev_ocf_get_bdevs FullCache | jq -e \ '.[0] | .started and .cache.attached and .core.attached' @@ -59,7 +59,7 @@ if bdev_check_claimed Malloc0 && bdev_check_claimed Malloc1; then exit 1 fi -$rpc_py bdev_ocf_create HotCache wt Malloc0 Malloc1 +$rpc_py bdev_ocf_create HotCache wt Malloc0 Malloc1 --create --force if ! (bdev_check_claimed Malloc0 && bdev_check_claimed Malloc1); then echo >&2 "Base devices expected to be claimed now" @@ -81,7 +81,7 @@ if [[ $gone == false ]]; then fi # check if shutdown of running CAS bdev is ok -$rpc_py bdev_ocf_create PartCache wt NonExisting Malloc1 +$rpc_py bdev_ocf_create PartCache wt NonExisting Malloc1 --create --force trap - SIGINT SIGTERM EXIT diff --git a/test/ocf/management/multicore.sh b/test/ocf/management/multicore.sh index 8c4f89e1bdb..f1634d331b1 100755 --- a/test/ocf/management/multicore.sh +++ b/test/ocf/management/multicore.sh @@ -25,8 +25,8 @@ start_spdk $rpc_py bdev_malloc_create 1 512 -b Core0 $rpc_py bdev_malloc_create 1 512 -b Core1 -$rpc_py bdev_ocf_create C1 wt Cache Core0 -$rpc_py bdev_ocf_create C2 wt Cache Core1 +$rpc_py bdev_ocf_create C1 wt Cache Core0 --create --force +$rpc_py bdev_ocf_create C2 wt Cache Core1 --create --force $rpc_py bdev_ocf_get_bdevs | jq -e \ 'any(select(.started)) == false' @@ -46,7 +46,7 @@ $rpc_py bdev_ocf_delete C2 $rpc_py bdev_ocf_get_bdevs C1 | jq -e \ '.[0] | .started' -$rpc_py bdev_ocf_create C2 wt Cache Core1 +$rpc_py bdev_ocf_create C2 wt Cache Core1 --create --force $rpc_py bdev_ocf_get_bdevs C2 | jq -e \ '.[0] | .started' @@ -62,8 +62,8 @@ $rpc_py bdev_malloc_create 101 512 -b Cache $rpc_py bdev_malloc_create 101 512 -b Malloc $rpc_py bdev_malloc_create 1 512 -b Core -$rpc_py bdev_ocf_create C1 wt Cache Malloc -$rpc_py bdev_ocf_create C2 wt Cache Core +$rpc_py bdev_ocf_create C1 wt Cache Malloc --create --force +$rpc_py bdev_ocf_create C2 wt Cache Core --create --force $rpc_py bdev_ocf_get_bdevs Cache | jq \ 'length == 2' @@ -75,8 +75,8 @@ $rpc_py bdev_ocf_get_bdevs | jq -e \ # Not fully initialized shutdown -$rpc_py bdev_ocf_create C1 wt Malloc NonExisting -$rpc_py bdev_ocf_create C2 wt Malloc NonExisting -$rpc_py bdev_ocf_create C3 wt Malloc Core +$rpc_py bdev_ocf_create C1 wt Malloc NonExisting --create --force +$rpc_py bdev_ocf_create C2 wt Malloc NonExisting --create --force +$rpc_py bdev_ocf_create C3 wt Malloc Core --create --force stop_spdk diff --git a/test/ocf/management/persistent-metadata.sh b/test/ocf/management/persistent-metadata.sh index 6cecc9739fb..64cd0aa5bfa 100755 --- a/test/ocf/management/persistent-metadata.sh +++ b/test/ocf/management/persistent-metadata.sh @@ -52,10 +52,12 @@ waitforlisten $spdk_pid # Create ocf on persistent storage -$rpc_py bdev_ocf_create ocfWT wt Nvme0n1p0 Nvme0n1p1 -$rpc_py bdev_ocf_create ocfPT pt Nvme0n1p2 Nvme0n1p3 -$rpc_py bdev_ocf_create ocfWB0 wb Nvme0n1p4 Nvme0n1p5 -$rpc_py bdev_ocf_create ocfWB1 wb Nvme0n1p4 Nvme0n1p6 +$rpc_py bdev_ocf_create ocfWT wt Nvme0n1p0 Nvme0n1p1 --create --force +$rpc_py bdev_ocf_create ocfPT pt Nvme0n1p2 Nvme0n1p3 --create --force +$rpc_py bdev_ocf_create ocfWB0 wb Nvme0n1p4 Nvme0n1p5 --create --force +$rpc_py bdev_ocf_create ocfWB1 wb Nvme0n1p4 Nvme0n1p6 --create --force + +$rpc_py save_config > "$curdir/config" # Sorting bdevs because we dont guarantee that they are going to be # in the same order after shutdown