Lines Matching +full:file +full:- +full:system
1 # SPDX-License-Identifier: GPL-2.0+
21 """Enable --fs-type option.
26 parser: Pytest command-line parser.
31 parser.addoption('--fs-type', action='append', default=None,
35 """Restrict a file system(s) to be tested.
37 A file system explicitly named with --fs-type option is selected
92 """Convert a file system type to an U-boot specific string
94 A generated string can be used as part of file system related commands
95 or a config name in u-boot. Currently fat16 and fat32 are handled
99 fs_type: File system type.
102 A corresponding string for file system type.
110 """Check whether a file system is enabled in u-boot configuration.
113 the whole test cases will be skipped if a given file system is not
117 fs_type: File system type.
129 """Create a file system volume.
132 fs_type: File system type.
133 size: Size of file system in MiB.
134 id: Prefix string of volume's file name.
143 mkfs_opt = '-F 16'
145 mkfs_opt = '-F 32'
154 count = (size + 1048576 - 1) / 1048576
157 check_call('rm -f %s' % fs_img, shell=True)
164 call('rm -f %s' % fs_img, shell=True)
189 fs_type: File system type.
190 device: Volume's file name.
202 check_call('guestmount -a %s -m /dev/sda %s'
209 check_call('sudo mount -o %s %s %s'
212 # may not be effective for some file systems
234 # derived from test/fs/fs-test.sh
236 # NOTE: yield_fixture was deprecated since pytest-3.0
239 """Set up a file system to be used in basic fs test.
243 u_boot_config: U-boot configuration.
246 A fixture for basic fs test, i.e. a triplet of file system type,
247 volume file name and a list of MD5 hashes.
266 check_call('mkdir -p %s' % mount_dir, shell=True)
272 # Create big file in this image.
274 # and the last 1 MB of the huge 2.5GB file.
283 # Create a small file in this image.
287 # Delete the small file copies which possibly are written as part of a
289 # check_call('rm -f "%s.w"' % MB1, shell=True)
290 # check_call('rm -f "%s.w2"' % MB1, shell=True)
292 # Generate the md5sums of reads that we will test against small file
298 # Generate the md5sums of reads that we will test against big file
299 # One from beginning of file.
305 # One from end of file.
339 call('rm -f %s' % fs_img, shell=True)
344 # NOTE: yield_fixture was deprecated since pytest-3.0
347 """Set up a file system to be used in extended fs test.
351 u_boot_config: U-boot configuration.
354 A fixture for extended fs test, i.e. a triplet of file system type,
355 volume file name and a list of MD5 hashes.
374 check_call('mkdir -p %s' % mount_dir, shell=True)
380 # Create a small file and calculate md5
426 call('rm -f %s' % fs_img, shell=True)
431 # NOTE: yield_fixture was deprecated since pytest-3.0
434 """Set up a file system to be used in mkdir test.
438 u_boot_config: U-boot configuration.
441 A fixture for mkdir test, i.e. a duplet of file system type and
442 volume file name.
459 call('rm -f %s' % fs_img, shell=True)
464 # NOTE: yield_fixture was deprecated since pytest-3.0
467 """Set up a file system to be used in unlink test.
471 u_boot_config: U-boot configuration.
474 A fixture for unlink test, i.e. a duplet of file system type and
475 volume file name.
491 check_call('mkdir -p %s' % mount_dir, shell=True)
525 call('rm -f %s' % fs_img, shell=True)