[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

On 2017-02-21 23:10, Stefano Stabellini wrote:
On Tue, 21 Feb 2017, Géza Gémes wrote:

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
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.



Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.