Re: [Xen-devel] raisin and minios stubdom

2017-04-07 Thread Géza Gémes
On 01/04/17 08:19, Géza Gémes wrote:
>
>
> 2017. márc. 31. 16:15 ezt írta ("Juergen Gross" <jgr...@suse.com
> <mailto:jgr...@suse.com>>):
>
> On 31/03/17 16:05, Konrad Rzeszutek Wilk wrote:
> > On Thu, Mar 30, 2017 at 07:42:48PM +0200, Gémes Géza wrote:
> >>
> >>> On Mon, Mar 27, 2017 at 09:28:14PM +0200, Gémes Géza wrote:
> >>>> Hi,
> >>>>
> >>>> Currently the xen build system has optional support for
> building a minios
> >>>> (+needed libraries and tools) based stubdom.
> >>>>
> >>>> What is your opinion about moving support for building this
> into raisin and
> >>>> once that is stable drop support in the xen build system?
> >>> Why? I do like doing 'make' and 'make install' and it doing
> everything
> >>> for me.
> >>>
> >>>> Cheers,
> >>>>
> >>>> Geza
> >>>>
> >>>>
> >>>> ___
> >>>> Xen-devel mailing list
> >>>> Xen-devel@lists.xen.org <mailto:Xen-devel@lists.xen.org>
> >>>> https://lists.xen.org/xen-devel <https://lists.xen.org/xen-devel>
> >>
> >> Because it means that xen build needs to download and build a lot
> of 3PP
> >> components. Raisin is already designed to do so (it already
> builds qemu-xen,
> >
> > If you do 'make src-tarball' it will do that for you - and you can
> package
> > all of that in a tarball.
> >
> >> qemu-traditional, libvirt and a few others). I think building
> anything
> >> besides xen proper would fit its scope better.
> >
> > OK, but that does not square well with RPM build systems. Those
> are interested
> > in building just one component (xen+toolstack+its extra pieces).
Using
> > raisin to build everything is not going to fly.
> >
> > (Also distros like to seperate componets out - so they build
> qemu-upstream
> > seperate - which is used by Xen - and they could also do it for
MiniOS
> > if they were spec files for it and such).
>
> There are only few stubdoms you can build without the Xen tree. How
> would you do so for e.g. xenstore-stubdom needing the Xenstore sources
> to be built? Several stubdoms need libxc built for stubdom included.
> And you want to have a build error if e.g. a libxc modification is
> breaking stubdom build.
>
>
> Juergen
>
> Hi,
>
> Raisin already builds xen too, so it has all the dependencies ready.
> Regarding the problem of breaking stubdom build by libxc changes I think
> those can be prevented if we introduce osstests for raisin build. Maybe
> we should start with that, adding raisin to the osstest framework.
> Opinions?

osstest is too late. I want to see a build error _before_ sending a
patch.

So how is raisin working exactly? Is it possible to do incremental
buils or is the build always complete? Can I start builds of only a
subtree? Is it possible to use a private version of some sub-component?


You can use private versions easily. Regarding the problem of selective
rebuild O think that is missing currently, but given your input it looks
important, so I'll look for ways to enable it.


I'm not opposed to use raisin e.g. in osstest. I'm opposed to a change
in the developer workflow requiring to spend either much more time for
testing the build or to add additional steps for it. One-time changes
are fine, changes requiring the developer not to forget an additional
command are not.


As raisin is able to build xen and a set of related projects it is
practically a matter of running raise build rather than make.



Juergen


Cheers

Géza
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] raisin and minios stubdom

2017-04-01 Thread Géza Gémes
2017. márc. 31. 16:15 ezt írta ("Juergen Gross" ):

On 31/03/17 16:05, Konrad Rzeszutek Wilk wrote:
> On Thu, Mar 30, 2017 at 07:42:48PM +0200, Gémes Géza wrote:
>>
>>> On Mon, Mar 27, 2017 at 09:28:14PM +0200, Gémes Géza wrote:
 Hi,

 Currently the xen build system has optional support for building a
minios
 (+needed libraries and tools) based stubdom.

 What is your opinion about moving support for building this into
raisin and
 once that is stable drop support in the xen build system?
>>> Why? I do like doing 'make' and 'make install' and it doing everything
>>> for me.
>>>
 Cheers,

 Geza


 ___
 Xen-devel mailing list
 Xen-devel@lists.xen.org
 https://lists.xen.org/xen-devel
>>
>> Because it means that xen build needs to download and build a lot of 3PP
>> components. Raisin is already designed to do so (it already builds
qemu-xen,
>
> If you do 'make src-tarball' it will do that for you - and you can package
> all of that in a tarball.
>
>> qemu-traditional, libvirt and a few others). I think building anything
>> besides xen proper would fit its scope better.
>
> OK, but that does not square well with RPM build systems. Those are
interested
> in building just one component (xen+toolstack+its extra pieces). Using
> raisin to build everything is not going to fly.
>
> (Also distros like to seperate componets out - so they build qemu-upstream
> seperate - which is used by Xen - and they could also do it for MiniOS
> if they were spec files for it and such).

There are only few stubdoms you can build without the Xen tree. How
would you do so for e.g. xenstore-stubdom needing the Xenstore sources
to be built? Several stubdoms need libxc built for stubdom included.
And you want to have a build error if e.g. a libxc modification is
breaking stubdom build.


Juergen

Hi,

Raisin already builds xen too, so it has all the dependencies ready.
Regarding the problem of breaking stubdom build by libxc changes I think
those can be prevented if we introduce osstests for raisin build. Maybe we
should start with that, adding raisin to the osstest framework.
Opinions?

Cheers

Géza
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 03/10] Introduce cirros-separate-kernel-pv test

2017-03-25 Thread Géza Gémes
This test is the cirros equivalent of the busybox-pv test

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-separate-kernel-pv | 28 
 tests/series|  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 tests/cirros-separate-kernel-pv

diff --git a/tests/cirros-separate-kernel-pv b/tests/cirros-separate-kernel-pv
new file mode 100644
index 000..fab5856
--- /dev/null
+++ b/tests/cirros-separate-kernel-pv
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-separate-kernel-pv-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-separate-kernel-pv-test() {
+download_cirros_components
+testdir=`mktemp -d`
+cp $CIRROS_DOWNLOADS/$CIRROS_KERNEL_FILE $testdir
+cp $CIRROS_DOWNLOADS/$CIRROS_INITRD_FILE $testdir
+cp $CIRROS_DOWNLOADS/$CIRROS_ROOTFS_FILE $testdir
+cat >$testdir/cirros-separate-kernel-pv.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 07/10] Introduce cirros-minios-stubdom-hvm test

2017-03-25 Thread Géza Gémes
This test verifies a cirros based hvm domain using a minios based
stubdom as its device model

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-minios-stubdom-hvm | 27 +++
 tests/series|  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 tests/cirros-minios-stubdom-hvm

diff --git a/tests/cirros-minios-stubdom-hvm b/tests/cirros-minios-stubdom-hvm
new file mode 100644
index 000..43dc568
--- /dev/null
+++ b/tests/cirros-minios-stubdom-hvm
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-minios-stubdom-hvm-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-minios-stubdom-hvm-test() {
+download_cirros_components
+testdir=`mktemp -d`
+cp $CIRROS_DOWNLOADS/$CIRROS_DISK_FILE $testdir
+cat >$testdir/cirros-minios-stubdom-hvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 09/10] Introduce cirros-minios-stubdom-pvhvm test

2017-03-25 Thread Géza Gémes
This test is similar to cirros-minios-stubdom-hvm test, differing by
explicitly exposing the xen netfront and blockfront drivers

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-minios-stubdom-pvhvm | 28 
 tests/series  |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 tests/cirros-minios-stubdom-pvhvm

diff --git a/tests/cirros-minios-stubdom-pvhvm 
b/tests/cirros-minios-stubdom-pvhvm
new file mode 100644
index 000..719b78d
--- /dev/null
+++ b/tests/cirros-minios-stubdom-pvhvm
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-minios-stubdom-pvhvm-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-minios-stubdom-pvhvm-test() {
+download_cirros_components
+testdir=`mktemp -d`
+cp $CIRROS_DOWNLOADS/$CIRROS_DISK_FILE $testdir
+cat >$testdir/cirros-minios-stubdom-pvhvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 06/10] Introduce cirros-qemu-hvm test

2017-03-25 Thread Géza Gémes
This test is the cirros equivalent of the busybox-hvm test

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-qemu-hvm | 26 ++
 tests/series  |  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 tests/cirros-qemu-hvm

diff --git a/tests/cirros-qemu-hvm b/tests/cirros-qemu-hvm
new file mode 100644
index 000..2e4ec2a
--- /dev/null
+++ b/tests/cirros-qemu-hvm
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-qemu-hvm-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-qemu-hvm-test() {
+download_cirros_components
+testdir=`mktemp -d`
+cp $CIRROS_DOWNLOADS/$CIRROS_DISK_FILE $testdir
+cat >$testdir/cirros-qemu-hvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 10/10] Enable cirros tests in the default config

2017-03-25 Thread Géza Gémes
The existing cirros tests are enabled, with the following
exceptions:
cirros-minios-stubdom-hvm and cirros-minios-stubdom-pvhvm are
skipped as raisin does not install the stubdom

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
Reviewed-by: Stefano Stabellini <sstabell...@kernel.org>
---
 defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/defconfig b/defconfig
index f8ef398..bdacc7e 100644
--- a/defconfig
+++ b/defconfig
@@ -31,4 +31,4 @@ GIT_TRANSPORT="git"
 # Tests
 ## All tests: busybox-pv busybox-hvm
 ## ENABLED_TESTS is the list of test run by raise test
