Commit Graph

11 Commits

Author SHA1 Message Date
Kir Kolyshkin a4d8f720a2 Format sources with gofumpt
gofumpt is a superset of gofmt, enabling some more code formatting
rules.

This commit is brought to you by

	gofumpt -w .

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-05-26 16:17:31 -07:00
Nalin Dahyabhai 5fe4f30e30 pkg/mount.TestSubtreeUnbindable(): check for wrapped EINVAL
Instead of comparing an error value directly to unix.EINVAL, use
errors.Is() to handle cases where it's wrapped by the standard library,
and provide an Unwrap() method for errors that we wrap ourselves.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-02-23 14:39:56 -05:00
Daniel J Walsh f53a5bc105
Make linters happy
Check lots of potential error situations.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-03-11 14:47:31 -04:00
Kir Kolyshkin c0266c1333 pkg/mount tests: skip some tests if !root
Tests that require calls to mount(2)/umount(2) are failing
when run under non-root user. Let's check if we're root
first and skip if we're not.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-03-07 19:50:00 -08:00
Kir Kolyshkin fa56ab963c pkg/mount: rm redundant build tags
Files that end with _linux.go and *_linux_test.go are
already used when GOOS=linux only, and so linux build
tag is redundant.

Files were found by

  git ls-files | grep -E '_linux(_test|).go' | xargs grep -F '+build '

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-03-06 17:00:54 -08:00
Daniel J Walsh f39066fe1b Update packages to match latest code in moby/pkg
Had to vendor in a new version of golang.org/x/net to build
Also had to make some changes to drivers to handle
archive.Reader -> io.Reader
archive.Archive -> io.ReadCloser

Also update .gitingore to ignore emacs files, containers-storage.*
and generated man pages.

Also no longer test travis against golang 1.7, cri-o, moby have also
done this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-12 18:00:29 +00:00
Justas Brazauskas 927b334ebf Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
2015-12-13 18:04:12 +02:00
Yan Feng 2cca502c05 update testcase mount/sharedsubtree_linux_test.go
Signed-off-by: Yan Feng <yanfeng2@huawei.com>
2015-06-27 14:34:32 -04:00
Chen Hanxiao ef3192f161 fix comments typos
s/propogated/propagated

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-02-04 10:47:37 +08:00
Jessica Frazelle 6fd818f3ef Fix output format where no variable specified in mount pkg
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-12-03 19:02:51 -08:00
Vincent Batts 7a3a938712 pkg/mount: testing for linux sharedsubtree mounts
* shared
* shared/slave
* unbindable
* private

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-10-31 15:31:34 -04:00