tests: Introduce afstest_asprintf 20/14620/4
authorAndrew Deason <adeason@sinenomine.net>
Wed, 14 Apr 2021 21:09:37 +0000 (16:09 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Sun, 8 Aug 2021 00:41:08 +0000 (20:41 -0400)
commitd16a0f8d166c91122d75e6f648c9c7577cc22ee3
tree22543f924fd64a83071bb6774c8504cbd2c15857
parent405001be722457680428ba6ec7f3b1b5a6fab47a
tests: Introduce afstest_asprintf

Add a thin wrapper around asprintf, called afstest_asprintf (and
afstest_vasprintf), which does its own error checking. This just helps
makes tests a little less cluttered when needing to construct strings.

Adapt all asprintf callers in 'tests' to use the wrapper.

Change-Id: I6c4ae5b72af827e2c4c66ecfc57f152855b1d401
Reviewed-on: https://gerrit.openafs.org/14620
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
tests/auth/keys-t.c
tests/auth/writekeyfile.c
tests/common/common.h
tests/common/config.c
tests/common/misc.c
tests/common/servers.c