NetBSD-Bugs archive

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

bin/48892: some tests will not clean up rump server processes

>Number:         48892
>Category:       bin
>Synopsis:       some tests will not clean up rump server processes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 11 08:25:00 +0000 2014
>Originator:     Martin Husemann
>Release:        NetBSD 6.99.43
The NetBSD Foundation, Inc.
System: NetBSD 6.99.43 NetBSD 6.99.43 (UNPLUGED) #5: Tue 
Jun 10 20:13:06 CEST 2014
Architecture: earm
Machine: evbarm
Some tests, like for example /usr/tests/fs/nfs/t_rquotad, will create 
background server processes via rump_server or similar. There seems to be
no proper atf cleanup path used in this tests (or it does not work).

Now consider this fragment fo r_quotad:

        #now try a quota(8) call
        export RUMPHIJACK='blanket=/mnt,socket=all,path=/rump,vfs=getvfsstat'
        for q in ${expect} ; do
                local id=$(id -${q})
                atf_check -s exit:0 \
-o "match:/mnt        0       10    40960               1      20   51200      $
-o "match:Disk quotas for .*: $" \
                    quota -${q} -v

and note the cleanup code after it:
        unset LD_PRELOAD

Unfortunately this means that if the check fails (the -o match: disagrees with
the output) the test will abort and rump_quota_shutdown will not be invoked.

Worse: imagine you are using a (limited) tmpfs on /tmp. The left over 
rump_server (or rump_* mounts) will keep the filesystem image open, even
after atf automatically removed the working directory. So your tmpfs runs
full and more tests fail...

Currently a diskless system with / on nfs and /tmp on tmpfs is enough to
trigger bogus output from quota(1), so this will trigger the issue. Once
that is fixed: just modify the match expression to mismatch and run the
test, then pgrep for rump_server.

use atf explicit cleanup handling to shut down the rump servers.

Home | Main Index | Thread Index | Old Index