Stubdom test case
PATCH 1/1 Stubdom test case
Currently only QEMU traditional supports stubdom, so we only create
test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm
Note that stubdom only supports serial='pty'. Piping serial to stderr causes stubdom to exit abnormally.
---
Diff of xen-unstable flight runvar dump before and after this change:
stubdom-runvars 2015-06-01 12:37:49.584329616 +0100 renamed from master-runvars 2015-06-01 12:36:22.759594425 +0100 +0 -0
+xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 all_hostflags arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test,hvm +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm all_hostflags arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test,hvm +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 all_hostflags arch-i386,arch-xen-amd64,suite-wheezy,purpose-test,hvm +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm all_hostflags arch-i386,arch-xen-amd64,suite-wheezy,purpose-test,hvm +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 arch amd64 +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm arch amd64 +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 arch i386 +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm arch i386 +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 bios rombios +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm bios rombios +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 bios rombios +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm bios rombios +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 buildjob build-amd64 +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm buildjob build-amd64-xsm +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 buildjob build-i386 +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm buildjob build-i386-xsm +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 debianhvm_image debian-7.2.0-amd64-CD-1.iso +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm debianhvm_image debian-7.2.0-amd64-CD-1.iso +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 debianhvm_image debian-7.2.0-amd64-CD-1.iso +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm debianhvm_image debian-7.2.0-amd64-CD-1.iso +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 device_model_version qemu-xen-traditional +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm device_model_version qemu-xen-traditional +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 device_model_version qemu-xen-traditional +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm device_model_version qemu-xen-traditional +xen-unstable test-amd64-amd64-xl-qemut-debianhvm-amd64 enable_stubdom false +xen-unstable test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm enable_stubdom false +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 enable_stubdom true +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm enable_stubdom true +xen-unstable test-amd64-amd64-xl-qemuu-debianhvm-amd64 enable_stubdom false +xen-unstable test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm enable_stubdom false +xen-unstable test-amd64-amd64-xl-qemuu-ovmf-amd64 enable_stubdom false +xen-unstable test-amd64-i386-xl-qemut-debianhvm-amd64 enable_stubdom false +xen-unstable test-amd64-i386-xl-qemut-debianhvm-amd64-xsm enable_stubdom false +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 enable_stubdom true +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm enable_stubdom true +xen-unstable test-amd64-i386-xl-qemuu-debianhvm-amd64 enable_stubdom false +xen-unstable test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm enable_stubdom false +xen-unstable test-amd64-i386-xl-qemuu-ovmf-amd64 enable_stubdom false +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 enable_xsm false +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm enable_xsm true +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 enable_xsm false +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm enable_xsm true +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 kernbuildjob build-amd64-pvops +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm kernbuildjob build-amd64-pvops +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 kernbuildjob build-i386-pvops +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm kernbuildjob build-i386-pvops +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 kernkind pvops +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm kernkind pvops +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 kernkind pvops +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm kernkind pvops +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 toolstack xl +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm toolstack xl +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 toolstack xl +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm toolstack xl +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 xenbuildjob build-amd64 +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm xenbuildjob build-amd64-xsm +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 xenbuildjob build-amd64 +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm xenbuildjob build-amd64-xsm --- Osstest/TestSupport.pm | 10 +++++++++- make-flight | 19 ++++++++++++++----- ts-debian-hvm-install | 3 +++ 3 files changed, 26 insertions(+), 6 deletions(-)
Osstest/TestSupport.pm +9 -1
@@ -1648,7 +1648,6 @@ vncdisplay=0 vnclisten='$ho->{Ip}' vncpasswd='$passwd' -serial='file:/dev/stderr' # boot = 'dc' END
@@ -1663,6 +1662,15 @@ END $cfg .= "bios='$bios'\n"; } + my $stubdom = $xopts{Stubdom}; + $stubdom = 0 unless defined $stubdom; + if ($stubdom == 1) { + $cfg .= "device_model_stubdomain_override=1\n"; + $cfg .= "serial='pty'"; + } else { + $cfg .= "serial='file:/dev/stderr'"; + } + $xopts{VifType} ||= "ioemu"; my $cfgpath= prepareguest_part_xencfg($ho, $gho, $ram_mb, \%xopts, $cfg); target_cmd_root($ho, <<END);
make-flight +14 -5
@@ -214,10 +214,17 @@ do_hvm_debian_test_one () { testname=$1 bios=$2 xsm=$3 + stubdom=$4 - job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-$testname-amd64\ + stubdom_suffix=""; + if [ $stubdom = true ]; then + stubdom_suffix="-stubdom" + fi + + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix$stubdom_suffix-$testname-amd64\ test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ enable_xsm=$xsm \ + enable_stubdom=$stubdom \ debianhvm_image=debian-7.2.0-amd64-CD-1.iso \ bios=$bios \ all_hostflags=$most_hostflags,hvm
@@ -232,16 +239,18 @@ do_hvm_debian_tests() { # QEMU upstream supports ovmf and seabios if [ "x$qemuu_suffix" == "x-qemuu" ]; then - do_hvm_debian_test_one ovmf ovmf false + do_hvm_debian_test_one ovmf ovmf false false for xsm in $xsms ; do - do_hvm_debian_test_one debianhvm seabios $xsm + do_hvm_debian_test_one debianhvm seabios $xsm false done fi - # QEMU traditional supports rombios + # QEMU traditional supports rombios and stubdom if [ "x$qemuu_suffix" == "x-qemut" ]; then for xsm in $xsms ; do - do_hvm_debian_test_one debianhvm rombios $xsm + for stubdom in true false ; do + do_hvm_debian_test_one debianhvm rombios $xsm $stubdom + done done fi }
ts-debian-hvm-install +3 -0
@@ -28,6 +28,8 @@ if (@ARGV && $ARGV[0] =~ m/^--stage(\d+)$/) { $stage=$1; shift @ARGV; } defined($r{bios}) or die "Need to define which bios to use"; +my $enable_stubdom = ($r{enable_stubdom}//'false') =~ m/true/ ? 1 : 0; + our ($whhost,$gn) = @ARGV; $whhost ||= 'host'; $gn ||= 'debianhvm';
@@ -181,6 +183,7 @@ sub prep () { more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb, OnReboot => 'preserve', Bios => $r{bios}, + Stubdom => $enable_stubdom, PostImageHook => sub { my $cmds = iso_copy_content_from_image($gho, $newiso); $cmds .= prepare_initrd($initrddir,$newiso,$preseed_file_path);
Signature · 1 line
1.9.1
Quoted 7 lines · Wei Liu
Currently only QEMU traditional supports stubdom, so we only create
test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm
Note that stubdom only supports serial='pty'. Piping serial to stderr causes stubdom to exit abnormally.
FWIW I think it would be harmless to switch unconditionally, it would mean the guest serial output ended up in /var/log/xen/console/ instead of in /var/log/xen/guest-qemu-dm.log is all. Which arguably makes more sense.
(ISTR suggesting this before and Ian had a reason not to do so, but I don't recall why not, at the time it would have been just churn perhaps).
stubdom-runvars 2015-06-01 12:37:49.584329616 +0100
Quoted 6 lines
Signed-off-by Wei Liu <[email protected]>---
Diff of xen-unstable flight runvar dump before and after this change:
diff -ub ../master-runvars ../stubdom-runvars | sed 's/[ \t]*$//' | egrep '^[\+|-]'stubdom-runvars 2015-06-01 12:37:49.584329616 +0100 renamed from master-runvars 2015-06-01 12:36:22.759594425 +0100 +0
-0
Usually it is easier to see what is going on if you sort them (e.g. diff -ub <(sort ../master-runvar) <(sort ../stubdom-runvars):
Sorting your list gives the following, which shows that you have added test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64(-xsm) in addition to the two in the commit message.
You've also added enable_stubdom=false to the other cases, I think normally we like to just accept the toolstack default for things which don't care.
+xen-unstable test-amd64-amd64-xl-qemut-debianhvm-amd64 enable_stubdom false +xen-unstable test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm enable_stubdom false
+xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 all_hostflags arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test,hvm +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 arch amd64 +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 bios rombios +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 buildjob build-amd64 +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 debianhvm_image debian-7.2.0-amd64-CD-1.iso +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 device_model_version qemu-xen-traditional +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 enable_stubdom true +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 enable_xsm false +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 kernbuildjob build-amd64-pvops +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 kernkind pvops +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 toolstack xl +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64 xenbuildjob build-amd64
+xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm all_hostflags arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test,hvm +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm arch amd64 +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm bios rombios +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm buildjob build-amd64-xsm +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm debianhvm_image debian-7.2.0-amd64-CD-1.iso +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm device_model_version qemu-xen-traditional +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm enable_stubdom true +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm enable_xsm true +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm kernbuildjob build-amd64-pvops +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm kernkind pvops +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm toolstack xl +xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm xenbuildjob build-amd64-xsm
+xen-unstable test-amd64-amd64-xl-qemuu-debianhvm-amd64 enable_stubdom false +xen-unstable test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm enable_stubdom false +xen-unstable test-amd64-amd64-xl-qemuu-ovmf-amd64 enable_stubdom false +xen-unstable test-amd64-i386-xl-qemut-debianhvm-amd64 enable_stubdom false +xen-unstable test-amd64-i386-xl-qemut-debianhvm-amd64-xsm enable_stubdom false
+xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 all_hostflags arch-i386,arch-xen-amd64,suite-wheezy,purpose-test,hvm +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 arch i386 +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 bios rombios +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 buildjob build-i386 +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 debianhvm_image debian-7.2.0-amd64-CD-1.iso +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 device_model_version qemu-xen-traditional +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 enable_stubdom true +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 enable_xsm false +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 kernbuildjob build-i386-pvops +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 kernkind pvops +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 toolstack xl +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64 xenbuildjob build-amd64
+xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm all_hostflags arch-i386,arch-xen-amd64,suite-wheezy,purpose-test,hvm +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm arch i386 +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm bios rombios +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm buildjob build-i386-xsm +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm debianhvm_image debian-7.2.0-amd64-CD-1.iso +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm device_model_version qemu-xen-traditional +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm enable_stubdom true +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm enable_xsm true +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm kernbuildjob build-i386-pvops +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm kernkind pvops +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm toolstack xl +xen-unstable test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm xenbuildjob build-amd64-xsm
+xen-unstable test-amd64-i386-xl-qemuu-debianhvm-amd64 enable_stubdom false +xen-unstable test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm enable_stubdom false +xen-unstable test-amd64-i386-xl-qemuu-ovmf-amd64 enable_stubdom false
stubdom-runvars 2015-06-01 12:37:49.584329616 +0100 END · line 1672
Quoted 12 lines
stubdom-runvars 2015-06-01 12:37:49.584329616 +0100 renamed from master-runvars 2015-06-01 12:36:22.759594425 +0100 +8
-0@@ -1663,6 +1662,15 @@ END $cfg .= "bios='$bios'\n"; } + my $stubdom = $xopts{Stubdom}; + $stubdom = 0 unless defined $stubdom; + if ($stubdom == 1) { + $cfg .= "device_model_stubdomain_override=1\n"; + $cfg .= "serial='pty'"; + } else { + $cfg .= "serial='file:/dev/stderr'"; + }
I think if stubdom is defined and == 0 you should force it to be off, which as I say above ought to be distinct from stubdom not defined at all.