Updated the wb_kupdate test to only perform disk initializations when an fs_type has been provided. Updated the nightly kernel_qual_fs to run the wb_kupdate test outside the default parallel and partitions framework since it doesn't use either.
Signed-off-by: Akshay Lal <[email protected]> --- autotest/client/tests/wb_kupdate/control 2010-08-18 19:28:47.000000000 -0700 +++ autotest/client/tests/wb_kupdate/control 2010-09-23 14:29:16.000000000 -0700 @@ -13,16 +13,17 @@ import os # Required Parameters: # -------------------- -duration=2 # In minutes. -mount_point='/export/wb_update' # Absolute path. +duration=2 # In minutes. +mount_point='/export/wb_kupdate' # Absolute path. file_count=1 -write_size=1 # In MB. +write_size=1 # In MB. # Optional Parameters: # -------------------- max_flush_time=1 # In minutes. file_system='ext4' # mkfs.<file_system> must already exist on - # the machine + # the machine. To avoid device initialization + # set to None. remove_previous=False # Boolean. sparse_file=os.path.join( # Absolute path to the sparse file. os.getcwd(), --- autotest/client/tests/wb_kupdate/wb_kupdate.py 2010-08-18 19:28:47.000000000 -0700 +++ autotest/client/tests/wb_kupdate/wb_kupdate.py 2010-09-23 14:29:16.000000000 -0700 @@ -58,6 +58,9 @@ if not os.path.exists(mount_point): logging.info('%s does not exist. Creating directory.', mount_point) self._execute('mkdir %s' % mount_point) + else: + raise error.TestError('Mount point: %s already exists.' % + mount_point) # Check write_size > 0. if not (write_size > 0): @@ -81,7 +84,7 @@ self._execute('rm -rf %s' % self.sparse_file) # Recreate sparse_file. - self._execute('dd if=/dev/zero of=%s bs=1M seek=10000 count=1' % + self._execute('dd if=/dev/zero of=%s bs=1M seek=1000 count=1' % self.sparse_file) # Format sparse_file. @@ -202,7 +205,7 @@ def run_once(self, duration, mount_point, file_count, write_size, - max_flush_time=1, file_system='ext4', remove_previous=False, + max_flush_time=1, file_system=None, remove_previous=False, sparse_file=os.path.join(os.getcwd(),'sparse_file')): """Control execution of the test. @@ -213,7 +216,8 @@ @param write_size: the size of each file in MB. @param max_flush_time: the maximum time to wait for the writeback to flush dirty data to disk. Default = 1 minute. - @param file_system: the file system to be used. Default = ext4. + @param file_system: the new file system to be mounted, if any. + Default = None. @param remove_previous: boolean that allows the removal of previous files before creating a new one. Default = False. @param sparse_file: the absolute path to the sparse file. @@ -232,9 +236,13 @@ while self._needs_more_time(test_start_time, int(duration)): # Check the current file_count. if counter % file_count == 0 or counter == 1: - # Setting up device. - logging.info('Re-initializing device.') - self._reset_device(self.mount_point, file_system) + if file_system: + # Setting up device. + logging.info('Re-initializing device.') + self._reset_device(self.mount_point, file_system) + else: + # Skipping reimage. + logging.info('Skipping device initialization.') logging.info('Iteration %s.', counter) @@ -285,4 +293,8 @@ logging.debug('Cleanup - removing sparse file.') self._execute('rm -rf %s' % self.sparse_file) + # Removing the mount_point. + logging.debug('Cleanup - removing the mount_point.') + self._execute('rmdir %s' % self.mount_point) + logging.info('Test operations completed.') _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
