blob: 0d8831d2bbcd7d113be3534e147e091d5781a8b4 [file] [log] [blame]
Matus Fabiane99d2662024-07-19 16:04:09 +02001package main
2
3import (
Matus Fabiane99d2662024-07-19 16:04:09 +02004 "fmt"
Adrian Villin5a4c7a92024-09-26 11:24:34 +02005
6 . "fd.io/hs-test/infra"
Matus Fabiane99d2662024-07-19 16:04:09 +02007)
8
9func init() {
10 RegisterNoTopoSoloTests(MemLeakTest)
11}
12
13func MemLeakTest(s *NoTopoSuite) {
14 s.SkipUnlessLeakCheck()
15 vpp := s.GetContainerByName("vpp").VppInstance
16 /* no goVPP less noise */
17 vpp.Disconnect()
18 vpp.EnableMemoryTrace()
19 traces1, err := vpp.GetMemoryTrace()
20 s.AssertNil(err, fmt.Sprint(err))
21 vpp.Vppctl("test mem-leak")
22 traces2, err := vpp.GetMemoryTrace()
23 s.AssertNil(err, fmt.Sprint(err))
24 vpp.MemLeakCheck(traces1, traces2)
25}