1AUTHOR = "Akshay Lal <akshaylal@google.com>"
2NAME = "wb_kupdate"
3TEST_CATEGORY = "Functional"
4TEST_CLASS = "General"
5TEST_TYPE = "client"
6TIME = 'MEDIUM'
7DOC='''
8This tests checks the wb_kupdate code path by writting data to a sparse file
9and waiting at max of `max_flush_time` for the file to be flushed from the
10cache to disk.
11'''
12
13import os
14# Required Parameters:
15# --------------------
16mount_point='/export/wb_kupdate' # Absolute path.
17file_count=5                     # The number of files to write.
18write_size=1                     # In MB.
19
20# Optional Parameters:
21# --------------------
22max_flush_time=1                # In minutes.
23file_system='ext4'              # mkfs.<file_system> must already exist on
24                                # the machine. To avoid device initialization
25                                # set to None.
26remove_previous=False           # Boolean.
27sparse_file=os.path.join(       # Absolute path to the sparse file.
28        job.tmpdir,
29        'sparse_file')
30old_cleanup=False               # Remove a previously created mount_point if it
31                                # exits and not mounted.
32
33# Beginning execution of the xfstests:
34# ------------------------------------
35job.run_test('wb_kupdate',
36             mount_point=mount_point,
37             file_count=int(file_count),
38             write_size=int(write_size),
39             max_flush_time=int(max_flush_time),
40             file_system=file_system,
41             remove_previous=remove_previous,
42             sparse_file=sparse_file,
43             old_cleanup=old_cleanup,
44             tag='wb_kupdate_execution')
45