Add a basic test of ping's functionality
Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential D21289
ping: add a basic test of ping's functionality jansucan on Aug 16 2019, 7:56 AM. Authored by Tags None Referenced Files
Subscribers
Details
Add a basic test of ping's functionality Submitted by: Ján Sučan <sucanjan@gmail.com>
Diff Detail
Event TimelineComment Actions This test will fail if IPv4 is not configured. It needs some kind of test for that. Also, 127.0.0.1 is merely the conventional address for localhost. It's possible to configure localhost's address to 127.0.0.2, for example. Comment Actions It seems that that are far more variable parts in the output than I thought. I think the exact ttl value and ordering of responses cannot be relied on either. Is it OK having a test like this with all of that numeric information filetered out? Comment Actions Use a single tab width in the ATF test script. Skip the test case if IPv4 is not configured. Remove IP addresses from ping's output. Comment Actions That's what I was originally worried about. Ping is hard to test because it's so nondeterministic. If you filter out everything variable, will the remainder be a sufficiently useful test? Comment Actions Well, I'm not sure. It's not completely useless. It helped me to discover few bugs during development. Maybe we could keep it just for now when there is no better testing employed. Filtering those information out itself could be considered a check because if a string doesn't match the regular expression, it's not filtered out and it's detected. Please, decide. If you close this review (and the one for ping6), I will understand and I will continue without the ATF sh tests. Comment Actions This test is certainly better than nothing. I wish we had something better, but I can't come up with a superior test myself. I'll accept this in lieu of something perfect.
Comment Actions Filter out TTL value. Comment Actions Rebase. |