-ENABLED_TESTS="busybox-pv busybox-hvm"
+ENABLED_TESTS="busybox-pv busybox-hvm cirros-separate-kernel-pv 
cirros-pygrub-pv cirros-pvgrub2-pv cirros-qemu-hvm cirros-qemu-pvhvm"
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 08/10] Introduce cirros-qemu-pvhvm test

2017-03-25 Thread Géza Gémes
This test is similar to cirros-qemu-hvm test, differing by
explicitly exposing the xen netfront and blockfront drivers

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-qemu-pvhvm | 27 +++
 tests/series|  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 tests/cirros-qemu-pvhvm

diff --git a/tests/cirros-qemu-pvhvm b/tests/cirros-qemu-pvhvm
new file mode 100644
index 000..6cf33e0
--- /dev/null
+++ b/tests/cirros-qemu-pvhvm
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-qemu-pvhvm-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-qemu-pvhvm-test() {
+download_cirros_components
+testdir=`mktemp -d`
+cp $CIRROS_DOWNLOADS/$CIRROS_DISK_FILE $testdir
+cat >$testdir/cirros-qemu-pvhvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 01/10] Fix installation of python libs

2017-03-25 Thread Géza Gémes
Change deb package build in order to move content of the
site-packages folder to dist-packages in this way having
the libs inluded in the default PYTHONPATH

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 scripts/mkdeb | 4 
 1 file changed, 4 insertions(+)

diff --git a/scripts/mkdeb b/scripts/mkdeb
index 3796300..d7ddace 100755
--- a/scripts/mkdeb
+++ b/scripts/mkdeb
@@ -46,6 +46,10 @@ then
 rm -rf deb/usr/lib64
 fi
 
