overlay: correct scratch dirs check
authorzhangyi (F) <yi.zhang@huawei.com>
Thu, 1 Mar 2018 12:13:47 +0000 (20:13 +0800)
committerEryu Guan <guaneryu@gmail.com>
Thu, 1 Mar 2018 15:02:48 +0000 (23:02 +0800)
commit697e465ca3351f983ff1ba256093791cadd00949
treee1bdac5462de8ced34bcccce69536e8634d6246b
parent3ba014aaba1c769433b961c74a78be8ffbd492ed
overlay: correct scratch dirs check

Tests that use _overlay_scratch_mount_dirs instead of _scratch_mount
should use _require_scratch_nocheck instead of _require_scratch
because these tests are either mounting with multiple lower dirs or
mounting with non-default lower/upper/work dir, so
_check_overlay_scratch_fs won't handle these cases correctly. So we
introduce _overlay_check_scratch_dirs helper and should call this
helper with the correct dir arguments for these non-default cases.

This patch modify these tests to optionally call
_overlay_check_scratch_dirs at the end of the test or after
_scratch_umount to mount base filesystem only and run the checker.

Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
14 files changed:
common/overlay
tests/overlay/005
tests/overlay/010
tests/overlay/014
tests/overlay/035
tests/overlay/036
tests/overlay/037
tests/overlay/038
tests/overlay/041
tests/overlay/043
tests/overlay/044
tests/overlay/051
tests/overlay/053
tests/overlay/055