mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-07 20:45:18 +00:00
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:
1
tests/golden/setup-error-teardown
Normal file
1
tests/golden/setup-error-teardown
Normal file
@@ -0,0 +1 @@
|
||||
== interrupt waiting mount with no options
|
||||
@@ -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
|
||||
|
||||
20
tests/tests/setup-error-teardown.sh
Normal file
20
tests/tests/setup-error-teardown.sh
Normal 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
|
||||
Reference in New Issue
Block a user