Skip to content

tests/gnrc_tcp: provide regression tests for fixed issues #12369

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

Merged
merged 3 commits into from
Oct 7, 2019

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Oct 3, 2019

Contribution description

This provides regression tests for some issues that were found in the past. The respective issues are quoted in the comments. I actually already found a regression when implementing these (see #12368).

Testing procedure

BOARD="<pick one>" make -C tests/gnrc_tcp flash
sudo make -C tests/gnrc_tcp test

Issues/PRs references

Require #12368 to work.

@miri64 miri64 added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking Area: tests Area: tests and testing framework labels Oct 3, 2019
@miri64 miri64 requested a review from brummer-simon October 3, 2019 17:47
@miri64
Copy link
Member Author

miri64 commented Oct 4, 2019

@nmeum @brummer-simon please have a look.

Copy link
Member

@brummer-simon brummer-simon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for providing additional tests to the latest issues.

By looking at the given flake8 config line length up to 119 characters are allowed. Would you please look over the code reformat function calls that are split over multiple lines. It is just easier to read and RIOT deviates from PEP8 in terms of max line length anyway. Aside from that, good job.

Copy link
Member

@brummer-simon brummer-simon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK by me.

Aside from code review I tested the PR on 'native'.

EDIT: I'll revert my ACK see next comment.

Copy link
Member

@brummer-simon brummer-simon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found something small while executing the test on "nucleo-f401re".

@brummer-simon
Copy link
Member

ACK from my side. Tested here on nucleo-f401re

@miri64 miri64 force-pushed the tests/enh/gnrc_tcp branch from 1780e36 to ef52600 Compare October 5, 2019 13:12
@miri64
Copy link
Member Author

miri64 commented Oct 5, 2019

Rebased to current master to include #12368.

@miri64
Copy link
Member Author

miri64 commented Oct 5, 2019

@RIOT-OS/maintainers this also needs a proxy-ACK.

@miri64 miri64 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Oct 5, 2019
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proxy-ACK (also had a look and found no major issues codewise).

You can squash.

@miri64
Copy link
Member Author

miri64 commented Oct 5, 2019

@aabadie, so I will squash. Can you maybe also test on samr21-xpro, just to be sure? I didn't have one at hand when working with the tests.

@miri64 miri64 force-pushed the tests/enh/gnrc_tcp branch from ef52600 to e14765d Compare October 5, 2019 17:28
@miri64 miri64 force-pushed the tests/enh/gnrc_tcp branch from e14765d to c3a85bb Compare October 6, 2019 15:35
@miri64
Copy link
Member Author

miri64 commented Oct 6, 2019

Provided fix for a typo

@fjmolinas
Copy link
Contributor

fjmolinas commented Oct 6, 2019

Just following the README and testing on samr21-xpro I have a timeout on gnrc_tcp_open_active:

EDIT: the following output is with echo=true

sudo -E BOARD=samr21-xpro make -C tests/gnrc_tcp test
make: Entering directory '/home/francisco/Workspace/RIOT/tests/gnrc_tcp'
make[1]: Nothing to be done for 'all'.
buffer_init
buffer_get_max_size
make[2]: Nothing to be done for 'all'.
sudo /home/francisco/Workspace/RIOT/dist/tools/ethos/ethos tap0 /dev/ttyACM0 115200
----> ethos: sending hello.
----> ethos: activating serial pass through.
----> ethos: hello reply received
----> ethos: hello received
main(): This is RIOT! (Version: 2019.10-devel-1314-gd9047a-pr-12369)
RIOT GNRC_TCP test application
> buffer_init: argc=1, argv[0] = buffer_init
> buffer_get_max_size: argc=1, argv[0] = buffer_get_max_size
buffer_get_max_size: returns 2048
ifconfig
> Iface  5  HWaddr: 00:31:8B:E0:2D:3F 
gnrc_tcp_tcb_init
gnrc_tcp_open_active AF_INET6 fe80::84a8:e8ff:fe16:6c9b%5 60720 0
          L2-PDU:1500 MTU:1500  HL:64  Source address length: 6
          Link type: wired
          inet6 addr: fe80::231:8bff:fee0:2d3f  scope: local  TNT[1]
          inet6 group: ff02::1
          inet6 group: ff02::1:ffe0:2d3f
          
> gnrc_tcp_tcb_init: argc=1, argv[0] = gnrc_tcp_tcb_init
> gnrc_tcp_open_active: argc=5, argv[0] = gnrc_tcp_open_active, argv[1] = AF_INET6, argv[2] = fe80::84a8:e8ff:fe16:6c9b%5, argv[3] = 60720, argv[4] = 0
gnrc_tcp_open_active: returns -ETIMEOUT
> Timeout in expect script at "child.expect_exact('gnrc_tcp_open_active: returns 0')" (tests/gnrc_tcp/tests/03-send_data.py:44)
  File "/home/francisco/Workspace/RIOT/dist/pythonlibs/testrunner/__init__.py", line 29, in run
    testfunc(child)
  File "/home/francisco/Workspace/RIOT/tests/gnrc_tcp/tests/03-send_data.py", line 44, in testfunc
    child.expect_exact('gnrc_tcp_open_active: returns 0')
  File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 384, in expect_exact
    return exp.expect_loop(timeout)
  File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 104, in expect_loop
    return self.timeout(e)
  File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 68, in timeout
    raise TIMEOUT(msg)

@miri64
Copy link
Member Author

miri64 commented Oct 6, 2019

Just following the README and testing on samr21-xpro I have a timeout on gnrc_tcp_open_active:
sudo -E BOARD=samr21-xpro make -C tests/gnrc_tcp test

This test is not introduced here (the tests here only use gnrc_tcp_open_passive, but I had this occassionally when testing #11930. I hoped the increased timeout would help. In any way: this is unrelated to this PR.

@miri64
Copy link
Member Author

miri64 commented Oct 6, 2019

Why is there output in your script btw Oo?

@fjmolinas
Copy link
Contributor

Why is there output in your script btw Oo?

I set echo=true to see what was timing ou.

@fjmolinas
Copy link
Contributor

fjmolinas commented Oct 6, 2019

This test is not introduced here (the tests here only use gnrc_tcp_open_passive, but I had this occassionally when testing #11930. I hoped the increased timeout would help. In any way: this is unrelated to this PR.

In that case If I limit the test to tests/gnrc_tcp/tests/05-garbage-pkts.py:

sudo -E BOARD=samr21-xpro make -C tests/gnrc_tcp test
make: Entering directory '/home/francisco/Workspace/RIOT/tests/gnrc_tcp'
make[1]: Nothing to be done for 'all'.
- test_short_payload SUCCESS

- test_short_header SUCCESS

- test_send_ack_instead_of_syn SUCCESS

- test_option_parsing_term SUCCESS

05-garbage-pkts.py: success

make: Leaving directory '/home/francisco/Workspace/RIOT/tests/gnrc_tcp'

@miri64
Copy link
Member Author

miri64 commented Oct 7, 2019

👍 I'll see if I can reproduce the other test.

@miri64 miri64 merged commit cac8a50 into RIOT-OS:master Oct 7, 2019
@miri64 miri64 deleted the tests/enh/gnrc_tcp branch October 7, 2019 04:14
@miri64
Copy link
Member Author

miri64 commented Oct 7, 2019

(yes I am, but for different cases than @fjmolinas was able to and only in some cases... @brummer-simon I think there is still some stabilization work required to be done to the tests commands...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants