public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
* [PATCH 0/2] tests/qtest/test-x86-cpuid-compat: fix leaks
@ 2026-03-08 18:54 Peter Maydell
  2026-03-08 18:54 ` [PATCH 1/2] tests/qtest/test-x86-cpuid-compat: Switch test_cpuid_prop to data-driven Peter Maydell
  2026-03-08 18:54 ` [PATCH 2/2] tests/qtest/test-x86-cpuid-compat: Switch test_feature_flag " Peter Maydell
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Maydell @ 2026-03-08 18:54 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Michael S. Tsirkin, Marcel Apfelbaum,
	Fabiano Rosas, Laurent Vivier

The test-x86-cpuid-compat has some leaks because it allocates
memory when setting up tests, and only frees it when the test
is actually run. This means that it leaks:
 * if the user asks to run only a particular test
 * if the user asks to list the tests with -l
 * when the subprocess tests re-invoke the test binary to
   run a single test in a subprocess

This patchset fixes this by deferring all allocations
to when the test is actually run, and instead passing
the test a pointer to a constant struct that has the
information it needs.

thanks
-- PMM

Peter Maydell (2):
  tests/qtest/test-x86-cpuid-compat: Switch test_cpuid_prop to
    data-driven
  tests/qtest/test-x86-cpuid-compat: Switch test_feature_flag to
    data-driven

 tests/qtest/test-x86-cpuid-compat.c | 430 ++++++++++++++++------------
 1 file changed, 245 insertions(+), 185 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-10 20:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-08 18:54 [PATCH 0/2] tests/qtest/test-x86-cpuid-compat: fix leaks Peter Maydell
2026-03-08 18:54 ` [PATCH 1/2] tests/qtest/test-x86-cpuid-compat: Switch test_cpuid_prop to data-driven Peter Maydell
2026-03-10 20:18   ` Fabiano Rosas
2026-03-08 18:54 ` [PATCH 2/2] tests/qtest/test-x86-cpuid-compat: Switch test_feature_flag " Peter Maydell
2026-03-10 20:18   ` Fabiano Rosas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox