tests: Improve failure mode for unresolvable hostname
authorMarc Dionne <marc.c.dionne@gmail.com>
Sun, 17 Feb 2013 18:29:38 +0000 (13:29 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Mon, 18 Feb 2013 04:51:15 +0000 (20:51 -0800)
commit0a528a52f5da5e225567f3b9deab9f7d08022f9f
tree9bd689ca17ad10b9666e592018384b6192b8d796
parent4051c5e96e921b69ac2a6e7bcb805cbc0a8f7993
tests: Improve failure mode for unresolvable hostname

In the case of a host where gethostbyname is unable to resolve
the hostname, afstest_BuildTestConfig() may return NULL which
can cause several tests to crash.

Add a common function to look out for this condition and use it where
appropriate.  When it occurs, the current module is skipped and
the user gets an error message that indicates the configuration
problem.

Change-Id: I7216876eb2424368f415e5759e2b95009ad055b2
Reviewed-on: http://gerrit.openafs.org/9120
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
tests/auth/Makefile.in
tests/auth/authcon-t.c
tests/auth/keys-t.c
tests/auth/realms-t.c
tests/auth/superuser-t.c
tests/common/common.h
tests/common/config.c
tests/common/network.c
tests/volser/vos-t.c