#
74dcb253 |
| 12-Sep-2024 |
Pierrick Bouvier <pierrick.bouvier@linaro.org> |
tests/qtest: replace assert(0) with g_assert_not_reached()
This patch is part of a series that moves towards a consistent use of g_assert_not_reached() rather than an ad hoc mix of different asserti
tests/qtest: replace assert(0) with g_assert_not_reached()
This patch is part of a series that moves towards a consistent use of g_assert_not_reached() rather than an ad hoc mix of different assertion mechanisms.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-ID: <20240912073921.453203-13-pierrick.bouvier@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
a186fedb |
| 09-Oct-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
tests/rtl8139: Clean up global variable shadowing
Rename the variable to fix:
tests/qtest/rtl8139-test.c:28:33: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] stat
tests/rtl8139: Clean up global variable shadowing
Rename the variable to fix:
tests/qtest/rtl8139-test.c:28:33: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void save_fn(QPCIDevice *dev, int devfn, void *data) ^ tests/qtest/rtl8139-test.c:37:17: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] QPCIDevice *dev; ^ tests/qtest/rtl8139-test.c:25:20: note: previous declaration is here static QPCIDevice *dev; ^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20231009100251.56019-7-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
f5af1dad |
| 25-May-2023 |
Thomas Huth <thuth@redhat.com> |
tests/qtest/rtl8139-test: Check whether the rtl8139 device is available
Though we are already using CONFIG_RTL8139_PCI in the meson.build file for testing whether the rtl8139 device is available or
tests/qtest/rtl8139-test: Check whether the rtl8139 device is available
Though we are already using CONFIG_RTL8139_PCI in the meson.build file for testing whether the rtl8139 device is available or not, this is not enough: The CONFIG switch might have been selected by another target (e.g. the mips fuloong2e machine has the rtl8139 chip soldered on the board), so CONFIG_RTL8139_PCI ends up in config_all_devices and the test then gets executed on x86. We need an additional run-time check to be on the safe side to make this test also work when configure has been run with "--without-default-devices".
Message-Id: <20230525081016.1870364-4-thuth@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
ae4b01b3 |
| 28-Feb-2023 |
Richard W.M. Jones <rjones@redhat.com> |
tests: Ensure TAP version is printed before other messages
These two tests were failing with this error:
stderr: TAP parsing error: version number must be on the first line [...] Unknown TA
tests: Ensure TAP version is printed before other messages
These two tests were failing with this error:
stderr: TAP parsing error: version number must be on the first line [...] Unknown TAP version. The first line MUST be `TAP version <int>`. Assuming version 12.
This can be fixed by ensuring we always call g_test_init first in the body of main.
Thanks: Daniel Berrange, for diagnosing the problem Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Message-Id: <20230227174019.1164205-1-rjones@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20230228190653.1602033-17-alex.bennee@linaro.org>
show more ...
|
#
5ebecf20 |
| 15-Feb-2023 |
Thomas Huth <thuth@redhat.com> |
tests/qtest/rtl8139-test: Make the test less verbose by default
We are facing the issues that some test logs in the gitlab CI are too big (and thus cut off). The rtl8139-test is one of the few qtest
tests/qtest/rtl8139-test: Make the test less verbose by default
We are facing the issues that some test logs in the gitlab CI are too big (and thus cut off). The rtl8139-test is one of the few qtests that prints many lines of output by default when running with V=1, so it contributes to this problem. Almost all other qtests are silent with V=1 and only print debug messages with V=2 and higher. Thus let's change the rtl8139-test to behave more like the other tests and only print the debug messages with V=2 (or higher).
Message-Id: <20230215124122.72037-1-thuth@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@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 ...
|
#
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 ...
|
#
234afe78 |
| 08-Mar-2019 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-03-08' into staging
- qtest fixes - Some generic clean-ups by Philippe - macOS CI testing via cirrus-ci.com
# gpg: Signature
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-03-08' into staging
- qtest fixes - Some generic clean-ups by Philippe - macOS CI testing via cirrus-ci.com
# gpg: Signature made Fri 08 Mar 2019 08:58:47 GMT # gpg: using RSA key 2ED9D774FE702DB5 # 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-2019-03-08: cirrus.yml: Add macOS continuous integration task tests/bios-tables: Improve portability by searching bash in the $PATH vhost-user-test: fix leaks tests: Do not use "\n" in g_test_message() strings hw/devices: Remove unused TC6393XB_RAM definition hw: Remove unused 'hw/devices.h' include tests: Move qdict-test-data.txt to tests/data/qobject/
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
# Conflicts: # tests/vhost-user-test.c
show more ...
|
#
13ee9e30 |
| 01-Mar-2019 |
Thomas Huth <thuth@redhat.com> |
tests: Do not use "\n" in g_test_message() strings
g_test_message() takes care of the newline on its own, so we should not use \n in the strings here.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.
tests: Do not use "\n" in g_test_message() strings
g_test_message() takes care of the newline on its own, so we should not use \n in the strings here.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Thomas Huth <thuth@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 ...
|
#
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 ...
|
#
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 ...
|
#
79ffb277 |
| 24-May-2016 |
Peter Maydell <peter.maydell@linaro.org> |
tests: Remove unnecessary glib.h includes
Remove glib.h includes, as it is provided by osdep.h.
This commit was created with scripts/clean-includes.
Signed-off-by: Peter Maydell <peter.maydell@lin
tests: Remove unnecessary glib.h includes
Remove glib.h includes, as it is provided by osdep.h.
This commit was created with scripts/clean-includes.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
show more ...
|
#
681c28a3 |
| 08-Feb-2016 |
Peter Maydell <peter.maydell@linaro.org> |
tests: Clean up includes
Clean up includes so that osdep.h is included first and headers which it implies are not included manually.
This commit was created with scripts/clean-includes.
Signed-off
tests: Clean up includes
Clean up includes so that osdep.h is included first and headers which it implies are not included manually.
This commit was created with scripts/clean-includes.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
37b9ab92 |
| 24-Aug-2015 |
Laurent Vivier <lvivier@redhat.com> |
rtl8139: remove muldiv64()
Originally, timers were ticks based, and it made sense to add ticks to current time to know when to trigger an alarm.
But since commit:
7447545 change all other clock re
rtl8139: remove muldiv64()
Originally, timers were ticks based, and it made sense to add ticks to current time to know when to trigger an alarm.
But since commit:
7447545 change all other clock references to use nanosecond resolution accessors
All timers use nanoseconds and we need to convert ticks to nanoseconds, by doing something like:
y = muldiv64(x, get_ticks_per_sec(), PCI_FREQUENCY)
where x is the number of device ticks and y the number of system ticks.
y is used as nanoseconds in timer functions, it works because 1 tick is 1 nanosecond. (get_ticks_per_sec() is 10^9)
But as PCI frequency is 33 MHz, we can also do:
y = x * 30; /* 33 MHz PCI period is 30 ns */
Which is much more simple.
This implies a 33.333333 MHz PCI frequency, but this is correct.
Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
#
13566fe3 |
| 08-Jul-2015 |
Stefan Hajnoczi <stefanha@redhat.com> |
timer: rename NSEC_PER_SEC due to Mac OS X header clash
Commit e0cf11f31c24cfb17f44ed46c254d84c78e7f6e9 ("timer: Use a single definition of NSEC_PER_SEC for the whole codebase") renamed NANOSECONDS_
timer: rename NSEC_PER_SEC due to Mac OS X header clash
Commit e0cf11f31c24cfb17f44ed46c254d84c78e7f6e9 ("timer: Use a single definition of NSEC_PER_SEC for the whole codebase") renamed NANOSECONDS_PER_SECOND to NSEC_PER_SEC.
On Mac OS X there is a <dispatch/time.h> system header which also defines NSEC_PER_SEC. This causes compiler warnings.
Let's use the old name instead. It's longer but it doesn't clash.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1436364609-7929-1-git-send-email-stefanha@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
e0cf11f3 |
| 12-Jun-2015 |
Alberto Garcia <berto@igalia.com> |
timer: Use a single definition of NSEC_PER_SEC for the whole codebase
Signed-off-by: Alberto Garcia <berto@igalia.com> Message-id: c6e55468856ba0b8f95913c4da111cc0ef266541.1434113783.git.berto@igali
timer: Use a single definition of NSEC_PER_SEC for the whole codebase
Signed-off-by: Alberto Garcia <berto@igalia.com> Message-id: c6e55468856ba0b8f95913c4da111cc0ef266541.1434113783.git.berto@igalia.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
#
069bb583 |
| 08-Jan-2015 |
Frediano Ziglio <freddy77@gmail.com> |
tests: rtl8139: test timers and interrupt
Test behaviour of timers and interrupts related to timeouts.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Reviewed-by: Paolo Bonzini <pbonzini@redha
tests: rtl8139: test timers and interrupt
Test behaviour of timers and interrupts related to timeouts.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1420742303-3030-1-git-send-email-freddy77@gmail.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
#
74769fe7 |
| 07-Nov-2013 |
Andreas Färber <afaerber@suse.de> |
tests: Add rtl8139 qtest
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
|