Skip to content

tests/gcoap_fileserver: add integration test for GCoAP fileserver#18199

Merged
benpicco merged 1 commit intoRIOT-OS:masterfrom
benpicco:tests/gcoap_fileserver
Sep 29, 2022
Merged

tests/gcoap_fileserver: add integration test for GCoAP fileserver#18199
benpicco merged 1 commit intoRIOT-OS:masterfrom
benpicco:tests/gcoap_fileserver

Conversation

@benpicco
Copy link
Contributor

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

@github-actions github-actions bot added the Area: tests Area: tests and testing framework label Jun 12, 2022
@benpicco benpicco requested review from chrysn and fabian18 June 12, 2022 20:28
@benpicco benpicco force-pushed the tests/gcoap_fileserver branch 3 times, most recently from 0f0207d to 0814b78 Compare June 14, 2022 07:54
Copy link
Member

@chrysn chrysn left a comment

Choose a reason for hiding this comment

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

Generally looks good, will test in next iteration (feel free to rebase if you're confident in your comment addressings)

@chrysn
Copy link
Member

chrysn commented Jun 14, 2022

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.

@benpicco benpicco force-pushed the tests/gcoap_fileserver branch from 0814b78 to 04a94c4 Compare June 17, 2022 11:27
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 13, 2022
@benpicco benpicco force-pushed the tests/gcoap_fileserver branch 3 times, most recently from 4159d6e to cdc4abb Compare July 14, 2022 21:43
@benpicco benpicco force-pushed the tests/gcoap_fileserver branch from cdc4abb to 6617f2e Compare August 2, 2022 08:50
@benpicco benpicco requested a review from maribu August 17, 2022 14:59
@benpicco benpicco requested a review from MrKevinWeiss August 30, 2022 18:11
@chrysn
Copy link
Member

chrysn commented Sep 14, 2022

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.

@benpicco benpicco force-pushed the tests/gcoap_fileserver branch from 6617f2e to 14f4f45 Compare September 14, 2022 11:00
@benpicco
Copy link
Contributor Author

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.

@benpicco benpicco force-pushed the tests/gcoap_fileserver branch from 14f4f45 to c5282bb Compare September 14, 2022 11:06
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

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

ACK. Looks good to and it definitely is good to have an end-to-end test in the CI.

@benpicco
Copy link
Contributor Author

Thank you!

@benpicco benpicco enabled auto-merge September 29, 2022 11:41
@benpicco benpicco added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Sep 29, 2022
@benpicco benpicco merged commit d0ac322 into RIOT-OS:master Sep 29, 2022
@benpicco benpicco deleted the tests/gcoap_fileserver branch September 29, 2022 21:08
@maribu maribu added this to the Release 2022.10 milestone Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants