tests/qtest/test-x86-cpuid-compat: fix leaks
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | tests/qtest/test-x86-cpuid-compat: Switch test_cpuid_prop to data-driventests/ | +173 | 1 reply | |
| 2/2 | tests/qtest/test-x86-cpuid-compat: Switch test_feature_flag to data-driventests/ | +72 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Fabiano Rosas |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] tests/qtest/test-x86-cpuid-compat: fix leaks
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(-)
Signature · 1 line
2.43.0