[PATCH 1/2] tests/vm: skip X11 in openbsd installation

Daniel P. Berrangé posted 2 patches 2 years, 10 months ago
Maintainers: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, Brad Smith <brad@comstyle.com>
[PATCH 1/2] tests/vm: skip X11 in openbsd installation
Posted by Daniel P. Berrangé 2 years, 10 months ago
As a VM used only for automated testing there is no need to
install the X11 stack.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/vm/openbsd | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/vm/openbsd b/tests/vm/openbsd
index eaeb201e91..6af7afac0d 100755
--- a/tests/vm/openbsd
+++ b/tests/vm/openbsd
@@ -106,8 +106,7 @@ class OpenBSDVM(basevm.BaseVM):
         self.console_wait("Password for root account")
         self.console_send("%s\n" % self._config["root_pass"])
         self.console_wait_send("Start sshd(8)",           "yes\n")
-        self.console_wait_send("X Window System",         "\n")
-        self.console_wait_send("xenodm",                  "\n")
+        self.console_wait_send("X Window System",         "no\n")
         self.console_wait_send("console to com0",         "\n")
         self.console_wait_send("Which speed",             "\n")
 
-- 
2.39.2


Re: [PATCH 1/2] tests/vm: skip X11 in openbsd installation
Posted by Philippe Mathieu-Daudé 2 years, 10 months ago
On 22/3/23 13:36, Daniel P. Berrangé wrote:
> As a VM used only for automated testing there is no need to
> install the X11 stack.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   tests/vm/openbsd | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tests/vm/openbsd b/tests/vm/openbsd
> index eaeb201e91..6af7afac0d 100755
> --- a/tests/vm/openbsd
> +++ b/tests/vm/openbsd
> @@ -106,8 +106,7 @@ class OpenBSDVM(basevm.BaseVM):
>           self.console_wait("Password for root account")
>           self.console_send("%s\n" % self._config["root_pass"])
>           self.console_wait_send("Start sshd(8)",           "yes\n")
> -        self.console_wait_send("X Window System",         "\n")
> -        self.console_wait_send("xenodm",                  "\n")
> +        self.console_wait_send("X Window System",         "no\n")

Wasn't this useful to link a X11-ready binary, even if only testing
with -display=none?

Re: [PATCH 1/2] tests/vm: skip X11 in openbsd installation
Posted by Daniel P. Berrangé 2 years, 10 months ago
On Wed, Mar 22, 2023 at 02:38:13PM +0100, Philippe Mathieu-Daudé wrote:
> On 22/3/23 13:36, Daniel P. Berrangé wrote:
> > As a VM used only for automated testing there is no need to
> > install the X11 stack.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >   tests/vm/openbsd | 3 +--
> >   1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/tests/vm/openbsd b/tests/vm/openbsd
> > index eaeb201e91..6af7afac0d 100755
> > --- a/tests/vm/openbsd
> > +++ b/tests/vm/openbsd
> > @@ -106,8 +106,7 @@ class OpenBSDVM(basevm.BaseVM):
> >           self.console_wait("Password for root account")
> >           self.console_send("%s\n" % self._config["root_pass"])
> >           self.console_wait_send("Start sshd(8)",           "yes\n")
> > -        self.console_wait_send("X Window System",         "\n")
> > -        self.console_wait_send("xenodm",                  "\n")
> > +        self.console_wait_send("X Window System",         "no\n")
> 
> Wasn't this useful to link a X11-ready binary, even if only testing
> with -display=none?

I've just confirmed /usr/X11R6/include/X11/  still exists in the image
even after this change, as does /usr/X11R6/lib/

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 :|


Re: [PATCH 1/2] tests/vm: skip X11 in openbsd installation
Posted by Thomas Huth 2 years, 10 months ago
On 22/03/2023 14.38, Philippe Mathieu-Daudé wrote:
> On 22/3/23 13:36, Daniel P. Berrangé wrote:
>> As a VM used only for automated testing there is no need to
>> install the X11 stack.
>>
>> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>> ---
>>   tests/vm/openbsd | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/tests/vm/openbsd b/tests/vm/openbsd
>> index eaeb201e91..6af7afac0d 100755
>> --- a/tests/vm/openbsd
>> +++ b/tests/vm/openbsd
>> @@ -106,8 +106,7 @@ class OpenBSDVM(basevm.BaseVM):
>>           self.console_wait("Password for root account")
>>           self.console_send("%s\n" % self._config["root_pass"])
>>           self.console_wait_send("Start sshd(8)",           "yes\n")
>> -        self.console_wait_send("X Window System",         "\n")
>> -        self.console_wait_send("xenodm",                  "\n")
>> +        self.console_wait_send("X Window System",         "no\n")
> 
> Wasn't this useful to link a X11-ready binary, even if only testing
> with -display=none?

