This function is not called during plugin initialization (#2140),
but should be useful for downstream projects that uses overlayfs
snapshotter as a Go library.
Benchmark result on Ubuntu 17.10, GCE n1-standard-4:
BenchmarkOverlaySupportedOnExt4-4 100 20490598 ns/op
BenchmarkOverlayUnsupportedOnFType0XFS-4 30000 39316 ns/op
BenchmarkOverlaySupportedOnFType1XFS-4 100 19287083 ns/op
BenchmarkOverlayUnsupportedOnFAT-4 100 14217772 ns/op
i.e. the overhead is typically about 20 msec on this machine.
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
The testsuite alters global state by setting the umask, avoid
running the testsuite in parallel and move umask manipulation
to the test suite level to individual tests may run in parallel.
Added better error messaging and handling.
Removed reliance on testing object for handling cleanup failure.
When a cleanup error occurred, it would fail the test but the log
would get skipped. With this change the failure will show up for
the running test.
Update test unmounting to set the detach flag, avoiding races with
btrfs which may see the device as busy when attempting to unmount.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>