2017-01-13 23:31:21 +00:00
|
|
|
package testutil
|
2017-01-12 01:08:00 +00:00
|
|
|
|
|
|
|
import (
|
2017-01-17 21:26:56 +00:00
|
|
|
"syscall"
|
2017-01-12 01:08:00 +00:00
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
2017-01-13 23:31:21 +00:00
|
|
|
func Unmount(t *testing.T, mountPoint string) {
|
2017-01-12 01:08:00 +00:00
|
|
|
t.Log("unmount", mountPoint)
|
2017-01-17 21:26:56 +00:00
|
|
|
if err := syscall.Unmount(mountPoint, 0); err != nil {
|
2017-01-12 01:08:00 +00:00
|
|
|
t.Error("Could not umount", mountPoint, err)
|
|
|
|
}
|
|
|
|
}
|