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