vpp/extras/hs-test/mem_leak_test.go
Adrian Villin 5a4c7a9ce4 hs-test: replaced gofmt with goimports
- goimports properly formats imports

Type: test

Change-Id: I78c162dd552fd3ee3d59955d7ea215af30601425
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-09-28 02:11:59 +00:00

26 lines
505 B
Go

package main
import (
"fmt"
. "fd.io/hs-test/infra"
)
func init() {
RegisterNoTopoSoloTests(MemLeakTest)
}
func MemLeakTest(s *NoTopoSuite) {
s.SkipUnlessLeakCheck()
vpp := s.GetContainerByName("vpp").VppInstance
/* no goVPP less noise */
vpp.Disconnect()
vpp.EnableMemoryTrace()
traces1, err := vpp.GetMemoryTrace()
s.AssertNil(err, fmt.Sprint(err))
vpp.Vppctl("test mem-leak")
traces2, err := vpp.GetMemoryTrace()
s.AssertNil(err, fmt.Sprint(err))
vpp.MemLeakCheck(traces1, traces2)
}