]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fusefs: annotate deliberate file descriptor leaks in the tests
authorasomers <asomers@FreeBSD.org>
Wed, 26 Jun 2019 20:25:57 +0000 (20:25 +0000)
committerasomers <asomers@FreeBSD.org>
Wed, 26 Jun 2019 20:25:57 +0000 (20:25 +0000)
commita04ba40349816021a62c8aea264afe04bdb44b67
treed55aa439f2a1744d7ed581e1887203b312df7cf9
parent5eddd5cc02c830942861ad33d2f6283f2519fa73
fusefs: annotate deliberate file descriptor leaks in the tests

closing a file descriptor causes FUSE activity that is superfluous to the
purpose of most tests, but would nonetheless require matching expectations.
Rather than do that, most tests deliberately leak file descriptors instead.
This commit moves the leakage from each test into two trivial functions:
leak and leakdir.  Hopefully Coverity will only complain about those
functions and not all of their callers.

Sponsored by: The FreeBSD Foundation
18 files changed:
tests/sys/fs/fusefs/allow_other.cc
tests/sys/fs/fusefs/create.cc
tests/sys/fs/fusefs/default_permissions.cc
tests/sys/fs/fusefs/fifo.cc
tests/sys/fs/fusefs/flush.cc
tests/sys/fs/fusefs/fsync.cc
tests/sys/fs/fusefs/fsyncdir.cc
tests/sys/fs/fusefs/io.cc
tests/sys/fs/fusefs/locks.cc
tests/sys/fs/fusefs/nfs.cc
tests/sys/fs/fusefs/notify.cc
tests/sys/fs/fusefs/open.cc
tests/sys/fs/fusefs/read.cc
tests/sys/fs/fusefs/readdir.cc
tests/sys/fs/fusefs/setattr.cc
tests/sys/fs/fusefs/unlink.cc
tests/sys/fs/fusefs/utils.hh
tests/sys/fs/fusefs/write.cc