From: "Géza Gémes" <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, 22 Feb 2017 07:58:47 +0100 [thread overview]
Message-ID: <81bf8884-5177-a3e7-ed1a-d9c77c2603f1@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1702211407560.12540@sstabellini-ThinkPad-X260>
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
next prev parent reply other threads:[~2017-02-22 6:58 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 [this message]
2017-02-27 22:52 ` Stefano Stabellini
2017-03-01 17:48 ` Gémes Géza
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=81bf8884-5177-a3e7-ed1a-d9c77c2603f1@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).