Message ID | 20180622004435.10291-6-f4bug@amsat.org |
---|---|
State | New |
Headers | show |
Series | Avocado: start multi-arch tests, add a Travis job | expand |
Philippe Mathieu-Daudé <f4bug@amsat.org> writes: > The board already instantiate the proper devices, we don't want to > add extra devices but connect the chardev to one of the serial already > available. > > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > scripts/qemu.py | 6 ++++-- > tests/acceptance/boot_linux_console.py | 3 ++- > 2 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/scripts/qemu.py b/scripts/qemu.py > index f099ce7278..7a975f4538 100644 > --- a/scripts/qemu.py > +++ b/scripts/qemu.py > @@ -211,8 +211,10 @@ class QEMUMachine(object): > self._name + "-console.sock") > chardev = ('socket,id=console,path=%s,server,nowait' % > self._console_address) > - device = '%s,chardev=console' % self._console_device_type > - args.extend(['-chardev', chardev, '-device', device]) > + args.extend(['-chardev', chardev]) > + if len(self._console_device_type): > + device = '%s,chardev=console' % self._console_device_type > + args.extend(['-device', device]) > return args > > def _pre_launch(self): > diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py > index 72cf5e943c..510742c4c7 100644 > --- a/tests/acceptance/boot_linux_console.py > +++ b/tests/acceptance/boot_linux_console.py > @@ -69,9 +69,10 @@ class BootLinuxConsoleMips(Test): > kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) > > self.vm.set_machine('malta') > - self.vm.set_console() > + self.vm.set_console("") # FIXME this disable isa-serial to > use -serial This is reminiscent of assumptions libvirt made about serial consoles. Does -serial not work on x86 for old style setups? I'm sure I have x86-64 boots with -serial mon:stdio lines. > kernel_command_line = 'console=ttyS0 printk.time=0' > self.vm.add_args('-m', "64", > + '-serial', "chardev:console", # FIXME ... here. > '-kernel', kernel_path, > '-append', kernel_command_line) > self.vm.launch() -- Alex Bennée
diff --git a/scripts/qemu.py b/scripts/qemu.py index f099ce7278..7a975f4538 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -211,8 +211,10 @@ class QEMUMachine(object): self._name + "-console.sock") chardev = ('socket,id=console,path=%s,server,nowait' % self._console_address) - device = '%s,chardev=console' % self._console_device_type - args.extend(['-chardev', chardev, '-device', device]) + args.extend(['-chardev', chardev]) + if len(self._console_device_type): + device = '%s,chardev=console' % self._console_device_type + args.extend(['-device', device]) return args def _pre_launch(self): diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 72cf5e943c..510742c4c7 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -69,9 +69,10 @@ class BootLinuxConsoleMips(Test): kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) self.vm.set_machine('malta') - self.vm.set_console() + self.vm.set_console("") # FIXME this disable isa-serial to use -serial kernel_command_line = 'console=ttyS0 printk.time=0' self.vm.add_args('-m', "64", + '-serial', "chardev:console", # FIXME ... here. '-kernel', kernel_path, '-append', kernel_command_line) self.vm.launch()
The board already instantiate the proper devices, we don't want to add extra devices but connect the chardev to one of the serial already available. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- scripts/qemu.py | 6 ++++-- tests/acceptance/boot_linux_console.py | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-)