All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH OSSTEST v3] Stubdom test case
@ 2015-06-10 10:41   ` Wei Liu
  2015-06-10 10:49     ` Ian Campbell
  2015-06-10 11:10     ` Ian Jackson
  0 siblings, 2 replies; 11+ messages in thread
From: Wei Liu @ 2015-06-10 10:41 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

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
test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64
test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm

Note that stubdom only supports serial='pty'. Piping serial to stderr
causes stubdom to exit abnormally.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Changes in v3:
1. Avoid having empty enable_stubdom runvar.

Changes in v2:
1. If stubdom is not defined use toolstack default.
2. Don't set stubdom runvar for every test case, use default.

diff -ub <(sort ../master-runvars) <(sort ../stubdom-runvars) | sed  's/[ \t]*$//' | egrep '^[\+|-]'
--- /dev/fd/63	2015-06-10 11:40:23.203231476 +0100
+++ /dev/fd/62	2015-06-10 11:40:23.203231476 +0100
+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-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
---
 Osstest/TestSupport.pm | 11 ++++++++++-
 make-flight            | 17 ++++++++++++++---
 ts-debian-hvm-install  |  6 ++++++
 3 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 1f3bab2..e91e8e7 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1648,7 +1648,6 @@ vncdisplay=0
 vnclisten='$ho->{Ip}'
 vncpasswd='$passwd'
 
-serial='file:/dev/stderr'
 #
 boot = 'dc'
 END
@@ -1663,6 +1662,16 @@ END
         $cfg .= "bios='$bios'\n";
     }
 
+    my $stubdom = $xopts{Stubdom};
+    if (defined $stubdom) {
+	$cfg .= "device_model_stubdomain_override=$stubdom\n";
+    }
+    if (defined $stubdom && $stubdom == 1) {
+	$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);
diff --git a/make-flight b/make-flight
index 41c7520..138b341 100755
--- a/make-flight
+++ b/make-flight
@@ -214,10 +214,19 @@ 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=""
+  stubdom_runvar=""
+  if [ x$stubdom != x ]; then
+      stubdom_suffix="-stubdom"
+      stubdom_runvar="enable_stubdom=$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                             \
+    $stubdom_runvar                             \
     debianhvm_image=debian-7.2.0-amd64-CD-1.iso \
     bios=$bios \
     all_hostflags=$most_hostflags,hvm
@@ -238,10 +247,12 @@ do_hvm_debian_tests() {
     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 "" ; do
+        do_hvm_debian_test_one debianhvm rombios $xsm $stubdom
+      done
     done
   fi
 }
diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index ea2d1ad..0872288 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -178,9 +178,15 @@ sub prep () {
     }
     logm("Host has $host_freemem_mb MB free memory, setting guest memory size to $ram_mb MB");
 
+    my $enable_stubdom = undef;
+    if (defined $r{enable_stubdom}) {
+	$enable_stubdom = ($r{enable_stubdom}//'false') =~ m/true/ ? 1 : 0;
+    }
+
     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);
-- 
1.9.1

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

* Re: [PATCH OSSTEST v3] Stubdom test case
  2015-06-10 10:41   ` [PATCH OSSTEST v3] " Wei Liu
@ 2015-06-10 10:49     ` Ian Campbell
  2015-06-10 11:10     ` Ian Jackson
  1 sibling, 0 replies; 11+ messages in thread
From: Ian Campbell @ 2015-06-10 10:49 UTC (permalink / raw)
  To: Wei Liu; +Cc: ian.jackson, xen-devel

On Wed, 2015-06-10 at 11:41 +0100, Wei Liu wrote:
> 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
> test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64
> test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm
> 
> Note that stubdom only supports serial='pty'. Piping serial to stderr
> causes stubdom to exit abnormally.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Looks plausible:

Acked-by: Ian Campbell <ian.campbell@citrix.com>

