OpenAFS Master Repository branch, master, updated. 71acc392a399d70aec033dfe31f010d6f5cfb565
Gerrit Code Review
gerrit@openafs.org
Fri, 13 Aug 2021 17:50:44 -0400
The following commit has been merged in the master branch:
commit 71acc392a399d70aec033dfe31f010d6f5cfb565
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jul 1 21:18:04 2020 -0500
tests: Generalize temp dir management
Currently, afstest_BuildTestConfig calls afstest_mkdtemp (our thin
wrapper around mkdtemp) to create its temporary config dir. We may
want to make new tests, though, that create a temp dir for other
purposes. To make that easier, move a little more code into
afstest_mkdtemp, so the caller doesn't need to construct the template.
To allow callers to clean up such temporary dirs, change
afstest_UnlinkTestConfig into a more general function,
afstest_rmdtemp. Allow this new function to remove all files in a dir,
not just files one-level-deep. To avoid needing to write our own
traversal and removal logic, just run 'rm -rf' via a new function,
afstest_systemlp().
Move these temp dir-related functions from config.c into files.c,
since they are no longer specific to config dirs.
Change-Id: I16750a2f30e98c9ca2e14dfb7d3fc9bc5d456e8d
Reviewed-on: https://gerrit.openafs.org/14632
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
tests/auth/authcon-t.c | 2 +-
tests/auth/keys-t.c | 4 +-
tests/auth/realms-t.c | 10 +++---
tests/auth/superuser-t.c | 2 +-
tests/auth/writekeyfile.c | 2 +-
tests/common/common.h | 5 ++-
tests/common/config.c | 63 ++----------------------------------
tests/common/exec.c | 78 +++++++++++++++++++++++++++++++++++++++++++++
tests/common/files.c | 52 ++++++++++++++++++++++++++++++
tests/volser/vos-t.c | 2 +-
10 files changed, 147 insertions(+), 73 deletions(-)
--
OpenAFS Master Repository