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