From: "Alexander von Gluck IV" <kallisti5@unixzen.com>
To: qemu-devel@nongnu.org
Subject: Re: [PATCH] tests/vm: Add Haiku test based on their vagrant images
Date: Sun, 06 Sep 2020 14:41:46 +0000 [thread overview]
Message-ID: <00452072441b963bd56bcc9a8b758bfc@unixzen.com> (raw)
In-Reply-To: <20200906143439.1924930-1-kallisti5@unixzen.com>
September 6, 2020 9:35 AM, "Alexander von Gluck IV" <kallisti5@unixzen.com> wrote:
> Signed-off-by: Alexander von Gluck IV <kallisti5@unixzen.com>
> ---
> tests/keys/vagrant | 27 +++++++++
> tests/keys/vagrant.pub | 1 +
> tests/vm/basevm.py | 5 +-
> tests/vm/haiku.x86_64 | 121 +++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 152 insertions(+), 2 deletions(-)
> create mode 100644 tests/keys/vagrant
> create mode 100644 tests/keys/vagrant.pub
> create mode 100755 tests/vm/haiku.x86_64
>
> diff --git a/tests/keys/vagrant b/tests/keys/vagrant
> new file mode 100644
> index 0000000000..7d6a083909
> --- /dev/null
> +++ b/tests/keys/vagrant
> @@ -0,0 +1,27 @@
> +-----BEGIN RSA PRIVATE KEY-----
> +MIIEogIBAAKCAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzI
>
> diff --git a/tests/keys/vagrant.pub b/tests/keys/vagrant.pub
> new file mode 100644
> index 0000000000..18a9c00fd5
> --- /dev/null
> +++ b/tests/keys/vagrant.pub
> @@ -0,0 +1 @@
> +ssh-rsa
> AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oX
A little background information for context. These are the Vagrant SSH keys which are packed with every vagrant OS image and allow OS access for automation. The python vm tester knowing of these lets it leverage Vagrant OS images for testing without much work.
> --- a/tests/vm/basevm.py
> +++ b/tests/vm/basevm.py
> @@ -44,6 +44,7 @@ DEFAULT_CONFIG = {
> 'machine' : 'pc',
> 'guest_user' : "qemu",
> 'guest_pass' : "qemupass",
> + 'root_user' : "root",
> 'root_pass' : "qemupass",
> 'ssh_key_file' : SSH_KEY_FILE,
> 'ssh_pub_key_file': SSH_PUB_KEY_FILE,
> @@ -245,13 +246,13 @@ class BaseVM(object):
> return self._ssh_do(self._config["guest_user"], cmd, False)
>
> def ssh_root(self, *cmd):
> - return self._ssh_do("root", cmd, False)
> + return self._ssh_do(self._config["root_user"], cmd, False)
>
> def ssh_check(self, *cmd):
> self._ssh_do(self._config["guest_user"], cmd, True)
>
> def ssh_root_check(self, *cmd):
> - self._ssh_do("root", cmd, True)
> + self._ssh_do(self._config["root_user"], cmd, True)
>
> def build_image(self, img):
> raise NotImplementedError
Haiku's user is UID 0, so essentially our root user isn't named root.
This adds the (optional) ability to override the root username.
> diff --git a/tests/vm/haiku.x86_64 b/tests/vm/haiku.x86_64
> new file mode 100755
> index 0000000000..9777722f51
> --- /dev/null
> +++ b/tests/vm/haiku.x86_64
> @@ -0,0 +1,121 @@
> +#!/usr/bin/env python3
> +#
> +# Haiku VM image
> +#
> +# Copyright 2020 Haiku, Inc.
> +#
> +# Authors:
> +# Alexander von Gluck IV <kallisti5@unixzen.com>
> +#
> +# This code is licensed under the GPL version 2 or later. See
> +# the COPYING file in the top-level directory.
> +#
This build script works as expected, transferring the qemu archive over
via the virtio block device and building it.
More information here (including output of tools):
https://bugs.launchpad.net/qemu/+bug/1715203
This purpose of this is trying to prevent the need to remove
upstream qemu support for Haiku.
We have some out-of-tree patches to fix the error seen in our ports, i'll
work on upstreaming these.
-- Alex
next prev parent reply other threads:[~2020-09-06 14:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-06 14:34 [PATCH] tests/vm: Add Haiku test based on their vagrant images Alexander von Gluck IV
2020-09-06 14:41 ` Alexander von Gluck IV [this message]
2020-09-25 8:49 ` Philippe Mathieu-Daudé
2020-09-25 9:00 ` Philippe Mathieu-Daudé
2020-09-07 12:35 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00452072441b963bd56bcc9a8b758bfc@unixzen.com \
--to=kallisti5@unixzen.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).