Matus Fabian | e99d266 | 2024-07-19 16:04:09 +0200 | [diff] [blame] | 1 | package main |
| 2 | |
| 3 | import ( |
| 4 | . "fd.io/hs-test/infra" |
| 5 | "fmt" |
| 6 | ) |
| 7 | |
| 8 | func init() { |
| 9 | RegisterNoTopoSoloTests(MemLeakTest) |
| 10 | } |
| 11 | |
| 12 | func 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 | } |