[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 53/56] tests/qtest/bios-tables-test: Make the test less verbose by
From: |
Michael S. Tsirkin |
Subject: |
[PULL 53/56] tests/qtest/bios-tables-test: Make the test less verbose by default |
Date: |
Mon, 30 Jan 2023 15:21:36 -0500 |
From: Thomas Huth <thuth@redhat.com>
We are facing the issues that our test logs in the gitlab CI are
too big (and thus cut off). The bios-tables-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 bios-tables-test to behave more like the
other tests and only print the debug messages with V=2 (or higher).
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230118125132.1694469-1-thuth@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
tests/qtest/bios-tables-test.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 22b22c403d..d8c8cda58e 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -24,7 +24,7 @@
* You will also notice that tests/qtest/bios-tables-test-allowed-diff.h lists
* a bunch of files. This is your hint that you need to do the below:
* 4. Run
- * make check V=1
+ * make check V=2
* this will produce a bunch of warnings about differences
* beween actual and expected ACPI tables. If you have IASL installed,
* they will also be disassembled so you can look at the disassembled
@@ -108,6 +108,8 @@ static const char *iasl = CONFIG_IASL;
static const char *iasl;
#endif
+static int verbosity_level;
+
static bool compare_signature(const AcpiSdtTable *sdt, const char *signature)
{
return !memcmp(sdt->aml, signature, 4);
@@ -368,7 +370,7 @@ static GArray *load_expected_aml(test_data *data)
gsize aml_len;
GArray *exp_tables = g_array_new(false, true, sizeof(AcpiSdtTable));
- if (getenv("V")) {
+ if (verbosity_level >= 2) {
fputc('\n', stderr);
}
for (i = 0; i < data->tables->len; ++i) {
@@ -383,7 +385,7 @@ static GArray *load_expected_aml(test_data *data)
try_again:
aml_file = g_strdup_printf("%s/%s/%.4s%s", data_dir, data->machine,
sdt->aml, ext);
- if (getenv("V")) {
+ if (verbosity_level >= 2) {
fprintf(stderr, "Looking for expected file '%s'\n", aml_file);
}
if (g_file_test(aml_file, G_FILE_TEST_EXISTS)) {
@@ -395,7 +397,7 @@ try_again:
goto try_again;
}
g_assert(exp_sdt.aml_file);
- if (getenv("V")) {
+ if (verbosity_level >= 2) {
fprintf(stderr, "Using expected file '%s'\n", aml_file);
}
ret = g_file_get_contents(aml_file, (gchar **)&exp_sdt.aml,
@@ -503,7 +505,7 @@ static void test_acpi_asl(test_data *data)
exp_sdt->aml, sdt->asl_file, sdt->aml_file,
exp_sdt->asl_file, exp_sdt->aml_file);
fflush(stderr);
- if (getenv("V")) {
+ if (verbosity_level >= 1) {
const char *diff_env = getenv("DIFF");
const char *diff_cmd = diff_env ? diff_env : "diff -U 16";
char *diff = g_strdup_printf("%s %s %s", diff_cmd,
@@ -2042,8 +2044,13 @@ int main(int argc, char *argv[])
const char *arch = qtest_get_arch();
const bool has_kvm = qtest_has_accel("kvm");
const bool has_tcg = qtest_has_accel("tcg");
+ char *v_env = getenv("V");
int ret;
+ if (v_env) {
+ verbosity_level = atoi(v_env);
+ }
+
g_test_init(&argc, &argv, NULL);
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
--
MST
- [PULL 45/56] tests: acpi: whitelist DSDT blobs before removing dynamic _DSM on coldplugged bridges, (continued)
- [PULL 45/56] tests: acpi: whitelist DSDT blobs before removing dynamic _DSM on coldplugged bridges, Michael S. Tsirkin, 2023/01/30
- [PULL 37/56] x86: pcihp: acpi: prepare slot ignore rule to work with self describing bridges, Michael S. Tsirkin, 2023/01/30
- [PULL 46/56] pcihp: acpi: ignore coldplugged bridges when composing hotpluggable slots, Michael S. Tsirkin, 2023/01/30
- [PULL 25/56] tests: boot_sector_test(): make it multi-shot, Michael S. Tsirkin, 2023/01/30
- [PULL 43/56] pcihp: acpi: decouple hotplug and generic slots description, Michael S. Tsirkin, 2023/01/30
- [PULL 40/56] pci: make sure pci_bus_is_express() won't error out with "discards ‘const’ qualifier", Michael S. Tsirkin, 2023/01/30
- [PULL 32/56] pcihp: do not put empty PCNT in DSDT, Michael S. Tsirkin, 2023/01/30
- [PULL 34/56] whitelist DSDT before adding endpoint devices to bridge testcases, Michael S. Tsirkin, 2023/01/30
- [PULL 36/56] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/01/30
- [PULL 39/56] pcihp: make bridge describe itself using AcpiDevAmlIfClass:build_dev_aml, Michael S. Tsirkin, 2023/01/30
- [PULL 53/56] tests/qtest/bios-tables-test: Make the test less verbose by default,
Michael S. Tsirkin <=
- [PULL 47/56] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/01/30
- [PULL 49/56] pcihp: generate populated non-hotpluggble slot descriptions on non-hotplug path, Michael S. Tsirkin, 2023/01/30
- [PULL 41/56] pcihp: isolate rule whether slot should be described in DSDT, Michael S. Tsirkin, 2023/01/30
- [PULL 42/56] tests: acpi: whitelist DSDT before decoupling PCI hotplug code from basic slots description, Michael S. Tsirkin, 2023/01/30
- [PULL 51/56] vhost-user: Skip unnecessary duplicated VHOST_USER_ADD/REM_MEM_REG requests, Michael S. Tsirkin, 2023/01/30
- [PULL 48/56] tests: acpi: whitelist DSDT before moving non-hotpluggble slots description from hotplug path, Michael S. Tsirkin, 2023/01/30
- [PULL 50/56] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/01/30
- [PULL 56/56] docs/pcie.txt: Replace ioh3420 with pcie-root-port, Michael S. Tsirkin, 2023/01/30
- [PULL 54/56] Revert "vhost-user: Monitor slave channel in vhost_user_read()", Michael S. Tsirkin, 2023/01/30
- [PULL 52/56] hw: Use TYPE_PCI_BUS definition where appropriate, Michael S. Tsirkin, 2023/01/30