Closed ngie-eign closed 5 years ago
CC: @emaste.
Also CC @markjdb
With this change we're really testing the kern_mkfifoat
special case in mknodat, but I think that's probably fine.
With this change we're really testing the
kern_mkfifoat
special case in mknodat, but I think that's probably fine.
Testing block or character devices will require having root access, which will reduce coverage. Testing whiteout files is only really doable with unionfs, which has been unreliable for me in the past on FreeBSD and is not portable to Linux.
I think testing out fifos is a reasonable tradeoff to make to maximize coverage and is an approach that's portable to Linux as well.
This prevents the test from failing with a false positive, i.e., -1/EINVAL, as the file type was not specified prior to this commit. Other alternatives (use S_IFBLK, S_IFCHR) is not possible, unless executing as root, so use fifos instead (which can be done by all users.
This unbreaks the test on FreeBSD 13.0-CURRENT and fixes #15.
Signed-off-by: Enji Cooper yaneurabeya@gmail.com