overlay: create helper _overlay_scratch_mount_dirs()

A helper to mount with same options/mnt/dev of scratch mount, but
optionally with different lower/upper/work dirs.
use instead of _overlay_mount_dirs() in all tests where applicable.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Amir Goldstein
2017-09-27 10:04:11 +03:00
committed by Eryu Guan
parent 510ea29201
commit 371f7f52f2
8 changed files with 31 additions and 26 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ $XFS_IO_PROG -f -c "truncate 48m" ${lowerd}/test_file \
>>$seqres.full 2>&1
# mount new overlayfs
_overlay_mount_dirs $lowerd $upperd $workd $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT
_overlay_scratch_mount_dirs $lowerd $upperd $workd
# the open call triggers copy-up and it will fail ENOSPC
$XFS_IO_PROG -f -c "o" ${SCRATCH_MNT}/test_file \