All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC V2 0/6] OSSTest: OVMF test job
@ 2013-12-11 16:11 Wei Liu
  2013-12-11 16:11 ` [PATCH RFC V2 1/6] TestSupport.pm: add bios option to guest config file Wei Liu
                   ` (5 more replies)
  0 siblings, 6 replies; 30+ messages in thread
From: Wei Liu @ 2013-12-11 16:11 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, ian.jackson, ian.campbell

RFC v2 of this series

This series implements a basic test job for OVMF guest. The test case will
install an OVMF guest and try to boot it.

It is also possible to derive a debian HVM installation test case from
ts-ovmf-debian-install - the only difference should be the BIOS option. I
tested running the test script without specifying BIOS, it worked fine. I just
didn't figure out a sensible way to organize test cases and run jobs.

OVMF will need to build for amd64 target and used with QEMU upstream.
Not very sure whether I did the right thing to make-flight and sg-run-job
though.

Wei.

Changes in v2:
* factor out preseed_base
* make installation CD work with seabios

Wei Liu (6):
  TestSupport.pm: add bios option to guest config file
  Build OVMF for Xen-unstable
  Debian.pm: factor out preseed_base
  Introduce ts-ovmf-debian-install
  make-flight: OVMF test filght
  sg-run-job: OVMF job

 Osstest/Debian.pm      |  129 +++++++++++++++-------------
 Osstest/TestSupport.pm |    5 ++
 make-flight            |   16 +++-
 sg-run-job             |    6 ++
 ts-ovmf-debian-install |  218 ++++++++++++++++++++++++++++++++++++++++++++++++
 ts-xen-build           |    6 +-
 6 files changed, 319 insertions(+), 61 deletions(-)
 create mode 100755 ts-ovmf-debian-install

-- 
1.7.10.4

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

* [PATCH RFC V2 1/6] TestSupport.pm: add bios option to guest config file
  2013-12-11 16:11 [PATCH RFC V2 0/6] OSSTest: OVMF test job Wei Liu
@ 2013-12-11 16:11 ` Wei Liu
  2013-12-11 16:11 ` [PATCH RFC V2 2/6] Build OVMF for Xen-unstable Wei Liu
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 30+ messages in thread
From: Wei Liu @ 2013-12-11 16:11 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, ian.jackson, ian.campbell

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 233d453..dbf9061 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1424,6 +1424,11 @@ END
         $cfg .= "device_model_version='$devmodel'\n";
     }
 
+    my $bios = $xopts{'Bios'};
+    if (defined $bios) {
+        $cfg .= "bios='$bios'\n";
+    }
+
     my $cfgpath= prepareguest_part_xencfg($ho, $gho, $ram_mb, \%xopts, $cfg);
     target_cmd_root($ho, <<END);
         (echo $passwd; echo $passwd) | vncpasswd $gho->{Guest}.vncpw
-- 
1.7.10.4

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

* [PATCH RFC V2 2/6] Build OVMF for Xen-unstable
  2013-12-11 16:11 [PATCH RFC V2 0/6] OSSTest: OVMF test job Wei Liu
  2013-12-11 16:11 ` [PATCH RFC V2 1/6] TestSupport.pm: add bios option to guest config file Wei Liu
@ 2013-12-11 16:11 ` Wei Liu
  2013-12-12 15:21   ` Ian Jackson
  2013-12-11 16:11 ` [PATCH RFC V2 3/6] Debian.pm: factor out preseed_base Wei Liu
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2013-12-11 16:11 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, ian.jackson, ian.campbell

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 make-flight  |   10 +++++++++-
 ts-xen-build |    6 +++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/make-flight b/make-flight
index 65e3abc..8d900e2 100755
--- a/make-flight
+++ b/make-flight
@@ -88,6 +88,14 @@ if [ x$buildflight = x ]; then
     *) enable_xend=false;;
     esac
 
+    case "$xenbranch" in
+    xen-3.*-testing) enable_ovmf=false;;
+    xen-4.0-testing) enable_ovmf=false;;
+    xen-4.1-testing) enable_ovmf=false;;
+    xen-4.2-testing) enable_ovmf=false;;
+    *) enable_ovmf=true;
+    esac
+
     eval "
 	arch_runvars=\"\$ARCH_RUNVARS_$arch\"
     "
@@ -95,7 +103,7 @@ if [ x$buildflight = x ]; then
     build_hostflags=share-build-$suite-$arch,arch-$arch,suite-$suite,purpose-build
 
     ./cs-job-create $flight build-$arch build				     \
-		arch=$arch enable_xend=$enable_xend						     \
+		arch=$arch enable_xend=$enable_xend enable_ovmf=$enable_ovmf	     \
 	tree_qemu=$TREE_QEMU	     \
 	tree_qemuu=$TREE_QEMU_UPSTREAM	     \
 	tree_xen=$TREE_XEN		     \
