From ca5c5b997b348e650a086965c5e975c7101ee40e Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 26 Jun 2017 10:26:28 -0400 Subject: [PATCH] qemu: command: Remove old style -parallel building AFAIK there aren't any qemu arch/machine types with platform parallel devices that would require old style -parallel config, so we shouldn't ever need this nowadays. Remove a now redundant test Reviewed-by: Andrea Bolognani Signed-off-by: Cole Robinson --- src/qemu/qemu_command.c | 33 +++++++---------- .../qemuxml2argv-parallel-tcp.args | 22 ------------ .../qemuxml2argv-parallel-tcp.xml | 35 ------------------- tests/qemuxml2argvtest.c | 1 - tests/qemuxml2xmltest.c | 1 - 5 files changed, 12 insertions(+), 80 deletions(-) delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3fe291863b..76f3d53031 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9284,28 +9284,19 @@ qemuBuildParallelsCommandLine(virLogManagerPtr logManager, virDomainChrDefPtr parallel = def->parallels[i]; char *devstr; - /* Use -chardev with -device if they are available */ - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV)) { - if (!(devstr = qemuBuildChrChardevStr(logManager, cmd, cfg, def, - parallel->source, - parallel->info.alias, - qemuCaps, true, - chardevStdioLogd))) - return -1; - virCommandAddArg(cmd, "-chardev"); - virCommandAddArg(cmd, devstr); - VIR_FREE(devstr); + if (!(devstr = qemuBuildChrChardevStr(logManager, cmd, cfg, def, + parallel->source, + parallel->info.alias, + qemuCaps, true, + chardevStdioLogd))) + return -1; + virCommandAddArg(cmd, "-chardev"); + virCommandAddArg(cmd, devstr); + VIR_FREE(devstr); - if (qemuBuildChrDeviceCommandLine(cmd, def, parallel, - qemuCaps) < 0) - return -1; - } else { - virCommandAddArg(cmd, "-parallel"); - if (!(devstr = qemuBuildChrArgStr(parallel->source, NULL))) - return -1; - virCommandAddArg(cmd, devstr); - VIR_FREE(devstr); - } + if (qemuBuildChrDeviceCommandLine(cmd, def, parallel, + qemuCaps) < 0) + return -1; } return 0; diff --git a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args deleted file mode 100644 index 22d551fd8c..0000000000 --- a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args +++ /dev/null @@ -1,22 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/home/test \ -USER=test \ -LOGNAME=test \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-i686 \ --name QEMUGuest1 \ --S \ --M pc \ --m 214 \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --nographic \ --nodefaults \ --monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ --no-acpi \ --boot c \ --usb \ --drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \ --device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ --parallel tcp:127.0.0.1:9999,server,nowait diff --git a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml deleted file mode 100644 index 705e8c3c19..0000000000 --- a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml +++ /dev/null @@ -1,35 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219100 - 219100 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - - - - - - - - - diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index e83a7b208a..1ad06d0a7a 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1186,7 +1186,6 @@ mymain(void) QEMU_CAPS_SPICE, QEMU_CAPS_CHARDEV_SPICEPORT); DO_TEST("serial-spiceport-nospice", NONE); - DO_TEST("parallel-tcp", NONE); DO_TEST("console-compat", NONE); DO_TEST("console-compat-auto", NONE); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index ad3bbf0add..286490f505 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -549,7 +549,6 @@ mymain(void) DO_TEST("serial-many", NONE); DO_TEST("serial-spiceport", NONE); DO_TEST("serial-spiceport-nospice", NONE); - DO_TEST("parallel-tcp", NONE); DO_TEST("console-compat", NONE); DO_TEST("console-compat2", NONE); DO_TEST("console-virtio-many", NONE); -- GitLab