> ---
> Changes in v3:
> 1. Avoid having empty enable_stubdom runvar.
> 
> Changes in v2:
> 1. If stubdom is not defined use toolstack default.
> 2. Don't set stubdom runvar for every test case, use default.
> 
> diff -ub <(sort ../master-runvars) <(sort ../stubdom-runvars) | sed  's/[ \t]*$//' | egrep '^[\+|-]'
> --- /dev/fd/63	2015-06-10 11:40:23.203231476 +0100
> +++ /dev/fd/62	2015-06-10 11:40:23.203231476 +0100
> +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-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
> ---
>  Osstest/TestSupport.pm | 11 ++++++++++-
>  make-flight            | 17 ++++++++++++++---
>  ts-debian-hvm-install  |  6 ++++++
>  3 files changed, 30 insertions(+), 4 deletions(-)
> 
> diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
> index 1f3bab2..e91e8e7 100644
> --- a/Osstest/TestSupport.pm
> +++ b/Osstest/TestSupport.pm
> @@ -1648,7 +1648,6 @@ vncdisplay=0
>  vnclisten='$ho->{Ip}'
>  vncpasswd='$passwd'
>  
> -serial='file:/dev/stderr'
>  #
>  boot = 'dc'
>  END
> @@ -1663,6 +1662,16 @@ END
>          $cfg .= "bios='$bios'\n";
>      }
>  
> +    my $stubdom = $xopts{Stubdom};
> +    if (defined $stubdom) {
> +	$cfg .= "device_model_stubdomain_override=$stubdom\n";
> +    }
> +    if (defined $stubdom && $stubdom == 1) {
> +	$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);
> diff --git a/make-flight b/make-flight
> index 41c7520..138b341 100755
> --- a/make-flight
> +++ b/make-flight
> @@ -214,10 +214,19 @@ 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=""
> +  stubdom_runvar=""
> +  if [ x$stubdom != x ]; then
> +      stubdom_suffix="-stubdom"
> +      stubdom_runvar="enable_stubdom=$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                             \
> +    $stubdom_runvar                             \
>      debianhvm_image=debian-7.2.0-amd64-CD-1.iso \
>      bios=$bios \
>      all_hostflags=$most_hostflags,hvm
> @@ -238,10 +247,12 @@ do_hvm_debian_tests() {
>      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 "" ; do
> +        do_hvm_debian_test_one debianhvm rombios $xsm $stubdom
> +      done
>      done
>    fi
>  }
> diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
> index ea2d1ad..0872288 100755
> --- a/ts-debian-hvm-install
> +++ b/ts-debian-hvm-install
> @@ -178,9 +178,15 @@ sub prep () {
>      }
>      logm("Host has $host_freemem_mb MB free memory, setting guest memory size to $ram_mb MB");
>  
> +    my $enable_stubdom = undef;
> +    if (defined $r{enable_stubdom}) {
> +	$enable_stubdom = ($r{enable_stubdom}//'false') =~ m/true/ ? 1 : 0;
> +    }
> +
>      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);

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

* Re: [PATCH OSSTEST v3] Stubdom test case
  2015-06-10 10:41   ` [PATCH OSSTEST v3] " Wei Liu
  2015-06-10 10:49     ` Ian Campbell
@ 2015-06-10 11:10     ` Ian Jackson
  2015-06-10 11:31       ` Ian Campbell
  2015-06-10 13:54       ` Wei Liu
  1 sibling, 2 replies; 11+ messages in thread
From: Ian Jackson @ 2015-06-10 11:10 UTC (permalink / raw)
  To: Wei Liu; +Cc: ian.campbell, xen-devel

Wei Liu writes ("[PATCH OSSTEST v3] 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
> test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64
> test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm
...


Thanks.  This is mostly good but I have some quibbles.


The first is that the handling of boolean values is rather odd and
un-idiomatic.

> +    my $stubdom = $xopts{Stubdom};
> +    if (defined $stubdom) {
> +	$cfg .= "device_model_stubdomain_override=$stubdom\n";
> +    }
> +    if (defined $stubdom && $stubdom == 1) {
> +	$cfg .= "serial='pty'";
> +    } else {
> +	$cfg .= "serial='file:/dev/stderr'";
> +    }

`undef' is a perfectly legal boolean false, and in Perl it is not
normal to compare booleanish values with 1 explicitly.  So for the
second if you probably meant simply
    if ($stubdom) {

Also, this code attempts to make a distinction between:
   * stubdom set explicitly to true
   * stubdom set explicitly to false
   * stubdom not set, do whatever the toolstack default is

But actually the latter case will not work unless the default is
non-stubdom, because of the serial=.  So maybe for now it would be
simpler to just have:
    if ($stubdom) {
        $cfg .= "device_model_stubdomain_override=1\n";
        $cfg .= "serial='pty'";
    } else {
        $cfg .= "serial='file:/dev/stderr'";
        $cfg .= "
    }


> +    if (defined $r{enable_stubdom}) {
> +	$enable_stubdom = ($r{enable_stubdom}//'false') =~ m/true/ ? 1 : 0;

I realise we have already acquired an instance of this idiom, but "? 1
: 0" is not very sensible.  It is not usual (in Perl) to explicitly
canonicalise booleans unless necessary - and here, it isn't necessary
(if you get rid of the == 1 above).


This direct use of a global runvar is not right.  You should be using
guest_var.  If you use guest_var then you get to supply the default
more explicitly.

So I would do:
   $stubdom = guest_var($gho,'stubdom','false') =~ m/true/;

I'm not a great fan of this open-coded m/true/ everywhere but I won't
insist you drain that swamp.  But if you felt like creating a
guest_var_boolean to use here, that would be nice.

If you do that then you end up with
   $stubdom = guest_var_boolean($gho,'stubdom')
(assuming guest_var_boolean returns undef for unset runvar if no
default supplied).

That short enough that you can just write it explicitly in
more_prepareguest_hvm (which has access to $gho) and you therefore
don't need to introduce a new Stubdom entry in xopts.

>      }
>  
> +
>      $xopts{VifType} ||= "ioemu";

Whitespace error ?

>      for xsm in $xsms ; do
> -      do_hvm_debian_test_one debianhvm rombios $xsm
> +      for stubdom in true "" ; do
> +        do_hvm_debian_test_one debianhvm rombios $xsm $stubdom
> +      done

My understanding is that we are intending to do away with most of the
non-xsm tests.  Ian, do you agree ?

In which case we should be creating just the two xsm jobs.

Ian.

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

* Re: [PATCH OSSTEST v3] Stubdom test case
  2015-06-10 11:10     ` Ian Jackson
@ 2015-06-10 11:31       ` Ian Campbell
  2015-06-10 13:54       ` Wei Liu
  1 sibling, 0 replies; 11+ messages in thread
From: Ian Campbell @ 2015-06-10 11:31 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Wei Liu, xen-devel

On Wed, 2015-06-10 at 12:10 +0100, Ian Jackson wrote:
> >      for xsm in $xsms ; do
> > -      do_hvm_debian_test_one debianhvm rombios $xsm
> > +      for stubdom in true "" ; do
> > +        do_hvm_debian_test_one debianhvm rombios $xsm $stubdom
> > +      done
> 
> My understanding is that we are intending to do away with most of the
> non-xsm tests.  Ian, do you agree ?

Not sure about in general, but for something like stubdoms it does seem
plausible to only test XSM. If it works under XSM it seems unlikely that
it would fail without.

> In which case we should be creating just the two xsm jobs.
> 
> Ian.

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

* Re: [PATCH OSSTEST v3] Stubdom test case
  2015-06-10 11:10     ` Ian Jackson
  2015-06-10 11:31       ` Ian Campbell
@ 2015-06-10 13:54       ` Wei Liu
  2015-06-15 12:05         ` [PATCH OSSTEST v4 2/2] " Ian Jackson
  1 sibling, 1 reply; 11+ messages in thread
From: Wei Liu @ 2015-06-10 13:54 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Wei Liu, ian.campbell, xen-devel

On Wed, Jun 10, 2015 at 12:10:41PM +0100, Ian Jackson wrote:
> Wei Liu writes ("[PATCH OSSTEST v3] 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
> > test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64
> > test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm
> ...
> 
> 
> Thanks.  This is mostly good but I have some quibbles.
> 
> 
> The first is that the handling of boolean values is rather odd and
> un-idiomatic.
> 
> > +    my $stubdom = $xopts{Stubdom};
> > +    if (defined $stubdom) {
> > +	$cfg .= "device_model_stubdomain_override=$stubdom\n";
> > +    }
> > +    if (defined $stubdom && $stubdom == 1) {
> > +	$cfg .= "serial='pty'";
> > +    } else {
> > +	$cfg .= "serial='file:/dev/stderr'";
> > +    }
> 
> `undef' is a perfectly legal boolean false, and in Perl it is not
> normal to compare booleanish values with 1 explicitly.  So for the
> second if you probably meant simply
>     if ($stubdom) {
> 

Ack.

> Also, this code attempts to make a distinction between:
>    * stubdom set explicitly to true
>    * stubdom set explicitly to false
>    * stubdom not set, do whatever the toolstack default is
> 
> But actually the latter case will not work unless the default is
> non-stubdom, because of the serial=.  So maybe for now it would be
> simpler to just have:
>     if ($stubdom) {
>         $cfg .= "device_model_stubdomain_override=1\n";
>         $cfg .= "serial='pty'";
>     } else {
>         $cfg .= "serial='file:/dev/stderr'";
>         $cfg .= "
>     }
> 

Ack.

> 
> > +    if (defined $r{enable_stubdom}) {
> > +	$enable_stubdom = ($r{enable_stubdom}//'false') =~ m/true/ ? 1 : 0;
> 
> I realise we have already acquired an instance of this idiom, but "? 1
> : 0" is not very sensible.  It is not usual (in Perl) to explicitly
> canonicalise booleans unless necessary - and here, it isn't necessary
> (if you get rid of the == 1 above).
> 
> 
> This direct use of a global runvar is not right.  You should be using
> guest_var.  If you use guest_var then you get to supply the default
> more explicitly.
> 
> So I would do:
>    $stubdom = guest_var($gho,'stubdom','false') =~ m/true/;
> 
> I'm not a great fan of this open-coded m/true/ everywhere but I won't
> insist you drain that swamp.  But if you felt like creating a
> guest_var_boolean to use here, that would be nice.
> 

That's easy.

sub guest_var_boolean ($$) {
    my ($gho, $runvartail) = @_;
    return guest_var($gho, $runvartail, 'false') ~= m/true/;
}

> If you do that then you end up with
>    $stubdom = guest_var_boolean($gho,'stubdom')
> (assuming guest_var_boolean returns undef for unset runvar if no
> default supplied).
> 
> That short enough that you can just write it explicitly in
> more_prepareguest_hvm (which has access to $gho) and you therefore
> don't need to introduce a new Stubdom entry in xopts.
> 
> >      }
> >  
> > +
> >      $xopts{VifType} ||= "ioemu";
> 
> Whitespace error ?
> 

No. It's a blank line after the closing "}". Not sure why it showed up
that way.

> >      for xsm in $xsms ; do
> > -      do_hvm_debian_test_one debianhvm rombios $xsm
> > +      for stubdom in true "" ; do
> > +        do_hvm_debian_test_one debianhvm rombios $xsm $stubdom
> > +      done
> 
> My understanding is that we are intending to do away with most of the
> non-xsm tests.  Ian, do you agree ?
> 
> In which case we should be creating just the two xsm jobs.
> 

No problem.

Wei.

> Ian.

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

* [PATCH OSSTEST v4 0/2] Stubdom test case
@ 2015-06-10 19:40 Wei Liu
  2015-06-10 19:40 ` [PATCH OSSTEST v4 1/2] TestSupport: introduce guest_var_boolean Wei Liu
  2015-06-10 19:40 ` [PATCH OSSTEST v4 2/2] Stubdom test case Wei Liu
  0 siblings, 2 replies; 11+ messages in thread
From: Wei Liu @ 2015-06-10 19:40 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

Wei Liu (2):
  TestSupport: introduce guest_var_boolean
  Stubdom test case

 Osstest/TestSupport.pm | 16 ++++++++++++++--
 make-flight            | 16 ++++++++++++++--
 ts-debian-hvm-install  |  3 +++
 3 files changed, 31 insertions(+), 4 deletions(-)

-- 
1.9.1

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

* [PATCH OSSTEST v4 1/2] TestSupport: introduce guest_var_boolean
  2015-06-10 19:40 [PATCH OSSTEST v4 0/2] Stubdom test case Wei Liu
@ 2015-06-10 19:40 ` Wei Liu
  2015-06-11 15:05   ` Ian Jackson
  2015-06-10 19:40 ` [PATCH OSSTEST v4 2/2] Stubdom test case Wei Liu
  1 sibling, 1 reply; 11+ messages in thread
From: Wei Liu @ 2015-06-10 19:40 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 Osstest/TestSupport.pm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 1f3bab2..853631c 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -90,7 +90,7 @@ BEGIN {
                       target_kernkind_check target_kernkind_console_inittab
                       target_var target_var_prefix
                       selectguest prepareguest more_prepareguest_hvm
-                      guest_var guest_var_commalist
+                      guest_var guest_var_commalist guest_var_boolean
                       prepareguest_part_lvmdisk prepareguest_part_xencfg
                       guest_umount_lv guest_await guest_await_dhcp_tcp
                       guest_checkrunning guest_check_ip guest_find_ether
@@ -1505,6 +1505,11 @@ sub guest_var ($$$) {
     return $default;
 }
 
+sub guest_var_boolean ($$) {
+    my ($gho, $runvartail) = @_;
+    return guest_var($gho, $runvartail, 'false') =~ m/true/;
+}
+
 sub guest_var_commalist ($$) {
     my ($gho,$runvartail) = @_;
     return split /\,/, guest_var($gho,$runvartail,'');
-- 
1.9.1

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

* [PATCH OSSTEST v4 2/2] Stubdom test case
  2015-06-10 19:40 [PATCH OSSTEST v4 0/2] Stubdom test case Wei Liu
  2015-06-10 19:40 ` [PATCH OSSTEST v4 1/2] TestSupport: introduce guest_var_boolean Wei Liu
@ 2015-06-10 19:40 ` Wei Liu
  2015-06-10 10:41   ` [PATCH OSSTEST v3] " Wei Liu
  1 sibling, 1 reply; 11+ messages in thread
From: Wei Liu @ 2015-06-10 19:40 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

Currently only QEMU traditional supports stubdom and we want to
eventually do away with non-XSM test cases, so we only create

  test-amd64-{i386,amd64}-xl-qemut-stubdom-debianhvm-amd64-xsm

Note that stubdom only supports serial='pty'. Piping serial to stderr
causes stubdom to exit abnormally.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Changes in v4:
1. Use guest var.
2. Make code idiomatic.
3. Only generate stubdom with xsm enabled.

Changes in v3:
1. Make sure if stubdom is not defined use toolstack default.

Changes in v2:
1. If stubdom is not defined use toolstack default.
2. Don't set stubdom runvar for every test case, use default.

diff -ub <(sort ../master-runvars) <(sort ../stubdom-runvars) | sed  's/[ \t]*$//' | egrep '^[\+|-]'
--- /dev/fd/63	2015-06-10 20:39:40.702960271 +0100
+++ /dev/fd/62	2015-06-10 20:39:40.702960271 +0100
+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 debianhvm_stubdom           true
+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_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-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  debianhvm_stubdom           true
+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_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
---
 Osstest/TestSupport.pm |  9 ++++++++-
 make-flight            | 16 ++++++++++++++--
 ts-debian-hvm-install  |  3 +++
 3 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 853631c..63a7aab 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1653,7 +1653,6 @@ vncdisplay=0
 vnclisten='$ho->{Ip}'
 vncpasswd='$passwd'
 
-serial='file:/dev/stderr'
 #
 boot = 'dc'
 END
@@ -1668,6 +1667,14 @@ END
         $cfg .= "bios='$bios'\n";
     }
 
+    my $stubdom = $xopts{Stubdom};
+    if ($stubdom) {
+	$cfg .= "device_model_stubdomain_override=1\n";
+	$cfg .= "serial='pty'\n";
+    } else {
+	$cfg .= "serial='file:/dev/stderr'\n";
+    }
+
     $xopts{VifType} ||= "ioemu";
     my $cfgpath= prepareguest_part_xencfg($ho, $gho, $ram_mb, \%xopts, $cfg);
     target_cmd_root($ho, <<END);
diff --git a/make-flight b/make-flight
index 41c7520..78ace52 100755
--- a/make-flight
+++ b/make-flight
@@ -214,10 +214,19 @@ 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=""
+  stubdom_runvar=""
+  if [ x$stubdom != x ]; then
+      stubdom_suffix="-stubdom"
+      stubdom_runvar="debianhvm_stubdom=$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                             \
+    $stubdom_runvar                             \
     debianhvm_image=debian-7.2.0-amd64-CD-1.iso \
     bios=$bios \
     all_hostflags=$most_hostflags,hvm
@@ -238,10 +247,13 @@ do_hvm_debian_tests() {
     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
+      if [ x$xsm = xtrue ]; then
+          do_hvm_debian_test_one debianhvm rombios $xsm true
+      fi
     done
   fi
 }
diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index ea2d1ad..825f201 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -178,9 +178,12 @@ sub prep () {
     }
     logm("Host has $host_freemem_mb MB free memory, setting guest memory size to $ram_mb MB");
 
+    my $stubdom = guest_var_boolean($gho, 'stubdom');
+
     more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb,
                           OnReboot => 'preserve',
                           Bios => $r{bios},
+                          Stubdom => $stubdom,
                           PostImageHook => sub {
         my $cmds = iso_copy_content_from_image($gho, $newiso);
         $cmds .= prepare_initrd($initrddir,$newiso,$preseed_file_path);
-- 
1.9.1

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

* Re: [PATCH OSSTEST v4 1/2] TestSupport: introduce guest_var_boolean
  2015-06-10 19:40 ` [PATCH OSSTEST v4 1/2] TestSupport: introduce guest_var_boolean Wei Liu
@ 2015-06-11 15:05   ` Ian Jackson
  0 siblings, 0 replies; 11+ messages in thread
From: Ian Jackson @ 2015-06-11 15:05 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.campbell

Wei Liu writes ("[PATCH OSSTEST v4 1/2] TestSupport: introduce guest_var_boolean"):
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
...
> +sub guest_var_boolean ($$) {
> +    my ($gho, $runvartail) = @_;
> +    return guest_var($gho, $runvartail, 'false') =~ m/true/;
> +}

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

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

* Re: [PATCH OSSTEST v4 2/2] Stubdom test case
  2015-06-10 13:54       ` Wei Liu
@ 2015-06-15 12:05         ` Ian Jackson
  2015-06-15 13:19           ` Wei Liu
  0 siblings, 1 reply; 11+ messages in thread
From: Ian Jackson @ 2015-06-15 12:05 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.campbell, xen-devel

Wei Liu writes ("Re: [PATCH OSSTEST v3] Stubdom test case"):
> On Wed, Jun 10, 2015 at 12:10:41PM +0100, Ian Jackson wrote:
> > If you do that then you end up with
> >    $stubdom = guest_var_boolean($gho,'stubdom')
> > (assuming guest_var_boolean returns undef for unset runvar if no
> > default supplied).

Thanks, you did this.

> > That short enough that you can just write it explicitly in
> > more_prepareguest_hvm (which has access to $gho) and you therefore
> > don't need to introduce a new Stubdom entry in xopts.

But:

Wei Liu writes ("[PATCH OSSTEST v4 2/2] Stubdom test case"):
> Currently only QEMU traditional supports stubdom and we want to
> eventually do away with non-XSM test cases, so we only create
...
> +    my $stubdom = $xopts{Stubdom};
...
> +    my $stubdom = guest_var_boolean($gho, 'stubdom');
> +
>      more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb,
>                            OnReboot => 'preserve',
>                            Bios => $r{bios},
> +                          Stubdom => $stubdom,

Did you disagree with my suggestion to avoid introducing an xopt
Stubdom ?  Personally I don't think this plumbing adds anything over
writing the runvar reference directly, but perhaps you (or Ian C)
disagree.

Apart from that this patch is fine.

Thanks,
Ian.

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

* Re: [PATCH OSSTEST v4 2/2] Stubdom test case
  2015-06-15 12:05         ` [PATCH OSSTEST v4 2/2] " Ian Jackson
@ 2015-06-15 13:19           ` Wei Liu
  0 siblings, 0 replies; 11+ messages in thread
From: Wei Liu @ 2015-06-15 13:19 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Xen-devel, Wei Liu, ian.campbell, xen-devel

On Mon, Jun 15, 2015 at 01:05:50PM +0100, Ian Jackson wrote:
> Wei Liu writes ("Re: [PATCH OSSTEST v3] Stubdom test case"):
> > On Wed, Jun 10, 2015 at 12:10:41PM +0100, Ian Jackson wrote:
> > > If you do that then you end up with
> > >    $stubdom = guest_var_boolean($gho,'stubdom')
> > > (assuming guest_var_boolean returns undef for unset runvar if no
> > > default supplied).
> 
> Thanks, you did this.
> 
> > > That short enough that you can just write it explicitly in
> > > more_prepareguest_hvm (which has access to $gho) and you therefore
> > > don't need to introduce a new Stubdom entry in xopts.
> 
> But:
> 
> Wei Liu writes ("[PATCH OSSTEST v4 2/2] Stubdom test case"):
> > Currently only QEMU traditional supports stubdom and we want to
> > eventually do away with non-XSM test cases, so we only create
> ...
> > +    my $stubdom = $xopts{Stubdom};
> ...
> > +    my $stubdom = guest_var_boolean($gho, 'stubdom');
> > +
> >      more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb,
> >                            OnReboot => 'preserve',
> >                            Bios => $r{bios},
> > +                          Stubdom => $stubdom,
> 
> Did you disagree with my suggestion to avoid introducing an xopt
> Stubdom ?  Personally I don't think this plumbing adds anything over
> writing the runvar reference directly, but perhaps you (or Ian C)
> disagree.
> 

Sorry, I missed that part. I'm fine with your suggestion. I will respin.

Wei.

> Apart from that this patch is fine.
> 
> Thanks,
> Ian.

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

end of thread, other threads:[~2015-06-15 13:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10 19:40 [PATCH OSSTEST v4 0/2] Stubdom test case Wei Liu
2015-06-10 19:40 ` [PATCH OSSTEST v4 1/2] TestSupport: introduce guest_var_boolean Wei Liu
2015-06-11 15:05   ` Ian Jackson
2015-06-10 19:40 ` [PATCH OSSTEST v4 2/2] Stubdom test case Wei Liu
2015-06-10 10:41   ` [PATCH OSSTEST v3] " Wei Liu
2015-06-10 10:49     ` Ian Campbell
2015-06-10 11:10     ` Ian Jackson
2015-06-10 11:31       ` Ian Campbell
2015-06-10 13:54       ` Wei Liu
2015-06-15 12:05         ` [PATCH OSSTEST v4 2/2] " Ian Jackson
2015-06-15 13:19           ` Wei Liu

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