+# Make sure that python libs will be in the path
+mkdir -p deb/usr/lib/python2.7/dist-packages
+mv deb/usr/lib/python2.7/site-packages/* deb/usr/lib/python2.7/dist-packages
+
 # Fill in the debian boilerplate
 mkdir -p deb/DEBIAN
 cat >deb/DEBIAN/control <https://lists.xen.org/xen-devel


[Xen-devel] [raisin][PATCH 00/10] pygrub fix + cirros tests

2017-03-25 Thread Géza Gémes
First patch moves python2.7/site-packages/* to python2.7/dist-packages/
at debian package build, this fixes pygrub imports.

Cirros tests are also introduced by this series of patches.
Changes since the previous patchsets:
 - Downloaded cirros components are kept in a separate folder
 - Each test sets up its own images, keeping the downloaded
parts intact
 - qemu-img and pvgrub detection moved to common-functions

Géza Gémes (10):
  Fix installation of python libs
  Introduce cirros tests
  Introduce cirros-separate-kernel-pv test
  Introduce cirros-pygrub-pv test
  Introduce cirros-pvgrub2-pv test
  Introduce cirros-qemu-hvm test
  Introduce cirros-minios-stubdom-hvm test
  Introduce cirros-qemu-pvhvm test
  Introduce cirros-minios-stubdom-pvhvm test
  Enable cirros tests in the default config

 defconfig  |   2 +-
 lib/common-functions.sh|  33 +++
 lib/common-tests.sh| 109 +
 scripts/mkdeb  |   4 ++
 tests-configs/config-cirros_x86_32 |  13 +
 tests-configs/config-cirros_x86_64 |  13 +
 tests/cirros-minios-stubdom-hvm|  27 +
 tests/cirros-minios-stubdom-pvhvm  |  28 ++
 tests/cirros-pvgrub2-pv|  33 +++
 tests/cirros-pygrub-pv |  25 +
 tests/cirros-qemu-hvm  |  26 +
 tests/cirros-qemu-pvhvm|  27 +
 tests/cirros-separate-kernel-pv|  28 ++
 tests/series   |   7 +++
 14 files changed, 374 insertions(+), 1 deletion(-)
 create mode 100644 tests-configs/config-cirros_x86_32
 create mode 100644 tests-configs/config-cirros_x86_64
 create mode 100644 tests/cirros-minios-stubdom-hvm
 create mode 100644 tests/cirros-minios-stubdom-pvhvm
 create mode 100644 tests/cirros-pvgrub2-pv
 create mode 100644 tests/cirros-pygrub-pv
 create mode 100644 tests/cirros-qemu-hvm
 create mode 100644 tests/cirros-qemu-pvhvm
 create mode 100644 tests/cirros-separate-kernel-pv

-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 05/10] Introduce cirros-pvgrub2-pv test

2017-03-25 Thread Géza Gémes
This test verifies booting the cirros image using pvgrub2

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-pvgrub2-pv | 33 +
 tests/series|  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 tests/cirros-pvgrub2-pv

diff --git a/tests/cirros-pvgrub2-pv b/tests/cirros-pvgrub2-pv
new file mode 100644
index 000..4994ea9
--- /dev/null
+++ b/tests/cirros-pvgrub2-pv
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-pvgrub2-pv-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-pvgrub2-pv-test() {
+download_cirros_components
+testdir=`mktemp -d`
+cp $CIRROS_DOWNLOADS/$CIRROS_DISK_FILE $testdir
+# Need to install grub.cfg
+local cirros_disk_loop=`$SUDO $BASEDIR/scripts/lopartsetup 
$testdir/$CIRROS_DISK_FILE | head -1 | cut -d ":" -f 1`
+local cirros_disk_mntpt=`mktemp -d`
+$SUDO mount $cirros_disk_loop $cirros_disk_mntpt
+cirros_grub_cfg $cirros_disk_mntpt
+$SUDO umount $cirros_disk_mntpt
+$SUDO rmdir $cirros_disk_mntpt
+$SUDO losetup -d $cirros_disk_loop
+cat >$testdir/cirros-pvgrub2-pv.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 04/10] Introduce cirros-pygrub-pv test

2017-03-25 Thread Géza Gémes
This test verifies booting the cirros image using pygrub

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-pygrub-pv | 25 +
 tests/series   |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 tests/cirros-pygrub-pv

diff --git a/tests/cirros-pygrub-pv b/tests/cirros-pygrub-pv
new file mode 100644
index 000..37e288c
--- /dev/null
+++ b/tests/cirros-pygrub-pv
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-pygrub-pv-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-pygrub-pv-test() {
+download_cirros_components
+testdir=`mktemp -d`
+cp $CIRROS_DOWNLOADS/$CIRROS_DISK_FILE $testdir
+cat >$testdir/cirros-pygrub-pv.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 02/10] Introduce cirros tests

2017-03-25 Thread Géza Gémes
Add support for using cirros images in raisin tests

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 lib/common-functions.sh|  33 +++
 lib/common-tests.sh| 109 +
 tests-configs/config-cirros_x86_32 |  13 +
 tests-configs/config-cirros_x86_64 |  13 +
 4 files changed, 168 insertions(+)
 create mode 100644 tests-configs/config-cirros_x86_32
 create mode 100644 tests-configs/config-cirros_x86_64

diff --git a/lib/common-functions.sh b/lib/common-functions.sh
index d4476f3..efc92ff 100644
--- a/lib/common-functions.sh
+++ b/lib/common-functions.sh
@@ -439,3 +439,36 @@ function uninstall_package() {
 error_echo "Don't know how to uninstall packages on $DISTRO"
 fi
 }
+
+function get-qemu-img() {
+set +e
+QEMU_IMG=`which qemu-img`
+set -e
+if [[ -z "$QEMU_IMG" ]]
+then
+QEMU_IMG="/usr/lib/xen/bin/qemu-img"
+fi
+if [[ -x $QEMU_IMG ]]
+then
+export QEMU_IMG
+else
+error_echo "No working qemu-img found! Some tests may fail!"
+fi
+}
+
+function get-pvgrub() {
+local arch=$1
+set +e
+PVGRUB=`which grub-${arch}-xen`
+set -e
+if [[ -z "$PVGRUB" ]]
+then
+PVGRUB="/usr/lib/xen/boot/grub-${arch}-xen"
+fi
+if [[ -f $PVGRUB ]]
+then
+export PVGRUB
+else
+error_echo "No working pvgrub found! Some tests may fail!"
+fi
+}
diff --git a/lib/common-tests.sh b/lib/common-tests.sh
index d346af4..c07bb18 100644
--- a/lib/common-tests.sh
+++ b/lib/common-tests.sh
@@ -178,3 +178,112 @@ function get_host_initrd() {
 exit 1
 fi
 }
+
+function cirros_network_init() {
+rootdir=$1
+ifile=`mktemp`
+# Create static network config
+cat >$ifile </dev/null | head -1`
+}
+
+function get_cirros_initrd() {
+bootdir=$1
+basename `find $bootdir -name initrd* 2>/dev/null | head -1`
+}
+
+function cirros_grub_cfg() {
+rootdir=$1
+get-pvgrub $CIRROS_ARCH
+grubroot="`echo $CIRROS_GRUB_CFG | cut -d ')' -f 1`)"
+grubcfg="`echo $CIRROS_GRUB_CFG | cut -d ')' -f 2`"
+grubdir=`dirname $grubcfg`
+bootdir=`dirname $grubdir`
+tmpgrubcfg=`mktemp`
+cat > $tmpgrubcfg <https://download.cirros-cloud.net/;
+CIRROS_VERSION="0.3.5"
+CIRROS_DOWNLOADS=$BASEDIR/downloads
+CIRROS_KERNEL_FILE=cirros-$CIRROS_VERSION-$CIRROS_ARCH-kernel
+CIRROS_INITRD_FILE=cirros-$CIRROS_VERSION-$CIRROS_ARCH-initramfs
+CIRROS_ROOTFS_FILE=cirros-$CIRROS_VERSION-$CIRROS_ARCH-rootfs.img
+CIRROS_DISK_FILE=cirros-$CIRROS_VERSION-$CIRROS_ARCH-disk.img
+CIRROS_KERNEL_URL=$CIRROS_BASE_URL/$CIRROS_VERSION/$CIRROS_KERNEL_FILE
+CIRROS_INITRD_URL=$CIRROS_BASE_URL/$CIRROS_VERSION/$CIRROS_INITRD_FILE
+CIRROS_ROOTFS_URL=$CIRROS_BASE_URL/$CIRROS_VERSION/$CIRROS_ROOTFS_FILE.gz
+CIRROS_DISK_URL=$CIRROS_BASE_URL/$CIRROS_VERSION/$CIRROS_DISK_FILE
+CIRROS_GRUB_CFG="(xen/xvda,msdos1)/boot/grub/grub.cfg"
diff --git a/tests-configs/config-cirros_x86_64 
b/tests-configs/config-cirros_x86_64
new file mode 100644
index 000..7b78316
--- /dev/null
+++ b/tests-configs/config-cirros_x86_64
@@ -0,0 +1,13 @@
+CIRROS_ARCH=x86_64
+CIRROS_BASE_URL="https://download.cirros-cloud.net/;
+CIRROS_VERSION="0.3.5"
+CIRROS_DOWNLOADS=$BASEDIR/downloads
+CIRROS_KERNEL_FILE=cirros-$CIRROS_VERSION-$CIRROS_ARCH-kernel
+CIRROS_INITRD_FILE=cirros-$CIRROS_VERSION-$CIRROS_ARCH-initramfs
+CIRROS_ROOTFS_FILE=cirros-$CIRROS_VERSION-$CIRROS_ARCH-rootfs.img
+CIRROS_DISK_FILE=cirros-$CIRROS_VERSION-$CIRROS_ARCH-disk.img
+CIRROS_KERNEL_URL=$CIRROS_BASE_URL/$CIRROS_VERSION/$CIRROS_KERNEL_FILE
+CIRROS_INITRD_URL=$CIRROS_BASE_URL/$CIRROS_VERSION/$CIRROS_INITRD_FILE
+CIRROS_ROOTFS_URL=$CIRROS_BASE_URL/$CIRROS_VERSION/$CIRROS_ROOTFS_FILE.gz
+CIRROS_DISK_URL=$CIRROS_BASE_URL/$CIRROS_VERSION/$CIRROS_DISK_FILE
+CIRROS_GRUB_CFG="(xen/xvda,msdos1)/boot/grub/grub.cfg"
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH] Fix a typo in lopartsetup

2017-03-25 Thread Géza Gémes
Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 scripts/lopartsetup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lopartsetup b/scripts/lopartsetup
index da28b6e..e35b755 100755
--- a/scripts/lopartsetup
+++ b/scripts/lopartsetup
@@ -59,7 +59,7 @@ if [ `fdisk -lu $filename 2>/dev/null | grep -e "^Units = " | 
wc -l` -eq 1 ]
 then
 unitstring="^Units = "
 column=9
-else if [ `fdisk -lu $filename 2>/dev/null | grep -e "^Units:" | wc -l` -eq 1 ]
+elif [ `fdisk -lu $filename 2>/dev/null | grep -e "^Units:" | wc -l` -eq 1 ]
 then
 unitstring="^Units:"
 column=8
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [raisin][PATCH] Fix a typo in lopartsetup

2017-03-25 Thread Géza Gémes
Unfortuntely my latest patch fixinf lopartsetup had two typos, which
have fixed each other. Unfortunately only one of them got fixed,
causing lopartsetup to misbehave. This patch fixes the other typo too.

Géza Gémes (1):
  Fix a typo in lopartsetup

 scripts/lopartsetup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 09/11] Introduce cirros-minios-stubdom-pvhvm test

2017-03-24 Thread Géza Gémes
This test is similar to cirros-minios-stubdom-hvm test, differing by
explicitly exposing the xen netfront and blockfront drivers

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-minios-stubdom-pvhvm | 27 +++
 tests/series  |  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 tests/cirros-minios-stubdom-pvhvm

diff --git a/tests/cirros-minios-stubdom-pvhvm 
b/tests/cirros-minios-stubdom-pvhvm
new file mode 100644
index 000..cff4863
--- /dev/null
+++ b/tests/cirros-minios-stubdom-pvhvm
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-minios-stubdom-pvhvm-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-minios-stubdom-pvhvm-test() {
+testdir=`mktemp -d`
+set_up_cirros_disk $testdir
+cat >$testdir/cirros-minios-stubdom-pvhvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 04/11] Introduce cirros-pygrub-pv test

2017-03-24 Thread Géza Gémes
This test verifies booting the cirros image using pygrub

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-pygrub-pv | 24 
 tests/series   |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 tests/cirros-pygrub-pv

diff --git a/tests/cirros-pygrub-pv b/tests/cirros-pygrub-pv
new file mode 100644
index 000..149501f
--- /dev/null
+++ b/tests/cirros-pygrub-pv
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-pygrub-pv-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-pygrub-pv-test() {
+testdir=`mktemp -d`
+set_up_cirros_disk $testdir
+cat >$testdir/cirros-pygrub-pv.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [raisin][PATCH 00/11] pygrub fix + cirros tests + lopartsetup fix

2017-03-24 Thread Géza Gémes
First patch moves python2.7/site-packages/* to python2.7/dist-packages/
at debian package build, this fixes pygrub imports.

Cirros tests are also introduced by this series of patches.
Changes since the previous patchsets:
 - Downloaded cirros components are kept in a separate folder
 - Each test sets up its own images, keeping the downloaded
parts intact
 - qemu-img and pvgrub detection moved to common-functions

There is one patch which fixes lopartsetup with fdisk from newer util-linux

Géza Gémes (11):
  Fix installation of python libs
  Introduce cirros tests
  Introduce cirros-separate-kernel-pv test
  Introduce cirros-pygrub-pv test
  Introduce cirros-pvgrub2-pv test
  Introduce cirros-qemu-hvm test
  Introduce cirros-minios-stubdom-hvm test
  Introduce cirros-qemu-pvhvm test
  Introduce cirros-minios-stubdom-pvhvm test
  Fix lopartsetup for util-linux >= 2.27.1
  Enable cirros tests in the default config

 defconfig  |   2 +-
 lib/common-functions.sh|  23 +++
 lib/common-tests.sh| 126 +
 scripts/lopartsetup|  18 +-
 scripts/mkdeb  |   3 +
 tests-configs/config-cirros_x86_32 |  13 
 tests-configs/config-cirros_x86_64 |  13 
 tests/cirros-minios-stubdom-hvm|  26 
 tests/cirros-minios-stubdom-pvhvm  |  27 
 tests/cirros-pvgrub2-pv|  24 +++
 tests/cirros-pygrub-pv |  24 +++
 tests/cirros-qemu-hvm  |  25 
 tests/cirros-qemu-pvhvm|  26 
 tests/cirros-separate-kernel-pv|  26 
 tests/series   |   7 +++
 15 files changed, 381 insertions(+), 2 deletions(-)
 create mode 100644 tests-configs/config-cirros_x86_32
 create mode 100644 tests-configs/config-cirros_x86_64
 create mode 100644 tests/cirros-minios-stubdom-hvm
 create mode 100644 tests/cirros-minios-stubdom-pvhvm
 create mode 100644 tests/cirros-pvgrub2-pv
 create mode 100644 tests/cirros-pygrub-pv
 create mode 100644 tests/cirros-qemu-hvm
 create mode 100644 tests/cirros-qemu-pvhvm
 create mode 100644 tests/cirros-separate-kernel-pv

-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 06/11] Introduce cirros-qemu-hvm test

2017-03-24 Thread Géza Gémes
This test is the cirros equivalent of the bussybox-hvm test

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-qemu-hvm | 25 +
 tests/series  |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 tests/cirros-qemu-hvm

diff --git a/tests/cirros-qemu-hvm b/tests/cirros-qemu-hvm
new file mode 100644
index 000..7a2be1b
--- /dev/null
+++ b/tests/cirros-qemu-hvm
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-qemu-hvm-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-qemu-hvm-test() {
+testdir=`mktemp -d`
+set_up_cirros_disk $testdir
+cat >$testdir/cirros-qemu-hvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 11/11] Enable cirros tests in the default config

2017-03-24 Thread Géza Gémes
The existing cirros tests are enabled, with the following
exceptions:
cirros-minios-stubdom-hvm and cirros-minios-stubdom-pvhvm are
skipped as raisin does not install the stubdom

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/defconfig b/defconfig
index f8ef398..bdacc7e 100644
--- a/defconfig
+++ b/defconfig
@@ -31,4 +31,4 @@ GIT_TRANSPORT="git"
 # Tests
 ## All tests: busybox-pv busybox-hvm
 ## ENABLED_TESTS is the list of test run by raise test
-ENABLED_TESTS="busybox-pv busybox-hvm"
+ENABLED_TESTS="busybox-pv busybox-hvm cirros-separate-kernel-pv 
cirros-pygrub-pv cirros-pvgrub2-pv cirros-qemu-hvm cirros-qemu-pvhvm"
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 08/11] Introduce cirros-qemu-pvhvm test

2017-03-24 Thread Géza Gémes
This test is similar to cirros-qemu-hvm test, differing by
explicitly exposing the xen netfront and blockfront drivers

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-qemu-pvhvm | 26 ++
 tests/series|  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 tests/cirros-qemu-pvhvm

diff --git a/tests/cirros-qemu-pvhvm b/tests/cirros-qemu-pvhvm
new file mode 100644
index 000..bf74529
--- /dev/null
+++ b/tests/cirros-qemu-pvhvm
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-qemu-pvhvm-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-qemu-pvhvm-test() {
+testdir=`mktemp -d`
+set_up_cirros_disk $testdir
+cat >$testdir/cirros-qemu-pvhvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 07/11] Introduce cirros-minios-stubdom-hvm test

2017-03-24 Thread Géza Gémes
This test verifies a cirros based hvm domain using a minios based
stubdom as its device model

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-minios-stubdom-hvm | 26 ++
 tests/series|  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 tests/cirros-minios-stubdom-hvm

diff --git a/tests/cirros-minios-stubdom-hvm b/tests/cirros-minios-stubdom-hvm
new file mode 100644
index 000..614b487
--- /dev/null
+++ b/tests/cirros-minios-stubdom-hvm
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-minios-stubdom-hvm-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-minios-stubdom-hvm-test() {
+testdir=`mktemp -d`
+set_up_cirros_disk $testdir
+cat >$testdir/cirros-minios-stubdom-hvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 05/11] Introduce cirros-pvgrub2-pv test

2017-03-24 Thread Géza Gémes
This test verifies booting the cirros image using pvgrub2

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-pvgrub2-pv | 24 
 tests/series|  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 tests/cirros-pvgrub2-pv

diff --git a/tests/cirros-pvgrub2-pv b/tests/cirros-pvgrub2-pv
new file mode 100644
index 000..f48617e
--- /dev/null
+++ b/tests/cirros-pvgrub2-pv
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-pvgrub2-pv-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-pvgrub2-pv-test() {
+testdir=`mktemp -d`
+set_up_cirros_disk $testdir grub_install
+cat >$testdir/cirros-pvgrub2-pv.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 02/11] Introduce cirros tests

2017-03-24 Thread Géza Gémes
Add support for using cirros images in raisin tests

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 lib/common-functions.sh|  23 +++
 lib/common-tests.sh| 126 +
 tests-configs/config-cirros_x86_32 |  13 
 tests-configs/config-cirros_x86_64 |  13 
 4 files changed, 175 insertions(+)
 create mode 100644 tests-configs/config-cirros_x86_32
 create mode 100644 tests-configs/config-cirros_x86_64

diff --git a/lib/common-functions.sh b/lib/common-functions.sh
index d4476f3..d82d7ab 100644
--- a/lib/common-functions.sh
+++ b/lib/common-functions.sh
@@ -439,3 +439,26 @@ function uninstall_package() {
 error_echo "Don't know how to uninstall packages on $DISTRO"
 fi
 }
+
+function get-qemu-img() {
+set +e
+QEMU_IMG=`which qemu-img`
+set -e
+if [[ -z "$QEMU_IMG" ]]
+then
+QEMU_IMG="/usr/lib/xen/bin/qemu-img"
+fi
+export QEMU_IMG
+}
+
+function get-pvgrub() {
+ARCH=$1
+set +e
+PVGRUB=`which grub-${ARCH}-xen`
+set -e
+if [[ -z "$PVGRUB" ]]
+then
+PVGRUB="/usr/lib/xen/boot/grub-${ARCH}-xen"
+fi
+export PVGRUB
+}
diff --git a/lib/common-tests.sh b/lib/common-tests.sh
index d346af4..1deaf4f 100644
--- a/lib/common-tests.sh
+++ b/lib/common-tests.sh
@@ -178,3 +178,129 @@ function get_host_initrd() {
 exit 1
 fi
 }
+
+function cirros_network_init() {
+rootdir=$1
+ifile=`mktemp`
+# Create static network config
+cat >$ifile </dev/null | head -1`
+}
+
+function get_cirros_initrd() {
+bootdir=$1
+basename `find $bootdir -name initrd* 2>/dev/null | head -1`
+}
+
+function cirros_grub_cfg() {
+rootdir=$1
+grubroot="`echo $CIRROS_GRUB_CFG | cut -d ')' -f 1`)"
+grubcfg="`echo $CIRROS_GRUB_CFG | cut -d ')' -f 2`"
+grubdir=`dirname $grubcfg`
+bootdir=`dirname $grubdir`
+tmpgrubcfg=`mktemp`
+cat > $tmpgrubcfg <https://download.cirros-cloud.net/;
+CIRROS_VERSION="0.3.5"
+CIRROS_DOWNLOADS=$BASEDIR/downloads
+CIRROS_KERNEL_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-kernel
+CIRROS_INITRD_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-initramfs
+CIRROS_ROOTFS_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs.img
+CIRROS_DISK_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img
+CIRROS_KERNEL_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_KERNEL_FILE}
+CIRROS_INITRD_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_INITRD_FILE}
+CIRROS_ROOTFS_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_ROOTFS_FILE}.gz
+CIRROS_DISK_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_DISK_FILE}
+CIRROS_GRUB_CFG="(xen/xvda,msdos1)/boot/grub/grub.cfg"
diff --git a/tests-configs/config-cirros_x86_64 
b/tests-configs/config-cirros_x86_64
new file mode 100644
index 000..72cf489
--- /dev/null
+++ b/tests-configs/config-cirros_x86_64
@@ -0,0 +1,13 @@
+CIRROS_ARCH=x86_64
+CIRROS_BASE_URL="https://download.cirros-cloud.net/;
+CIRROS_VERSION="0.3.5"
+CIRROS_DOWNLOADS=$BASEDIR/downloads
+CIRROS_KERNEL_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-kernel
+CIRROS_INITRD_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-initramfs
+CIRROS_ROOTFS_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs.img
+CIRROS_DISK_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img
+CIRROS_KERNEL_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_KERNEL_FILE}
+CIRROS_INITRD_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_INITRD_FILE}
+CIRROS_ROOTFS_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_ROOTFS_FILE}.gz
+CIRROS_DISK_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_DISK_FILE}
+CIRROS_GRUB_CFG="(xen/xvda,msdos1)/boot/grub/grub.cfg"
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 03/11] Introduce cirros-separate-kernel-pv test

2017-03-24 Thread Géza Gémes
This test is the cirros equivalent of the bussybox-pv test

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-separate-kernel-pv | 26 ++
 tests/series|  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 tests/cirros-separate-kernel-pv

diff --git a/tests/cirros-separate-kernel-pv b/tests/cirros-separate-kernel-pv
new file mode 100644
index 000..9432481
--- /dev/null
+++ b/tests/cirros-separate-kernel-pv
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-separate-kernel-pv-cleanup() {
+tear_down_cirros_test $testdir
+}
+
+function cirros-separate-kernel-pv-test() {
+testdir=`mktemp -d`
+set_up_cirros_kernel_initrd $testdir
+set_up_cirros_rootfs $testdir
+cat >$testdir/cirros-separate-kernel-pv.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 10/11] Fix lopartsetup for util-linux >= 2.27.1

2017-03-24 Thread Géza Gémes
fdisk from util-linux >= 2.27.1 returns units in a slightly different
structure than earlier versions

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 scripts/lopartsetup | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/scripts/lopartsetup b/scripts/lopartsetup
index 04ce3cc..b675e03 100755
--- a/scripts/lopartsetup
+++ b/scripts/lopartsetup
@@ -53,7 +53,23 @@ then
 exit 1
 fi
 
-unit="`fdisk -lu $filename 2>/dev/null | grep -e "^Units = " | cut -d " " -f 
9`"
+unitstring=""
+column=0
+if [ `fdisk -lu $filename 2>/dev/null | grep -e "^Units = " | wc -l` -eq 1 ]
+then
+unitstring="^Units = "
+column=9
+else if [ `fdisk -lu $filename 2>/dev/null | grep -e "^Units:" | wc -l` -eq 1 ]
+then
+unitstring="^Units:"
+column=8
+else
+exit 1
+fi
+fi
+
+unit="`fdisk -lu $filename 2>/dev/null | grep -e "$unitstring" | cut -d " " -f 
$column`"
+
 index=0
 for i in "`fdisk -lu $filename 2>/dev/null | grep -e "^$filename"`"
 do
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 01/11] Fix installation of python libs

2017-03-24 Thread Géza Gémes
Change deb package build in order to move the site-packages
folder to dist-packages in this way having the libs inluded
in the default PYTHONPATH

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 scripts/mkdeb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/mkdeb b/scripts/mkdeb
index 3796300..fcaf757 100755
--- a/scripts/mkdeb
+++ b/scripts/mkdeb
@@ -46,6 +46,9 @@ then
 rm -rf deb/usr/lib64
 fi
 
+# Make sure that python libs will be in the path
+mv deb/usr/lib/python2.7/site-packages deb/usr/lib/python2.7/dist-packages
+
 # Fill in the debian boilerplate
 mkdir -p deb/DEBIAN
 cat >deb/DEBIAN/control <https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 03/11] Introduce cirros tests

2017-03-21 Thread Géza Gémes
2017. márc. 21. 1:55 ezt írta ("Stefano Stabellini" <sstabell...@kernel.org
>):

On Sun, 19 Mar 2017, Géza Gémes wrote:
> Add support for using cirros images in raisin tests
>
> Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
> ---
>  configs/config-cirros |  44 ++
>  defconfig |   2 +
>  lib/common-tests.sh   | 102 ++

>  3 files changed, 148 insertions(+)
>  create mode 100644 configs/config-cirros
>
> diff --git a/configs/config-cirros b/configs/config-cirros
> new file mode 100644
> index 000..fa2823e
> --- /dev/null
> +++ b/configs/config-cirros

The files under configs are meant to contain the git urls and software
versions of each component to build. It is not the right place for all
these cirros related variables.

Instead, I would move config-cirros to a new top level directory, maybe
I would call it "tests-configs".



> @@ -0,0 +1,44 @@
> +CIRROS_BASE_URL="https://download.cirros-cloud.net/;
> +CIRROS_VERSION="0.3.5"
> +
> +source `pwd`/lib/common-functions.sh
> +get_arch
> +case $RAISIN_ARCH in
> +x86_64)
> +CIRROS_ARCH=x86_64
> +;;
> +x86_32)
> +CIRROS_ARCH=i386
> +;;
> +*)
> +echo $PREPEND cirros tests only valid on x86, 32 or 64 bit
> +exit 1
> +esac
> +
> +CIRROS_KERNEL_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-kernel
> +CIRROS_INITRD_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-initramfs
> +CIRROS_ROOTFS_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs.img
> +CIRROS_DISK_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img
> +CIRROS_KERNEL_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${
CIRROS_KERNEL_FILE}
> +CIRROS_INITRD_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${
CIRROS_INITRD_FILE}
> +CIRROS_ROOTFS_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${
CIRROS_ROOTFS_FILE}.gz
> +CIRROS_DISK_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_DISK_FILE}
> +
> +CIRROS_GRUB_CFG="(xen/xvda,msdos1)/boot/grub/grub.cfg"
> +

I like to keep the config files as simple as possible, with just
parameters and variable assignments. Ideally, we would have one
config-cirros file with only varibles, like configs/config-master for
example. Everything else should be elsewhere. I would even go as far as
removing the get_arch call above, writing two fully static cirros config
files, one for x86_64 and one for x86_32.


> +set +e
> +QEMU_IMG=`which qemu-img`
> +set -e
> +if [[ -z "$QEMU_IMG" ]]
> +then
> +QEMU_IMG="/usr/lib/xen/bin/qemu-img"
> +fi
> +
> +set +e
> +PVGRUB=`which grub-${CIRROS_ARCH}-xen`
> +set -e
> +if [[ -z "$PVGRUB" ]]
> +then
> +PVGRUB="/usr/lib/xen/boot/grub-${CIRROS_ARCH}-xen"
> +fi

I would move the detection of QEMU_IMG and PVGRUB to functions in
lib/common-functions.sh.


> diff --git a/defconfig b/defconfig
> index f8ef398..111554e 100644
> --- a/defconfig
> +++ b/defconfig
> @@ -32,3 +32,5 @@ GIT_TRANSPORT="git"
>  ## All tests: busybox-pv busybox-hvm
>  ## ENABLED_TESTS is the list of test run by raise test
>  ENABLED_TESTS="busybox-pv busybox-hvm"
> +
> +. configs/config-cirros
> diff --git a/lib/common-tests.sh b/lib/common-tests.sh
> index d346af4..79815ce 100644
> --- a/lib/common-tests.sh
> +++ b/lib/common-tests.sh
> @@ -178,3 +178,105 @@ function get_host_initrd() {
>  exit 1
>  fi
>  }
> +
> +function cirros_network_init() {
> +rootdir=$1
> +# Configure static ip
> +$SUDO sed -i -e 's/iface eth0 inet dhcp/iface eth0 inet static/'
${rootdir}/etc/network/interfaces
> +$SUDO sed -i -e '/iface eth0 inet static/a\address 169.254.0.2'
${rootdir}/etc/network/interfaces
> +$SUDO sed -i -e '/address/a\network 169.254.0.0'
${rootdir}/etc/network/interfaces
> +$SUDO sed -i -e '/network/a\broadcast 169.254.0.255'
${rootdir}/etc/network/interfaces
> +$SUDO sed -i -e '/broadcast/a\netmask 255.255.255.0'
${rootdir}/etc/network/interfaces

I think that it would be more future-proof to just generate and
overwrite ${rootdir}/etc/network/interfaces with our own. Also in
general we don't use ${} for variables.


> +# Disable cloud-init
> +$SUDO rm -f ${rootdir}/etc/rc3.d/S*cirros*ds*
> +$SUDO rm -f ${rootdir}/etc/rc3.d/S*-cirros-userdata
> +}
> +
> +function get_cirros_kernel() {
> +bootdir=$1
> +basename `find $bootdir -name vmlinuz* 2>/dev/null | head -1`
> +}
> +
> +function get_cirros_initrd() {
> +bootdir=$1
> +basename `find $bootdir -name initrd* 2>/dev/null | head -1`
> +}
> +
> +function cirros_grub_cfg() {
> +rootdir=$1
> +

Re: [Xen-devel] [PATCH 01/11] Fix installation of python libs

2017-03-21 Thread Géza Gémes
2017. márc. 21. 0:54 ezt írta ("Stefano Stabellini" <sstabell...@kernel.org
>):

On Sun, 19 Mar 2017, Géza Gémes wrote:
> Change deb package build in order to symlink the files installed
> to site-packages to dist-packages to have them inluded in the
> default PYTHONPATH
>
> Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
> ---
>  scripts/mkdeb | 9 +
>  1 file changed, 9 insertions(+)
>
> diff --git a/scripts/mkdeb b/scripts/mkdeb
> index 3796300..23bcc2a 100755
> --- a/scripts/mkdeb
> +++ b/scripts/mkdeb
> @@ -46,6 +46,15 @@ then
>  rm -rf deb/usr/lib64
>  fi
>
> +# Make sure that python libs will be in the path
> +mkdir -p deb/usr/lib/python2.7/dist-packages/
> +cd deb/usr/lib/python2.7/dist-packages/
> +for file in `ls ../site-packages`
> +do
> +ln -s ../site-packages/$file .
> +done
> +cd -

Actually for Debian I think it makes sense to move (not link) the files
to dist-packages, what do you think?


As I haven't tried on anything else than ubuntu 14.04 I was afraid of
breaking it elsewhere. But if you are aware that Debian and forks are using
dist-packages, I will change the symlink to a move.



>  # Fill in the debian boilerplate
>  mkdir -p deb/DEBIAN
>  cat >deb/DEBIAN/control < --
> 2.7.4
>


Cheers

Géza
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 11/11] Enable cirros tests in the default config

2017-03-19 Thread Géza Gémes
The existing cirros tests are enabled, with the following
exceptions:

cirros-minios-stubdom-hvm and cirros-minios-stubdom-pvhvm are
skipped as raisin does not install the stubdom

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/defconfig b/defconfig
index 111554e..f3b1759 100644
--- a/defconfig
+++ b/defconfig
@@ -31,6 +31,6 @@ GIT_TRANSPORT="git"
 # Tests
 ## All tests: busybox-pv busybox-hvm
 ## ENABLED_TESTS is the list of test run by raise test
-ENABLED_TESTS="busybox-pv busybox-hvm"
+ENABLED_TESTS="busybox-pv busybox-hvm cirros-separate-kernel-pv 
cirros-pygrub-pv cirros-pvgrub2-pv cirros-qemu-hvm cirros-qemu-pvhvm"
 
 . configs/config-cirros
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 10/11] Introduce cirros-minios-stubdom-pvhvm test

2017-03-19 Thread Géza Gémes
This test is similar to cirros-minios-stubdom-hvm test, differing by
explicitly exposing the xen netfront and blockfront drivers

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-minios-stubdom-pvhvm | 30 ++
 tests/series  |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 tests/cirros-minios-stubdom-pvhvm

diff --git a/tests/cirros-minios-stubdom-pvhvm 
b/tests/cirros-minios-stubdom-pvhvm
new file mode 100644
index 000..73b6834
--- /dev/null
+++ b/tests/cirros-minios-stubdom-pvhvm
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-minios-stubdom-pvhvm-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-minios-stubdom-pvhvm-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-minios-stubdom-pvhvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 09/11] Introduce cirros-qemu-pvhvm test

2017-03-19 Thread Géza Gémes
This test is similar to cirros-qemu-hvm test, differing by
explicitly exposing the xen netfront and blockfront drivers

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-qemu-pvhvm | 29 +
 tests/series|  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 tests/cirros-qemu-pvhvm

diff --git a/tests/cirros-qemu-pvhvm b/tests/cirros-qemu-pvhvm
new file mode 100644
index 000..28c4f9d
--- /dev/null
+++ b/tests/cirros-qemu-pvhvm
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-qemu-pvhvm-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-qemu-pvhvm-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-qemu-pvhvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 02/11] Fix lopartsetup parsing of fdisk output

2017-03-19 Thread Géza Gémes
Change lopartsetup in order to handle partitions, which have the
boot flag enabled.

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 scripts/lopartsetup | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/lopartsetup b/scripts/lopartsetup
index bf33a28..04ce3cc 100755
--- a/scripts/lopartsetup
+++ b/scripts/lopartsetup
@@ -58,7 +58,11 @@ index=0
 for i in "`fdisk -lu $filename 2>/dev/null | grep -e "^$filename"`"
 do
 index=$((index+1))
-offset=`echo $i | tr -s " " | cut -d " " -f 2`
+offset=`echo "$i" | tr -s " " | cut -d " " -f 2`
+if [[ "$offset" == "*" ]]
+then
+offset=`echo "$i" | tr -s " " | cut -d " " -f 3`
+fi
 offset=$((unit*offset))
 
 _create_loop_device "$filename" "$index" "$offset"
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 01/11] Fix installation of python libs

2017-03-19 Thread Géza Gémes
Change deb package build in order to symlink the files installed
to site-packages to dist-packages to have them inluded in the
default PYTHONPATH

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 scripts/mkdeb | 9 +
 1 file changed, 9 insertions(+)

diff --git a/scripts/mkdeb b/scripts/mkdeb
index 3796300..23bcc2a 100755
--- a/scripts/mkdeb
+++ b/scripts/mkdeb
@@ -46,6 +46,15 @@ then
 rm -rf deb/usr/lib64
 fi
 
+# Make sure that python libs will be in the path
+mkdir -p deb/usr/lib/python2.7/dist-packages/
+cd deb/usr/lib/python2.7/dist-packages/
+for file in `ls ../site-packages`
+do
+ln -s ../site-packages/$file .
+done
+cd -
+
 # Fill in the debian boilerplate
 mkdir -p deb/DEBIAN
 cat >deb/DEBIAN/control <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 04/11] Introduce cirros-separate-kernel-pv test

2017-03-19 Thread Géza Gémes
This test is the cirros equivalent of the bussybox-pv test

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-separate-kernel-pv | 28 
 tests/series|  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 tests/cirros-separate-kernel-pv

diff --git a/tests/cirros-separate-kernel-pv b/tests/cirros-separate-kernel-pv
new file mode 100644
index 000..bbbcf7d
--- /dev/null
+++ b/tests/cirros-separate-kernel-pv
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-separate-kernel-pv-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-separate-kernel-pv-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-separate-kernel-pv.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 05/11] Introduce cirros-pygrub-pv test

2017-03-19 Thread Géza Gémes
This test verifies booting the cirros image using pygrub

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-pygrub-pv | 27 +++
 tests/series   |  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 tests/cirros-pygrub-pv

diff --git a/tests/cirros-pygrub-pv b/tests/cirros-pygrub-pv
new file mode 100644
index 000..6b86573
--- /dev/null
+++ b/tests/cirros-pygrub-pv
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-pygrub-pv-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-pygrub-pv-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-pygrub-pv.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 06/11] Introduce cirros-pvgrub2-pv test

2017-03-19 Thread Géza Gémes
This test verifies booting the cirros image using pvgrub2

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-pvgrub2-pv | 27 +++
 tests/series|  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 tests/cirros-pvgrub2-pv

diff --git a/tests/cirros-pvgrub2-pv b/tests/cirros-pvgrub2-pv
new file mode 100644
index 000..5c746fe
--- /dev/null
+++ b/tests/cirros-pvgrub2-pv
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-pvgrub2-pv-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-pvgrub2-pv-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-pvgrub2-pv.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [raisin][PATCH 00/11] pygrub fix + cirros tests

2017-03-19 Thread Géza Gémes
First patch adds a symlink from python2.7/site-packages/*
to python2.7/dist-packages/ at debian package build, this fixes
pygrub imports.

The rest of the patches are the cirros tests rebased to current master
and the python fix, plus a trivial fix for the pygrub test. in this
new patchset pygrub test is also added to the ones in the default set.

Géza Gémes (11):
  Fix installation of python libs
  Fix lopartsetup parsing of fdisk output
  Introduce cirros tests
  Introduce cirros-separate-kernel-pv test
  Introduce cirros-pygrub-pv test
  Introduce cirros-pvgrub2-pv test
  Introduce cirros-qemu-hvm test
  Introduce cirros-minios-stubdom-hvm test
  Introduce cirros-qemu-pvhvm test
  Introduce cirros-minios-stubdom-pvhvm test
  Enable cirros tests in the default config

 configs/config-cirros |  44 
 defconfig |   4 +-
 lib/common-tests.sh   | 102 ++
 scripts/lopartsetup   |   6 ++-
 scripts/mkdeb |   9 
 tests/cirros-minios-stubdom-hvm   |  29 +++
 tests/cirros-minios-stubdom-pvhvm |  30 +++
 tests/cirros-pvgrub2-pv   |  27 ++
 tests/cirros-pygrub-pv|  27 ++
 tests/cirros-qemu-hvm |  28 +++
 tests/cirros-qemu-pvhvm   |  29 +++
 tests/cirros-separate-kernel-pv   |  28 +++
 tests/series  |   7 +++
 13 files changed, 368 insertions(+), 2 deletions(-)
 create mode 100644 configs/config-cirros
 create mode 100644 tests/cirros-minios-stubdom-hvm
 create mode 100644 tests/cirros-minios-stubdom-pvhvm
 create mode 100644 tests/cirros-pvgrub2-pv
 create mode 100644 tests/cirros-pygrub-pv
 create mode 100644 tests/cirros-qemu-hvm
 create mode 100644 tests/cirros-qemu-pvhvm
 create mode 100644 tests/cirros-separate-kernel-pv

-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 07/11] Introduce cirros-qemu-hvm test

2017-03-19 Thread Géza Gémes
This test is the cirros equivalent of the bussybox-hvm test

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-qemu-hvm | 28 
 tests/series  |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 tests/cirros-qemu-hvm

diff --git a/tests/cirros-qemu-hvm b/tests/cirros-qemu-hvm
new file mode 100644
index 000..963d380
--- /dev/null
+++ b/tests/cirros-qemu-hvm
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-qemu-hvm-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-qemu-hvm-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-qemu-hvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 08/11] Introduce cirros-minios-stubdom-hvm test

2017-03-19 Thread Géza Gémes
This test verifies a cirros based hvm domain using a minios based
stubdom as its device model

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-minios-stubdom-hvm | 29 +
 tests/series|  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 tests/cirros-minios-stubdom-hvm

diff --git a/tests/cirros-minios-stubdom-hvm b/tests/cirros-minios-stubdom-hvm
new file mode 100644
index 000..86ced49
--- /dev/null
+++ b/tests/cirros-minios-stubdom-hvm
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-minios-stubdom-hvm-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-minios-stubdom-hvm-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-minios-stubdom-hvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 03/11] Introduce cirros tests

2017-03-19 Thread Géza Gémes
Add support for using cirros images in raisin tests

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 configs/config-cirros |  44 ++
 defconfig |   2 +
 lib/common-tests.sh   | 102 ++
 3 files changed, 148 insertions(+)
 create mode 100644 configs/config-cirros

diff --git a/configs/config-cirros b/configs/config-cirros
new file mode 100644
index 000..fa2823e
--- /dev/null
+++ b/configs/config-cirros
@@ -0,0 +1,44 @@
+CIRROS_BASE_URL="https://download.cirros-cloud.net/;
+CIRROS_VERSION="0.3.5"
+
+source `pwd`/lib/common-functions.sh
+get_arch
+case $RAISIN_ARCH in
+x86_64)
+CIRROS_ARCH=x86_64
+;;
+x86_32)
+CIRROS_ARCH=i386
+;;
+*)
+echo $PREPEND cirros tests only valid on x86, 32 or 64 bit
+exit 1
+esac
+
+CIRROS_KERNEL_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-kernel
+CIRROS_INITRD_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-initramfs
+CIRROS_ROOTFS_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs.img
+CIRROS_DISK_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img
+CIRROS_KERNEL_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_KERNEL_FILE}
+CIRROS_INITRD_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_INITRD_FILE}
+CIRROS_ROOTFS_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_ROOTFS_FILE}.gz
+CIRROS_DISK_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_DISK_FILE}
+
+CIRROS_GRUB_CFG="(xen/xvda,msdos1)/boot/grub/grub.cfg"
+
+set +e
+QEMU_IMG=`which qemu-img`
+set -e
+if [[ -z "$QEMU_IMG" ]]
+then
+QEMU_IMG="/usr/lib/xen/bin/qemu-img"
+fi
+
+set +e
+PVGRUB=`which grub-${CIRROS_ARCH}-xen`
+set -e
+if [[ -z "$PVGRUB" ]]
+then
+PVGRUB="/usr/lib/xen/boot/grub-${CIRROS_ARCH}-xen"
+fi
+
diff --git a/defconfig b/defconfig
index f8ef398..111554e 100644
--- a/defconfig
+++ b/defconfig
@@ -32,3 +32,5 @@ GIT_TRANSPORT="git"
 ## All tests: busybox-pv busybox-hvm
 ## ENABLED_TESTS is the list of test run by raise test
 ENABLED_TESTS="busybox-pv busybox-hvm"
+
+. configs/config-cirros
diff --git a/lib/common-tests.sh b/lib/common-tests.sh
index d346af4..79815ce 100644
--- a/lib/common-tests.sh
+++ b/lib/common-tests.sh
@@ -178,3 +178,105 @@ function get_host_initrd() {
 exit 1
 fi
 }
+
+function cirros_network_init() {
+rootdir=$1
+# Configure static ip
+$SUDO sed -i -e 's/iface eth0 inet dhcp/iface eth0 inet static/' 
${rootdir}/etc/network/interfaces
+$SUDO sed -i -e '/iface eth0 inet static/a\address 169.254.0.2' 
${rootdir}/etc/network/interfaces
+$SUDO sed -i -e '/address/a\network 169.254.0.0' 
${rootdir}/etc/network/interfaces
+$SUDO sed -i -e '/network/a\broadcast 169.254.0.255' 
${rootdir}/etc/network/interfaces
+$SUDO sed -i -e '/broadcast/a\netmask 255.255.255.0' 
${rootdir}/etc/network/interfaces
+# Disable cloud-init
+$SUDO rm -f ${rootdir}/etc/rc3.d/S*cirros*ds*
+$SUDO rm -f ${rootdir}/etc/rc3.d/S*-cirros-userdata
+}
+
+function get_cirros_kernel() {
+bootdir=$1
+basename `find $bootdir -name vmlinuz* 2>/dev/null | head -1`
+}
+
+function get_cirros_initrd() {
+bootdir=$1
+basename `find $bootdir -name initrd* 2>/dev/null | head -1`
+}
+
+function cirros_grub_cfg() {
+rootdir=$1
+grubcfg="`echo $CIRROS_GRUB_CFG | cut -d ')' -f 2`"
+grubdir=`dirname $grubcfg`
+bootdir=`dirname $grubdir`
+tmpgrubcfg=`mktemp`
+cat > $tmpgrubcfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH] Fix installation of python libs

2017-03-18 Thread Géza Gémes
Change deb package build in order to symlink the files installed
to site-packages to dist-packages to have them inluded in the
default PYTHONPATH

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 scripts/mkdeb | 9 +
 1 file changed, 9 insertions(+)

diff --git a/scripts/mkdeb b/scripts/mkdeb
index 3796300..23bcc2a 100755
--- a/scripts/mkdeb
+++ b/scripts/mkdeb
@@ -46,6 +46,15 @@ then
 rm -rf deb/usr/lib64
 fi
 
+# Make sure that python libs will be in the path
+mkdir -p deb/usr/lib/python2.7/dist-packages/
+cd deb/usr/lib/python2.7/dist-packages/
+for file in `ls ../site-packages`
+do
+ln -s ../site-packages/$file .
+done
+cd -
+
 # Fill in the debian boilerplate
 mkdir -p deb/DEBIAN
 cat >deb/DEBIAN/control <https://lists.xen.org/xen-devel


[Xen-devel] [raisin][PATCH] Fix installation of python libs

2017-03-18 Thread Géza Gémes
Change installation on ubuntu to symlink the content of site-packages
to dist-packages, so that the libs will be part of the default PYTHONPATH.
This fixes pygrub installed by raisin.

Géza Gémes (1):
  Fix installation of python libs

 scripts/mkdeb | 9 +
 1 file changed, 9 insertions(+)

-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 07/10] Introduce cirros-minios-stubdom-hvm test

2017-03-18 Thread Géza Gémes
This test verifies a cirros based hvm domain using a minios based
stubdom as its device model

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-minios-stubdom-hvm | 29 +
 tests/series|  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 tests/cirros-minios-stubdom-hvm

diff --git a/tests/cirros-minios-stubdom-hvm b/tests/cirros-minios-stubdom-hvm
new file mode 100644
index 000..86ced49
--- /dev/null
+++ b/tests/cirros-minios-stubdom-hvm
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-minios-stubdom-hvm-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-minios-stubdom-hvm-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-minios-stubdom-hvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 06/10] Introduce cirros-qemu-hvm test

2017-03-18 Thread Géza Gémes
This test is the cirros equivalent of the bussybox-hvm test

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-qemu-hvm | 28 
 tests/series  |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 tests/cirros-qemu-hvm

diff --git a/tests/cirros-qemu-hvm b/tests/cirros-qemu-hvm
new file mode 100644
index 000..963d380
--- /dev/null
+++ b/tests/cirros-qemu-hvm
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-qemu-hvm-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-qemu-hvm-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-qemu-hvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 09/10] Introduce cirros-minios-stubdom-pvhvm test

2017-03-18 Thread Géza Gémes
This test is similar to cirros-minios-stubdom-hvm test, differing by
explicitly exposing the xen netfront and blockfront drivers

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-minios-stubdom-pvhvm | 30 ++
 tests/series  |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 tests/cirros-minios-stubdom-pvhvm

diff --git a/tests/cirros-minios-stubdom-pvhvm 
b/tests/cirros-minios-stubdom-pvhvm
new file mode 100644
index 000..73b6834
--- /dev/null
+++ b/tests/cirros-minios-stubdom-pvhvm
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-minios-stubdom-pvhvm-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-minios-stubdom-pvhvm-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-minios-stubdom-pvhvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [raisin][PATCH 00/10] Introduce usage of cirros images

2017-03-18 Thread Géza Gémes
Two tests: cirros-separate-kernel-pv and cirros-qemu-hvm are replicating
the functionality of bussybox-pv and bussybox-hvm respectivelly.
The other tests are testing pv, hvm and pvhvm vms with pygrub, pvgrub
and stubdom configs.

Géza Gémes (10):
  Fix lopartsetup parsing of fdisk output
  Introduce cirros tests
  Introduce cirros-separate-kernel-pv test
  Introduce cirros-pygrub-pv test
  Introduce cirros-pvgrub2-pv test
  Introduce cirros-qemu-hvm test
  Introduce cirros-minios-stubdom-hvm test
  Introduce cirros-qemu-pvhvm test
  Introduce cirros-minios-stubdom-pvhvm test
  Enable cirros tests in the default config

 configs/config-cirros |  44 
 defconfig |   4 +-
 lib/common-tests.sh   | 102 ++
 scripts/lopartsetup   |   6 ++-
 tests/cirros-minios-stubdom-hvm   |  29 +++
 tests/cirros-minios-stubdom-pvhvm |  30 +++
 tests/cirros-pvgrub2-pv   |  27 ++
 tests/cirros-pygrub-pv|  27 ++
 tests/cirros-qemu-hvm |  28 +++
 tests/cirros-qemu-pvhvm   |  29 +++
 tests/cirros-separate-kernel-pv   |  28 +++
 tests/series  |   7 +++
 12 files changed, 359 insertions(+), 2 deletions(-)
 create mode 100644 configs/config-cirros
 create mode 100644 tests/cirros-minios-stubdom-hvm
 create mode 100644 tests/cirros-minios-stubdom-pvhvm
 create mode 100644 tests/cirros-pvgrub2-pv
 create mode 100644 tests/cirros-pygrub-pv
 create mode 100644 tests/cirros-qemu-hvm
 create mode 100644 tests/cirros-qemu-pvhvm
 create mode 100644 tests/cirros-separate-kernel-pv

-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 10/10] Enable cirros tests in the default config

2017-03-18 Thread Géza Gémes
The existing cirros tests are enabled, with the following
exceptions:

cirros-pygrub-pv skipped as raisin installed pygrub has missing
imports

cirros-minios-stubdom-hvm and cirros-minios-stubdom-pvhvm are
skipped as raisin does not install the stubdom

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/defconfig b/defconfig
index 111554e..8f6122b 100644
--- a/defconfig
+++ b/defconfig
@@ -31,6 +31,6 @@ GIT_TRANSPORT="git"
 # Tests
 ## All tests: busybox-pv busybox-hvm
 ## ENABLED_TESTS is the list of test run by raise test
-ENABLED_TESTS="busybox-pv busybox-hvm"
+ENABLED_TESTS="busybox-pv busybox-hvm cirros-separate-kernel-pv 
cirros-pvgrub2-pv cirros-qemu-hvm cirros-qemu-pvhvm"
 
 . configs/config-cirros
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 08/10] Introduce cirros-qemu-pvhvm test

2017-03-18 Thread Géza Gémes
This test is similar to cirros-qemu-hvm test, differing by
explicitly exposing the xen netfront and blockfront drivers

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-qemu-pvhvm | 29 +
 tests/series|  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 tests/cirros-qemu-pvhvm

diff --git a/tests/cirros-qemu-pvhvm b/tests/cirros-qemu-pvhvm
new file mode 100644
index 000..28c4f9d
--- /dev/null
+++ b/tests/cirros-qemu-pvhvm
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-qemu-pvhvm-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-qemu-pvhvm-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-qemu-pvhvm.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 05/10] Introduce cirros-pvgrub2-pv test

2017-03-18 Thread Géza Gémes
This test verifies booting the cirros image using pvgrub2

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-pvgrub2-pv | 27 +++
 tests/series|  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 tests/cirros-pvgrub2-pv

diff --git a/tests/cirros-pvgrub2-pv b/tests/cirros-pvgrub2-pv
new file mode 100644
index 000..5c746fe
--- /dev/null
+++ b/tests/cirros-pvgrub2-pv
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-pvgrub2-pv-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-pvgrub2-pv-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-pvgrub2-pv.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 02/10] Introduce cirros tests

2017-03-18 Thread Géza Gémes
Add support for using cirros images in raisin tests

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 configs/config-cirros |  44 ++
 defconfig |   2 +
 lib/common-tests.sh   | 102 ++
 3 files changed, 148 insertions(+)
 create mode 100644 configs/config-cirros

diff --git a/configs/config-cirros b/configs/config-cirros
new file mode 100644
index 000..fa2823e
--- /dev/null
+++ b/configs/config-cirros
@@ -0,0 +1,44 @@
+CIRROS_BASE_URL="https://download.cirros-cloud.net/;
+CIRROS_VERSION="0.3.5"
+
+source `pwd`/lib/common-functions.sh
+get_arch
+case $RAISIN_ARCH in
+x86_64)
+CIRROS_ARCH=x86_64
+;;
+x86_32)
+CIRROS_ARCH=i386
+;;
+*)
+echo $PREPEND cirros tests only valid on x86, 32 or 64 bit
+exit 1
+esac
+
+CIRROS_KERNEL_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-kernel
+CIRROS_INITRD_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-initramfs
+CIRROS_ROOTFS_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs.img
+CIRROS_DISK_FILE=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img
+CIRROS_KERNEL_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_KERNEL_FILE}
+CIRROS_INITRD_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_INITRD_FILE}
+CIRROS_ROOTFS_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_ROOTFS_FILE}.gz
+CIRROS_DISK_URL=${CIRROS_BASE_URL}/${CIRROS_VERSION}/${CIRROS_DISK_FILE}
+
+CIRROS_GRUB_CFG="(xen/xvda,msdos1)/boot/grub/grub.cfg"
+
+set +e
+QEMU_IMG=`which qemu-img`
+set -e
+if [[ -z "$QEMU_IMG" ]]
+then
+QEMU_IMG="/usr/lib/xen/bin/qemu-img"
+fi
+
+set +e
+PVGRUB=`which grub-${CIRROS_ARCH}-xen`
+set -e
+if [[ -z "$PVGRUB" ]]
+then
+PVGRUB="/usr/lib/xen/boot/grub-${CIRROS_ARCH}-xen"
+fi
+
diff --git a/defconfig b/defconfig
index f8ef398..111554e 100644
--- a/defconfig
+++ b/defconfig
@@ -32,3 +32,5 @@ GIT_TRANSPORT="git"
 ## All tests: busybox-pv busybox-hvm
 ## ENABLED_TESTS is the list of test run by raise test
 ENABLED_TESTS="busybox-pv busybox-hvm"
+
+. configs/config-cirros
diff --git a/lib/common-tests.sh b/lib/common-tests.sh
index d346af4..79815ce 100644
--- a/lib/common-tests.sh
+++ b/lib/common-tests.sh
@@ -178,3 +178,105 @@ function get_host_initrd() {
 exit 1
 fi
 }
+
+function cirros_network_init() {
+rootdir=$1
+# Configure static ip
+$SUDO sed -i -e 's/iface eth0 inet dhcp/iface eth0 inet static/' 
${rootdir}/etc/network/interfaces
+$SUDO sed -i -e '/iface eth0 inet static/a\address 169.254.0.2' 
${rootdir}/etc/network/interfaces
+$SUDO sed -i -e '/address/a\network 169.254.0.0' 
${rootdir}/etc/network/interfaces
+$SUDO sed -i -e '/network/a\broadcast 169.254.0.255' 
${rootdir}/etc/network/interfaces
+$SUDO sed -i -e '/broadcast/a\netmask 255.255.255.0' 
${rootdir}/etc/network/interfaces
+# Disable cloud-init
+$SUDO rm -f ${rootdir}/etc/rc3.d/S*cirros*ds*
+$SUDO rm -f ${rootdir}/etc/rc3.d/S*-cirros-userdata
+}
+
+function get_cirros_kernel() {
+bootdir=$1
+basename `find $bootdir -name vmlinuz* 2>/dev/null | head -1`
+}
+
+function get_cirros_initrd() {
+bootdir=$1
+basename `find $bootdir -name initrd* 2>/dev/null | head -1`
+}
+
+function cirros_grub_cfg() {
+rootdir=$1
+grubcfg="`echo $CIRROS_GRUB_CFG | cut -d ')' -f 2`"
+grubdir=`dirname $grubcfg`
+bootdir=`dirname $grubdir`
+tmpgrubcfg=`mktemp`
+cat > $tmpgrubcfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 03/10] Introduce cirros-separate-kernel-pv test

2017-03-18 Thread Géza Gémes
This test is the cirros equivalent of the bussybox-pv test

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-separate-kernel-pv | 28 
 tests/series|  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 tests/cirros-separate-kernel-pv

diff --git a/tests/cirros-separate-kernel-pv b/tests/cirros-separate-kernel-pv
new file mode 100644
index 000..bbbcf7d
--- /dev/null
+++ b/tests/cirros-separate-kernel-pv
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-separate-kernel-pv-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-separate-kernel-pv-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-separate-kernel-pv.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 04/10] Introduce cirros-pygrub-pv test

2017-03-18 Thread Géza Gémes
This test verifies booting the cirros image using pygrub

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 tests/cirros-pygrub-pv | 27 +++
 tests/series   |  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 tests/cirros-pygrub-pv

diff --git a/tests/cirros-pygrub-pv b/tests/cirros-pygrub-pv
new file mode 100644
index 000..4c15551
--- /dev/null
+++ b/tests/cirros-pygrub-pv
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-pygrub-pv-cleanup() {
+tear_down_cirros_tests $tmpdir
+}
+
+function cirros-pygrub-pv-test() {
+if [[ ! -d $tmpdir ]]
+then
+set_up_cirros_tests
+fi
+cd $tmpdir
+cat >cirros-pygrub-pv.cfg <https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 01/10] Fix lopartsetup parsing of fdisk output

2017-03-18 Thread Géza Gémes
Change lopartsetup in order to handle partitions, which have the
boot flag enabled.

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 scripts/lopartsetup | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/lopartsetup b/scripts/lopartsetup
index bf33a28..04ce3cc 100755
--- a/scripts/lopartsetup
+++ b/scripts/lopartsetup
@@ -58,7 +58,11 @@ index=0
 for i in "`fdisk -lu $filename 2>/dev/null | grep -e "^$filename"`"
 do
 index=$((index+1))
-offset=`echo $i | tr -s " " | cut -d " " -f 2`
+offset=`echo "$i" | tr -s " " | cut -d " " -f 2`
+if [[ "$offset" == "*" ]]
+then
+offset=`echo "$i" | tr -s " " | cut -d " " -f 3`
+fi
 offset=$((unit*offset))
 
 _create_loop_device "$filename" "$index" "$offset"
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH] Allow installation on CentOS

2017-03-06 Thread Géza Gémes
Add $DISTRO = "CentOS"
to the rpm installation targets
complementing Fedora

Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 lib/common-functions.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/common-functions.sh b/lib/common-functions.sh
index 19434c2..d4476f3 100644
--- a/lib/common-functions.sh
+++ b/lib/common-functions.sh
@@ -420,7 +420,7 @@ function install_package() {
 if [[ $DISTRO = "Debian" ]]
 then
 $SUDO dpkg -i "$1".deb
-elif [[  $DISTRO = "Fedora" ]]
+elif [[  $DISTRO = "Fedora" || $DISTRO = "CentOS" ]]
 then
 $SUDO rpm -i --force "$1"-`git show --oneline | head -1 | cut -d " " 
-f 1`-0.$RAISIN_ARCH.rpm
 else
@@ -432,7 +432,7 @@ function uninstall_package() {
 if [[ $DISTRO = "Debian" ]]
 then
 $SUDO dpkg -r "$1"
-elif [[ $DISTRO = "Fedora" ]]
+elif [[ $DISTRO = "Fedora" || $DISTRO = "CentOS" ]]
 then
 $SUDO rpm -e "$1"
 else
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH] [RAISIN] Add installation support for CentOS

2017-03-06 Thread Géza Gémes
Extend the existing Fedora case with CentOS in the install_package function

Géza Gémes (1):
  Allow installation on CentOS

 lib/common-functions.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH] Fix typo in function install

2017-03-06 Thread Géza Gémes
Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 lib/commands.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/commands.sh b/lib/commands.sh
index be445a7..5b653b3 100755
--- a/lib/commands.sh
+++ b/lib/commands.sh
@@ -70,7 +70,7 @@ function unraise() {
 
 function install() {
 # need single braces for filename matching expansion
-if [ ! -f xen-sytem*rpm ] && [ ! -f xen-system*deb ]
+if [ ! -f xen-system*rpm ] && [ ! -f xen-system*deb ]
 then
 error_echo You need to raise build first.
 exit 1
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] Resend: [PATCH] [RAISIN] Fix typo

2017-03-06 Thread Géza Gémes
There is a small typo in the install function causing it ignoring rpms

Géza Gémes (1):
  Fix typo in function install

 lib/commands.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH] [RAISIN] Fix typo

2017-03-06 Thread Géza Gémes
There is a small typo in the install function causing it ignoring rpms

Géza Gémes (1):
  Fix typo in function install

 lib/commands.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH] Fix typo in function install

2017-03-06 Thread Géza Gémes
Signed-off-by: Géza Gémes <geza.ge...@gmail.com>
---
 lib/commands.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/commands.sh b/lib/commands.sh
index be445a7..5b653b3 100755
--- a/lib/commands.sh
+++ b/lib/commands.sh
@@ -70,7 +70,7 @@ function unraise() {
 
 function install() {
 # need single braces for filename matching expansion
-if [ ! -f xen-sytem*rpm ] && [ ! -f xen-system*deb ]
+if [ ! -f xen-system*rpm ] && [ ! -f xen-system*deb ]
 then
 error_echo You need to raise build first.
 exit 1
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] kpartx for raisin hvm tests

2017-02-21 Thread Géza Gémes

On 2017-02-21 23:10, Stefano Stabellini wrote:

On Tue, 21 Feb 2017, Géza Gémes wrote:

Hi,

I've tried to run the raisin test suite, while pv tests pass the hvm tests
fail. I've identified a number of problems, starting with two small disk size
to formating the whole disk and then being unable to install grub to the boot
sector. I've trace down these problems into the incorrect invocation of the
_create_loop_device function in scripts/lopartsetup.

My question: Will it be acceptable if I would replace this part of the code
with a kpartx call? Or introducing kpartx is a too big change in the list of
dependencies?
  
I understand that kpartx makes things much easier, but before

introducing it as a dependency, I would like to understand this problem
a bit better.

Why is _create_loop_device invoked incorrectly? Is it index or offset
that is calculate incorrectly?


Hi Stefano,

In scripts/lopartsetup:56 unit="`fdisk -lu $filename 2>/dev/null | grep 
-e "^Units = " | cut -d " " -f 9`" . Using ubuntu 16.04 (fdisk coming 
from util-linux-2.27.1-6ubuntu3.2) this yields to an empty variable, as:


$sudo fdisk -lu /tmp/tmp.x9UN6uxaG2/busybox-vm-disk 2>/dev/null

Disk /tmp/tmp.x9UN6uxaG2/busybox-vm-disk: 60 MiB, 62914560 bytes, 122880 
sectors

Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Because of this both unit and offset are wrong ( offset=`echo $i | tr -s 
" " | cut -d " " -f 2`, where i=fdisk -lu $filename 2>/dev/null | grep 
-e "^$filename")


As I think that different versions of fdisk will produce different 
results, we either introduce an additional logic for the fdisk version, 
either change this part completely.


Cheers,

Geza



___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] kpartx for raisin hvm tests

2017-02-20 Thread Géza Gémes

Hi,

I've tried to run the raisin test suite, while pv tests pass the hvm 
tests fail. I've identified a number of problems, starting with two 
small disk size to formating the whole disk and then being unable to 
install grub to the boot sector. I've trace down these problems into the 
incorrect invocation of the _create_loop_device function in 
scripts/lopartsetup.


My question: Will it be acceptable if I would replace this part of the 
code with a kpartx call? Or introducing kpartx is a too big change in 
the list of dependencies?


Cheers,

Geza



___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel