Skip to contentSkip to conversation

Fix build failures on Haiku

PATCH In review Thomas Huth 5 participants 15 messages Nov 14, 2020 – Nov 16, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

cover Fix build failures on Haiku

Some patches to fix build failures on Haiku, and the final patch adds a VM for testing compilation there. "make check" is still failing, but at least compiling of the sources can now be tested.

Alexander von Gluck IV (1):
tests/vm: Add Haiku test based on their vagrant images

Thomas Huth (3):
configure: Fix the _BSD_SOURCE define for the Haiku build
configure: Do not build pc-bios/optionrom on Haiku
configure: Add a proper check for sys/ioccom.h and use it in
tpm_ioctl.h

 backends/tpm/tpm_ioctl.h  |   4 ++
 configure                 |  15 ++++-
 nbd/nbd-internal.h        |   2 +-
 tests/keys/vagrant        |  27 +++++++++
 tests/keys/vagrant.pub    |   1 +
 tests/vm/Makefile.include |   3 +-
 tests/vm/basevm.py        |   5 +-
 tests/vm/haiku.x86_64     | 119 ++++++++++++++++++++++++++++++++++++++
 8 files changed, 169 insertions(+), 7 deletions(-)
 create mode 100644 tests/keys/vagrant
 create mode 100644 tests/keys/vagrant.pub
 create mode 100755 tests/vm/haiku.x86_64
Signature · 1 line
2.18.4
#1 lore raw

PATCH 1/4 configure: Fix the _BSD_SOURCE define for the Haiku build

The Haiku VM that we are going to add is using _BSD_SOURCE instead of BSD_SOURCE (without initial underscore)... according to David Carlier, the BSD_SOURCE without underscore was likely a typo, so let's simply add the underscore there now.
This fixes the build failure with the bswapXX() macros not being defined after including <endian.h>.

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 4cef321d9d..a273a93377 100755
@@ -790,7 +790,7 @@ SunOS)
 ;;
 Haiku)
   haiku="yes"
-  QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -DBSD_SOURCE $QEMU_CFLAGS"
+  QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE $QEMU_CFLAGS"
 ;;
 Linux)
   audio_drv_list="try-pa oss"
Signature · 1 line
2.18.4
Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] configure: Fix the _BSD_SOURCE define for the Haiku build

Quoted 17 lines · Thomas Huth

The Haiku VM that we are going to add is using _BSD_SOURCE instead of BSD_SOURCE (without initial underscore)... according to David Carlier, the BSD_SOURCE without underscore was likely a typo, so let's simply add the underscore there now.
This fixes the build failure with the bswapXX() macros not being defined after including <endian.h>.

---
  configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
configure +0 -0
index 4cef321d9d..a273a93377 100755

configure SunOS) · line 796

Quoted 8 lines
configure +1 -1
@@ -790,7 +790,7 @@ SunOS)
  ;;
  Haiku)
    haiku="yes"
-  QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -DBSD_SOURCE $QEMU_CFLAGS"
+  QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE $QEMU_CFLAGS"
  ;;
  Linux)
    audio_drv_list="try-pa oss"
#3 lore raw

PATCH 2/4 configure: Do not build pc-bios/optionrom on Haiku

In reply to Thomas Huth

Compilation of pc-bios/optionrom fails on Haiku with:

BUILD pvh.img
ld: pvh_main.o: in function `pvh_load_kernel':
pc-bios/optionrom/pvh_main.c:73: undefined reference to `GLOBAL_OFFSET_TABLE_' Makefile:57: recipe for target 'pvh.img' failed
make[1]: *** [pvh.img] Error 1

Let's simply disable it, like it is already done on macOS and Solaris.

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index a273a93377..c0acda164d 100755
@@ -5842,7 +5842,7 @@ fi
 roms=
 if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \
         test "$targetos" != "Darwin" && test "$targetos" != "SunOS" && \
-        test "$softmmu" = yes ; then
+        test "$targetos" != "Haiku" && test "$softmmu" = yes ; then
     # Different host OS linkers have different ideas about the name of the ELF
     # emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the _fbsd
     # variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386pe.
Signature · 1 line
2.18.4
Reviewed-by on v1 2/4
#4 lore raw

Re: [PATCH 2/4] configure: Do not build pc-bios/optionrom on Haiku

Quoted 20 lines · Thomas Huth

Compilation of pc-bios/optionrom fails on Haiku with:

BUILD pvh.img
ld: pvh_main.o: in function `pvh_load_kernel':
pc-bios/optionrom/pvh_main.c:73: undefined reference to `GLOBAL_OFFSET_TABLE_' Makefile:57: recipe for target 'pvh.img' failed
make[1]: *** [pvh.img] Error 1

Let's simply disable it, like it is already done on macOS and Solaris.

---
  configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
configure +0 -0
index a273a93377..c0acda164d 100755

configure fi · line 5848

Quoted 8 lines
configure +1 -1
@@ -5842,7 +5842,7 @@ fi
  roms=
  if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \
          test "$targetos" != "Darwin" && test "$targetos" != "SunOS" && \
-        test "$softmmu" = yes ; then
+        test "$targetos" != "Haiku" && test "$softmmu" = yes ; then
      # Different host OS linkers have different ideas about the name of the ELF
      # emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the _fbsd
      # variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386pe.
Reviewed-by on v1 2/4
#5 lore raw

Re: [PATCH 2/4] configure: Do not build pc-bios/optionrom on Haiku

In reply to Thomas Huth
Quoted 8 lines · Thomas Huth

Compilation of pc-bios/optionrom fails on Haiku with:

BUILD pvh.img
ld: pvh_main.o: in function `pvh_load_kernel':
pc-bios/optionrom/pvh_main.c:73: undefined reference to `GLOBAL_OFFSET_TABLE_' Makefile:57: recipe for target 'pvh.img' failed
make[1]: *** [pvh.img] Error 1

Quoted 6 lines

Let's simply disable it, like it is already done on macOS and Solaris.

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#6 lore raw

PATCH 3/4 configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h

In reply to Thomas Huth

On Solaris and Haiku, the _IO() macros are defined in <sys/ioccom.h>. Add a proper check for this header to our configure scripts, and make sure to include the header in tpm_ioctl.h to fix a build failure on Solaris and Haiku.

---
 backends/tpm/tpm_ioctl.h |  4 ++++
 configure                | 11 ++++++++++-
 nbd/nbd-internal.h       |  2 +-
 3 files changed, 15 insertions(+), 2 deletions(-)
backends/tpm/tpm_ioctl.h +4 -0
index f5f5c553a9..bd6c12cb86 100644
@@ -12,6 +12,10 @@
 #include <sys/uio.h>
 #include <sys/ioctl.h>
 
