diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2021-01-20 17:44:31 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2021-01-20 17:44:31 +0000 |
| commit | 954b83f13236d21b4116b93a726ea36b5dc2d303 (patch) | |
| tree | 64dbca7f47cdd1c2d1ca1940b0f5307d8ca4d412 /tests/qtest/npcm7xx_pwm-test.c | |
| parent | 48202c712412c803ddb56365c7bca322aa4e7506 (diff) | |
| parent | 4251dfb082f6b81c382e69ccd2700fcfa7d7aa82 (diff) | |
| download | focaccia-qemu-954b83f13236d21b4116b93a726ea36b5dc2d303.tar.gz focaccia-qemu-954b83f13236d21b4116b93a726ea36b5dc2d303.zip | |
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2021-01-20' into staging
* Fixes for compiling QEMU on Alpine Linux * Add Alpine Linux to the gitlab-CI * Some small fixes for qtests * Updates to the MAINTAINERS file # gpg: Signature made Wed 20 Jan 2021 12:56:14 GMT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth-gitlab/tags/pull-request-2021-01-20: MAINTAINERS: Make status spellings consistent MAINTAINERS: Remove Ben Warren tests: Fix memory leak in tpm-util.c qtest/npcm7xx_pwm-test: Fix memleak in pwm_qom_get gitlab-ci: Add alpine to pipeline tests/check-block.sh: Refuse to run the iotests with BusyBox' sed tests/docker: Add dockerfile for Alpine Linux accel/kvm: avoid using predefined PAGE_SIZE tests: Rename PAGE_SIZE definitions elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE hw/block/nand: Rename PAGE_SIZE to NAND_PAGE_SIZE libvhost-user: Include poll.h instead of sys/poll.h configure: Add sys/timex.h to probe clock_adjtime osdep.h: Remove <sys/signal.h> include Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qtest/npcm7xx_pwm-test.c')
| -rw-r--r-- | tests/qtest/npcm7xx_pwm-test.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/qtest/npcm7xx_pwm-test.c b/tests/qtest/npcm7xx_pwm-test.c index 33fbdf5f54..63557d2c06 100644 --- a/tests/qtest/npcm7xx_pwm-test.c +++ b/tests/qtest/npcm7xx_pwm-test.c @@ -175,6 +175,7 @@ static int pwm_index(const PWM *pwm) static uint64_t pwm_qom_get(QTestState *qts, const char *path, const char *name) { QDict *response; + uint64_t val; g_test_message("Getting properties %s from %s", name, path); response = qtest_qmp(qts, "{ 'execute': 'qom-get'," @@ -182,7 +183,9 @@ static uint64_t pwm_qom_get(QTestState *qts, const char *path, const char *name) path, name); /* The qom set message returns successfully. */ g_assert_true(qdict_haskey(response, "return")); - return qnum_get_uint(qobject_to(QNum, qdict_get(response, "return"))); + val = qnum_get_uint(qobject_to(QNum, qdict_get(response, "return"))); + qobject_unref(response); + return val; } static uint64_t pwm_get_freq(QTestState *qts, int module_index, int pwm_index) |