More Debian HVM testcases
PATCH v2 1/1 More Debian HVM testcases
ts-debain-hvm-install was written to work as general HVM testcase. It can be tuned to easily use another BIOS other than OVMF.
Modify make-flight and friends to create more Debian HVM 64bit testcases to run with SeaBIOS and ROMBIOS.
---
v2: always use "debianhvm" as guest name to simplify things.
--- make-flight | 31 ++++++++++++++++++++++++------- sg-run-job | 2 +- ts-debian-hvm-install | 6 ++++-- 3 files changed, 29 insertions(+), 10 deletions(-)
make-flight +24 -7
@@ -162,15 +162,32 @@ do_hvm_win7_x64_tests () { all_hostflags=$most_hostflags,hvm } -do_hvm_debian_ovmf_tests() { - if [ $xenarch != amd64 -o "x$qemuu_suffix" != "x-qemuu" ]; then +do_hvm_debian_tests() { + if [ $xenarch != amd64 ]; then return fi - job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-ovmf-amd64 \ - test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ - ovmf_image=debian-7.2.0-amd64-CD-1.iso \ - all_hostflags=$most_hostflags,hvm + if [ "x$qemuu_suffix" == "x-qemuu" ]; then + # QEMU upstream supports ovmf and seabios + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-ovmf-amd64 \ + test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \ + bios=ovmf \ + all_hostflags=$most_hostflags,hvm + + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-debianhvm-amd64 \ + test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \ + bios=seabios \ + all_hostflags=$most_hostflags,hvm + else + # QEMU traditional supports rombios + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-debianhvm-amd64 \ + test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \ + bios=rombios \ + all_hostflags=$most_hostflags,hvm + fi } do_hvm_rhel6_tests () {
@@ -285,7 +302,7 @@ test_matrix_do_one () { do_hvm_win7_x64_tests do_hvm_rhel6_tests - do_hvm_debian_ovmf_tests + do_hvm_debian_tests done # qemuu_suffix
sg-run-job +1 -1
@@ -268,7 +268,7 @@ proc run-job/test-rhelhvm {} { proc need-hosts/test-debianhvm {} { return host } proc run-job/test-debianhvm {} { run-ts . = ts-debian-hvm-install - test-guest ovmf + test-guest debianhvm } proc need-hosts/test-pair {} { return {src_host dst_host} }
ts-debian-hvm-install +4 -2
@@ -26,9 +26,11 @@ tsreadconfig(); our $stage=0; if (@ARGV && $ARGV[0] =~ m/^--stage(\d+)$/) { $stage=$1; shift @ARGV; } +defined($r{bios}) or die "Need to define which bios to use"; + our ($whhost,$gn) = @ARGV; $whhost ||= 'host'; -$gn ||= 'ovmf'; +$gn ||= 'debianhvm'; our $ho= selecthost($whhost);
@@ -152,7 +154,7 @@ sub prep () { more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb, OnReboot => 'preserve', - Bios => 'ovmf', + Bios => $r{bios}, PostImageHook => sub { my $cmds = iso_copy_content_from_image($gho, $newiso); $cmds .= prepare_initrd($initrddir,$newiso,$preseed_file_path);
Signature · 1 line
1.7.10.4
Wei Liu writes ("[OSSTEST PATCH V2] More Debian HVM testcases"):
Quoted 5 lines
ts-debain-hvm-install was written to work as general HVM testcase. It can be tuned to easily use another BIOS other than OVMF.
Modify make-flight and friends to create more Debian HVM 64bit testcases to run with SeaBIOS and ROMBIOS.
Thanks.
Quoted 11 lines
make-flight +11
-0+ if [ "x$qemuu_suffix" == "x-qemuu" ]; then + # QEMU upstream supports ovmf and seabios + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-ovmf-amd64 \ + test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \ + bios=ovmf \ + all_hostflags=$most_hostflags,hvm + + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-debianhvm-amd64 \ + test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \
make-flight do_hvm_win7_x64_tests () { · line 190
Quoted 10 lines
make-flight +10
-0+ bios=seabios \ + all_hostflags=$most_hostflags,hvm + else + # QEMU traditional supports rombios + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-debianhvm-amd64 \ + test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \ + bios=rombios \ + all_hostflags=$most_hostflags,hvm + fi
There's a lot of repetition here, which I think ought to be abstracted away.
But by and large this looks good. The changes to ts-debianhvm-install and sg-run-job seem fine to me.
Ian.
Quoted 31 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH V2] More Debian HVM testcases"):
Quoted 5 lines
ts-debain-hvm-install was written to work as general HVM testcase. It can be tuned to easily use another BIOS other than OVMF.
Modify make-flight and friends to create more Debian HVM 64bit testcases to run with SeaBIOS and ROMBIOS.
Thanks.
Quoted 11 lines
(quoted diff) +11
-0+ if [ "x$qemuu_suffix" == "x-qemuu" ]; then + # QEMU upstream supports ovmf and seabios + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-ovmf-amd64 \ + test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \ + bios=ovmf \ + all_hostflags=$most_hostflags,hvm + + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-debianhvm-amd64 \ + test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \Review
Quoted 10 lines
(quoted diff) +10
-0+ bios=seabios \ + all_hostflags=$most_hostflags,hvm + else + # QEMU traditional supports rombios + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-debianhvm-amd64 \ + test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \ + bios=rombios \ + all_hostflags=$most_hostflags,hvm + fi
Quoted 6 lines
There's a lot of repetition here, which I think ought to be abstracted away.
But by and large this looks good. The changes to ts-debianhvm-install and sg-run-job seem fine to me.
How about this one. Some common code is abstracted away to do_hvm_debian_test_one.
---8<---
Quoted 1 line
From
67ab811dade8f67096ef1083c1361481da372dacMon Sep 17 00:00:00 2001
From: Wei Liu <[email protected]>
Date: Wed, 23 Apr 2014 18:03:28 +0100
Subject: [OSSTEST PATCH V3] More Debian HVM testcases
ts-debain-hvm-install was written to work as general HVM testcase. It can be tuned to easily use another BIOS other than OVMF.
Modify make-flight and friends to create more Debian HVM 64bit testcases to run with SeaBIOS and ROMBIOS.
--- make-flight | 33 ++++++++++++++++++++++++++------- sg-run-job | 2 +- ts-debian-hvm-install | 6 ++++-- 3 files changed, 31 insertions(+), 10 deletions(-)
make-flight +26 -7
@@ -162,15 +162,34 @@ do_hvm_win7_x64_tests () { all_hostflags=$most_hostflags,hvm } -do_hvm_debian_ovmf_tests() { - if [ $xenarch != amd64 -o "x$qemuu_suffix" != "x-qemuu" ]; then +do_hvm_debian_test_one () { + testname=$1 + bios=$2 + job_create_test $testname test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \ + bios=$bios \ + all_hostflags=$most_hostflags,hvm +} + +do_hvm_debian_tests() { + if [ $xenarch != amd64 ]; then return fi - job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-ovmf-amd64 \ - test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ - ovmf_image=debian-7.2.0-amd64-CD-1.iso \ - all_hostflags=$most_hostflags,hvm + if [ "x$qemuu_suffix" == "x-qemuu" ]; then + # QEMU upstream supports ovmf and seabios + do_hvm_debian_test_one test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-ovmf-amd64 \ + ovmf + + do_hvm_debian_test_one test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-debianhvm-amd64 \ + seabios + fi + + if [ "x$qemuu_suffix" == "x-qemut" ]; then + # QEMU traditional supports rombios + do_hvm_debian_test_one test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-debianhvm-amd64 \ + rombios + fi } do_hvm_rhel6_tests () {
@@ -285,7 +304,7 @@ test_matrix_do_one () { do_hvm_win7_x64_tests do_hvm_rhel6_tests - do_hvm_debian_ovmf_tests + do_hvm_debian_tests done # qemuu_suffix
sg-run-job +1 -1
@@ -268,7 +268,7 @@ proc run-job/test-rhelhvm {} { proc need-hosts/test-debianhvm {} { return host } proc run-job/test-debianhvm {} { run-ts . = ts-debian-hvm-install - test-guest ovmf + test-guest debianhvm } proc need-hosts/test-pair {} { return {src_host dst_host} }
ts-debian-hvm-install +4 -2
@@ -26,9 +26,11 @@ tsreadconfig(); our $stage=0; if (@ARGV && $ARGV[0] =~ m/^--stage(\d+)$/) { $stage=$1; shift @ARGV; } +defined($r{bios}) or die "Need to define which bios to use"; + our ($whhost,$gn) = @ARGV; $whhost ||= 'host'; -$gn ||= 'ovmf'; +$gn ||= 'debianhvm'; our $ho= selecthost($whhost);
@@ -152,7 +154,7 @@ sub prep () { more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb, OnReboot => 'preserve', - Bios => 'ovmf', + Bios => $r{bios}, PostImageHook => sub { my $cmds = iso_copy_content_from_image($gho, $newiso); $cmds .= prepare_initrd($initrddir,$newiso,$preseed_file_path);
Signature · 1 line
1.7.10.4
Quoted 35 lines · Wei Liu
Quoted 34 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH V2] More Debian HVM testcases"):
Quoted 5 lines
ts-debain-hvm-install was written to work as general HVM testcase. It can be tuned to easily use another BIOS other than OVMF.
Modify make-flight and friends to create more Debian HVM 64bit testcases to run with SeaBIOS and ROMBIOS.
Thanks.
Quoted 11 lines
(quoted diff) +11
-0+ if [ "x$qemuu_suffix" == "x-qemuu" ]; then + # QEMU upstream supports ovmf and seabios + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-ovmf-amd64 \ + test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \ + bios=ovmf \ + all_hostflags=$most_hostflags,hvm + + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-debianhvm-amd64 \ + test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \Review
Quoted 10 lines
(quoted diff) +10
-0+ bios=seabios \ + all_hostflags=$most_hostflags,hvm + else + # QEMU traditional supports rombios + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-debianhvm-amd64 \ + test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \ + bios=rombios \ + all_hostflags=$most_hostflags,hvm + fiThere's a lot of repetition here, which I think ought to be abstracted away.
Quoted 7 lines
Quoted 3 lines
But by and large this looks good. The changes to ts-debianhvm-install and sg-run-job seem fine to me.
How about this one. Some common code is abstracted away to
do_hvm_debian_test_one.
Oops, sent the wrong version!
Please look at this one.
---8<---
Quoted 1 line
From
0d90066991bbd7621acb581a1f81b1ff4ddb54e3Mon Sep 17 00:00:00 2001
From: Wei Liu <[email protected]>
Date: Wed, 23 Apr 2014 18:03:28 +0100
Subject: [OSSTEST PATCH V3] More Debian HVM testcases
ts-debain-hvm-install was written to work as general HVM testcase. It can be tuned to easily use another BIOS other than OVMF.
Modify make-flight and friends to create more Debian HVM 64bit testcases to run with SeaBIOS and ROMBIOS.
--- make-flight | 30 +++++++++++++++++++++++------- sg-run-job | 2 +- ts-debian-hvm-install | 6 ++++-- 3 files changed, 28 insertions(+), 10 deletions(-)
make-flight +23 -7
@@ -162,15 +162,31 @@ do_hvm_win7_x64_tests () { all_hostflags=$most_hostflags,hvm } -do_hvm_debian_ovmf_tests() { - if [ $xenarch != amd64 -o "x$qemuu_suffix" != "x-qemuu" ]; then +do_hvm_debian_test_one () { + testname=$1 + bios=$2 + job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-$testname-amd64\ + test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ + debianhvm_image=debian-7.2.0-amd64-CD-1.iso \ + bios=$bios \ + all_hostflags=$most_hostflags,hvm +} + +do_hvm_debian_tests() { + if [ $xenarch != amd64 ]; then return fi - job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-ovmf-amd64 \ - test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \ - ovmf_image=debian-7.2.0-amd64-CD-1.iso \ - all_hostflags=$most_hostflags,hvm + # QEMU upstream supports ovmf and seabios + if [ "x$qemuu_suffix" == "x-qemuu" ]; then + do_hvm_debian_test_one ovmf ovmf + do_hvm_debian_test_one debianhvm seabios + fi + + # QEMU traditional supports rombios + if [ "x$qemuu_suffix" == "x-qemut" ]; then + do_hvm_debian_test_one debianhvm rombios + fi } do_hvm_rhel6_tests () {
@@ -285,7 +301,7 @@ test_matrix_do_one () { do_hvm_win7_x64_tests do_hvm_rhel6_tests - do_hvm_debian_ovmf_tests + do_hvm_debian_tests done # qemuu_suffix
sg-run-job +1 -1
@@ -268,7 +268,7 @@ proc run-job/test-rhelhvm {} { proc need-hosts/test-debianhvm {} { return host } proc run-job/test-debianhvm {} { run-ts . = ts-debian-hvm-install - test-guest ovmf + test-guest debianhvm } proc need-hosts/test-pair {} { return {src_host dst_host} }
ts-debian-hvm-install +4 -2
@@ -26,9 +26,11 @@ tsreadconfig(); our $stage=0; if (@ARGV && $ARGV[0] =~ m/^--stage(\d+)$/) { $stage=$1; shift @ARGV; } +defined($r{bios}) or die "Need to define which bios to use"; + our ($whhost,$gn) = @ARGV; $whhost ||= 'host'; -$gn ||= 'ovmf'; +$gn ||= 'debianhvm'; our $ho= selecthost($whhost);
@@ -152,7 +154,7 @@ sub prep () { more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb, OnReboot => 'preserve', - Bios => 'ovmf', + Bios => $r{bios}, PostImageHook => sub { my $cmds = iso_copy_content_from_image($gho, $newiso); $cmds .= prepare_initrd($initrddir,$newiso,$preseed_file_path);
Signature · 1 line
1.7.10.4
Wei Liu writes ("Re: [OSSTEST PATCH V2] More Debian HVM testcases"):
Quoted 2 lines
How about this one. Some common code is abstracted away to
do_hvm_debian_test_one.
This is much better. I'd be tempted to move the bulk of the job name into the new shell function, and pass in a "biossuffix" argument.
Thanks,
Ian.
Ian Jackson
Acked-byWei Liu writes ("Re: [OSSTEST PATCH V2] More Debian HVM testcases"):
Quoted 10 lines
Oops, sent the wrong version!
Please look at this one.
---8<---
Quoted 1 line
From
0d90066991bbd7621acb581a1f81b1ff4ddb54e3Mon Sep 17 00:00:00 2001From: Wei Liu <[email protected]>
Date: Wed, 23 Apr 2014 18:03:28 +0100
Subject: [OSSTEST PATCH V3] More Debian HVM testcases
Quoted 5 lines
ts-debain-hvm-install was written to work as general HVM testcase. It can be tuned to easily use another BIOS other than OVMF.
Modify make-flight and friends to create more Debian HVM 64bit testcases to run with SeaBIOS and ROMBIOS.
Looks good, thanks.
Ian.
Wei Liu writes ("Re: [OSSTEST PATCH V2] More Debian HVM testcases"):
Quoted 6 lines
From: Wei Liu <[email protected]>
Date: Wed, 23 Apr 2014 18:03:28 +0100
Subject: [OSSTEST PATCH V3] More Debian HVM testcasests-debain-hvm-install was written to work as general HVM testcase. It can be tuned to easily use another BIOS other than OVMF.
I acked this previously. I have queued it for push (and fixed the typo "debian" in the commit message).
Thanks,
Ian.