Skip to content

Commit

Permalink
tests: remove passt for non network lanes
Browse files Browse the repository at this point in the history
passt API is now deprecated.
To get a VM with passt interface passt binding plugin should be used.
The plugin is deployed on sig-network only. Therefore, passt tests are
removed from sig-compute and sig-storage.

Signed-off-by: Alona Paz <[email protected]>
  • Loading branch information
AlonaKaplan committed Jan 11, 2024
1 parent 27cc2be commit 2da7a71
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
1 change: 0 additions & 1 deletion tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ go_test(
"//pkg/network/dns:go_default_library",
"//pkg/storage/backend-storage:go_default_library",
"//pkg/testutils:go_default_library",
"//pkg/util:go_default_library",
"//pkg/util/cluster:go_default_library",
"//pkg/util/hardware:go_default_library",
"//pkg/util/net/dns:go_default_library",
Expand Down
9 changes: 3 additions & 6 deletions tests/virtiofs/datavolume.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ var _ = Describe("[sig-storage] virtiofs", decorators.SigStorage, func() {
ExpectWithOffset(1, err).NotTo(HaveOccurred())
}

DescribeTable("[Serial] should be successfully started and accessible", Serial, func(namespace string, option1, option2 libvmi.Option) {
DescribeTable("[Serial] should be successfully started and accessible", Serial, func(namespace string) {
if namespace == testsuite.NamespacePrivileged {
tests.EnableFeatureGate(virtconfig.VirtIOFSGate)
} else {
Expand Down Expand Up @@ -112,7 +112,6 @@ var _ = Describe("[sig-storage] virtiofs", decorators.SigStorage, func() {
libvmi.WithFilesystemPVC(pvc1),
libvmi.WithFilesystemPVC(pvc2),
libvmi.WithNamespace(namespace),
option1, option2,
)

vmi = tests.RunVMIAndExpectLaunchIgnoreWarnings(vmi, 300)
Expand Down Expand Up @@ -145,10 +144,8 @@ var _ = Describe("[sig-storage] virtiofs", decorators.SigStorage, func() {
Expect(err).ToNot(HaveOccurred())
Expect(strings.Trim(podVirtioFsFileExist, "\n")).To(Equal("exist"))
},
Entry("(privileged virtiofsd)", testsuite.NamespacePrivileged, func(instance *virtv1.VirtualMachineInstance) {}, func(instance *virtv1.VirtualMachineInstance) {}),
Entry("with passt enabled (privileged virtiofsd)", testsuite.NamespacePrivileged, libvmi.WithPasstInterfaceWithPort(), libvmi.WithNetwork(v1.DefaultPodNetwork())),
Entry("(unprivileged virtiofsd)", util.NamespaceTestDefault, func(instance *virtv1.VirtualMachineInstance) {}, func(instance *virtv1.VirtualMachineInstance) {}),
Entry("with passt enabled (unprivileged virtiofsd)", util.NamespaceTestDefault, libvmi.WithPasstInterfaceWithPort(), libvmi.WithNetwork(v1.DefaultPodNetwork())),
Entry("(privileged virtiofsd)", testsuite.NamespacePrivileged),
Entry("(unprivileged virtiofsd)", util.NamespaceTestDefault),
)
})

Expand Down
21 changes: 5 additions & 16 deletions tests/vmi_configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ import (
"kubevirt.io/kubevirt/tests/framework/matcher"
. "kubevirt.io/kubevirt/tests/framework/matcher"

kvutil "kubevirt.io/kubevirt/pkg/util"
"kubevirt.io/kubevirt/tests/util"

v1 "kubevirt.io/api/core/v1"
Expand Down Expand Up @@ -1113,10 +1112,7 @@ var _ = Describe("[sig-compute]Configurations", decorators.SigCompute, func() {
hugepagesVmi = libvmi.NewCirros()
})

DescribeTable("should consume hugepages ", func(hugepageSize string, memory string, guestMemory string, option1, option2 libvmi.Option) {
if option1 != nil && option2 != nil {
hugepagesVmi = libvmi.NewCirros(option1, option2)
}
DescribeTable("should consume hugepages ", func(hugepageSize string, memory string, guestMemory string) {
hugepageType := kubev1.ResourceName(kubev1.ResourceHugePagesPrefix + hugepageSize)
v, err := cluster.GetKubernetesVersion()
Expect(err).ShouldNot(HaveOccurred())
Expand Down Expand Up @@ -1155,24 +1151,17 @@ var _ = Describe("[sig-compute]Configurations", decorators.SigCompute, func() {
hugepagesVmi.Spec.Domain.Memory.Guest = &guestMemReq
}

namespace := testsuite.GetTestNamespace(nil)
if kvutil.IsPasstVMI(&hugepagesVmi.Spec) {
namespace = testsuite.NamespacePrivileged
}

By("Starting a VM")
hugepagesVmi, err = virtClient.VirtualMachineInstance(namespace).Create(context.Background(), hugepagesVmi)
hugepagesVmi, err = virtClient.VirtualMachineInstance(testsuite.GetTestNamespace(nil)).Create(context.Background(), hugepagesVmi)
Expect(err).ToNot(HaveOccurred())
libwait.WaitForSuccessfulVMIStart(hugepagesVmi)

By("Checking that the VM memory equals to a number of consumed hugepages")
Eventually(func() bool { return verifyHugepagesConsumption() }, 30*time.Second, 5*time.Second).Should(BeTrue())
},
Entry("[Serial][test_id:1671]hugepages-2Mi", Serial, "2Mi", "64Mi", "None", nil, nil),
Entry("[Serial][test_id:1672]hugepages-1Gi", Serial, "1Gi", "1Gi", "None", nil, nil),
Entry("[Serial][test_id:1672]hugepages-2Mi with guest memory set explicitly", Serial, "2Mi", "70Mi", "64Mi", nil, nil),
Entry("[Serial]hugepages-2Mi with passt enabled", decorators.PasstGate, Serial, "2Mi", "64Mi", "None",
libvmi.WithPasstInterfaceWithPort(), libvmi.WithNetwork(v1.DefaultPodNetwork())),
Entry("[Serial][test_id:1671]hugepages-2Mi", Serial, "2Mi", "64Mi", "None"),
Entry("[Serial][test_id:1672]hugepages-1Gi", Serial, "1Gi", "1Gi", "None"),
Entry("[Serial][test_id:1672]hugepages-2Mi with guest memory set explicitly", Serial, "2Mi", "70Mi", "64Mi"),
)

Context("with unsupported page size", func() {
Expand Down

0 comments on commit 2da7a71

Please sign in to comment.