File tree Expand file tree Collapse file tree 4 files changed +165
-0
lines changed
Expand file tree Collapse file tree 4 files changed +165
-0
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,15 @@ rootdir=$(readlink -f $testdir/../..)
55
66source $rootdir /test/common/autotest_common.sh
77
8+
9+ run_test " ocf_stress_create_remove" " $testdir /stress/stress-create-remove.sh"
10+ run_test " ocf_stress_load" " $testdir /stress/stress-load.sh"
11+ run_test " ocf_stress_get_stats" " $testdir /stress/stress-get-stats.sh"
12+
813run_test " ocf_fio_modes" " $testdir /integrity/fio-modes.sh"
914run_test " ocf_bdevperf_iotypes" " $testdir /integrity/bdevperf-iotypes.sh"
1015run_test " ocf_stats" " $testdir /integrity/stats.sh"
16+
1117run_test " ocf_create_destruct" " $testdir /management/create-destruct.sh"
1218run_test " ocf_multicore" " $testdir /management/multicore.sh"
1319run_test " ocf_persistent_metadata" " $testdir /management/persistent-metadata.sh"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ curdir=$( dirname $( readlink -f " ${BASH_SOURCE[0]} " ) )
4+ rootdir=$( readlink -f $curdir /../../..)
5+ source $rootdir /test/ocf/common.sh
6+ source $rootdir /scripts/common.sh
7+ source $rootdir /test/common/autotest_common.sh
8+ rpc_py=$rootdir /scripts/rpc.py
9+
10+ iterations=50
11+ cache_modes=(" wa" " wb" " wt" " pt" " wo" " wi" )
12+ RANDOM=$$ $( date +%s)
13+
14+ # Setup NVMe devices
15+ $rootdir /scripts/setup.sh
16+
17+ # Create NVMe config
18+ prepare_nvme_config
19+
20+ # Clear nvme device which we will use in test
21+ clear_nvme
22+
23+ # Start SPDK app
24+ start_spdk " $curdir /config"
25+
26+ # Create 2x256MiB partitions on NVMe device
27+ create_partitions Nvme0n1 2 256
28+
29+ # Test loop with creating and deleting CAS device
30+ for i in $( eval echo " {1..$iterations }" )
31+ do
32+ # Create CAS device
33+ random_cache_mode=${cache_modes[$RANDOM % ${#cache_modes[@]} ]}
34+ $rpc_py bdev_ocf_create cas_dev $random_cache_mode Nvme0n1p0 Nvme0n1p1 --create --force
35+
36+ # Check that CAS device was created properly
37+ $rpc_py bdev_ocf_get_bdevs | jq -r ' .[] .name' | grep -qw cas_dev
38+
39+ # Remove CAS device
40+ $rpc_py bdev_ocf_delete cas_dev
41+
42+ # Check that CAS device was deleted properly
43+ ! $rpc_py bdev_ocf_get_bdevs | jq -r ' .[] .name' | grep -qw cas_dev
44+ done
45+
46+ # Stop SPDK app and cleanup
47+ stop_spdk
48+
49+ clear_nvme $bdf
50+
51+ remove_config
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ curdir=$( dirname $( readlink -f " ${BASH_SOURCE[0]} " ) )
4+ rootdir=$( readlink -f $curdir /../../..)
5+ source $rootdir /test/ocf/common.sh
6+ source $rootdir /scripts/common.sh
7+ source $rootdir /test/common/autotest_common.sh
8+ rpc_py=$rootdir /scripts/rpc.py
9+ bdevperf=$rootdir /test/bdev/bdevperf/bdevperf
10+ iterations=50
11+
12+ # Setup NVMe devices
13+ $rootdir /scripts/setup.sh
14+
15+ # Create NVMe config
16+ prepare_nvme_config
17+
18+ # Clear nvme device which we will use in test
19+ clear_nvme
20+
21+ # Start SPDK app
22+ start_spdk " $curdir /config"
23+
24+ # Create 2x256MiB partitions on NVMe device
25+ create_partitions Nvme0n1 2 256
26+
27+ # Create CAS device
28+ $rpc_py bdev_ocf_create cas_dev wt Nvme0n1p0 Nvme0n1p1 --create --force
29+
30+ # Check that CAS device was created properly
31+ $rpc_py bdev_ocf_get_bdevs | jq -r ' .[] .name' | grep -qw cas_dev
32+
33+ save_and_clean_bdev_config
34+ stop_spdk
35+
36+ # Start I/O in background
37+ $bdevperf --json " $curdir /config" -q 128 -o 4096 -w write -t 360 -r /var/tmp/spdk.sock &
38+ bdev_perf_pid=$!
39+ waitforlisten $bdev_perf_pid
40+ sleep 1
41+
42+ # Test loop with getting CAS device statistics
43+ for i in $( eval echo " {1..$iterations }" )
44+ do
45+ get_stat_json cas_dev | jq
46+ sleep 1
47+ done
48+
49+ # Cleanup
50+ kill -9 $bdev_perf_pid
51+ wait $bdev_perf_pid || true
52+ clear_nvme $bdf
53+ remove_config
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ curdir=$( dirname $( readlink -f " ${BASH_SOURCE[0]} " ) )
4+ rootdir=$( readlink -f $curdir /../../..)
5+ source $rootdir /test/ocf/common.sh
6+ source $rootdir /scripts/common.sh
7+ source $rootdir /test/common/autotest_common.sh
8+ rpc_py=$rootdir /scripts/rpc.py
9+
10+ iterations=50
11+
12+ # Setup NVMe devices
13+ $rootdir /scripts/setup.sh
14+
15+ # Create NVMe config
16+ prepare_nvme_config
17+
18+ # Clear nvme device which we will use in test
19+ clear_nvme
20+
21+ # Start SPDK app
22+ start_spdk " $curdir /config"
23+
24+ # Create 2x256MiB partitions on NVMe device and save config
25+ create_partitions Nvme0n1 2 256
26+ save_and_clean_bdev_config
27+
28+ # Create CAS device
29+ $rpc_py bdev_ocf_create cas_dev wb Nvme0n1p0 Nvme0n1p1 --create --force
30+
31+ # Check that CAS device was created properly
32+ $rpc_py bdev_ocf_get_bdevs | jq -r ' .[] .name' | grep -qw cas_dev
33+
34+ # Stop SPDK app
35+ stop_spdk
36+
37+ # Test loop with loading CAS device
38+ for i in $( eval echo " {1..$iterations }" )
39+ do
40+ # Start SPDK app
41+ start_spdk " $curdir /config"
42+
43+ # Load CAS device
44+ $rpc_py bdev_ocf_create cas_dev wb Nvme0n1p0 Nvme0n1p1
45+
46+ # Check that CAS device was loaded properly
47+ $rpc_py bdev_ocf_get_bdevs | jq -r ' .[] .name' | grep -qw cas_dev
48+
49+ # Stop SPDK app
50+ stop_spdk
51+ done
52+
53+ # Cleanup
54+ clear_nvme $bdf
55+ remove_config
You can’t perform that action at this time.
0 commit comments