This is Roger''s FreeBSD patches with my fixes as new patches on the end. 01/13 more_prepareguest_hvm: honour xopt NoCdromImage 02/13 ts-freebsd-install: add FreeBSD PVHVM installer 03/13 ts-freebsd-install: Style fixes 04/13 ts-freebsd-install: honour <guest>_image runvar 05/13 make-flight: freebsd jobs 06/13 ts-freebsd-install: fix mode to be +x 07/13 ts-*: make all target_cmd[_root] set -e (or +e) 08/13 ts-freebsd-install: say set -ex at appropriate point 09/13 ts-freebsd-install: split big setup command into three 10/13 TestSupport: break out target_put_guest_image 11/13 ts-freebsd-install: sort out image handling by using 12/13 sg-run-job: prototype test-freebsd recipe 13/13 ts-freebsd-install: remove unused $xl setting I''m posting this for form''s sake. I am about to send this into the osstest push gate.
Ian Jackson
2013-Nov-25 17:43 UTC
[PATCH 01/13] more_prepareguest_hvm: honour xopt NoCdromImage
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Osstest/TestSupport.pm | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index a9cdc9c..0381fd8 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1368,24 +1368,30 @@ sub more_prepareguest_hvm ($$$$;@) {
my $passwd= ''xenvnc'';
prepareguest_part_lvmdisk($ho, $gho, $disk_mb);
-
- my $specimage= $r{"$gho->{Guest}_image"};
- die "$gho->{Guest} ?" unless $specimage;
- my $limage= $specimage =~ m,^/, ? $specimage :
"$c{Images}/$specimage";
- $gho->{Rimage}= "/root/$flight.$job.".basename($specimage);
- target_putfile_root($ho, 1000, $limage,$gho->{Rimage},
''-p'');
- my $postimage_hook= $xopts{PostImageHook};
- $postimage_hook->() if $postimage_hook;
+ my @disks = "phy:$gho->{Lvdev},hda,w";
+
+ if (!$xopts{NoCdromImage}) {
+ my $specimage= $r{"$gho->{Guest}_image"};
+ die "$gho->{Guest} ?" unless $specimage;
+ my $limage= $specimage =~ m,^/, ? $specimage :
"$c{Images}/$specimage";
+ $gho->{Rimage}= "/root/$flight.$job.".basename($specimage);
+ target_putfile_root($ho, 1000, $limage,$gho->{Rimage},
''-p'');
+
+ my $postimage_hook= $xopts{PostImageHook};
+ $postimage_hook->() if $postimage_hook;
+
+ push @disks, "file:$gho->{Rimage},hdc:cdrom,r";
+ }
+ my $disks = join ",\t\t\n", map {
"''$_''" } @disks;
my $cfg = <<END;
kernel = ''hvmloader''
builder = ''hvm''
#
disk = [
- ''phy:$gho->{Lvdev},hda,w'',
- ''file:$gho->{Rimage},hdc:cdrom,r''
- ]
+ $disks
+ ]
#
usb=1
usbdevice=''tablet''
--
1.7.10.4
Ian Jackson
2013-Nov-25 17:43 UTC
[PATCH 02/13] ts-freebsd-install: add FreeBSD PVHVM installer
From: Roger Pau Monne <roger.pau@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
ts-freebsd-install | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 109 insertions(+)
create mode 100644 ts-freebsd-install
diff --git a/ts-freebsd-install b/ts-freebsd-install
new file mode 100644
index 0000000..4e32b6c
--- /dev/null
+++ b/ts-freebsd-install
@@ -0,0 +1,109 @@
+#!/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::TestSupport;
+
+tsreadconfig();
+
+our ($whhost,$gn) = @ARGV;
+$whhost ||= 'host';
+$gn ||= 'freebsd';
+
+our $ho= selecthost($whhost);
+
+our $ram_mb= 1024;
+our $disk_mb= 20480;
+
+our $guesthost= "$gn.guest.osstest";
+our $gho;
+
+our $xl= toolstack()->{Command};
+
+our $freebsd_qcow2= '/root/freebsd.qcow2';
+our $freebsd_raw= '/root/freebsd.raw';
+
+our $freebsd_mount= '/root/freebsd_root';
+
+our $freebsd_version= "10.0-BETA3";
+
+# Folder where the FreeBSD VM images are stored inside of the host
+#
+# The naming convention of the stored images is:
+# FreeBSD-$freebsd_version-$arch.qcow2.xz
+# ie: FreeBSD-10.0-BETA3-amd64.qcow2.xz
+our $freebsd_vm_repo= '/var/images';
+
+sub prep () {
+ my $authkeys= authorized_keys();
+
+ target_install_packages_norec($ho, qw(lvm2 wget qemu-utils xz-utils
kpartx));
+
+ $gho= prepareguest($ho, $gn, $guesthost, 22,
+ $disk_mb + 1,
+ 100);
+
+ more_prepareguest_hvm($ho, $gho, $ram_mb, $disk_mb, NoCdromImage => 1);
+
+ my $freebsd_img = $freebsd_vm_repo . "/" . "FreeBSD-" .
$freebsd_version . "-";
+ # Use amd64 as default arch
+ $freebsd_img .= defined($r{"$gho->{Guest}_arch"}) ?
$r{"$gho->{Guest}_arch"} : 'amd64';
+ $freebsd_img .= ".qcow2.xz";
+
+ target_cmd_root($ho, "umount $gho->{Lvdev} ||:");
+
+ target_cmd_root($ho, <<END, 900);
+ xz -dkc $freebsd_img > $freebsd_qcow2
+ qemu-img convert -f qcow2 $freebsd_qcow2 -O raw $freebsd_raw
+ rm -rf $freebsd_qcow2
+ dd if=$freebsd_raw of=$gho->{Lvdev} bs=1M
+ rm -rf $freebsd_raw
+
+ kpartx -a $gho->{Lvdev}
+ mkdir -p $freebsd_mount
+ mount -t ufs -o ufstype=ufs2,rw
/dev/mapper/$gho->{Vg}-$gho->{Name}--disk3 $freebsd_mount
+
+ mkdir -p $freebsd_mount/root/.ssh
+ cat <<'ENDKEYS'
>$freebsd_mount/root/.ssh/authorized_keys
+$authkeys
+ENDKEYS
+
+ echo 'sshd_enable="YES"' >>
$freebsd_mount/etc/rc.conf
+ echo 'ifconfig_xn0="DHCP"' >>
$freebsd_mount/etc/rc.conf
+ echo 'PermitRootLogin yes' >>
$freebsd_mount/etc/ssh/sshd_config
+
+ sed -i '/^ttyu0/s/off/on/' $freebsd_mount/etc/ttys
+
+ cp $freebsd_mount/usr/share/zoneinfo/Europe/London
$freebsd_mount/etc/localtime
+
+ cat <<'ENDKEYS' >$freebsd_mount/boot/loader.conf
+boot_multicons="YES"
+boot_serial="YES"
+comconsole_speed="115200"
+console="comconsole,vidconsole"
+ENDKEYS
+
+ umount $freebsd_mount
+ rm -rf $freebsd_mount
+ kpartx -d $gho->{Lvdev}
+END
+
+}
+
+prep();
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
No functional change.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
ts-freebsd-install | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/ts-freebsd-install b/ts-freebsd-install
index 4e32b6c..cc77be4 100644
--- a/ts-freebsd-install
+++ b/ts-freebsd-install
@@ -39,7 +39,7 @@ our $xl= toolstack()->{Command};
our $freebsd_qcow2= ''/root/freebsd.qcow2'';
our $freebsd_raw= ''/root/freebsd.raw'';
-our $freebsd_mount= ''/root/freebsd_root'';
+our $mnt= ''/root/freebsd_root'';
our $freebsd_version= "10.0-BETA3";
@@ -53,7 +53,8 @@ our $freebsd_vm_repo= ''/var/images'';
sub prep () {
my $authkeys= authorized_keys();
- target_install_packages_norec($ho, qw(lvm2 wget qemu-utils xz-utils
kpartx));
+ target_install_packages_norec($ho, qw(lvm2 wget qemu-utils
+ xz-utils kpartx));
$gho= prepareguest($ho, $gn, $guesthost, 22,
$disk_mb + 1,
@@ -61,11 +62,14 @@ sub prep () {
more_prepareguest_hvm($ho, $gho, $ram_mb, $disk_mb, NoCdromImage => 1);
- my $freebsd_img = $freebsd_vm_repo . "/" . "FreeBSD-" .
$freebsd_version . "-";
+ my $freebsd_img = "$freebsd_vm_repo/FreeBSD-$freebsd_version-";
# Use amd64 as default arch
- $freebsd_img .= defined($r{"$gho->{Guest}_arch"}) ?
$r{"$gho->{Guest}_arch"} : ''amd64'';
+ $freebsd_img .= defined($r{"$gho->{Guest}_arch"})
+ ? $r{"$gho->{Guest}_arch"} : ''amd64'';
$freebsd_img .= ".qcow2.xz";
+ my $rootpartition_dev =
"/dev/mapper/$gho->{Vg}-$gho->{Name}--disk3";
+
target_cmd_root($ho, "umount $gho->{Lvdev} ||:");
target_cmd_root($ho, <<END, 900);
@@ -76,31 +80,31 @@ sub prep () {
rm -rf $freebsd_raw
kpartx -a $gho->{Lvdev}
- mkdir -p $freebsd_mount
- mount -t ufs -o ufstype=ufs2,rw
/dev/mapper/$gho->{Vg}-$gho->{Name}--disk3 $freebsd_mount
+ mkdir -p $mnt
+ mount -t ufs -o ufstype=ufs2,rw $rootpartition_dev $mnt
- mkdir -p $freebsd_mount/root/.ssh
- cat <<''ENDKEYS''
>$freebsd_mount/root/.ssh/authorized_keys
+ mkdir -p $mnt/root/.ssh
+ cat <<''ENDKEYS''
>$mnt/root/.ssh/authorized_keys
$authkeys
ENDKEYS
- echo ''sshd_enable="YES"'' >>
$freebsd_mount/etc/rc.conf
- echo ''ifconfig_xn0="DHCP"'' >>
$freebsd_mount/etc/rc.conf
- echo ''PermitRootLogin yes'' >>
$freebsd_mount/etc/ssh/sshd_config
+ echo ''sshd_enable="YES"'' >>
$mnt/etc/rc.conf
+ echo ''ifconfig_xn0="DHCP"'' >>
$mnt/etc/rc.conf
+ echo ''PermitRootLogin yes'' >>
$mnt/etc/ssh/sshd_config
- sed -i ''/^ttyu0/s/off/on/''
$freebsd_mount/etc/ttys
+ sed -i ''/^ttyu0/s/off/on/'' $mnt/etc/ttys
- cp $freebsd_mount/usr/share/zoneinfo/Europe/London
$freebsd_mount/etc/localtime
+ cp $mnt/usr/share/zoneinfo/Europe/London $mnt/etc/localtime
- cat <<''ENDKEYS''
>$freebsd_mount/boot/loader.conf
+ cat <<''ENDKEYS'' >$mnt/boot/loader.conf
boot_multicons="YES"
boot_serial="YES"
comconsole_speed="115200"
console="comconsole,vidconsole"
ENDKEYS
- umount $freebsd_mount
- rm -rf $freebsd_mount
+ umount $mnt
+ rm -rf $mnt
kpartx -d $gho->{Lvdev}
END
--
1.7.10.4
Ian Jackson
2013-Nov-25 17:43 UTC
[PATCH 04/13] ts-freebsd-install: honour <guest>_image runvar
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
ts-freebsd-install | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/ts-freebsd-install b/ts-freebsd-install
index cc77be4..d08b64e 100644
--- a/ts-freebsd-install
+++ b/ts-freebsd-install
@@ -48,6 +48,9 @@ our $freebsd_version= "10.0-BETA3";
# The naming convention of the stored images is:
# FreeBSD-$freebsd_version-$arch.qcow2.xz
# ie: FreeBSD-10.0-BETA3-amd64.qcow2.xz
+#
+# Used only if the runvar <guest>_image is not set.
+#
our $freebsd_vm_repo= ''/var/images'';
sub prep () {
@@ -62,11 +65,14 @@ sub prep () {
more_prepareguest_hvm($ho, $gho, $ram_mb, $disk_mb, NoCdromImage => 1);
- my $freebsd_img = "$freebsd_vm_repo/FreeBSD-$freebsd_version-";
- # Use amd64 as default arch
- $freebsd_img .= defined($r{"$gho->{Guest}_arch"})
- ? $r{"$gho->{Guest}_arch"} : ''amd64'';
- $freebsd_img .= ".qcow2.xz";
+ my $freebsd_img = $r{"$gho->{Guest}_image"};
+ if (!defined $freebsd_img) {
+ $freebsd_img = "$freebsd_vm_repo/FreeBSD-$freebsd_version-";
+ # Use amd64 as default arch
+ $freebsd_img .= defined($r{"$gho->{Guest}_arch"})
+ ? $r{"$gho->{Guest}_arch"} : ''amd64'';
+ $freebsd_img .= ".qcow2.xz";
+ }
my $rootpartition_dev =
"/dev/mapper/$gho->{Vg}-$gho->{Name}--disk3";
--
1.7.10.4
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
make-flight | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/make-flight b/make-flight
index a5d21af..65e3abc 100755
--- a/make-flight
+++ b/make-flight
@@ -347,6 +347,19 @@ for xenarch in ${TEST_ARCHES- i386 amd64 armhf } ; do
debian_arch=$dom0arch \
all_hostflags=$most_hostflags
+ if [ $xenarch = amd64 -a $dom0arch = i386 -a "$kern" =
"" ]; then
+
+ for freebsdarch in amd64 i386; do
+
+ job_create_test
test-$xenarch$kern-$dom0arch$qemuu_suffix-freebsd10-$freebsdarch \
+ test-freebsd xl \
+ freebsd_arch=$freebsdarch \
+
freebsd_image=${FREEBSD_IMAGE_PREFIX-FreeBSD-10.0-BETA3-}$freebsdarch${FREEBSD_IMAGE_SUFFIX--20131103-r257580.qcow2.xz}
+
+ done
+
+ fi
+
for qemuu_suffix in '''' -qemut -qemuu; do
case "$qemuu_suffix" in
'''')
--
1.7.10.4
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> --- 0 files changed mode change 100644 => 100755 ts-freebsd-install diff --git a/ts-freebsd-install b/ts-freebsd-install old mode 100644 new mode 100755 -- 1.7.10.4
Ian Jackson
2013-Nov-25 17:43 UTC
[PATCH 07/13] ts-*: make all target_cmd[_root] set -e (or +e)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
ts-redhat-install | 3 ++-
ts-xen-install | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/ts-redhat-install b/ts-redhat-install
index 3aa8864..a945033 100755
--- a/ts-redhat-install
+++ b/ts-redhat-install
@@ -131,6 +131,7 @@ sub prep () {
-boot-info-table);
target_cmd_root($ho, <<END, 60);
+ set -e
mkdir -p $emptydir
genisoimage -o $emptyiso @isogen_base $emptydir/.
END
@@ -139,7 +140,7 @@ END
OnReboot => ''preserve'',
PostImageHook => sub {
target_cmd_root($ho, <<END, $isotimeout);
- set -x
+ set -ex
umount /mnt ||:
rm -rf $newiso
mount -o loop -r $gho->{Rimage} /mnt
diff --git a/ts-xen-install b/ts-xen-install
index 70b9e22..fc96516 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -256,6 +256,7 @@ END
sub forbidden () {
target_cmd_root($ho, <<''END'');
+ set +e
outcome=true
for f in /usr/local/etc/* /usr/local/var/*; do
if test -e "$f"; then
--
1.7.10.4
Ian Jackson
2013-Nov-25 17:43 UTC
[PATCH 08/13] ts-freebsd-install: say set -ex at appropriate point
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
ts-freebsd-install | 1 +
1 file changed, 1 insertion(+)
diff --git a/ts-freebsd-install b/ts-freebsd-install
index d08b64e..7884651 100755
--- a/ts-freebsd-install
+++ b/ts-freebsd-install
@@ -79,6 +79,7 @@ sub prep () {
target_cmd_root($ho, "umount $gho->{Lvdev} ||:");
target_cmd_root($ho, <<END, 900);
+ set -ex
xz -dkc $freebsd_img > $freebsd_qcow2
qemu-img convert -f qcow2 $freebsd_qcow2 -O raw $freebsd_raw
rm -rf $freebsd_qcow2
--
1.7.10.4
Ian Jackson
2013-Nov-25 17:43 UTC
[PATCH 09/13] ts-freebsd-install: split big setup command into three chunks
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
ts-freebsd-install | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ts-freebsd-install b/ts-freebsd-install
index 7884651..a2c8a4d 100755
--- a/ts-freebsd-install
+++ b/ts-freebsd-install
@@ -89,12 +89,17 @@ sub prep () {
kpartx -a $gho->{Lvdev}
mkdir -p $mnt
mount -t ufs -o ufstype=ufs2,rw $rootpartition_dev $mnt
+END
+ target_cmd_root($ho, <<END, 900);
mkdir -p $mnt/root/.ssh
cat <<''ENDKEYS''
>$mnt/root/.ssh/authorized_keys
$authkeys
ENDKEYS
+END
+
+ target_cmd_root($ho, <<END, 900);
echo ''sshd_enable="YES"'' >>
$mnt/etc/rc.conf
echo ''ifconfig_xn0="DHCP"'' >>
$mnt/etc/rc.conf
echo ''PermitRootLogin yes'' >>
$mnt/etc/ssh/sshd_config
--
1.7.10.4
Ian Jackson
2013-Nov-25 17:43 UTC
[PATCH 10/13] TestSupport: break out target_put_guest_image
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
Osstest/TestSupport.pm | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 0381fd8..314c727 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -54,6 +54,7 @@ BEGIN {
target_putfile target_putfile_root
target_putfilecontents_stash
target_putfilecontents_root_stash
+ target_put_guest_image
target_editfile_root target_file_exists
target_install_packages target_install_packages_norec
target_extract_jobdistpath
@@ -1362,6 +1363,16 @@ END
return $cfgpath;
}
+sub target_put_guest_image ($$$) {
+ my ($ho, $gho, $default) = @_;
+ my $specimage = $r{"$gho->{Guest}_image"};
+ $specimage = $default if !defined $specimage;
+ die "$gho->{Guest} ?" unless $specimage;
+ my $limage= $specimage =~ m,^/, ? $specimage :
"$c{Images}/$specimage";
+ $gho->{Rimage}= "/root/$flight.$job.".basename($specimage);
+ target_putfile_root($ho, 1000, $limage,$gho->{Rimage},
''-p'');
+}
+
sub more_prepareguest_hvm ($$$$;@) {
my ($ho, $gho, $ram_mb, $disk_mb, %xopts) = @_;
@@ -1372,11 +1383,7 @@ sub more_prepareguest_hvm ($$$$;@) {
my @disks = "phy:$gho->{Lvdev},hda,w";
if (!$xopts{NoCdromImage}) {
- my $specimage= $r{"$gho->{Guest}_image"};
- die "$gho->{Guest} ?" unless $specimage;
- my $limage= $specimage =~ m,^/, ? $specimage :
"$c{Images}/$specimage";
- $gho->{Rimage}= "/root/$flight.$job.".basename($specimage);
- target_putfile_root($ho, 1000, $limage,$gho->{Rimage},
''-p'');
+ target_transfer_guest_image($ho, $gho, undef);
my $postimage_hook= $xopts{PostImageHook};
$postimage_hook->() if $postimage_hook;
--
1.7.10.4
Ian Jackson
2013-Nov-25 17:44 UTC
[PATCH 11/13] ts-freebsd-install: sort out image handling by using target_put_guest_image, and use job-specific local filenames
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
ts-freebsd-install | 34 ++++++++++++++++------------------
1 file changed, 16 insertions(+), 18 deletions(-)
diff --git a/ts-freebsd-install b/ts-freebsd-install
index a2c8a4d..5b7b996 100755
--- a/ts-freebsd-install
+++ b/ts-freebsd-install
@@ -36,9 +36,6 @@ our $gho;
our $xl= toolstack()->{Command};
-our $freebsd_qcow2= ''/root/freebsd.qcow2'';
-our $freebsd_raw= ''/root/freebsd.raw'';
-
our $mnt= ''/root/freebsd_root'';
our $freebsd_version= "10.0-BETA3";
@@ -56,7 +53,7 @@ our $freebsd_vm_repo= ''/var/images'';
sub prep () {
my $authkeys= authorized_keys();
- target_install_packages_norec($ho, qw(lvm2 wget qemu-utils
+ target_install_packages_norec($ho, qw(rsync lvm2 qemu-utils
xz-utils kpartx));
$gho= prepareguest($ho, $gn, $guesthost, 22,
@@ -65,26 +62,27 @@ sub prep () {
more_prepareguest_hvm($ho, $gho, $ram_mb, $disk_mb, NoCdromImage => 1);
- my $freebsd_img = $r{"$gho->{Guest}_image"};
- if (!defined $freebsd_img) {
- $freebsd_img = "$freebsd_vm_repo/FreeBSD-$freebsd_version-";
- # Use amd64 as default arch
- $freebsd_img .= defined($r{"$gho->{Guest}_arch"})
- ? $r{"$gho->{Guest}_arch"} : ''amd64'';
- $freebsd_img .= ".qcow2.xz";
- }
-
+ target_put_guest_image($ho, $gho,
+ "$freebsd_vm_repo/FreeBSD-$freebsd_version-".
+ (defined($r{"$gho->{Guest}_arch"})
+ # Use amd64 as default arch
+ ? $r{"$gho->{Guest}_arch"} : ''amd64'').
+ ".qcow2.xz");
+
my $rootpartition_dev =
"/dev/mapper/$gho->{Vg}-$gho->{Name}--disk3";
target_cmd_root($ho, "umount $gho->{Lvdev} ||:");
+ my $rimage = $gho->{Rimage};
+ my $rimagebase = $rimage; $rimagebase =~ s/\.\w+$//;
+
target_cmd_root($ho, <<END, 900);
set -ex
- xz -dkc $freebsd_img > $freebsd_qcow2
- qemu-img convert -f qcow2 $freebsd_qcow2 -O raw $freebsd_raw
- rm -rf $freebsd_qcow2
- dd if=$freebsd_raw of=$gho->{Lvdev} bs=1M
- rm -rf $freebsd_raw
+ xz -dkc $rimage > $rimagebase.qcow2
+ qemu-img convert -f qcow2 $rimagebase.qcow2 -O raw $rimagebase.raw
+ rm $rimagebase.qcow2
+ dd if=$rimagebase.raw of=$gho->{Lvdev} bs=1M
+ rm $rimagebase.raw
kpartx -a $gho->{Lvdev}
mkdir -p $mnt
--
1.7.10.4
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
sg-run-job | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sg-run-job b/sg-run-job
index 0124223..f91da85 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -246,6 +246,12 @@ proc run-job/test-debian {} {
test-guest debian
}
+proc need-hosts/test-freebsd {} { return host }
+proc run-job/test-freebsd {} {
+ run-ts . = ts-freebsd-install
+ test-guest freebsd
+}
+
proc need-hosts/test-win {} { return host }
proc run-job/test-win {} {
run-ts . = ts-windows-install
--
1.7.10.4
Ian Jackson
2013-Nov-25 17:44 UTC
[PATCH 13/13] ts-freebsd-install: remove unused $xl setting
From: Roger Pau Monne <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
ts-freebsd-install | 2 --
1 file changed, 2 deletions(-)
diff --git a/ts-freebsd-install b/ts-freebsd-install
index 5b7b996..470fb83 100755
--- a/ts-freebsd-install
+++ b/ts-freebsd-install
@@ -34,8 +34,6 @@ our $disk_mb= 20480;
our $guesthost= "$gn.guest.osstest";
our $gho;
-our $xl= toolstack()->{Command};
-
our $mnt= ''/root/freebsd_root'';
our $freebsd_version= "10.0-BETA3";
--
1.7.10.4
On Mon, 2013-11-25 at 17:43 +0000, Ian Jackson wrote:> This is Roger''s FreeBSD patches with my fixes as new patches on the > end. > > 01/13 more_prepareguest_hvm: honour xopt NoCdromImage > 02/13 ts-freebsd-install: add FreeBSD PVHVM installer > 03/13 ts-freebsd-install: Style fixes > 04/13 ts-freebsd-install: honour <guest>_image runvar > 05/13 make-flight: freebsd jobs > 06/13 ts-freebsd-install: fix mode to be +x > 07/13 ts-*: make all target_cmd[_root] set -e (or +e) > 08/13 ts-freebsd-install: say set -ex at appropriate point > 09/13 ts-freebsd-install: split big setup command into three > 10/13 TestSupport: break out target_put_guest_image > 11/13 ts-freebsd-install: sort out image handling by using > 12/13 sg-run-job: prototype test-freebsd recipe > 13/13 ts-freebsd-install: remove unused $xl setting > > I''m posting this for form''s sake. I am about to send this into the > osstest push gate.I take it therefore that you aren''t expecting too much review? Ian.
On 26.11.13 11:48, Ian Campbell wrote:> On Mon, 2013-11-25 at 17:43 +0000, Ian Jackson wrote: >> This is Roger''s FreeBSD patches with my fixes as new patches on the >> end. >> >> 01/13 more_prepareguest_hvm: honour xopt NoCdromImage >> 02/13 ts-freebsd-install: add FreeBSD PVHVM installer >> 03/13 ts-freebsd-install: Style fixes >> 04/13 ts-freebsd-install: honour <guest>_image runvar >> 05/13 make-flight: freebsd jobs >> 06/13 ts-freebsd-install: fix mode to be +x >> 07/13 ts-*: make all target_cmd[_root] set -e (or +e) >> 08/13 ts-freebsd-install: say set -ex at appropriate point >> 09/13 ts-freebsd-install: split big setup command into three >> 10/13 TestSupport: break out target_put_guest_image >> 11/13 ts-freebsd-install: sort out image handling by using >> 12/13 sg-run-job: prototype test-freebsd recipe >> 13/13 ts-freebsd-install: remove unused $xl setting >> >> I''m posting this for form''s sake. I am about to send this into the >> osstest push gate. > > I take it therefore that you aren''t expecting too much review?I suppose you need to cross-post to the corresponding freebsd lists to get preview. Christoph
On 26/11/13 11:57, Egger, Christoph wrote:> On 26.11.13 11:48, Ian Campbell wrote: >> On Mon, 2013-11-25 at 17:43 +0000, Ian Jackson wrote: >>> This is Roger''s FreeBSD patches with my fixes as new patches on the >>> end. >>> >>> 01/13 more_prepareguest_hvm: honour xopt NoCdromImage >>> 02/13 ts-freebsd-install: add FreeBSD PVHVM installer >>> 03/13 ts-freebsd-install: Style fixes >>> 04/13 ts-freebsd-install: honour <guest>_image runvar >>> 05/13 make-flight: freebsd jobs >>> 06/13 ts-freebsd-install: fix mode to be +x >>> 07/13 ts-*: make all target_cmd[_root] set -e (or +e) >>> 08/13 ts-freebsd-install: say set -ex at appropriate point >>> 09/13 ts-freebsd-install: split big setup command into three >>> 10/13 TestSupport: break out target_put_guest_image >>> 11/13 ts-freebsd-install: sort out image handling by using >>> 12/13 sg-run-job: prototype test-freebsd recipe >>> 13/13 ts-freebsd-install: remove unused $xl setting >>> >>> I''m posting this for form''s sake. I am about to send this into the >>> osstest push gate. >> >> I take it therefore that you aren''t expecting too much review? > > I suppose you need to cross-post to the corresponding freebsd lists > to get preview.Most of the changes are related to OSS-Test itself, apart from that we are just picking a pre-generated public VM image from ftp.FreeBSD.org.
Ian Campbell writes ("Re: [OSSTEST PATCH 00/13]
FreeBSD"):> On Mon, 2013-11-25 at 17:43 +0000, Ian Jackson wrote:
> > This is Roger''s FreeBSD patches with my fixes as new patches
on the
> > end.
> >
> > 01/13 more_prepareguest_hvm: honour xopt NoCdromImage
> > 02/13 ts-freebsd-install: add FreeBSD PVHVM installer
> > 03/13 ts-freebsd-install: Style fixes
> > 04/13 ts-freebsd-install: honour <guest>_image runvar
> > 05/13 make-flight: freebsd jobs
> > 06/13 ts-freebsd-install: fix mode to be +x
> > 07/13 ts-*: make all target_cmd[_root] set -e (or +e)
> > 08/13 ts-freebsd-install: say set -ex at appropriate point
> > 09/13 ts-freebsd-install: split big setup command into three
> > 10/13 TestSupport: break out target_put_guest_image
> > 11/13 ts-freebsd-install: sort out image handling by using
> > 12/13 sg-run-job: prototype test-freebsd recipe
> > 13/13 ts-freebsd-install: remove unused $xl setting
> >
> > I''m posting this for form''s sake. I am about to
send this into the
> > osstest push gate.
>
> I take it therefore that you aren''t expecting too much review?
Not unless you feel like it :-). No need, I think. It''s pretty
uncontroversial stuff.
As it happens I renamed a function several times and missed one
instance one one of the renames which is why the push gate emailed us
about regressions. This is now fixed.
Ian.