Bug 10713

Summary: Allow testimage to work with slirp in addition to working with tun/tap
Product: [QA/Testing] Runtime Testing Reporter: brian avery <brian.avery>
Component: generalAssignee: yeoh ee peng <ee.peng.yeoh>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: anibal.limon, benjamin.esquivel, chin.huat.ang, ee.peng.yeoh, mariano.lopez, richard.purdie, sgw, todor.minchev
Version: 2.3   
Target Milestone: 2.7 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)
Bug Depends on: 7887    
Bug Blocks: 9592    

Description brian avery 2016-11-23 18:04:49 UTC
In order for testimage to be run in containers where the tun/tap device is not available, we need to support running testimage using user mode netowrking (slirp).
Comment 1 Randy Witt 2016-11-29 18:33:09 UTC
Was in the progress of implementation, but due to 7887 switching off.
Comment 2 Randy Witt 2017-01-03 21:50:07 UTC
A status update was requested, Robert took 7887, but that bug is still open. I know patches went to the list, but it doesn't appear anything was merged.
Comment 3 brian avery 2017-01-25 22:00:32 UTC
7887 merged now.
Comment 4 Richard Purdie 2017-12-07 15:33:00 UTC
This is useful as it allows us to run testimage in containers.
Comment 5 Joshua Lock 2017-12-22 17:07:05 UTC
*** Bug 12447 has been marked as a duplicate of this bug. ***
Comment 6 yeoh ee peng 2018-11-09 08:50:25 UTC
Manually launched qemu with slirp, then ssh to qemu from host machine using port binded. 

In progress of code exploration for testimage.bbclass, OEQemuTarget, & OERuntimeTestContextExecutor.
Comment 7 yeoh ee peng 2018-11-15 09:18:46 UTC
Enabled testimage to work with slirp and enable connection from host machine to qemu with slirp using SSH. 

After enabled testimage to work with slirp, found that oe-selftest was impacted by this changes. 

There are 2 options related to oe-selftest.
1. Disable the qemu with slirp and connection to qemu from host machine using SSH
for oe-selftest
2. Enable this for oe-selftest

Currently, working on option (2), in progress of developing and testing.
Comment 8 yeoh ee peng 2018-11-19 07:12:50 UTC
Received inputs from Anuj to only focus the enhancement for testimage while make sure changes does not impact oe-selftest. Completed the enhancement and now performing further testing.
Comment 10 yeoh ee peng 2018-11-22 09:45:57 UTC
There was improvement needed for oeqa/runtime. 

Currently, ssh test assumed ping to target will be available all the time. That was not true when using qemu with slirp, while enabling testimage with slirp, host machine running testimage will connect to the target qemu through "localhost:<port_binded_to_qemu>". 

Furthermore, when using qemu with slirp, the ping test will ping "localhost" as the self.runner.ip = 'localhost'.
Comment 11 yeoh ee peng 2018-11-29 09:05:53 UTC
Patches accepted.