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

Use shlex to tokenize daemon args #17

Merged
merged 1 commit into from
Apr 11, 2019

Conversation

butjar
Copy link
Contributor

@butjar butjar commented Apr 10, 2019

While implementing a new routing daemon, splitting arguments in the
format "--key1=val1 --key2=val2" failed. Replacing the split with
shlex.split fixed that problem.

https://docs.python.org/2/library/shlex.html#shlex.split

While implementing a new routing daemon, splitting arguments in the
format "--key1=val1 --key2=val2" failed. Replacing the split with
shlex.split fixed that problem.

https://docs.python.org/2/library/shlex.html#shlex.split
@butjar
Copy link
Contributor Author

butjar commented Apr 10, 2019

I quickly "tested" the code on a fresh ubuntu 18.04.2 vm (running python -m ipmininet.examples --topo=simple_ospf_network). I would love to run the tests, but the dependencies do not work out of the box for that. Can you help me running the tests ?

@jadinm
Copy link
Collaborator

jadinm commented Apr 10, 2019

I quickly "tested" the code on a fresh ubuntu 18.04.2 vm (running python -m ipmininet.examples --topo=simple_ospf_network). I would love to run the tests, but the dependencies do not work out of the box for that. Can you help me running the tests ?

Sure, could you give me the output of sudo python setup.py test -v?

@butjar
Copy link
Contributor Author

butjar commented Apr 10, 2019

Doesn't look terrible:

=============================== test session starts ================================
platform linux2 -- Python 2.7.12, pytest-4.4.0, py-1.8.0, pluggy-0.9.0
rootdir: /home/ubuntu/ipmininet
collected 40 items

ipmininet/tests/test_bgp.py ...                                              [  7%]
ipmininet/tests/test_gre.py .                                                [ 10%]
ipmininet/tests/test_iptables.py .                                           [ 12%]
ipmininet/tests/test_misc.py ..............                                  [ 47%]
ipmininet/tests/test_ospf.py .FFFFFFF                                        [ 67%]
ipmininet/tests/test_ospf6.py .FFFFF                                         [ 82%]
ipmininet/tests/test_physicalinterface.py ...                                [ 90%]
ipmininet/tests/test_radv.py ...                                             [ 97%]
ipmininet/tests/test_sshd.py ^C^C

The sshd test just get stuck. I had to cancle them at some point.

I don't think the OSPF tests fail because of the change:
test_result.txt

@jadinm
Copy link
Collaborator

jadinm commented Apr 11, 2019

Thank you :)
I ran the tests on your pull request and they work on my side.

For OSPF and OSPF6, it seems that the test timeout is too low to always work.
I will increase it.

The sshd test troubles me. Could you retry it with sudo python setup.py test --addopts ipmininet/tests/test_sshd.py --addopts --fulltrace ?
If the execution gets stucked again and you need to cancel it, it will at least print where it stopped.

@butjar
Copy link
Contributor Author

butjar commented Apr 11, 2019

I tried to run the test with fulltrace (sudo python setup.py test --addopts "ipmininet/tests/test_sshd.py --fulltrace"). The test still gets stuck:
test_sshd_result.txt

@butjar
Copy link
Contributor Author

butjar commented Apr 11, 2019

Seems not related to the PR ... we can move this to another issue and merge if you agree.

@jadinm jadinm merged commit bd99841 into cnp3:master Apr 11, 2019
@jadinm jadinm mentioned this pull request Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants