Add a basic test of ping6's functionality
Submitted by: Ján Sučan <email@example.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)
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.
This looks mostly good, but I have two concerns:
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).
Send only one packet.
Filter out TTL value.
Specify packet size on the command line.
Add -X 1 option to reduce time of waiting for the reply.
Add -u option to diff. This makes the result file more readable in case of an error.
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?