Skip to content

qdev release function cleanups + unit test

Chandan Somani qemu-arm qemu-devel 2 versions – Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 3 repliesApplied
  2. v11 patch 4 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5qdev: Free property array on releaseblock/accounting.c hw/core/qdev-properties.c hw/input/stellaris_gamepad.c +8 more+10 -710 replies
2/5qdev: make release_string() idempotenthw/core/qdev-properties.c+2 -10 replies
3/5qdev: make release_drive() idempotenthw/core/qdev-properties-system.c+1 -00 replies
4/5qdev: make release_tpm() idempotentbackends/tpm/tpm_util.c+1 -00 replies
5/5tests: add /qdev/free-properties testtests/unit/meson.build tests/unit/test-qdev.c+97 -00 replies

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchStefan BergerStefan Hajnoczi
SeriesR-b
1/5
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] qdev release function cleanups + unit test

Hello,
This was originally a single patch to make the property array release
function free the property array instead of having the users free it in their exit functions. This fixes leaks and reduces code overhead. After review, Marc-André asked to include some work he did on this earlier
(https://patchew.org/QEMU/[email protected]/).
I have included his patches that added unit testing and made some release functions idempotent.

Chandan Somani (1):
qdev: Free property array on release

Marc-André Lureau (4):
qdev: make release_string() idempotent
qdev: make release_drive() idempotent
qdev: make release_tpm() idempotent
tests: add /qdev/free-properties test

 backends/tpm/tpm_util.c           |  1 +
 block/accounting.c                |  1 -
 hw/core/qdev-properties-system.c  |  1 +
 hw/core/qdev-properties.c         | 24 ++++----
 hw/input/stellaris_gamepad.c      |  8 ---
 hw/intc/arm_gicv3_common.c        |  8 ---
 hw/intc/rx_icu.c                  |  8 ---
 hw/misc/arm_sysctl.c              |  2 -
 hw/misc/mps2-scc.c                |  8 ---
 hw/net/rocker/rocker.c            |  1 -
 hw/nvram/xlnx-efuse.c             |  8 ---
 hw/nvram/xlnx-versal-efuse-ctrl.c |  8 ---
 hw/virtio/virtio-iommu-pci.c      |  8 ---
 tests/unit/meson.build            |  1 +
 tests/unit/test-qdev.c            | 96 +++++++++++++++++++++++++++++++
 15 files changed, 111 insertions(+), 72 deletions(-)
 create mode 100644 tests/unit/test-qdev.c
Signature · 1 line
2.51.1