tests: Introduce afstest_MyHostAddr 02/14802/3
authorAndrew Deason <adeason@sinenomine.net>
Sat, 24 Apr 2021 21:08:38 +0000 (16:08 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 27 Oct 2021 05:06:33 +0000 (01:06 -0400)
commitc3df91f303d73a36d69778d680abf5dc562ed48a
treed68ae50a1cc652d8bb101034c73464caf962720e
parentf29ca90311d55f5d329a44ca0ce063ed5a82d283
tests: Introduce afstest_MyHostAddr

Several places resolve the local hostname into an IP address.
Consolidate these into a single function (gethostaddr), and add the
function afstest_MyHostAddr, which caches the IP and bails if we can't
resolve our hostname.

Change-Id: I7f71cd136796e4395c639eed8dd8eb19a7b9beec
Reviewed-on: https://gerrit.openafs.org/14802
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
tests/common/common.h
tests/common/config.c
tests/common/network.c