Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs/nfs Add cleanup of possible leftover rump processes...
details: https://anonhg.NetBSD.org/src/rev/8c0675b0f39f
branches: trunk
changeset: 942793:8c0675b0f39f
user: gson <gson%NetBSD.org@localhost>
date: Thu Aug 20 07:32:40 2020 +0000
description:
Add cleanup of possible leftover rump processes, replacing the
non-working cleanup code just removed from ffs_common.sh. Fixes
PR bin/48892 with respect to the t_rquotad test.
diffstat:
tests/fs/nfs/t_rquotad.sh | 36 ++++++++++++++++++++++++++++++++++--
1 files changed, 34 insertions(+), 2 deletions(-)
diffs (53 lines):
diff -r 028550b37f35 -r 8c0675b0f39f tests/fs/nfs/t_rquotad.sh
--- a/tests/fs/nfs/t_rquotad.sh Thu Aug 20 07:23:20 2020 +0000
+++ b/tests/fs/nfs/t_rquotad.sh Thu Aug 20 07:32:40 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_rquotad.sh,v 1.7 2019/05/13 17:55:07 bad Exp $
+# $NetBSD: t_rquotad.sh,v 1.8 2020/08/20 07:32:40 gson Exp $
#
# Copyright (c) 2011 Manuel Bouyer
# All rights reserved.
@@ -24,10 +24,42 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
+
+# Like test_case_root() in ../ffs/ffs_common.sh, plus cleanup of both
+# rump servers.
+
+test_case_rquotad()
+{
+ local name="${1}"; shift
+ local check_function="${1}"; shift
+ local descr="${1}"; shift
+
+ atf_test_case "${name}" cleanup
+
+ eval "${name}_head() { \
+ atf_set "descr" "${descr}"
+ atf_set "require.user" "root"
+ atf_set "timeout" "360"
+ }"
+ eval "${name}_body() { \
+ RUMP_SOCKETS_LIST=\${RUMP_SOCKET}; \
+ export RUMP_SERVER=unix://\${RUMP_SOCKET}; \
+ ${check_function} " "${@}" "; \
+ }"
+ # Can't use RUMP_SOCKETS_LIST here because it is not set in
+ # the cleanup shell.
+ eval "${name}_cleanup() { \
+ for s in \${RUMP_SOCKET} clientsock; do \
+ RUMP_SERVER=unix://\${s} rump.halt 2>/dev/null || true; \
+ done; \
+ }"
+ tests="${tests} ${name}"
+}
+
for e in le be; do
for v in 1; do
for q in "user" "group" "both"; do
- test_case_root get_nfs_${e}_${v}_${q} get_nfs_quota \
+ test_case_rquotad get_nfs_${e}_${v}_${q} get_nfs_quota \
"get NFS quota with ${q} enabled" ${e} ${v} ${q}
done
done
Home |
Main Index |
Thread Index |
Old Index