+#ifdef HAVE_SYS_IOCCOM_H
+#include <sys/ioccom.h>
+#endif
+
 /*
  * Every response from a command involving a TPM command execution must hold
  * the ptm_res as the first element.
configure +10 -1
index c0acda164d..764e903748 100755
@@ -3123,6 +3123,13 @@ if check_include "sys/signal.h" ; then
   have_sys_signal_h=yes
 fi
 
+#########################################
+# sys/ioccom.h check
+have_sys_ioccom_h=no
+if check_include "sys/ioccom.h" ; then
+  have_sys_ioccom_h=yes
+fi
+
 ##########################################
 # VTE probe
 
@@ -6214,7 +6221,9 @@ fi
 if test "$have_sys_signal_h" = "yes" ; then
     echo "HAVE_SYS_SIGNAL_H=y" >> $config_host_mak
 fi
-
+if test "$have_sys_ioccom_h" = "yes" ; then
+    echo "HAVE_SYS_IOCCOM_H=y" >> $config_host_mak
+fi
 # Work around a system header bug with some kernel/XFS header
 # versions where they both try to define 'struct fsxattr':
 # xfs headers will not try to redefine structs from linux headers
nbd/nbd-internal.h +1 -1
index 60629ef160..1b2141ab4b 100644
@@ -19,7 +19,7 @@
 #ifndef _WIN32
 #include <sys/ioctl.h>
 #endif
-#if defined(__sun__) || defined(__HAIKU__)
+#ifdef HAVE_SYS_IOCCOM_H
 #include <sys/ioccom.h>
 #endif
 
Signature · 1 line
2.18.4
#7 lore raw

Re: [PATCH 3/4] configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h

Can we check this in meson.build?

Quoted 18 lines · Thomas Huth

On Solaris and Haiku, the _IO() macros are defined in <sys/ioccom.h>. Add a proper check for this header to our configure scripts, and make sure to include the header in tpm_ioctl.h to fix a build failure on Solaris and Haiku.

---
 backends/tpm/tpm_ioctl.h |  4 ++++
 configure                | 11 ++++++++++-
 nbd/nbd-internal.h       |  2 +-
 3 files changed, 15 insertions(+), 2 deletions(-)
backends/tpm/tpm_ioctl.h +0 -0
index f5f5c553a9..bd6c12cb86 100644

backends/tpm/tpm_ioctl.h line 20

Quoted 9 lines
backends/tpm/tpm_ioctl.h +4 -0
@@ -12,6 +12,10 @@
 #include <sys/uio.h>
 #include <sys/ioctl.h>
 
+#ifdef HAVE_SYS_IOCCOM_H
+#include <sys/ioccom.h>
+#endif
+
 /*
  * Every response from a command involving a TPM command execution must

hold

Quoted 44 lines
backends/tpm/tpm_ioctl.h +0 -0
  * the ptm_res as the first element.
configure +10 -1
index c0acda164d..764e903748 100755
@@ -3123,6 +3123,13 @@ if check_include "sys/signal.h" ; then
   have_sys_signal_h=yes
 fi
 
+#########################################
+# sys/ioccom.h check
+have_sys_ioccom_h=no
+if check_include "sys/ioccom.h" ; then
+  have_sys_ioccom_h=yes
+fi
+
 ##########################################
 # VTE probe
 
@@ -6214,7 +6221,9 @@ fi
 if test "$have_sys_signal_h" = "yes" ; then
     echo "HAVE_SYS_SIGNAL_H=y" >> $config_host_mak
 fi
-
+if test "$have_sys_ioccom_h" = "yes" ; then
+    echo "HAVE_SYS_IOCCOM_H=y" >> $config_host_mak
+fi
 # Work around a system header bug with some kernel/XFS header
 # versions where they both try to define 'struct fsxattr':
 # xfs headers will not try to redefine structs from linux headers
nbd/nbd-internal.h +1 -2
index 60629ef160..1b2141ab4b 100644
@@ -19,7 +19,7 @@
 #ifndef _WIN32
 #include <sys/ioctl.h>
 #endif
-#if defined(__sun__) || defined(__HAIKU__)
+#ifdef HAVE_SYS_IOCCOM_H
 #include <sys/ioccom.h>
 #endif
 
--
Quoted 3 lines

2.18.4

--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo

#8 lore raw

Re: [PATCH 3/4] configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h

Quoted 1 line · 罗勇刚(Yonggang Luo)

Can we check this in meson.build?

That would be nicer, indeed, but I did not spot a place where I could add my code there ... all the other HAVE_xxx_H symbols are added in the configure script.
Maybe Paolo or Marc-André (now on CC:) have an idea whether it could be done easily in meson.build?, too?

Thomas

Quoted 85 lines
Quoted 71 lines · On Sun, Nov 15, 2020 at 12:53 AM Thomas Huth <[email protected]…

On Solaris and Haiku, the _IO() macros are defined in <sys/ioccom.h>. Add a proper check for this header to our configure scripts, and make sure to include the header in tpm_ioctl.h to fix a build failure on Solaris and Haiku.

Signed-off-by Thomas Huth <[email protected] <mailto:[email protected]>>

---
 backends/tpm/tpm_ioctl.h |  4 ++++
 configure                | 11 ++++++++++-
 nbd/nbd-internal.h       |  2 +-

 3 files changed, 15 insertions(+), 2 deletions(-)
backends/tpm/tpm_ioctl.h +4 -0
index f5f5c553a9..bd6c12cb86 100644
@@ -12,6 +12,10 @@
  #include <sys/uio.h>
  #include <sys/ioctl.h>
 
+#ifdef HAVE_SYS_IOCCOM_H
+#include <sys/ioccom.h>
+#endif
+
  /*
   * Every response from a command involving a TPM command execution must hold
   * the ptm_res as the first element.
configure +0 -0
index c0acda164d..764e903748 100755
@@ -3123,6 +3123,13 @@ if check_include "sys/signal.h" ; then

   have_sys_signal_h=yes
 fi

configure +7 -0
+#########################################
+# sys/ioccom.h check
+have_sys_ioccom_h=no
+if check_include "sys/ioccom.h" ; then
+  have_sys_ioccom_h=yes
+fi
+

 ##########################################
 # VTE probe

configure +0 -0
@@ -6214,7 +6221,9 @@ fi

 if test "$have_sys_signal_h" = "yes" ; then echo "HAVE_SYS_SIGNAL_H=y" >> $config_host_mak fi

configure +3 -1
-
+if test "$have_sys_ioccom_h" = "yes" ; then
+    echo "HAVE_SYS_IOCCOM_H=y" >> $config_host_mak
+fi

 # Work around a system header bug with some kernel/XFS header

 # versions where they both try to define 'struct fsxattr':
 # xfs headers will not try to redefine structs from linux headers
nbd/nbd-internal.h +1 -2
index 60629ef160..1b2141ab4b 100644
@@ -19,7 +19,7 @@
  #ifndef _WIN32
  #include <sys/ioctl.h>
  #endif
-#if defined(__sun__) || defined(__HAIKU__)
+#ifdef HAVE_SYS_IOCCOM_H
  #include <sys/ioccom.h>
  #endif
 
--
Quoted 3 lines

2.18.4

--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

#9 lore raw

Re: [PATCH 3/4] configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h

Quoted 6 lines · Thomas Huth
Quoted 1 line · 罗勇刚(Yonggang Luo)

Can we check this in meson.build?

That would be nicer, indeed, but I did not spot a place where I could add my code there ... all the other HAVE_xxx_H symbols are added in the configure script.

There is one similar test, it was split in two:

has_gettid = cc.has_function('gettid')
...
config_host_data.set('CONFIG_GETTID', has_gettid)

but there's no particular reason for that. You can just add

config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_headers('sys/ioccom.h'))

in the config-host.h section of meson.build?.

Paolo

Quoted 8 lines
Quoted 8 lines
Quoted 6 lines · On Sun, Nov 15, 2020 at 12:53 AM Thomas Huth <[email protected]…

On Solaris and Haiku, the _IO() macros are defined in <sys/ioccom.h>. Add a proper check for this header to our configure scripts, and make sure to include the header in tpm_ioctl.h to fix a build failure on Solaris and Haiku.

Quoted 8 lines
Quoted 8 lines

configure if check_include "sys/signal.h" ; then · line 3131

Quoted 8 lines
Signed-off-by Thomas Huth <[email protected] <mailto:[email protected]>>
configure +6 -0
+#########################################
+# sys/ioccom.h check
+have_sys_ioccom_h=no
+if check_include "sys/ioccom.h" ; then
+  have_sys_ioccom_h=yes
+fi

Paolo

#10 lore raw

Re: [PATCH 3/4] configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h

Quoted 14 lines · Paolo Bonzini
Quoted 6 lines · Thomas Huth
Quoted 1 line · 罗勇刚(Yonggang Luo)

Can we check this in meson.build?

That would be nicer, indeed, but I did not spot a place where I could add my code there ... all the other HAVE_xxx_H symbols are added in the configure script.

There is one similar test, it was split in two:

has_gettid = cc.has_function('gettid')
...
config_host_data.set('CONFIG_GETTID', has_gettid)

Quoted 5 lines

but there's no particular reason for that.  You can just add

config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_headers('sys/ioccom.h'))

in the config-host.h section of meson.build?.

Thanks, that seems to do the job! I'll send a v2 with that change (and try to come up with another patch that converts the other header checks from the configure script to meson).

Thomas

Reviewed-by on v1 3/4
#11 lore raw

Re: [PATCH 3/4] configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h

In reply to Thomas Huth
Quoted 6 lines · Thomas Huth

On Solaris and Haiku, the _IO() macros are defined in <sys/ioccom.h>. Add a proper check for this header to our configure scripts, and make sure to include the header in tpm_ioctl.h to fix a build failure on Solaris and Haiku.

Quoted 63 lines
---
  backends/tpm/tpm_ioctl.h |  4 ++++
  configure                | 11 ++++++++++-
  nbd/nbd-internal.h       |  2 +-
  3 files changed, 15 insertions(+), 2 deletions(-)
backends/tpm/tpm_ioctl.h +4 -0
index f5f5c553a9..bd6c12cb86 100644
@@ -12,6 +12,10 @@
  #include <sys/uio.h>
  #include <sys/ioctl.h>
 
+#ifdef HAVE_SYS_IOCCOM_H
+#include <sys/ioccom.h>
+#endif
+
  /*
   * Every response from a command involving a TPM command execution must hold
   * the ptm_res as the first element.
configure +10 -1
index c0acda164d..764e903748 100755
@@ -3123,6 +3123,13 @@ if check_include "sys/signal.h" ; then
    have_sys_signal_h=yes
  fi
 
+#########################################
+# sys/ioccom.h check
+have_sys_ioccom_h=no
+if check_include "sys/ioccom.h" ; then
+  have_sys_ioccom_h=yes
+fi
+
  ##########################################
  # VTE probe
 
@@ -6214,7 +6221,9 @@ fi
  if test "$have_sys_signal_h" = "yes" ; then
      echo "HAVE_SYS_SIGNAL_H=y" >> $config_host_mak
  fi
-
+if test "$have_sys_ioccom_h" = "yes" ; then
+    echo "HAVE_SYS_IOCCOM_H=y" >> $config_host_mak
+fi
  # Work around a system header bug with some kernel/XFS header
  # versions where they both try to define 'struct fsxattr':
  # xfs headers will not try to redefine structs from linux headers
nbd/nbd-internal.h +1 -1
index 60629ef160..1b2141ab4b 100644
@@ -19,7 +19,7 @@
  #ifndef _WIN32
  #include <sys/ioctl.h>
  #endif
-#if defined(__sun__) || defined(__HAIKU__)
+#ifdef HAVE_SYS_IOCCOM_H
  #include <sys/ioccom.h>
  #endif
 
#12 lore raw

PATCH v2 3/4 configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h

In reply to Thomas Huth

On Solaris and Haiku, the _IO() macros are defined in <sys/ioccom.h>. Add a proper check for this header to our build system, and make sure to include the header in tpm_ioctl.h to fix a build failure on Solaris and Haiku.

---
v2: Check in meson.build instead of using the configure script

 backends/tpm/tpm_ioctl.h | 4 ++++
 meson.build              | 2 ++
 nbd/nbd-internal.h       | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)
backends/tpm/tpm_ioctl.h +4 -0
index f5f5c553a9..bd6c12cb86 100644
@@ -12,6 +12,10 @@
 #include <sys/uio.h>
 #include <sys/ioctl.h>
 
+#ifdef HAVE_SYS_IOCCOM_H
+#include <sys/ioccom.h>
+#endif
+
 /*
  * Every response from a command involving a TPM command execution must hold
  * the ptm_res as the first element.
meson.build +2 -0
index 61d883bc07..be85f70e4c 100644
@@ -789,6 +789,8 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0]
 config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1])
 config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2])
 
+config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
+
 ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target
 arrays = ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST']
 strings = ['HOST_DSOSUF', 'CONFIG_IASL']
nbd/nbd-internal.h +1 -1
index 60629ef160..1b2141ab4b 100644
@@ -19,7 +19,7 @@
 #ifndef _WIN32
 #include <sys/ioctl.h>
 #endif
-#if defined(__sun__) || defined(__HAIKU__)
+#ifdef HAVE_SYS_IOCCOM_H
 #include <sys/ioccom.h>
 #endif
 
Signature · 1 line
2.18.4
Reviewed-by on v2 3/4
#13 lore raw

Re: [PATCH v2 3/4] configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h

Quoted 5 lines · Thomas Huth

On Solaris and Haiku, the _IO() macros are defined in <sys/ioccom.h>. Add a proper check for this header to our build system, and make sure to include the header in tpm_ioctl.h to fix a build failure on Solaris and Haiku.

Quoted 8 lines

---
v2: Check in meson.build instead of using the configure script

 backends/tpm/tpm_ioctl.h | 4 ++++
 meson.build              | 2 ++
 nbd/nbd-internal.h       | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)
#14 lore raw

PATCH 4/4 tests/vm: Add Haiku test based on their vagrant images

In reply to Thomas Huth

From: Alexander von Gluck IV <[email protected]>

[PMD: Avoid recreating the image each time]
[thuth: Add ninja package, /usr/bin/env hack and --disable-slirp]
---
 tests/keys/vagrant        |  27 +++++++++
 tests/keys/vagrant.pub    |   1 +
 tests/vm/Makefile.include |   3 +-
 tests/vm/basevm.py        |   5 +-
 tests/vm/haiku.x86_64     | 119 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 152 insertions(+), 3 deletions(-)
 create mode 100644 tests/keys/vagrant
 create mode 100644 tests/keys/vagrant.pub
 create mode 100755 tests/vm/haiku.x86_64
tests/keys/vagrant new file +27 -0
new file mode 100644
index 0000000000..7d6a083909
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEogIBAAKCAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzI
+w+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoP
+kcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2
+hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NO
+Td0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcW
+yLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQIBIwKCAQEA4iqWPJXtzZA68mKd
+ELs4jJsdyky+ewdZeNds5tjcnHU5zUYE25K+ffJED9qUWICcLZDc81TGWjHyAqD1
+Bw7XpgUwFgeUJwUlzQurAv+/ySnxiwuaGJfhFM1CaQHzfXphgVml+fZUvnJUTvzf
+TK2Lg6EdbUE9TarUlBf/xPfuEhMSlIE5keb/Zz3/LUlRg8yDqz5w+QWVJ4utnKnK
+iqwZN0mwpwU7YSyJhlT4YV1F3n4YjLswM5wJs2oqm0jssQu/BT0tyEXNDYBLEF4A
+sClaWuSJ2kjq7KhrrYXzagqhnSei9ODYFShJu8UWVec3Ihb5ZXlzO6vdNQ1J9Xsf
+4m+2ywKBgQD6qFxx/Rv9CNN96l/4rb14HKirC2o/orApiHmHDsURs5rUKDx0f9iP
+cXN7S1uePXuJRK/5hsubaOCx3Owd2u9gD6Oq0CsMkE4CUSiJcYrMANtx54cGH7Rk
+EjFZxK8xAv1ldELEyxrFqkbE4BKd8QOt414qjvTGyAK+OLD3M2QdCQKBgQDtx8pN
+CAxR7yhHbIWT1AH66+XWN8bXq7l3RO/ukeaci98JfkbkxURZhtxV/HHuvUhnPLdX
+3TwygPBYZFNo4pzVEhzWoTtnEtrFueKxyc3+LjZpuo+mBlQ6ORtfgkr9gBVphXZG
+YEzkCD3lVdl8L4cw9BVpKrJCs1c5taGjDgdInQKBgHm/fVvv96bJxc9x1tffXAcj
+3OVdUN0UgXNCSaf/3A/phbeBQe9xS+3mpc4r6qvx+iy69mNBeNZ0xOitIjpjBo2+
+dBEjSBwLk5q5tJqHmy/jKMJL4n9ROlx93XS+njxgibTvU6Fp9w+NOFD/HvxB3Tcz
+6+jJF85D5BNAG3DBMKBjAoGBAOAxZvgsKN+JuENXsST7F89Tck2iTcQIT8g5rwWC
+P9Vt74yboe2kDT531w8+egz7nAmRBKNM751U/95P9t88EDacDI/Z2OwnuFQHCPDF
+llYOUI+SpLJ6/vURRbHSnnn8a/XG+nzedGH5JGqEJNQsz+xT2axM0/W/CRknmGaJ
+kda/AoGANWrLCz708y7VYgAtW2Uf1DPOIYMdvo6fxIB5i9ZfISgcJ/bbCUkFrhoH
++vq/5CIWxCPp0f85R4qxxQ5ihxJ0YDQT9Jpx4TMss4PSavPaBH3RXow5Ohe+bYoQ
+NE5OgEXk2wVfZczCZpigBKbKZHNYcelXtTt/nP3rsCuGcM4h53s=
+-----END RSA PRIVATE KEY-----
tests/keys/vagrant.pub new file +1 -0
new file mode 100644
index 0000000000..b8d012d787
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== well-known vagrant key for qemu-test, do not use on any machine exposed to an external network
tests/vm/Makefile.include +2 -1
index 61f893ffdc..e94d95ec54 100644
@@ -4,7 +4,7 @@
 
 EFI_AARCH64 = $(wildcard $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd)
 
-IMAGES := freebsd netbsd openbsd centos fedora
+IMAGES := freebsd netbsd openbsd centos fedora haiku.x86_64
 ifneq ($(GENISOIMAGE),)
 IMAGES += ubuntu.i386 centos
 ifneq ($(EFI_AARCH64),)
@@ -41,6 +41,7 @@ endif
 else
 	@echo "  (install genisoimage to build centos/ubuntu images)"
 endif
+	@echo "  vm-build-haiku.x86_64           - Build QEMU in Haiku VM"
 	@echo ""
 	@echo "  vm-build-all                    - Build QEMU in all VMs"
 	@echo "  vm-clean-all                    - Clean up VM images"
tests/vm/basevm.py +3 -2
index 3fac20e929..00f1d5ca8d 100644
@@ -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
tests/vm/haiku.x86_64 new file +119 -0

119 lines not on this page · raw message

Signature · 1 line
2.18.4