hs-test: memleak tests fixes & json raport generation 31/43431/5
authorSemir Sionek <[email protected]>
Thu, 10 Jul 2025 13:28:04 +0000 (09:28 -0400)
committerFlorin Coras <[email protected]>
Mon, 14 Jul 2025 22:43:03 +0000 (22:43 +0000)
Type: improvement
Change-Id: Ie2c18224d7073dd4821cb7716eb124f26dbe44ec
Signed-off-by: Semir Sionek <[email protected]>
extras/hs-test/Makefile
extras/hs-test/hs_test.sh
extras/hs-test/http1_test.go

index 643cf52..39c5f08 100644 (file)
@@ -189,6 +189,7 @@ test-cov: .deps.ok .build.cov.ok wipe-lcov
        $(MAKE) -C ../.. test-cov-post-standalone HS_TEST=1
 
 .PHONY: test-leak
+test-leak: FORCE_BUILD=false
 test-leak: .deps.ok .build_debug.ok
        @bash ./hs_test.sh --test=$(TEST) --debug_build=true --leak_check=true --vppsrc=$(VPPSRC) --timeout=$(TIMEOUT) \
        --ginkgo_timeout=$(GINKGO_TIMEOUT) --vpp_cpus=$(VPP_CPUS);
index 0337489..a6c70a2 100644 (file)
@@ -172,12 +172,14 @@ args="$args -sudo_user $sudo_user"
 
 if [ $leak_check_set -eq 1 ]; then
   if [ $focused_test -eq 0 ]; then
-    echo -e "\e[1;31ma single test has to be specified when leak_check is set\e[1;0m"
+    echo -e "\e[1;31ma single test has to be specified via TEST var when leak_check is set\e[1;0m"
     exit 2
+  else
+    if [[ $tc_list != *"MemLeak"* ]]; then
+        echo -e "\e[1;31ma none of the selected tests are memleak tests\e[1;0m"
+        exit 2
+    fi
   fi
-  ginkgo_args="--focus ${tc_names[0]}"
-  sudo -E go run github.com/onsi/ginkgo/v2/ginkgo $ginkgo_args -- $args
-  exit 0
 fi
 
 if [ -n "${BUILD_NUMBER}" ]; then
index 6bc5c98..b806826 100644 (file)
@@ -1016,7 +1016,7 @@ func HttpInvalidClientRequestMemLeakTest(s *Http1Suite) {
        /* no goVPP less noise */
        vpp.Disconnect()
 
-       vpp.Vppctl("http cli server")
+       vpp.Vppctl("http cli server uri http://" + serverAddress)
 
        /* warmup request (FIB) */
        _, err := TcpSendReceive(serverAddress, "GET / HTTP/1.1\r\n")