overlay: test mount error cases with exclusive directories
authorAmir Goldstein <amir73il@gmail.com>
Wed, 12 Jul 2017 12:07:59 +0000 (15:07 +0300)
committerEryu Guan <eguan@redhat.com>
Fri, 14 Jul 2017 07:41:46 +0000 (15:41 +0800)
commit72c2cced9d03c60bc1f02787b3926bb5d75299b5
tree4981d7f635429241a7ee85f80fdf4219009ead1d
parentabde53bc1522d0df1ec509cc1f4964a75c078217
overlay: test mount error cases with exclusive directories

Overlayfs is often used to mount several mounts that share a single
lower dir, but every overlayfs mount should have its own private
upperdir and private workdir.

Overlayfs mount on kernel <= v4.12 does not check if upper/work dirs
are currently in-use by another overlayfs mount on the system and bad
things can happen with such configuration.

Expect EBUSY when trying to mount overlay when:
- Upper dir is in-use by another overlay mount
- Work dir is in-use by another overlay mount

This test does not depend on the overlay index feature.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/overlay/036 [new file with mode: 0755]
tests/overlay/036.out [new file with mode: 0644]
tests/overlay/group