test/sma: add test for multiple bus support for NVMe/vfio_user plugin
Add test to cover issue where device couldn't be found on non-first attached bus. Signed-off-by: Artsiom Koltun <artsiom.koltun@intel.com> Change-Id: Ie876596c56a08a6f9b5c8b2283dfd6399fd8fffd Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14652 Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: <sebastian.brzezinka@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
01471e63bc
commit
25fb8de082
@ -113,7 +113,9 @@ mkdir -p "${VFO_ROOT_PATH}"
|
||||
used_vms=$vm_no
|
||||
vm_kill_all
|
||||
|
||||
vm_setup --os="$VM_IMAGE" --disk-type=virtio --force=$vm_no --qemu-args="-qmp tcp:localhost:10005,server,nowait -device pci-bridge,chassis_nr=1,id=pci.spdk.0"
|
||||
vm_setup --os="$VM_IMAGE" --disk-type=virtio --force=$vm_no --qemu-args="-qmp tcp:localhost:10005,server,nowait \
|
||||
-device pci-bridge,chassis_nr=1,id=pci.spdk.0 \
|
||||
-device pci-bridge,chassis_nr=2,id=pci.spdk.1"
|
||||
|
||||
# Run pre-configured VM and wait for them to start
|
||||
vm_run $vm_no
|
||||
@ -137,6 +139,8 @@ $rootdir/scripts/sma.py -c <(
|
||||
buses:
|
||||
- name: 'pci.spdk.0'
|
||||
count: 32
|
||||
- name: 'pci.spdk.1'
|
||||
count: 32
|
||||
qmp_addr: 127.0.0.1
|
||||
qmp_port: 10005
|
||||
crypto:
|
||||
@ -262,6 +266,14 @@ detach_volume "$device1" "$uuid0"
|
||||
delete_device "$device0"
|
||||
delete_device "$device1"
|
||||
|
||||
# Create device with allocation on second bus
|
||||
device3=$(create_device 42 0 | jq -r '.handle')
|
||||
vm_check_subsys_nqn $vm_no nqn.2016-06.io.spdk:vfiouser-42
|
||||
|
||||
# Verify that device can be found on second bus and properly deleted
|
||||
delete_device "$device3"
|
||||
NOT vm_check_subsys_nqn $vm_no nqn.2016-06.io.spdk:vfiouser-42
|
||||
|
||||
key0=1234567890abcdef1234567890abcdef
|
||||
device0=$(create_device 0 0 | jq -r '.handle')
|
||||
uuid0=$(rpc_cmd bdev_get_bdevs -b null0 | jq -r '.[].uuid')
|
||||
|
Loading…
Reference in New Issue
Block a user