1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #37041 from thaJeztah/remove_unused_function_in_test

overlay2: remove unused cdMountFrom() helper function
This commit is contained in:
Brian Goff 2018-05-11 13:56:56 -04:00 committed by GitHub
commit d0a516e256
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,6 @@ import (
"github.com/docker/docker/daemon/graphdriver/graphtest" "github.com/docker/docker/daemon/graphdriver/graphtest"
"github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/reexec" "github.com/docker/docker/pkg/reexec"
"golang.org/x/sys/unix"
) )
func init() { func init() {
@ -23,17 +22,6 @@ func init() {
reexec.Init() reexec.Init()
} }
func cdMountFrom(dir, device, target, mType, label string) error {
wd, err := os.Getwd()
if err != nil {
return err
}
os.Chdir(dir)
defer os.Chdir(wd)
return unix.Mount(device, target, mType, 0, label)
}
func skipIfNaive(t *testing.T) { func skipIfNaive(t *testing.T) {
td, err := ioutil.TempDir("", "naive-check-") td, err := ioutil.TempDir("", "naive-check-")
if err != nil { if err != nil {