Skip to contentSkip to conversation

XSM test case for OSSTest

PATCH Superseded Wei Liu 2 participants 25 messages Oct 14, 2014 – Dec 10, 2014

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

v3 cover XSM test case for OSSTest

Hi all

This patch series attempts to duplicate some Debian test cases for XSM. This is version 3 of this series.

Tests duplicated for xen-unstable branch:
build-{i386,amd64,armhf}-xsm test-amd64-{i386,amd64}-xl-xsm test-armhf-armhf-xl-xsm test-amd64-{i386,amd64}-xl-qemuu-debianhvm-amd64-xsm test-amd64-(i386,amd64}-xl-qemut-debianhvm-amd64-xsm

Output of
./standalone-generate-dump-flight-runvars > origin # master ./standalone-generate-dump-flight-runvars > xsm # this series applied diff -ub ../origin xsm | grep '+xen-unstable' | sed 's/[ \t]*$//'

+xen-unstable               test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm all_hostflags               arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test,hvm
+xen-unstable               test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm all_hostflags               arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test,hvm
+xen-unstable               test-amd64-amd64-xl-xsm                       all_hostflags               arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test
+xen-unstable               test-amd64-i386-xl-qemut-debianhvm-amd64-xsm  all_hostflags               arch-i386,arch-xen-amd64,suite-wheezy,purpose-test,hvm
+xen-unstable               test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm  all_hostflags               arch-i386,arch-xen-amd64,suite-wheezy,purpose-test,hvm
+xen-unstable               test-amd64-i386-xl-xsm                        all_hostflags               arch-i386,arch-xen-amd64,suite-wheezy,purpose-test
+xen-unstable               test-armhf-armhf-xl-xsm                       all_hostflags               arch-armhf,arch-xen-armhf,suite-wheezy,purpose-test
+xen-unstable               build-amd64-xsm                               arch                        amd64
+xen-unstable               build-armhf-xsm                               arch                        armhf
+xen-unstable               build-i386-xsm                                arch                        i386
+xen-unstable               test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm arch                        amd64
+xen-unstable               test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm arch                        amd64
+xen-unstable               test-amd64-amd64-xl-xsm                       arch                        amd64
+xen-unstable               test-amd64-i386-xl-qemut-debianhvm-amd64-xsm  arch                        i386
+xen-unstable               test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm  arch                        i386
+xen-unstable               test-amd64-i386-xl-xsm                        arch                        i386
+xen-unstable               test-armhf-armhf-xl-xsm                       arch                        armhf
+xen-unstable               test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm bios                        rombios
+xen-unstable               test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm bios                        seabios
+xen-unstable               test-amd64-i386-xl-qemut-debianhvm-amd64-xsm  bios                        rombios
+xen-unstable               test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm  bios                        seabios
+xen-unstable               build-amd64-xsm                               build_lvextend_max          50
+xen-unstable               build-armhf-xsm                               build_lvextend_max          50
+xen-unstable               build-i386-xsm                                build_lvextend_max          50
+xen-unstable               test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm buildjob                    build-amd64-xsm
+xen-unstable               test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm buildjob                    build-amd64-xsm
+xen-unstable               test-amd64-amd64-xl-xsm                       buildjob                    build-amd64-xsm
+xen-unstable               test-amd64-i386-xl-qemut-debianhvm-amd64-xsm  buildjob                    build-i386-xsm
+xen-unstable               test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm  buildjob                    build-i386-xsm
+xen-unstable               test-amd64-i386-xl-xsm                        buildjob                    build-i386-xsm
+xen-unstable               test-armhf-armhf-xl-xsm                       buildjob                    build-armhf-xsm
+xen-unstable               test-amd64-amd64-xl-xsm                       debian_arch                 amd64
+xen-unstable               test-amd64-i386-xl-xsm                        debian_arch                 i386
+xen-unstable               test-armhf-armhf-xl-xsm                       debian_arch                 armhf
+xen-unstable               test-amd64-amd64-xl-xsm                       debian_kernkind             pvops
+xen-unstable               test-amd64-i386-xl-xsm                        debian_kernkind             pvops
+xen-unstable               test-armhf-armhf-xl-xsm                       debian_kernkind             pvops
+xen-unstable               test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm debianhvm_image             debian-7.2.0-amd64-CD-1.iso
+xen-unstable               test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm debianhvm_image             debian-7.2.0-amd64-CD-1.iso
+xen-unstable               test-amd64-i386-xl-qemut-debianhvm-amd64-xsm  debianhvm_image             debian-7.2.0-amd64-CD-1.iso
+xen-unstable               test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm  debianhvm_image             debian-7.2.0-amd64-CD-1.iso
+xen-unstable               test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm device_model_version        qemu-xen-traditional
+xen-unstable               test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm device_model_version        qemu-xen
+xen-unstable               test-amd64-i386-xl-qemut-debianhvm-amd64-xsm  device_model_version        qemu-xen-traditional
+xen-unstable               test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm  device_model_version        qemu-xen
+xen-unstable               build-amd64-xsm                               enable_ovmf                 true
+xen-unstable               build-armhf-xsm                               enable_ovmf                 true
+xen-unstable               build-i386-xsm                                enable_ovmf                 true
+xen-unstable               build-amd64-xsm                               enable_xend                 false
+xen-unstable               build-armhf-xsm                               enable_xend                 false
+xen-unstable               build-i386-xsm                                enable_xend                 false
+xen-unstable               build-amd64                                   enable_xsm                  n
+xen-unstable               build-amd64-xsm                               enable_xsm                  y
+xen-unstable               build-armhf                                   enable_xsm                  n
+xen-unstable               build-armhf-xsm                               enable_xsm                  y
+xen-unstable               build-i386                                    enable_xsm                  n
+xen-unstable               build-i386-xsm                                enable_xsm                  y
+xen-unstable               test-amd64-amd64-xl                           enable_xsm                  n
+xen-unstable               test-amd64-amd64-xl-qemut-debianhvm-amd64     enable_xsm                  n
+xen-unstable               test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm enable_xsm                  y
+xen-unstable               test-amd64-amd64-xl-qemuu-debianhvm-amd64     enable_xsm                  n
+xen-unstable               test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm enable_xsm                  y
+xen-unstable               test-amd64-amd64-xl-qemuu-ovmf-amd64          enable_xsm                  n
+xen-unstable               test-amd64-amd64-xl-xsm                       enable_xsm                  y
+xen-unstable               test-amd64-i386-xl                            enable_xsm                  n
+xen-unstable               test-amd64-i386-xl-qemut-debianhvm-amd64      enable_xsm                  n
+xen-unstable               test-amd64-i386-xl-qemut-debianhvm-amd64-xsm  enable_xsm                  y
+xen-unstable               test-amd64-i386-xl-qemuu-debianhvm-amd64      enable_xsm                  n
+xen-unstable               test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm  enable_xsm                  y
+xen-unstable               test-amd64-i386-xl-qemuu-ovmf-amd64           enable_xsm                  n
+xen-unstable               test-amd64-i386-xl-xsm                        enable_xsm                  y
+xen-unstable               test-armhf-armhf-xl                           enable_xsm                  n
+xen-unstable               test-armhf-armhf-xl-xsm                       enable_xsm                  y
+xen-unstable               build-amd64-xsm                               host_hostflags              share-build-wheezy-amd64,arch-amd64,suite-wheezy,purpose-build
+xen-unstable               build-armhf-xsm                               host_hostflags              share-build-wheezy-armhf,arch-armhf,suite-wheezy,purpose-build
+xen-unstable               build-i386-xsm                                host_hostflags              share-build-wheezy-i386,arch-i386,suite-wheezy,purpose-build
+xen-unstable               test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm kernbuildjob                build-amd64-pvops
+xen-unstable               test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm kernbuildjob                build-amd64-pvops
+xen-unstable               test-amd64-amd64-xl-xsm                       kernbuildjob                build-amd64-pvops
+xen-unstable               test-amd64-i386-xl-qemut-debianhvm-amd64-xsm  kernbuildjob                build-i386-pvops
+xen-unstable               test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm  kernbuildjob                build-i386-pvops
+xen-unstable               test-amd64-i386-xl-xsm                        kernbuildjob                build-i386-pvops
+xen-unstable               test-armhf-armhf-xl-xsm                       kernbuildjob                build-armhf-pvops
+xen-unstable               test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm kernkind                    pvops
+xen-unstable               test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm kernkind                    pvops
+xen-unstable               test-amd64-amd64-xl-xsm                       kernkind                    pvops
+xen-unstable               test-amd64-i386-xl-qemut-debianhvm-amd64-xsm  kernkind                    pvops
+xen-unstable               test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm  kernkind                    pvops
+xen-unstable               test-amd64-i386-xl-xsm                        kernkind                    pvops
+xen-unstable               test-armhf-armhf-xl-xsm                       kernkind                    pvops
+xen-unstable               build-amd64-pvops                             revision_linux              89161fe91f2fd1049bcc38f5d4b814acab7b83f5
+xen-unstable               build-armhf-pvops                             revision_linux              89161fe91f2fd1049bcc38f5d4b814acab7b83f5
+xen-unstable               build-i386-pvops                              revision_linux              89161fe91f2fd1049bcc38f5d4b814acab7b83f5
+xen-unstable               build-amd64-xsm                               revision_qemu
+xen-unstable               build-armhf-xsm                               revision_qemu
+xen-unstable               build-i386-xsm                                revision_qemu
+xen-unstable               build-amd64-xsm                               revision_qemuu              c9d8f8b755e8960edf7725e05f3e6ac743a5e12e
+xen-unstable               build-armhf-xsm                               revision_qemuu              c9d8f8b755e8960edf7725e05f3e6ac743a5e12e
+xen-unstable               build-i386-xsm                                revision_qemuu              c9d8f8b755e8960edf7725e05f3e6ac743a5e12e
+xen-unstable               build-amd64-xsm                               revision_seabios
+xen-unstable               build-armhf-xsm                               revision_seabios
+xen-unstable               build-i386-xsm                                revision_seabios
+xen-unstable               build-amd64-xsm                               revision_xen                4d57153b52a36183d58e8de6ba613929f906386a
+xen-unstable               build-armhf-xsm                               revision_xen                4d57153b52a36183d58e8de6ba613929f906386a
+xen-unstable               build-i386-xsm                                revision_xen                4d57153b52a36183d58e8de6ba613929f906386a
+xen-unstable               test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm toolstack                   xl
+xen-unstable               test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm toolstack                   xl
+xen-unstable               test-amd64-amd64-xl-xsm                       toolstack                   xl
+xen-unstable               test-amd64-i386-xl-qemut-debianhvm-amd64-xsm  toolstack                   xl
+xen-unstable               test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm  toolstack                   xl
+xen-unstable               test-amd64-i386-xl-xsm                        toolstack                   xl
+xen-unstable               test-armhf-armhf-xl-xsm                       toolstack                   xl
+xen-unstable               build-amd64-xsm                               tree_qemu                   git://xenbits.xen.org/staging/qemu-xen-unstable.git
+xen-unstable               build-armhf-xsm                               tree_qemu                   git://xenbits.xen.org/staging/qemu-xen-unstable.git
+xen-unstable               build-i386-xsm                                tree_qemu                   git://xenbits.xen.org/staging/qemu-xen-unstable.git
+xen-unstable               build-amd64-xsm                               tree_qemuu                  git://xenbits.xen.org/staging/qemu-upstream-unstable.git
+xen-unstable               build-armhf-xsm                               tree_qemuu                  git://xenbits.xen.org/staging/qemu-upstream-unstable.git
+xen-unstable               build-i386-xsm                                tree_qemuu                  git://xenbits.xen.org/staging/qemu-upstream-unstable.git
+xen-unstable               build-amd64-xsm                               tree_seabios
+xen-unstable               build-armhf-xsm                               tree_seabios
+xen-unstable               build-i386-xsm                                tree_seabios
+xen-unstable               build-amd64-xsm                               tree_xen                    git://xenbits.xen.org/xen.git
+xen-unstable               build-armhf-xsm                               tree_xen                    git://xenbits.xen.org/xen.git
+xen-unstable               build-i386-xsm                                tree_xen                    git://xenbits.xen.org/xen.git
+xen-unstable               test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm xenbuildjob                 build-amd64-xsm
+xen-unstable               test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm xenbuildjob                 build-amd64-xsm
+xen-unstable               test-amd64-amd64-xl-xsm                       xenbuildjob                 build-amd64-xsm
+xen-unstable               test-amd64-i386-xl-qemut-debianhvm-amd64-xsm  xenbuildjob                 build-amd64-xsm
+xen-unstable               test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm  xenbuildjob                 build-amd64-xsm
+xen-unstable               test-amd64-i386-xl-xsm                        xenbuildjob                 build-amd64-xsm
+xen-unstable               test-armhf-armhf-xl-xsm                       xenbuildjob                 build-armhf-xsm

