Tests: print unit.log on unsuccessful unmount

This commit is contained in:
Andrei Zeliankou 2024-05-27 18:28:37 +01:00 committed by andrey-zelenkov
parent e77a0c166f
commit c9dced37ba

View file

@ -429,6 +429,7 @@ def _clear_temp_dir():
temporary_dir = unit_instance['temp_dir'] temporary_dir = unit_instance['temp_dir']
if is_findmnt and not waitforunmount(temporary_dir, timeout=600): if is_findmnt and not waitforunmount(temporary_dir, timeout=600):
Log.print_log()
sys.exit(f'Could not unmount filesystems in tmpdir ({temporary_dir}).') sys.exit(f'Could not unmount filesystems in tmpdir ({temporary_dir}).')
for item in Path(temporary_dir).iterdir(): for item in Path(temporary_dir).iterdir():