[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 04/26] rumprun: Rename all `rumpuserxen' to `rumprun'
The names have changed upstream. Since upstream is no longer compatible and these tests have been failing since then, we are going to treat this as an entirely new test series. In this patch we rename everything mechanically. More interesting changes will come later. git-mv -f ts-rumpuserxen-build ts-rumprun-build git-mv -f ts-rumpuserxen-demo-setup ts-rumprun-demo-setup git-mv -f ts-rumpuserxen-demo-xenstorels ts-rumprun-demo-xenstorels git-ls-files | xargs perl -i~ -pe 's/rumpuserxen/rumprun/g' git-ls-files | xargs perl -i~ -pe 's/(_|\b)rumpuserxen(_|\b)/$1rumprun$2/g' Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- allow.all | 4 +- allow.rumpuserxen | 2 +- ap-common | 16 +++--- ap-fetch-version | 6 +- ap-fetch-version-old | 8 +-- ap-print-url | 4 +- ap-push | 8 +-- cr-daily-branch | 12 ++-- cri-common | 2 +- crontab | 4 +- make-flight | 14 ++--- mfi-common | 16 +++--- sg-run-job | 18 +++--- ts-rumprun-build | 126 +++++++++++++++++++++++++++++++++++++++++ ts-rumprun-demo-setup | 92 ++++++++++++++++++++++++++++++ ts-rumprun-demo-xenstorels | 124 ++++++++++++++++++++++++++++++++++++++++ ts-rumpuserxen-build | 126 ----------------------------------------- ts-rumpuserxen-demo-setup | 92 ------------------------------ ts-rumpuserxen-demo-xenstorels | 124 ---------------------------------------- 19 files changed, 399 insertions(+), 399 deletions(-) create mode 100755 ts-rumprun-build create mode 100755 ts-rumprun-demo-setup create mode 100755 ts-rumprun-demo-xenstorels delete mode 100755 ts-rumpuserxen-build delete mode 100755 ts-rumpuserxen-demo-setup delete mode 100755 ts-rumpuserxen-demo-xenstorels diff --git a/allow.all b/allow.all index 785d0b2..c4a2854 100644 --- a/allow.all +++ b/allow.all @@ -2,6 +2,6 @@ test-@@-rtds@@ build-@@ logs-capture@@ test-@@-pcipt@@ test-@@-qemuu-@@ guest-localmigrate -test-@@-rumpuserxen@@ rumpuserxen-demo-xenstorels/xenstorels +test-@@-rumprun@@ rumprun-demo-xenstorels/xenstorels test-@@-win7-@@ guest-stop -test-@@-rumpuserxen-@@ rumpuserxen-demo-xenstorels/xenstorels.repeat +test-@@-rumprun-@@ rumprun-demo-xenstorels/xenstorels.repeat diff --git a/allow.rumpuserxen b/allow.rumpuserxen index d9034a2..436417b 100644 --- a/allow.rumpuserxen +++ b/allow.rumpuserxen @@ -1 +1 @@ -!test-@@-rumpuserxen-@@ rumpuserxen-demo-xenstorels/xenstorels.repeat +!test-@@-rumprun-@@ rumprun-demo-xenstorels/xenstorels.repeat diff --git a/ap-common b/ap-common index 19c7580..6fe3b78 100644 --- a/ap-common +++ b/ap-common @@ -37,15 +37,15 @@ : ${PUSH_TREE_LIBVIRT:=$XENBITS:/home/xen/git/libvirt.git} : ${BASE_TREE_LIBVIRT:=git://xenbits.xen.org/libvirt.git} -: ${TREE_RUMPUSERXEN:=https://github.com/rumpkernel/rumprun-xen} -: ${TREEVCS_RUMPUSERXEN:=git} -: ${BASE_TREE_RUMPUSERXEN:=git://xenbits.xen.org/rumpuser-xen.git} -: ${PUSH_TREE_RUMPUSERXEN:=$XENBITS:/home/xen/git/rumpuser-xen.git} +: ${TREE_RUMPRUN:=https://github.com/rumpkernel/rumprun-xen} +: ${TREEVCS_RUMPRUN:=git} +: ${BASE_TREE_RUMPRUN:=git://xenbits.xen.org/rumpuser-xen.git} +: ${PUSH_TREE_RUMPRUN:=$XENBITS:/home/xen/git/rumpuser-xen.git} -: ${TREE_RUMPUSERXEN_RUMPSRC:=$(besteffort_repo https://github.com/rumpkernel/rumpkernel-netbsd-src)} -: ${TREEVCS_RUMPUSERXEN_RUMPSRC:=git} +: ${TREE_RUMPRUN_RUMPSRC:=$(besteffort_repo https://github.com/rumpkernel/rumpkernel-netbsd-src)} +: ${TREEVCS_RUMPRUN_RUMPSRC:=git} # rumpsrc-related runvars needed only for old rumpuser-xen -# (ie ones which need $bodges=1 in ts-rumpuserxen-build) +# (ie ones which need $bodges=1 in ts-rumprun-build) : ${TREE_SEABIOS_UPSTREAM:=git://git.seabios.org/seabios.git} : ${PUSH_TREE_SEABIOS:=$XENBITS:/home/xen/git/osstest/seabios.git} @@ -79,7 +79,7 @@ fi : ${LOCALREV_XEN:=daily-cron.$branch} : ${LOCALREV_LINUX:=daily-cron.$branch} : ${LOCALREV_LIBVIRT:=daily-cron.$branch} -: ${LOCALREV_RUMPUSERXEN:=daily-cron.$branch} +: ${LOCALREV_RUMPRUN:=daily-cron.$branch} : ${LOCALREV_SEABIOS:=daily-cron.$branch} : ${LOCALREV_OVMF:=daily-cron.$branch} diff --git a/ap-fetch-version b/ap-fetch-version index f26d60a..8562159 100755 --- a/ap-fetch-version +++ b/ap-fetch-version @@ -90,9 +90,9 @@ libvirt) repo_tree_rev_fetch_git libvirt \ $TREE_LIBVIRT master $LOCALREV_LIBVIRT ;; -rumpuserxen) - repo_tree_rev_fetch_git rumpuserxen \ - $TREE_RUMPUSERXEN master $LOCALREV_RUMPUSERXEN +rumprun) + repo_tree_rev_fetch_git rumprun \ + $TREE_RUMPRUN master $LOCALREV_RUMPRUN ;; seabios) repo_tree_rev_fetch_git seabios \ diff --git a/ap-fetch-version-old b/ap-fetch-version-old index 7cc31a3..5d44add 100755 --- a/ap-fetch-version-old +++ b/ap-fetch-version-old @@ -30,7 +30,7 @@ check_ap_fetch_placeholders : ${BASE_TAG_LINUX2639:=tested/2.6.39.x} : ${BASE_LOCALREV_LINUX:=daily-cron.$branch.old} : ${BASE_LOCALREV_LIBVIRT:=daily-cron.$branch.old} -: ${BASE_LOCALREV_RUMPUSERXEN:=daily-cron.$branch.old} +: ${BASE_LOCALREV_RUMPRUN:=daily-cron.$branch.old} : ${BASE_LOCALREV_SEABIOS:=daily-cron.$branch.old} : ${BASE_LOCALREV_OVMF:=daily-cron.$branch.old} : ${BASE_TAG_LIBVIRT:=xen-tested-master} @@ -97,9 +97,9 @@ libvirt) repo_tree_rev_fetch_git libvirt \ $BASE_TREE_LIBVIRT $BASE_TAG_LIBVIRT $BASE_LOCALREV_LIBVIRT ;; -rumpuserxen) - repo_tree_rev_fetch_git rumpuserxen \ - $BASE_TREE_RUMPUSERXEN xen-tested-master $BASE_LOCALREV_RUMPUSERXEN +rumprun) + repo_tree_rev_fetch_git rumprun \ + $BASE_TREE_RUMPRUN xen-tested-master $BASE_LOCALREV_RUMPRUN ;; seabios) repo_tree_rev_fetch_git seabios \ diff --git a/ap-print-url b/ap-print-url index 4088852..8a41e70 100755 --- a/ap-print-url +++ b/ap-print-url @@ -52,8 +52,8 @@ linuxfirmware) libvirt) echo $TREE_LIBVIRT ;; -rumpuserxen) - echo $TREE_RUMPUSERXEN +rumprun) + echo $TREE_RUMPRUN ;; seabios) echo $TREE_SEABIOS_UPSTREAM diff --git a/ap-push b/ap-push index e33a803..7d3d473 100755 --- a/ap-push +++ b/ap-push @@ -37,7 +37,7 @@ TREE_LINUX=$PUSH_TREE_LINUX TREE_QEMU_UPSTREAM=$PUSH_TREE_QEMU_UPSTREAM TREE_XEN=$PUSH_TREE_XEN TREE_LIBVIRT=$PUSH_TREE_LIBVIRT -TREE_RUMPUSERXEN=$PUSH_TREE_RUMPUSERXEN +TREE_RUMPRUN=$PUSH_TREE_RUMPRUN TREE_SEABIOS=$PUSH_TREE_SEABIOS TREE_OVMF=$PUSH_TREE_OVMF @@ -112,9 +112,9 @@ libvirt) cd $repos/libvirt git push $TREE_LIBVIRT $revision:refs/heads/xen-tested-master ;; -rumpuserxen) - cd $repos/rumpuserxen - git push $TREE_RUMPUSERXEN $revision:refs/heads/xen-tested-master +rumprun) + cd $repos/rumprun + git push $TREE_RUMPRUN $revision:refs/heads/xen-tested-master ;; seabios) cd $repos/seabios diff --git a/cr-daily-branch b/cr-daily-branch index 21780b8..7d49439 100755 --- a/cr-daily-branch +++ b/cr-daily-branch @@ -195,9 +195,9 @@ if [ "x$REVISION_LIBVIRT" = x ]; then determine_version REVISION_LIBVIRT libvirt LIBVIRT export REVISION_LIBVIRT fi -if [ "x$REVISION_RUMPUSERXEN" = x ]; then - determine_version REVISION_RUMPUSERXEN rumpuserxen RUMPUSERXEN - export REVISION_RUMPUSERXEN +if [ "x$REVISION_RUMPRUN" = x ]; then + determine_version REVISION_RUMPRUN rumprun RUMPRUN + export REVISION_RUMPRUN fi if [ "x$REVISION_LINUXFIRMWARE" = x ]; then determine_version REVISION_LINUXFIRMWARE linuxfirmware LINUXFIRMWARE @@ -238,9 +238,9 @@ libvirt) realtree=libvirt NEW_REVISION=$REVISION_LIBVIRT ;; -rumpuserxen) - realtree=rumpuserxen - NEW_REVISION=$REVISION_RUMPUSERXEN +rumprun) + realtree=rumprun + NEW_REVISION=$REVISION_RUMPRUN export REVISION_LINUX_OLD=disable export REVISION_LIBVIRT=disable ;; diff --git a/cri-common b/cri-common index cdee48d..6e555a6 100644 --- a/cri-common +++ b/cri-common @@ -76,7 +76,7 @@ select_xenbranch () { linux-*) tree=linux; xenbranch=xen-unstable ;; linuxfirmware) tree=linuxfirmware; xenbranch=xen-unstable ;; libvirt) tree=libvirt; xenbranch=xen-unstable ;; - rumpuserxen) tree=rumpuserxen; xenbranch=xen-unstable ;; + rumprun) tree=rumprun; xenbranch=xen-unstable ;; seabios) tree=seabios; xenbranch=xen-unstable ;; ovmf) tree=ovmf; xenbranch=xen-unstable ;; distros-*) tree=none; xenbranch=xen-unstable ;; diff --git a/crontab b/crontab index 6ddc2b8..f1ba2e5 100755 --- a/crontab +++ b/crontab @@ -8,8 +8,8 @@ MAILTO=ian.jackson@xxxxxxxxxx,ian.campbell@xxxxxxxxxxxxx 0 * * * * cd testing.git && BRANCHES=xen-unstable-smoke ./cr-for-branches branches -q "./cr-daily-branch --real" 4-59/30 * * * * cd testing.git && ./cr-for-branches branches -q "./cr-daily-branch --real" 18 9 * * 3,7 cd testing.git && BRANCHES=xen-unstable-coverity ./cr-for-branches branches -w "./cr-daily-branch --real" -18 4 * * * cd testing.git && BRANCHES='linux-3.0 libvirt rumpuserxen' ./cr-for-branches branches -w "./cr-daily-branch --real" -6-59/15 * * * * cd testing.git && EXTRA_BRANCHES='linux-3.0 rumpuserxen libvirt' ./cr-for-branches bisects -w "./cr-try-bisect --real" +18 4 * * * cd testing.git && BRANCHES='linux-3.0 libvirt rumprun' ./cr-for-branches branches -w "./cr-daily-branch --real" +6-59/15 * * * * cd testing.git && EXTRA_BRANCHES='linux-3.0 rumprun libvirt' ./cr-for-branches bisects -w "./cr-try-bisect --real" #8-59/5 * * * * cd bisects/adhoc.git && with-lock-ex -q data-tree-lock bash -c "./cr-try-bisect-adhoc; exit $?" 22 8 * * * cd testing.git && BRANCHES=maintjobs ./cr-for-branches . -w ./cr-all-branch-statuses '' 3 4 * * * savelog -c28 testing.git/tmp/cr-for-branches.log >/dev/null diff --git a/make-flight b/make-flight index 18e5bc3..906bf2b 100755 --- a/make-flight +++ b/make-flight @@ -107,9 +107,9 @@ job_create_test_filter_callback () { libvirt) if [ x$toolstack != xlibvirt ] ; then return 1; fi ;; - rumpuserxen) + rumprun) case "$job" in - *-rumpuserxen-*) + *-rumprun-*) ;; *) : "suppressed $job" @@ -169,7 +169,7 @@ arch_branch_filter_callback () { qemu-upstream-4.2-testing) return 1;; qemu-upstream-4.3-testing) return 1;; qemu-upstream-4.4-testing) return 1;; - rumpuserxen) return 1;; + rumprun) return 1;; seabios) return 1;; ovmf) return 1;; esac @@ -197,11 +197,11 @@ do_rumpkernel_tests () { branch_wants_rumpkernel_tests || return 0 rumparch=$dom0arch - job_create_test test-$xenarch$kern-$dom0arch-rumpuserxen-$rumparch \ - test-rumpuserxen xl \ + job_create_test test-$xenarch$kern-$dom0arch-rumprun-$rumparch \ + test-rumprun xl \ $xenarch $dom0arch \ - guests_rumpuserxenbuildjob=build-$rumparch-rumpuserxen \ - rump_builtimage=rumpuserxen:/usr/local/lib/xen/rump-kernel/rump-kernel \ + guests_rumprunbuildjob=build-$rumparch-rumprun \ + rump_builtimage=rumprun:/usr/local/lib/xen/rump-kernel/rump-kernel \ rump_cmdline=3 \ xenstorels_builtimage=:/usr/local/bin/xenstore \ xenstorels_cmdline='ls -fp device' \ diff --git a/mfi-common b/mfi-common index 971ded3..8f27923 100644 --- a/mfi-common +++ b/mfi-common @@ -269,24 +269,24 @@ create_build_jobs () { case $arch in i386|amd64) - job_create_build build-$arch-rumpuserxen build-rumpuserxen \ + job_create_build build-$arch-rumprun build-rumprun \ arch=$arch \ tree_xen=$TREE_XEN \ - $RUNVARS $BUILD_RUNVARS $BUILD_RUMPUSERXEN_RUNVARS $arch_runvars \ + $RUNVARS $BUILD_RUNVARS $BUILD_RUMPRUN_RUNVARS $arch_runvars \ $hostos_runvars \ host_hostflags=$build_hostflags \ buildjob=${bfi}build-$arch \ - tree_rumpuserxen=$TREE_RUMPUSERXEN \ - ${TREEVCS_RUMPUSERXEN:+treevcs_rumpuserxen=}${TREEVCS_RUMPUSERXEN} \ - revision_rumpuserxen=$REVISION_RUMPUSERXEN \ + tree_rumprun=$TREE_RUMPRUN \ + ${TREEVCS_RUMPRUN:+treevcs_rumprun=}${TREEVCS_RUMPRUN} \ + revision_rumprun=$REVISION_RUMPRUN \ tree_xen=$TREE_XEN \ tree_qemuu=$TREE_QEMU_UPSTREAM \ revision_xen=$REVISION_XEN \ revision_qemuu=$REVISION_QEMU_UPSTREAM \ - tree_rumpuserxen_rumpsrc=$TREE_RUMPUSERXEN_RUMPSRC \ - ${TREEVCS_RUMPUSERXEN_RUMPSRC:+treevcs_rumpuserxen_rumpsrc=}${TREEVCS_RUMPUSERXEN_RUMPSRC} + tree_rumprun_rumpsrc=$TREE_RUMPRUN_RUMPSRC \ + ${TREEVCS_RUMPRUN_RUMPSRC:+treevcs_rumprun_rumpsrc=}${TREEVCS_RUMPRUN_RUMPSRC} # rumpsrc-related runvars needed only for old rumpuser-xen - # (ie ones which need $bodges=1 in ts-rumpuserxen-build) + # (ie ones which need $bodges=1 in ts-rumprun-build) ;; esac diff --git a/sg-run-job b/sg-run-job index c49fb5f..31a5589 100755 --- a/sg-run-job +++ b/sg-run-job @@ -441,18 +441,18 @@ proc test-guest-nomigr {g} { run-ts . = ts-guest-destroy + host $g } -proc need-hosts/test-rumpuserxen {} { return host } -proc run-job/test-rumpuserxen {} { +proc need-hosts/test-rumprun {} { return host } +proc run-job/test-rumprun {} { set g rump - run-ts . = ts-rumpuserxen-demo-setup + host $g + run-ts . = ts-rumprun-demo-setup + host $g run-ts . = ts-guest-start + host $g run-ts . = ts-guest-destroy + host $g set g xenstorels - run-ts . = ts-rumpuserxen-demo-setup + host + $g - run-ts . = ts-rumpuserxen-demo-xenstorels + host + $g + run-ts . = ts-rumprun-demo-setup + host + $g + run-ts . = ts-rumprun-demo-xenstorels + host + $g run-ts . = ts-guest-destroy-hard + host + $g repeat-ts 150 =.repeat \ - ts-rumpuserxen-demo-xenstorels + host + $g + \; \ + ts-rumprun-demo-xenstorels + host + $g + \; \ ts-guest-destroy-hard host $g + } @@ -465,7 +465,7 @@ if {[file exists sg-run-job-adhoc]} { proc need-hosts/build {} { return BUILD } proc need-hosts/build-kern {} { return BUILD } proc need-hosts/build-libvirt {} { return BUILD } -proc need-hosts/build-rumpuserxen {} { return BUILD } +proc need-hosts/build-rumprun {} { return BUILD } proc run-job/build {} { run-ts . = ts-xen-build @@ -479,8 +479,8 @@ proc run-job/build-libvirt {} { run-ts . = ts-libvirt-build } -proc run-job/build-rumpuserxen {} { - run-ts . = ts-rumpuserxen-build +proc run-job/build-rumprun {} { + run-ts . = ts-rumprun-build run-ts . = ts-xen-build + host tools } diff --git a/ts-rumprun-build b/ts-rumprun-build new file mode 100755 index 0000000..574781f --- /dev/null +++ b/ts-rumprun-build @@ -0,0 +1,126 @@ +#!/usr/bin/perl +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2009-2014 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; +use Osstest::BuildSupport; + +tsreadconfig(); +selectbuildhost(\@ARGV); +builddirsprops(); + +our %submodmap = qw(nblibs nblibs + buildrump.sh buildrumpsh + rumpsrc netbsdsrc); + +our ($rux, $bodges); + +sub checkout () { + prepbuilddirs(); + xendist(); + + build_clone($ho, 'rumprun', $builddir, 'rumprun'); + my $submodules = + submodulefixup($ho, 'rumprun', 'rumprun', \%submodmap); + $rux = "$builddir/rumprun"; + + $bodges = submodule_have($submodules,'nblibs') + && !submodule_have($submodules,'netbsdsrc'); + + if ($bodges) { + my $rumpsrcgitrevr = "$rux/buildrump.sh/.srcgitrev"; + my $rumpsrcgitrevl = "buildrump-srcgitrev"; + my $rev = $r{revision_rumprun_rumpsrc}; + if (length $rev) { + target_putfilecontents_stash($ho,30, + "$r{revision_rumprun_rumpsrc}\n", + $rumpsrcgitrevr, $rumpsrcgitrevl); + } else { + target_getfile($ho,30,$rumpsrcgitrevr,"$stash/$rumpsrcgitrevl"); + $rev = get_filecontents("$stash/$rumpsrcgitrevl"); + chomp $rev or die; + $rev =~ m/^[0-9a-f]+$/ or die; + store_runvar('revision_rumprun_rumpsrc', $rev); + } + + build_clone($ho, "rumprun_rumpsrc", $builddir, + "rumprun/rumpsrc"); + store_vcs_revision('rumprun_rumpsrc', $rev, 'git'); + } +} + +sub massage() { + return unless $bodges; + + # Very poor + target_editfile($ho, "$rux/buildxen.sh", undef, + "$rux/grievous-bodge-nblibs", sub { + while (<EI>) { + next unless m/^\Qif [ ! -d rumpsrc ]; then\E/..m/^fi/; + next unless m/cp -Rp nblibs/; + print EO or die $!; + } + }); + target_cmd_build($ho, 2000, $rux, "bash -x grievous-bodge-nblibs"); + + # Rather poor + target_editfile($ho, "$rux/Config.mk", sub { + while (<EI>) { + s/^XEN_HEADERS=/XEN_HEADERS?=/; + print EO or die $!; + } + }); +} + +sub build() { + target_cmd_build($ho, 7200, $rux, <<END); + export XEN_HEADERS=$xendist/usr/local/include/xen + (./buildxen.sh && touch ../build-ok-stamp) |tee ../log + test -f ../build-ok-stamp #/ + echo ok. +END +} + +sub recordtools() { + foreach my $stem (qw(rumprun-xen rumpxen-app)) { + my $apptool = "$rux/app-tools/$stem"; + next unless target_file_exists($ho, "$apptool-configure"); + store_runvar('cmdprefix_configure', "$apptool-configure"); + store_runvar('cmdprefix_make', "$apptool-make"); + return; + } + die "app-tools not found ($rux)"; +} + +sub install() { + my $destdir="dist/usr/local/lib/xen/rump-kernel"; + target_cmd_build($ho, 300, $builddir, <<END); + mkdir -p $destdir + cp rumprun/rump-kernel* $destdir + cp -r rumprun/img $destdir/ + cp rumprun/domain_config $destdir +END +} + +checkout(); +massage(); +build(); +recordtools(); +install(); +built_stash($ho, $builddir, 'dist', 'rumprundist'); diff --git a/ts-rumprun-demo-setup b/ts-rumprun-demo-setup new file mode 100755 index 0000000..655328f --- /dev/null +++ b/ts-rumprun-demo-setup @@ -0,0 +1,92 @@ +#!/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 ||= 'rump'; + +our $ho= selecthost($whhost); + +our $gho; + +our $rkdist; + +sub prep () { + $gho = prepareguest($ho, $gn, $gn, 4096, undef, 30); + + my $cfg_rkdist = target_extract_jobdistpath_subdir + ($ho, 'rumprun--base', 'rumprun', + $r{guests_rumprunbuildjob}); + $cfg_rkdist .= '/usr/local/lib/xen/rump-kernel'; + + my $buildjob = guest_var($gho, 'rumprunbuildjob', undef); + my $builtimage = guest_var($gho, 'builtimage', undef); + $builtimage =~ m/\:/ or die "$builtimage ?"; + my $builtimage_part = $`; + my $builtimage_subpath = $'; #'; + $rkdist = target_extract_jobdistpath_subdir + ($ho, "rumprun-$gn", $builtimage_part, $buildjob); + my $imagefile = $rkdist.$builtimage_subpath; + my $cmdline = guest_var($gho, 'cmdline', undef); + + my @images; + + my $fsimagesdir = target_jobdir($ho)."/$gn-images"; + + my $cfgfile = "$gn.cfg"; + my $cfgpath = "/etc/xen/$cfgfile"; + target_editfile_root($ho, "$cfg_rkdist/domain_config", $cfgfile, $cfgpath, + sub { + while (<EI>) { + next if m/^\s*\#/; + next unless m/\S/; + + my $in = $& if m/^\w\S*/; + + s# = .* # " = '$gn'" #xe if $in eq 'name'; + s# = .* # " = '$imagefile'" #xe if $in eq 'kernel'; + s#\b mac=[0-9a-f:]+ # "mac=$gho->{Ether}" #xe if $in eq 'vif'; + s# = .* # " = '$cmdline'" #xe if $in eq 'extra'; + + if ($in eq 'disk') { + s{\b img/(\w+.ffs) \b}{ + push @images, $1; + "$fsimagesdir/$1"; + }xeg; + } + + print EO or die $!; + } + }); + + store_runvar("$gho->{Guest}_cfgpath", $cfgpath); + + target_cmd($ho, <<END.(join "\n", map { <<END; } @images), 200); + mkdir -p $fsimagesdir +END + cp $cfg_rkdist/img/$_ $fsimagesdir/$_ +END +} + +prep(); diff --git a/ts-rumprun-demo-xenstorels b/ts-rumprun-demo-xenstorels new file mode 100755 index 0000000..a54fbf4 --- /dev/null +++ b/ts-rumprun-demo-xenstorels @@ -0,0 +1,124 @@ +#!/usr/bin/perl -w +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2014 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; +use Data::Dumper; + +tsreadconfig(); + +our ($ho,$gho) = ts_get_host_guest(@ARGV); + +our $domid; + +our $gn = $gho->{Guest}; + +sub arrangepreserve () { + target_editfile_root($ho,$r{"$gho->{Guest}_cfgpath"}, sub { + while (<EI>) { + if (m/^\s*on_poweroff\s*=/) { + target_editfile_cancel("already configured to preserve") + if m/\bpreserve\b/; + next; + } + print EO or die $!; + } + print EO "\n","on_poweroff='preserve'\n" or die $!; + }); +} + +sub start () { + guest_create($gho); + + $domid = guest_find_domid($ho, $gho); +} + +sub await_end () { + poll_loop(30,3, "await ending of $gho->{Guest}", sub { + my $st= guest_get_state($ho,$gho); + return undef if $st =~ m/s/; + return "guest state is $st"; + }); +} + +our (%file); +our (%output); + +sub stash ($$) { + my ($data, $what) = @_; + my $leaf = "xenstore-ls-device--$gn--$what"; + my $stashh = open_unique_stashfile(\$leaf); + print $stashh $data or die $!; + close $stashh or die $!; + $file{$what} = "$stash/$leaf"; +} + +sub some_xenstorels ($$$) { + my ($what, $massage, $cmd) = @_; + $output{$what} = target_cmd_output_root($ho,$cmd); + stash($output{$what}, "$what-raw"); + $massage->(); + $output{$what} = join "\n", sort split /\n/, $output{$what}; + $output{$what} .= "\n"; + stash($output{$what}, "$what-massaged"); +} + +sub our_xenstorels () { + some_xenstorels('ours', sub { + $output{ours} =~ s{^/local/domain/$domid/}{}gm; + }, <<END); + xenstore-ls -fp /local/domain/$domid/device +END +} + +sub their_xenstorels () { + some_xenstorels('theirs', sub { + $output{theirs} =~ s{\r\n}{\n}g; + while ($output{theirs} =~ m{\n=== calling main\(\) ===\n\n}) { + $output{theirs} = $'; #'; + } + $output{theirs} =~ m{\n=== main\(\) returned (\d+) ===\n} or die; + $output{theirs} = $`; + die "$1 ?" if $1 ne '0'; + $output{theirs} =~ s{^STUB \`\`\w+'' called\n}{}mg; + }, <<END); + cat /var/log/xen/console/guest-$gn.log +END +} + +sub check_output () { + eval { + our_xenstorels(); + their_xenstorels(); + 1; + }; + if ($@) { + die Dumper(\%output)."$@"; + } + if ($output{ours} ne $output{theirs}) { + system qw(diff -u), map { $file{"$_-massaged"} } qw(ours theirs); + die "$? COMPARISON FAILED"; + } +} + +arrangepreserve(); +start(); +await_end(); +check_output(); +logm("all good."); diff --git a/ts-rumpuserxen-build b/ts-rumpuserxen-build deleted file mode 100755 index 9e6580a..0000000 --- a/ts-rumpuserxen-build +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/perl -# This is part of "osstest", an automated testing framework for Xen. -# Copyright (C) 2009-2014 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; -use Osstest::BuildSupport; - -tsreadconfig(); -selectbuildhost(\@ARGV); -builddirsprops(); - -our %submodmap = qw(nblibs nblibs - buildrump.sh buildrumpsh - rumpsrc netbsdsrc); - -our ($rux, $bodges); - -sub checkout () { - prepbuilddirs(); - xendist(); - - build_clone($ho, 'rumpuserxen', $builddir, 'rumpuserxen'); - my $submodules = - submodulefixup($ho, 'rumpuserxen', 'rumpuserxen', \%submodmap); - $rux = "$builddir/rumpuserxen"; - - $bodges = submodule_have($submodules,'nblibs') - && !submodule_have($submodules,'netbsdsrc'); - - if ($bodges) { - my $rumpsrcgitrevr = "$rux/buildrump.sh/.srcgitrev"; - my $rumpsrcgitrevl = "buildrump-srcgitrev"; - my $rev = $r{revision_rumpuserxen_rumpsrc}; - if (length $rev) { - target_putfilecontents_stash($ho,30, - "$r{revision_rumpuserxen_rumpsrc}\n", - $rumpsrcgitrevr, $rumpsrcgitrevl); - } else { - target_getfile($ho,30,$rumpsrcgitrevr,"$stash/$rumpsrcgitrevl"); - $rev = get_filecontents("$stash/$rumpsrcgitrevl"); - chomp $rev or die; - $rev =~ m/^[0-9a-f]+$/ or die; - store_runvar('revision_rumpuserxen_rumpsrc', $rev); - } - - build_clone($ho, "rumpuserxen_rumpsrc", $builddir, - "rumpuserxen/rumpsrc"); - store_vcs_revision('rumpuserxen_rumpsrc', $rev, 'git'); - } -} - -sub massage() { - return unless $bodges; - - # Very poor - target_editfile($ho, "$rux/buildxen.sh", undef, - "$rux/grievous-bodge-nblibs", sub { - while (<EI>) { - next unless m/^\Qif [ ! -d rumpsrc ]; then\E/..m/^fi/; - next unless m/cp -Rp nblibs/; - print EO or die $!; - } - }); - target_cmd_build($ho, 2000, $rux, "bash -x grievous-bodge-nblibs"); - - # Rather poor - target_editfile($ho, "$rux/Config.mk", sub { - while (<EI>) { - s/^XEN_HEADERS=/XEN_HEADERS?=/; - print EO or die $!; - } - }); -} - -sub build() { - target_cmd_build($ho, 7200, $rux, <<END); - export XEN_HEADERS=$xendist/usr/local/include/xen - (./buildxen.sh && touch ../build-ok-stamp) |tee ../log - test -f ../build-ok-stamp #/ - echo ok. -END -} - -sub recordtools() { - foreach my $stem (qw(rumprun-xen rumpxen-app)) { - my $apptool = "$rux/app-tools/$stem"; - next unless target_file_exists($ho, "$apptool-configure"); - store_runvar('cmdprefix_configure', "$apptool-configure"); - store_runvar('cmdprefix_make', "$apptool-make"); - return; - } - die "app-tools not found ($rux)"; -} - -sub install() { - my $destdir="dist/usr/local/lib/xen/rump-kernel"; - target_cmd_build($ho, 300, $builddir, <<END); - mkdir -p $destdir - cp rumpuserxen/rump-kernel* $destdir - cp -r rumpuserxen/img $destdir/ - cp rumpuserxen/domain_config $destdir -END -} - -checkout(); -massage(); -build(); -recordtools(); -install(); -built_stash($ho, $builddir, 'dist', 'rumpuserxendist'); diff --git a/ts-rumpuserxen-demo-setup b/ts-rumpuserxen-demo-setup deleted file mode 100755 index 04ed0b9..0000000 --- a/ts-rumpuserxen-demo-setup +++ /dev/null @@ -1,92 +0,0 @@ -#!/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 ||= 'rump'; - -our $ho= selecthost($whhost); - -our $gho; - -our $rkdist; - -sub prep () { - $gho = prepareguest($ho, $gn, $gn, 4096, undef, 30); - - my $cfg_rkdist = target_extract_jobdistpath_subdir - ($ho, 'rumpuserxen--base', 'rumpuserxen', - $r{guests_rumpuserxenbuildjob}); - $cfg_rkdist .= '/usr/local/lib/xen/rump-kernel'; - - my $buildjob = guest_var($gho, 'rumpuserxenbuildjob', undef); - my $builtimage = guest_var($gho, 'builtimage', undef); - $builtimage =~ m/\:/ or die "$builtimage ?"; - my $builtimage_part = $`; - my $builtimage_subpath = $'; #'; - $rkdist = target_extract_jobdistpath_subdir - ($ho, "rumpuserxen-$gn", $builtimage_part, $buildjob); - my $imagefile = $rkdist.$builtimage_subpath; - my $cmdline = guest_var($gho, 'cmdline', undef); - - my @images; - - my $fsimagesdir = target_jobdir($ho)."/$gn-images"; - - my $cfgfile = "$gn.cfg"; - my $cfgpath = "/etc/xen/$cfgfile"; - target_editfile_root($ho, "$cfg_rkdist/domain_config", $cfgfile, $cfgpath, - sub { - while (<EI>) { - next if m/^\s*\#/; - next unless m/\S/; - - my $in = $& if m/^\w\S*/; - - s# = .* # " = '$gn'" #xe if $in eq 'name'; - s# = .* # " = '$imagefile'" #xe if $in eq 'kernel'; - s#\b mac=[0-9a-f:]+ # "mac=$gho->{Ether}" #xe if $in eq 'vif'; - s# = .* # " = '$cmdline'" #xe if $in eq 'extra'; - - if ($in eq 'disk') { - s{\b img/(\w+.ffs) \b}{ - push @images, $1; - "$fsimagesdir/$1"; - }xeg; - } - - print EO or die $!; - } - }); - - store_runvar("$gho->{Guest}_cfgpath", $cfgpath); - - target_cmd($ho, <<END.(join "\n", map { <<END; } @images), 200); - mkdir -p $fsimagesdir -END - cp $cfg_rkdist/img/$_ $fsimagesdir/$_ -END -} - -prep(); diff --git a/ts-rumpuserxen-demo-xenstorels b/ts-rumpuserxen-demo-xenstorels deleted file mode 100755 index a54fbf4..0000000 --- a/ts-rumpuserxen-demo-xenstorels +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/perl -w -# This is part of "osstest", an automated testing framework for Xen. -# Copyright (C) 2014 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; -use Data::Dumper; - -tsreadconfig(); - -our ($ho,$gho) = ts_get_host_guest(@ARGV); - -our $domid; - -our $gn = $gho->{Guest}; - -sub arrangepreserve () { - target_editfile_root($ho,$r{"$gho->{Guest}_cfgpath"}, sub { - while (<EI>) { - if (m/^\s*on_poweroff\s*=/) { - target_editfile_cancel("already configured to preserve") - if m/\bpreserve\b/; - next; - } - print EO or die $!; - } - print EO "\n","on_poweroff='preserve'\n" or die $!; - }); -} - -sub start () { - guest_create($gho); - - $domid = guest_find_domid($ho, $gho); -} - -sub await_end () { - poll_loop(30,3, "await ending of $gho->{Guest}", sub { - my $st= guest_get_state($ho,$gho); - return undef if $st =~ m/s/; - return "guest state is $st"; - }); -} - -our (%file); -our (%output); - -sub stash ($$) { - my ($data, $what) = @_; - my $leaf = "xenstore-ls-device--$gn--$what"; - my $stashh = open_unique_stashfile(\$leaf); - print $stashh $data or die $!; - close $stashh or die $!; - $file{$what} = "$stash/$leaf"; -} - -sub some_xenstorels ($$$) { - my ($what, $massage, $cmd) = @_; - $output{$what} = target_cmd_output_root($ho,$cmd); - stash($output{$what}, "$what-raw"); - $massage->(); - $output{$what} = join "\n", sort split /\n/, $output{$what}; - $output{$what} .= "\n"; - stash($output{$what}, "$what-massaged"); -} - -sub our_xenstorels () { - some_xenstorels('ours', sub { - $output{ours} =~ s{^/local/domain/$domid/}{}gm; - }, <<END); - xenstore-ls -fp /local/domain/$domid/device -END -} - -sub their_xenstorels () { - some_xenstorels('theirs', sub { - $output{theirs} =~ s{\r\n}{\n}g; - while ($output{theirs} =~ m{\n=== calling main\(\) ===\n\n}) { - $output{theirs} = $'; #'; - } - $output{theirs} =~ m{\n=== main\(\) returned (\d+) ===\n} or die; - $output{theirs} = $`; - die "$1 ?" if $1 ne '0'; - $output{theirs} =~ s{^STUB \`\`\w+'' called\n}{}mg; - }, <<END); - cat /var/log/xen/console/guest-$gn.log -END -} - -sub check_output () { - eval { - our_xenstorels(); - their_xenstorels(); - 1; - }; - if ($@) { - die Dumper(\%output)."$@"; - } - if ($output{ours} ne $output{theirs}) { - system qw(diff -u), map { $file{"$_-massaged"} } qw(ours theirs); - die "$? COMPARISON FAILED"; - } -} - -arrangepreserve(); -start(); -await_end(); -check_output(); -logm("all good."); -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |