hs-test: fix LDPreloadIperfVppTest 72/40972/4
authorAdrian Villin <[email protected]>
Wed, 19 Jun 2024 10:20:00 +0000 (06:20 -0400)
committerFlorin Coras <[email protected]>
Wed, 19 Jun 2024 16:14:12 +0000 (16:14 +0000)
- fixed ldpreload path (debug build)

Type: test

Change-Id: Ib2ab58b32ffd87a78189464b599f7bbc4f05c175
Signed-off-by: Adrian Villin <[email protected]>
extras/hs-test/Makefile
extras/hs-test/hs_test.sh
extras/hs-test/infra/hst_suite.go
extras/hs-test/ldp_test.go

index c51f70b..596acb1 100644 (file)
@@ -126,7 +126,7 @@ test-debug: .deps.ok .build_debug.ok
        @# necessary so gmake won't skip executing the bash script
        @-bash ./hs_test.sh --persist=$(PERSIST) --verbose=$(VERBOSE) \
                --unconfigure=$(UNCONFIGURE) --debug=$(DEBUG) --test=$(TEST) --cpus=$(CPUS) \
-               --vppsrc=$(VPPSRC) --parallel=$(PARALLEL) --repeat=$(REPEAT)
+               --vppsrc=$(VPPSRC) --parallel=$(PARALLEL) --repeat=$(REPEAT) --debug_build=true
        @bash ./script/compress.sh
 
 .PHONY: test-cov
index 28df3e5..4914e60 100644 (file)
@@ -7,6 +7,7 @@ single_test=0
 persist_set=0
 unconfigure_set=0
 debug_set=0
+debug_build=
 ginkgo_args=
 
 for i in "$@"
@@ -26,6 +27,12 @@ case "${i}" in
             debug_set=1
         fi
         ;;
+    --debug_build=*)
+        debug_build="${i#*=}"
+        if [ "$debug_build" = "true" ]; then
+            args="$args -debug_build"
+        fi
+        ;;
     --verbose=*)
         verbose="${i#*=}"
         if [ "$verbose" = "true" ]; then
@@ -80,7 +87,7 @@ if [ $persist_set -eq 1 ] && [ $unconfigure_set -eq 1 ]; then
 fi
 
 if [ $single_test -eq 0 ] && [ $debug_set -eq 1 ]; then
-    echo "VPP debug flag is not supperted while running all tests!"
+    echo "VPP debug flag is not supported while running all tests!"
     exit 1
 fi
 
index 46aede7..a6ba146 100644 (file)
@@ -32,6 +32,7 @@ var IsUnconfiguring = flag.Bool("unconfigure", false, "remove topology")
 var IsVppDebug = flag.Bool("debug", false, "attach gdb to vpp")
 var NConfiguredCpus = flag.Int("cpus", 1, "number of CPUs assigned to vpp")
 var VppSourceFileDir = flag.String("vppsrc", "", "vpp source file directory")
+var IsDebugBuild = flag.Bool("debug_build", false, "some paths are different with debug build")
 var SuiteTimeout time.Duration
 
 type HstSuite struct {
index fc195f1..53043aa 100644 (file)
@@ -14,6 +14,7 @@ func init() {
 
 func LDPreloadIperfVppTest(s *VethsSuite) {
        var clnVclConf, srvVclConf Stanza
+       var ldpreload string
 
        serverContainer := s.GetContainerByName("server-vpp")
        serverVclFileName := serverContainer.GetHostWorkDir() + "/vcl_srv.conf"
@@ -21,7 +22,11 @@ func LDPreloadIperfVppTest(s *VethsSuite) {
        clientContainer := s.GetContainerByName("client-vpp")
        clientVclFileName := clientContainer.GetHostWorkDir() + "/vcl_cln.conf"
 
-       ldpreload := "LD_PRELOAD=../../build-root/build-vpp-native/vpp/lib/x86_64-linux-gnu/libvcl_ldpreload.so"
+       if *IsDebugBuild {
+               ldpreload = "LD_PRELOAD=../../build-root/build-vpp_debug-native/vpp/lib/x86_64-linux-gnu/libvcl_ldpreload.so"
+       } else {
+               ldpreload = "LD_PRELOAD=../../build-root/build-vpp-native/vpp/lib/x86_64-linux-gnu/libvcl_ldpreload.so"
+       }
 
        stopServerCh := make(chan struct{}, 1)
        srvCh := make(chan error, 1)