All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wic: update test case test_qemu
@ 2019-01-04  2:49 kai.kang
  2019-01-11  9:22 ` Kang Kai
  0 siblings, 1 reply; 4+ messages in thread
From: kai.kang @ 2019-01-04  2:49 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

It checks output of mount in wic test case test_qemu. But the outputs are
different between sysvinit and systemd. Add assertion for systemd.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/lib/oeqa/selftest/cases/wic.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 36ee5e5a14..a6bc566166 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -627,7 +627,10 @@ class Wic2(WicTestCase):
         with runqemu('wic-image-minimal', ssh=False) as qemu:
             cmd = "mount |grep '^/dev/' | cut -f1,3 -d ' ' | sort"
             status, output = qemu.run_serial(cmd)
-            self.assertEqual(output, '/dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
+            if 'sysvinit' in get_bb_var('DISTRO_FEATURES'):
+                self.assertEqual(output, '/dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
+            else:
+                self.assertEqual(output, '/dev/sda1 /boot\r\n/dev/sda2 /\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
             cmd = "grep UUID= /etc/fstab"
             status, output = qemu.run_serial(cmd)
             self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
-- 
2.18.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] wic: update test case test_qemu
  2019-01-04  2:49 [PATCH] wic: update test case test_qemu kai.kang
@ 2019-01-11  9:22 ` Kang Kai
  2019-01-11 13:15   ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: Kang Kai @ 2019-01-11  9:22 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

On 2019/1/4 上午10:49, kai.kang@windriver.com wrote:
> From: Kai Kang <kai.kang@windriver.com>
>
> It checks output of mount in wic test case test_qemu. But the outputs are
> different between sysvinit and systemd. Add assertion for systemd.
>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>   meta/lib/oeqa/selftest/cases/wic.py | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
> index 36ee5e5a14..a6bc566166 100644
> --- a/meta/lib/oeqa/selftest/cases/wic.py
> +++ b/meta/lib/oeqa/selftest/cases/wic.py
> @@ -627,7 +627,10 @@ class Wic2(WicTestCase):
>           with runqemu('wic-image-minimal', ssh=False) as qemu:
>               cmd = "mount |grep '^/dev/' | cut -f1,3 -d ' ' | sort"
>               status, output = qemu.run_serial(cmd)
> -            self.assertEqual(output, '/dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
> +            if 'sysvinit' in get_bb_var('DISTRO_FEATURES'):
> +                self.assertEqual(output, '/dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
> +            else:
> +                self.assertEqual(output, '/dev/sda1 /boot\r\n/dev/sda2 /\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
>               cmd = "grep UUID= /etc/fstab"
>               status, output = qemu.run_serial(cmd)
>               self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))


Ping

-- 
Kai Kang



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] wic: update test case test_qemu
  2019-01-11  9:22 ` Kang Kai
@ 2019-01-11 13:15   ` Burton, Ross
  2019-01-14  2:29     ` Kang Kai
  0 siblings, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2019-01-11 13:15 UTC (permalink / raw)
  To: Kang Kai; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 2054 bytes --]

I'm wondering what the point of checking the output of mount is.  If we're
just checking that the image booted then the grep is sufficient right?

Ross

On Fri, 11 Jan 2019 at 09:22, Kang Kai <Kai.Kang@windriver.com> wrote:

> On 2019/1/4 上午10:49, kai.kang@windriver.com wrote:
> > From: Kai Kang <kai.kang@windriver.com>
> >
> > It checks output of mount in wic test case test_qemu. But the outputs are
> > different between sysvinit and systemd. Add assertion for systemd.
> >
> > Signed-off-by: Kai Kang <kai.kang@windriver.com>
> > ---
> >   meta/lib/oeqa/selftest/cases/wic.py | 5 ++++-
> >   1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/lib/oeqa/selftest/cases/wic.py
> b/meta/lib/oeqa/selftest/cases/wic.py
> > index 36ee5e5a14..a6bc566166 100644
> > --- a/meta/lib/oeqa/selftest/cases/wic.py
> > +++ b/meta/lib/oeqa/selftest/cases/wic.py
> > @@ -627,7 +627,10 @@ class Wic2(WicTestCase):
> >           with runqemu('wic-image-minimal', ssh=False) as qemu:
> >               cmd = "mount |grep '^/dev/' | cut -f1,3 -d ' ' | sort"
> >               status, output = qemu.run_serial(cmd)
> > -            self.assertEqual(output, '/dev/root /\r\n/dev/sda1
> /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
> > +            if 'sysvinit' in get_bb_var('DISTRO_FEATURES'):
> > +                self.assertEqual(output, '/dev/root /\r\n/dev/sda1
> /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
> > +            else:
> > +                self.assertEqual(output, '/dev/sda1 /boot\r\n/dev/sda2
> /\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
> >               cmd = "grep UUID= /etc/fstab"
> >               status, output = qemu.run_serial(cmd)
> >               self.assertEqual(1, status, 'Failed to run command "%s":
> %s' % (cmd, output))
>
>
> Ping
>
> --
> Kai Kang
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 3097 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] wic: update test case test_qemu
  2019-01-11 13:15   ` Burton, Ross
