* [Qemu-devel] [PATCH] tests/bios-tables-test: Sanitize test verbose output
@ 2018-10-30 0:18 Philippe Mathieu-Daudé
2018-11-01 10:04 ` Igor Mammedov
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-10-30 0:18 UTC (permalink / raw)
To: Peter Maydell
Cc: Philippe Mathieu-Daudé,
qemu-devel, qemu-arm, Paolo Bonzini, Thomas Huth, Laurent Vivier,
Michael S. Tsirkin, Igor Mammedov
Fix the extraneous extra blank lines in the test output when running with V=1.
Before:
TEST: tests/bios-tables-test... (pid=25678)
/i386/acpi/piix4:
Looking for expected file 'tests/acpi-test-data/pc/DSDT'
Using expected file 'tests/acpi-test-data/pc/DSDT'
Looking for expected file 'tests/acpi-test-data/pc/FACP'
Using expected file 'tests/acpi-test-data/pc/FACP'
Looking for expected file 'tests/acpi-test-data/pc/APIC'
Using expected file 'tests/acpi-test-data/pc/APIC'
Looking for expected file 'tests/acpi-test-data/pc/HPET'
Using expected file 'tests/acpi-test-data/pc/HPET'
OK
After:
TEST: tests/bios-tables-test... (pid=667)
/i386/acpi/piix4:
Looking for expected file 'tests/acpi-test-data/pc/DSDT'
Using expected file 'tests/acpi-test-data/pc/DSDT'
Looking for expected file 'tests/acpi-test-data/pc/FACP'
Using expected file 'tests/acpi-test-data/pc/FACP'
Looking for expected file 'tests/acpi-test-data/pc/APIC'
Using expected file 'tests/acpi-test-data/pc/APIC'
Looking for expected file 'tests/acpi-test-data/pc/HPET'
Using expected file 'tests/acpi-test-data/pc/HPET'
OK
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
tests/bios-tables-test.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 4e24930c4b..02dd48de0d 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -371,6 +371,9 @@ static GArray *load_expected_aml(test_data *data)
gboolean ret;
GArray *exp_tables = g_array_new(false, true, sizeof(AcpiSdtTable));
+ if (getenv("V")) {
+ fputc('\n', stderr);
+ }
for (i = 0; i < data->tables->len; ++i) {
AcpiSdtTable exp_sdt;
gchar *aml_file = NULL;
@@ -385,7 +388,7 @@ try_again:
aml_file = g_strdup_printf("%s/%s/%.4s%s", data_dir, data->machine,
(gchar *)&sdt->header.signature, ext);
if (getenv("V")) {
- fprintf(stderr, "\nLooking for expected file '%s'\n", aml_file);
+ fprintf(stderr, "Looking for expected file '%s'\n", aml_file);
}
if (g_file_test(aml_file, G_FILE_TEST_EXISTS)) {
exp_sdt.aml_file = aml_file;
@@ -397,7 +400,7 @@ try_again:
}
g_assert(exp_sdt.aml_file);
if (getenv("V")) {
- fprintf(stderr, "\nUsing expected file '%s'\n", aml_file);
+ fprintf(stderr, "Using expected file '%s'\n", aml_file);
}
ret = g_file_get_contents(aml_file, &exp_sdt.aml,
&exp_sdt.aml_len, &error);
--
2.17.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] tests/bios-tables-test: Sanitize test verbose output
2018-10-30 0:18 [Qemu-devel] [PATCH] tests/bios-tables-test: Sanitize test verbose output Philippe Mathieu-Daudé
@ 2018-11-01 10:04 ` Igor Mammedov
2018-11-01 14:26 ` Eric Blake
2018-11-02 22:03 ` Thomas Huth
2 siblings, 0 replies; 5+ messages in thread
From: Igor Mammedov @ 2018-11-01 10:04 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, qemu-devel, qemu-arm, Paolo Bonzini, Thomas Huth,
Laurent Vivier, Michael S. Tsirkin
On Tue, 30 Oct 2018 01:18:40 +0100
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> Fix the extraneous extra blank lines in the test output when running with V=1.
>
> Before:
>
> TEST: tests/bios-tables-test... (pid=25678)
> /i386/acpi/piix4:
> Looking for expected file 'tests/acpi-test-data/pc/DSDT'
>
> Using expected file 'tests/acpi-test-data/pc/DSDT'
>
> Looking for expected file 'tests/acpi-test-data/pc/FACP'
>
> Using expected file 'tests/acpi-test-data/pc/FACP'
>
> Looking for expected file 'tests/acpi-test-data/pc/APIC'
>
> Using expected file 'tests/acpi-test-data/pc/APIC'
>
> Looking for expected file 'tests/acpi-test-data/pc/HPET'
>
> Using expected file 'tests/acpi-test-data/pc/HPET'
> OK
>
> After:
>
> TEST: tests/bios-tables-test... (pid=667)
> /i386/acpi/piix4:
> Looking for expected file 'tests/acpi-test-data/pc/DSDT'
> Using expected file 'tests/acpi-test-data/pc/DSDT'
> Looking for expected file 'tests/acpi-test-data/pc/FACP'
> Using expected file 'tests/acpi-test-data/pc/FACP'
> Looking for expected file 'tests/acpi-test-data/pc/APIC'
> Using expected file 'tests/acpi-test-data/pc/APIC'
> Looking for expected file 'tests/acpi-test-data/pc/HPET'
> Using expected file 'tests/acpi-test-data/pc/HPET'
> OK
>
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> tests/bios-tables-test.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> index 4e24930c4b..02dd48de0d 100644
> --- a/tests/bios-tables-test.c
> +++ b/tests/bios-tables-test.c
> @@ -371,6 +371,9 @@ static GArray *load_expected_aml(test_data *data)
> gboolean ret;
>
> GArray *exp_tables = g_array_new(false, true, sizeof(AcpiSdtTable));
> + if (getenv("V")) {
> + fputc('\n', stderr);
> + }
> for (i = 0; i < data->tables->len; ++i) {
> AcpiSdtTable exp_sdt;
> gchar *aml_file = NULL;
> @@ -385,7 +388,7 @@ try_again:
> aml_file = g_strdup_printf("%s/%s/%.4s%s", data_dir, data->machine,
> (gchar *)&sdt->header.signature, ext);
> if (getenv("V")) {
> - fprintf(stderr, "\nLooking for expected file '%s'\n", aml_file);
> + fprintf(stderr, "Looking for expected file '%s'\n", aml_file);
> }
> if (g_file_test(aml_file, G_FILE_TEST_EXISTS)) {
> exp_sdt.aml_file = aml_file;
> @@ -397,7 +400,7 @@ try_again:
> }
> g_assert(exp_sdt.aml_file);
> if (getenv("V")) {
> - fprintf(stderr, "\nUsing expected file '%s'\n", aml_file);
> + fprintf(stderr, "Using expected file '%s'\n", aml_file);
> }
> ret = g_file_get_contents(aml_file, &exp_sdt.aml,
> &exp_sdt.aml_len, &error);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] tests/bios-tables-test: Sanitize test verbose output
2018-10-30 0:18 [Qemu-devel] [PATCH] tests/bios-tables-test: Sanitize test verbose output Philippe Mathieu-Daudé
2018-11-01 10:04 ` Igor Mammedov
@ 2018-11-01 14:26 ` Eric Blake
2018-11-01 14:30 ` Peter Maydell
2018-11-02 22:03 ` Thomas Huth
2 siblings, 1 reply; 5+ messages in thread
From: Eric Blake @ 2018-11-01 14:26 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Peter Maydell
Cc: Laurent Vivier, Thomas Huth, Michael S. Tsirkin, qemu-devel,
qemu-arm, Igor Mammedov, Paolo Bonzini
On 10/29/18 7:18 PM, Philippe Mathieu-Daudé wrote:
> Fix the extraneous extra blank lines in the test output when running with V=1.
>
> +++ b/tests/bios-tables-test.c
> @@ -371,6 +371,9 @@ static GArray *load_expected_aml(test_data *data)
> gboolean ret;
>
> GArray *exp_tables = g_array_new(false, true, sizeof(AcpiSdtTable));
> + if (getenv("V")) {
> + fputc('\n', stderr);
> + }
Umm, this prints a blank line even if I run 'make check V=0' - do we
support V=0 as a way to disable verbosity, in which case you need to
actually inspect the contents of $V rather than just assuming that if it
is in the environment things are verbose?
> @@ -397,7 +400,7 @@ try_again:
> }
> g_assert(exp_sdt.aml_file);
> if (getenv("V")) {
> - fprintf(stderr, "\nUsing expected file '%s'\n", aml_file);
> + fprintf(stderr, "Using expected file '%s'\n", aml_file);
But that's a pre-existing question, so it doesn't affect this particular
patch.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] tests/bios-tables-test: Sanitize test verbose output
2018-11-01 14:26 ` Eric Blake
@ 2018-11-01 14:30 ` Peter Maydell
0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2018-11-01 14:30 UTC (permalink / raw)
To: Eric Blake
Cc: Philippe Mathieu-Daudé,
Laurent Vivier, Thomas Huth, Michael S. Tsirkin, QEMU Developers,
qemu-arm, Igor Mammedov, Paolo Bonzini
On 1 November 2018 at 14:26, Eric Blake <eblake@redhat.com> wrote:
> Umm, this prints a blank line even if I run 'make check V=0' - do we support
> V=0 as a way to disable verbosity
Empirically, we do not. Our rules.make defines
quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1))
which will suppress the verbose printing of command lines
only if $(V) expands to the empty string, so V=0 will
print verbosely here too.
thanks
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] tests/bios-tables-test: Sanitize test verbose output
2018-10-30 0:18 [Qemu-devel] [PATCH] tests/bios-tables-test: Sanitize test verbose output Philippe Mathieu-Daudé
2018-11-01 10:04 ` Igor Mammedov
2018-11-01 14:26 ` Eric Blake
@ 2018-11-02 22:03 ` Thomas Huth
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2018-11-02 22:03 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Peter Maydell
Cc: qemu-devel, qemu-arm, Paolo Bonzini, Laurent Vivier,
Michael S. Tsirkin, Igor Mammedov, Markus Armbruster
On 2018-10-30 00:18, Philippe Mathieu-Daudé wrote:
> Fix the extraneous extra blank lines in the test output when running with V=1.
>
> Before:
>
> TEST: tests/bios-tables-test... (pid=25678)
> /i386/acpi/piix4:
> Looking for expected file 'tests/acpi-test-data/pc/DSDT'
>
> Using expected file 'tests/acpi-test-data/pc/DSDT'
>
> Looking for expected file 'tests/acpi-test-data/pc/FACP'
>
> Using expected file 'tests/acpi-test-data/pc/FACP'
>
> Looking for expected file 'tests/acpi-test-data/pc/APIC'
>
> Using expected file 'tests/acpi-test-data/pc/APIC'
>
> Looking for expected file 'tests/acpi-test-data/pc/HPET'
>
> Using expected file 'tests/acpi-test-data/pc/HPET'
> OK
>
> After:
>
> TEST: tests/bios-tables-test... (pid=667)
> /i386/acpi/piix4:
> Looking for expected file 'tests/acpi-test-data/pc/DSDT'
> Using expected file 'tests/acpi-test-data/pc/DSDT'
> Looking for expected file 'tests/acpi-test-data/pc/FACP'
> Using expected file 'tests/acpi-test-data/pc/FACP'
> Looking for expected file 'tests/acpi-test-data/pc/APIC'
> Using expected file 'tests/acpi-test-data/pc/APIC'
> Looking for expected file 'tests/acpi-test-data/pc/HPET'
> Using expected file 'tests/acpi-test-data/pc/HPET'
> OK
>
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> tests/bios-tables-test.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> index 4e24930c4b..02dd48de0d 100644
> --- a/tests/bios-tables-test.c
> +++ b/tests/bios-tables-test.c
> @@ -371,6 +371,9 @@ static GArray *load_expected_aml(test_data *data)
> gboolean ret;
>
> GArray *exp_tables = g_array_new(false, true, sizeof(AcpiSdtTable));
> + if (getenv("V")) {
> + fputc('\n', stderr);
> + }
> for (i = 0; i < data->tables->len; ++i) {
> AcpiSdtTable exp_sdt;
> gchar *aml_file = NULL;
> @@ -385,7 +388,7 @@ try_again:
> aml_file = g_strdup_printf("%s/%s/%.4s%s", data_dir, data->machine,
> (gchar *)&sdt->header.signature, ext);
> if (getenv("V")) {
> - fprintf(stderr, "\nLooking for expected file '%s'\n", aml_file);
> + fprintf(stderr, "Looking for expected file '%s'\n", aml_file);
> }
> if (g_file_test(aml_file, G_FILE_TEST_EXISTS)) {
> exp_sdt.aml_file = aml_file;
> @@ -397,7 +400,7 @@ try_again:
> }
> g_assert(exp_sdt.aml_file);
> if (getenv("V")) {
> - fprintf(stderr, "\nUsing expected file '%s'\n", aml_file);
> + fprintf(stderr, "Using expected file '%s'\n", aml_file);
> }
> ret = g_file_get_contents(aml_file, &exp_sdt.aml,
> &exp_sdt.aml_len, &error);
>
Could we please get rid of the getenv + fprintf here and use
g_test_message() instead, like we already do in most of the other tests
that want to log additional output?
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-11-02 22:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-30 0:18 [Qemu-devel] [PATCH] tests/bios-tables-test: Sanitize test verbose output Philippe Mathieu-Daudé
2018-11-01 10:04 ` Igor Mammedov
2018-11-01 14:26 ` Eric Blake
2018-11-01 14:30 ` Peter Maydell
2018-11-02 22:03 ` Thomas Huth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.