[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/33] tests/qtest/rtl8139-test: Make the test less verbose by def
From: |
Thomas Huth |
Subject: |
[PULL 01/33] tests/qtest/rtl8139-test: Make the test less verbose by default |
Date: |
Mon, 27 Feb 2023 12:35:49 +0100 |
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>
---
tests/qtest/rtl8139-test.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/tests/qtest/rtl8139-test.c b/tests/qtest/rtl8139-test.c
index 8fa3313cc3..1beb83805c 100644
--- a/tests/qtest/rtl8139-test.c
+++ b/tests/qtest/rtl8139-test.c
@@ -12,6 +12,8 @@
#include "libqos/pci-pc.h"
#include "qemu/timer.h"
+static int verbosity_level;
+
/* Tests only initialization so far. TODO: Replace with functional tests */
static void nop(void)
{
@@ -45,12 +47,16 @@ static QPCIDevice *get_device(void)
static unsigned __attribute__((unused)) in_##name(void) \
{ \
unsigned res = qpci_io_read##len(dev, dev_bar, (val)); \
- g_test_message("*%s -> %x", #name, res); \
+ if (verbosity_level >= 2) { \
+ g_test_message("*%s -> %x", #name, res); \
+ } \
return res; \
} \
static void out_##name(unsigned v) \
{ \
- g_test_message("%x -> *%s", v, #name); \
+ if (verbosity_level >= 2) { \
+ g_test_message("%x -> *%s", v, #name); \
+ } \
qpci_io_write##len(dev, dev_bar, (val), v); \
}
@@ -195,6 +201,11 @@ static void test_init(void)
int main(int argc, char **argv)
{
int ret;
+ char *v_env = getenv("V");
+
+ if (v_env) {
+ verbosity_level = atoi(v_env);
+ }
qtest_start("-device rtl8139");
--
2.31.1
- [PULL 00/33] s390x and testing related patches, Thomas Huth, 2023/02/27
- [PULL 03/33] hw/vfio/ccw: Simplify using DEVICE() macro, Thomas Huth, 2023/02/27
- [PULL 02/33] Do not include hw/hw.h if it is not necessary, Thomas Huth, 2023/02/27
- [PULL 05/33] hw/vfio/ccw: Replace DO_UPCAST(S390CCWDevice) by S390_CCW_DEVICE(), Thomas Huth, 2023/02/27
- [PULL 06/33] hw/vfio/ccw: Remove pointless S390CCWDevice variable, Thomas Huth, 2023/02/27
- [PULL 04/33] hw/vfio/ccw: Use intermediate S390CCWDevice variable, Thomas Huth, 2023/02/27
- [PULL 01/33] tests/qtest/rtl8139-test: Make the test less verbose by default,
Thomas Huth <=
- [PULL 07/33] hw/vfio/ccw: Replace DO_UPCAST(VFIOCCWDevice) by VFIO_CCW(), Thomas Huth, 2023/02/27
- [PULL 08/33] target/s390x/arch_dump: Fix memory corruption in s390x_write_elf64_notes(), Thomas Huth, 2023/02/27
- [PULL 09/33] target/s390x/arch_dump: Simplify memory allocation in s390x_write_elf64_notes(), Thomas Huth, 2023/02/27
- [PULL 12/33] target/s390x: Use void* for haddr in S390Access, Thomas Huth, 2023/02/27
- [PULL 14/33] target/s390x: Remove TLB_NOTDIRTY workarounds, Thomas Huth, 2023/02/27
- [PULL 13/33] target/s390x: Tidy access_prepare_nf, Thomas Huth, 2023/02/27
- [PULL 10/33] target/s390x: Fix s390_probe_access for user-only, Thomas Huth, 2023/02/27
- [PULL 11/33] target/s390x: Pass S390Access pointer into access_prepare, Thomas Huth, 2023/02/27
- [PULL 15/33] target/s390x: Inline do_access_{get,set}_byte, Thomas Huth, 2023/02/27
- [PULL 16/33] target/s390x: Hoist some computation in access_memmove, Thomas Huth, 2023/02/27