2024-07-19 16:04:09 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2024-09-26 11:24:34 +02:00
|
|
|
|
|
|
|
. "fd.io/hs-test/infra"
|
2024-07-19 16:04:09 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
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)
|
|
|
|
}
|