Skip to content

Commit 5a0ff41

Browse files
committed
Update continuity vendor
Pulls in copy and fstest changes Signed-off-by: Derek McGowan <[email protected]>
1 parent 81386df commit 5a0ff41

15 files changed

Lines changed: 225 additions & 75 deletions

File tree

mount/lookup_linux_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,25 @@ func testLookup(t *testing.T, fsType string) {
5050
}
5151
defer os.RemoveAll(mnt)
5252

53-
deviceName, cleanupDevice, err := loopback.New(100 << 20) // 100 MB
53+
loop, err := loopback.New(100 << 20) // 100 MB
5454
if err != nil {
5555
t.Fatal(err)
5656
}
57-
if out, err := exec.Command("mkfs", "-t", fsType, deviceName).CombinedOutput(); err != nil {
57+
if out, err := exec.Command("mkfs", "-t", fsType, loop.Device).CombinedOutput(); err != nil {
5858
// not fatal
59-
cleanupDevice()
60-
t.Skipf("could not mkfs (%s) %s: %v (out: %q)", fsType, deviceName, err, string(out))
59+
loop.Close()
60+
t.Skipf("could not mkfs (%s) %s: %v (out: %q)", fsType, loop.Device, err, string(out))
6161
}
62-
if out, err := exec.Command("mount", deviceName, mnt).CombinedOutput(); err != nil {
62+
if out, err := exec.Command("mount", loop.Device, mnt).CombinedOutput(); err != nil {
6363
// not fatal
64-
cleanupDevice()
65-
t.Skipf("could not mount %s: %v (out: %q)", deviceName, err, string(out))
64+
loop.Close()
65+
t.Skipf("could not mount %s: %v (out: %q)", loop.Device, err, string(out))
6666
}
6767
defer func() {
6868
testutil.Unmount(t, mnt)
69-
cleanupDevice()
69+
loop.Close()
7070
}()
71-
assert.Check(t, strings.HasPrefix(deviceName, "/dev/loop"))
71+
assert.Check(t, strings.HasPrefix(loop.Device, "/dev/loop"))
7272
checkLookup(t, fsType, mnt, mnt)
7373

7474
newMnt, err := ioutil.TempDir("", "containerd-mountinfo-test-newMnt")

snapshots/btrfs/btrfs_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,24 @@ func boltSnapshotter(t *testing.T) func(context.Context, string) (snapshots.Snap
5252
if os.Getpagesize() > 4096 {
5353
loopbackSize = int64(650 << 20) // 650 MB
5454
}
55-
deviceName, cleanupDevice, err := loopback.New(loopbackSize)
55+
loop, err := loopback.New(loopbackSize)
5656

5757
if err != nil {
5858
return nil, nil, err
5959
}
6060

61-
if out, err := exec.Command(mkbtrfs, deviceName).CombinedOutput(); err != nil {
62-
cleanupDevice()
61+
if out, err := exec.Command(mkbtrfs, loop.Device).CombinedOutput(); err != nil {
62+
loop.Close()
6363
return nil, nil, errors.Wrapf(err, "failed to make btrfs filesystem (out: %q)", out)
6464
}
65-
if out, err := exec.Command("mount", deviceName, root).CombinedOutput(); err != nil {
66-
cleanupDevice()
67-
return nil, nil, errors.Wrapf(err, "failed to mount device %s (out: %q)", deviceName, out)
65+
if out, err := exec.Command("mount", loop.Device, root).CombinedOutput(); err != nil {
66+
loop.Close()
67+
return nil, nil, errors.Wrapf(err, "failed to mount device %s (out: %q)", loop.Device, out)
6868
}
6969

7070
snapshotter, err := NewSnapshotter(root)
7171
if err != nil {
72-
cleanupDevice()
72+
loop.Close()
7373
return nil, nil, errors.Wrap(err, "failed to create new snapshotter")
7474
}
7575

@@ -78,7 +78,7 @@ func boltSnapshotter(t *testing.T) func(context.Context, string) (snapshots.Snap
7878
return err
7979
}
8080
err := mount.UnmountAll(root, unix.MNT_DETACH)
81-
if cerr := cleanupDevice(); cerr != nil {
81+
if cerr := loop.Close(); cerr != nil {
8282
err = errors.Wrap(cerr, "device cleanup failed")
8383
}
8484
return err

snapshots/overlay/check_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,23 @@ func testOverlaySupported(t testing.TB, expected bool, mkfs ...string) {
3636
}
3737
defer os.RemoveAll(mnt)
3838

39-
deviceName, cleanupDevice, err := loopback.New(100 << 20) // 100 MB
39+
loop, err := loopback.New(100 << 20) // 100 MB
4040
if err != nil {
4141
t.Fatal(err)
4242
}
43-
if out, err := exec.Command(mkfs[0], append(mkfs[1:], deviceName)...).CombinedOutput(); err != nil {
43+
if out, err := exec.Command(mkfs[0], append(mkfs[1:], loop.Device)...).CombinedOutput(); err != nil {
4444
// not fatal
45-
cleanupDevice()
46-
t.Skipf("could not mkfs (%v) %s: %v (out: %q)", mkfs, deviceName, err, string(out))
45+
loop.Close()
46+
t.Skipf("could not mkfs (%v) %s: %v (out: %q)", mkfs, loop.Device, err, string(out))
4747
}
48-
if out, err := exec.Command("mount", deviceName, mnt).CombinedOutput(); err != nil {
48+
if out, err := exec.Command("mount", loop.Device, mnt).CombinedOutput(); err != nil {
4949
// not fatal
50-
cleanupDevice()
51-
t.Skipf("could not mount %s: %v (out: %q)", deviceName, err, string(out))
50+
loop.Close()
51+
t.Skipf("could not mount %s: %v (out: %q)", loop.Device, err, string(out))
5252
}
5353
defer func() {
5454
testutil.Unmount(t, mnt)
55-
cleanupDevice()
55+
loop.Close()
5656
}()
5757
workload := func() {
5858
err = Supported(mnt)

vendor.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ github.com/containerd/cgroups c4b9ac5c7601384c965b9646fc515884e091ebb9
44
github.com/containerd/typeurl a93fcdb778cd272c6e9b3028b2f42d813e785d40
55
github.com/containerd/fifo 3d5202aec260678c48179c56f40e6f38a095738c
66
github.com/containerd/btrfs af5082808c833de0e79c1e72eea9fea239364877
7-
github.com/containerd/continuity bd77b46c8352f74eb12c85bdc01f4b90f69d66b4
7+
github.com/containerd/continuity f2a389ac0a02ce21c09edd7344677a601970f41c
88
github.com/coreos/go-systemd 48702e0da86bd25e76cfef347e2adeb434a0d0a6
99
github.com/docker/go-metrics 4ea375f7759c82740c893fc030bc37088d2ec098
1010
github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9

vendor/github.com/containerd/continuity/LICENSE

Lines changed: 4 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/continuity/README.md

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/continuity/fs/copy.go

Lines changed: 40 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/continuity/fs/copy_linux.go

Lines changed: 32 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/continuity/fs/copy_unix.go

Lines changed: 20 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/continuity/fs/copy_windows.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)