qemu/tests
Cédric Le Goater 27c335a464 tests/qtest: Fix STM32L4x5 GPIO test on 32-bit
The test mangles the GPIO address and the pin number in the
qtest_add_data_func data parameter. Doing so, it assumes that the host
pointer size is always 64-bit, which breaks on 32-bit :

../tests/qtest/stm32l4x5_gpio-test.c: In function ‘test_gpio_output_mode’:
../tests/qtest/stm32l4x5_gpio-test.c:272:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  272 |     unsigned int pin = ((uint64_t)data) & 0xF;
      |                         ^
../tests/qtest/stm32l4x5_gpio-test.c:273:22: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  273 |     uint32_t gpio = ((uint64_t)data) >> 32;
      |                      ^

To fix, improve the mangling of the GPIO address and pin number fields
by using GPIO_SIZE so that the resulting value fits in a 32-bit pointer.
While at it, include some helpers to hide the details.

Cc: Arnaud Minier <arnaud.minier@telecom-paris.fr>
Cc: Inès Varhol <ines.varhol@telecom-paris.fr>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Message-id: 20240329092747.298259-1-clg@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2024-04-02 10:05:35 +01:00
..
avocado tests/avocado: ppc_hv_tests.py set alpine time before setup-alpine 2024-03-30 18:50:26 +10:00
bench meson: remove unused variable 2023-12-31 09:11:27 +01:00
data tests: acpi: update expected SSDT.dimmpxm blob 2024-03-18 08:42:46 -04:00
decode
docker .gitlab-ci.d: Drop cross-win32-system job 2024-02-23 08:13:52 +01:00
fp tests/fp: Bump fp-test-mulAdd test timeout to 3 minutes 2024-01-12 13:23:48 +00:00
guest-debug tests/tcg: Factor out gdbstub test functions 2024-01-29 20:48:49 +10:00
image-fuzzer
include
keys
lcitool .gitlab-ci.d: Drop cross-win32-system job 2024-02-23 08:13:52 +01:00
migration tests/qtest: option to suspend during migration 2024-01-04 09:52:42 +08:00
multiboot
perf/block/qcow2
plugin tests/plugin/bb: migrate to new per_vcpu API 2024-03-06 12:35:36 +00:00
qapi-schema qapi: Reject "Returns" section when command doesn't return anything 2024-03-04 07:12:40 +01:00
qemu-iotests iotests: add test for stream job with an unaligned prefetch read 2024-03-26 14:21:26 +01:00
qtest tests/qtest: Fix STM32L4x5 GPIO test on 32-bit 2024-04-02 10:05:35 +01:00
rocker
tcg tcg/optimize: Fix sign_mask for logical right-shift 2024-03-29 12:15:55 -10:00
tsan block: remove AioContext locking 2023-12-21 22:49:27 +01:00
uefi-test-tools
unit tests/unit/test-throttle: Avoid unintended integer division 2024-03-25 14:17:06 +00:00
vm tests/vm: ensure we build everything by default 2024-03-13 11:43:52 +00:00
vmstate-static-checker-data
dbus-vmstate-daemon.sh
Makefile.include tests: respect --enable/--disable-download for Avocado 2023-11-24 12:07:47 +01:00
meson.build configure, meson: rename targetos to host_os 2023-12-31 09:11:29 +01:00
test-qht-par.c
vhost-user-bridge.c