
add infra for memory leak testing Type: test Change-Id: I882e8dbb360597cdb82ad52682725f7d39b2df24 Signed-off-by: Matus Fabian <matfabia@cisco.com>
25 lines
504 B
Go
25 lines
504 B
Go
package main
|
|
|
|
import (
|
|
. "fd.io/hs-test/infra"
|
|
"fmt"
|
|
)
|
|
|
|
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)
|
|
}
|