Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cnf network: fix-dpdk-test-case #76

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

gkopels
Copy link
Collaborator

@gkopels gkopels commented Jun 29, 2024

No description provided.

@gkopels gkopels force-pushed the fix-dpdk-test-cases branch 3 times, most recently from ed0611e to fa0bc7e Compare July 3, 2024 14:27
@mlguerrero12
Copy link
Collaborator

/lgtm

testCmdNet2 = []string{"bash", "-c", "sleep 5; testcmd -interface net2 -protocol tcp " +
"-port 4444 -listen"}
testCmdNet2Net3 = []string{"bash", "-c", "sleep 5; testcmd -interface net2 -protocol tcp " +
"-port 4444 -listen & testcmd -interface net3 -protocol tcp -port 4444 -listen"}
testCmdBond0 = []string{"bash", "-c", "sleep 5; testcmd -interface bond0.100 -protocol tcp " +
"-port 4444 -listen"}
tcpDumpNet1CMD = []string{"bash", "-c", "tcpdump -i net1 -e > /tmp/tcpdump"}
tcpDumpNet1CMD = []string{"bash", "-c", "tcpdump -i net1 -e > /tmp/tcpdump"}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove space

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@@ -712,6 +706,19 @@ func defineAndCreateSrIovNetworkWithQinQ(srIovNetwork, resName, vlanProtocol str
"Fail to pull NetworkAttachmentDefinition")
}

func defineAndCreateSrIovNetworkClientDPDK(srIovNetwork, resName string) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

srIovNetworkName ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to srIovNetworkName

func defineAndCreateSrIovNetworkClientDPDK(srIovNetwork, resName string) {
srIovNetworkObject, err := sriov.NewNetworkBuilder(
APIClient, srIovNetwork, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, resName).Create()
Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("Failed to create sriov network %s", err))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove fmt.Sprintf and err

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

@@ -814,6 +821,7 @@ func readAndValidateTCPDump(clientPod *pod.Builder, testCmd []string, pattern st
By("Start to capture traffic on the promiscuous client")

output, err := clientPod.ExecCommand(testCmd)
fmt.Println(output.String())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@@ -956,16 +966,15 @@ func defineAndCreateClientDPDKPod(
Expect(err).ToNot(HaveOccurred(), "Fail to define client dpdk container")

dpdkPod, err := pod.NewBuilder(APIClient, podName, tsparams.TestNamespaceName,
NetConfig.DpdkTestContainer).WithSecondaryNetwork(serverPodNetConfig).
NetConfig.DpdkTestContainer).WithSecondaryNetwork(serverPodNetConfig).WithPrivilegedFlag().
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need WithPrivilegedFlag() if you created corev1.SecurityContext?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

vlan, err := strconv.Atoi(NetConfig.VLAN)
Expect(err).ToNot(HaveOccurred(), "Failed to convert VLAN value")
testOutPutString = fmt.Sprintf("(ethertype 802\\.1Q \\(0x8100\\)).*?(vlan %d)", vlan)
fmt.Println(testOutPutString)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just print??

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Copy link
Collaborator

@evgenLevin evgenLevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Collaborator

@ajaggapa ajaggapa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@ajaggapa ajaggapa merged commit 0f500b7 into openshift-kni:main Jul 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants