Revert "tests: do not use lazy unmount"

Revert to use umount -l in storage tests cleanup. With fixed permissions
in 4234fe51 "tests: fix cleanup after reflink tests", it shouldn't cause
issues anymore, but apparently on some systems test cleanup fails
otherwise.

Reported by @rustybird
This reverts commit b6f77ebfa1.
This commit is contained in:
Marek Marczykowski-Górecki 2019-06-25 05:51:33 +02:00
parent 66e44e67de
commit 883d324b6c
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -135,11 +135,7 @@ def rmtree_fs(directory):
cmd('sudo', 'chattr', '-i', directory)
cmd('sudo', 'chmod', '777', directory)
if os.path.ismount(directory):
try:
cmd('sudo', 'umount', directory)
except:
cmd('sudo', 'fuser', '-vm', directory)
raise
cmd('sudo', 'umount', '-l', directory)
# loop device and backing file are garbage collected automatically
shutil.rmtree(directory)