It cover following sr-iov negative test case:
[KVM_AUTOTEST][SR-IOV] RFE: Hotplug VF/PF with invalid addr value
[KVM_AUTOTEST][SR-IOV] Generate -1 VF from one PF
[KVM_AUTOTEST][SR-IOV] Hot add a VF with iommu turned off
[KVM_AUTOTEST][SR-IOV] Remove SR-IOV driver while VF is in use by guest
[KVM_AUTOTEST][SR-IOV] Assign a PCI device to qemu guest in -no-kvm mode
[KVM_AUTOTEST][SR-IOV] Assign multiple VFs to multiple guests
[KVM_AUTOTEST][SR-IOV] RFE: Generate more than Max VFs from one PF

Signed-off-by: Feng Yang <[email protected]>
---
 shared/cfg/subtests.cfg.sample |   42 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 41 insertions(+), 1 deletions(-)

diff --git a/shared/cfg/subtests.cfg.sample b/shared/cfg/subtests.cfg.sample
index abd51bc..4af09cd 100644
--- a/shared/cfg/subtests.cfg.sample
+++ b/shared/cfg/subtests.cfg.sample
@@ -3233,7 +3233,8 @@ variants:
             - vf_boot_vms:
                 type = boot
                 vms = 'vm1 vm2'
-                pci_assignable_nic1 = vf
+                nics = 'nic1 nic2'
+                pci_assignable = vf
                 image_snapshot = yes
             - vf_hotplug:
                 type = sr_iov_hotplug
@@ -3260,6 +3261,45 @@ variants:
                 pci_num = 2
                 repeat_times = 500
                 test_timeout = 10000
+            - sr_iov_negative:
+                host_setup_flag = 3
+                variants:
+                    - vf_iommu_off:
+                        start_vm = no
+                        negative_msg = "\'pci-assign\' could not be 
initialized"
+                        pci-assign_params = iommu
+                        iommu = 0
+                        type = sr_iov_boot_negative
+                    - no-kvm:
+                        pci_assignable = vf
+                        disable_kvm = yes
+                        enable_kvm = no
+                        start_vm = no
+                        type = sr_iov_boot_negative
+                        negative_msg = "requires KVM support"
+                    - hotplug_invaild_addr:
+                        pci_assignable = vf
+                        type = sr_iov_hotplug_negative
+                        modprobe_cmd = modprobe -r igb
+                        pci_addr = abc
+                        negative_msg = "Property 'pci-assign.addr' doesn't 
take value 'abc'"
+                    - hotplug_iommu_off:
+                        pci_assignable = vf
+                        type = sr_iov_hotplug_negative
+                        negative_msg = "Device 'pci-assign' could not be 
initialized"
+                        hotplug_params = iommu
+                        iommu = 0
+                    - more_than_max_vfs:
+                        driver_option = "max_vfs=8"
+                        type = boot
+                        pci_assignable = vf
+                        nics = "nic1 nic2 nic3 nic4 nic5 nic6 nic7 nic8"
+                        pci_assignable_nic1 = pf
+                        device_name_nic1 = eth1
+                    - negative_max_vfs:
+                        driver_option = "max_vfs=-1"
+                        type = sr_iov_boot_negative
+                        start_vm = no
 
     # system_powerdown, system_reset and shutdown *must* be the last ones
     # defined (in this order), since the effect of such tests can leave
-- 
1.7.1

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to