tests/vm/openbsd later installs sdl2 and gtk+3, so I assume that will pull 
in the required libraries if necessary, without all the other non-necessary 
stuff.

  Thomas


Re: [PATCH 1/2] tests/vm: skip X11 in openbsd installation
Posted by Brad Smith 2 years, 10 months ago
On 2023-03-22 9:40 a.m., Thomas Huth wrote:
> On 22/03/2023 14.38, Philippe Mathieu-Daudé wrote:
>> On 22/3/23 13:36, Daniel P. Berrangé wrote:
>>> As a VM used only for automated testing there is no need to
>>> install the X11 stack.
>>>
>>> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>>> ---
>>>   tests/vm/openbsd | 3 +--
>>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/tests/vm/openbsd b/tests/vm/openbsd
>>> index eaeb201e91..6af7afac0d 100755
>>> --- a/tests/vm/openbsd
>>> +++ b/tests/vm/openbsd
>>> @@ -106,8 +106,7 @@ class OpenBSDVM(basevm.BaseVM):
>>>           self.console_wait("Password for root account")
>>>           self.console_send("%s\n" % self._config["root_pass"])
>>>           self.console_wait_send("Start sshd(8)", "yes\n")
>>> -        self.console_wait_send("X Window System", "\n")
>>> -        self.console_wait_send("xenodm", "\n")
>>> +        self.console_wait_send("X Window System", "no\n")
>>
>> Wasn't this useful to link a X11-ready binary, even if only testing
>> with -display=none?
>
> tests/vm/openbsd later installs sdl2 and gtk+3, so I assume that will 
> pull in the required libraries if necessary, without all the other 
> non-necessary stuff.


No, it will not. If you want sdl2 / gtk+3 you have to have X enabled.
Re: [PATCH 1/2] tests/vm: skip X11 in openbsd installation
Posted by Daniel P. Berrangé 2 years, 10 months ago
On Wed, Mar 22, 2023 at 11:20:08AM -0400, Brad Smith wrote:
> On 2023-03-22 9:40 a.m., Thomas Huth wrote:
> > On 22/03/2023 14.38, Philippe Mathieu-Daudé wrote:
> > > On 22/3/23 13:36, Daniel P. Berrangé wrote:
> > > > As a VM used only for automated testing there is no need to
> > > > install the X11 stack.
> > > > 
> > > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > > > ---
> > > >   tests/vm/openbsd | 3 +--
> > > >   1 file changed, 1 insertion(+), 2 deletions(-)
> > > > 
> > > > diff --git a/tests/vm/openbsd b/tests/vm/openbsd
> > > > index eaeb201e91..6af7afac0d 100755
> > > > --- a/tests/vm/openbsd
> > > > +++ b/tests/vm/openbsd
> > > > @@ -106,8 +106,7 @@ class OpenBSDVM(basevm.BaseVM):
> > > >           self.console_wait("Password for root account")
> > > >           self.console_send("%s\n" % self._config["root_pass"])
> > > >           self.console_wait_send("Start sshd(8)", "yes\n")
> > > > -        self.console_wait_send("X Window System", "\n")
> > > > -        self.console_wait_send("xenodm", "\n")
> > > > +        self.console_wait_send("X Window System", "no\n")
> > > 
> > > Wasn't this useful to link a X11-ready binary, even if only testing
> > > with -display=none?
> > 
> > tests/vm/openbsd later installs sdl2 and gtk+3, so I assume that will
> > pull in the required libraries if necessary, without all the other
> > non-necessary stuff.
> 
> 
> No, it will not. If you want sdl2 / gtk+3 you have to have X enabled.

That does not appear to be required for QEMU build / test scenarios,
as 'make vm-build-openbsd' succeeded and included GTK/SDL2 support
AFAICT.

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 :|


Re: [PATCH 1/2] tests/vm: skip X11 in openbsd installation
Posted by Thomas Huth 2 years, 10 months ago
On 22/03/2023 16.20, Brad Smith wrote:
> On 2023-03-22 9:40 a.m., Thomas Huth wrote:
>> On 22/03/2023 14.38, Philippe Mathieu-Daudé wrote:
>>> On 22/3/23 13:36, Daniel P. Berrangé wrote:
>>>> As a VM used only for automated testing there is no need to
>>>> install the X11 stack.
>>>>
>>>> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>>>> ---
>>>>   tests/vm/openbsd | 3 +--
>>>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>>>
>>>> diff --git a/tests/vm/openbsd b/tests/vm/openbsd
>>>> index eaeb201e91..6af7afac0d 100755
>>>> --- a/tests/vm/openbsd
>>>> +++ b/tests/vm/openbsd
>>>> @@ -106,8 +106,7 @@ class OpenBSDVM(basevm.BaseVM):
>>>>           self.console_wait("Password for root account")
>>>>           self.console_send("%s\n" % self._config["root_pass"])
>>>>           self.console_wait_send("Start sshd(8)", "yes\n")
>>>> -        self.console_wait_send("X Window System", "\n")
>>>> -        self.console_wait_send("xenodm", "\n")
>>>> +        self.console_wait_send("X Window System", "no\n")
>>>
>>> Wasn't this useful to link a X11-ready binary, even if only testing
>>> with -display=none?
>>
>> tests/vm/openbsd later installs sdl2 and gtk+3, so I assume that will pull 
>> in the required libraries if necessary, without all the other 
>> non-necessary stuff.
> 
> No, it will not. If you want sdl2 / gtk+3 you have to have X enabled.

I meant for compiling, not for running QEMU... and we're only running in 
non-graphical mode here later, so I hope that should be fine.

  Thomas


Re: [PATCH 1/2] tests/vm: skip X11 in openbsd installation
Posted by Philippe Mathieu-Daudé 2 years, 10 months ago
On 22/3/23 14:40, Thomas Huth wrote:
> On 22/03/2023 14.38, Philippe Mathieu-Daudé wrote:
>> On 22/3/23 13:36, Daniel P. Berrangé wrote:
>>> As a VM used only for automated testing there is no need to
>>> install the X11 stack.
>>>
>>> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>>> ---
>>>   tests/vm/openbsd | 3 +--
>>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/tests/vm/openbsd b/tests/vm/openbsd
>>> index eaeb201e91..6af7afac0d 100755
>>> --- a/tests/vm/openbsd
>>> +++ b/tests/vm/openbsd
>>> @@ -106,8 +106,7 @@ class OpenBSDVM(basevm.BaseVM):
>>>           self.console_wait("Password for root account")
>>>           self.console_send("%s\n" % self._config["root_pass"])
>>>           self.console_wait_send("Start sshd(8)",           "yes\n")
>>> -        self.console_wait_send("X Window System",         "\n")
>>> -        self.console_wait_send("xenodm",                  "\n")
>>> +        self.console_wait_send("X Window System",         "no\n")
>>
>> Wasn't this useful to link a X11-ready binary, even if only testing
>> with -display=none?
> 
> tests/vm/openbsd later installs sdl2 and gtk+3, so I assume that will 
> pull in the required libraries if necessary, without all the other 
> non-necessary stuff.

Good then, thanks for checking!

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Re: [PATCH 1/2] tests/vm: skip X11 in openbsd installation
Posted by Thomas Huth 2 years, 10 months ago
On 22/03/2023 13.36, Daniel P. Berrangé wrote:
> As a VM used only for automated testing there is no need to
> install the X11 stack.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   tests/vm/openbsd | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tests/vm/openbsd b/tests/vm/openbsd
> index eaeb201e91..6af7afac0d 100755
> --- a/tests/vm/openbsd
> +++ b/tests/vm/openbsd
> @@ -106,8 +106,7 @@ class OpenBSDVM(basevm.BaseVM):
>           self.console_wait("Password for root account")
>           self.console_send("%s\n" % self._config["root_pass"])
>           self.console_wait_send("Start sshd(8)",           "yes\n")
> -        self.console_wait_send("X Window System",         "\n")
> -        self.console_wait_send("xenodm",                  "\n")
> +        self.console_wait_send("X Window System",         "no\n")
>           self.console_wait_send("console to com0",         "\n")
>           self.console_wait_send("Which speed",             "\n")
>   

Reviewed-by: Thomas Huth <thuth@redhat.com>