Skip to contentSkip to conversation

some tests/vm fixes

PATCH In review Alex Bennée 2 participants 7 messages Nov 22, 2019

lore
Share & tools
lore
#0 lore raw

cover some tests/vm fixes

Hi,

These fixes are aimed at improving the "vm-build-all" make target. The first two are fairly non contriversal tweaks to the base configuration. The final one just elides over the fact that the tests are broken on 32bit 16.04 - but I think it may be a distro problem as I've failed to replicate on my other 32 bit OSes. If anyone else wants to figure out whats going on then be my guest ;-)

Alex Bennée (3):
tests/vm/centos: fix centos build target tests/vm/ubuntu: include language pack to silence locale warnings tests/vm/ubuntu: update i386 image to 18.04

 tests/vm/centos      | 2 +-
 tests/vm/ubuntu.i386 | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/3 tests/vm/centos: fix centos build target

To be able to run the docker tests centos has here we have to install python3 as well as the basic tools.

---
 tests/vm/centos | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/vm/centos +1 -1
index 53976f1c4c9..b9e851f2d33 100755
@@ -73,7 +73,7 @@ class CentosVM(basevm.BaseVM):
         self.wait_ssh()
         self.ssh_root_check("touch /etc/cloud/cloud-init.disabled")
         self.ssh_root_check("yum update -y")
-        self.ssh_root_check("yum install -y docker make git")
+        self.ssh_root_check("yum install -y docker make git python3")
         self.ssh_root_check("systemctl enable docker")
         self.ssh_root("poweroff")
         self.wait()
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/3 tests/vm/ubuntu: include language pack to silence locale warnings

In reply to Alex Bennée

The iotests in particular don't like the output being spammed with warnings about locales.

---
 tests/vm/ubuntu.i386 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/vm/ubuntu.i386 +1 -1
index 38f740eabf7..18b1ea2b72c 100755
@@ -84,7 +84,7 @@ class UbuntuX86VM(basevm.BaseVM):
         self.ssh_root_check("sed -ie s/^#\ deb-src/deb-src/g /etc/apt/sources.list")
         self.ssh_root_check("apt-get update")
         self.ssh_root_check("apt-get build-dep -y qemu")
-        self.ssh_root_check("apt-get install -y libfdt-dev flex bison")
+        self.ssh_root_check("apt-get install -y libfdt-dev flex bison language-pack-en")
         self.ssh_root("poweroff")
         self.wait()
         os.rename(img_tmp, img)
Signature · 1 line
2.20.1
Reviewed-by on v1 2/3
#3 lore raw

Re: [PATCH v1 2/3] tests/vm/ubuntu: include language pack to silence locale warnings

Quoted 14 lines · Alex Bennée

The iotests in particular don't like the output being spammed with warnings about locales.

---
  tests/vm/ubuntu.i386 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tests/vm/ubuntu.i386 +0 -0
index 38f740eabf7..18b1ea2b72c 100755

tests/vm/ubuntu.i386 class UbuntuX86VM(basevm.BaseVM): · line 90

Quoted 8 lines
tests/vm/ubuntu.i386 +1 -1
@@ -84,7 +84,7 @@ class UbuntuX86VM(basevm.BaseVM):
          self.ssh_root_check("sed -ie s/^#\ deb-src/deb-src/g /etc/apt/sources.list")
          self.ssh_root_check("apt-get update")
          self.ssh_root_check("apt-get build-dep -y qemu")
-        self.ssh_root_check("apt-get install -y libfdt-dev flex bison")
+        self.ssh_root_check("apt-get install -y libfdt-dev flex bison language-pack-en")
          self.ssh_root("poweroff")
          self.wait()
          os.rename(img_tmp, img)
#4 lore raw

PATCH 3/3 tests/vm/ubuntu: update i386 image to 18.04

In reply to Alex Bennée

The current image is broken while running qtests but the bug go away when built with a newer Ubuntu i386 image. I was unable to replicate the crash on Debian Buster for i386 either so I'm concluding it is a distro problem. Let's paper over that crack by updating our 32 bir test image.

---
 tests/vm/ubuntu.i386 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/vm/ubuntu.i386 +2 -2
index 18b1ea2b72c..f611bebdc9d 100755
@@ -66,8 +66,8 @@ class UbuntuX86VM(basevm.BaseVM):
 
     def build_image(self, img):
         cimg = self._download_with_cache(
-            "https://cloud-images.ubuntu.com/releases/16.04/release-20190605/ubuntu-16.04-server-cloudimg-i386-disk1.img",
-            sha256sum="e30091144c73483822b7c27193e9d47346dd1064229da577c3fedcf943f7cfcc")
+            "https://cloud-images.ubuntu.com/releases/bionic/release-20191114/ubuntu-18.04-server-cloudimg-i386.img",
+            sha256sum="28969840626d1ea80bb249c08eef1a4533e8904aa51a327b40f37ac4b4ff04ef")
         img_tmp = img + ".tmp"
         subprocess.check_call(["cp", "-f", cimg, img_tmp])
         subprocess.check_call(["qemu-img", "resize", img_tmp, "50G"])
