1#!/usr/bin/env bash 2 3testdir=$(readlink -f $(dirname $0)) 4rootdir=$(readlink -f $testdir/../..) 5rpc_py=$rootdir/scripts/rpc.py 6 7set -- "--iso" "--transport=tcp" "$@" 8 9source $rootdir/test/common/autotest_common.sh 10source $rootdir/test/nvmf/common.sh 11 12HUGE_EVEN_ALLOC=yes HUGEMEM=1024 nvmftestinit 13 14function finish_test() { 15 { 16 "$rpc_py" bdev_lvol_delete_lvstore -l lvs0 17 kill -9 $rpc_proxy_pid 18 rm "$testdir/conf.json" 19 } || : 20} 21 22$rootdir/scripts/gen_nvme.sh --json-with-subsystems > $testdir/conf.json 23 24nvmfappstart -m 0x3 -p 0 -s 1024 --json $testdir/conf.json 25 26trap 'finish_test; process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1' SIGINT SIGTERM EXIT 27 28$rpc_py bdev_nvme_set_hotplug -e 29timing_enter run_rpc_proxy 30$rootdir/scripts/rpc_http_proxy.py 127.0.0.1 3333 secret secret & 31rpc_proxy_pid=$! 32timing_exit run_rpc_proxy 33 34timing_enter configure_spdk 35$rpc_py bdev_get_bdevs 36$rpc_py bdev_lvol_delete_lvstore -l lvs0 || true 37$rpc_py bdev_lvol_create_lvstore Nvme0n1 lvs0 38$rpc_py bdev_get_bdevs 39timing_exit configure_spdk 40 41timing_enter restart_cinder 42sudo systemctl restart devstack@* 43sleep 20 44timing_exit restart_cinder 45 46rxe_cfg status 47 48# Start testing spdk with openstack using tempest (openstack tool that allow testing an openstack functionalities) 49# In this tests is checked if spdk can correctly cooperate with openstack spdk driver 50timing_enter tempest_tests 51current_dir=$(pwd) 52cd /opt/stack/tempest 53tox -e all -- tempest.api.compute.volumes.test_attach_volume.AttachVolumeTestJSON.test_attach_detach_volume 54tox -e all -- tempest.api.compute.volumes.test_attach_volume.AttachVolumeTestJSON.test_list_get_volume_attachments 55tox -e all -- tempest.api.compute.volumes.test_volume_snapshots.VolumesSnapshotsTestJSON.test_volume_snapshot_create_get_list_delete 56tox -e all -- tempest.api.compute.volumes.test_volumes_get.VolumesGetTestJSON.test_volume_create_get_delete 57tox -e all -- tempest.api.compute.volumes.test_volumes_list.VolumesTestJSON.test_volume_list 58tox -e all -- tempest.api.volume.test_versions.VersionsTest.test_list_versions 59tox -e all -- tempest.api.volume.test_volumes_extend.VolumesExtendTest.test_volume_extend 60tox -e all -- tempest.api.volume.test_volumes_extend.VolumesExtendTest.test_volume_extend_when_volume_has_snapshot 61tox -e all -- tempest.api.volume.test_volumes_get.VolumesSummaryTest.test_show_volume_summary 62tox -e all -- tempest.api.volume.test_volumes_list.VolumesListTestJSON.test_volume_list 63tox -e all -- tempest.api.volume.test_volumes_snapshots.VolumesSnapshotTestJSON.test_snapshot_create_delete_with_volume_in_use 64tox -e all -- tempest.api.volume.test_volumes_snapshots.VolumesSnapshotTestJSON.test_snapshot_create_get_list_update_delete 65tox -e all -- tempest.api.volume.test_volumes_snapshots.VolumesSnapshotTestJSON.test_snapshot_create_offline_delete_online 66tox -e all -- tempest.api.volume.test_volumes_snapshots.VolumesSnapshotTestJSON.test_volume_from_snapshot 67tox -e all -- tempest.api.volume.test_volumes_snapshots.VolumesSnapshotTestJSON.test_volume_from_snapshot_no_size 68tox -e all -- tempest.api.volume.test_volumes_snapshots_list.VolumesSnapshotListTestJSON.test_snapshot_list_param_limit 69cd $current_dir 70timing_exit tempest_tests 71 72timing_enter test_cleanup 73finish_test 74 75trap - SIGINT SIGTERM EXIT 76nvmftestfini 77timing_exit test_cleanup 78