Support host-specific minimum Xen version
cover Support host-specific minimum Xen version
From: Ian Jackson <[email protected]>
I have run standalone-generate-dump-flight-runvars and eyeballed the (substantial) output, and it looks plausible.
Ian Jackson (3):
mfi-*: Reformat/refactor migrupgrade test generation slightly mfi-*: Provide hostflags_strip
mfi-*: Set appropriate PropMinVer:XenMin: hostflags, to honour XenMin
property
make-flight | 19 +++++++++++++++++-- mfi-common | 24 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-)
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 1/3 mfi-*: Reformat/refactor migrupgrade test generation slightly
* Introduce a variable "$hf" containing the hostflags.
* Properly indent the job_create_test call.
No functional change. This will make the substantive change easier to read.
--- make-flight | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
make-flight +4 -2
@@ -818,13 +818,15 @@ test_matrix_do_one () { if branch_wants_migrupgrade_tests ; then # x86 only for now if [ x$xenarch = xamd64 ] ; then - job_create_test test-$xenarch$kern-$dom0arch-migrupgrade test-pair-oneway \ + local hf=$most_hostflags,equiv-1 + job_create_test test-$xenarch$kern-$dom0arch-migrupgrade \ + test-pair-oneway \ xl $xenarch $dom0arch \ !host !host_hostflags \ src_host_buildjob=${bfi}build-$dom0arch-prev \ src_host_xenbuildjob=${bfi}build-$xenarch-prev \ $debian_runvars \ - all_hostflags=$most_hostflags,equiv-1 + all_hostflags="$hf" fi # TODO it would be nice to test i386->amd64 tools migration too (for # Xen >= 4.6), but currently $r{arch} is used in several places,
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 2/3 mfi-*: Provide hostflags_strip
In reply to Ian JacksonThis utility function saves us having to fragment the *_hostflags variables any further when adding special cases. A particular special case can strip out things it doesn't like.
No callers yet.
--- mfi-common | 10 ++++++++++ 1 file changed, 10 insertions(+)
mfi-common +10 -0
@@ -102,6 +102,16 @@ job_create_build () { ./cs-job-create $flight $job $recipe $global_runvars "$@" } +hostflags_strip () { + # prints $1, which is a list of hostflags, with hostflags + # matching the perl regexp $2 removed + perl -Mstrict -we ' + my @f = split /\,/, $ARGV[0]; + @f = grep { !m{$ARGV[1]} } @f; + print join ",", @f or die $!; + ' "$@" +} + set_hostos_runvars () { # caller should have done # local hostos_runvars
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 3/3 mfi-*: Set appropriate PropMinVer:XenMin: hostflags, to honour XenMin property
In reply to Ian Jackson* In test_matrix_iterate, where most_hostflags is set, include a PropMinVer:XenMin: hostflag. This is derived from $xenbranch. When $xenbranch is xen-unstable, don't add that hostflag.
* But this is wrong for the migrate upgrade tests, which use both this and the previous version of Xen. It is sufficient to check the previous version, so we strip out the existing PropMinVer if there is one. We (ab)use select_prevxenbranch to calculate the old Xen branch name (version).
The motivation right now for this is that Xen 4.10 and earlier do not boot xen.gz on UEFI. In earlier versions, one has to chainload xen.efi. We don't support that in osstest right now on x86 (and it probably isn't worth fixing that logic).
--- make-flight | 13 +++++++++++++ mfi-common | 14 ++++++++++++++ 2 files changed, 27 insertions(+)
make-flight +13 -0
@@ -819,6 +819,19 @@ test_matrix_do_one () { # x86 only for now if [ x$xenarch = xamd64 ] ; then local hf=$most_hostflags,equiv-1 + + # $most_hostflags will contain a wrong PropMinVer:XenMin:... + local propminver_xenmin + if [ "x$VERSION_PREVXEN" != x ]; then + # VERSION_PREVXEN is "4.8" or "xen-4.8-testing" or "4.8-testing" + set_propminver_xenmin "$VERSION_PREVXEN" + else + local prevxenbranch + select_prevxenbranch + set_propminver_xenmin "$prevxenbranch" + fi + hf="$(hostflags_strip "$hf" '^PropMinVer:XenMin:'),$propminver_xenmin" + job_create_test test-$xenarch$kern-$dom0arch-migrupgrade \ test-pair-oneway \ xl $xenarch $dom0arch \
mfi-common +14 -0
@@ -123,6 +123,13 @@ set_hostos_runvars () { esac } +set_propminver_xenmin () { + propminver_xenmin="$1" + propminver_xenmin="${propminver_xenmin#xen-}" + propminver_xenmin="${propminver_xenmin%-testing}" + propminver_xenmin="PropMinVer:XenMin:$propminver_xenmin" +} + set_freebsd_runvars () { # Caller should have done if required: # local freebsd_runvars
@@ -566,6 +573,13 @@ test_matrix_iterate () { if [ "x$min_linux_hostflag" != "x" ] ; then most_hostflags="$most_hostflags,$min_linux_hostflag" fi + case "$xenbranch" in + xen-[0-9]*-testing) + set_propminver_xenmin "$xenbranch" + most_hostflags="$most_hostflags,$propminver_xenmin" + ;; + # other xenbranch values, eg xen-unstable, get no restriction + esac most_runvars=" arch=$dom0arch \
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [OSSTEST PATCH 3/3] mfi-*: Set appropriate PropMinVer:XenMin: hostflags, to honour XenMin property
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 06.06.18 at 13:04, <[email protected]> wrote:
The motivation right now for this is that Xen 4.10 and earlier do not boot xen.gz on UEFI. In earlier versions, one has to chainload xen.efi. We don't support that in osstest right now on x86 (and it probably isn't worth fixing that logic).
This is 4.8 here; the actual code change has it that way. 4.10 was iirc mentioned by Julien as potentially needing special casing on one of the ARM hosts, once commissioned.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [OSSTEST PATCH 3/3] mfi-*: Set appropriate PropMinVer:XenMin: hostflags, to honour XenMin property
In reply to Ian Jacksonmfi-common test_matrix_iterate () { · line 577
Quoted 6 lines · Ian Jackson
mfi-common +2
-0@@ -566,6 +573,13 @@ test_matrix_iterate () { if [ "x$min_linux_hostflag" != "x" ] ; then most_hostflags="$most_hostflags,$min_linux_hostflag" fi + case "$xenbranch" in + xen-[0-9]*-testing)
I don't think that's going to work, xenbranch should contain string like "xen-4.3-testing". You want:
xen-[0-9.]*-testing)
Signature · 6 lines
Anthony PERARD _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [OSSTEST PATCH 3/3] mfi-*: Set appropriate PropMinVer:XenMin: hostflags, to honour XenMin property
Anthony PERARD writes ("Re: [Xen-devel] [OSSTEST PATCH 3/3] mfi-*: Set appropriate PropMinVer:XenMin: hostflags, to honour XenMin property"):
Quoted 11 lines · Ian Jackson
mfi-common test_matrix_iterate () { · line 577
Quoted 6 lines
mfi-common +2
-0@@ -566,6 +573,13 @@ test_matrix_iterate () { if [ "x$min_linux_hostflag" != "x" ] ; then most_hostflags="$most_hostflags,$min_linux_hostflag" fi + case "$xenbranch" in + xen-[0-9]*-testing)I don't think that's going to work, xenbranch should contain string like "xen-4.3-testing". You want:
Quoted 1 line
xen-[0-9.]*-testing)
Thanks for the review.
However, it does work :-). These patterns are glob patterns, so *' matches zero or more of any character. This pattern is just here to avoid turning xen-unstable' into an attempt to set a minimum xen version' of unstable'.
Regards,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel