Applying TDD to an IP stack issue
I'm writing to you about your project to develop a testsuite for Zephyr
networking stack using TTCN-3 test language,
https://github.com/intel/net-test-suites . I also cc: this to Zephyr's
development list, as I think the project don't get the attention it
deserves, so the more public discussions about it, the more network
developers will hopefully catch up with it.
So, it's nice to have a dozen or so of tests which pass for Zephyr now.
But the problem we have is that not all things work as expected and not
all cases handled. In other words, we need tests which fail for Zephyr,
to be able to fix them.
I finally throughly investigated and confirmed one such "not handled"
case - TCP FIN packets aren't being retransmitted by Zephyr:
https://github.com/zephyrproject-rtos/zephyr/issues/8188, and I wonder
if you'd be interested in making a test out of it, while I'm working
on a fix, essentially trying to apply TDD (test-driven development)
practice to this case, i.e. when if a bug is discovered, a test for it
is written, before proceeding with developing a fix, so a fix can be
readily verified with the test.
The case is follows: any packet in TCP communication should be queued
for retransmission, and be retransmitted if not ACKed in expected
time. Unfortunately, so far Zephyr queues and retransmits only data
packets, SYN and FIN packets aren't retransmitted. Unfortunately again,
SYN and FIN paths are sufficiently different in Zephyr implementation,
so for now I concentrate on FIN.
The simplest test would be as follows: it should be an active close,
i.e. connection close should happen on Zephyr side. Then test would
expect to receive a FIN pkt, but should ignore it and not send an ACK.
Then the test should verify that a FIN retransmission is received
within reasonable time.
Unfortunately, I'm neither familiar with TTCN-3, nor have resources
now to jump into learning it, so calling for your interest seems like
the best option to keep driving the testsuite project forward. It can
be a useful learning starter/exercise for other networking developers
too, if you showed how textual test spec above translates to TTCN-3
Thanks in advance,
Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
On 08/23/2018 01:29 PM, Paul Sokolovsky wrote:
The simplest test would be as follows: it should be an active close,Thanks for the input.
Currenly the TCP suite is very simple and doesn't have a capability to initiate events on a peer's side of TCP connection.
I am planning to add such capability and will try to implement such a test.