diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-12 13:44:03 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-23 23:16:12 +0000 |
commit | 22be09c70884746cb5e23b7f18c52cc67a25ef40 (patch) | |
tree | 7c2a54302073e63906d9746ebd147c1cfa8800df /meta | |
parent | 4c3d1b0120c7618024561ac50ff009f5aee0d992 (diff) | |
download | poky-22be09c70884746cb5e23b7f18c52cc67a25ef40.tar.gz |
oeqa/runtime/ping: Improve failure message to include more detail
When the ping test fails due to a timeout we only get limited debug
information. Tweak the code to improve that in case it sheds any light
on intermittent failures.
(From OE-Core rev: df98e96c7a1601798caf7f4882b09406a4fdacd6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d81704057950e1970ef7f673fa771834fd2b3f1e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/ping.py | 20 | ||||
-rw-r--r-- | meta/recipes-core/libxml/libxml2_2.9.10.bb | 2 |
2 files changed, 13 insertions, 9 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ping.py b/meta/lib/oeqa/runtime/cases/ping.py index f6603f75ec..498f80d0a5 100644 --- a/meta/lib/oeqa/runtime/cases/ping.py +++ b/meta/lib/oeqa/runtime/cases/ping.py | |||
@@ -6,6 +6,7 @@ from subprocess import Popen, PIPE | |||
6 | 6 | ||
7 | from oeqa.runtime.case import OERuntimeTestCase | 7 | from oeqa.runtime.case import OERuntimeTestCase |
8 | from oeqa.core.decorator.oetimeout import OETimeout | 8 | from oeqa.core.decorator.oetimeout import OETimeout |
9 | from oeqa.core.exception import OEQATimeoutError | ||
9 | 10 | ||
10 | class PingTest(OERuntimeTestCase): | 11 | class PingTest(OERuntimeTestCase): |
11 | 12 | ||
@@ -13,14 +14,17 @@ class PingTest(OERuntimeTestCase): | |||
13 | def test_ping(self): | 14 | def test_ping(self): |
14 | output = '' | 15 | output = '' |
15 | count = 0 | 16 | count = 0 |
16 | while count < 5: | 17 | try: |
17 | cmd = 'ping -c 1 %s' % self.target.ip | 18 | while count < 5: |
18 | proc = Popen(cmd, shell=True, stdout=PIPE) | 19 | cmd = 'ping -c 1 %s' % self.target.ip |
19 | output += proc.communicate()[0].decode('utf-8') | 20 | proc = Popen(cmd, shell=True, stdout=PIPE) |
20 | if proc.poll() == 0: | 21 | output += proc.communicate()[0].decode('utf-8') |
21 | count += 1 | 22 | if proc.poll() == 0: |
22 | else: | 23 | count += 1 |
23 | count = 0 | 24 | else: |
25 | count = 0 | ||
26 | except OEQATimeoutError: | ||
27 | self.fail("Ping timeout error for address %s, count %s, output: %s" % (self.target.ip, count, output)) | ||
24 | msg = ('Expected 5 consecutive, got %d.\n' | 28 | msg = ('Expected 5 consecutive, got %d.\n' |
25 | 'ping output is:\n%s' % (count,output)) | 29 | 'ping output is:\n%s' % (count,output)) |
26 | self.assertEqual(count, 5, msg = msg) | 30 | self.assertEqual(count, 5, msg = msg) |
diff --git a/meta/recipes-core/libxml/libxml2_2.9.10.bb b/meta/recipes-core/libxml/libxml2_2.9.10.bb index 976eeca1d4..c45cf4423e 100644 --- a/meta/recipes-core/libxml/libxml2_2.9.10.bb +++ b/meta/recipes-core/libxml/libxml2_2.9.10.bb | |||
@@ -31,7 +31,7 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;subdir=${BP};name=te | |||
31 | file://CVE-2022-23308.patch \ | 31 | file://CVE-2022-23308.patch \ |
32 | " | 32 | " |
33 | 33 | ||
34 | SRC_URI[archive.sha256sum] = "28a92f6ab1f311acf5e478564c49088ef0ac77090d9c719bbc5d518f1fe62eb9" | 34 | SRC_URI[archive.sha256sum] = "593b7b751dd18c2d6abcd0c4bcb29efc203d0b4373a6df98e3a455ea74ae2813" |
35 | SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a" | 35 | SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a" |
36 | SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7" | 36 | SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7" |
37 | 37 | ||