#
00dc9a59 |
| 23-Feb-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
tests/qtest/e1000e-test: Fabricate ethernet header
e1000e understands ethernet header so fabricate something convincing.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Thomas
tests/qtest/e1000e-test: Fabricate ethernet header
e1000e understands ethernet header so fabricate something convincing.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
da994bac |
| 14-Jan-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
tests/qtest/e1000e-test: Fix the code style
igb implementation first starts off by copying e1000e code. Correct the code style before that.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> R
tests/qtest/e1000e-test: Fix the code style
igb implementation first starts off by copying e1000e code. Correct the code style before that.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230114035919.35251-19-akihiko.odaki@daynix.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
f2ae2fab |
| 10-Nov-2022 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
tests/qtest/e1000e-test: De-duplicate constants
De-duplicate constants found in e1000e_send_verify() and e1000e_receive_verify() to avoid mismatch and improve readability.
Signed-off-by: Akihiko Od
tests/qtest/e1000e-test: De-duplicate constants
De-duplicate constants found in e1000e_send_verify() and e1000e_receive_verify() to avoid mismatch and improve readability.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-Id: <20221110114426.65951-1-akihiko.odaki@daynix.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
dfa644b2 |
| 03-Nov-2022 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
tests/qtest/e1000e-test: Use e1000_regs.h
The register definitions in tests/qtest/e1000e-test.c had names different from hw/net/e1000_regs.h, which made it hard to understand what test codes corresp
tests/qtest/e1000e-test: Use e1000_regs.h
The register definitions in tests/qtest/e1000e-test.c had names different from hw/net/e1000_regs.h, which made it hard to understand what test codes corresponds to the implementation. Use hw/net/e1000_regs.h from tests/qtest/libqos/e1000e.c to remove these duplications.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-Id: <20221103095416.110162-1-akihiko.odaki@daynix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
b243c73c |
| 24-Aug-2022 |
Xuzhou Cheng <xuzhou.cheng@windriver.com> |
tests/qtest: libqos: Rename malloc.h to libqos-malloc.h
The qtest/libqos directory is included via the "-I" option to search for header files when building qtest. Unfortunately the malloc.h has a na
tests/qtest: libqos: Rename malloc.h to libqos-malloc.h
The qtest/libqos directory is included via the "-I" option to search for header files when building qtest. Unfortunately the malloc.h has a name conflict with the standard libc header, leading to a build failure on the Windows host, due to the MinGW libc stdlib.h header file includes malloc.h and it now gets wrongly pointed to the one in the qtest/libqos directory.
Rename "qtest/libqos/malloc.h" to "qtest/libqos/libqos-malloc.h" to avoid the namespace pollution.
Signed-off-by: Xuzhou Cheng <xuzhou.cheng@windriver.com> Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220824094029.1634519-26-bmeng.cn@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
02ee7a8a |
| 04-May-2022 |
Eric Auger <eric.auger@redhat.com> |
tests/qtest/libqos: Skip hotplug tests if pci root bus is not hotpluggable
ARM does not not support hotplug on pcie.0. Add a flag on the bus which tells if devices can be hotplugged and skip hotplug
tests/qtest/libqos: Skip hotplug tests if pci root bus is not hotpluggable
ARM does not not support hotplug on pcie.0. Add a flag on the bus which tells if devices can be hotplugged and skip hotplug tests if the bus cannot be hotplugged. This is a temporary solution to enable the other pci tests on aarch64.
Signed-off-by: Eric Auger <eric.auger@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220504152025.1785704-3-eric.auger@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
0f9668e0 |
| 23-Mar-2022 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
Remove qemu-common.h include from most units
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220323155743.1585078-33-marcandre.lureau@redhat.com> Signed-off-by: Paolo B
Remove qemu-common.h include from most units
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220323155743.1585078-33-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
e7b79428 |
| 18-Feb-2022 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
Drop qemu_foo() socket API wrapper
The socket API wrappers were initially introduced in commit 00aa0040 ("Wrap recv to avoid warnings"), but made redundant with commit a2d96af4 ("osdep: add wrappers
Drop qemu_foo() socket API wrapper
The socket API wrappers were initially introduced in commit 00aa0040 ("Wrap recv to avoid warnings"), but made redundant with commit a2d96af4 ("osdep: add wrappers for socket functions") which fixes the win32 declarations and thus removed the earlier warnings.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
show more ...
|
#
380822ed |
| 25-May-2021 |
Peter Maydell <peter.maydell@linaro.org> |
tests/qtest/e1000e-test: Check qemu_recv() succeeded
The e1000e_send_verify() test calls qemu_recv() but doesn't check that the call succeeded, which annoys Coverity. Add an explicit test check for
tests/qtest/e1000e-test: Check qemu_recv() succeeded
The e1000e_send_verify() test calls qemu_recv() but doesn't check that the call succeeded, which annoys Coverity. Add an explicit test check for the length of the data.
(This is a test check, not a "we assume this syscall always succeeds", so we use g_assert_cmpint() rather than g_assert().)
Fixes: Coverity CID 1432324 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Message-id: 20210525134458.6675-3-peter.maydell@linaro.org
show more ...
|
#
dc0ad02d |
| 05-Jun-2020 |
Thomas Huth <thuth@redhat.com> |
tests/qtest: Fix LGPL information in the file headers
It's either "GNU *Library* General Public License version 2" or "GNU Lesser General Public License version *2.1*", but there was no "version 2.0
tests/qtest: Fix LGPL information in the file headers
It's either "GNU *Library* General Public License version 2" or "GNU Lesser General Public License version *2.1*", but there was no "version 2.0" of the "Lesser" license. So assume that version 2.1 is meant here.
Message-Id: <20200605100645.6506-1-thuth@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
1e8a1fae |
| 09-Sep-2019 |
Thomas Huth <thuth@redhat.com> |
test: Move qtests to a separate directory
The tests directory itself is pretty overcrowded, and it's hard to see which test belongs to which test subsystem (unit, qtest, ...). Let's move the qtests
test: Move qtests to a separate directory
The tests directory itself is pretty overcrowded, and it's hard to see which test belongs to which test subsystem (unit, qtest, ...). Let's move the qtests to a separate folder for more clarity.
Message-Id: <20191218103059.11729-6-thuth@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
dd210749 |
| 03-Sep-2019 |
Thomas Huth <thuth@redhat.com> |
tests/libqtest: Use libqtest-single.h in tests that require global_qtest
Tests that require global_qtest or the related wrapper functions now use the libqtest-single.h header that is dedicated for e
tests/libqtest: Use libqtest-single.h in tests that require global_qtest
Tests that require global_qtest or the related wrapper functions now use the libqtest-single.h header that is dedicated for everything related to global_qtest. The core libqtest.c and libqtest.h files are now completely indepedent from global_qtest, so that the core library is now not depending on a global state anymore.
Message-Id: <20190904130047.25808-7-thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
e5758de4 |
| 22-Jul-2019 |
Thomas Huth <thuth@redhat.com> |
tests/libqtest: Make qtest_qmp_device_add/del independent from global_qtest
Generic library functions like qtest_qmp_device_add() and _del() should not depend on the global_qtest variable. Pass the
tests/libqtest: Make qtest_qmp_device_add/del independent from global_qtest
Generic library functions like qtest_qmp_device_add() and _del() should not depend on the global_qtest variable. Pass the test state via parameter instead.
Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20190813093047.27948-6-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
a8d25326 |
| 23-May-2019 |
Markus Armbruster <armbru@redhat.com> |
Include qemu-common.h exactly where needed
No header includes qemu-common.h after this commit, as prescribed by qemu-common.h's file comment.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Me
Include qemu-common.h exactly where needed
No header includes qemu-common.h after this commit, as prescribed by qemu-common.h's file comment.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-5-armbru@redhat.com> [Rebased with conflicts resolved automatically, except for include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and net/tap-bsd.c fixed up]
show more ...
|
#
0b8fa32f |
| 23-May-2019 |
Markus Armbruster <armbru@redhat.com> |
Include qemu/module.h where needed, drop it from qemu-common.h
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-4-armbru@redhat.com> [Rebased with conflicts res
Include qemu/module.h where needed, drop it from qemu-common.h
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-4-armbru@redhat.com> [Rebased with conflicts resolved automatically, except for hw/usb/dev-hub.c hw/misc/exynos4210_rng.c hw/misc/bcm2835_rng.c hw/misc/aspeed_scu.c hw/display/virtio-vga.c hw/arm/stm32f205_soc.c; ui/cocoa.m fixed up]
show more ...
|
#
6ebb8d2a |
| 09-Apr-2019 |
Thomas Huth <thuth@redhat.com> |
tests: qpci_unplug_acpi_device_test() should not rely on global_qtest
libqos functions should not use functions that require global_qtest to be set, since such library functions could also be used b
tests: qpci_unplug_acpi_device_test() should not rely on global_qtest
libqos functions should not use functions that require global_qtest to be set, since such library functions could also be used by tests that deal with multiple test states. Add a parameter to this function to explicitly specify the test state.
Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190508143209.24350-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
b026393c |
| 20-Jul-2018 |
Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com> |
qos-test: e1000e test node
Convert tests/e1000e-test in qgraph test node, e1000e-test. This test consumes an e1000e interface and checks that its function return the expected values.
Note that this
qos-test: e1000e test node
Convert tests/e1000e-test in qgraph test node, e1000e-test. This test consumes an e1000e interface and checks that its function return the expected values.
Note that this test does not allocate any e1000e structure, it's all done by the qtest walking graph mechanism
Signed-off-by: Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
eb5937ba |
| 29-Nov-2018 |
Paolo Bonzini <pbonzini@redhat.com> |
tests/libqos: embed allocators instead of malloc-ing them separately
qgraph will embed these objects instead of allocating them in a separate object. Expose a new API "generic_alloc_init" and "gene
tests/libqos: embed allocators instead of malloc-ing them separately
qgraph will embed these objects instead of allocating them in a separate object. Expose a new API "generic_alloc_init" and "generic_alloc_destroy" for that, and rename the existing API with s/init/new/ and s/uninit/free/.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
143e6db6 |
| 19-Jul-2018 |
Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com> |
tests/libqos: rename qpci_init_pc and qpci_init_spapr functions
Rename qpci_init_pc in qpci_pc_new and qpci_init_spapr in qpci_spapr_new, since these function actually allocate a new pci struct and
tests/libqos: rename qpci_init_pc and qpci_init_spapr functions
Rename qpci_init_pc in qpci_pc_new and qpci_init_spapr in qpci_spapr_new, since these function actually allocate a new pci struct and initialize it (compare to object_new and object_initialize). Changed QOSOps field name from qpci_init to qpci_new.
Signed-off-by: Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
82cab70b |
| 06-Aug-2018 |
Markus Armbruster <armbru@redhat.com> |
tests: Clean up string interpolation around qtest_qmp_device_add()
Leaving interpolation into JSON to qmp() is more robust than building QMP input manually, as explained in the commit before previou
tests: Clean up string interpolation around qtest_qmp_device_add()
Leaving interpolation into JSON to qmp() is more robust than building QMP input manually, as explained in the commit before previous.
qtest_qmp_device_add() and its wrappers interpolate into JSON as follows:
* qtest_qmp_device_add() interpolates members into a JSON object.
* So do its wrappers qpci_plug_device_test() and usb_test_hotplug().
* usb_test_hotplug() additionally interpolates strings and numbers into JSON strings.
Clean them up:
* Have qtest_qmp_device_add() take its extra device properties as arguments for qdict_from_jsonf_nofail() instead of a string containing JSON members.
* Drop qpci_plug_device_test(), use qtest_qmp_device_add() directly.
* Change usb_test_hotplug() parameter @port to string, to avoid interpolation. Interpolate @hcd_id separately.
Bonus: gets rid of a non-literal format string. A step towards compile-time format string checking without triggering -Wformat-nonliteral.
Cc: Thomas Huth <thuth@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180806065344.7103-15-armbru@redhat.com>
show more ...
|
#
05e520f1 |
| 11-Sep-2017 |
Eric Blake <eblake@redhat.com> |
libqos: Use explicit QTestState for fw_cfg operations
Drop one more client of global_qtest by teaching all fw_cfg test functionality (invoked through alloc-pc) to pass in an explicit QTestState, adj
libqos: Use explicit QTestState for fw_cfg operations
Drop one more client of global_qtest by teaching all fw_cfg test functionality (invoked through alloc-pc) to pass in an explicit QTestState, adjusting all callers. In particular, fw_cfg-test had to reorder things to create the test state prior to creating the fw_cfg (and drop a pointless strdup in the meantime), but that test now no longer depends on global_qtest.
Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Fixed conflict wrt pc_alloc_init() in vhost-user-test.c] Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
e5d1730d |
| 11-Sep-2017 |
Eric Blake <eblake@redhat.com> |
libqos: Track QTestState with QPCIBus
When initializing a QPCIBus, track which QTestState the bus is associated with (so that a later patch can then explicitly use that test state for all communicat
libqos: Track QTestState with QPCIBus
When initializing a QPCIBus, track which QTestState the bus is associated with (so that a later patch can then explicitly use that test state for all communication on the bus, rather than blindly relying on global_qtest). Update the initialization functions to take another parameter, and update all callers to pass in state (for now, most callers get away with passing the current global_qtest as the current state, although this required fixing the order of initialization to ensure qtest_start() is called before qpci_init*() in rtl8139-test, and provided an opportunity to pass in the allocator in e1000e-test).
Touch up some allocations to use g_new0() rather than g_malloc() while in the area, and simplify some code (all implementations of QOSOps provide a .init_allocator() that never fails).
Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Removed hunk from vhost-user-test.c that is not required anymore, fixed conflict in qtest_vboot() and adjusted qpci_init_pc() in sdhci-test] Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
448fe3c1 |
| 06-Feb-2017 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tests: fix e1000e leaks
Spotted by ASAN.
This hunk adds an assertion. It checks that we're finding no more than one e1000e device: each hit allocates, but there is only one g_free().
Signed-off-by
tests: fix e1000e leaks
Spotted by ASAN.
This hunk adds an assertion. It checks that we're finding no more than one e1000e device: each hit allocates, but there is only one g_free().
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
b4ba67d9 |
| 24-Oct-2016 |
David Gibson <david@gibson.dropbear.id.au> |
libqos: Change PCI accessors to take opaque BAR handle
The usual use model for the libqos PCI functions is to map a specific PCI BAR using qpci_iomap() then pass the returned token into IO accessor
libqos: Change PCI accessors to take opaque BAR handle
The usual use model for the libqos PCI functions is to map a specific PCI BAR using qpci_iomap() then pass the returned token into IO accessor functions. This, and the fact that iomap() returns a (void *) which actually contains a PCI space address, kind of suggests that the return value from iomap is supposed to be an opaque token.
..except that the callers expect to be able to add offsets to it. Which also assumes the compiler will support pointer arithmetic on a (void *), and treat it as working with byte offsets.
To clarify this situation change iomap() and the IO accessors to take a definitely opaque BAR handle (enforced with a wrapper struct) along with an offset within the BAR. This changes both the functions and all the callers.
There were a number of places that checked if iomap() returned non-NULL, and or initialized it to NULL before hand. Since iomap() already assert()s if it fails to map the BAR, these tests were mostly pointless and are removed.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Greg Kurz <groug@kaod.org>
show more ...
|
#
2ecd7e2f |
| 29-Sep-2016 |
Laurent Vivier <lvivier@redhat.com> |
libqos: add PCI management in qtest_vboot()/qtest_shutdown()
Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: David Gibson <david@gibson.dropbe
libqos: add PCI management in qtest_vboot()/qtest_shutdown()
Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
show more ...
|