From: Adrian Freihofer <[email protected]>

Falling back to a hardcoded 2222 hides the case where runqemu did not
report an ip:port pair: the test would then keep running against a port
that nothing listens on and fail somewhere further down. Assert the port
instead, so the failure points at its actual cause.

Signed-off-by: Adrian Freihofer <[email protected]>
---
 meta/lib/oeqa/selftest/cases/devtool.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py 
b/meta/lib/oeqa/selftest/cases/devtool.py
index de59feadb8..3a407a5162 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -3991,7 +3991,8 @@ class DevtoolIdeSdkGccTests(DevtoolIdeSdkTests):
 
         with runqemu(testimage, runqemuparams="nographic slirp") as qemu:
             slirp_host = qemu.ip
-            slirp_port = qemu.port or '2222'
+            self.assertIsNotNone(qemu.port, 'No SSH port for the slirp target')
+            slirp_port = qemu.port
 
             # Re-run ide-sdk with the actual slirp address; image is already 
built.
             bitbake_sdk_cmd = (
-- 
2.55.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#245230): 
https://lists.openembedded.org/g/openembedded-core/message/245230
Mute This Topic: https://lists.openembedded.org/mt/121125158/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to