tests: Introduce afstest_GetProgname 91/13991/2
authorAndrew Deason <adeason@sinenomine.net>
Tue, 31 Dec 2019 18:04:48 +0000 (12:04 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 10 Jan 2020 04:56:27 +0000 (23:56 -0500)
commita21a2f8edb79d6190976e920a9a90d0878411146
tree13e69586e0f6abf761a2e87b205a5cabad3bd9d6
parent48d181ca1f4d753a51305d0352dadefed4323c00
tests: Introduce afstest_GetProgname

Currently, in tests/volser/vos-t.c we call afs_com_err as
"authname-t", which is clearly a mistake during some code refactoring
(introduced in commit 2ce3fdc5, "tests: Abstract out code to produce a
Ubik client").

We could just change this to "vos-t", but instead of specifying
constant strings everywhere, change this to figure out what the
current command is called, and just use that. Put this code into a new
function, afstest_GetProgname, and convert existing tests to use that
instead of hard-coding the program name given to afs_com_err.

Change-Id: I3ed02c89f93798568783c7d717e8fb2e39dcce14
Reviewed-on: https://gerrit.openafs.org/13991
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
tests/auth/Makefile.in
tests/auth/superuser-t.c
tests/common/common.h
tests/common/misc.c [new file with mode: 0644]
tests/volser/Makefile.in
tests/volser/vos-t.c