On Sun, Jul 13, 2025 at 04:22:06PM +0200, Roman Bogorodskiy wrote: > Recent versions of bhyve support 4 com ports instead of just 2. Thus, > allow to use 4 console devices. > > Also, there was a bug previously because the condition was > "if (chr->target.port > 2)", but as target.port start > with 0 and "com" ports start with 1, this condition allows com3 to be > used. > > As bhyve supports 4 com ports already long enough, and all supported > FreeBSD versions include this capability, do not introduce driver > capability for that. > > Add a couple of tests for that: > > - A domain that uses 4 serials, 2 of type 'nmdm' > and the other 2 of type 'tcp' > - A domain that uses unsupported port, such as target.port=4 which > translates into com5. > > Signed-off-by: Roman Bogorodskiy <bogorods...@gmail.com> > --- > src/bhyve/bhyve_command.c | 4 +- > .../bhyvexml2argv-4-consoles.args | 15 +++++ > .../bhyvexml2argv-4-consoles.ldargs | 4 ++ > .../bhyvexml2argv-4-consoles.xml | 35 +++++++++++ > .../bhyvexml2argv-serial-invalid-port.args | 12 ++++ > .../bhyvexml2argv-serial-invalid-port.ldargs | 4 ++ > .../bhyvexml2argv-serial-invalid-port.xml | 28 +++++++++ > tests/bhyvexml2argvtest.c | 2 + > .../bhyvexml2xmlout-4-consoles.xml | 58 +++++++++++++++++++ > tests/bhyvexml2xmltest.c | 1 + > 10 files changed, 161 insertions(+), 2 deletions(-) > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-4-consoles.args > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-4-consoles.ldargs > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-4-consoles.xml > create mode 100644 > tests/bhyvexml2argvdata/bhyvexml2argv-serial-invalid-port.args > create mode 100644 > tests/bhyvexml2argvdata/bhyvexml2argv-serial-invalid-port.ldargs > create mode 100644 > tests/bhyvexml2argvdata/bhyvexml2argv-serial-invalid-port.xml > create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-4-consoles.xml
Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|