Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/fs/ffs Remove non-functional cleanup code from test_ca...



details:   https://anonhg.NetBSD.org/src/rev/d14233bc6c2e
branches:  trunk
changeset: 937469:d14233bc6c2e
user:      gson <gson%NetBSD.org@localhost>
date:      Thu Aug 20 07:23:20 2020 +0000

description:
Remove non-functional cleanup code from test_case() and test_case_root().
It had no effect because RUMP_SOCKETS_LIST is not set in the shell
running the cleanup phase.  Even if RUMP_SOCKETS_LIST had been set,
the code would still not have worked correctly because it ran
rump.halt via "atf_check -s exit:1", which would cause the first
successful halting of a rump processes to be treated as a failure
and abort the cleanup without halting any other rump processes still
running.

diffstat:

 tests/fs/ffs/ffs_common.sh |  18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)

diffs (53 lines):

diff -r f565c0a3c1eb -r d14233bc6c2e tests/fs/ffs/ffs_common.sh
--- a/tests/fs/ffs/ffs_common.sh        Thu Aug 20 07:15:52 2020 +0000
+++ b/tests/fs/ffs/ffs_common.sh        Thu Aug 20 07:23:20 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ffs_common.sh,v 1.4 2020/08/17 06:18:39 gson Exp $ 
+# $NetBSD: ffs_common.sh,v 1.5 2020/08/20 07:23:20 gson Exp $ 
 
 create_ffs()
 {
@@ -30,7 +30,7 @@
        local check_function="${1}"; shift
        local descr="${1}"; shift
        
-       atf_test_case "${name}" cleanup
+       atf_test_case "${name}"
 
        eval "${name}_head() { \
                atf_set "descr" "${descr}"
@@ -41,12 +41,6 @@
                export RUMP_SERVER=unix://\${RUMP_SOCKET}; \
                ${check_function} " "${@}" "; \
        }"
-       eval "${name}_cleanup() { \
-               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}"
 }
 
@@ -56,7 +50,7 @@
        local check_function="${1}"; shift
        local descr="${1}"; shift
        
-       atf_test_case "${name}" cleanup
+       atf_test_case "${name}"
 
        eval "${name}_head() { \
                atf_set "descr" "${descr}"
@@ -68,12 +62,6 @@
                export RUMP_SERVER=unix://\${RUMP_SOCKET}; \
                ${check_function} " "${@}" "; \
        }"
-       eval "${name}_cleanup() { \
-               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}"
 }
 



Home | Main Index | Thread Index | Old Index