tests/gcoap_fileserver: add integration test for GCoAP fileserver
Contribution description
This adds an integration test for the GCoAP fileserver / NanoCoAP blockwise get connected over a lossy, simulated 802.15.4 link.
Two nodes are launched, one acting as the fileserver, the other as a client. The server serves a file from constfs that the client downloads with ncget.
Then the hash of the downloaded file is compared with the original file. The test will fail if there is no match.
Testing procedure
Run
make -C tests/gcoap_fileserver test
Issues/PRs references
This adds an integration test for the GCoAP fileserver / NanoCoAP blockwise get connected over a lossy, simulated 802.15.4 link.
Two nodes are launched, one acting as the fileserver, the other as a client. The server serves a file from constfs that the client downloads with ncget.
Then the hash of the downloaded file is compared with the original file. The test will fail if there is no match.
That's a good text to go into a README in the test.
I've given this some testing, and am confused by the outcomes:
When just doing make all test, things run through fine.
When I reduce retransmissions from 10 to -DCONFIG_COAP_MAX_RETRANSMIT=2, I haven't had a single test failure in 3 runs. That's highly unlikely with a 0.75 success rate per link, giving < 50% chance of any single round trip, so even a single-block test should fail ever now and then, let alone anything with multiple blocks.
Ah good catch! I missed that native would echo the command, so A.cmd("md5sum /const/song.txt").split()[0] would always return md5sum.
There are still link-layer retransmissions, but if we get rid of those with
CFLAGS += -DCONFIG_IEEE802154_DEFAULT_MAX_FRAME_RETRANS=1
things are failing as expected.
Thank you!