diff --git a/ts-xen-build b/ts-xen-build
index ebb7d6f..74d17f0 100755
--- a/ts-xen-build
+++ b/ts-xen-build
@@ -125,14 +125,18 @@ sub build () {
         ' buildconfigs/enable-xen-config
 END
     my $xend_opt= $r{enable_xend} =~ m/true/ ? "--enable-xend" : "--disable-xend";
+    my $ovmf_opt= $r{enable_ovmf} =~ m/true/ ? "--enable-ovmf" : "--disable-ovmf";
 
     buildcmd_stamped_logged(300, 'configure', <<END,<<END,<<END);
             if test -f configure; then
                 if grep -q -- $xend_opt tools/configure ; then
 		    xend=$xend_opt
                 fi
+                if grep -q -- $ovmf_opt tools/configure ; then
+                    ovmf=$ovmf_opt
+                fi
 END
-                ./configure --sysconfdir=/etc \$xend
+                ./configure --sysconfdir=/etc \$xend \$ovmf
 END
             fi
 END
-- 
1.7.10.4

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

* [PATCH RFC V2 3/6] Debian.pm: factor out preseed_base
  2013-12-11 16:11 [PATCH RFC V2 0/6] OSSTest: OVMF test job Wei Liu
  2013-12-11 16:11 ` [PATCH RFC V2 1/6] TestSupport.pm: add bios option to guest config file Wei Liu
  2013-12-11 16:11 ` [PATCH RFC V2 2/6] Build OVMF for Xen-unstable Wei Liu
@ 2013-12-11 16:11 ` Wei Liu
  2013-12-12 15:25   ` Ian Jackson
  2013-12-12 16:19   ` Ian Jackson
  2013-12-11 16:11 ` [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install Wei Liu
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 30+ messages in thread
From: Wei Liu @ 2013-12-11 16:11 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, ian.jackson, ian.campbell

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 Osstest/Debian.pm |  129 +++++++++++++++++++++++++++++------------------------
 1 file changed, 70 insertions(+), 59 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index e51a233..54bc843 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -33,6 +33,7 @@ BEGIN {
     @ISA         = qw(Exporter);
     @EXPORT      = qw(debian_boot_setup
                       %preseed_cmds
+                      preseed_base
                       preseed_create
                       preseed_hook_command preseed_hook_installscript
                       di_installcmdline_core
@@ -432,7 +433,73 @@ sub di_installcmdline_core ($$;@) {
         if defined $debconf_priority;
 
     return @cl;
-}             
+}
+
+sub preseed_base ($) {
+    my ($suite) = @_;
+
+    return <<'END';
+d-i mirror/suite string $suite
+
+d-i debian-installer/locale string en_GB
+d-i console-keymaps-at/keymap select gb
+d-i keyboard-configuration/xkb-keymap string en_GB
+
+#d-i debconf/frontend string readline
+
+d-i mirror/country string manual
+d-i mirror/http/proxy string
+
+d-i clock-setup/utc boolean true
+d-i time/zone string Europe/London
+d-i clock-setup/ntp boolean true
+
+d-i partman-md/device_remove_md boolean true
+d-i partman-lvm/device_remove_lvm boolean true
+d-i partman-partitioning/confirm_write_new_label boolean true
+d-i partman/choose_partition select finish
+d-i partman/confirm boolean true
+d-i partman-lvm/confirm boolean true
+
+d-i partman/confirm_nooverwrite true
+d-i partman-lvm/confirm_nooverwrite true
+d-i partman-md/confirm_nooverwrite true
+d-i partman-crypto/confirm_nooverwrite true
+
+#d-i netcfg/disable_dhcp boolean true
+d-i netcfg/get_nameservers string $c{NetNameservers}
+#d-i netcfg/get_netmask string \$c{NetNetmask}
+#d-i netcfg/get_gateway string \$c{NetGateway}
+d-i netcfg/confirm_static boolean true
+d-i netcfg/get_domain string $c{TestHostDomain}
+d-i netcfg/wireless_wep string
+
+d-i passwd/root-password password xenroot
+d-i passwd/root-password-again password xenroot
+d-i passwd/user-fullname string FLOSS Xen Test
+d-i passwd/username string osstest
+d-i passwd/user-password password osstest
+d-i passwd/user-password-again password osstest
+
+console-common  console-data/keymap/policy      select  Don't touch keymap
+console-data    console-data/keymap/policy      select  Don't touch keymap
+console-data    console-data/keymap/family      select  qwerty
+console-data console-data/keymap/template/layout select British
+
+popularity-contest popularity-contest/participate boolean false
+tasksel tasksel/first multiselect standard, web-server
+
+d-i grub-installer/only_debian boolean true
+
+d-i finish-install/keep-consoles boolean true
+d-i finish-install/reboot_in_progress note
+d-i cdrom-detect/eject boolean false
+
+d-i mirror/http/hostname string $c{DebianMirrorHost}
+d-i mirror/http/directory string /$c{DebianMirrorSubpath}
+
+END
+}          
 
 sub preseed_create ($$;@) {
     my ($ho, $sfx, %xopts) = @_;
@@ -619,45 +686,12 @@ END
 
     my $extra_packages = join(",",@extra_packages);
 
-    my $preseed_file= (<<END);
-d-i mirror/suite string $suite
-
-d-i debian-installer/locale string en_GB
-d-i console-keymaps-at/keymap select gb
-d-i keyboard-configuration/xkb-keymap string en_GB
-
-#d-i debconf/frontend string readline
-
-d-i mirror/country string manual
-d-i mirror/http/proxy string
-
-d-i clock-setup/utc boolean true
-d-i time/zone string Europe/London
-d-i clock-setup/ntp boolean true
+    my $preseed_file= preseed_base($suite);
 
+    $preseed_file .= (<<END);
 d-i partman-auto/method string lvm
 #d-i partman-auto/method string regular
 
-d-i partman-md/device_remove_md boolean true
-d-i partman-lvm/device_remove_lvm boolean true
-d-i partman-partitioning/confirm_write_new_label boolean true
-d-i partman/choose_partition select finish
-d-i partman/confirm boolean true
-d-i partman-lvm/confirm boolean true
-
-d-i partman/confirm_nooverwrite true
-d-i partman-lvm/confirm_nooverwrite true
-d-i partman-md/confirm_nooverwrite true
-d-i partman-crypto/confirm_nooverwrite true
-
-#d-i netcfg/disable_dhcp boolean true
-d-i netcfg/get_nameservers string $c{NetNameservers}
-#d-i netcfg/get_netmask string \$c{NetNetmask}
-#d-i netcfg/get_gateway string \$c{NetGateway}
-d-i netcfg/confirm_static boolean true
-d-i netcfg/get_domain string $c{TestHostDomain}
-d-i netcfg/wireless_wep string
-
 #d-i partman-auto/init_automatically_partition select regular
 d-i partman-auto/disk string $disk
 
@@ -685,32 +719,9 @@ d-i partman-auto/expert_recipe string					\\
 			lv_name{ dummy }				\\
 		.
 
-d-i passwd/root-password password xenroot
-d-i passwd/root-password-again password xenroot
-d-i passwd/user-fullname string FLOSS Xen Test
-d-i passwd/username string osstest
-d-i passwd/user-password password osstest
-d-i passwd/user-password-again password osstest
-
-console-common  console-data/keymap/policy      select  Don't touch keymap
-console-data    console-data/keymap/policy      select  Don't touch keymap
-console-data    console-data/keymap/family      select  qwerty
-console-data console-data/keymap/template/layout select British
-
-popularity-contest popularity-contest/participate boolean false
-tasksel tasksel/first multiselect standard, web-server
 
 d-i pkgsel/include string openssh-server, ntp, ntpdate, $extra_packages
 
-d-i grub-installer/only_debian boolean true
-
-d-i finish-install/keep-consoles boolean true
-d-i finish-install/reboot_in_progress note
-d-i cdrom-detect/eject boolean false
-
-d-i mirror/http/hostname string $c{DebianMirrorHost}
-d-i mirror/http/directory string /$c{DebianMirrorSubpath}
-
 $xopts{ExtraPreseed}
 END
 
-- 
1.7.10.4

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

* [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install
  2013-12-11 16:11 [PATCH RFC V2 0/6] OSSTest: OVMF test job Wei Liu
                   ` (2 preceding siblings ...)
  2013-12-11 16:11 ` [PATCH RFC V2 3/6] Debian.pm: factor out preseed_base Wei Liu
@ 2013-12-11 16:11 ` Wei Liu
  2013-12-12  8:49   ` Dario Faggioli
  2013-12-12 15:40   ` Ian Jackson
  2013-12-11 16:11 ` [PATCH RFC V2 5/6] make-flight: OVMF test filght Wei Liu
  2013-12-11 16:11 ` [PATCH RFC V2 6/6] sg-run-job: OVMF job Wei Liu
  5 siblings, 2 replies; 30+ messages in thread
From: Wei Liu @ 2013-12-11 16:11 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, ian.jackson, ian.campbell

This is OVMF guest test case. It resembles ts-redhat-install:
1. prepare a auto install CD
2. install OVMF guest
3. test if the guets is up

The installtion CD is also bootable with seabios.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 ts-ovmf-debian-install |  218 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 218 insertions(+)
 create mode 100755 ts-ovmf-debian-install

diff --git a/ts-ovmf-debian-install b/ts-ovmf-debian-install
new file mode 100755
index 0000000..2e19348
--- /dev/null
+++ b/ts-ovmf-debian-install
@@ -0,0 +1,218 @@
+#!/usr/bin/perl -w
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2013 Citrix Inc.
+# 
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+# 
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+use strict qw(vars);
+use DBI;
+use Osstest;
+use Osstest::Debian;
+use Osstest::TestSupport;
+
+tsreadconfig();
+
+our $stage=0;
+if (@ARGV && $ARGV[0] =~ m/^--stage(\d+)$/) { $stage=$1; shift @ARGV; }
+
+our ($whhost,$gn) = @ARGV;
+$whhost ||= 'host';
+$gn ||= 'ovmf';
+
+our $ho= selecthost($whhost);
+
+our $ram_mb=    768;
+our $disk_mb= 10000;
+
+our $guesthost= "$gn.guest.osstest";
+our $gho;
+
+our $xl= toolstack()->{Command};
+
+
+sub preseed () {
+
+    my $preseed_file = preseed_base('wheezy');
+
+    $preseed_file .= (<<END);
+d-i netcfg/get_hostname string debian-hvm
+
+d-i partman-auto/disk string /dev/xvda
+d-i partman-auto/method string  regular
+
+d-i partman-auto/expert_recipe string \\
+	boot-root :: \\
+		512 50 512 vfat \\
+			\$primary{ } \$bootable{ } \\
+			method{ efi } format{ } \\
+			use_filesystem{ } filesystem{ vfat } \\
+			mountpoint{ /boot/efi } \\
+		. \\
+		5000 50 5000 ext4 \\
+			method{ format } format{ } \\
+			use_filesystem{ } filesystem{ ext4 } \\
+			mountpoint{ / } \\
+		. \\
+		512 30 100% linux-swap \\
+			method{ swap } format{ } \\
+		.
+
+d-i apt-setup/use_mirror boolean false
+d-i apt-setup/another boolean false
+d-i apt-setup/non-free boolean false
+d-i apt-setup/contrib boolean false
+d-i apt-setup/cdrom/set-first boolean false
+
+d-i pkgsel/include string openssh-server, ntp, ntpdate, 
+
+d-i preseed/early_command string
+
+d-i preseed/late_command string \\
+	in-target mkdir -p /boot/efi/EFI/boot; \\
+	in-target cp /boot/efi/EFI/debian/grubx64.efi /boot/efi/EFI/boot/bootx64.efi ;\\
+	in-target mkdir -p /root/.ssh; \\
+        cp /authorized_keys /target/root/.ssh
+
+d-i clock-setup/ntp-server string ntp.uk.xensource.com
+
+END
+    return $preseed_file;
+}
+
+sub grub_cfg () {
+
+    return <<"END";
+set default="0"
+set timeout=5
+
+menuentry 'OVMF guest auto Install' {
+    linux /install.amd/vmlinuz console=vga console=ttyS0,115200n8 preseed/file=/preseed.cfg
+    initrd /install.amd/initrd.gz
+}
+END
+}
+
+sub isolinux_cfg () {
+    return <<"END";
+    default autoinstall
+    prompt 0
+    timeout 0
+
+    label autoinstall
+        kernel /install.amd/vmlinuz
+        append video=vesa:ywrap,mtrr vga=788 console=ttyS0,115200n8 preseed/file=/preseed.cfg initrd=/install.amd/initrd.gz
+END
+}
+
+our $emptyiso= '/root/empty.iso';
+
+sub prep () {
+    target_install_packages_norec($ho, qw(lvm2 rsync xorriso genisoimage));
+
+    my $isotimeout= 600;
+
+    $gho= prepareguest($ho, $gn, $guesthost, 22,
+                       $disk_mb + 1,
+                       100);
+
+    my $newiso= '/root/newiso';
+    my $emptydir= '/root/empty-dir';
+    my $initrddir= '/root/initrd-dir';
+
+    my @isogen_base= qw(-R -J -T);
+    my @xorriso_opts= qw(-as mkisofs
+                         -r
+                         -b isolinux/isolinux.bin
+                         -c isolinux/boot.cat
+                         -no-emul-boot
+                         -boot-load-size 4
+                         -boot-info-table
+                         -eltorito-alt-boot
+                         -e boot/grub/efi.img
+                         -no-emul-boot);
+
+    target_putfilecontents_root_stash($ho, 10, preseed(),
+                                      "/root/guest-preseed");
+    target_putfilecontents_root_stash($ho, 10, authorized_keys(),
+                                      "/root/guest-authkeys");
+    target_cmd_root($ho, <<END, 60);
+            mkdir -p $emptydir
+            genisoimage -o $emptyiso @isogen_base $emptydir/.
+END
+
+    more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb,
+                          OnReboot => 'preserve',
+                          Bios => 'ovmf',
+                          PostImageHook => sub {
+        target_cmd_root($ho, <<END, $isotimeout);
+            set -x
+            umount /mnt ||:
+            rm -rf $newiso
+            mount -o loop -r $gho->{Rimage} /mnt
+            mkdir $newiso
+            cp -a /mnt/. $newiso/.
+            umount /mnt
+            rm -rf $initrddir
+            mkdir $initrddir
+            cd $initrddir
+            gzip -d \< $newiso/install.amd/initrd.gz | cpio --extract --make-directories --no-absolute-filename
+            cp /root/guest-preseed preseed.cfg
+            cp /root/guest-authkeys authorized_keys
+            find . | cpio -H newc --create | gzip -9 \> $newiso/install.amd/initrd.gz
+            cd -
+            rm -rf $initrddir
+            cd $newiso
+            md5sum `find -follow -type f` \> md5sum.txt
+            cd -
+END
+        target_putfilecontents_root_stash($ho, 10, grub_cfg(),
+					  "$newiso/debian/boot/grub/grub.cfg");
+
+        target_putfilecontents_root_stash($ho, 10, isolinux_cfg(),
+					  "$newiso/isolinux/isolinux.cfg");
+
+	target_cmd_root($ho, <<END, $isotimeout);
+	    xorriso  @xorriso_opts -o $gho->{Rimage} $newiso/.
+END
+    });
+}
+
+sub start () {
+    target_cmd_root($ho, "$xl create $gho->{CfgPath}", 100);
+}
+
+sub rewrite_config_nocd () {
+    guest_editconfig($ho, $gho, sub {
+        if (m/^\s*disk\s*\=/ .. /\]/) {
+            s/\Q$gho->{Rimage}\E/$emptyiso/;
+        }
+        s/^on_reboot.*/on_reboot='restart'/;
+    });
+}
+
+if (!$stage) {
+    prep();
+    start();
+} else {
+    $gho= selectguest($gn,$gho);
+}
+if ($stage<2) {
+    guest_await_reboot($ho,$gho,2000);
+    guest_destroy($ho,$gho);
+}
+
+rewrite_config_nocd();
+start();
+guest_await_dhcp_tcp($gho,300);
+guest_check_up($gho);
-- 
1.7.10.4

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

* [PATCH RFC V2 5/6] make-flight: OVMF test filght
  2013-12-11 16:11 [PATCH RFC V2 0/6] OSSTest: OVMF test job Wei Liu
                   ` (3 preceding siblings ...)
  2013-12-11 16:11 ` [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install Wei Liu
@ 2013-12-11 16:11 ` Wei Liu
  2013-12-12 16:18   ` Ian Jackson
  2013-12-11 16:11 ` [PATCH RFC V2 6/6] sg-run-job: OVMF job Wei Liu
  5 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2013-12-11 16:11 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, ian.jackson, ian.campbell

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 make-flight |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/make-flight b/make-flight
index 8d900e2..51aebe2 100755
--- a/make-flight
+++ b/make-flight
@@ -418,7 +418,13 @@ for xenarch in ${TEST_ARCHES- i386 amd64 armhf } ; do
                 test-win xl $qemuu_runvar \
 		win_image=win7-x64.iso \
 		all_hostflags=$most_hostflags,hvm
+      fi
 
+      if [ $xenarch = amd64 -a "x$qemuu_suffix" = "x-qemuu" ]; then
+      job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-ovmf-amd64 \
+                test-debianhvm xl $qemuu_runvar \
+		ovmf_image=debian-7.2.0-amd64-CD-1.iso \
+		all_hostflags=$most_hostflags,hvm
       fi
 
       if [ $xenarch = amd64 -a $dom0arch = i386 -a "$kern" = "" ]; then
-- 
1.7.10.4

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

* [PATCH RFC V2 6/6] sg-run-job: OVMF job
  2013-12-11 16:11 [PATCH RFC V2 0/6] OSSTest: OVMF test job Wei Liu
                   ` (4 preceding siblings ...)
  2013-12-11 16:11 ` [PATCH RFC V2 5/6] make-flight: OVMF test filght Wei Liu
@ 2013-12-11 16:11 ` Wei Liu
  2013-12-12 15:42   ` Ian Jackson
  5 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2013-12-11 16:11 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, ian.jackson, ian.campbell

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 sg-run-job |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sg-run-job b/sg-run-job
index f91da85..29e4376 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -264,6 +264,12 @@ proc run-job/test-rhelhvm {} {
     test-guest-nomigr redhat
 }
 
+proc need-hosts/test-debianhvm {} { return host }
+proc run-job/test-debianhvm {} {
+    run-ts . = ts-ovmf-debian-install
+    test-guest ovmf
+}
+
 proc need-hosts/test-pair {} { return {src_host dst_host} }
 proc run-job/test-pair {} {
     run-ts . =              ts-debian-install      dst_host
-- 
1.7.10.4

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

* Re: [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install
  2013-12-11 16:11 ` [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install Wei Liu
@ 2013-12-12  8:49   ` Dario Faggioli
  2013-12-12 12:16     ` Wei Liu
  2013-12-12 15:40   ` Ian Jackson
  1 sibling, 1 reply; 30+ messages in thread
From: Dario Faggioli @ 2013-12-12  8:49 UTC (permalink / raw)
  To: Wei Liu; +Cc: ian.jackson, ian.campbell, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1014 bytes --]

On mer, 2013-12-11 at 16:11 +0000, Wei Liu wrote:
> diff --git a/ts-ovmf-debian-install b/ts-ovmf-debian-install
> new file mode 100755
> index 0000000..2e19348
> --- /dev/null
> +++ b/ts-ovmf-debian-install

> +sub start () {
> +    target_cmd_root($ho, "$xl create $gho->{CfgPath}", 100);
> +}
> +
Something like "toolstack()->{Command}" instead of "xl" ?

I don't know how important this is, though, as I don't think this has
much chances to work with xend, has it?

> +rewrite_config_nocd();
> +start();
> +guest_await_dhcp_tcp($gho,300);
> +guest_check_up($gho);
>
Does this mean that the guest remains up after the end of the test? This
is also probably not a big deal, but, shouldn't we tear it down?

Regards,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install
  2013-12-12  8:49   ` Dario Faggioli
@ 2013-12-12 12:16     ` Wei Liu
  2013-12-12 12:24       ` Dario Faggioli
  0 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2013-12-12 12:16 UTC (permalink / raw)
  To: Dario Faggioli; +Cc: ian.jackson, Wei Liu, ian.campbell, xen-devel

On Thu, Dec 12, 2013 at 09:49:11AM +0100, Dario Faggioli wrote:
> On mer, 2013-12-11 at 16:11 +0000, Wei Liu wrote:
> > diff --git a/ts-ovmf-debian-install b/ts-ovmf-debian-install
> > new file mode 100755
> > index 0000000..2e19348
> > --- /dev/null
> > +++ b/ts-ovmf-debian-install
> 
> > +sub start () {
> > +    target_cmd_root($ho, "$xl create $gho->{CfgPath}", 100);
> > +}
> > +
> Something like "toolstack()->{Command}" instead of "xl" ?
> 

$xl is in fact toolstack()->{Command}.

> I don't know how important this is, though, as I don't think this has
> much chances to work with xend, has it?
> 

No. Xend is deprecated so I don't bother fiddling with that.

However this doesn't prevent people using Xend from using OVMF. It's
just firmware after all.

> > +rewrite_config_nocd();
> > +start();
> > +guest_await_dhcp_tcp($gho,300);
> > +guest_check_up($gho);
> >
> Does this mean that the guest remains up after the end of the test? This
> is also probably not a big deal, but, shouldn't we tear it down?
> 

I copied this from ts-redhat-install.

My guess would be we might need to check if there's anything wrong with
DomU, especially when test fails. Destroying DomU will wipe out useful
information.

Wei.

> Regards,
> Dario
> 
> -- 
> <<This happens because I choose it to happen!>> (Raistlin Majere)
> -----------------------------------------------------------------
> Dario Faggioli, Ph.D, http://about.me/dario.faggioli
> Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
> 

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

* Re: [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install
  2013-12-12 12:16     ` Wei Liu
@ 2013-12-12 12:24       ` Dario Faggioli
  2013-12-12 12:29         ` Wei Liu
  2013-12-12 16:26         ` Ian Jackson
  0 siblings, 2 replies; 30+ messages in thread
From: Dario Faggioli @ 2013-12-12 12:24 UTC (permalink / raw)
  To: Wei Liu; +Cc: ian.jackson, ian.campbell, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1767 bytes --]

On gio, 2013-12-12 at 12:16 +0000, Wei Liu wrote:
> On Thu, Dec 12, 2013 at 09:49:11AM +0100, Dario Faggioli wrote:
> > On mer, 2013-12-11 at 16:11 +0000, Wei Liu wrote:
> > > diff --git a/ts-ovmf-debian-install b/ts-ovmf-debian-install
> > > new file mode 100755
> > > index 0000000..2e19348
> > > --- /dev/null
> > > +++ b/ts-ovmf-debian-install
> > 
> > > +sub start () {
> > > +    target_cmd_root($ho, "$xl create $gho->{CfgPath}", 100);
> > > +}
> > > +
> > Something like "toolstack()->{Command}" instead of "xl" ?
> > 
> 
> $xl is in fact toolstack()->{Command}.
> 
I know.

> > I don't know how important this is, though, as I don't think this has
> > much chances to work with xend, has it?
> > 
> 
> No. Xend is deprecated so I don't bother fiddling with that.
> 
Ok. I was also thinking that keeping these things general and abstract
enough would be better if, at some point, we'd like to intdocude other
toolstack (e.g., virsh/libvirt). However, changes will be needed anyway,
e.g., to the "create" part... so, yeah, I guess this is a non issue.

> > Does this mean that the guest remains up after the end of the test? This
> > is also probably not a big deal, but, shouldn't we tear it down?
> > 
> 
> I copied this from ts-redhat-install.
> 
You're right, sorry for this. I thought I see gests being teared down
somewhere, but just finished running a (similar) test myself, and the
guest is up.

Sorry again for the noise. :-)

Regards,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install
  2013-12-12 12:24       ` Dario Faggioli
@ 2013-12-12 12:29         ` Wei Liu
  2013-12-12 16:26         ` Ian Jackson
  1 sibling, 0 replies; 30+ messages in thread
From: Wei Liu @ 2013-12-12 12:29 UTC (permalink / raw)
  To: Dario Faggioli; +Cc: ian.jackson, Wei Liu, ian.campbell, xen-devel

On Thu, Dec 12, 2013 at 01:24:19PM +0100, Dario Faggioli wrote:
> On gio, 2013-12-12 at 12:16 +0000, Wei Liu wrote:
> > On Thu, Dec 12, 2013 at 09:49:11AM +0100, Dario Faggioli wrote:
> > > On mer, 2013-12-11 at 16:11 +0000, Wei Liu wrote:
> > > > diff --git a/ts-ovmf-debian-install b/ts-ovmf-debian-install
> > > > new file mode 100755
> > > > index 0000000..2e19348
> > > > --- /dev/null
> > > > +++ b/ts-ovmf-debian-install
> > > 
> > > > +sub start () {
> > > > +    target_cmd_root($ho, "$xl create $gho->{CfgPath}", 100);
> > > > +}
> > > > +
> > > Something like "toolstack()->{Command}" instead of "xl" ?
> > > 
> > 
> > $xl is in fact toolstack()->{Command}.
> > 
> I know.
> 
> > > I don't know how important this is, though, as I don't think this has
> > > much chances to work with xend, has it?
> > > 
> > 
> > No. Xend is deprecated so I don't bother fiddling with that.
> > 
> Ok. I was also thinking that keeping these things general and abstract
> enough would be better if, at some point, we'd like to intdocude other
> toolstack (e.g., virsh/libvirt). However, changes will be needed anyway,
> e.g., to the "create" part... so, yeah, I guess this is a non issue.
> 

Correct. If we are to support more toolstack there's certainly more work
to do...

> > > Does this mean that the guest remains up after the end of the test? This
> > > is also probably not a big deal, but, shouldn't we tear it down?
> > > 
> > 
> > I copied this from ts-redhat-install.
> > 
> You're right, sorry for this. I thought I see gests being teared down
> somewhere, but just finished running a (similar) test myself, and the
> guest is up.
> 
> Sorry again for the noise. :-)
> 

Not at all. It's not noise. Thanks for reviewing.

Wei.

> Regards,
> Dario
> 
> -- 
> <<This happens because I choose it to happen!>> (Raistlin Majere)
> -----------------------------------------------------------------
> Dario Faggioli, Ph.D, http://about.me/dario.faggioli
> Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
> 

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

* Re: [PATCH RFC V2 2/6] Build OVMF for Xen-unstable
  2013-12-11 16:11 ` [PATCH RFC V2 2/6] Build OVMF for Xen-unstable Wei Liu
@ 2013-12-12 15:21   ` Ian Jackson
  2013-12-12 15:34     ` Wei Liu
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Jackson @ 2013-12-12 15:21 UTC (permalink / raw)
  To: Wei Liu; +Cc: ian.campbell, xen-devel

Wei Liu writes ("[PATCH RFC V2 2/6] Build OVMF for Xen-unstable"):
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
...
> +    *) enable_ovmf=true;

This patch has made it into the live version of osstest and can be
dropped from your series.

Ian.

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

* Re: [PATCH RFC V2 3/6] Debian.pm: factor out preseed_base
  2013-12-11 16:11 ` [PATCH RFC V2 3/6] Debian.pm: factor out preseed_base Wei Liu
@ 2013-12-12 15:25   ` Ian Jackson
  2013-12-12 16:19   ` Ian Jackson
  1 sibling, 0 replies; 30+ messages in thread
From: Ian Jackson @ 2013-12-12 15:25 UTC (permalink / raw)
  To: Wei Liu; +Cc: ian.campbell, xen-devel

Wei Liu writes ("[PATCH RFC V2 3/6] Debian.pm: factor out preseed_base"):
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

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

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

* Re: [PATCH RFC V2 2/6] Build OVMF for Xen-unstable
  2013-12-12 15:21   ` Ian Jackson
@ 2013-12-12 15:34     ` Wei Liu
  2013-12-12 15:35       ` Ian Campbell
  0 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2013-12-12 15:34 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Wei Liu, ian.campbell, xen-devel

On Thu, Dec 12, 2013 at 03:21:08PM +0000, Ian Jackson wrote:
> Wei Liu writes ("[PATCH RFC V2 2/6] Build OVMF for Xen-unstable"):
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> ...
> > +    *) enable_ovmf=true;
> 
> This patch has made it into the live version of osstest and can be
> dropped from your series.
> 

I think there's one bit missing in the above patch, we should disable
ovmf build for 4.3-testing branch as well.

I'm quite surprised it passed the push gate...

Wei.

> Ian.

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

* Re: [PATCH RFC V2 2/6] Build OVMF for Xen-unstable
  2013-12-12 15:34     ` Wei Liu
@ 2013-12-12 15:35       ` Ian Campbell
  2013-12-12 16:34         ` Ian Jackson
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Campbell @ 2013-12-12 15:35 UTC (permalink / raw)
  To: Wei Liu; +Cc: Ian Jackson, xen-devel

On Thu, 2013-12-12 at 15:34 +0000, Wei Liu wrote:
> On Thu, Dec 12, 2013 at 03:21:08PM +0000, Ian Jackson wrote:
> > Wei Liu writes ("[PATCH RFC V2 2/6] Build OVMF for Xen-unstable"):
> > > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > ...
> > > +    *) enable_ovmf=true;
> > 
> > This patch has made it into the live version of osstest and can be
> > dropped from your series.
> > 
> 
> I think there's one bit missing in the above patch, we should disable
> ovmf build for 4.3-testing branch as well.
> 
> I'm quite surprised it passed the push gate...

Push gate only tests unstable...

> 
> Wei.
> 
> > Ian.

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

* Re: [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install
  2013-12-11 16:11 ` [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install Wei Liu
  2013-12-12  8:49   ` Dario Faggioli
@ 2013-12-12 15:40   ` Ian Jackson
  2013-12-12 15:51     ` Wei Liu
  2013-12-12 17:57     ` Wei Liu
  1 sibling, 2 replies; 30+ messages in thread
From: Ian Jackson @ 2013-12-12 15:40 UTC (permalink / raw)
  To: Wei Liu; +Cc: ian.campbell, xen-devel

Wei Liu writes ("[PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install"):
> This is OVMF guest test case. It resembles ts-redhat-install:

Thanks.  This is coming along but it still has too much clone-and-hack
in it.  All duplicated code should be factored out into TestSupport.pm
or Debian.pm.

> +    $preseed_file .= (<<END);
> +d-i netcfg/get_hostname string debian-hvm

This string should presumably be the guest ident or something.

> +d-i apt-setup/use_mirror boolean false

I think you need to use the mirror as specified for host installs, so
I think you need to move the mirror stuff into preseed_base.

> +d-i pkgsel/include string openssh-server, ntp, ntpdate, 

This is mostly common with preseed_create, so should be there.  You
will probably need to pass the xopts to preseed_base.

> +d-i preseed/early_command string
> +
> +d-i preseed/late_command string \\
> +	in-target mkdir -p /boot/efi/EFI/boot; \\
> +	in-target cp /boot/efi/EFI/debian/grubx64.efi /boot/efi/EFI/boot/bootx64.efi ;\\

Yuk.

> +	in-target mkdir -p /root/.ssh; \\
> +        cp /authorized_keys /target/root/.ssh

There's already machinery for doing this (rather differently) in
preseed-create.  Surely you should use it ?

> +d-i clock-setup/ntp-server string ntp.uk.xensource.com

Firstly, if this is needed it should be in preseed-base.  Secondly the
hardcoded xensource.com is right out!


> +    target_putfilecontents_root_stash($ho, 10, preseed(),
> +                                      "/root/guest-preseed");

These pathnames would ideally have the flight and job in them.  Doing
so will make it easier to run multiple tests on the same host install.
(Yes, I know that the ts-redhat-install script doesn't do that.)

> +    target_cmd_root($ho, <<END, 60);
> +            mkdir -p $emptydir
> +            genisoimage -o $emptyiso @isogen_base $emptydir/.
> +END

This is straight clone-and-hack from ts-redhat-install.

> +    more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb,
> +                          OnReboot => 'preserve',
> +                          Bios => 'ovmf',
> +                          PostImageHook => sub {
> +        target_cmd_root($ho, <<END, $isotimeout);
> +            set -x
> +            umount /mnt ||:
> +            rm -rf $newiso
> +            mount -o loop -r $gho->{Rimage} /mnt
> +            mkdir $newiso
> +            cp -a /mnt/. $newiso/.
> +            umount /mnt

More clone-and-hack from ts-redhat-install.

> +            md5sum `find -follow -type f` \> md5sum.txt

This should probably use find -print0 | xargs -0.

> +sub rewrite_config_nocd () {
> +    guest_editconfig($ho, $gho, sub {
> +        if (m/^\s*disk\s*\=/ .. /\]/) {
> +            s/\Q$gho->{Rimage}\E/$emptyiso/;
> +        }
> +        s/^on_reboot.*/on_reboot='restart'/;
> +    });
> +}
> +
> +if (!$stage) {
> +    prep();
> +    start();
> +} else {
> +    $gho= selectguest($gn,$gho);
> +}
> +if ($stage<2) {
> +    guest_await_reboot($ho,$gho,2000);
> +    guest_destroy($ho,$gho);
> +}
> +
> +rewrite_config_nocd();
> +start();
> +guest_await_dhcp_tcp($gho,300);
> +guest_check_up($gho);

More clone and hack.

Thanks,
Ian.

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

* Re: [PATCH RFC V2 6/6] sg-run-job: OVMF job
  2013-12-11 16:11 ` [PATCH RFC V2 6/6] sg-run-job: OVMF job Wei Liu
@ 2013-12-12 15:42   ` Ian Jackson
  2013-12-12 15:52     ` Wei Liu
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Jackson @ 2013-12-12 15:42 UTC (permalink / raw)
  To: Wei Liu; +Cc: ian.campbell, xen-devel

Wei Liu writes ("[PATCH RFC V2 6/6] sg-run-job: OVMF job"):
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
...
> +proc need-hosts/test-debianhvm {} { return host }
> +proc run-job/test-debianhvm {} {
> +    run-ts . = ts-ovmf-debian-install
> +    test-guest ovmf
> +}

Perhaps "ts-ovmf-debian-install" should be called
"ts-debian-hvm-install" ?

Ian.

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

* Re: [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install
  2013-12-12 15:40   ` Ian Jackson
@ 2013-12-12 15:51     ` Wei Liu
  2013-12-12 16:23       ` Ian Jackson
  2013-12-12 17:57     ` Wei Liu
  1 sibling, 1 reply; 30+ messages in thread
From: Wei Liu @ 2013-12-12 15:51 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Wei Liu, ian.campbell, xen-devel

The comment on preseed file makes sense to me.

My main question is wether you're suggesting I factor out a script call
ts-hvm-install then calls it from ts-redhat-install and
ts-debian-hvm-install?

Wei.

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

* Re: [PATCH RFC V2 6/6] sg-run-job: OVMF job
  2013-12-12 15:42   ` Ian Jackson
@ 2013-12-12 15:52     ` Wei Liu
  0 siblings, 0 replies; 30+ messages in thread
From: Wei Liu @ 2013-12-12 15:52 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Wei Liu, ian.campbell, xen-devel

On Thu, Dec 12, 2013 at 03:42:05PM +0000, Ian Jackson wrote:
> Wei Liu writes ("[PATCH RFC V2 6/6] sg-run-job: OVMF job"):
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> ...
> > +proc need-hosts/test-debianhvm {} { return host }
> > +proc run-job/test-debianhvm {} {
> > +    run-ts . = ts-ovmf-debian-install
> > +    test-guest ovmf
> > +}
> 
> Perhaps "ts-ovmf-debian-install" should be called
> "ts-debian-hvm-install" ?
> 

That would work as well. I don't have strong preference on naming
stuffs.

Wei.

> Ian.

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

* Re: [PATCH RFC V2 5/6] make-flight: OVMF test filght
  2013-12-11 16:11 ` [PATCH RFC V2 5/6] make-flight: OVMF test filght Wei Liu
@ 2013-12-12 16:18   ` Ian Jackson
  0 siblings, 0 replies; 30+ messages in thread
From: Ian Jackson @ 2013-12-12 16:18 UTC (permalink / raw)
  To: Wei Liu; +Cc: ian.campbell, xen-devel

Wei Liu writes ("[PATCH RFC V2 5/6] make-flight: OVMF test filght"):
> +      job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-ovmf-amd64 \

I haven't checked the implications of this but when I take this series
I'll probably mess with it.  I hope that's OK :-).

Thanks,
Ian.

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

* Re: [PATCH RFC V2 3/6] Debian.pm: factor out preseed_base
  2013-12-11 16:11 ` [PATCH RFC V2 3/6] Debian.pm: factor out preseed_base Wei Liu
  2013-12-12 15:25   ` Ian Jackson
@ 2013-12-12 16:19   ` Ian Jackson
  2013-12-12 16:42     ` Wei Liu
  1 sibling, 1 reply; 30+ messages in thread
From: Ian Jackson @ 2013-12-12 16:19 UTC (permalink / raw)
  To: Wei Liu; +Cc: ian.campbell, xen-devel

Wei Liu writes ("[PATCH RFC V2 3/6] Debian.pm: factor out preseed_base"):
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

It occurs to me to ask:

> -d-i time/zone string Europe/London
> -d-i clock-setup/ntp boolean true
> +    my $preseed_file= preseed_base($suite);
>  
> +    $preseed_file .= (<<END);
>  d-i partman-auto/method string lvm
>  #d-i partman-auto/method string regular

Why do you not put the base at the start of the preseed file ?

Ian.

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

* Re: [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install
  2013-12-12 15:51     ` Wei Liu
@ 2013-12-12 16:23       ` Ian Jackson
  0 siblings, 0 replies; 30+ messages in thread
From: Ian Jackson @ 2013-12-12 16:23 UTC (permalink / raw)
  To: Wei Liu; +Cc: ian.campbell, xen-devel

Wei Liu writes ("Re: [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install"):
> The comment on preseed file makes sense to me.
> 
> My main question is wether you're suggesting I factor out a script call
> ts-hvm-install then calls it from ts-redhat-install and
> ts-debian-hvm-install?

No, I think you should probably make additional perl functions in
TestSupport.pm and/or Debian.pm.

Doing this as a separate script is going to be very tricky because you
will want to specify complicated things as its arguments (for
example, perhaps you will want some of the common code to take
coderefs as hook-style callbacks).

Ian.

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

* Re: [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install
  2013-12-12 12:24       ` Dario Faggioli
  2013-12-12 12:29         ` Wei Liu
@ 2013-12-12 16:26         ` Ian Jackson
  2013-12-12 16:37           ` Dario Faggioli
  1 sibling, 1 reply; 30+ messages in thread
From: Ian Jackson @ 2013-12-12 16:26 UTC (permalink / raw)
  To: Dario Faggioli; +Cc: Wei Liu, ian.campbell, xen-devel

Dario Faggioli writes ("Re: [Xen-devel] [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install"):
> On gio, 2013-12-12 at 12:16 +0000, Wei Liu wrote:
> > $xl is in fact toolstack()->{Command}.
> 
> I know.

So err, I'm not sure what your point was.  Wei's code seems correct to
me.

> > > I don't know how important this is, though, as I don't think this has
> > > much chances to work with xend, has it?
> > 
> > No. Xend is deprecated so I don't bother fiddling with that.

I think it's better to be consistent and always use
toolstack()->{Command} even in tests which aren't going to work with
xend.

> > > Does this mean that the guest remains up after the end of the test? This
> > > is also probably not a big deal, but, shouldn't we tear it down?
> > 
> > I copied this from ts-redhat-install.
> >
> You're right, sorry for this. I thought I see gests being teared down
> somewhere, but just finished running a (similar) test myself, and the
> guest is up.

Whether the script leaves the guest up is a matter for the individual
script.  ts-debian-install && ts-debian-fixup leaves it down, but most
of the other ts-*-install scripts leave it up.  I don't think an
install script should do a shutdown just to provide a uniform interface.

The corresponding knowledge of whether to run start or not is in
sg-run-job.

Thanks,
Ian.

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

* Re: [PATCH RFC V2 2/6] Build OVMF for Xen-unstable
  2013-12-12 15:35       ` Ian Campbell
@ 2013-12-12 16:34         ` Ian Jackson
  2013-12-12 17:26           ` Ian Campbell
  0 siblings, 1 reply; 30+ messages in thread
From: Ian Jackson @ 2013-12-12 16:34 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Wei Liu, xen-devel

Ian Campbell writes ("Re: [PATCH RFC V2 2/6] Build OVMF for Xen-unstable"):
> On Thu, 2013-12-12 at 15:34 +0000, Wei Liu wrote:
> > I think there's one bit missing in the above patch, we should disable
> > ovmf build for 4.3-testing branch as well.
> > 
> > I'm quite surprised it passed the push gate...
> 
> Push gate only tests unstable...

Oops.

Ian, I'm going to kill the current wheezy attempt and force-push this
into pretest.  I'll rebase the wheezy stuff and hopefully it can go in
tomorrow.

Ian.

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

* Re: [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install
  2013-12-12 16:26         ` Ian Jackson
@ 2013-12-12 16:37           ` Dario Faggioli
  0 siblings, 0 replies; 30+ messages in thread
From: Dario Faggioli @ 2013-12-12 16:37 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Wei Liu, ian.campbell, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1196 bytes --]

On gio, 2013-12-12 at 16:26 +0000, Ian Jackson wrote:
> Dario Faggioli writes ("Re: [Xen-devel] [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install"):
> > On gio, 2013-12-12 at 12:16 +0000, Wei Liu wrote:
> > > $xl is in fact toolstack()->{Command}.
> > 
> > I know.
> 
> So err, I'm not sure what your point was.  Wei's code seems correct to
> me.
> 
My point was that, even if it's obviously true that
toolstack()->{Command}==xl, and hence Wei's code looks correct to me
too, we better use toolstack()->{Command}.

> > > > I don't know how important this is, though, as I don't think this has
> > > > much chances to work with xend, has it?
> > > 
> > > No. Xend is deprecated so I don't bother fiddling with that.
> 
> I think it's better to be consistent and always use
> toolstack()->{Command} even in tests which aren't going to work with
> xend.
> 
So, err... Exactly my point. :-)

Regards,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH RFC V2 3/6] Debian.pm: factor out preseed_base
  2013-12-12 16:19   ` Ian Jackson
@ 2013-12-12 16:42     ` Wei Liu
  2013-12-12 16:50       ` Ian Jackson
  0 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2013-12-12 16:42 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Wei Liu, ian.campbell, xen-devel

On Thu, Dec 12, 2013 at 04:19:48PM +0000, Ian Jackson wrote:
> Wei Liu writes ("[PATCH RFC V2 3/6] Debian.pm: factor out preseed_base"):
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> 
> It occurs to me to ask:
> 
> > -d-i time/zone string Europe/London
> > -d-i clock-setup/ntp boolean true
> > +    my $preseed_file= preseed_base($suite);
> >  
> > +    $preseed_file .= (<<END);
> >  d-i partman-auto/method string lvm
> >  #d-i partman-auto/method string regular
> 
> Why do you not put the base at the start of the preseed file ?
> 

What do you mean? Data generated by preseed_base is at the start of
preseed file.

Wei.

> Ian.

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

* Re: [PATCH RFC V2 3/6] Debian.pm: factor out preseed_base
  2013-12-12 16:42     ` Wei Liu
@ 2013-12-12 16:50       ` Ian Jackson
  0 siblings, 0 replies; 30+ messages in thread
From: Ian Jackson @ 2013-12-12 16:50 UTC (permalink / raw)
  To: Wei Liu; +Cc: ian.campbell, xen-devel

Wei Liu writes ("Re: [PATCH RFC V2 3/6] Debian.pm: factor out preseed_base"):
> On Thu, Dec 12, 2013 at 04:19:48PM +0000, Ian Jackson wrote:
> > Why do you not put the base at the start of the preseed file ?
> > 
> 
> What do you mean? Data generated by preseed_base is at the start of
> preseed file.

I mean "I didn't read your diff carefully enough".  Sorry!

Ian.

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

* Re: [PATCH RFC V2 2/6] Build OVMF for Xen-unstable
  2013-12-12 16:34         ` Ian Jackson
@ 2013-12-12 17:26           ` Ian Campbell
  0 siblings, 0 replies; 30+ messages in thread
From: Ian Campbell @ 2013-12-12 17:26 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Wei Liu, xen-devel

On Thu, 2013-12-12 at 16:34 +0000, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH RFC V2 2/6] Build OVMF for Xen-unstable"):
> > On Thu, 2013-12-12 at 15:34 +0000, Wei Liu wrote:
> > > I think there's one bit missing in the above patch, we should disable
> > > ovmf build for 4.3-testing branch as well.
> > > 
> > > I'm quite surprised it passed the push gate...
> > 
> > Push gate only tests unstable...
> 
> Oops.
> 
> Ian, I'm going to kill the current wheezy attempt and force-push this
> into pretest.  I'll rebase the wheezy stuff and hopefully it can go in
> tomorrow.

OK, I'll expect cron spam then ;-)

> 
> Ian.

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

* Re: [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install
  2013-12-12 15:40   ` Ian Jackson
  2013-12-12 15:51     ` Wei Liu
@ 2013-12-12 17:57     ` Wei Liu
  2013-12-12 18:17       ` Wei Liu
  1 sibling, 1 reply; 30+ messages in thread
From: Wei Liu @ 2013-12-12 17:57 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Wei Liu, ian.campbell, xen-devel

On Thu, Dec 12, 2013 at 03:40:58PM +0000, Ian Jackson wrote:
> Wei Liu writes ("[PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install"):
> > This is OVMF guest test case. It resembles ts-redhat-install:
> 
> Thanks.  This is coming along but it still has too much clone-and-hack
> in it.  All duplicated code should be factored out into TestSupport.pm
> or Debian.pm.
> 
> > +    $preseed_file .= (<<END);
> > +d-i netcfg/get_hostname string debian-hvm
> 
> This string should presumably be the guest ident or something.
> 
> > +d-i apt-setup/use_mirror boolean false
> 
> I think you need to use the mirror as specified for host installs, so
> I think you need to move the mirror stuff into preseed_base.
> 
> > +d-i pkgsel/include string openssh-server, ntp, ntpdate, 
> 
> This is mostly common with preseed_create, so should be there.  You
> will probably need to pass the xopts to preseed_base.
> 
> > +d-i preseed/early_command string
> > +
> > +d-i preseed/late_command string \\
> > +	in-target mkdir -p /boot/efi/EFI/boot; \\
> > +	in-target cp /boot/efi/EFI/debian/grubx64.efi /boot/efi/EFI/boot/bootx64.efi ;\\
> 
> Yuk.
> 
> > +	in-target mkdir -p /root/.ssh; \\
> > +        cp /authorized_keys /target/root/.ssh
> 
> There's already machinery for doing this (rather differently) in
> preseed-create.  Surely you should use it ?
> 

Using the web infrastructure for this looks overkill. I've replaced this
part with a call to 'echo -e $authkeys > authorized_keys', elimiating
the need for extra file.

Wei.

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

* Re: [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install
  2013-12-12 17:57     ` Wei Liu
@ 2013-12-12 18:17       ` Wei Liu
  0 siblings, 0 replies; 30+ messages in thread
From: Wei Liu @ 2013-12-12 18:17 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Wei Liu, ian.campbell, xen-devel

On Thu, Dec 12, 2013 at 05:57:23PM +0000, Wei Liu wrote:
> On Thu, Dec 12, 2013 at 03:40:58PM +0000, Ian Jackson wrote:
> > Wei Liu writes ("[PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install"):
> > > This is OVMF guest test case. It resembles ts-redhat-install:
> > 
> > Thanks.  This is coming along but it still has too much clone-and-hack
> > in it.  All duplicated code should be factored out into TestSupport.pm
> > or Debian.pm.
> > 
> > > +    $preseed_file .= (<<END);
> > > +d-i netcfg/get_hostname string debian-hvm
> > 
> > This string should presumably be the guest ident or something.
> > 
> > > +d-i apt-setup/use_mirror boolean false
> > 
> > I think you need to use the mirror as specified for host installs, so
> > I think you need to move the mirror stuff into preseed_base.
> > 
> > > +d-i pkgsel/include string openssh-server, ntp, ntpdate, 
> > 
> > This is mostly common with preseed_create, so should be there.  You
> > will probably need to pass the xopts to preseed_base.
> > 
> > > +d-i preseed/early_command string
> > > +
> > > +d-i preseed/late_command string \\
> > > +	in-target mkdir -p /boot/efi/EFI/boot; \\
> > > +	in-target cp /boot/efi/EFI/debian/grubx64.efi /boot/efi/EFI/boot/bootx64.efi ;\\
> > 
> > Yuk.
> > 
> > > +	in-target mkdir -p /root/.ssh; \\
> > > +        cp /authorized_keys /target/root/.ssh
> > 
> > There's already machinery for doing this (rather differently) in
> > preseed-create.  Surely you should use it ?
> > 
> 
> Using the web infrastructure for this looks overkill. I've replaced this
> part with a call to 'echo -e $authkeys > authorized_keys', elimiating
> the need for extra file.
> 

Phew, it didn't work. The rune failed to run as d-i late_command.
Will need to look for another way to do this.

Wei.

> Wei.

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

end of thread, other threads:[~2013-12-12 18:17 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-11 16:11 [PATCH RFC V2 0/6] OSSTest: OVMF test job Wei Liu
2013-12-11 16:11 ` [PATCH RFC V2 1/6] TestSupport.pm: add bios option to guest config file Wei Liu
2013-12-11 16:11 ` [PATCH RFC V2 2/6] Build OVMF for Xen-unstable Wei Liu
2013-12-12 15:21   ` Ian Jackson
2013-12-12 15:34     ` Wei Liu
2013-12-12 15:35       ` Ian Campbell
2013-12-12 16:34         ` Ian Jackson
2013-12-12 17:26           ` Ian Campbell
2013-12-11 16:11 ` [PATCH RFC V2 3/6] Debian.pm: factor out preseed_base Wei Liu
2013-12-12 15:25   ` Ian Jackson
2013-12-12 16:19   ` Ian Jackson
2013-12-12 16:42     ` Wei Liu
2013-12-12 16:50       ` Ian Jackson
2013-12-11 16:11 ` [PATCH RFC V2 4/6] Introduce ts-ovmf-debian-install Wei Liu
2013-12-12  8:49   ` Dario Faggioli
2013-12-12 12:16     ` Wei Liu
2013-12-12 12:24       ` Dario Faggioli
2013-12-12 12:29         ` Wei Liu
2013-12-12 16:26         ` Ian Jackson
2013-12-12 16:37           ` Dario Faggioli
2013-12-12 15:40   ` Ian Jackson
2013-12-12 15:51     ` Wei Liu
2013-12-12 16:23       ` Ian Jackson
2013-12-12 17:57     ` Wei Liu
2013-12-12 18:17       ` Wei Liu
2013-12-11 16:11 ` [PATCH RFC V2 5/6] make-flight: OVMF test filght Wei Liu
2013-12-12 16:18   ` Ian Jackson
2013-12-11 16:11 ` [PATCH RFC V2 6/6] sg-run-job: OVMF job Wei Liu
2013-12-12 15:42   ` Ian Jackson
2013-12-12 15:52     ` 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.