Revision f147b728
Added by David Sorber over 11 years ago
| software/fiemap_testing/extent_test.py | ||
|---|---|---|
|
import os
|
||
|
import subprocess
|
||
|
import sys
|
||
|
import time
|
||
|
|
||
|
devices = {'/dev/sdb1': {'mount': '/mnt/smc0', 'size': 64},
|
||
|
'/dev/sdc1': {'mount': '/mnt/smc1', 'size': 256},
|
||
| ... | ... | |
|
time = '{:02d}:{:02d}:{:02d}'.format(hours, minutes, seconds)
|
||
|
self.out('Filler took: {:s}'.format(time))
|
||
|
|
||
|
# Wait for 30 seconds for any delayed actions to resolve
|
||
|
time.sleep(30)
|
||
|
|
||
|
# Run analyze.py script
|
||
|
output_file = os.path.join(self.output_path,
|
||
|
'extent_analysis_{:d}MB.log'.format(self.chunk_size))
|
||
| ... | ... | |
|
|
||
|
# Run raw_data.py script
|
||
|
output_file = os.path.join(self.output_path,
|
||
|
'raw_extents_{:d}MB.log'.format(self.chunk_size))
|
||
|
'raw_extents_{:d}MB.txt'.format(self.chunk_size))
|
||
|
cmd_args = (self.mount_path, output_file)
|
||
|
cmd = 'python raw_data.py {:s} > {:s}'.format(*cmd_args)
|
||
|
rc = self.cmd(cmd)
|
||
| ... | ... | |
|
def usage():
|
||
|
""" TODO: write usage blurb to be printed here
|
||
|
"""
|
||
|
pass
|
||
|
print 'USAGE: python extent_test.py <FS name> <path to output location>'
|
||
|
|
||
|
def main():
|
||
|
"""
|
||
| ... | ... | |
|
"""
|
||
|
|
||
|
if len(sys.argv) < 3:
|
||
|
print 'ERROR: not enough arguments provided'
|
||
|
print 'ERROR: not enough arguments provided\n'
|
||
|
usage()
|
||
|
return -1
|
||
|
|
||
|
fs_name = sys.argv[1]
|
||
Made some small updates to the extent_test.py master script.