Skip to contentSkip to conversation

tests/vm/freebsd: Increase code coverage

PATCH In review Philippe Mathieu-Daudé 4 participants 9 messages May 31, 2021 – Nov 6, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/vm/freebsd: Increase code coverage

Install more dependencies to increase code coverage.

---
 tests/vm/freebsd | 5 +++++
 1 file changed, 5 insertions(+)
tests/vm/freebsd +5 -0
index 6e20e843228..85049b43136 100755
@@ -46,7 +46,9 @@ class FreeBSDVM(basevm.BaseVM):
         "gettext",
 
         # libs: crypto
+        "cyrus-sasl",
         "gnutls",
+        "nettle",
 
         # libs: images
         "jpeg-turbo",
@@ -56,6 +58,7 @@ class FreeBSDVM(basevm.BaseVM):
         "sdl2",
         "gtk3",
         "libxkbcommon",
+        "pixman",
 
         # libs: opengl
         "libepoxy",
@@ -63,6 +66,8 @@ class FreeBSDVM(basevm.BaseVM):
 
         # libs: migration
         "zstd",
+
+        "usbredir",
     ]
 
     # TODO: Enable gnutls again once FreeBSD's libtasn1 got fixed
Signature · 1 line
2.26.3
#1 lore raw

Hi,

Quoted 6 lines · Philippe Mathieu-Daudé

Install more dependencies to increase code coverage.

---
  tests/vm/freebsd | 5 +++++
  1 file changed, 5 insertions(+)

With or without this patch I got an error when make vm-build-freebsd. It fails to install packages.

For example, with this patch I got:

< Output omitted>

### Installing packages ...
Failed to prepare guest environment
Traceback (most recent call last):
  File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 634, in main
    return vm.build_image(args.image)
  File "/home/wmoschet/src/qemu/tests/vm/freebsd", line 206, in build_image
    self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs))
  File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 255, in ssh_root_check
    self._ssh_do(self._config["root_user"], cmd, True)
  File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 242, in _ssh_do
    raise Exception("SSH command failed: %s" % cmd)
Exception: SSH command failed: pkg install -y git pkgconf bzip2 python37 ninja bash gmake gsed gettext cyrus-sasl gnutls nettle jpeg-turbo png sdl2 gtk3 libxkbcommon pixman libepoxy mesa-libs zstd usbredir

Is it a known issue?

Quoted 32 lines
tests/vm/freebsd +5 -0
index 6e20e843228..85049b43136 100755
@@ -46,7 +46,9 @@ class FreeBSDVM(basevm.BaseVM):
          "gettext",
 
          # libs: crypto
+        "cyrus-sasl",
          "gnutls",
+        "nettle",
 
          # libs: images
          "jpeg-turbo",
@@ -56,6 +58,7 @@ class FreeBSDVM(basevm.BaseVM):
          "sdl2",
          "gtk3",
          "libxkbcommon",
+        "pixman",
 
          # libs: opengl
          "libepoxy",
@@ -63,6 +66,8 @@ class FreeBSDVM(basevm.BaseVM):
 
          # libs: migration
          "zstd",
+
+        "usbredir",
      ]
 
      # TODO: Enable gnutls again once FreeBSD's libtasn1 got fixed
#2 lore raw
Quoted 33 lines · Wainer dos Santos Moschetta

Hi,

Quoted 6 lines · Philippe Mathieu-Daudé

Install more dependencies to increase code coverage.

---
  tests/vm/freebsd | 5 +++++

  1 file changed, 5 insertions(+)

With or without this patch I got an error when make vm-build-freebsd. It fails to install packages.

For example, with this patch I got:

< Output omitted>

### Installing packages ...
Failed to prepare guest environment
Traceback (most recent call last):
  File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 634, in main return vm.build_image(args.image)
  File "/home/wmoschet/src/qemu/tests/vm/freebsd", line 206, in build_image self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs)) File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 255, in ssh_root_check
    self._ssh_do(self._config["root_user"], cmd, True)
  File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 242, in _ssh_do raise Exception("SSH command failed: %s" % cmd)
Exception: SSH command failed: pkg install -y git pkgconf bzip2 python37 ninja bash gmake gsed gettext cyrus-sasl gnutls nettle jpeg-turbo png sdl2 gtk3 libxkbcommon pixman libepoxy mesa-libs zstd usbredir

Quoted 1 line

Is it a known issue?

I'll defer that to Warner, I suppose the package repository got updated and I am not hitting that because my VM installed them earlier? (Similar to the problems with Docker packages). Is there a way to use a snapshot mirror of FreeBSD packages?

#3 lore raw
Quoted 38 lines · Philippe Mathieu-Daudé
Quoted 33 lines · Wainer dos Santos Moschetta

Hi,

Quoted 6 lines · Philippe Mathieu-Daudé

Install more dependencies to increase code coverage.

---
  tests/vm/freebsd | 5 +++++
  1 file changed, 5 insertions(+)

With or without this patch I got an error when make vm-build-freebsd. It fails to install packages.

For example, with this patch I got:

< Output omitted>

