Skip to content

autotests: make the FreeBSD test pass

Adriaan de Groot requested to merge work/adridg/freebsd-lsof into master

"make" as in "force", because this is a bit of a bodge. lsof doesn't handle open regular files on ZFS (as of 2022, in FreeBSD 13 and later, because lsof expects openSolaris ZFS instead of openZFS and I'm lost in the woods of versioning -- see the FreeBSD bugzilla report). Because lsof doesn't handle open regular files, the test fails: there is no output from lsof even though QFile holds an open regular file.

So on FreeBSD, also create a local server socket (like a DBus socket, or any other named local socket; not a pipe). lsof does list those, since they live in different kernel data structures. This makes the test pass, because now this is an open file descriptor.

This does go to illustrate that the listopenfiles job is functionally broken on FreeBSD 13 and later with ZFS filesystems: it won't list open regular files or the processes that hold them.

Merge request reports