xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: ian.jackson@eu.citrix.com, Wei Liu <wei.liu2@citrix.com>
Subject: [PATCH OSSTEST v2 2/2] Make guest cdrom empty after installation completes
Date: Wed, 6 Apr 2016 17:20:20 +0100	[thread overview]
Message-ID: <1459959620-12564-3-git-send-email-wei.liu2@citrix.com> (raw)
In-Reply-To: <1459959620-12564-1-git-send-email-wei.liu2@citrix.com>

Previously an iso image that contains nothing was inserted to cdrom
after guest installation had finished.

With this patch we make cdrom really empty.  This helps catch bug that
prevents booting hvm guest with empty cdrom drive.

Remove empty iso image generation in ts-{debian-hvm,redhat}-install as
well.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 6 +++---
 ts-debian-hvm-install  | 7 +------
 ts-redhat-install      | 7 +------
 3 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 4eb50fa..791b83d 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -2509,11 +2509,11 @@ sub iso_copy_content_from_image($$) {
 END
 }
 
-sub guest_editconfig_midinstall ($$) {
-    my ($gho,$emptyiso) = @_;
+sub guest_editconfig_midinstall ($) {
+    my ($gho) = @_;
     guest_editconfig($gho->{Host}, $gho, sub {
         if (m/^\s*disk\s*\=/ .. /\]/) {
-            s/\Q$gho->{Rimage}\E/$emptyiso/;
+            s/\Q$gho->{Rimage}\E//;
         }
         s/^on_reboot.*/on_reboot='restart'/;
     });
diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index f43ea3e..4650e26 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -181,8 +181,6 @@ sub prepare_initrd ($$$) {
 END
 }
 
-our $emptyiso= "/root/$flight.$job.$gn-empty.iso";
-
 sub iso_path ($$) {
     my ($which, $deftail) = @_;
     my $v = guest_var($gho, "iso_$which", "/install.amd/$deftail");
@@ -205,7 +203,6 @@ sub prep () {
 
     my $base = "/root/$flight.$job.$gn-";
     my $newiso= $base . "newiso";
-    my $emptydir= $base . "empty-dir";
     my $initrddir= $base . "initrd-dir";
     my $preseed_file_path = $base . "preseed";
 
@@ -213,8 +210,6 @@ sub prep () {
                           -no-emul-boot
                           -r);
 
-    iso_create_empty($ho, $emptyiso, $emptydir);
-
     my $extra_config = '';
     $extra_config .= "nestedhvm=1\n"
 	if guest_var_boolean($gho,"enable_nestedhvm");
@@ -283,7 +278,7 @@ if ($stage<2) {
     guest_destroy($gho);
 }
 
-guest_editconfig_midinstall($gho,$emptyiso);
+guest_editconfig_midinstall($gho);
 guest_create($gho);
 guest_await_dhcp_tcp($gho,300);
 guest_check_up($gho);
diff --git a/ts-redhat-install b/ts-redhat-install
index 64012db..0de5cd4 100755
--- a/ts-redhat-install
+++ b/ts-redhat-install
@@ -106,8 +106,6 @@ ENDKEYS
 END
 }
 
-our $emptyiso= "/root/$flight.$job.$gn-empty.iso";
-
 sub prep () {
     target_install_packages_norec($ho, qw(lvm2 rsync genisoimage));
 
@@ -118,9 +116,6 @@ sub prep () {
                        100);
 
     my $newiso= "/root/$flight.$job.$gn-newiso";
-    my $emptydir= "/root/$flight.$job.$gn-empty-dir";
-
-    iso_create_empty($ho, $emptyiso, $emptydir);
 
     my @isogen= iso_gen_flags_basic();
 
@@ -158,7 +153,7 @@ if ($stage<2) {
     guest_destroy($gho);
 }
 
-guest_editconfig_midinstall($gho,$emptyiso);
+guest_editconfig_midinstall($gho);
 guest_create($gho);
 guest_await_dhcp_tcp($gho,300);
 guest_check_up($gho);
-- 
2.1.4


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

  parent reply	other threads:[~2016-04-06 16:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06 16:20 [PATCH OSSTEST v2 0/2] Test booting hvm guest with empty cdrom drive Wei Liu
2016-04-06 16:20 ` [PATCH OSSTEST v2 1/2] TestSupport: rename guest_editconfig_nocd to _midinstall Wei Liu
2016-04-06 16:20 ` Wei Liu [this message]
2016-06-07 13:58 ` [PATCH OSSTEST v2 0/2] Test booting hvm guest with empty cdrom drive Ian Jackson
2016-06-07 16:29   ` Wei Liu
2016-06-08 18:01     ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1459959620-12564-3-git-send-email-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).