* [PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local
@ 2015-09-18 15:34 Ian Campbell
2015-09-22 15:41 ` Ian Jackson
0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2015-09-18 15:34 UTC (permalink / raw)
To: ian.jackson, xen-devel; +Cc: Ian Campbell
Older Xen's installed in /usr by default, so we need to check where
qemu-img if we want these tests to work on those versions.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
Only tested with perl -c.
See
http://logs.test-lab.xenproject.org/osstest/logs/61955/test-amd64-amd64-xl-qcow2/info.html
for a current instance of this failure with 4.2
---
Osstest/TestSupport.pm | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 2ded693..efe138f 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1616,7 +1616,16 @@ sub make_vhd ($$$) {
sub make_qcow2 ($$$) {
my ($ho, $gho, $disk_mb) = @_;
# upstream qemu's version. Seems preferable to qemu-xen-img from qemu-trad.
- my $qemu_img = "/usr/local/lib/xen/bin/qemu-img";
+ my $qemu_img;
+ foreach (qw(/usr/local /usr)) {
+ my $try = "$_/lib/xen/bin/qemu-img";
+ if (target_file_exists($ho, $try)) {
+ $qemu_img=$try;
+ last;
+ }
+ }
+ die "no qemu-img" unless $qemu_img;
+
target_cmd_root($ho, "$qemu_img create -f qcow2 $gho->{Rootimg} ${disk_mb}M");
}
sub make_raw ($$$) {
--
2.5.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local
2015-09-18 15:34 [PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local Ian Campbell
@ 2015-09-22 15:41 ` Ian Jackson
2015-09-22 15:58 ` Ian Campbell
0 siblings, 1 reply; 7+ messages in thread
From: Ian Jackson @ 2015-09-22 15:41 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel
Ian Campbell writes ("[PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local"):
> Older Xen's installed in /usr by default, so we need to check where
> qemu-img if we want these tests to work on those versions.
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
But, why are we executing a utility from /usr/lib/xen/bin ? If this
utility is useful to osstest it is presumably useful to users too, and
in that case it should be on PATH (under some suitable name).
Ian.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local
2015-09-22 15:41 ` Ian Jackson
@ 2015-09-22 15:58 ` Ian Campbell
2015-09-22 16:06 ` Ian Jackson
0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2015-09-22 15:58 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel
On Tue, 2015-09-22 at 16:41 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST] make_qcow2: Look for qemu-img under
> /usr as well as /usr/local"):
> > Older Xen's installed in /usr by default, so we need to check where
> > qemu-img if we want these tests to work on those versions.
>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
>
> But, why are we executing a utility from /usr/lib/xen/bin ? If this
> utility is useful to osstest it is presumably useful to users too, and
> in that case it should be on PATH (under some suitable name).
We install qemu-upstream under our own prefix, I think to avoid conficting
with the users own qemu installations?
qemu-img comes from there. We do install qemu-xen-img (from trad) into
$PATH, but when I wrote this test I thought it preferable to use qemu-img.
Ian.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local
2015-09-22 15:58 ` Ian Campbell
@ 2015-09-22 16:06 ` Ian Jackson
2015-09-22 21:36 ` Stefano Stabellini
0 siblings, 1 reply; 7+ messages in thread
From: Ian Jackson @ 2015-09-22 16:06 UTC (permalink / raw)
To: Ian Campbell; +Cc: Stefano Stabellini, xen-devel
(CCing Stefano)
Ian Campbell writes ("Re: [PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local"):
> On Tue, 2015-09-22 at 16:41 +0100, Ian Jackson wrote:
> > Ian Campbell writes ("[PATCH OSSTEST] make_qcow2: Look for qemu-img under
> > /usr as well as /usr/local"):
> > > Older Xen's installed in /usr by default, so we need to check where
> > > qemu-img if we want these tests to work on those versions.
> >
> > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> >
> > But, why are we executing a utility from /usr/lib/xen/bin ? If this
> > utility is useful to osstest it is presumably useful to users too, and
> > in that case it should be on PATH (under some suitable name).
>
> We install qemu-upstream under our own prefix, I think to avoid conficting
> with the users own qemu installations?
>
> qemu-img comes from there. We do install qemu-xen-img (from trad) into
> $PATH, but when I wrote this test I thought it preferable to use qemu-img.
Maybe we should be installing qemu-img from our qemu upstream build
instead ?
We evidently don't think that there is anything in the qcow block
system in trad that we like, because we are only using upstream for
qdisk vbd backends now.
Ian.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local
2015-09-22 16:06 ` Ian Jackson
@ 2015-09-22 21:36 ` Stefano Stabellini
2015-09-23 8:25 ` Ian Campbell
0 siblings, 1 reply; 7+ messages in thread
From: Stefano Stabellini @ 2015-09-22 21:36 UTC (permalink / raw)
To: Ian Jackson; +Cc: Stefano Stabellini, Ian Campbell, xen-devel
On Tue, 22 Sep 2015, Ian Jackson wrote:
> (CCing Stefano)
>
> Ian Campbell writes ("Re: [PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local"):
> > On Tue, 2015-09-22 at 16:41 +0100, Ian Jackson wrote:
> > > Ian Campbell writes ("[PATCH OSSTEST] make_qcow2: Look for qemu-img under
> > > /usr as well as /usr/local"):
> > > > Older Xen's installed in /usr by default, so we need to check where
> > > > qemu-img if we want these tests to work on those versions.
> > >
> > > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> > >
> > > But, why are we executing a utility from /usr/lib/xen/bin ? If this
> > > utility is useful to osstest it is presumably useful to users too, and
> > > in that case it should be on PATH (under some suitable name).
> >
> > We install qemu-upstream under our own prefix, I think to avoid conficting
> > with the users own qemu installations?
> >
> > qemu-img comes from there. We do install qemu-xen-img (from trad) into
> > $PATH, but when I wrote this test I thought it preferable to use qemu-img.
>
> Maybe we should be installing qemu-img from our qemu upstream build
> instead ?
>
> We evidently don't think that there is anything in the qcow block
> system in trad that we like, because we are only using upstream for
> qdisk vbd backends now.
Yes, this is a good idea. Qcow support is much better in upstream QEMU
compared to qemu-trad.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local
2015-09-22 21:36 ` Stefano Stabellini
@ 2015-09-23 8:25 ` Ian Campbell
2015-09-23 18:18 ` Stefano Stabellini
0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2015-09-23 8:25 UTC (permalink / raw)
To: Stefano Stabellini, Ian Jackson; +Cc: xen-devel
On Tue, 2015-09-22 at 22:36 +0100, Stefano Stabellini wrote:
> On Tue, 22 Sep 2015, Ian Jackson wrote:
> > (CCing Stefano)
> >
> > Ian Campbell writes ("Re: [PATCH OSSTEST] make_qcow2: Look for qemu-img
> > under /usr as well as /usr/local"):
> > > On Tue, 2015-09-22 at 16:41 +0100, Ian Jackson wrote:
> > > > Ian Campbell writes ("[PATCH OSSTEST] make_qcow2: Look for qemu-img
> > > > under
> > > > /usr as well as /usr/local"):
> > > > > Older Xen's installed in /usr by default, so we need to check
> > > > > where
> > > > > qemu-img if we want these tests to work on those versions.
> > > >
> > > > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> > > >
> > > > But, why are we executing a utility from /usr/lib/xen/bin ? If
> > > > this
> > > > utility is useful to osstest it is presumably useful to users too,
> > > > and
> > > > in that case it should be on PATH (under some suitable name).
> > >
> > > We install qemu-upstream under our own prefix, I think to avoid
> > > conficting
> > > with the users own qemu installations?
> > >
> > > qemu-img comes from there. We do install qemu-xen-img (from trad)
> > > into
> > > $PATH, but when I wrote this test I thought it preferable to use qemu
> > > -img.
> >
> > Maybe we should be installing qemu-img from our qemu upstream build
> > instead ?
> >
> > We evidently don't think that there is anything in the qcow block
> > system in trad that we like, because we are only using upstream for
> > qdisk vbd backends now.
>
> Yes, this is a good idea. Qcow support is much better in upstream QEMU
> compared to qemu-trad.
So I think the plan of attack should be:
Make osstest use qemu-xen-img out of $PATH instead of hardcoding the full
path to qemu-upstreams's qemu-img (which is in our $libexec). This will
cause everything to switch to qemu-trad's version of qemu-xen.
Modify xen.git (and raisin?) to stop installing the qemu-trad version of
qemu-img as qemu-xen-img in $PATH and instead start installing qemu
-upstream's version with that name.
We also need to check that whatever libraries used by qemu-img are in an
appropriate place, or that rpath is used.
Are they any other similar tools which we should consider doing this for?
Who is going to write those patches?
Ian.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local
2015-09-23 8:25 ` Ian Campbell
@ 2015-09-23 18:18 ` Stefano Stabellini
0 siblings, 0 replies; 7+ messages in thread
From: Stefano Stabellini @ 2015-09-23 18:18 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel, Ian Jackson, Stefano Stabellini
On Wed, 23 Sep 2015, Ian Campbell wrote:
> On Tue, 2015-09-22 at 22:36 +0100, Stefano Stabellini wrote:
> > On Tue, 22 Sep 2015, Ian Jackson wrote:
> > > (CCing Stefano)
> > >
> > > Ian Campbell writes ("Re: [PATCH OSSTEST] make_qcow2: Look for qemu-img
> > > under /usr as well as /usr/local"):
> > > > On Tue, 2015-09-22 at 16:41 +0100, Ian Jackson wrote:
> > > > > Ian Campbell writes ("[PATCH OSSTEST] make_qcow2: Look for qemu-img
> > > > > under
> > > > > /usr as well as /usr/local"):
> > > > > > Older Xen's installed in /usr by default, so we need to check
> > > > > > where
> > > > > > qemu-img if we want these tests to work on those versions.
> > > > >
> > > > > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> > > > >
> > > > > But, why are we executing a utility from /usr/lib/xen/bin ? If
> > > > > this
> > > > > utility is useful to osstest it is presumably useful to users too,
> > > > > and
> > > > > in that case it should be on PATH (under some suitable name).
> > > >
> > > > We install qemu-upstream under our own prefix, I think to avoid
> > > > conficting
> > > > with the users own qemu installations?
> > > >
> > > > qemu-img comes from there. We do install qemu-xen-img (from trad)
> > > > into
> > > > $PATH, but when I wrote this test I thought it preferable to use qemu
> > > > -img.
> > >
> > > Maybe we should be installing qemu-img from our qemu upstream build
> > > instead ?
> > >
> > > We evidently don't think that there is anything in the qcow block
> > > system in trad that we like, because we are only using upstream for
> > > qdisk vbd backends now.
> >
> > Yes, this is a good idea. Qcow support is much better in upstream QEMU
> > compared to qemu-trad.
>
> So I think the plan of attack should be:
>
> Make osstest use qemu-xen-img out of $PATH instead of hardcoding the full
> path to qemu-upstreams's qemu-img (which is in our $libexec). This will
> cause everything to switch to qemu-trad's version of qemu-xen.
>
> Modify xen.git (and raisin?) to stop installing the qemu-trad version of
> qemu-img as qemu-xen-img in $PATH and instead start installing qemu
> -upstream's version with that name.
>
> We also need to check that whatever libraries used by qemu-img are in an
> appropriate place, or that rpath is used.
>
> Are they any other similar tools which we should consider doing this for?
>
> Who is going to write those patches?
I volunteering to make the changes to install QEMU's qemu-img in Raisin
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-09-23 18:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-18 15:34 [PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local Ian Campbell
2015-09-22 15:41 ` Ian Jackson
2015-09-22 15:58 ` Ian Campbell
2015-09-22 16:06 ` Ian Jackson
2015-09-22 21:36 ` Stefano Stabellini
2015-09-23 8:25 ` Ian Campbell
2015-09-23 18:18 ` Stefano Stabellini
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).