diff options
Diffstat (limited to 'extras/hs-test/ldp_test.go')
-rw-r--r-- | extras/hs-test/ldp_test.go | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/extras/hs-test/ldp_test.go b/extras/hs-test/ldp_test.go index cbba227c328..17f78ca4db3 100644 --- a/extras/hs-test/ldp_test.go +++ b/extras/hs-test/ldp_test.go @@ -3,17 +3,16 @@ package main import ( "fmt" "os" - "time" ) func (s *VethsSuite) TestLDPreloadIperfVpp() { var clnVclConf, srvVclConf Stanza serverContainer := s.getContainerByName("server-vpp") - srvVcl := serverContainer.GetHostWorkDir() + "/vcl_srv.conf" + serverVclFileName := serverContainer.GetHostWorkDir() + "/vcl_srv.conf" clientContainer := s.getContainerByName("client-vpp") - clnVcl := clientContainer.GetHostWorkDir() + "/vcl_cln.conf" + clientVclFileName := clientContainer.GetHostWorkDir() + "/vcl_cln.conf" ldpreload := os.Getenv("HST_LDPRELOAD") s.assertNotEqual("", ldpreload) @@ -26,15 +25,9 @@ func (s *VethsSuite) TestLDPreloadIperfVpp() { s.log("starting VPPs") - _, err := serverContainer.execAction("Configure2Veths srv") - s.assertNil(err) - - _, err = clientContainer.execAction("Configure2Veths cln") - s.assertNil(err) - clientAppSocketApi := fmt.Sprintf("app-socket-api %s/var/run/app_ns_sockets/2", clientContainer.GetContainerWorkDir()) - err = clnVclConf. + err := clnVclConf. NewStanza("vcl"). Append("rx-fifo-size 4000000"). Append("tx-fifo-size 4000000"). @@ -42,7 +35,7 @@ func (s *VethsSuite) TestLDPreloadIperfVpp() { Append("app-scope-global"). Append("use-mq-eventfd"). Append(clientAppSocketApi).Close(). - SaveToFile(clnVcl) + SaveToFile(clientVclFileName) s.assertNil(err) serverAppSocketApi := fmt.Sprintf("app-socket-api %s/var/run/app_ns_sockets/1", @@ -55,15 +48,12 @@ func (s *VethsSuite) TestLDPreloadIperfVpp() { Append("app-scope-global"). Append("use-mq-eventfd"). Append(serverAppSocketApi).Close(). - SaveToFile(srvVcl) + SaveToFile(serverVclFileName) s.assertNil(err) s.log("attaching server to vpp") - // FIXME - time.Sleep(5 * time.Second) - - srvEnv := append(os.Environ(), ldpreload, "VCL_CONFIG="+srvVcl) + srvEnv := append(os.Environ(), ldpreload, "VCL_CONFIG="+serverVclFileName) go StartServerApp(srvCh, stopServerCh, srvEnv) err = <-srvCh @@ -71,8 +61,9 @@ func (s *VethsSuite) TestLDPreloadIperfVpp() { s.log("attaching client to vpp") var clnRes = make(chan string, 1) - clnEnv := append(os.Environ(), ldpreload, "VCL_CONFIG="+clnVcl) - go StartClientApp(clnEnv, clnCh, clnRes) + clnEnv := append(os.Environ(), ldpreload, "VCL_CONFIG="+clientVclFileName) + serverVethAddress := s.netInterfaces[serverInterfaceName].Ip4AddressString() + go StartClientApp(serverVethAddress, clnEnv, clnCh, clnRes) s.log(<-clnRes) // wait for client's result |