All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/13] Improve reliability of VM tests
@ 2022-07-07  4:02 John Snow
  2022-07-07  4:02 ` [PATCH v3 01/13] qga: treat get-guest-fsinfo as "best effort" John Snow
                   ` (12 more replies)
  0 siblings, 13 replies; 31+ messages in thread
From: John Snow @ 2022-07-07  4:02 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	John Snow

Note: patches 11-13 are included for testing simplicity, they shouldn't
be merged. They will be included in a forthcoming block PR.

This patch series attempts to improve the reliability of several of the
VM test targets. In particular, both CentOS 8 tests are non-functional
because CentOS 8 was EOL at the beginning of this calendar year, with
repositories and mirrors going offline.

I also remove the ubuntu.i386 test because we no longer support Ubuntu
18.04 nor do we have explicit need of an i386 build test.

After this series, I am able to successfully run every VM target on an
x86_64 host, except:

- ubuntu.aarch64: Hangs often during testing, see below.
- centos.aarch64: Hangs often during testing, see below.
- haiku.x86_64: Build failures not addressed by this series, see
  https://lists.gnu.org/archive/html/qemu-devel/2022-06/msg02103.html

The unit tests that I see fail most often under aarch64 are:

- virtio-net-failover: Seems to like to hang on openbsd
- migration-test: Tends to hang under aarch64 tcg

Future work (next version? next series?);

- Try to get centos.aarch64 working reliably under TCG
- Upgrade ubuntu.aarch64 to 20.04 after fixing centos.aarch64
- Fix the Haiku build test, if possible.
- Ensure I can reliably run and pass "make vm-build-all".
  (Remove VMs from this recipe if necessary.)

John Snow (12):
  qga: treat get-guest-fsinfo as "best effort"
  tests/vm: use 'cp' instead of 'ln' for temporary vm images
  tests/vm: switch CentOS 8 to CentOS 8 Stream
  tests/vm: switch centos.aarch64 to CentOS 8 Stream
  tests/vm: update sha256sum for ubuntu.aarch64
  tests/vm: remove ubuntu.i386 VM test
  tests/vm: remove duplicate 'centos' VM test
  tests/vm: add 1GB extra memory per core
  tests/vm: upgrade Ubuntu 18.04 VM to 20.04
  tests/vm: Remove docker cross-compile test from CentOS VM
  tests/qemu-iotests: hotfix for 307, 223 output
  tests/qemu-iotests: skip 108 when FUSE is not loaded

Vladimir Sementsov-Ogievskiy (1):
  iotests: fix copy-before-write for macOS and FreeBSD

 qga/commands-posix.c                       |   7 +-
 tests/qemu-iotests/108                     |   5 +
 tests/qemu-iotests/223.out                 |   4 +-
 tests/qemu-iotests/307.out                 |   4 +-
 tests/qemu-iotests/tests/copy-before-write |   5 +
 tests/vm/Makefile.include                  |   5 +-
 tests/vm/basevm.py                         |   5 +
 tests/vm/centos                            |   9 +-
 tests/vm/centos.aarch64                    | 174 +++------------------
 tests/vm/ubuntu.aarch64                    |  10 +-
 tests/vm/ubuntu.i386                       |  40 -----
 11 files changed, 62 insertions(+), 206 deletions(-)
 delete mode 100755 tests/vm/ubuntu.i386

-- 
2.34.3




^ permalink raw reply	[flat|nested] 31+ messages in thread

* [PATCH v3 01/13] qga: treat get-guest-fsinfo as "best effort"
  2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
@ 2022-07-07  4:02 ` John Snow
  2022-07-07  8:17   ` Daniel P. Berrangé
  2022-07-07  8:40   ` Marc-André Lureau
  2022-07-07  4:02 ` [PATCH v3 02/13] tests/vm: use 'cp' instead of 'ln' for temporary vm images John Snow
                   ` (11 subsequent siblings)
  12 siblings, 2 replies; 31+ messages in thread
From: John Snow @ 2022-07-07  4:02 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	John Snow

In some container environments, there may be references to block devices
witnessable from a container through /proc/self/mountinfo that reference
devices we simply don't have access to in the container, and cannot
provide information about.

Instead of failing the entire fsinfo command, return stub information
for these failed lookups.

This allows test-qga to pass under docker tests, which are in turn used
by the CentOS VM tests.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 qga/commands-posix.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 0469dc409d4..950c9d72fe7 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -1207,7 +1207,12 @@ static void build_guest_fsinfo_for_device(char const *devpath,
 
     syspath = realpath(devpath, NULL);
     if (!syspath) {
-        error_setg_errno(errp, errno, "realpath(\"%s\")", devpath);
+        if (errno == ENOENT) {
+            /* This devpath may not exist because of container config, etc. */
+            fs->name = g_path_get_basename(devpath);
+        } else {
+            error_setg_errno(errp, errno, "realpath(\"%s\")", devpath);
+        }
         return;
     }
 
-- 
2.34.3



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH v3 02/13] tests/vm: use 'cp' instead of 'ln' for temporary vm images
  2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
  2022-07-07  4:02 ` [PATCH v3 01/13] qga: treat get-guest-fsinfo as "best effort" John Snow
@ 2022-07-07  4:02 ` John Snow
  2022-07-07  8:18   ` Daniel P. Berrangé
  2022-07-07  4:03 ` [PATCH v3 03/13] tests/vm: switch CentOS 8 to CentOS 8 Stream John Snow
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 31+ messages in thread
From: John Snow @ 2022-07-07  4:02 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	John Snow

If the initial setup fails, you've permanently altered the state of the
downloaded image in an unknowable way. Use 'cp' like our other test
setup scripts do.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 tests/vm/centos | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/vm/centos b/tests/vm/centos
index 5c7bc1c1a9a..be4f6ff2f14 100755
--- a/tests/vm/centos
+++ b/tests/vm/centos
@@ -34,7 +34,7 @@ class CentosVM(basevm.BaseVM):
     def build_image(self, img):
         cimg = self._download_with_cache("https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.3.2011-20201204.2.x86_64.qcow2")
         img_tmp = img + ".tmp"
-        subprocess.check_call(["ln", "-f", cimg, img_tmp])
+        subprocess.check_call(['cp', '-f', cimg, img_tmp])
         self.exec_qemu_img("resize", img_tmp, "50G")
         self.boot(img_tmp, extra_args = ["-cdrom", self.gen_cloud_init_iso()])
         self.wait_ssh()
-- 
2.34.3



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH v3 03/13] tests/vm: switch CentOS 8 to CentOS 8 Stream
  2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
  2022-07-07  4:02 ` [PATCH v3 01/13] qga: treat get-guest-fsinfo as "best effort" John Snow
  2022-07-07  4:02 ` [PATCH v3 02/13] tests/vm: use 'cp' instead of 'ln' for temporary vm images John Snow
@ 2022-07-07  4:03 ` John Snow
  2022-07-07  8:18   ` Daniel P. Berrangé
  2022-07-07  4:03 ` [PATCH v3 04/13] tests/vm: switch centos.aarch64 " John Snow
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 31+ messages in thread
From: John Snow @ 2022-07-07  4:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	John Snow

The old CentOS image didn't work anymore because it was already EOL at
the beginning of 2022.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 tests/vm/centos | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/vm/centos b/tests/vm/centos
index be4f6ff2f14..3a527c47b3d 100755
--- a/tests/vm/centos
+++ b/tests/vm/centos
@@ -1,8 +1,8 @@
 #!/usr/bin/env python3
 #
-# CentOS image
+# CentOS 8 Stream image
 #
-# Copyright 2018 Red Hat Inc.
+# Copyright 2018, 2022 Red Hat Inc.
 #
 # Authors:
 #  Fam Zheng <famz@redhat.com>
@@ -32,7 +32,7 @@ class CentosVM(basevm.BaseVM):
     """
 
     def build_image(self, img):
-        cimg = self._download_with_cache("https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.3.2011-20201204.2.x86_64.qcow2")
+        cimg = self._download_with_cache("https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220125.1.x86_64.qcow2")
         img_tmp = img + ".tmp"
         subprocess.check_call(['cp', '-f', cimg, img_tmp])
         self.exec_qemu_img("resize", img_tmp, "50G")
-- 
2.34.3



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH v3 04/13] tests/vm: switch centos.aarch64 to CentOS 8 Stream
  2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
                   ` (2 preceding siblings ...)
  2022-07-07  4:03 ` [PATCH v3 03/13] tests/vm: switch CentOS 8 to CentOS 8 Stream John Snow
@ 2022-07-07  4:03 ` John Snow
  2022-07-07  8:22   ` Daniel P. Berrangé
  2022-07-07  4:03 ` [PATCH v3 05/13] tests/vm: update sha256sum for ubuntu.aarch64 John Snow
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 31+ messages in thread
From: John Snow @ 2022-07-07  4:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	John Snow

Switch this test over to using a cloud image like the base CentOS8 VM
test, which helps make this script a bit simpler too.

Note: At time of writing, this test seems pretty flaky when run without
KVM support for aarch64. Certain unit tests like migration-test,
virtio-net-failover, test-hmp and qom-test seem quite prone to fail
under TCG. Still, this is an improvement in that at least pure build
tests are functional.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/vm/centos.aarch64 | 174 ++++++----------------------------------
 1 file changed, 24 insertions(+), 150 deletions(-)

diff --git a/tests/vm/centos.aarch64 b/tests/vm/centos.aarch64
index 96c450f8be5..2de7ef6992c 100755
--- a/tests/vm/centos.aarch64
+++ b/tests/vm/centos.aarch64
@@ -20,150 +20,38 @@ import time
 import traceback
 import aarch64vm
 
+
 DEFAULT_CONFIG = {
     'cpu'          : "max",
     'machine'      : "virt,gic-version=max",
-    'install_cmds' : "yum install -y make ninja-build git python3 gcc gcc-c++ flex bison, "\
-        "yum install -y glib2-devel perl pixman-devel zlib-devel, "\
-        "alternatives --set python /usr/bin/python3, "\
-        "sudo dnf config-manager "\
-        "--add-repo=https://download.docker.com/linux/centos/docker-ce.repo,"\
-        "sudo dnf install --nobest -y docker-ce.aarch64,"\
-        "systemctl enable docker",
+    'install_cmds' : (
+        "dnf config-manager --set-enabled powertools, "
+        "dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo, "
+        "dnf install -y make ninja-build git python38 gcc gcc-c++ flex bison "\
+            "glib2-devel perl pixman-devel zlib-devel docker-ce.aarch64, "
+        "systemctl enable docker, "
+    ),
     # We increase beyond the default time since during boot
     # it can take some time (many seconds) to log into the VM.
     'ssh_timeout'  : 60,
 }
 
+
 class CentosAarch64VM(basevm.BaseVM):
-    name = "centos.aarch64"
+    name = "centos8.aarch64"
     arch = "aarch64"
-    login_prompt = "localhost login:"
-    prompt = '[root@localhost ~]#'
-    image_name = "CentOS-8-aarch64-1905-dvd1.iso"
-    image_link = "http://mirrors.usc.edu/pub/linux/distributions/centos/8.0.1905/isos/aarch64/"
+    image_name = "CentOS-Stream-GenericCloud-8-20220125.1.aarch64.qcow2"
+    image_link = "https://cloud.centos.org/centos/8-stream/aarch64/images/"
     image_link += image_name
     BUILD_SCRIPT = """
         set -e;
         cd $(mktemp -d);
-        sudo chmod a+r /dev/vdb;
-        tar --checkpoint=.10 -xf /dev/vdb;
+        export SRC_ARCHIVE=/dev/vdb;
+        sudo chmod a+r $SRC_ARCHIVE;
+        tar -xf $SRC_ARCHIVE;
         ./configure {configure_opts};
         make --output-sync {target} -j{jobs} {verbose};
     """
-    def set_key_perm(self):
-        """Set permissions properly on certain files to allow
-           ssh access."""
-        self.console_wait_send(self.prompt,
-                               "/usr/sbin/restorecon -R -v /root/.ssh\n")
-        self.console_wait_send(self.prompt,
-                "/usr/sbin/restorecon -R -v "\
-                "/home/{}/.ssh\n".format(self._config["guest_user"]))
-
-    def create_kickstart(self):
-        """Generate the kickstart file used to generate the centos image."""
-        # Start with the template for the kickstart.
-        ks_file = self._source_path + "/tests/vm/centos-8-aarch64.ks"
-        subprocess.check_call("cp {} ./ks.cfg".format(ks_file), shell=True)
-        # Append the ssh keys to the kickstart file
-        # as the post processing phase of installation.
-        with open("ks.cfg", "a") as f:
-            # Add in the root pw and guest user.
-            rootpw = "rootpw --plaintext {}\n"
-            f.write(rootpw.format(self._config["root_pass"]))
-            add_user = "user --groups=wheel --name={} "\
-                       "--password={} --plaintext\n"
-            f.write(add_user.format(self._config["guest_user"],
-                                    self._config["guest_pass"]))
-            # Add the ssh keys.
-            f.write("%post --log=/root/ks-post.log\n")
-            f.write("mkdir -p /root/.ssh\n")
-            addkey = 'echo "{}" >> /root/.ssh/authorized_keys\n'
-            addkey_cmd = addkey.format(self._config["ssh_pub_key"])
-            f.write(addkey_cmd)
-            f.write('mkdir -p /home/{}/.ssh\n'.format(self._config["guest_user"]))
-            addkey = 'echo "{}" >> /home/{}/.ssh/authorized_keys\n'
-            addkey_cmd = addkey.format(self._config["ssh_pub_key"],
-                                       self._config["guest_user"])
-            f.write(addkey_cmd)
-            f.write("%end\n")
-        # Take our kickstart file and create an .iso from it.
-        # The .iso will be provided to qemu as we boot
-        # from the install dvd.
-        # Anaconda will recognize the label "OEMDRV" and will
-        # start the automated installation.
-        gen_iso_img = 'genisoimage -output ks.iso -volid "OEMDRV" ks.cfg'
-        subprocess.check_call(gen_iso_img, shell=True)
-
-    def wait_for_shutdown(self):
-        """We wait for qemu to shutdown the VM and exit.
-           While this happens we display the console view
-           for easier debugging."""
-        # The image creation is essentially done,
-        # so whether or not the wait is successful we want to
-        # wait for qemu to exit (the self.wait()) before we return.
-        try:
-            self.console_wait("reboot: Power down")
-        except Exception as e:
-            sys.stderr.write("Exception hit\n")
-            if isinstance(e, SystemExit) and e.code == 0:
-                return 0
-            traceback.print_exc()
-        finally:
-            self.wait()
-
-    def build_base_image(self, dest_img):
-        """Run through the centos installer to create
-           a base image with name dest_img."""
-        # We create the temp image, and only rename
-        # to destination when we are done.
-        img = dest_img + ".tmp"
-        # Create an empty image.
-        # We will provide this as the install destination.
-        qemu_img_create = "qemu-img create {} 50G".format(img)
-        subprocess.check_call(qemu_img_create, shell=True)
-
-        # Create our kickstart file to be fed to the installer.
-        self.create_kickstart()
-        # Boot the install dvd with the params as our ks.iso
-        os_img = self._download_with_cache(self.image_link)
-        dvd_iso = "centos-8-dvd.iso"
-        subprocess.check_call(["cp", "-f", os_img, dvd_iso])
-        extra_args = "-cdrom ks.iso"
-        extra_args += " -drive file={},if=none,id=drive1,cache=writeback"
-        extra_args += " -device virtio-blk,drive=drive1,bootindex=1"
-        extra_args = extra_args.format(dvd_iso).split(" ")
-        self.boot(img, extra_args=extra_args)
-        self.console_wait_send("change the selection", "\n")
-        # We seem to need to hit esc (chr(27)) twice to abort the
-        # media check, which takes a long time.
-        # Waiting a bit seems to be more reliable before hitting esc.
-        self.console_wait("Checking")
-        time.sleep(5)
-        self.console_wait_send("Checking", chr(27))
-        time.sleep(5)
-        self.console_wait_send("Checking", chr(27))
-        print("Found Checking")
-        # Give sufficient time for the installer to create the image.
-        self.console_init(timeout=7200)
-        self.wait_for_shutdown()
-        os.rename(img, dest_img)
-        print("Done with base image build: {}".format(dest_img))
-
-    def check_create_base_img(self, img_base, img_dest):
-        """Create a base image using the installer.
-           We will use the base image if it exists.
-           This helps cut down on install time in case we
-           need to restart image creation,
-           since the base image creation can take a long time."""
-        if not os.path.exists(img_base):
-            print("Generate new base image: {}".format(img_base))
-            self.build_base_image(img_base);
-        else:
-            print("Use existing base image: {}".format(img_base))
-        # Save a copy of the base image and copy it to dest.
-        # which we will use going forward.
-        subprocess.check_call(["cp", img_base, img_dest])
 
     def boot(self, img, extra_args=None):
         aarch64vm.create_flash_images(self._tmpdir, self._efi_aarch64)
@@ -185,42 +73,28 @@ class CentosAarch64VM(basevm.BaseVM):
         super(CentosAarch64VM, self).boot(img, extra_args=extra_args)
 
     def build_image(self, img):
+        cimg = self._download_with_cache(self.image_link)
         img_tmp = img + ".tmp"
-        self.check_create_base_img(img + ".base", img_tmp)
-
-        # Boot the new image for the first time to finish installation.
-        self.boot(img_tmp)
-        self.console_init()
-        self.console_wait_send(self.login_prompt, "root\n")
-        self.console_wait_send("Password:",
-                               "{}\n".format(self._config["root_pass"]))
-
-        self.set_key_perm()
-        self.console_wait_send(self.prompt, "rpm -q centos-release\n")
-        enable_adapter = "sed -i 's/ONBOOT=no/ONBOOT=yes/g'" \
-                         " /etc/sysconfig/network-scripts/ifcfg-enp0s1\n"
-        self.console_wait_send(self.prompt, enable_adapter)
-        self.console_wait_send(self.prompt, "ifup enp0s1\n")
-        self.console_wait_send(self.prompt,
-                               'echo "qemu  ALL=(ALL) NOPASSWD:ALL" | '\
-                               'sudo tee /etc/sudoers.d/qemu\n')
-        self.console_wait(self.prompt)
-
-        # Rest of the commands we issue through ssh.
+        subprocess.run(['cp', '-f', cimg, img_tmp])
+        self.exec_qemu_img("resize", img_tmp, "50G")
+        self.boot(img_tmp, extra_args = ["-cdrom", self.gen_cloud_init_iso()])
         self.wait_ssh(wait_root=True)
+        self.ssh_root_check("touch /etc/cloud/cloud-init.disabled")
 
         # If the user chooses *not* to do the second phase,
         # then we will jump right to the graceful shutdown
         if self._config['install_cmds'] != "":
             install_cmds = self._config['install_cmds'].split(',')
             for cmd in install_cmds:
-                self.ssh_root(cmd)
+                self.ssh_root_check(cmd)
+
         self.ssh_root("poweroff")
-        self.wait_for_shutdown()
+        self.wait()
         os.rename(img_tmp, img)
         print("image creation complete: {}".format(img))
         return 0
 
+
 if __name__ == "__main__":
     defaults = aarch64vm.get_config_defaults(CentosAarch64VM, DEFAULT_CONFIG)
     sys.exit(basevm.main(CentosAarch64VM, defaults))
-- 
2.34.3



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH v3 05/13] tests/vm: update sha256sum for ubuntu.aarch64
  2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
                   ` (3 preceding siblings ...)
  2022-07-07  4:03 ` [PATCH v3 04/13] tests/vm: switch centos.aarch64 " John Snow
@ 2022-07-07  4:03 ` John Snow
  2022-07-07  8:23   ` Daniel P. Berrangé
  2022-07-07 11:03   ` Richard Henderson
  2022-07-07  4:03 ` [PATCH v3 06/13] tests/vm: remove ubuntu.i386 VM test John Snow
                   ` (7 subsequent siblings)
  12 siblings, 2 replies; 31+ messages in thread
From: John Snow @ 2022-07-07  4:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	John Snow

This checksum changes weekly; use a fixed point image and update the
checksum so we don't have to re-download it quite so much.

Note: Just like the centos.aarch64 test, this test currently seems very
flaky when run as a TCG test.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/vm/ubuntu.aarch64 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/vm/ubuntu.aarch64 b/tests/vm/ubuntu.aarch64
index b291945a7e9..fc9c2ce22ff 100755
--- a/tests/vm/ubuntu.aarch64
+++ b/tests/vm/ubuntu.aarch64
@@ -32,9 +32,13 @@ DEFAULT_CONFIG = {
 class UbuntuAarch64VM(ubuntuvm.UbuntuVM):
     name = "ubuntu.aarch64"
     arch = "aarch64"
+    # NOTE: The Ubuntu 18.04 cloud images are updated weekly. The
+    # release below has been chosen as the latest at time of writing.
+    # Using the rolling latest release means the SHA will be wrong
+    # within a week.
     image_name = "ubuntu-18.04-server-cloudimg-arm64.img"
-    image_link = "https://cloud-images.ubuntu.com/releases/18.04/release/" + image_name
-    image_sha256="0fdcba761965735a8a903d8b88df8e47f156f48715c00508e4315c506d7d3cb1"
+    image_link = "https://cloud-images.ubuntu.com/releases/bionic/release-20220610/" + image_name
+    image_sha256="0eacc5142238788365576b15f1d0b6f23dda6d3e545ee22f5306af7bd6ec47bd"
     BUILD_SCRIPT = """
         set -e;
         cd $(mktemp -d);
-- 
2.34.3



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH v3 06/13] tests/vm: remove ubuntu.i386 VM test
  2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
                   ` (4 preceding siblings ...)
  2022-07-07  4:03 ` [PATCH v3 05/13] tests/vm: update sha256sum for ubuntu.aarch64 John Snow
@ 2022-07-07  4:03 ` John Snow
  2022-07-07  8:23   ` Daniel P. Berrangé
  2022-07-07  4:03 ` [PATCH v3 07/13] tests/vm: remove duplicate 'centos' " John Snow
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 31+ messages in thread
From: John Snow @ 2022-07-07  4:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	John Snow

Ubuntu 18.04 is out of our support window, and Ubuntu 20.04 does not
support i386 anymore. The debian project does, but they do not provide
any cloud images for it, a new expect-style script would have to be
written.

Since we have i386 cross-compiler tests hosted on GitLab CI, we don't
need to support this VM test anymore.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 tests/vm/Makefile.include |  3 +--
 tests/vm/ubuntu.i386      | 40 ---------------------------------------
 2 files changed, 1 insertion(+), 42 deletions(-)
 delete mode 100755 tests/vm/ubuntu.i386

diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index 5f5b1fbfe68..a94f0ebf7f1 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -17,7 +17,7 @@ EFI_AARCH64 = $(wildcard $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd)
 
 X86_IMAGES := freebsd netbsd openbsd centos fedora haiku.x86_64
 ifneq ($(GENISOIMAGE),)
-X86_IMAGES += ubuntu.i386 centos
+X86_IMAGES += centos
 ifneq ($(EFI_AARCH64),)
 ARM64_IMAGES += ubuntu.aarch64 centos.aarch64
 endif
@@ -48,7 +48,6 @@ vm-help vm-test:
 	@echo "  vm-build-fedora                 - Build QEMU in Fedora VM"
 ifneq ($(GENISOIMAGE),)
 	@echo "  vm-build-centos                 - Build QEMU in CentOS VM, with Docker"
-	@echo "  vm-build-ubuntu.i386            - Build QEMU in ubuntu i386 VM"
 ifneq ($(EFI_AARCH64),)
 	@echo "  vm-build-ubuntu.aarch64         - Build QEMU in ubuntu aarch64 VM"
 	@echo "  vm-build-centos.aarch64         - Build QEMU in CentOS aarch64 VM"
diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386
deleted file mode 100755
index 47681b6f87d..00000000000
--- a/tests/vm/ubuntu.i386
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python3
-#
-# Ubuntu i386 image
-#
-# Copyright 2017 Red Hat Inc.
-#
-# Authors:
-#  Fam Zheng <famz@redhat.com>
-#
-# This code is licensed under the GPL version 2 or later.  See
-# the COPYING file in the top-level directory.
-#
-
-import sys
-import basevm
-import ubuntuvm
-
-DEFAULT_CONFIG = {
-    'install_cmds' : "apt-get update,"\
-                     "apt-get build-dep -y qemu,"\
-                     "apt-get install -y libfdt-dev language-pack-en ninja-build",
-}
-
-class UbuntuX86VM(ubuntuvm.UbuntuVM):
-    name = "ubuntu.i386"
-    arch = "i386"
-    image_link="https://cloud-images.ubuntu.com/releases/bionic/"\
-               "release-20191114/ubuntu-18.04-server-cloudimg-i386.img"
-    image_sha256="28969840626d1ea80bb249c08eef1a4533e8904aa51a327b40f37ac4b4ff04ef"
-    BUILD_SCRIPT = """
-        set -e;
-        cd $(mktemp -d);
-        sudo chmod a+r /dev/vdb;
-        tar -xf /dev/vdb;
-        ./configure {configure_opts};
-        make --output-sync {target} -j{jobs} {verbose};
-    """
-
-if __name__ == "__main__":
-    sys.exit(basevm.main(UbuntuX86VM, DEFAULT_CONFIG))
-- 
2.34.3



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH v3 07/13] tests/vm: remove duplicate 'centos' VM test
  2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
                   ` (5 preceding siblings ...)
  2022-07-07  4:03 ` [PATCH v3 06/13] tests/vm: remove ubuntu.i386 VM test John Snow
@ 2022-07-07  4:03 ` John Snow
  2022-07-07  8:24   ` Daniel P. Berrangé
  2022-07-07  4:03 ` [PATCH v3 08/13] tests/vm: add 1GB extra memory per core John Snow
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 31+ messages in thread
From: John Snow @ 2022-07-07  4:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	John Snow

This is listed twice by accident; we require genisoimage to run the
test, so remove the unconditional entry.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 tests/vm/Makefile.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index a94f0ebf7f1..8d2a164552d 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -15,7 +15,7 @@ endif
 
 EFI_AARCH64 = $(wildcard $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd)
 
-X86_IMAGES := freebsd netbsd openbsd centos fedora haiku.x86_64
+X86_IMAGES := freebsd netbsd openbsd fedora haiku.x86_64
 ifneq ($(GENISOIMAGE),)
 X86_IMAGES += centos
 ifneq ($(EFI_AARCH64),)
-- 
2.34.3



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH v3 08/13] tests/vm: add 1GB extra memory per core
  2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
                   ` (6 preceding siblings ...)
  2022-07-07  4:03 ` [PATCH v3 07/13] tests/vm: remove duplicate 'centos' " John Snow
@ 2022-07-07  4:03 ` John Snow
  2022-07-07  8:27   ` Daniel P. Berrangé
  2022-07-07  4:03 ` [PATCH v3 09/13] tests/vm: upgrade Ubuntu 18.04 VM to 20.04 John Snow
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 31+ messages in thread
From: John Snow @ 2022-07-07  4:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	John Snow

If you try to run a 16 or 32 threaded test, you're going to run out of
memory very quickly with qom-test and a few others. Bump the memory
limit to try to scale with larger-core machines.

Granted, this means that a 16 core processor is going to ask for 16GB,
but you *probably* meet that requirement if you have such a machine.

512MB per core didn't seem to be enough to avoid ENOMEM and SIGABRTs in
the test cases in practice on a six core machine; so I bumped it up to
1GB which seemed to help.

Add this magic in early to the configuration process so that the
config file, if provided, can still override it.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/vm/basevm.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index d7d0413df35..4fd9af10b7f 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -99,6 +99,11 @@ def __init__(self, args, config=None):
         self._source_path = args.source_path
         # Allow input config to override defaults.
         self._config = DEFAULT_CONFIG.copy()
+
+        # 1GB per core, minimum of 4. This is only a default.
+        mem = max(4, args.jobs)
+        self._config['memory'] = f"{mem}G"
+
         if config != None:
             self._config.update(config)
         self.validate_ssh_keys()
-- 
2.34.3



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH v3 09/13] tests/vm: upgrade Ubuntu 18.04 VM to 20.04
  2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
                   ` (7 preceding siblings ...)
  2022-07-07  4:03 ` [PATCH v3 08/13] tests/vm: add 1GB extra memory per core John Snow
@ 2022-07-07  4:03 ` John Snow
  2022-07-07  8:31   ` Daniel P. Berrangé
  2022-07-07 11:05   ` Richard Henderson
  2022-07-07  4:03 ` [PATCH v3 10/13] tests/vm: Remove docker cross-compile test from CentOS VM John Snow
                   ` (3 subsequent siblings)
  12 siblings, 2 replies; 31+ messages in thread
From: John Snow @ 2022-07-07  4:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	John Snow

18.04 has fallen out of our support window, so move ubuntu.aarch64
forward to ubuntu 20.04, which is now our oldest supported Ubuntu
release.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/vm/ubuntu.aarch64 | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/vm/ubuntu.aarch64 b/tests/vm/ubuntu.aarch64
index fc9c2ce22ff..666947393bd 100755
--- a/tests/vm/ubuntu.aarch64
+++ b/tests/vm/ubuntu.aarch64
@@ -32,13 +32,13 @@ DEFAULT_CONFIG = {
 class UbuntuAarch64VM(ubuntuvm.UbuntuVM):
     name = "ubuntu.aarch64"
     arch = "aarch64"
-    # NOTE: The Ubuntu 18.04 cloud images are updated weekly. The
-    # release below has been chosen as the latest at time of writing.
-    # Using the rolling latest release means the SHA will be wrong
-    # within a week.
-    image_name = "ubuntu-18.04-server-cloudimg-arm64.img"
-    image_link = "https://cloud-images.ubuntu.com/releases/bionic/release-20220610/" + image_name
-    image_sha256="0eacc5142238788365576b15f1d0b6f23dda6d3e545ee22f5306af7bd6ec47bd"
+    # NOTE: The Ubuntu 20.04 cloud images are periodically updated. The
+    # fixed image chosen below is the latest release at time of
+    # writing. Using a rolling latest instead would mean that the SHA
+    # would be incorrect at an indeterminate point in the future.
+    image_name = "focal-server-cloudimg-arm64.img"
+    image_link = "https://cloud-images.ubuntu.com/focal/20220615/" + image_name
+    image_sha256="95a027336e197debe88c92ff2e554598e23c409139e1e750b71b3b820b514832"
     BUILD_SCRIPT = """
         set -e;
         cd $(mktemp -d);
-- 
2.34.3



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH v3 10/13] tests/vm: Remove docker cross-compile test from CentOS VM
  2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
                   ` (8 preceding siblings ...)
  2022-07-07  4:03 ` [PATCH v3 09/13] tests/vm: upgrade Ubuntu 18.04 VM to 20.04 John Snow
@ 2022-07-07  4:03 ` John Snow
  2022-07-07  8:32   ` Daniel P. Berrangé
  2022-07-07  4:03 ` [PATCH v3 11/13] tests/qemu-iotests: hotfix for 307, 223 output John Snow
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 31+ messages in thread
From: John Snow @ 2022-07-07  4:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	John Snow

The fedora container has since been split apart, so there's no suitable
nearby target that would support "test-mingw" as it requires both x32
and x64 support -- so either fedora-cross-win32 nor fedora-cross-win64
would be truly suitable.

Just remove this test as superfluous with our current CI infrastructure.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/vm/centos | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/vm/centos b/tests/vm/centos
index 3a527c47b3d..097a9ca14d3 100755
--- a/tests/vm/centos
+++ b/tests/vm/centos
@@ -28,7 +28,6 @@ class CentosVM(basevm.BaseVM):
         tar -xf $SRC_ARCHIVE;
         make docker-test-block@centos8 {verbose} J={jobs} NETWORK=1;
         make docker-test-quick@centos8 {verbose} J={jobs} NETWORK=1;
-        make docker-test-mingw@fedora  {verbose} J={jobs} NETWORK=1;
     """
 
     def build_image(self, img):
-- 
2.34.3



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH v3 11/13] tests/qemu-iotests: hotfix for 307, 223 output
  2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
                   ` (9 preceding siblings ...)
  2022-07-07  4:03 ` [PATCH v3 10/13] tests/vm: Remove docker cross-compile test from CentOS VM John Snow
@ 2022-07-07  4:03 ` John Snow
  2022-07-07  4:03 ` [PATCH v3 12/13] tests/qemu-iotests: skip 108 when FUSE is not loaded John Snow
  2022-07-07  4:03 ` [PATCH v3 13/13] iotests: fix copy-before-write for macOS and FreeBSD John Snow
  12 siblings, 0 replies; 31+ messages in thread
From: John Snow @ 2022-07-07  4:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	John Snow

Do not merge; staged in Hanna's branch.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/qemu-iotests/223.out | 4 ++--
 tests/qemu-iotests/307.out | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/qemu-iotests/223.out b/tests/qemu-iotests/223.out
index 06479415312..26fb347c5da 100644
--- a/tests/qemu-iotests/223.out
+++ b/tests/qemu-iotests/223.out
@@ -93,7 +93,7 @@ exports available: 3
  export: 'n2'
   description: some text
   size:  4194304
-  flags: 0xced ( flush fua trim zeroes df cache fast-zero )
+  flags: 0xded ( flush fua trim zeroes df multi cache fast-zero )
   min block: 1
   opt block: 4096
   max block: 33554432
@@ -212,7 +212,7 @@ exports available: 3
  export: 'n2'
   description: some text
   size:  4194304
-  flags: 0xced ( flush fua trim zeroes df cache fast-zero )
+  flags: 0xded ( flush fua trim zeroes df multi cache fast-zero )
   min block: 1
   opt block: 4096
   max block: 33554432
diff --git a/tests/qemu-iotests/307.out b/tests/qemu-iotests/307.out
index ec8d2be0e0a..390f05d1b78 100644
--- a/tests/qemu-iotests/307.out
+++ b/tests/qemu-iotests/307.out
@@ -83,7 +83,7 @@ exports available: 2
  export: 'export1'
   description: This is the writable second export
   size:  67108864
-  flags: 0xced ( flush fua trim zeroes df cache fast-zero )
+  flags: 0xded ( flush fua trim zeroes df multi cache fast-zero )
   min block: XXX
   opt block: XXX
   max block: XXX
@@ -109,7 +109,7 @@ exports available: 1
  export: 'export1'
   description: This is the writable second export
   size:  67108864
-  flags: 0xced ( flush fua trim zeroes df cache fast-zero )
+  flags: 0xded ( flush fua trim zeroes df multi cache fast-zero )
   min block: XXX
   opt block: XXX
   max block: XXX
-- 
2.34.3



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH v3 12/13] tests/qemu-iotests: skip 108 when FUSE is not loaded
  2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
                   ` (10 preceding siblings ...)
  2022-07-07  4:03 ` [PATCH v3 11/13] tests/qemu-iotests: hotfix for 307, 223 output John Snow
@ 2022-07-07  4:03 ` John Snow
  2022-07-07  4:03 ` [PATCH v3 13/13] iotests: fix copy-before-write for macOS and FreeBSD John Snow
  12 siblings, 0 replies; 31+ messages in thread
From: John Snow @ 2022-07-07  4:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	John Snow

Do not merge: Staged in Hanna's branch.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/qemu-iotests/108 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/qemu-iotests/108 b/tests/qemu-iotests/108
index 9e923d6a59f..54e935acf28 100755
--- a/tests/qemu-iotests/108
+++ b/tests/qemu-iotests/108
@@ -60,6 +60,11 @@ if sudo -n losetup &>/dev/null; then
 else
     loopdev=false
 
+    # Check for usable FUSE in the host environment:
+    if test ! -c "/dev/fuse"; then
+        _notrun 'No passwordless sudo nor usable /dev/fuse'
+    fi
+
     # QSD --export fuse will either yield "Parameter 'id' is missing"
     # or "Invalid parameter 'fuse'", depending on whether there is
     # FUSE support or not.
-- 
2.34.3



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH v3 13/13] iotests: fix copy-before-write for macOS and FreeBSD
  2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
                   ` (11 preceding siblings ...)
  2022-07-07  4:03 ` [PATCH v3 12/13] tests/qemu-iotests: skip 108 when FUSE is not loaded John Snow
@ 2022-07-07  4:03 ` John Snow
  12 siblings, 0 replies; 31+ messages in thread
From: John Snow @ 2022-07-07  4:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth,
	Vladimir Sementsov-Ogievskiy, John Snow

From: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>

Do not merge: this is a copy of Vladimir's fix that will be taken in
through the iotests tree.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/qemu-iotests/tests/copy-before-write | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/qemu-iotests/tests/copy-before-write b/tests/qemu-iotests/tests/copy-before-write
index 16efebbf8f0..56937b9dfff 100755
--- a/tests/qemu-iotests/tests/copy-before-write
+++ b/tests/qemu-iotests/tests/copy-before-write
@@ -192,6 +192,11 @@ read 1048576/1048576 bytes at offset 0
 
     def test_timeout_break_guest(self):
         log = self.do_cbw_timeout('break-guest-write')
+        # macOS and FreeBSD tend to represent ETIMEDOUT as
+        # "Operation timed out", when Linux prefer
+        # "Connection timed out"
+        log = log.replace('Operation timed out',
+                          'Connection timed out')
         self.assertEqual(log, """\
 wrote 524288/524288 bytes at offset 0
 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-- 
2.34.3



^ permalink raw reply related	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 01/13] qga: treat get-guest-fsinfo as "best effort"
  2022-07-07  4:02 ` [PATCH v3 01/13] qga: treat get-guest-fsinfo as "best effort" John Snow
@ 2022-07-07  8:17   ` Daniel P. Berrangé
  2022-07-07  8:40   ` Marc-André Lureau
  1 sibling, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2022-07-07  8:17 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Hanna Reitz, Wainer dos Santos Moschetta,
	Beraldo Leal, Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 07, 2022 at 12:02:58AM -0400, John Snow wrote:
> In some container environments, there may be references to block devices
> witnessable from a container through /proc/self/mountinfo that reference
> devices we simply don't have access to in the container, and cannot
> provide information about.
> 
> Instead of failing the entire fsinfo command, return stub information
> for these failed lookups.
> 
> This allows test-qga to pass under docker tests, which are in turn used
> by the CentOS VM tests.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  qga/commands-posix.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@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 :|



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 02/13] tests/vm: use 'cp' instead of 'ln' for temporary vm images
  2022-07-07  4:02 ` [PATCH v3 02/13] tests/vm: use 'cp' instead of 'ln' for temporary vm images John Snow
@ 2022-07-07  8:18   ` Daniel P. Berrangé
  0 siblings, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2022-07-07  8:18 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Hanna Reitz, Wainer dos Santos Moschetta,
	Beraldo Leal, Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 07, 2022 at 12:02:59AM -0400, John Snow wrote:
> If the initial setup fails, you've permanently altered the state of the
> downloaded image in an unknowable way. Use 'cp' like our other test
> setup scripts do.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/vm/centos | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@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 :|



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 03/13] tests/vm: switch CentOS 8 to CentOS 8 Stream
  2022-07-07  4:03 ` [PATCH v3 03/13] tests/vm: switch CentOS 8 to CentOS 8 Stream John Snow
@ 2022-07-07  8:18   ` Daniel P. Berrangé
  0 siblings, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2022-07-07  8:18 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Hanna Reitz, Wainer dos Santos Moschetta,
	Beraldo Leal, Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 07, 2022 at 12:03:00AM -0400, John Snow wrote:
> The old CentOS image didn't work anymore because it was already EOL at
> the beginning of 2022.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/vm/centos | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@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 :|



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 04/13] tests/vm: switch centos.aarch64 to CentOS 8 Stream
  2022-07-07  4:03 ` [PATCH v3 04/13] tests/vm: switch centos.aarch64 " John Snow
@ 2022-07-07  8:22   ` Daniel P. Berrangé
  0 siblings, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2022-07-07  8:22 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Hanna Reitz, Wainer dos Santos Moschetta,
	Beraldo Leal, Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 07, 2022 at 12:03:01AM -0400, John Snow wrote:
> Switch this test over to using a cloud image like the base CentOS8 VM
> test, which helps make this script a bit simpler too.
> 
> Note: At time of writing, this test seems pretty flaky when run without
> KVM support for aarch64. Certain unit tests like migration-test,
> virtio-net-failover, test-hmp and qom-test seem quite prone to fail
> under TCG. Still, this is an improvement in that at least pure build
> tests are functional.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  tests/vm/centos.aarch64 | 174 ++++++----------------------------------
>  1 file changed, 24 insertions(+), 150 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@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 :|



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 05/13] tests/vm: update sha256sum for ubuntu.aarch64
  2022-07-07  4:03 ` [PATCH v3 05/13] tests/vm: update sha256sum for ubuntu.aarch64 John Snow
@ 2022-07-07  8:23   ` Daniel P. Berrangé
  2022-07-07 11:03   ` Richard Henderson
  1 sibling, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2022-07-07  8:23 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Hanna Reitz, Wainer dos Santos Moschetta,
	Beraldo Leal, Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 07, 2022 at 12:03:02AM -0400, John Snow wrote:
> This checksum changes weekly; use a fixed point image and update the
> checksum so we don't have to re-download it quite so much.
> 
> Note: Just like the centos.aarch64 test, this test currently seems very
> flaky when run as a TCG test.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  tests/vm/ubuntu.aarch64 | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@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 :|



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 06/13] tests/vm: remove ubuntu.i386 VM test
  2022-07-07  4:03 ` [PATCH v3 06/13] tests/vm: remove ubuntu.i386 VM test John Snow
@ 2022-07-07  8:23   ` Daniel P. Berrangé
  0 siblings, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2022-07-07  8:23 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Hanna Reitz, Wainer dos Santos Moschetta,
	Beraldo Leal, Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 07, 2022 at 12:03:03AM -0400, John Snow wrote:
> Ubuntu 18.04 is out of our support window, and Ubuntu 20.04 does not
> support i386 anymore. The debian project does, but they do not provide
> any cloud images for it, a new expect-style script would have to be
> written.
> 
> Since we have i386 cross-compiler tests hosted on GitLab CI, we don't
> need to support this VM test anymore.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/vm/Makefile.include |  3 +--
>  tests/vm/ubuntu.i386      | 40 ---------------------------------------
>  2 files changed, 1 insertion(+), 42 deletions(-)
>  delete mode 100755 tests/vm/ubuntu.i386

Reviewed-by: Daniel P. Berrangé <berrange@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 :|



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 07/13] tests/vm: remove duplicate 'centos' VM test
  2022-07-07  4:03 ` [PATCH v3 07/13] tests/vm: remove duplicate 'centos' " John Snow
@ 2022-07-07  8:24   ` Daniel P. Berrangé
  0 siblings, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2022-07-07  8:24 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Hanna Reitz, Wainer dos Santos Moschetta,
	Beraldo Leal, Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 07, 2022 at 12:03:04AM -0400, John Snow wrote:
> This is listed twice by accident; we require genisoimage to run the
> test, so remove the unconditional entry.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/vm/Makefile.include | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@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 :|



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 08/13] tests/vm: add 1GB extra memory per core
  2022-07-07  4:03 ` [PATCH v3 08/13] tests/vm: add 1GB extra memory per core John Snow
@ 2022-07-07  8:27   ` Daniel P. Berrangé
  0 siblings, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2022-07-07  8:27 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Hanna Reitz, Wainer dos Santos Moschetta,
	Beraldo Leal, Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 07, 2022 at 12:03:05AM -0400, John Snow wrote:
> If you try to run a 16 or 32 threaded test, you're going to run out of
> memory very quickly with qom-test and a few others. Bump the memory
> limit to try to scale with larger-core machines.
> 
> Granted, this means that a 16 core processor is going to ask for 16GB,
> but you *probably* meet that requirement if you have such a machine.
> 
> 512MB per core didn't seem to be enough to avoid ENOMEM and SIGABRTs in
> the test cases in practice on a six core machine; so I bumped it up to
> 1GB which seemed to help.

RHEL recommends 1.5 GB per virtual CPU, so yeah, allowing only 512 MB
was unreasonably small by typical standards.

> 
> Add this magic in early to the configuration process so that the
> config file, if provided, can still override it.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  tests/vm/basevm.py | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@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 :|



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 09/13] tests/vm: upgrade Ubuntu 18.04 VM to 20.04
  2022-07-07  4:03 ` [PATCH v3 09/13] tests/vm: upgrade Ubuntu 18.04 VM to 20.04 John Snow
@ 2022-07-07  8:31   ` Daniel P. Berrangé
  2022-07-07 11:05   ` Richard Henderson
  1 sibling, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2022-07-07  8:31 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Hanna Reitz, Wainer dos Santos Moschetta,
	Beraldo Leal, Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 07, 2022 at 12:03:06AM -0400, John Snow wrote:
> 18.04 has fallen out of our support window, so move ubuntu.aarch64
> forward to ubuntu 20.04, which is now our oldest supported Ubuntu
> release.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  tests/vm/ubuntu.aarch64 | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@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 :|



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 10/13] tests/vm: Remove docker cross-compile test from CentOS VM
  2022-07-07  4:03 ` [PATCH v3 10/13] tests/vm: Remove docker cross-compile test from CentOS VM John Snow
@ 2022-07-07  8:32   ` Daniel P. Berrangé
  2022-07-07 15:48     ` John Snow
  0 siblings, 1 reply; 31+ messages in thread
From: Daniel P. Berrangé @ 2022-07-07  8:32 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Hanna Reitz, Wainer dos Santos Moschetta,
	Beraldo Leal, Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 07, 2022 at 12:03:07AM -0400, John Snow wrote:
> The fedora container has since been split apart, so there's no suitable
> nearby target that would support "test-mingw" as it requires both x32
> and x64 support -- so either fedora-cross-win32 nor fedora-cross-win64
> would be truly suitable.
> 
> Just remove this test as superfluous with our current CI infrastructure.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  tests/vm/centos | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/tests/vm/centos b/tests/vm/centos
> index 3a527c47b3d..097a9ca14d3 100755
> --- a/tests/vm/centos
> +++ b/tests/vm/centos
> @@ -28,7 +28,6 @@ class CentosVM(basevm.BaseVM):
>          tar -xf $SRC_ARCHIVE;
>          make docker-test-block@centos8 {verbose} J={jobs} NETWORK=1;
>          make docker-test-quick@centos8 {verbose} J={jobs} NETWORK=1;
> -        make docker-test-mingw@fedora  {verbose} J={jobs} NETWORK=1;

Well it could have been replaced with two:

      make docker-test-mingw@fedora-cross-win32  {verbose} J={jobs} NETWORK=1;
      make docker-test-mingw@fedora-cross-win64  {verbose} J={jobs} NETWORK=1;

I don't mind either way though, and feel this is quite poiintless
anyway, since mingw is trivial to test in containers

Reviewed-by: Daniel P. Berrangé <berrange@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 :|



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 01/13] qga: treat get-guest-fsinfo as "best effort"
  2022-07-07  4:02 ` [PATCH v3 01/13] qga: treat get-guest-fsinfo as "best effort" John Snow
  2022-07-07  8:17   ` Daniel P. Berrangé
@ 2022-07-07  8:40   ` Marc-André Lureau
  2022-07-07 15:23     ` John Snow
  1 sibling, 1 reply; 31+ messages in thread
From: Marc-André Lureau @ 2022-07-07  8:40 UTC (permalink / raw)
  To: John Snow
  Cc: QEMU, open list:Block layer core, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

[-- Attachment #1: Type: text/plain, Size: 1669 bytes --]

Hi

On Thu, Jul 7, 2022 at 8:10 AM John Snow <jsnow@redhat.com> wrote:

> In some container environments, there may be references to block devices
> witnessable from a container through /proc/self/mountinfo that reference
> devices we simply don't have access to in the container, and cannot
> provide information about.
>
> Instead of failing the entire fsinfo command, return stub information
> for these failed lookups.
>
> This allows test-qga to pass under docker tests, which are in turn used
> by the CentOS VM tests.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  qga/commands-posix.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> index 0469dc409d4..950c9d72fe7 100644
> --- a/qga/commands-posix.c
> +++ b/qga/commands-posix.c
> @@ -1207,7 +1207,12 @@ static void build_guest_fsinfo_for_device(char
> const *devpath,
>
>      syspath = realpath(devpath, NULL);
>      if (!syspath) {
> -        error_setg_errno(errp, errno, "realpath(\"%s\")", devpath);
> +        if (errno == ENOENT) {
> +            /* This devpath may not exist because of container config,
> etc. */
> +            fs->name = g_path_get_basename(devpath);
> +        } else {
> +            error_setg_errno(errp, errno, "realpath(\"%s\")", devpath);
> +        }
>

It looks like this function is called recursively with the same "fs"
argument. That's probably why there is a if (!fs->name) check next. You may
want to check it too to avoid leaks and incorrect info.


>          return;
>      }
>
> --
> 2.34.3
>
>
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 2447 bytes --]

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 05/13] tests/vm: update sha256sum for ubuntu.aarch64
  2022-07-07  4:03 ` [PATCH v3 05/13] tests/vm: update sha256sum for ubuntu.aarch64 John Snow
  2022-07-07  8:23   ` Daniel P. Berrangé
@ 2022-07-07 11:03   ` Richard Henderson
  1 sibling, 0 replies; 31+ messages in thread
From: Richard Henderson @ 2022-07-07 11:03 UTC (permalink / raw)
  To: John Snow, qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On 7/7/22 09:33, John Snow wrote:
> This checksum changes weekly; use a fixed point image and update the
> checksum so we don't have to re-download it quite so much.
> 
> Note: Just like the centos.aarch64 test, this test currently seems very
> flaky when run as a TCG test.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>   tests/vm/ubuntu.aarch64 | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/vm/ubuntu.aarch64 b/tests/vm/ubuntu.aarch64
> index b291945a7e9..fc9c2ce22ff 100755
> --- a/tests/vm/ubuntu.aarch64
> +++ b/tests/vm/ubuntu.aarch64
> @@ -32,9 +32,13 @@ DEFAULT_CONFIG = {
>   class UbuntuAarch64VM(ubuntuvm.UbuntuVM):
>       name = "ubuntu.aarch64"
>       arch = "aarch64"
> +    # NOTE: The Ubuntu 18.04 cloud images are updated weekly. The
> +    # release below has been chosen as the latest at time of writing.
> +    # Using the rolling latest release means the SHA will be wrong
> +    # within a week.

Isn't 18.04 unsupported now?  Surely bumping to 20.04 or 22.04 would be better.


r~

>       image_name = "ubuntu-18.04-server-cloudimg-arm64.img"
> -    image_link = "https://cloud-images.ubuntu.com/releases/18.04/release/" + image_name
> -    image_sha256="0fdcba761965735a8a903d8b88df8e47f156f48715c00508e4315c506d7d3cb1"
> +    image_link = "https://cloud-images.ubuntu.com/releases/bionic/release-20220610/" + image_name
> +    image_sha256="0eacc5142238788365576b15f1d0b6f23dda6d3e545ee22f5306af7bd6ec47bd"
>       BUILD_SCRIPT = """
>           set -e;
>           cd $(mktemp -d);



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 09/13] tests/vm: upgrade Ubuntu 18.04 VM to 20.04
  2022-07-07  4:03 ` [PATCH v3 09/13] tests/vm: upgrade Ubuntu 18.04 VM to 20.04 John Snow
  2022-07-07  8:31   ` Daniel P. Berrangé
@ 2022-07-07 11:05   ` Richard Henderson
  2022-07-07 15:40     ` John Snow
  1 sibling, 1 reply; 31+ messages in thread
From: Richard Henderson @ 2022-07-07 11:05 UTC (permalink / raw)
  To: John Snow, qemu-devel
  Cc: qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On 7/7/22 09:33, John Snow wrote:
> 18.04 has fallen out of our support window, so move ubuntu.aarch64
> forward to ubuntu 20.04, which is now our oldest supported Ubuntu
> release.

Ah.  Squash with patch 5?


r~

> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>   tests/vm/ubuntu.aarch64 | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/vm/ubuntu.aarch64 b/tests/vm/ubuntu.aarch64
> index fc9c2ce22ff..666947393bd 100755
> --- a/tests/vm/ubuntu.aarch64
> +++ b/tests/vm/ubuntu.aarch64
> @@ -32,13 +32,13 @@ DEFAULT_CONFIG = {
>   class UbuntuAarch64VM(ubuntuvm.UbuntuVM):
>       name = "ubuntu.aarch64"
>       arch = "aarch64"
> -    # NOTE: The Ubuntu 18.04 cloud images are updated weekly. The
> -    # release below has been chosen as the latest at time of writing.
> -    # Using the rolling latest release means the SHA will be wrong
> -    # within a week.
> -    image_name = "ubuntu-18.04-server-cloudimg-arm64.img"
> -    image_link = "https://cloud-images.ubuntu.com/releases/bionic/release-20220610/" + image_name
> -    image_sha256="0eacc5142238788365576b15f1d0b6f23dda6d3e545ee22f5306af7bd6ec47bd"
> +    # NOTE: The Ubuntu 20.04 cloud images are periodically updated. The
> +    # fixed image chosen below is the latest release at time of
> +    # writing. Using a rolling latest instead would mean that the SHA
> +    # would be incorrect at an indeterminate point in the future.
> +    image_name = "focal-server-cloudimg-arm64.img"
> +    image_link = "https://cloud-images.ubuntu.com/focal/20220615/" + image_name
> +    image_sha256="95a027336e197debe88c92ff2e554598e23c409139e1e750b71b3b820b514832"
>       BUILD_SCRIPT = """
>           set -e;
>           cd $(mktemp -d);



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 01/13] qga: treat get-guest-fsinfo as "best effort"
  2022-07-07  8:40   ` Marc-André Lureau
@ 2022-07-07 15:23     ` John Snow
  0 siblings, 0 replies; 31+ messages in thread
From: John Snow @ 2022-07-07 15:23 UTC (permalink / raw)
  To: Marc-André Lureau
  Cc: QEMU, open list:Block layer core, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 7, 2022 at 4:40 AM Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
>
> Hi
>
> On Thu, Jul 7, 2022 at 8:10 AM John Snow <jsnow@redhat.com> wrote:
>>
>> In some container environments, there may be references to block devices
>> witnessable from a container through /proc/self/mountinfo that reference
>> devices we simply don't have access to in the container, and cannot
>> provide information about.
>>
>> Instead of failing the entire fsinfo command, return stub information
>> for these failed lookups.
>>
>> This allows test-qga to pass under docker tests, which are in turn used
>> by the CentOS VM tests.
>>
>> Signed-off-by: John Snow <jsnow@redhat.com>
>> ---
>>  qga/commands-posix.c | 7 ++++++-
>>  1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
>> index 0469dc409d4..950c9d72fe7 100644
>> --- a/qga/commands-posix.c
>> +++ b/qga/commands-posix.c
>> @@ -1207,7 +1207,12 @@ static void build_guest_fsinfo_for_device(char const *devpath,
>>
>>      syspath = realpath(devpath, NULL);
>>      if (!syspath) {
>> -        error_setg_errno(errp, errno, "realpath(\"%s\")", devpath);
>> +        if (errno == ENOENT) {
>> +            /* This devpath may not exist because of container config, etc. */
>> +            fs->name = g_path_get_basename(devpath);
>> +        } else {
>> +            error_setg_errno(errp, errno, "realpath(\"%s\")", devpath);
>> +        }
>
>
> It looks like this function is called recursively with the same "fs" argument. That's probably why there is a if (!fs->name) check next. You may want to check it too to avoid leaks and incorrect info.

Oh, I see what you mean. I am not sure if it will come up in
practice*, but I see the theoretical concern at least. I can amend it.

--js

* (Genuinely; I have no idea.)



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 09/13] tests/vm: upgrade Ubuntu 18.04 VM to 20.04
  2022-07-07 11:05   ` Richard Henderson
@ 2022-07-07 15:40     ` John Snow
  0 siblings, 0 replies; 31+ messages in thread
From: John Snow @ 2022-07-07 15:40 UTC (permalink / raw)
  To: Richard Henderson
  Cc: qemu-devel, Qemu-block, Hanna Reitz, Daniel Berrange,
	Wainer dos Santos Moschetta, Beraldo Leal,
	Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 7, 2022 at 7:05 AM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 7/7/22 09:33, John Snow wrote:
> > 18.04 has fallen out of our support window, so move ubuntu.aarch64
> > forward to ubuntu 20.04, which is now our oldest supported Ubuntu
> > release.
>
> Ah.  Squash with patch 5?

Can do. I left it split for testing purposes, but if we want both
patches I can merge them. (Testing all of this was a nightmare.)

--js



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 10/13] tests/vm: Remove docker cross-compile test from CentOS VM
  2022-07-07  8:32   ` Daniel P. Berrangé
@ 2022-07-07 15:48     ` John Snow
  2022-07-07 15:52       ` Daniel P. Berrangé
  0 siblings, 1 reply; 31+ messages in thread
From: John Snow @ 2022-07-07 15:48 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: qemu-devel, Qemu-block, Hanna Reitz, Wainer dos Santos Moschetta,
	Beraldo Leal, Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 7, 2022 at 4:33 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Thu, Jul 07, 2022 at 12:03:07AM -0400, John Snow wrote:
> > The fedora container has since been split apart, so there's no suitable
> > nearby target that would support "test-mingw" as it requires both x32
> > and x64 support -- so either fedora-cross-win32 nor fedora-cross-win64
> > would be truly suitable.
> >
> > Just remove this test as superfluous with our current CI infrastructure.
> >
> > Signed-off-by: John Snow <jsnow@redhat.com>
> > ---
> >  tests/vm/centos | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/tests/vm/centos b/tests/vm/centos
> > index 3a527c47b3d..097a9ca14d3 100755
> > --- a/tests/vm/centos
> > +++ b/tests/vm/centos
> > @@ -28,7 +28,6 @@ class CentosVM(basevm.BaseVM):
> >          tar -xf $SRC_ARCHIVE;
> >          make docker-test-block@centos8 {verbose} J={jobs} NETWORK=1;
> >          make docker-test-quick@centos8 {verbose} J={jobs} NETWORK=1;
> > -        make docker-test-mingw@fedora  {verbose} J={jobs} NETWORK=1;
>
> Well it could have been replaced with two:
>
>       make docker-test-mingw@fedora-cross-win32  {verbose} J={jobs} NETWORK=1;
>       make docker-test-mingw@fedora-cross-win64  {verbose} J={jobs} NETWORK=1;

but "test-mingw" expects to see the dependencies from both win32 and
win64, so I'd have to split the test-mingw target, and I am far off
course from what I wanted to be doing as-is.

>
> I don't mind either way though, and feel this is quite poiintless
> anyway, since mingw is trivial to test in containers
>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>

Thanks :)

--js

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



^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 10/13] tests/vm: Remove docker cross-compile test from CentOS VM
  2022-07-07 15:48     ` John Snow
@ 2022-07-07 15:52       ` Daniel P. Berrangé
  0 siblings, 0 replies; 31+ messages in thread
From: Daniel P. Berrangé @ 2022-07-07 15:52 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, Qemu-block, Hanna Reitz, Wainer dos Santos Moschetta,
	Beraldo Leal, Philippe Mathieu-Daudé,
	Michael Roth, Alex Bennée, Kevin Wolf, Thomas Huth

On Thu, Jul 07, 2022 at 11:48:35AM -0400, John Snow wrote:
> On Thu, Jul 7, 2022 at 4:33 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > On Thu, Jul 07, 2022 at 12:03:07AM -0400, John Snow wrote:
> > > The fedora container has since been split apart, so there's no suitable
> > > nearby target that would support "test-mingw" as it requires both x32
> > > and x64 support -- so either fedora-cross-win32 nor fedora-cross-win64
> > > would be truly suitable.
> > >
> > > Just remove this test as superfluous with our current CI infrastructure.
> > >
> > > Signed-off-by: John Snow <jsnow@redhat.com>
> > > ---
> > >  tests/vm/centos | 1 -
> > >  1 file changed, 1 deletion(-)
> > >
> > > diff --git a/tests/vm/centos b/tests/vm/centos
> > > index 3a527c47b3d..097a9ca14d3 100755
> > > --- a/tests/vm/centos
> > > +++ b/tests/vm/centos
> > > @@ -28,7 +28,6 @@ class CentosVM(basevm.BaseVM):
> > >          tar -xf $SRC_ARCHIVE;
> > >          make docker-test-block@centos8 {verbose} J={jobs} NETWORK=1;
> > >          make docker-test-quick@centos8 {verbose} J={jobs} NETWORK=1;
> > > -        make docker-test-mingw@fedora  {verbose} J={jobs} NETWORK=1;
> >
> > Well it could have been replaced with two:
> >
> >       make docker-test-mingw@fedora-cross-win32  {verbose} J={jobs} NETWORK=1;
> >       make docker-test-mingw@fedora-cross-win64  {verbose} J={jobs} NETWORK=1;
> 
> but "test-mingw" expects to see the dependencies from both win32 and
> win64, so I'd have to split the test-mingw target, and I am far off
> course from what I wanted to be doing as-is.

Oh right, so we should really drop the 'test-mingw' bit entirely
as we have nothing it can be used with now. Instead 'test-build'
needs to honour $QEMU_CONFIGURE_OPTS, so we can do

   make docker-test-build@fedora-cross-win32  (or any of the non-x86
                                               Linux cross containers)

Separate pre-existing problem though, not related to your series.

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



^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2022-07-07 15:57 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07  4:02 [PATCH v3 00/13] Improve reliability of VM tests John Snow
2022-07-07  4:02 ` [PATCH v3 01/13] qga: treat get-guest-fsinfo as "best effort" John Snow
2022-07-07  8:17   ` Daniel P. Berrangé
2022-07-07  8:40   ` Marc-André Lureau
2022-07-07 15:23     ` John Snow
2022-07-07  4:02 ` [PATCH v3 02/13] tests/vm: use 'cp' instead of 'ln' for temporary vm images John Snow
2022-07-07  8:18   ` Daniel P. Berrangé
2022-07-07  4:03 ` [PATCH v3 03/13] tests/vm: switch CentOS 8 to CentOS 8 Stream John Snow
2022-07-07  8:18   ` Daniel P. Berrangé
2022-07-07  4:03 ` [PATCH v3 04/13] tests/vm: switch centos.aarch64 " John Snow
2022-07-07  8:22   ` Daniel P. Berrangé
2022-07-07  4:03 ` [PATCH v3 05/13] tests/vm: update sha256sum for ubuntu.aarch64 John Snow
2022-07-07  8:23   ` Daniel P. Berrangé
2022-07-07 11:03   ` Richard Henderson
2022-07-07  4:03 ` [PATCH v3 06/13] tests/vm: remove ubuntu.i386 VM test John Snow
2022-07-07  8:23   ` Daniel P. Berrangé
2022-07-07  4:03 ` [PATCH v3 07/13] tests/vm: remove duplicate 'centos' " John Snow
2022-07-07  8:24   ` Daniel P. Berrangé
2022-07-07  4:03 ` [PATCH v3 08/13] tests/vm: add 1GB extra memory per core John Snow
2022-07-07  8:27   ` Daniel P. Berrangé
2022-07-07  4:03 ` [PATCH v3 09/13] tests/vm: upgrade Ubuntu 18.04 VM to 20.04 John Snow
2022-07-07  8:31   ` Daniel P. Berrangé
2022-07-07 11:05   ` Richard Henderson
2022-07-07 15:40     ` John Snow
2022-07-07  4:03 ` [PATCH v3 10/13] tests/vm: Remove docker cross-compile test from CentOS VM John Snow
2022-07-07  8:32   ` Daniel P. Berrangé
2022-07-07 15:48     ` John Snow
2022-07-07 15:52       ` Daniel P. Berrangé
2022-07-07  4:03 ` [PATCH v3 11/13] tests/qemu-iotests: hotfix for 307, 223 output John Snow
2022-07-07  4:03 ` [PATCH v3 12/13] tests/qemu-iotests: skip 108 when FUSE is not loaded John Snow
2022-07-07  4:03 ` [PATCH v3 13/13] iotests: fix copy-before-write for macOS and FreeBSD John Snow

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.