Add a basic test of ping6's functionality
Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential D21292
ping6: add a basic test of ping6's functionality jansucan on Aug 16 2019, 4:20 PM. Authored by Tags None Referenced Files
Subscribers
Details
Add a basic test of ping6's functionality Submitted by: Ján Sučan <sucanjan@gmail.com>
Diff Detail
Event TimelineComment Actions This test will fail if IPv6 is not configured at runtime. It needs some kind of check for that. Comment Actions Could I use getaddrinfo command for that? Like this: if getaddrinfo -f inet6 localhost 1>/dev/null 2>&1; then atf_add_test_case ping6_c3 Comment Actions Yes, you can use getaddrinfo. However, don't use it in atf_init_test_cases. Instead, use it at the top of the test body (possibly in a dedicated function). If it fails, then call atf_skip. Comment Actions Use a single tab width in the ATF test script. Skip the test case if IPv6 is not configured. Comment Actions This looks mostly good, but I have two concerns:
Comment Actions Yes, the TTL will be filtered out. Both ping and ping6 tests will be sending only one packet. I think it would be good to add -t 1 (timeout in seconds) for one packet just to be sure that the test case will not wait for the reply forever (I don't know if ATF has some timeout). Comment Actions Rebase. Comment Actions Please add a copyright header with a $FreeBSD$ tag to the top of ping6_test.sh. Also, add an entry to etc/mtree/BSD.tests.dist. Comment Actions The copyright header and the tag are going to be added. There is already an entry for ping6 test directory in etc/mtree/BSD.tests.dist in this diff. Could you please let me know whether I understand the requirement correctly? Comment Actions Uhh, the requirement would be that I need to read the entire review, not just the most recent commit. |