@ 2019-01-14  2:29     ` Kang Kai
  0 siblings, 0 replies; 4+ messages in thread
From: Kang Kai @ 2019-01-14  2:29 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 2733 bytes --]

On 2019/1/11 下午9:15, Burton, Ross wrote:
> I'm wondering what the point of checking the output of mount is.  If 
> we're just checking that the image booted then the grep is sufficient 
> right?


If just checking the wic image has been booted successfully, I think 
grep /boot is sufficient. V2 will be sent.

--Kai



>
> Ross
>
> On Fri, 11 Jan 2019 at 09:22, Kang Kai <Kai.Kang@windriver.com 
> <mailto:Kai.Kang@windriver.com>> wrote:
>
>     On 2019/1/4 上午10:49, kai.kang@windriver.com
>     <mailto:kai.kang@windriver.com> wrote:
>     > From: Kai Kang <kai.kang@windriver.com
>     <mailto:kai.kang@windriver.com>>
>     >
>     > It checks output of mount in wic test case test_qemu. But the
>     outputs are
>     > different between sysvinit and systemd. Add assertion for systemd.
>     >
>     > Signed-off-by: Kai Kang <kai.kang@windriver.com
>     <mailto:kai.kang@windriver.com>>
>     > ---
>     >   meta/lib/oeqa/selftest/cases/wic.py | 5 ++++-
>     >   1 file changed, 4 insertions(+), 1 deletion(-)
>     >
>     > diff --git a/meta/lib/oeqa/selftest/cases/wic.py
>     b/meta/lib/oeqa/selftest/cases/wic.py
>     > index 36ee5e5a14..a6bc566166 100644
>     > --- a/meta/lib/oeqa/selftest/cases/wic.py
>     > +++ b/meta/lib/oeqa/selftest/cases/wic.py
>     > @@ -627,7 +627,10 @@ class Wic2(WicTestCase):
>     >           with runqemu('wic-image-minimal', ssh=False) as qemu:
>     >               cmd = "mount |grep '^/dev/' | cut -f1,3 -d ' ' | sort"
>     >               status, output = qemu.run_serial(cmd)
>     > -            self.assertEqual(output, '/dev/root /\r\n/dev/sda1
>     /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
>     > +            if 'sysvinit' in get_bb_var('DISTRO_FEATURES'):
>     > +                self.assertEqual(output, '/dev/root
>     /\r\n/dev/sda1 /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
>     > +            else:
>     > +                self.assertEqual(output, '/dev/sda1
>     /boot\r\n/dev/sda2 /\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
>     >               cmd = "grep UUID= /etc/fstab"
>     >               status, output = qemu.run_serial(cmd)
>     >               self.assertEqual(1, status, 'Failed to run command
>     "%s": %s' % (cmd, output))
>
>
>     Ping
>
>     -- 
>     Kai Kang
>
>     -- 
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

-- 
Kai Kang


[-- Attachment #2: Type: text/html, Size: 4830 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-14  2:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04  2:49 [PATCH] wic: update test case test_qemu kai.kang
2019-01-11  9:22 ` Kang Kai
2019-01-11 13:15   ` Burton, Ross
2019-01-14  2:29     ` Kang Kai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.