check_call('mkdir -p %s' % mount_dir, shell=True)
except CalledProcessError as err:
pytest.skip('Preparing mount folder failed for filesystem: ' + fs_type + '. {}'.format(err))
- return
- finally:
call('rm -f %s' % fs_img, shell=True)
+ return
try:
# Mount the image so we can populate it.
mount_fs(fs_type, fs_img, mount_dir)
+ except CalledProcessError as err:
+ pytest.skip('Mounting to folder failed for filesystem: ' + fs_type + '. {}'.format(err))
+ call('rmdir %s' % mount_dir, shell=True)
+ call('rm -f %s' % fs_img, shell=True)
+ return
+ try:
# Create a subdirectory.
check_call('mkdir %s/SUBDIR' % mount_dir, shell=True)
except CalledProcessError as err:
pytest.skip('Setup failed for filesystem: ' + fs_type + '. {}'.format(err))
+ umount_fs(mount_dir)
return
else:
+ umount_fs(mount_dir)
yield [fs_ubtype, fs_img, md5val]
finally:
- umount_fs(mount_dir)
call('rmdir %s' % mount_dir, shell=True)
call('rm -f %s' % fs_img, shell=True)
check_call('mkdir -p %s' % mount_dir, shell=True)
except CalledProcessError as err:
pytest.skip('Preparing mount folder failed for filesystem: ' + fs_type + '. {}'.format(err))
- return
- finally:
call('rm -f %s' % fs_img, shell=True)
+ return
try:
# Mount the image so we can populate it.
mount_fs(fs_type, fs_img, mount_dir)
+ except CalledProcessError as err:
+ pytest.skip('Mounting to folder failed for filesystem: ' + fs_type + '. {}'.format(err))
+ call('rmdir %s' % mount_dir, shell=True)
+ call('rm -f %s' % fs_img, shell=True)
+ return
+ try:
# Create a test directory
check_call('mkdir %s/dir1' % mount_dir, shell=True)
check_call('rm %s' % tmp_file, shell=True)
except CalledProcessError:
pytest.skip('Setup failed for filesystem: ' + fs_type)
+ umount_fs(mount_dir)
return
else:
+ umount_fs(mount_dir)
yield [fs_ubtype, fs_img, md5val]
finally:
- umount_fs(mount_dir)
call('rmdir %s' % mount_dir, shell=True)
call('rm -f %s' % fs_img, shell=True)
check_call('mkdir -p %s' % mount_dir, shell=True)
except CalledProcessError as err:
pytest.skip('Preparing mount folder failed for filesystem: ' + fs_type + '. {}'.format(err))
- return
- finally:
call('rm -f %s' % fs_img, shell=True)
+ return
try:
# Mount the image so we can populate it.
mount_fs(fs_type, fs_img, mount_dir)
+ except CalledProcessError as err:
+ pytest.skip('Mounting to folder failed for filesystem: ' + fs_type + '. {}'.format(err))
+ call('rmdir %s' % mount_dir, shell=True)
+ call('rm -f %s' % fs_img, shell=True)
+ return
+ try:
# Test Case 1 & 3
check_call('mkdir %s/dir1' % mount_dir, shell=True)
check_call('dd if=/dev/urandom of=%s/dir1/file1 bs=1K count=1'
except CalledProcessError:
pytest.skip('Setup failed for filesystem: ' + fs_type)
+ umount_fs(mount_dir)
return
else:
+ umount_fs(mount_dir)
yield [fs_ubtype, fs_img]
finally:
- umount_fs(mount_dir)
call('rmdir %s' % mount_dir, shell=True)
call('rm -f %s' % fs_img, shell=True)
check_call('mkdir -p %s' % mount_dir, shell=True)
except CalledProcessError as err:
pytest.skip('Preparing mount folder failed for filesystem: ' + fs_type + '. {}'.format(err))
- return
- finally:
call('rm -f %s' % fs_img, shell=True)
+ return
try:
# Mount the image so we can populate it.
mount_fs(fs_type, fs_img, mount_dir)
+ except CalledProcessError as err:
+ pytest.skip('Mounting to folder failed for filesystem: ' + fs_type + '. {}'.format(err))
+ call('rmdir %s' % mount_dir, shell=True)
+ call('rm -f %s' % fs_img, shell=True)
+ return
+ try:
# Create a subdirectory.
check_call('mkdir %s/SUBDIR' % mount_dir, shell=True)
except CalledProcessError:
pytest.skip('Setup failed for filesystem: ' + fs_type)
+ umount_fs(mount_dir)
return
else:
+ umount_fs(mount_dir)
yield [fs_ubtype, fs_img, md5val]
finally:
- umount_fs(mount_dir)
call('rmdir %s' % mount_dir, shell=True)
call('rm -f %s' % fs_img, shell=True)