Signature · 1 line
2.20.1
Reviewed-by on v1 3/3
#5 lore raw

Re: [PATCH v1 3/3] tests/vm/ubuntu: update i386 image to 18.04

Quoted 4 lines · Alex Bennée

The current image is broken while running qtests but the bug go away when built with a newer Ubuntu i386 image. I was unable to replicate the crash on Debian Buster for i386 either so I'm concluding it is a distro problem. Let's paper over that crack by updating our 32 bir

typo "our 32 bit"

Quoted 12 lines

test image.

---
  tests/vm/ubuntu.i386 | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
tests/vm/ubuntu.i386 +0 -0
index 18b1ea2b72c..f611bebdc9d 100755

tests/vm/ubuntu.i386 class UbuntuX86VM(basevm.BaseVM): · line 70

Quoted 5 lines
tests/vm/ubuntu.i386 +0 -2
@@ -66,8 +66,8 @@ class UbuntuX86VM(basevm.BaseVM):
 
      def build_image(self, img):
          cimg = self._download_with_cache(
-            "https://cloud-images.ubuntu.com/releases/16.04/release-20190605/ubuntu-16.04-server-cloudimg-i386-disk1.img",
-            sha256sum="e30091144c73483822b7c27193e9d47346dd1064229da577c3fedcf943f7cfcc")

This one is in QCow2 format.

tests/vm/ubuntu.i386 class UbuntuX86VM(basevm.BaseVM): · line 70

Quoted 2 lines
tests/vm/ubuntu.i386 +2 -0
+            "https://cloud-images.ubuntu.com/releases/bionic/release-20191114/ubuntu-18.04-server-cloudimg-i386.img",
+            sha256sum="28969840626d1ea80bb249c08eef1a4533e8904aa51a327b40f37ac4b4ff04ef")

This one is announced as USB format (ISO) but is in QCow2 format too...

Using '18.04' instead of 'bionic' in the URL is not important because the information is also in the filename.

Quoted 4 lines
tests/vm/ubuntu.i386 +0 -0
          img_tmp = img + ".tmp"
          subprocess.check_call(["cp", "-f", cimg, img_tmp])
          subprocess.check_call(["qemu-img", "resize", img_tmp, "50G"])
#6 lore raw

Re: [PATCH v1 3/3] tests/vm/ubuntu: update i386 image to 18.04

Quoted 25 lines · Philippe Mathieu-Daudé
Quoted 4 lines · Alex Bennée

The current image is broken while running qtests but the bug go away when built with a newer Ubuntu i386 image. I was unable to replicate the crash on Debian Buster for i386 either so I'm concluding it is a distro problem. Let's paper over that crack by updating our 32 bir

typo "our 32 bit"

Quoted 10 lines

test image.

---
  tests/vm/ubuntu.i386 | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
tests/vm/ubuntu.i386 +0 -0
index 18b1ea2b72c..f611bebdc9d 100755

tests/vm/ubuntu.i386 class UbuntuX86VM(basevm.BaseVM): · line 69

Quoted 4 lines
tests/vm/ubuntu.i386 +0 -2
@@ -66,8 +66,8 @@ class UbuntuX86VM(basevm.BaseVM):
        def build_image(self, img):
          cimg = self._download_with_cache(
-            "https://cloud-images.ubuntu.com/releases/16.04/release-20190605/ubuntu-16.04-server-cloudimg-i386-disk1.img",
-            sha256sum="e30091144c73483822b7c27193e9d47346dd1064229da577c3fedcf943f7cfcc")

This one is in QCow2 format.

Quoted 5 lines

tests/vm/ubuntu.i386 class UbuntuX86VM(basevm.BaseVM): · line 70

Quoted 2 lines
tests/vm/ubuntu.i386 +2 -0
+            "https://cloud-images.ubuntu.com/releases/bionic/release-20191114/ubuntu-18.04-server-cloudimg-i386.img",
+            sha256sum="28969840626d1ea80bb249c08eef1a4533e8904aa51a327b40f37ac4b4ff04ef")

This one is announced as USB format (ISO) but is in QCow2 format too...

heh I never noticed. It worked though ;-)

Quoted 4 lines

Using '18.04' instead of 'bionic' in the URL is not important because the information is also in the filename.

Thanks.

Quoted 5 lines
Quoted 5 lines
tests/vm/ubuntu.i386 +0 -0
          img_tmp = img + ".tmp"
          subprocess.check_call(["cp", "-f", cimg, img_tmp])
          subprocess.check_call(["qemu-img", "resize", img_tmp, "50G"])
 
Signature · 1 line
Alex Bennée