summaryrefslogtreecommitdiff
path: root/daemon/graphdriver/graphtest
Commit message (Collapse)AuthorAgeFilesLines
* daemon/graphdriver: fix empty-lines (revive)Sebastiaan van Stijn2022-09-282-4/+2
| | | | | | | | | | | | | | | | | daemon/graphdriver/aufs/aufs.go:239:80: empty-lines: extra empty line at the start of a block (revive) daemon/graphdriver/graphtest/graphbench_unix.go:249:27: empty-lines: extra empty line at the start of a block (revive) daemon/graphdriver/graphtest/testutil.go:271:30: empty-lines: extra empty line at the end of a block (revive) daemon/graphdriver/graphtest/graphbench_unix.go:179:32: empty-block: this block is empty, you can remove it (revive) daemon/graphdriver/zfs/zfs.go:375:48: empty-lines: extra empty line at the end of a block (revive) daemon/graphdriver/overlay/overlay.go:248:89: empty-lines: extra empty line at the start of a block (revive) daemon/graphdriver/devmapper/deviceset.go:636:21: empty-lines: extra empty line at the end of a block (revive) daemon/graphdriver/devmapper/deviceset.go:1150:70: empty-lines: extra empty line at the start of a block (revive) daemon/graphdriver/devmapper/deviceset.go:1613:30: empty-lines: extra empty line at the end of a block (revive) daemon/graphdriver/devmapper/deviceset.go:1645:65: empty-lines: extra empty line at the start of a block (revive) daemon/graphdriver/btrfs/btrfs.go:53:101: empty-lines: extra empty line at the start of a block (revive) daemon/graphdriver/devmapper/deviceset.go:1944:89: empty-lines: extra empty line at the start of a block (revive) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* pkg/containerfs: alias ContainerFS to stringCory Snider2022-09-234-32/+32
| | | | | | Drop the constructor and redundant string() type-casts. Signed-off-by: Cory Snider <csnider@mirantis.com>
* pkg/containerfs: simplify ContainerFS typeCory Snider2022-09-234-32/+32
| | | | | | Iterate towards dropping the type entirely. Signed-off-by: Cory Snider <csnider@mirantis.com>
* pkg/containerfs: drop Driver abstractionCory Snider2022-09-234-34/+34
| | | | | | | | | | The Driver abstraction was needed for Linux Containers on Windows, support for which has since been removed. There is no direct equivalent to Lchmod() in the standard library so continue to use the containerd/continuity version. Signed-off-by: Cory Snider <csnider@mirantis.com>
* pkg/containerfs: drop PathDriver abstractionCory Snider2022-09-233-34/+37
| | | | | | | With LCOW support removed, there is no need to support non-native file paths any longer. Signed-off-by: Cory Snider <csnider@mirantis.com>
* refactor: move from io/ioutil to io and os packageEng Zer Jun2021-08-272-7/+5
| | | | | | | | The io/ioutil package has been deprecated in Go 1.16. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* Update to Go 1.17.0, and gofmt with Go 1.17Sebastiaan van Stijn2021-08-243-0/+3
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Use crypto/randAdam Williams2021-07-011-1/+1
| | | | Signed-off-by: Adam Williams <awilliams@mirantis.com>
* Fix use of unsafe ptr #42444Adam Williams2021-07-011-14/+4
| | | | Signed-off-by: Adam Williams <awilliams@mirantis.com>
* graphdriver: temporarily ignore unsafeptr: possible misuse of ↵Sebastiaan van Stijn2021-06-101-2/+2
| | | | | | | | | | | | | | | | | reflect.SliceHeader Probably needs a similar change as c208f03fbddb4355729c3225bb2550c4d54a2c5e, but this code makes my head spin, so for now suppressing, and created a tracking issue: daemon/graphdriver/graphtest/graphtest_unix.go:305:12: unsafeptr: possible misuse of reflect.SliceHeader (govet) header := *(*reflect.SliceHeader)(unsafe.Pointer(&buf)) ^ daemon/graphdriver/graphtest/graphtest_unix.go:308:36: unsafeptr: possible misuse of reflect.SliceHeader (govet) data := *(*[]byte)(unsafe.Pointer(&header)) ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* quota: move quota package out of graphdriverTimo Rothenpieler2020-10-051-1/+1
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* bump gotest.tools v3.0.1 for compatibility with Go 1.14Sebastiaan van Stijn2020-02-113-5/+5
| | | | | | full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.1 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* goimports: fix importsSebastiaan van Stijn2019-09-181-1/+1
| | | | | | | Format the source according to latest goimports. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* DriverBenchDiffApplyN: ignore empty branch (staticcheck)Sebastiaan van Stijn2019-09-181-0/+4
| | | | | | | | | | | | | suppressing the "SA9003: empty branch (staticcheck)" instead of commenting-out or removing these lines because removing/commenting these lines causes a ripple effect of changes, and there's still a to-do below. ``` 13:06:14 daemon/graphdriver/graphtest/graphbench_unix.go:175:3: SA9003: empty branch (staticcheck) 13:06:14 if applyDiffSize != diffSize { ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Update tests to use gotest.tools 👼Vincent Demeester2018-06-133-5/+5
| | | | Signed-off-by: Vincent Demeester <vincent@sbr.pm>
* Various code-cleanupSebastiaan van Stijn2018-05-232-2/+2
| | | | | | remove unnescessary import aliases, brackets, and so on. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Post migration assertion fixesDaniel Nephin2018-03-161-1/+1
| | | | Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Automated migration usingDaniel Nephin2018-03-163-33/+33
| | | | | | gty-migrate-from-testify --ignore-build-tags Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Add canonical import commentDaniel Nephin2018-02-055-5/+5
| | | | Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Golint: remove redundant ifsSebastiaan van Stijn2018-01-151-5/+1
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Remove support for overlay/overlay2 without d_typeSebastiaan van Stijn2017-12-041-1/+1
| | | | | | | | | | | | | | | | | Support for running overlay/overlay2 on a backing filesystem without d_type support (most likely: xfs, as ext4 supports this by default), was deprecated for some time. Running without d_type support is problematic, and can lead to difficult to debug issues ("invalid argument" errors, or unable to remove files from the container's filesystem). This patch turns the warning that was previously printed into an "unsupported" error, so that the overlay/overlay2 drivers are not automatically selected when detecting supported storage drivers. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Add quota support to VFS graphdriverSargun Dhillon2017-11-061-6/+22
| | | | | | | | | | | This patch adds the capability for the VFS graphdriver to use XFS project quotas. It reuses the existing quota management code that was created by overlay2 on XFS. It doesn't rely on a filesystem whitelist, but instead the quota-capability detection code. Signed-off-by: Sargun Dhillon <sargun@sargun.me>
* Remove solaris build tag and `contrib/mkimage/solarisYong Tang2017-11-021-1/+1
| | | | Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* LCOW: Implemented support for docker cp + buildAkash Gupta2017-09-144-56/+54
| | | | | | | | | | This enables docker cp and ADD/COPY docker build support for LCOW. Originally, the graphdriver.Get() interface returned a local path to the container root filesystem. This does not work for LCOW, so the Get() method now returns an interface that LCOW implements to support copying to and from the container. Signed-off-by: Akash Gupta <akagup@microsoft.com>
* Add gosimple linterDaniel Nephin2017-09-121-4/+2
| | | | | | Update gometalinter Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Optimize some wrong usage and spellingwangguoliang2017-09-071-4/+4
| | | | Signed-off-by: wgliang <liangcszzu@163.com>
* [project] change syscall to /x/sys/unix|windowsChristopher Jones2017-07-112-5/+6
| | | | | | | | | | | | | | | | Changes most references of syscall to golang.org/x/sys/ Ones aren't changes include, Errno, Signal and SysProcAttr as they haven't been implemented in /x/sys/. Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com> [s390x] switch utsname from unsigned to signed per https://github.com/golang/sys/commit/33267e036fd93fcd26ea95b7bdaf2d8306cb743c char in s390x in the /x/sys/unix package is now signed, so change the buildtags Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
* Fix vfs unit test and port VFS to the new IDMappingsDaniel Nephin2017-06-072-133/+37
| | | | | | | | The test was failing because TarOptions was using a non-pointer for ChownOpts, which meant the check for nil was never true, and createTarFile was never using the hdr.UID/GID Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Moves graphdriver plugn docs out of experimentalBrian Goff2016-12-221-1/+1
| | | | | | | Also updates some of the structures being sent so plugins are getting all the new options. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Merge pull request #27915 from rhvgoyal/graph-create-optsSebastiaan van Stijn2016-11-104-30/+24
|\ | | | | Pass all graphdriver create() parameters in a struct
| * Pass all graphdriver create() parameters in a structVivek Goyal2016-11-094-30/+24
| | | | | | | | | | | | | | | | This allows for easy extension of adding more parameters to existing parameters list. Otherwise adding a single parameter changes code at so many places. Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
* | Add functional support for Docker sub commands on SolarisAmit Krishnan2016-11-071-1/+1
|/ | | | | | Signed-off-by: Amit Krishnan <krish.amit@gmail.com> Signed-off-by: Alexander Morozov <lk4d4@docker.com>
* Make graphdrivers work with pluginv2.Anusha Ragunathan2016-09-201-1/+1
| | | | | | | | | | | | | | | As part of making graphdrivers support pluginv2, a PluginGetter interface was necessary for cleaner separation and avoiding import cycles. This commit creates a PluginGetter interface and makes pluginStore implement it. Then the pluginStore object is created in the daemon (rather than by the plugin manager) and passed to plugin init as well as to the different subsystems (eg. graphdrivers, volumedrivers). A side effect of this change was that some code was moved out of experimental. This is good, since plugin support will be stable soon. Signed-off-by: Anusha Ragunathan <anusha@docker.com>
* Update diff apply test to check sub directoriesDerek McGowan2016-07-262-3/+27
| | | | Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
* Fix overlay2 ignoring whiteout filesDerek McGowan2016-06-232-0/+46
| | | | | | | | | | | Currently when overlay creates a whiteout file then the overlay2 layer is archived, the correct tar header will be created for the whiteout file, but the tar logic will then attempt to open the file causing a failure. When tar encounters such failures the file is skipped and excluded for the archive, causing the whiteout to be ignored. By skipping the copy of empty files, no open attempt will be made on whiteout files. Fixes #23863 Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
* Expand graphtest packageDerek McGowan2016-06-084-153/+842
| | | | Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
* Merge pull request #21946 from chosenken/add_disk_quota_to_zfsBrian Goff2016-06-071-0/+46
|\ | | | | Add support for setting storage size on ZFS containers
| * Add test to ZFS for disk quotaKen Herner2016-05-191-0/+46
| | | | | | | | Signed-off-by: Ken Herner <kherner@progress.com>
* | fix typosallencloud2016-06-021-2/+2
| | | | | | | | Signed-off-by: allencloud <allen.sun@daocloud.io>
* | graphtest: fix cleanup logicAntonio Murdaca2016-05-311-18/+22
|/ | | | | | | | | | | | | | | | | | | | | | | | | device Base should not exists on failure: --- FAIL: TestDevmapperCreateBase (0.06s) graphtest_unix.go:122: stat /tmp/docker-graphtest-079240530/devicemapper/mnt/Base/rootfs/a subdir: no such file or directory --- FAIL: TestDevmapperCreateSnap (0.00s) graphtest_unix.go:219: devmapper: device Base already exists. it should be: --- FAIL: TestDevmapperCreateBase (0.25s) graphtest_unix.go:122: stat /tmp/docker-graphtest-828994195/devicemapper/mnt/Base/rootfs/a subdir: no such file or directory --- FAIL: TestDevmapperCreateSnap (0.13s) graphtest_unix.go:122: stat /tmp/docker-graphtest-828994195/devicemapper/mnt/Snap/rootfs/a subdir: no such file or directory Signed-off-by: Antonio Murdaca <runcom@redhat.com>
* Merge pull request #20525 from Microsoft/sjw/update-graphdriver-createJohn Howard2016-04-081-1/+1
|\ | | | | Adding readOnly parameter to graphdriver Create method
| * Adding readOnly parameter to graphdriver Create methodStefan J. Wernli2016-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the layer store was introduced, the level above the graphdriver now differentiates between read/write and read-only layers. This distinction is useful for graphdrivers that need to take special steps when creating a layer based on whether it is read-only or not. Adding this parameter allows the graphdrivers to differentiate, which in the case of the Windows graphdriver, removes our dependence on parsing the id of the parent for "-init" in order to infer this information. This will also set the stage for unblocking some of the layer store unit tests in the next preview build of Windows. Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
* | Fix overlay test running on overlayDerek McGowan2016-04-061-1/+1
|/ | | | | | | | | | Overlay tests were failing when /var/tmp was an overlay mount with a misleading message. Now overlay tests will be skipped when attempting to be run on overlay. Tests will now use the TMPDIR environment variable instead of only /var/tmp Fixes #21686 Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
* CLI flag for docker create(run) to change block device size.Shishir Mahajan2016-03-281-3/+3
| | | | Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
* Relabel BTRFS Content on container CreationDan Walsh2015-11-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change will allow us to run SELinux in a container with BTRFS back end. We continue to work on fixing the kernel/BTRFS but this change will allow SELinux Security separation on BTRFS. It basically relabels the content on container creation. Just relabling -init directory in BTRFS use case. Everything looks like it works. I don't believe tar/achive stores the SELinux labels, so we are good as far as docker commit. Tested Speed on startup with BTRFS on top of loopback directory. BTRFS not on loopback should get even better perfomance on startup time. The more inodes inside of the container image will increase the relabel time. This patch will give people who care more about security the option of runnin BTRFS with SELinux. Those who don't want to take the slow down can disable SELinux either in individual containers or for all containers by continuing to disable SELinux in the daemon. Without relabel: > time docker run --security-opt label:disable fedora echo test test real 0m0.918s user 0m0.009s sys 0m0.026s With Relabel test real 0m1.942s user 0m0.007s sys 0m0.030s Signed-off-by: Dan Walsh <dwalsh@redhat.com> Signed-off-by: Dan Walsh <dwalsh@redhat.com>
* Windows: Fix daemon\graphdriver\graphtestJohn Howard2015-10-312-0/+3
| | | | Signed-off-by: John Howard <jhoward@microsoft.com>
* Add user namespace (mapping) support to the Docker enginePhil Estes2015-10-091-1/+1
| | | | | | | | | | | | Adds support for the daemon to handle user namespace maps as a per-daemon setting. Support for handling uid/gid mapping is added to the builder, archive/unarchive packages and functions, all graphdrivers (except Windows), and the test suite is updated to handle user namespace daemon rootgraph changes. Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
* Merge pull request #15422 from kolyshkin/graphtest-fixAlexander Morozov2015-08-101-2/+21
|\ | | | | graphtest: filter out lost+found dir entry
| * graphtest: filter out lost+found dir entryKir Kolyshkin2015-08-091-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ploop graph driver provides its own ext4 filesystem to every container. It so happens that ext4 root comes with lost+found directory, causing failures from DriverTestCreateEmpty() and DriverTestCreateBase() tests on ploop. While I am not yet ready to submit ploop graph driver for review, this change looks simple enough to push. Note that filtering is done without any additional allocations, as described in https://github.com/golang/go/wiki/SliceTricks. [v2: added a comment about lost+found] Signed-off-by: Kir Kolyshkin <kir@openvz.org>
* | typofix - https://github.com/vlajos/misspell_fixerVeres Lajos2015-08-071-1/+1
|/ | | | Signed-off-by: Veres Lajos <vlajos@gmail.com>