tests: add outside bind mounts to 75_hooks

it may happen, that someone bind mounts manually or via an immutable setup the tomb mountdir somewhere else.
Tomb should be able to discover such mounts and close them if the tomb itself is closed.
This commit is contained in:
Narrat 2024-08-07 21:56:56 +02:00 committed by Jaromil
parent 41b899e4e1
commit 73950fe3d8

View File

@ -1,6 +1,6 @@
#!/usr/bin/env zsh
export test_description="Testing tomb bind hooks"
export test_description="Testing tomb bind hooks & mounts"
TEMPHOME=$HOME
@ -27,4 +27,14 @@ test_expect_success 'Testing bind hooks' '
# RND2=$(cat "$TEMPHOME/$bindtest") &&
# [[ "$RND" = "$RND2" ]] &&
test_expect_success 'Testing outside bind mounts' '
tt_open --tomb-pwd $DUMMYPASS &&
tt_set_ownership "$MEDIA/$testname" &&
sudo mkdir "$MEDIA/$testname-bind" &&
sudo mount --bind "$MEDIA/$testname" "$MEDIA/$testname-bind" &&
tt list $testname &&
tt_close &&
sudo rmdir "$MEDIA/$testname-bind"
'
test_done