<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/lib/oeqa, branch 4.2_M3</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=4.2_M3</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=4.2_M3'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2023-02-26T11:59:52+00:00</updated>
<entry>
<title>oeqa/selftest: add test for yocto_testresults_query.py</title>
<updated>2023-02-26T11:59:52+00:00</updated>
<author>
<name>Alexis Lothoré</name>
<email>alexis.lothore@bootlin.com</email>
</author>
<published>2023-02-24T16:45:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ffaee6bd482d2bbf32e78306e3884985e3078184'/>
<id>urn:sha1:ffaee6bd482d2bbf32e78306e3884985e3078184</id>
<content type='text'>
Add some tests for new yocto_testresults_query.py helper. First test is taken
from yocto-autobuilder-helper feature which has moved in yocto_testresults_query

(From OE-Core rev: 9ce28f685e4282d81f179877cbafd0a52fa887bd)

Signed-off-by: Alexis Lothoré &lt;alexis.lothore@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scripts/oe-selftest: append metadata to tests results</title>
<updated>2023-02-26T11:59:52+00:00</updated>
<author>
<name>Alexis Lothoré</name>
<email>alexis.lothore@bootlin.com</email>
</author>
<published>2023-02-24T16:45:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e557cd92d674f6bddd190bbe2eed2c7885f00016'/>
<id>urn:sha1:e557cd92d674f6bddd190bbe2eed2c7885f00016</id>
<content type='text'>
Many stored results TEST_TYPE are set to "oeselftest", however all those
tests are not run with the same sets of parameters, so those tests results may
not be comparable.

Attach relevant parameters as tests metadata to allow identifying tests
configuration so we can compare tests only when they are run with the same
parameters.

(From OE-Core rev: 406ec0a87e80d1ee0dd1d246adfe9507c10450ff)

Signed-off-by: Alexis Lothoré &lt;alexis.lothore@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oeqa/selftest/wic: Add test for uefi-kernel loader</title>
<updated>2023-02-26T11:49:00+00:00</updated>
<author>
<name>Pavel Zhukov</name>
<email>pavel@zhukoff.net</email>
</author>
<published>2023-02-25T21:20:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2e18bbb307e050650845314f7837cc4d5d8aea86'/>
<id>urn:sha1:2e18bbb307e050650845314f7837cc4d5d8aea86</id>
<content type='text'>
This is regression test for [1].
[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15033

(From OE-Core rev: d8ef15bb9ef652bf85002fe523ff5060b47bca6a)

Signed-off-by: Pavel Zhukov &lt;pavel@zhukoff.net&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oeqa/selftest/prservice: Improve debug output for failure</title>
<updated>2023-02-24T15:38:06+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-02-24T10:47:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0ab3325ffb407dbce6aa5ccc20478568abd8b8fb'/>
<id>urn:sha1:0ab3325ffb407dbce6aa5ccc20478568abd8b8fb</id>
<content type='text'>
We keep seeing this failure on the autobuilder but the output amounts
to "False is not True". Improve the debug message on the chance it may
make the issue clearer.

(From OE-Core rev: d03f4cf19c2cc96e9d942252a451521dfec42ebc)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oeqa ssh.py: fix hangs in run()</title>
<updated>2023-02-23T12:11:29+00:00</updated>
<author>
<name>Mikko Rapeli</name>
<email>mikko.rapeli@linaro.org</email>
</author>
<published>2023-02-15T14:50:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c7b05d56573cb3304ba05d375a54d0484da23425'/>
<id>urn:sha1:c7b05d56573cb3304ba05d375a54d0484da23425</id>
<content type='text'>
When qemu machine hangs, the ssh commands done by tests
are not timing out. do_testimage() task has last logs like this:

DEBUG: time: 1673531086.3155053, endtime: 1673531686.315502

The test process is stuck for hours, or for ever if the
executing command or test case did not set a timeout correctly.
The default 300 second timeout is not working when target hangs.
Note that timeout is really a "inactive timeout" since data returned
by the process will reset the timeout.

Make the process stdout non-blocking so read() will always return
right away using os.set_blocking() available in python 3.5 and later.

Then change from python codec reader to plain read() and make
the ssh subprocess stdout non-blocking. Even with select()
making sure the file had input to be read, the codec reader was
trying to find more stuff and blocking for ever when process hangs.

While at it, add a small timeout to read data in larger chunks if
possible. This avoids reading data one or few characters at a time
and makes the debug logs more readable.

close() the stdout file in all cases after read loop is complete.

Then make sure to wait or kill the ssh subprocess in all cases.
Just reading the output stream and receiving EOF there does not mean
that the process exited, and wait() needs a timeout if the process
is hanging. In the end kill the process and return the return value
and captured output utf-8 encoded, just like before these changes.

This fixes ssh run() related deadlocks when a qemu target hangs
completely.

(From OE-Core rev: 9c63970fce3a3d6029745252a6ec2bf9b9da862d)

Signed-off-by: Mikko Rapeli &lt;mikko.rapeli@linaro.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oeqa/selftest/resulttooltests: fix minor typo</title>
<updated>2023-02-17T18:01:01+00:00</updated>
<author>
<name>Alexis Lothoré</name>
<email>alexis.lothore@bootlin.com</email>
</author>
<published>2023-02-14T16:53:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=abf2776641cf1f58824e166d04c0d77f485f963c'/>
<id>urn:sha1:abf2776641cf1f58824e166d04c0d77f485f963c</id>
<content type='text'>
(From OE-Core rev: 80cfa56d133bd3abbb1f37272607d8e15ce70861)

Signed-off-by: Alexis Lothoré &lt;alexis.lothore@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oeqa qemurunner.py: try to avoid reading one character at a time</title>
<updated>2023-02-10T09:25:44+00:00</updated>
<author>
<name>Mikko Rapeli</name>
<email>mikko.rapeli@linaro.org</email>
</author>
<published>2023-02-09T08:09:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9437c739053f81e5f67dccb1696dd944e2984a10'/>
<id>urn:sha1:9437c739053f81e5f67dccb1696dd944e2984a10</id>
<content type='text'>
Read from serial console with a small delay to bundle data to e.g.
full lines. Reading one character at a time is not needed and causes
busy looping.

(From OE-Core rev: 0049f6757f6f956fb4cc77b3df6a672c20b53cf4)

Signed-off-by: Mikko Rapeli &lt;mikko.rapeli@linaro.org&gt;
Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oeqa qemurunner.py: add timeout to QMP calls</title>
<updated>2023-02-10T09:25:44+00:00</updated>
<author>
<name>Mikko Rapeli</name>
<email>mikko.rapeli@linaro.org</email>
</author>
<published>2023-02-09T08:09:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=18bcccc8f8dbf3541e7c7c4dec38b5fe9e2c7f20'/>
<id>urn:sha1:18bcccc8f8dbf3541e7c7c4dec38b5fe9e2c7f20</id>
<content type='text'>
When a qemu machine hangs, the QMP calls can hang for ever
too, and when this happens any failing test commands from ssh
runner may be followed by dump_monitor() calls which
then also hang. Hangs followed by hangs.

Use runqemutime at setup and run_monitor() specific timeout
for later calls.

(From OE-Core rev: 3a07bdf77dc6ecbf4c620b051dd032abaaf1e4ff)

Signed-off-by: Mikko Rapeli &lt;mikko.rapeli@linaro.org&gt;
Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oeqa qemurunner: read more data at a time from serial</title>
<updated>2023-02-10T09:25:44+00:00</updated>
<author>
<name>Mikko Rapeli</name>
<email>mikko.rapeli@linaro.org</email>
</author>
<published>2023-02-09T08:09:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d61df4b2208a01702ffab344a237cfb2be5d4972'/>
<id>urn:sha1:d61df4b2208a01702ffab344a237cfb2be5d4972</id>
<content type='text'>
Use a short sleep to bundle serial console reads so that
we are not reading one character at a time which reduces busy
looping.

(From OE-Core rev: cafe65d8cf7544edbd387f7f5f6d77c64c6b18fa)

Signed-off-by: Mikko Rapeli &lt;mikko.rapeli@linaro.org&gt;
Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oeqa dump.py: add error counter and stop after 5 failures</title>
<updated>2023-02-10T09:25:44+00:00</updated>
<author>
<name>Mikko Rapeli</name>
<email>mikko.rapeli@linaro.org</email>
</author>
<published>2023-02-09T08:09:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=49da864246bc1af80027698ece68769faaed1d09'/>
<id>urn:sha1:49da864246bc1af80027698ece68769faaed1d09</id>
<content type='text'>
If test target qemu machine hangs completely, dump_target() calls
over serial console are taking a long time to time out, possibly
for every failing ssh command execution and a lot of test cases,
and same with dump_monitor().

Instead of trying for ever, count errors and after 5 stop trying
to dump_target() and dump_monitor() completely.

These help to end testing earlier when a test target is completely
deadlocked and all ssh, serial and QMP communication with it are
failing.

(From OE-Core rev: d9ad0a055abba983c6cee1dca4d2f0a8a3c48782)

Signed-off-by: Mikko Rapeli &lt;mikko.rapeli@linaro.org&gt;
Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