Changes since v2:
1. update 20_linux_xen
2. drop patches that add in seclabel
3. some code refactoring

Changes since v1:
1. address IanC's comments regarding coding style.
2. fix a bug in previous version that duplicates HVM test cases for pre-4.5 branches.

Wei.

Wei Liu (11):
README: list chiark-utils-bin as requirement
gitignore: ignore images directory
ts-debian-install: rename cfg_xend to cfg
overlay: update overlay/etc/grub.d/20_linux_xen
ts-xen-build-prep: install checkpolicy
ts-xen-build: build with XSM support if requested
mfi-common: create build-$arch-xsm job
Debian.pm: pass in XSM configuration to bootloader setup routines Debian.pm: load flask policy in uboot
ts-xen-install: install Xen with XSM support if requested mfi-common, make-flight: create XSM test jobs

 .gitignore                      |    1 +
 Osstest/Debian.pm               |   53 ++++++++++++++----
 README                          |    1 +
 make-flight                     |   61 +++++++++++++-------
 mfi-common                      |   34 +++++++++++-
 overlay/etc/grub.d/20_linux_xen |  117 +++++++++++++++++++++++++++++++--------
 ts-debian-install               |    4 +-
 ts-xen-build                    |   12 ++++
 ts-xen-build-prep               |    2 +-
 ts-xen-install                  |    4 +-
 10 files changed, 226 insertions(+), 63 deletions(-)
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH v3 1/11 README: list chiark-utils-bin as requirement

---
 README |    1 +
 1 file changed, 1 insertion(+)
README +1 -0
index 9a85549..ee1cd7a 100644
@@ -204,6 +204,7 @@ To run osstest in standalone mode:
      pax rsync
      curl
      netcat
+     chiark-utils-bin
 
  - Optional: ipmitool
 
Signature · 1 line
1.7.10.4
author
#3 lore raw

PATCH v3 3/11 ts-debian-install: rename cfg_xend to cfg

In reply to Wei Liu

... as this config file is just a config file in general, not strictly a Xend format config file.

---
 ts-debian-install |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
ts-debian-install +2 -2
index 58ea743..fcef827 100755
@@ -89,8 +89,8 @@ END
             $initrd_opt \\
             $archarg
 END
-    my $cfg_xend= "/etc/xen/$gho->{Name}.cfg";
-    store_runvar("$gho->{Guest}_cfgpath", $cfg_xend);
+    my $cfg= "/etc/xen/$gho->{Name}.cfg";
+    store_runvar("$gho->{Guest}_cfgpath", $cfg);
     store_runvar("$gho->{Guest}_swap_lv", "$gho->{Name}-swap");
 }
 
Signature · 1 line
1.7.10.4
author
#5 lore raw

PATCH v3 4/11 overlay: update overlay/etc/grub.d/20_linux_xen

In reply to Wei Liu

This file was created to work around Debian bug #633127.

According to Debian bug tracker [0], this bug is fixed in Wheezy. As we're now using Wheezy in OSSTest we can safely remove this overlay file.

Also add a note to reference #633127 above grub2 setup function, in case someone trips over #633127.

As we're now using Wheezy in production, update this file to Wheezy's version and take care of Debian bug #690538 and GRUB bug #43420.

0: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=633127

Cc Ian Jackson <[email protected]>
Cc Ian Campbell <[email protected]>
---
 Osstest/Debian.pm               |    3 +
 overlay/etc/grub.d/20_linux_xen |  117 +++++++++++++++++++++++++++++++--------
 2 files changed, 96 insertions(+), 24 deletions(-)
Osstest/Debian.pm +3 -0
index ab09abb..ed8a1b2 100644
@@ -274,6 +274,9 @@ sub setupboot_grub1 ($$$) {
     return $bl;
 }
 
+# Note on running OSSTest on Squeeze with old Xen kernel: check out
+# Debian bug #633127 "/etc/grub/20_linux does not recognise some old
+# Xen kernels"
 sub setupboot_grub2 ($$$) {
     my ($ho,$want_kernver,$xenhopt,$xenkopt) = @_;
     my $bl= { };
overlay/etc/grub.d/20_linux_xen +93 -24

189 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#6 lore raw

Re: [PATCH OSSTEST v3 04/11] overlay: update overlay/etc/grub.d/20_linux_xen

Quoted 11 lines · Wei Liu

This file was created to work around Debian bug #633127.

According to Debian bug tracker [0], this bug is fixed in Wheezy. As we're now using Wheezy in OSSTest we can safely remove this overlay file.

Also add a note to reference #633127 above grub2 setup function, in case someone trips over #633127.

As we're now using Wheezy in production, update this file to Wheezy's version and take care of Debian bug #690538 and GRUB bug #43420.

When reference bugs it would be useful to include the bug title here so the reader doesn't have to go and look it up.

#690538 relates to providing an option to remove the submenus. Please can the changelog explain why that is relevant to us.

Did you fix it by removing/reverting the submenu support altogether, as opposed to e.g. importing the patch from Eric Fischer in the bug report? I don't see stuff which I'd expect if you had applied the patch. I think it would be worth spelling out in a bit more detail what the changes you've made to the baseline for each bug were.

I suppose constructing overlay/etc/grub.d/20_linux_xen from a baseline unmodified version (checked in, not retrieved from the host) and a mini-patch-series (also checked in) on the fly is over complexifying things?

Ian.

author
#7 lore raw

Re: [PATCH OSSTEST v3 04/11] overlay: update overlay/etc/grub.d/20_linux_xen

Quoted 7 lines · Ian Campbell
Quoted 6 lines · Wei Liu

This file was created to work around Debian bug #633127.

According to Debian bug tracker [0], this bug is fixed in Wheezy. As we're now using Wheezy in OSSTest we can safely remove this overlay file.

Quoted 9 lines
Quoted 5 lines

Also add a note to reference #633127 above grub2 setup function, in case someone trips over #633127.

As we're now using Wheezy in production, update this file to Wheezy's version and take care of Debian bug #690538 and GRUB bug #43420.

When reference bugs it would be useful to include the bug title here so the reader doesn't have to go and look it up.

OK.

Quoted 3 lines

#690538 relates to providing an option to remove the submenus. Please can the changelog explain why that is relevant to us.

Because somebody else thought not making submenu optional is a bug. So do I.

Quoted 6 lines

Did you fix it by removing/reverting the submenu support altogether, as opposed to e.g. importing the patch from Eric Fischer in the bug report? I don't see stuff which I'd expect if you had applied the patch. I think it would be worth spelling out in a bit more detail what the changes you've made to the baseline for each bug were.

I fixed this by supplying a 20_linux_xen extracted from wheezy with submenu generation removed (2 lines). This is how we dealt with other grub bugs.

Quoted 5 lines

I suppose constructing overlay/etc/grub.d/20_linux_xen from a baseline unmodified version (checked in, not retrieved from the host) and a mini-patch-series (also checked in) on the fly is over complexifying things?

Certainly more complex than a single file solution. At the very least new infrastructure to apply patches for overlay files is needed.

Wei.

Quoted 1 line

Ian.

#8 lore raw

Re: [PATCH OSSTEST v3 04/11] overlay: update overlay/etc/grub.d/20_linux_xen

Quoted 7 lines · Wei Liu
Quoted 3 lines · Ian Campbell

#690538 relates to providing an option to remove the submenus. Please can the changelog explain why that is relevant to us.

Because somebody else thought not making submenu optional is a bug. So do I.

I meant: why is this important to osstest? does using submenus break something? if so then what? if not then there is no reason to be diverging from the baseline.

Quoted 10 lines
Quoted 6 lines

Did you fix it by removing/reverting the submenu support altogether, as opposed to e.g. importing the patch from Eric Fischer in the bug report? I don't see stuff which I'd expect if you had applied the patch. I think it would be worth spelling out in a bit more detail what the changes you've made to the baseline for each bug were.

I fixed this by supplying a 20_linux_xen extracted from wheezy with submenu generation removed (2 lines). This is how we dealt with other grub bugs.

I think precisely what you've changed from the baseline should be documented somewhere.

Ian.

author
#9 lore raw

Re: [PATCH OSSTEST v3 04/11] overlay: update overlay/etc/grub.d/20_linux_xen

Quoted 6 lines · Ian Campbell
Quoted 5 lines · Wei Liu
Quoted 3 lines · Ian Campbell

#690538 relates to providing an option to remove the submenus. Please can the changelog explain why that is relevant to us.

Quoted 7 lines
Quoted 2 lines

Because somebody else thought not making submenu optional is a bug. So do I.

I meant: why is this important to osstest? does using submenus break something? if so then what? if not then there is no reason to be diverging from the baseline.

Submenu breaks OSSTest's grub menu parser, causing test step to fail.

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

Did you fix it by removing/reverting the submenu support altogether, as opposed to e.g. importing the patch from Eric Fischer in the bug report? I don't see stuff which I'd expect if you had applied the patch. I think it would be worth spelling out in a bit more detail what the changes you've made to the baseline for each bug were.

Quoted 7 lines
Quoted 3 lines

I fixed this by supplying a 20_linux_xen extracted from wheezy with submenu generation removed (2 lines). This is how we dealt with other grub bugs.

I think precisely what you've changed from the baseline should be documented somewhere.

OK.

Wei.

Quoted 1 line

Ian.

#10 lore raw

Re: [PATCH OSSTEST v3 04/11] overlay: update overlay/etc/grub.d/20_linux_xen

Quoted 10 lines · Wei Liu
Quoted 9 lines · Ian Campbell
Quoted 7 lines · Wei Liu
Quoted 3 lines · Ian Campbell

#690538 relates to providing an option to remove the submenus. Please can the changelog explain why that is relevant to us.

Because somebody else thought not making submenu optional is a bug. So do I.

Quoted 6 lines
Quoted 4 lines

I meant: why is this important to osstest? does using submenus break something? if so then what? if not then there is no reason to be diverging from the baseline.

Submenu breaks OSSTest's grub menu parser, causing test step to fail.

Great, that's a good reason to diverge, but please say it somewhere like in the commit log.

I think the parser should also gain a comment with a reference to either the bug or this discussion saying that it relies on grub not using submenus.

Ian.

author
#11 lore raw

PATCH v3 5/11 ts-xen-build-prep: install checkpolicy

In reply to Wei Liu

This is used to complie Flask policy.

---
 ts-xen-build-prep |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ts-xen-build-prep +1 -1
index 05a7857..edef9a9 100755
@@ -178,7 +178,7 @@ sub prep () {
                                autoconf automake libtool xsltproc
                                libxml2-utils libxml2-dev libnl-dev
                                libdevmapper-dev w3c-dtd-xhtml
-			       ccache));
+			       ccache checkpolicy));
 
     target_cmd_root($ho, "chmod -R a+r /usr/share/git-core/templates");
     # workaround for Debian #595728
