From e6cc1db8a0a760e38cb2bf41d67b970a00743ecb Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 3 Jun 2016 15:04:04 +0200 Subject: [PATCH] tests: add a test for mount --shared and --live Signed-off-by: Giuseppe Scrivano Closes: #405 Approved by: rhatdan --- tests/integration/test_mount.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/integration/test_mount.sh b/tests/integration/test_mount.sh index 6924695..012baf1 100755 --- a/tests/integration/test_mount.sh +++ b/tests/integration/test_mount.sh @@ -49,6 +49,19 @@ ${ATOMIC} mount ${INAME} --live ${MNT_WORK}/image if [ "$?" -eq "0" ]; then exit 1 fi + +cleanup_mount () { + ${ATOMIC} unmount ${MNT_WORK}/container + cleanup_container +} +trap cleanup_container_mount EXIT + +${ATOMIC} unmount ${MNT_WORK}/container +${ATOMIC} mount ${id} --live ${MNT_WORK}/container + +${ATOMIC} unmount ${MNT_WORK}/container +${ATOMIC} mount ${id} --shared ${MNT_WORK}/container + set -e cleanup_mount () {