* [PATCH 0/1] testimage: fix boolean checking for QEMU_USE_KVM @ 2018-12-04 5:04 Chen Qi 2018-12-04 5:04 ` [PATCH 1/1] " Chen Qi 0 siblings, 1 reply; 3+ messages in thread From: Chen Qi @ 2018-12-04 5:04 UTC (permalink / raw) To: openembedded-core *** BLURB HERE *** The following changes since commit 016e3dda2d6acc9b457079d11b5346a5352a431d: btrfs-tools: update to 4.19 (2018-12-03 12:20:01 +0000) are available in the git repository at: git://git.pokylinux.org/poky-contrib ChenQi/qemu_use_kvm http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/qemu_use_kvm Chen Qi (1): testimage: fix boolean checking for QEMU_USE_KVM meta/classes/testimage.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] testimage: fix boolean checking for QEMU_USE_KVM 2018-12-04 5:04 [PATCH 0/1] testimage: fix boolean checking for QEMU_USE_KVM Chen Qi @ 2018-12-04 5:04 ` Chen Qi 2018-12-04 12:22 ` Richard Purdie 0 siblings, 1 reply; 3+ messages in thread From: Chen Qi @ 2018-12-04 5:04 UTC (permalink / raw) To: openembedded-core If QEMU_USE_KVM is set to a list of machines, when doing testimage for a machine outside the list, we will get the following error. Exception: ValueError: Invalid boolean value 'intel-corei7-64 intel-core2-32 qemux86 qemux86-64' This is because oe.types.boolean raises error if the parameter is not values like 'true', 'false', etc. Fix the boolean checking to avoid the exception. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- meta/classes/testimage.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 82cbb06..80e457b 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass @@ -231,7 +231,7 @@ def testimage_main(d): qemu_use_kvm = d.getVar("QEMU_USE_KVM") if qemu_use_kvm and \ (d.getVar('MACHINE') in qemu_use_kvm.split() or \ - oe.types.boolean(qemu_use_kvm) and 'x86' in machine): + qemu_use_kvm.lower() in ('yes', 'y', 'true', 't', '1') and 'x86' in machine): kvm = True else: kvm = False -- 1.9.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] testimage: fix boolean checking for QEMU_USE_KVM 2018-12-04 5:04 ` [PATCH 1/1] " Chen Qi @ 2018-12-04 12:22 ` Richard Purdie 0 siblings, 0 replies; 3+ messages in thread From: Richard Purdie @ 2018-12-04 12:22 UTC (permalink / raw) To: Chen Qi, openembedded-core On Tue, 2018-12-04 at 13:04 +0800, Chen Qi wrote: > If QEMU_USE_KVM is set to a list of machines, when doing testimage > for a machine outside the list, we will get the following error. > > Exception: ValueError: Invalid boolean value 'intel-corei7-64 > intel-core2-32 qemux86 qemux86-64' > > This is because oe.types.boolean raises error if the parameter > is not values like 'true', 'false', etc. > > Fix the boolean checking to avoid the exception. > > Signed-off-by: Chen Qi <Qi.Chen@windriver.com> > --- > meta/classes/testimage.bbclass | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/classes/testimage.bbclass > b/meta/classes/testimage.bbclass > index 82cbb06..80e457b 100644 > --- a/meta/classes/testimage.bbclass > +++ b/meta/classes/testimage.bbclass > @@ -231,7 +231,7 @@ def testimage_main(d): > qemu_use_kvm = d.getVar("QEMU_USE_KVM") > if qemu_use_kvm and \ > (d.getVar('MACHINE') in qemu_use_kvm.split() or \ > - oe.types.boolean(qemu_use_kvm) and 'x86' in machine): > + qemu_use_kvm.lower() in ('yes', 'y', 'true', 't', '1') and > 'x86' in machine): > kvm = True > else: > kvm = False Personally, I think we should just drop support for listing the machines in QEMU_USE_KVM and suggest people use overrides instead? Cheers, Richard ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-04 12:22 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-12-04 5:04 [PATCH 0/1] testimage: fix boolean checking for QEMU_USE_KVM Chen Qi 2018-12-04 5:04 ` [PATCH 1/1] " Chen Qi 2018-12-04 12:22 ` Richard Purdie
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox