]> git.ipfire.org Git - thirdparty/grub.git/commit
tests: Ensure that mountpoints are unmounted before exiting
authorGlenn Washburn <development@efficientek.com>
Sun, 6 Feb 2022 22:00:11 +0000 (16:00 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 26 Apr 2022 12:45:10 +0000 (14:45 +0200)
commitf035853761476438c712c6c99decf79fea66f956
tree705e328c0d9f18475d93b8b161618f89c3acf810
parenta4666d31babc3fd06e52f7bb9b4c871e685da9b9
tests: Ensure that mountpoints are unmounted before exiting

When all tests complete successfully, filesystems mounted by grub-fs-tester
will be unmounted before exiting. However, on certain test failures the
tester will exit with a failure code and not unmount previously mounted
filesystems. Now keep track of mounts and umounts and run an exit handler
on exit or process interruption that will umount all mounts that haven't
already been unmounted.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
tests/util/grub-fs-tester.in