From: "Gémes Géza" <geza.gemes@gmail.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: George Dunlap <george.dunlap@citrix.com>,
xen-devel <xen-devel@lists.xen.org>
Subject: Re: kpartx for raisin hvm tests
Date: Wed, 1 Mar 2017 18:48:30 +0100 [thread overview]
Message-ID: <d3bf86cb-50c8-8c1d-d0d7-d9d208069978@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1702271447330.7315@sstabellini-ThinkPad-X260>
2017-02-27 23:52 keltezéssel, Stefano Stabellini írta:
> On Wed, 22 Feb 2017, Géza Gémes wrote:
>> 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.
> It doesn't look like fdisk changed output in this case. It looks like
> the disk doesn't have any partitions in it. Am I right?
>
> It would be easy to add support to lopartsetup to detect disks without
> partitions, and deal with them correctly, without bringing in kpartx.
> However, this scenario shouldn't occur, because lopartsetup is only
> called by create_one_partition, right after creating a partition on the
> disk.
>
> Do you know why create_one_partition doesn't work as expected?
Hi Stefano,
Sorry for the late answer. The only change I've did on Ubuntu 16.04 was
to increase the hvm disk size to 60 MB.
In the meanwhile I set up an ubuntu 14.04 test system and for the first
time tried to run the tests as an ordinary user instead of root. I've
found a set of problems. I've made a patch
(https://github.com/geza-gemes/raisin/commit/8a1227d96697a4d8be9130fd9b16404decbe7605)
for those. Although this fixes the problem of running the tests as
non-root, it turned out, that even on ubuntu 14.04 the 20MB disk is not
enough for the hvm guest. I'll try to find the suitable disk size there
and if successful I'll move back to ubuntu 16.04.
Cheers,
Geza
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-03-01 17:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 7:05 kpartx for raisin hvm tests Géza Gémes
2017-02-21 22:10 ` Stefano Stabellini
2017-02-22 6:58 ` Géza Gémes
2017-02-27 22:52 ` Stefano Stabellini
2017-03-01 17:48 ` Gémes Géza [this message]
2017-03-01 19:48 ` Stefano Stabellini
2017-03-01 21:20 ` Gémes Géza
2017-03-02 1:16 ` Stefano Stabellini
2017-03-07 7:21 ` Gémes Géza
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d3bf86cb-50c8-8c1d-d0d7-d9d208069978@gmail.com \
--to=geza.gemes@gmail.com \
--cc=george.dunlap@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).