### Installing packages ...
Failed to prepare guest environment
Traceback (most recent call last):
File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 634, in main
return vm.build_image(args.image)
File "/home/wmoschet/src/qemu/tests/vm/freebsd", line 206, in build_image

    self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs))
  File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 255, in
ssh_root_check
    self._ssh_do(self._config["root_user"], cmd, True)

File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 242, in _ssh_do
raise Exception("SSH command failed: %s" % cmd)
Exception: SSH command failed: pkg install -y git pkgconf bzip2 python37 ninja bash gmake gsed gettext cyrus-sasl gnutls nettle jpeg-turbo png sdl2 gtk3 libxkbcommon pixman libepoxy mesa-libs zstd usbredir

Quoted 6 lines
Quoted 1 line

Is it a known issue?

I'll defer that to Warner, I suppose the package repository got updated and I am not hitting that because my VM installed them earlier? (Similar to the problems with Docker packages). Is there a way to use a snapshot mirror of FreeBSD packages?

I’m still trying to replicate this, but I do know FreeBSD’s packages moved from python 3.7 to 3.8 by default recently….

Warner

#4 lore raw
Quoted 44 lines · Warner Losh
Quoted 41 lines · Philippe Mathieu-Daudé
Quoted 34 lines · Wainer dos Santos Moschetta

Hi,

Quoted 6 lines · Philippe Mathieu-Daudé

Install more dependencies to increase code coverage.

---
 tests/vm/freebsd | 5 +++++
 1 file changed, 5 insertions(+)

With or without this patch I got an error when make vm-build-freebsd. It fails to install packages.

For example, with this patch I got:

< Output omitted>

### Installing packages ...
Failed to prepare guest environment
Traceback (most recent call last):
File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 634, in main
return vm.build_image(args.image)
File "/home/wmoschet/src/qemu/tests/vm/freebsd", line 206, in build_image
self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs))
File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 255, in
ssh_root_check
self._ssh_do(self._config["root_user"], cmd, True)
File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 242, in _ssh_do
raise Exception("SSH command failed: %s" % cmd)
Exception: SSH command failed: pkg install -y git pkgconf bzip2 python37 ninja bash gmake gsed gettext cyrus-sasl gnutls nettle jpeg-turbo png sdl2 gtk3 libxkbcommon pixman libepoxy mesa-libs zstd usbredir

Is it a known issue?

Quoted 7 lines
Quoted 4 lines

I'll defer that to Warner, I suppose the package repository got updated and I am not hitting that because my VM installed them earlier? (Similar to the problems with Docker packages). Is there a way to use a snapshot mirror of FreeBSD packages?

I’m still trying to replicate this, but I do know FreeBSD’s packages moved from python 3.7 to 3.8 by default recently….

It’s not this… I’m seeing inability to pull from the pkg repo, I think, as the root cause… Still unclear why… Sometimes it dies part way into the download. I’ve not yet worked out why it gets to different spots different times.

Warner

#5 lore raw
In reply to Wainer dos Santos Moschetta
Quoted 33 lines · Wainer dos Santos Moschetta

Hi,

Quoted 6 lines · Philippe Mathieu-Daudé

Install more dependencies to increase code coverage.

---
  tests/vm/freebsd | 5 +++++
  1 file changed, 5 insertions(+)

With or without this patch I got an error when make vm-build-freebsd. It fails to install packages.

For example, with this patch I got:

< Output omitted>

### Installing packages ...
Failed to prepare guest environment
Traceback (most recent call last):
  File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 634, in main return vm.build_image(args.image)
  File "/home/wmoschet/src/qemu/tests/vm/freebsd", line 206, in build_image self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs)) File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 255, in ssh_root_check
    self._ssh_do(self._config["root_user"], cmd, True)
  File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 242, in _ssh_do raise Exception("SSH command failed: %s" % cmd)
Exception: SSH command failed: pkg install -y git pkgconf bzip2 python37 ninja bash gmake gsed gettext cyrus-sasl gnutls nettle jpeg-turbo png sdl2 gtk3 libxkbcommon pixman libepoxy mesa-libs zstd usbredir

Quoted 1 line

Is it a known issue?

Hard to actually tell what the error really is. This message is only giving the command that was invoked, but seems to have thrown away stdout/stderr which would have the messages telling us what went wrong. This lack of error reporting in basevm.py so badly needs to be fixed, otherwise we're working blind when debugging failures.

Regards,
Daniel

Signature · 3 lines
|: 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 :|
#6 lore raw
Quoted 34 lines · Daniel P. Berrangé
Quoted 33 lines · Wainer dos Santos Moschetta

Hi,

Quoted 6 lines · Philippe Mathieu-Daudé

Install more dependencies to increase code coverage.

---
  tests/vm/freebsd | 5 +++++
  1 file changed, 5 insertions(+)

With or without this patch I got an error when make vm-build-freebsd. It fails to install packages.

For example, with this patch I got:

< Output omitted>

### Installing packages ...
Failed to prepare guest environment
Traceback (most recent call last):
  File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 634, in main return vm.build_image(args.image)
  File "/home/wmoschet/src/qemu/tests/vm/freebsd", line 206, in build_image self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs)) File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 255, in ssh_root_check
    self._ssh_do(self._config["root_user"], cmd, True)
  File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 242, in _ssh_do raise Exception("SSH command failed: %s" % cmd)
Exception: SSH command failed: pkg install -y git pkgconf bzip2 python37 ninja bash gmake gsed gettext cyrus-sasl gnutls nettle jpeg-turbo png sdl2 gtk3 libxkbcommon pixman libepoxy mesa-libs zstd usbredir

Quoted 8 lines
Quoted 1 line

Is it a known issue?

Hard to actually tell what the error really is. This message is only giving the command that was invoked, but seems to have thrown away stdout/stderr which would have the messages telling us what went wrong. This lack of error reporting in basevm.py so badly needs to be fixed, otherwise we're working blind when debugging failures.

Hmm, when I try the same command, it *does* print all the output so you can see what's going on, but it doesn't actually fail for me either (without this patch).

Regards,
Daniel

Signature · 3 lines
|: 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 :|
#7 lore raw

Hi,

Quoted 41 lines · Daniel P. Berrangé
Quoted 33 lines · Daniel P. Berrangé
Quoted 32 lines · Wainer dos Santos Moschetta

Hi,

Quoted 6 lines · Philippe Mathieu-Daudé

Install more dependencies to increase code coverage.

---
   tests/vm/freebsd | 5 +++++
   1 file changed, 5 insertions(+)

With or without this patch I got an error when make vm-build-freebsd. It fails to install packages.

For example, with this patch I got:

< Output omitted>

### Installing packages ...
Failed to prepare guest environment
Traceback (most recent call last):
  File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 634, in main return vm.build_image(args.image)
  File "/home/wmoschet/src/qemu/tests/vm/freebsd", line 206, in build_image self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs)) File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 255, in
ssh_root_check
    self._ssh_do(self._config["root_user"], cmd, True)
  File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 242, in _ssh_do raise Exception("SSH command failed: %s" % cmd)
Exception: SSH command failed: pkg install -y git pkgconf bzip2 python37 ninja bash gmake gsed gettext cyrus-sasl gnutls nettle jpeg-turbo png sdl2 gtk3 libxkbcommon pixman libepoxy mesa-libs zstd usbredir

Quoted 7 lines
Quoted 1 line

Is it a known issue?

Hard to actually tell what the error really is. This message is only giving the command that was invoked, but seems to have thrown away stdout/stderr which would have the messages telling us what went wrong. This lack of error reporting in basevm.py so badly needs to be fixed, otherwise we're working blind when debugging failures.

Quoted 3 lines

Hmm, when I try the same command, it *does* print all the output so you can see what's going on, but it doesn't actually fail for me either (without this patch).

Thomas sent me a message in private while ago that the error could be related with the amount of ssh keys in my agent-ssh. I didn' t check that hypothesis yet; will debug a littler further and let you all posted.

ah, if this problem cannot be reproduced on other machines....I see no reason to hold this patch.

- Wainer

Quoted 3 lines

Regards,
Daniel

#8 lore raw
Quoted 54 lines · Wainer dos Santos Moschetta

Hi,

Quoted 47 lines · Daniel P. Berrangé
Quoted 39 lines · Daniel P. Berrangé
Quoted 37 lines · Wainer dos Santos Moschetta

Hi,

Quoted 6 lines · Philippe Mathieu-Daudé

Install more dependencies to increase code coverage.

---
   tests/vm/freebsd | 5 +++++

   1 file changed, 5 insertions(+)

With or without this patch I got an error when make vm-build-freebsd. It
fails to install packages.

For example, with this patch I got:

< Output omitted>

### Installing packages ...
Failed to prepare guest environment
Traceback (most recent call last):
   File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 634, in main return vm.build_image(args.image)
   File "/home/wmoschet/src/qemu/tests/vm/freebsd", line 206, in build_image
     self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs)) File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 255, in ssh_root_check
     self._ssh_do(self._config["root_user"], cmd, True)
   File "/home/wmoschet/src/qemu/tests/vm/basevm.py", line 242, in _ssh_do
     raise Exception("SSH command failed: %s" % cmd)
Exception: SSH command failed: pkg install -y git pkgconf bzip2 python37
ninja bash gmake gsed gettext cyrus-sasl gnutls nettle jpeg-turbo png sdl2
gtk3 libxkbcommon pixman libepoxy mesa-libs zstd usbredir

Quoted 7 lines
Quoted 1 line

Is it a known issue?

Hard to actually tell what the error really is. This message is only giving the command that was invoked, but seems to have thrown away stdout/stderr which would have the messages telling us what went wrong.  This lack of error reporting in basevm.py so badly needs to be fixed, otherwise we're working blind when debugging failures.

Quoted 3 lines

Hmm, when I try the same command, it *does* print all the output so you can see what's going on, but it doesn't actually fail for me either (without this patch).

Quoted 6 lines

Thomas sent me a message in private while ago that the error could be related with the amount of ssh keys in my agent-ssh. I didn' t check that hypothesis yet; will debug a littler further and let you all posted.

ah, if this problem cannot be reproduced on other machines....I see no reason to hold this patch.

OK thank you!