[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/32] bios-tables-test: fix up DIFF generation
From: |
Michael S. Tsirkin |
Subject: |
[PULL 02/32] bios-tables-test: fix up DIFF generation |
Date: |
Tue, 25 Feb 2020 10:12:34 -0500 |
Turns out it goes to stdout which is suppressed even with V=1.
Force DIFF output to stderr to make it visible.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
tests/qtest/bios-tables-test.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 9c3c4680e4..1aed0ee7df 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -463,13 +463,19 @@ static void test_acpi_asl(test_data *data)
"Actual [asl:%s, aml:%s], Expected [asl:%s,
aml:%s].\n",
exp_sdt->aml, sdt->asl_file, sdt->aml_file,
exp_sdt->asl_file, exp_sdt->aml_file);
+ fflush(stderr);
if (getenv("V")) {
const char *diff_cmd = getenv("DIFF");
if (diff_cmd) {
- int ret G_GNUC_UNUSED;
char *diff = g_strdup_printf("%s %s %s", diff_cmd,
exp_sdt->asl_file, sdt->asl_file);
+ int out = dup(STDOUT_FILENO);
+ int ret G_GNUC_UNUSED;
+
+ dup2(STDERR_FILENO, STDOUT_FILENO);
ret = system(diff) ;
+ dup2(out, STDOUT_FILENO);
+ close(out);
g_free(diff);
} else {
fprintf(stderr, "acpi-test: Warning. not showing "
--
MST
- [PULL 00/32] virtio, pc: fixes, features, Michael S. Tsirkin, 2020/02/25
- [PULL 01/32] bios-tables-test: tell people how to update, Michael S. Tsirkin, 2020/02/25
- [PULL 02/32] bios-tables-test: fix up DIFF generation,
Michael S. Tsirkin <=
- [PULL 03/32] bios-tables-test: default diff command, Michael S. Tsirkin, 2020/02/25
- [PULL 04/32] rebuild-expected-aml.sh: remind about the process, Michael S. Tsirkin, 2020/02/25
- [PULL 05/32] vhost-user-fs: do delete virtio_queues in unrealize, Michael S. Tsirkin, 2020/02/25
- [PULL 06/32] vhost-user-fs: convert to the new virtio_delete_queue function, Michael S. Tsirkin, 2020/02/25
- [PULL 07/32] virtio-pmem: do delete rq_vq in virtio_pmem_unrealize, Michael S. Tsirkin, 2020/02/25
- [PULL 08/32] virtio-crypto: do delete ctrl_vq in virtio_crypto_device_unrealize, Michael S. Tsirkin, 2020/02/25
- [PULL 09/32] vhost-user-blk: delete virtioqueues in unrealize to fix memleaks, Michael S. Tsirkin, 2020/02/25
- [PULL 10/32] vhost-user-blk: convert to new virtio_delete_queue, Michael S. Tsirkin, 2020/02/25
- [PULL 11/32] virtio: gracefully handle invalid region caches, Michael S. Tsirkin, 2020/02/25
- [PULL 13/32] virtio-iommu: Decode the command payload, Michael S. Tsirkin, 2020/02/25