scoutfs-tests: add setup-error-teardown

Add a test which makes sure that errors during setup can be properly
torn down.  This found an assertion that was being triggered during lock
shudown.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2019-09-09 16:07:29 -07:00
committed by Zach Brown
parent 4326a95b9b
commit 0fee134133
3 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1 @@
== interrupt waiting mount with no options

View File

@@ -19,6 +19,7 @@ dirent-consistency.sh
lock-ex-race-processes.sh
lock-conflicting-batch-commit.sh
cross-mount-data-free.sh
setup-error-teardown.sh
mount-unmount-race.sh
createmany-parallel-mounts.sh
archive-light-cycle.sh

View File

@@ -0,0 +1,20 @@
#
# test setup error teardown
#
# Make sure that we're properly cleaning up partially built up state by
# hitting errors while setting up subsystems during mount.
#
t_require_commands sleep killall
echo "== interrupt waiting mount with no options"
t_umount_all
mount -t scoutfs $T_B0 $T_M0 &
pid="$!"
sleep .1
kill $pid
# silence terminated message
wait "$pid" 2> /dev/null
t_mount_all
t_pass