Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow running and testing network samples in automatic way #19540

Closed
4 of 5 tasks
jukkar opened this issue Oct 2, 2019 · 2 comments
Closed
4 of 5 tasks

Allow running and testing network samples in automatic way #19540

jukkar opened this issue Oct 2, 2019 · 2 comments
Assignees
Labels
area: Networking Enhancement Changes/Updates/Additions to existing features
Milestone

Comments

@jukkar
Copy link
Member

jukkar commented Oct 2, 2019

Is your enhancement proposal related to a problem? Please describe.
The network samples can bit rot easily as they are only compile tested by sanitycheck script.
We need to run the network samples in some semi-automatic way so that we can be sure that there is no regressions in network stack.

Describe the solution you'd like
Use Docker to to run scripts and programs from net-tools, then have qemu / native_posix to connect to that Docker instance. Have also IP addresses setup properly so that connectivity between these two works.

The task can can be split up as follows:

  • Create a script to run sample tests against the Docker host tools from 'net-tools'
  • Add sample tests where the Docker 'net-tools' image can serve as the client end as the result is easy to have available when the client stops executing in the Docker container
  • Investigate how to utilize e.g. native_posix Zephyr target to exit with a return value after a completed test where Zephyr acts as a client and the Docker image is the server end
  • Create sample tests where the native_posix Zephyr target can serve as the test client, if the above point works out properly
    - [ ] Write the test script in some other language than bash, python has been proposed (future development, if needed)
  • Run samples against Docker net-tools container #19677 Is tracking items
@jukkar jukkar added Enhancement Changes/Updates/Additions to existing features area: Networking labels Oct 2, 2019
@jukkar jukkar added this to the v2.1.0 milestone Oct 2, 2019
@dleach02
Copy link
Member

dleach02 commented Nov 5, 2019

@jukkar, I note that all the subtasks are checked off but it is unclear to me if there are actual PRs or items merged into main?

@pfl
Copy link
Collaborator

pfl commented Nov 5, 2019

note that all the subtasks are checked off but it is unclear to me if there are actual PRs or items merged into main?

We have #19677 in the pipeline implementing the ticked off items. The support in net-tools was handled by zephyrproject-rtos/net-tools#37 which was already merged.

@dleach02 dleach02 modified the milestones: v2.1.0, v2.2.0 Dec 9, 2019
pfl added a commit to pfl/zephyr that referenced this issue Jan 24, 2020
Add a script that sets up Docker networking and starts the net-tools
Docker container. If successful, run Zephyr with native_posix and
execute the appropriate net-tools container executable. The proper
net-tools executable and arguments is selected depending on the
basename of the sample directory. This script needs to be updated
if the net-tools Docker image is updated in some incompatible way.

The net-tools directory is assumed to exist at the same level as
the Zephyr base directory, but its location can be set using the
'-N' command line argument. Likewise, '-Z' sets the Zephyr top level
directory.

When stopping Zephyr, go through all child processes since running a
native posix or other variant of Zephyr may cause a hierarchy of
processes to be created.

Fixes: zephyrproject-rtos#19540

Signed-off-by: Patrik Flykt <[email protected]>
@nashif nashif closed this as completed in 65ffc71 Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

3 participants