-
Notifications
You must be signed in to change notification settings - Fork 28
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
Conversation
ed0611e
to
fa0bc7e
Compare
/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"} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove space
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
srIovNetworkName ?
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove ?
There was a problem hiding this comment.
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(). |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just print??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
fa0bc7e
to
24f7e2c
Compare
24f7e2c
to
9c583e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
No description provided.