Module Name:    src
Committed By:   bouyer
Date:           Sat Mar 12 13:43:58 UTC 2011

Modified Files:
        src/tests/fs/ffs: quotas_common.sh

Log Message:
Add support for multiple rump servers in shutdown and cleanup


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/ffs/quotas_common.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/fs/ffs/quotas_common.sh
diff -u src/tests/fs/ffs/quotas_common.sh:1.2 src/tests/fs/ffs/quotas_common.sh:1.3
--- src/tests/fs/ffs/quotas_common.sh:1.2	Sun Mar  6 17:08:40 2011
+++ src/tests/fs/ffs/quotas_common.sh	Sat Mar 12 13:43:58 2011
@@ -1,4 +1,4 @@
-# $NetBSD: quotas_common.sh,v 1.2 2011/03/06 17:08:40 bouyer Exp $ 
+# $NetBSD: quotas_common.sh,v 1.3 2011/03/12 13:43:58 bouyer Exp $ 
 
 create_with_quotas()
 {
@@ -25,7 +25,9 @@
 
 rump_shutdown()
 {
-	atf_check -s exit:0 rump.halt
+	for s in ${RUMP_SOCKETS_LIST}; do
+		atf_check -s exit:0 env RUMP_SERVER=unix://${s} rump.halt;
+	done
 # check that the quota inode creation didn't corrupt the filesystem
 	atf_check -s exit:0 -o "match:already clean" \
 		-o "match:Phase 6 - Check Quotas" \
@@ -46,10 +48,15 @@
 		atf_set "timeout" "60"
 	}"
 	eval "${name}_body() { \
+		RUMP_SOCKETS_LIST=\${RUMP_SOCKET}; \
+		export RUMP_SERVER=unix://\${RUMP_SOCKET}; \
 		${check_function} " "${@}" "; \
 	}"
 	eval "${name}_cleanup() { \
-		atf_check -s exit:1 -o ignore -e ignore rump.halt; \
+		for s in \${RUMP_SOCKETS_LIST}; do \
+			export RUMP_SERVER=unix://\${s}; \
+			atf_check -s exit:1 -o ignore -e ignore rump.halt; \
+		done; \
 	}"
 	tests="${tests} ${name}"
 }
@@ -68,10 +75,15 @@
 		atf_set "timeout" "60"
 	}"
 	eval "${name}_body() { \
+		RUMP_SOCKETS_LIST=\${RUMP_SOCKET}; \
+		export RUMP_SERVER=unix://\${RUMP_SOCKET}; \
 		${check_function} " "${@}" "; \
 	}"
 	eval "${name}_cleanup() { \
-		atf_check -s exit:1 -o ignore -e ignore rump.halt; \
+		for s in \${RUMP_SOCKETS_LIST}; do \
+			export RUMP_SERVER=unix://\${s}; \
+			atf_check -s exit:1 -o ignore -e ignore rump.halt; \
+		done; \
 	}"
 	tests="${tests} ${name}"
 }
@@ -80,9 +92,7 @@
 {
 	IMG=fsimage
 	DIR=target
-	RUMP_SOCKET=test
-	RUMP_SERVER=unix://${RUMP_SOCKET}
-	export RUMP_SERVER
+	RUMP_SOCKET=test;
 	for i in ${tests}; do
 		atf_add_test_case $i
 	done

Reply via email to