Signature · 1 line
1.7.10.4
author
#12 lore raw

PATCH v3 6/11 ts-xen-build: build with XSM support if requested

In reply to Wei Liu
---
 ts-xen-build |   12 ++++++++++++
 1 file changed, 12 insertions(+)
ts-xen-build +12 -0
index 661f186..390c114 100755
@@ -27,6 +27,8 @@ tsreadconfig();
 selectbuildhost(\@ARGV);
 # remaining arguments are passed as targets to "make"
 builddirsprops();
+
+my $enable_xsm = $r{enable_xsm} =~ m/y/ ? 1 : 0;
     
 sub checkout () {
     prepbuilddirs();
@@ -34,6 +36,7 @@ sub checkout () {
     build_clone($ho, 'xen', $builddir, 'xen');
 
     my $debug_build = $r{xen_build_debug} || 'y';
+    my $build_xsm = $enable_xsm ? 'y' : 'n';
 
     # Do not set this unless you know what you are doing. This arm
     # option makes the build specific to a particular type of
@@ -47,6 +50,7 @@ sub checkout () {
         cd $builddir/xen
 	>.config
 	echo >>.config debug=$debug_build
+	echo >>.config XSM_ENABLE=$build_xsm
 	echo >>.config GIT_HTTP=y
 	echo >>.config LIBLEAFDIR_x86_64=lib
 	echo >>.config QEMU_REMOTE='$r{tree_qemu}'
@@ -114,6 +118,14 @@ END
     buildcmd_stamped_logged(9000, 'build', '',<<END,'');
             $make_prefix make $makeflags @ARGV
 END
+
+    if ($enable_xsm) {
+	my $xen_version = target_cmd_output_root($ho, <<END, 30);
+	    cd $builddir/xen
+	    $make_prefix make xenversion
+END
+        store_runvar("flaskpolicy", "xenpolicy-" . $xen_version);
+    }
 }
 
 sub collectversions () {
Signature · 1 line
1.7.10.4
#13 lore raw

Re: [PATCH OSSTEST v3 06/11] ts-xen-build: build with XSM support if requested

Quoted 1 line · Wei Liu

Looks like Ian J acked v2 in <[email protected]>.

Quoted 9 lines
---
 ts-xen-build |   12 ++++++++++++
 1 file changed, 12 insertions(+)
ts-xen-build +0 -0
index 661f186..390c114 100755

ts-xen-build tsreadconfig(); · line 31

Quoted 5 lines
ts-xen-build +2 -0
@@ -27,6 +27,8 @@ tsreadconfig();
 selectbuildhost(\@ARGV);
 # remaining arguments are passed as targets to "make"
 builddirsprops();
+
+my $enable_xsm = $r{enable_xsm} =~ m/y/ ? 1 : 0;

Existing boolean runvars (enable_ovmf, enable_xend) appear to use true/false (which still need laundering into Perl booleans). Using y/n made sense when you were poking it straight into XSM_ENABLE, but if you are going to have to translate it there anyway (into $build_xsm) you may as well go for consistency.

Quoted 34 lines
ts-xen-build +10 -0
 sub checkout () {
     prepbuilddirs();
@@ -34,6 +36,7 @@ sub checkout () {
     build_clone($ho, 'xen', $builddir, 'xen');
 
     my $debug_build = $r{xen_build_debug} || 'y';
+    my $build_xsm = $enable_xsm ? 'y' : 'n';
 
     # Do not set this unless you know what you are doing. This arm
     # option makes the build specific to a particular type of
@@ -47,6 +50,7 @@ sub checkout () {
         cd $builddir/xen
 	>.config
 	echo >>.config debug=$debug_build
+	echo >>.config XSM_ENABLE=$build_xsm
 	echo >>.config GIT_HTTP=y
 	echo >>.config LIBLEAFDIR_x86_64=lib
 	echo >>.config QEMU_REMOTE='$r{tree_qemu}'
@@ -114,6 +118,14 @@ END
     buildcmd_stamped_logged(9000, 'build', '',<<END,'');
             $make_prefix make $makeflags @ARGV
 END
+
+    if ($enable_xsm) {
+	my $xen_version = target_cmd_output_root($ho, <<END, 30);
+	    cd $builddir/xen
+	    $make_prefix make xenversion
+END
+        store_runvar("flaskpolicy", "xenpolicy-" . $xen_version);
+    }
 }
 
 sub collectversions () {
author
#14 lore raw

Re: [PATCH OSSTEST v3 06/11] ts-xen-build: build with XSM support if requested

Quoted 11 lines · Ian Campbell
Quoted 1 line · Wei Liu

Looks like Ian J acked v2 in <[email protected]>.

Quoted 4 lines
---
 ts-xen-build |   12 ++++++++++++
 1 file changed, 12 insertions(+)
Quoted 17 lines

ts-xen-build tsreadconfig(); · line 31

Quoted 10 lines
ts-xen-build +2 -0
index 661f186..390c114 100755
@@ -27,6 +27,8 @@ tsreadconfig();
 selectbuildhost(\@ARGV);
 # remaining arguments are passed as targets to "make"
 builddirsprops();
+
+my $enable_xsm = $r{enable_xsm} =~ m/y/ ? 1 : 0;

Existing boolean runvars (enable_ovmf, enable_xend) appear to use true/false (which still need laundering into Perl booleans). Using y/n made sense when you were poking it straight into XSM_ENABLE, but if you are going to have to translate it there anyway (into $build_xsm) you may as well go for consistency.

I tried to be consistent with next path (the "n y" one, eh). I'm OK with changing them to true, false though.

Quoted 35 lines
Quoted 34 lines
ts-xen-build +10 -0
 sub checkout () {
     prepbuilddirs();
@@ -34,6 +36,7 @@ sub checkout () {
     build_clone($ho, 'xen', $builddir, 'xen');
 
     my $debug_build = $r{xen_build_debug} || 'y';
+    my $build_xsm = $enable_xsm ? 'y' : 'n';
 
     # Do not set this unless you know what you are doing. This arm
     # option makes the build specific to a particular type of
@@ -47,6 +50,7 @@ sub checkout () {
         cd $builddir/xen
 	>.config
 	echo >>.config debug=$debug_build
+	echo >>.config XSM_ENABLE=$build_xsm
 	echo >>.config GIT_HTTP=y
 	echo >>.config LIBLEAFDIR_x86_64=lib
 	echo >>.config QEMU_REMOTE='$r{tree_qemu}'
@@ -114,6 +118,14 @@ END
     buildcmd_stamped_logged(9000, 'build', '',<<END,'');
             $make_prefix make $makeflags @ARGV
 END
+
+    if ($enable_xsm) {
+	my $xen_version = target_cmd_output_root($ho, <<END, 30);
+	    cd $builddir/xen
+	    $make_prefix make xenversion
+END
+        store_runvar("flaskpolicy", "xenpolicy-" . $xen_version);
+    }
 }
 
 sub collectversions () {
author
#15 lore raw

PATCH v3 7/11 mfi-common: create build-$arch-xsm job

In reply to Wei Liu
---
 mfi-common |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
mfi-common +22 -1
index 5c4f5d5..e772086 100644
@@ -41,6 +41,19 @@ branch_wants_rumpkernel_tests () {
   esac
 }
 
+xenbranch_wants_xsm_tests () {
+    # Test XSM from 4.5 onwards
+    case "$xenbranch" in
+    xen-3.*-testing) echo "n";;
+    xen-4.0-testing) echo "n";;
+    xen-4.1-testing) echo "n";;
+    xen-4.2-testing) echo "n";;
+    xen-4.3-testing) echo "n";;
+    xen-4.4-testing) echo "n";;
+    *) echo "n y";
+    esac
+}
+
 create_build_jobs () {
 
   local arch
@@ -139,8 +152,15 @@ create_build_jobs () {
 
     build_hostflags=share-build-$suite-$arch,arch-$arch,suite-$suite,purpose-build
 
-    ./cs-job-create $flight build-$arch build                                \
+    for enable_xsm in $(xenbranch_wants_xsm_tests) ; do
+      if [ x$enable_xsm = xy ] ; then
+        xsm_suffix="-xsm"
+      else
+        xsm_suffix=""
+      fi
+      ./cs-job-create $flight build-$arch$xsm_suffix build                   \
                 arch=$arch enable_xend=$build_defxend enable_ovmf=$enable_ovmf\
+                enable_xsm=$enable_xsm                                       \
         tree_qemu=$TREE_QEMU                                                 \
         tree_qemuu=$TREE_QEMU_UPSTREAM                                       \
         tree_xen=$TREE_XEN                                                   \
@@ -152,6 +172,7 @@ create_build_jobs () {
                 revision_qemu=$REVISION_QEMU                                 \
                 revision_qemuu=$REVISION_QEMU_UPSTREAM                       \
                 revision_seabios=$REVISION_SEABIOS
+    done
 
     if [ $build_extraxend = "true" ] ; then
     ./cs-job-create $flight build-$arch-xend build                           \
Signature · 1 line
1.7.10.4
#16 lore raw

Re: [PATCH OSSTEST v3 07/11] mfi-common: create build-$arch-xsm job

Quoted 13 lines · Wei Liu
---
 mfi-common |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
mfi-common +0 -0
index 5c4f5d5..e772086 100644
@@ -41,6 +41,19 @@ branch_wants_rumpkernel_tests () {
   esac
 }
 

mfi-common branch_wants_rumpkernel_tests () { · line 53

Quoted 10 lines
mfi-common +10 -0
+xenbranch_wants_xsm_tests () {
+    # Test XSM from 4.5 onwards
+    case "$xenbranch" in
+    xen-3.*-testing) echo "n";;
+    xen-4.0-testing) echo "n";;
+    xen-4.1-testing) echo "n";;
+    xen-4.2-testing) echo "n";;
+    xen-4.3-testing) echo "n";;
+    xen-4.4-testing) echo "n";;
+    *) echo "n y";

Did you mean just "y" here, or is something very subtle going on?

Oh I see, you run over the result of this as a list with for. Sneaky!

I think you should name it something like xenbranch_xsm_variants or something else which doesn't make the reader expect it to return a boolean.

Ian.

author
#17 lore raw

Re: [PATCH OSSTEST v3 07/11] mfi-common: create build-$arch-xsm job

Quoted 27 lines · Ian Campbell
Quoted 13 lines · Wei Liu
---
 mfi-common |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
mfi-common +0 -0
index 5c4f5d5..e772086 100644
@@ -41,6 +41,19 @@ branch_wants_rumpkernel_tests () {
   esac
 }
 

mfi-common branch_wants_rumpkernel_tests () { · line 53

Quoted 10 lines
mfi-common +10 -0
+xenbranch_wants_xsm_tests () {
+    # Test XSM from 4.5 onwards
+    case "$xenbranch" in
+    xen-3.*-testing) echo "n";;
+    xen-4.0-testing) echo "n";;
+    xen-4.1-testing) echo "n";;
+    xen-4.2-testing) echo "n";;
+    xen-4.3-testing) echo "n";;
+    xen-4.4-testing) echo "n";;
+    *) echo "n y";

Did you mean just "y" here, or is something very subtle going on?

Quoted 2 lines

Oh I see, you run over the result of this as a list with for. Sneaky!

Ian J's suggestion.

Quoted 4 lines

I think you should name it something like xenbranch_xsm_variants or something else which doesn't make the reader expect it to return a boolean.

Ack.

Wei.

Quoted 1 line

Ian.

author
#18 lore raw

PATCH v3 8/11 Debian.pm: pass in XSM configuration to bootloader setup routines

In reply to Wei Liu

Change to Uboot will come in another patch. GRUB 1 is ignored, as currently OSSTest only has Wheezy which has GRUB 2.

---
 Osstest/Debian.pm |   32 +++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)
Osstest/Debian.pm +21 -11
index ed8a1b2..30fb315 100644
@@ -45,9 +45,9 @@ BEGIN {
 
 #---------- manipulation of Debian bootloader setup ----------
 
-sub debian_boot_setup ($$$$;$) {
+sub debian_boot_setup ($$$$$;$) {
     # $xenhopt==undef => is actually a guest, do not set up a hypervisor
-    my ($ho, $want_kernver, $xenhopt, $distpath, $hooks) = @_;
+    my ($ho, $want_kernver, $want_xsm, $xenhopt, $distpath, $hooks) = @_;
 
     target_kernkind_check($ho);
     target_kernkind_console_inittab($ho,$ho,"/");
@@ -72,11 +72,11 @@ sub debian_boot_setup ($$$$;$) {
 
     my $bootloader;
     if ( $ho->{Flags}{'need-uboot-bootscr'} ) {
-	$bootloader= setupboot_uboot($ho, $want_kernver, $xenhopt, $kopt);
+	$bootloader= setupboot_uboot($ho, $want_kernver, $want_xsm, $xenhopt, $kopt);
     } elsif ($ho->{Suite} =~ m/lenny/) {
-        $bootloader= setupboot_grub1($ho, $want_kernver, $xenhopt, $kopt);
+        $bootloader= setupboot_grub1($ho, $want_kernver, $want_xsm, $xenhopt, $kopt);
     } else {
-        $bootloader= setupboot_grub2($ho, $want_kernver, $xenhopt, $kopt);
+        $bootloader= setupboot_grub2($ho, $want_kernver, $want_xsm, $xenhopt, $kopt);
     }
 
     $bootloader->{UpdateConfig}($ho);
@@ -112,8 +112,8 @@ sub bl_getmenu_open ($$$) {
     return $f;
 }
 
-sub setupboot_uboot ($$$) {
-    my ($ho,$want_kernver,$xenhopt,$xenkopt) = @_;
+sub setupboot_uboot ($$$$) {
+    my ($ho,$want_kernver,$want_xsm,$xenhopt,$xenkopt) = @_;
     my $bl= { };
 
     $bl->{UpdateConfig}= sub {
@@ -194,13 +194,17 @@ END
     return $bl;
 }
 
-sub setupboot_grub1 ($$$) {
-    my ($ho,$want_kernver,$xenhopt,$xenkopt) = @_;
+sub setupboot_grub1 ($$$$) {
+    my ($ho,$want_kernver,$want_xsm,$xenhopt,$xenkopt) = @_;
     my $bl= { };
 
     my $rmenu= "/boot/grub/menu.lst";
     my $lmenu= "$stash/$ho->{Name}--menu.lst.out";
 
+    if ($want_xsm) {
+	die "Enabling XSM with GRUB is not supported";
+    }
+
     target_editfile_root($ho, $rmenu, sub {
         while (<::EI>) {
             if (m/^## ## Start Default/ ..
@@ -277,8 +281,8 @@ sub setupboot_grub1 ($$$) {
 # Note on running OSSTest on Squeeze with old Xen kernel: check out
 # Debian bug #633127 "/etc/grub/20_linux does not recognise some old
 # Xen kernels"
-sub setupboot_grub2 ($$$) {
-    my ($ho,$want_kernver,$xenhopt,$xenkopt) = @_;
+sub setupboot_grub2 ($$$$) {
+    my ($ho,$want_kernver,$want_xsm,$xenhopt,$xenkopt) = @_;
     my $bl= { };
 
     my $rmenu= '/boot/grub/grub.cfg';
@@ -305,6 +309,9 @@ sub setupboot_grub2 ($$$) {
 			 $entry->{KernVer} ne $want_kernver) {
 		    logm("(skipping entry at $entry->{StartLine};".
 			 " kernel $entry->{KernVer}, not $want_kernver)");
+		} elsif ($want_xsm && !defined $entry->{Xenpolicy}) {
+		    logm("(skipping entry at $entry->{StartLine};".
+			 " XSM policy file not present)");
 		} else {
 		    # yes!
 		    last;
@@ -337,6 +344,9 @@ sub setupboot_grub2 ($$$) {
             if (m/^\s*module\s*\/(initrd\S+)/) {
                 $entry->{Initrd}= $1;
             }
+	    if (m/^\s*module\s*\/(xenpolicy\S+)/) {
+                $entry->{Xenpolicy}= $1;
+            }
         }
         die 'grub 2 bootloader entry not found' unless $entry;
 
Signature · 1 line
1.7.10.4
author
#19 lore raw

PATCH v3 9/11 Debian.pm: load flask policy in uboot

In reply to Wei Liu
---
 Osstest/Debian.pm |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
Osstest/Debian.pm +18 -0
index 30fb315..ad0dd48 100644
@@ -123,6 +123,22 @@ sub setupboot_uboot ($$$$) {
 	my $kern = "vmlinuz-$want_kernver";
 	my $initrd = "initrd.img-$want_kernver";
 
+	my $flask_commands = "";
+	if ($want_xsm) {
+	    my $flaskpolicy = $r{flaskpolicy};
+	    $flask_commands = <<END;
+
+setenv flask_policy_addr_r 0x1200000
+flaskpolicy=`readlink /boot/$flaskpolicy`
+ext2load scsi 0 \\\${flask_policy_addr_r} \$flaskpolicy
+fdt mknod /chosen module\@2
+fdt set /chosen/module\@2 compatible "xen,xsm-policy"
+fdt set /chosen/module\@2 reg <\\\${flask_policy_addr_r} \\\${filesize}>
+echo Loaded $flaskpolicy to \\\${flask_policy_addr_r} (\\\${filesize})
+
+END
+	}
+
 	my $root= target_guest_lv_name($ho,"root");
 
 	logm("Xen options: $xenhopt");
@@ -176,6 +192,8 @@ fdt set /chosen/module\@1 compatible "xen,linux-initrd" "xen,multiboot-module"
 fdt set /chosen/module\@1 reg <\\\${ramdisk_addr_r} \\\${filesize}>
 echo Loaded $initrd to \\\${ramdisk_addr_r} (\\\${filesize})
 
+${flask_commands}
+
 fdt print /chosen
 
 echo Booting \\\${xen_addr_r} - \\\${fdt_addr}
Signature · 1 line
1.7.10.4
author
#20 lore raw

PATCH v3 10/11 ts-xen-install: install Xen with XSM support if requested

In reply to Wei Liu
---
 ts-xen-install |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
ts-xen-install +3 -1
index 4d34d1f..2e2fcbc 100755
@@ -46,6 +46,8 @@ if (@ARGV and $ARGV[0] eq '--check') {
 
 our $ho;
 
+my $enable_xsm = $r{enable_xsm} =~ m/y/ ? 1 : 0;
+
 my %distpath;
 
 sub packages () {
@@ -171,7 +173,7 @@ sub setupboot () {
     }
 
     my $want_kernver = get_runvar('kernel_ver',$r{'kernbuildjob'});
-    debian_boot_setup($ho, $want_kernver, $xenhopt, \%distpath, \@hooks);
+    debian_boot_setup($ho, $want_kernver, $enable_xsm, $xenhopt, \%distpath, \@hooks);
 
     logm("ready to boot Xen");
 }
Signature · 1 line
1.7.10.4
#21 lore raw

Re: [PATCH OSSTEST v3 10/11] ts-xen-install: install Xen with XSM support if requested

Quoted 19 lines · Wei Liu
---
 ts-xen-install |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
ts-xen-install +2 -0
index 4d34d1f..2e2fcbc 100755
@@ -46,6 +46,8 @@ if (@ARGV and $ARGV[0] eq '--check') {
 
 our $ho;
 
+my $enable_xsm = $r{enable_xsm} =~ m/y/ ? 1 : 0;
+
 my %distpath;
 
 sub packages () {

ts-xen-install sub setupboot () { · line 176

Quoted 5 lines
ts-xen-install +1 -1
@@ -171,7 +173,7 @@ sub setupboot () {
     }
 
     my $want_kernver = get_runvar('kernel_ver',$r{'kernbuildjob'});
-    debian_boot_setup($ho, $want_kernver, $xenhopt, \%distpath, \@hooks);
+    debian_boot_setup($ho, $want_kernver, $enable_xsm, $xenhopt, \%distpath, \@hooks);

Doesn't this have to be in the same patch as the one which adds the new parameter in the function declaration? Or at least that patch needs to hardcode a false until now.

(not sure we care much about bisectability in osstest, Ian?)

author
#22 lore raw

Re: [PATCH OSSTEST v3 10/11] ts-xen-install: install Xen with XSM support if requested

Quoted 22 lines · Ian Campbell
Quoted 21 lines · Wei Liu
---
 ts-xen-install |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
ts-xen-install +2 -0
index 4d34d1f..2e2fcbc 100755
@@ -46,6 +46,8 @@ if (@ARGV and $ARGV[0] eq '--check') {
 
 our $ho;
 
+my $enable_xsm = $r{enable_xsm} =~ m/y/ ? 1 : 0;
+
 my %distpath;
 
 sub packages () {
@@ -171,7 +173,7 @@ sub setupboot () {
     }
 
Quoted 8 lines

ts-xen-install sub setupboot () { · line 176

Quoted 3 lines
ts-xen-install +1 -1
     my $want_kernver = get_runvar('kernel_ver',$r{'kernbuildjob'});
-    debian_boot_setup($ho, $want_kernver, $xenhopt, \%distpath, \@hooks);
+    debian_boot_setup($ho, $want_kernver, $enable_xsm, $xenhopt, \%distpath, \@hooks);

Doesn't this have to be in the same patch as the one which adds the new parameter in the function declaration? Or at least that patch needs to hardcode a false until now.

Yes, I noticed this after I sent this series. I will squash this one into previous commit.

Wei.

Quoted 2 lines

(not sure we care much about bisectability in osstest, Ian?)

author
#23 lore raw

PATCH v3 11/11 mfi-common, make-flight: create XSM test jobs

In reply to Wei Liu

Duplicate Debian PV and HVM test jobs for XSM testing.

---
 make-flight |   61 +++++++++++++++++++++++++++++++++++++++--------------------
 mfi-common  |   11 +++++++++--
 2 files changed, 49 insertions(+), 23 deletions(-)
make-flight +40 -21
index 9963a46..9ab95a0 100755
@@ -123,7 +123,7 @@ do_rumpkernel_tests () {
   rumparch=$dom0arch
   job_create_test test-$xenarch$kern-$dom0arch-rumpuserxen-$rumparch \
                       test-rumpuserxen xl \
-            $xenarch $dom0arch                                       \
+            $xenarch $dom0arch n                                     \
             guests_rumpuserxenbuildjob=build-$rumparch-rumpuserxen   \
      rump_builtimage=rumpuserxen:/usr/local/lib/xen/rump-kernel/rump-kernel \
             rump_cmdline=3                                           \
@@ -141,7 +141,7 @@ do_freebsd_tests () {
   for freebsdarch in amd64 i386; do
 
  job_create_test test-$xenarch$kern-$dom0arch$qemuu_suffix-freebsd10-$freebsdarch \
-                        test-freebsd xl $xenarch $dom0arch \
+                        test-freebsd xl $xenarch $dom0arch n \
                         freebsd_arch=$freebsdarch \
  freebsd_image=${FREEBSD_IMAGE_PREFIX-FreeBSD-10.0-RELEASE-}$freebsdarch${FREEBSD_IMAGE_SUFFIX--20140116-r260789.qcow2.xz} \
                         all_hostflags=$most_hostflags
@@ -179,7 +179,7 @@ do_hvm_winxp_tests () {
 
     job_create_test \
             test-$xenarch$kern-$dom0arch-$toolstack$qemuu_suffix-winxpsp3$vcpus_suffix \
-            test-win $toolstack $xenarch $dom0arch $qemuu_runvar \
+            test-win $toolstack $xenarch $dom0arch n $qemuu_runvar \
             win_image=winxpsp3.iso $vcpus_runvars   \
             all_hostflags=$most_hostflags,hvm
 
@@ -192,7 +192,7 @@ do_hvm_win7_x64_tests () {
   fi
 
   job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-win7-amd64 \
-            test-win xl $xenarch $dom0arch $qemuu_runvar \
+            test-win xl $xenarch $dom0arch n $qemuu_runvar \
             win_image=win7-x64.iso \
             all_hostflags=$most_hostflags,hvm
 }
@@ -200,27 +200,36 @@ do_hvm_win7_x64_tests () {
 do_hvm_debian_test_one () {
   testname=$1
   bios=$2
+  xsm=$3
+
   job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-$testname-amd64\
-    test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \
+    test-debianhvm xl $xenarch $dom0arch $xsm $qemuu_runvar \
+    enable_xsm=$xsm                             \
     debianhvm_image=debian-7.2.0-amd64-CD-1.iso \
     bios=$bios \
     all_hostflags=$most_hostflags,hvm
 }
 
 do_hvm_debian_tests() {
+  test_xsm="$@"
+
   if [ $xenarch != amd64 ]; then
     return
   fi
 
   # QEMU upstream supports ovmf and seabios
   if [ "x$qemuu_suffix" == "x-qemuu" ]; then
-    do_hvm_debian_test_one ovmf ovmf
-    do_hvm_debian_test_one debianhvm seabios
+    do_hvm_debian_test_one ovmf ovmf n
+    for xsm in $test_xsm ; do
+      do_hvm_debian_test_one debianhvm seabios $xsm
+    done
   fi
 
   # QEMU traditional supports rombios
   if [ "x$qemuu_suffix" == "x-qemut" ]; then
-    do_hvm_debian_test_one debianhvm rombios
+    for xsm in $test_xsm ; do
+      do_hvm_debian_test_one debianhvm rombios $xsm
+    done
   fi
 }
 
@@ -232,7 +241,7 @@ do_hvm_rhel6_tests () {
   for cpuvendor in amd intel; do
 
     job_create_test test-$xenarch$kern-$dom0arch$qemuu_suffix-rhel6hvm-$cpuvendor \
-                                            test-rhelhvm xl $xenarch $dom0arch \
+                                            test-rhelhvm xl $xenarch $dom0arch n  \
             redhat_image=rhel-server-6.1-i386-dvd.iso \
             all_hostflags=$most_hostflags,hvm-$cpuvendor \
             $qemuu_runvar
@@ -247,7 +256,7 @@ do_sedf_tests () {
 
   for pin in '' -pin; do
     job_create_test test-$xenarch$kern-$dom0arch-xl-sedf$pin  \
-       test-debian xl $xenarch $dom0arch                      \
+       test-debian xl $xenarch $dom0arch n                    \
             guests_vcpus=4                                    \
             xen_boot_append="sched=sedf loglvl=all ${pin:+dom0_vcpus_pin}" \
             linux_boot_append='loglevel=9 debug'              \
@@ -261,7 +270,7 @@ do_credit2_tests () {
   fi
 
   job_create_test test-$xenarch$kern-$dom0arch-xl-credit2             \
-       test-debian xl $xenarch $dom0arch                              \
+       test-debian xl $xenarch $dom0arch n                            \
             guests_vcpus=4 xen_boot_append='sched=credit2'            \
             $debian_runvars all_hostflags=$most_hostflags
 }
@@ -273,7 +282,7 @@ do_passthrough_tests () {
 
   for cpuvendor in intel; do
     job_create_test test-$xenarch$kern-$dom0arch-xl-pcipt-intel       \
-                    test-debian-nomigr xl $xenarch $dom0arch          \
+                    test-debian-nomigr xl $xenarch $dom0arch n        \
             guests_vcpus=4                                            \
             $debian_runvars debian_pcipassthrough_nic=host            \
             all_hostflags=$most_hostflags,hvm-$cpuvendor,pcipassthrough-nic
@@ -281,16 +290,26 @@ do_passthrough_tests () {
   done
 }
 
-test_matrix_do_one () {
-
-  # Basic PV Linux test with xl
+do_pv_linux_xl_test_one () {
+  xsm=$1
 
   job_create_test test-$xenarch$kern-$dom0arch-xl test-debian xl \
-            $xenarch $dom0arch                                   \
+            $xenarch $dom0arch $xsm                              \
+            enable_xsm=$xsm                                      \
             $debian_runvars all_hostflags=$most_hostflags
+}
+
+test_matrix_do_one () {
+
+  test_xsm=$(xenbranch_wants_xsm_tests)
+
+  # Basic PV Linux test with xl
+  for xsm in $test_xsm ; do
+    do_pv_linux_xl_test_one $xsm
+  done
 
   job_create_test test-$xenarch$kern-$dom0arch-libvirt test-debian libvirt \
-            $xenarch $dom0arch                                       \
+            $xenarch $dom0arch n                                           \
             $debian_runvars all_hostflags=$most_hostflags
 
   # No further arm tests at the moment
@@ -314,7 +333,7 @@ test_matrix_do_one () {
   # xend PV guest test on x86 only
   if [ x$test_xend = xy -a \( $dom0arch = "i386" -o $dom0arch = "amd64" \) ]; then
     job_create_test test-$xenarch$kern-$dom0arch-pv test-debian xend \
-            $xenarch $dom0arch                                       \
+            $xenarch $dom0arch n                                     \
             $debian_runvars all_hostflags=$most_hostflags
   fi
 
@@ -342,13 +361,13 @@ test_matrix_do_one () {
     do_hvm_win7_x64_tests
     do_hvm_rhel6_tests
 
-    do_hvm_debian_tests
+    do_hvm_debian_tests $test_xsm
 
   done # qemuu_suffix
 
   # Test live migration
   job_create_test test-$xenarch$kern-$dom0arch-pair test-pair \
-            $onetoolstack $xenarch $dom0arch \
+            $onetoolstack $xenarch $dom0arch n \
             !host !host_hostflags \
             $debian_runvars \
             all_hostflags=$most_hostflags,equiv-1
@@ -359,7 +378,7 @@ test_matrix_do_one () {
   if [ $xenarch = amd64 -a $dom0arch = i386 ]; then
 
   job_create_test test-$xenarch$kern-$dom0arch-xl-multivcpu \
-                    test-debian xl $xenarch $dom0arch guests_vcpus=4  \
+                    test-debian xl $xenarch $dom0arch n guests_vcpus=4  \
                     $debian_runvars all_hostflags=$most_hostflags
 
   fi
mfi-common +9 -2
index e772086..a81dfba 100644
@@ -267,9 +267,16 @@ job_create_test () {
   local toolstack=$1; shift
   local xenarch=$1; shift
   local dom0arch=$1; shift
+  local xsm=$1; shift
 
-  xenbuildjob="${bfi}build-$xenarch"
-  buildjob="${bfi}build-$dom0arch"
+  xsm_suffix=""
+  if [ x$xsm = xy ] ; then
+      xsm_suffix="-xsm"
+  fi
+
+  job="$job$xsm_suffix"
+  xenbuildjob="${bfi}build-$xenarch$xsm_suffix"
+  buildjob="${bfi}build-$dom0arch$xsm_suffix"
   tsbuildjob=
 
   case "$xenbranch:$toolstack" in
Signature · 1 line
1.7.10.4
#24 lore raw

Re: [PATCH OSSTEST v3 11/11] mfi-common, make-flight: create XSM test jobs

make-flight do_passthrough_tests () { · line 309

Quoted 8 lines · Wei Liu
make-flight +8 -0
+test_matrix_do_one () {
+
+  test_xsm=$(xenbranch_wants_xsm_tests)
+
+  # Basic PV Linux test with xl
+  for xsm in $test_xsm ; do
+    do_pv_linux_xl_test_one $xsm
+  done

Perhaps push this down into do_pv_debian_tests which contains this loop and calls down to do_pv_debian_test_one (similar to the do_hvm_debian_tests setup).

Should we run an xsm test for libvirt too -- I don't see why not, in that case do_pv_debian_tests would call do_pv_debian_test_one twice and pass the toolstack as a parameter.

make-flight test_matrix_do_one () { · line 364

Quoted 6 lines
 @@ -342,13 +361,13 @@ test_matrix_do_one () {
     do_hvm_win7_x64_tests
     do_hvm_rhel6_tests
make-flight +1 -1
-    do_hvm_debian_tests
+    do_hvm_debian_tests $test_xsm

The parameter here should be quoted (and do_hvm_debian_tests should use $1), but IMHO it would be better to have do_hvm_debian_tests call xenbranch_wants_xsm_tests itself and loop on the result.

mfi-common job_create_test () { · line 270

Quoted 9 lines
mfi-common +1 -0
index e772086..a81dfba 100644
@@ -267,9 +267,16 @@ job_create_test () {
   local toolstack=$1; shift
   local xenarch=$1; shift
   local dom0arch=$1; shift
+  local xsm=$1; shift

Can you detect enable_xsm=y in the remaining runvars (in $@ at this point) and enable xsm based on that, instead of requiring an additional parameter to be added to every caller?

for rv in $@ ; do
case $rv in
enable_xsm=y) xsm_prefix="-xsm";;
esac
done

Is one way I'd try.

Ian.