Lines Matching +full:- +full:seed

40             "'--config' and '--command' options are not supported.", file=sys.stderr)
96 return -term_signal
117 The test log will include application (e.g. 'qemu-img') logs besides info
121 def __init__(self, test_id, seed, work_dir, run_log, argument
125 Path to qemu-img and qemu-io will be retrieved from 'QEMU_IMG' and
128 if seed is not None:
129 self.seed = seed
131 self.seed = str(random.randint(0, sys.maxsize))
132 random.seed(self.seed)
136 self.current_dir = os.path.join(work_dir, 'test-' + test_id)
138 os.environ.get('QEMU_IMG', 'qemu-img').strip().split(' ')
139 self.qemu_io = os.environ.get('QEMU_IO', 'qemu-io').strip().split(' ')
140 self.commands = [['qemu-img', 'check', '-f', 'qcow2', '$test_img'],
141 ['qemu-img', 'info', '-f', 'qcow2', '$test_img'],
142 ['qemu-io', '$test_img', '-c', 'read $off $len'],
143 ['qemu-io', '$test_img', '-c', 'write $off $len'],
144 ['qemu-io', '$test_img', '-c',
146 ['qemu-io', '$test_img', '-c',
148 ['qemu-io', '$test_img', '-c', 'flush'],
149 ['qemu-io', '$test_img', '-c',
151 ['qemu-io', '$test_img', '-c',
155 ['qemu-img', 'convert', '-f', 'qcow2', '-O', fmt,
176 by 'qemu-img create'.
178 # All formats supported by the 'qemu-img create' command.
184 cmd = self.qemu_img + ['create', '-f', backing_file_fmt,
222 if item[0] == 'qemu-img':
224 elif item[0] == 'qemu-io':
235 .replace('$len', str(end - start)))
239 test_summary = "Seed: %s\nCommand: %s\nTest directory: %s\n" \
241 % (self.seed, " ".join(current_cmd),
256 % (test_summary, str_signal(-retcode)),
286 runner.py -c '[["qemu-img", "info", "$test_img"]]' /tmp/test qcow2
289 -h, --help display this help and exit
290 -d, --duration=NUMBER finish tests after NUMBER of seconds
291 -c, --command=JSON run tests for all commands specified in
293 -s, --seed=STRING seed for a test image generation,
295 --config=JSON take fuzzer configuration from the JSON
297 -k, --keep_passed don't remove folders of passed tests
298 -v, --verbose log information about passed tests
302 '--command' accepts a JSON array of commands. Each command presents
304 e.g. ["qemu-io", "$test_img", "-c", "write $off $len"].
306 Supported application aliases: 'qemu-img' and 'qemu-io'.
314 Paths to 'qemu-img' and 'qemu-io' are retrevied from 'QEMU_IMG' and
317 '--config' accepts a JSON array of fields to be fuzzed, e.g.
326 If '--config' argument is specified, fields not listed in
330 def run_test(test_id, seed, work_dir, run_log, cleanup, log_all, argument
334 test = TestEnv(test_id, seed, work_dir, run_log, cleanup,
352 return (duration is None) or (current_time - start_time < duration)
356 ['command=', 'help', 'seed=', 'config=',
359 print("Error: %s\n\nTry 'runner.py --help' for more information" % e, file=sys.stderr)
365 seed = None variable
369 if opt in ('-h', '--help'):
372 elif opt in ('-c', '--command'):
379 elif opt in ('-k', '--keep_passed'):
381 elif opt in ('-v', '--verbose'):
383 elif opt in ('-s', '--seed'):
384 seed = arg variable
385 elif opt in ('-d', '--duration'):
387 elif opt == '--config':
396 print("Expected two parameters\nTry 'runner.py --help'" \
418 resource.setrlimit(resource.RLIMIT_CORE, (-1, -1))
419 # If a seed is specified, only one test will be executed.
425 run_test(str(next(test_id)), seed, work_dir, run_log, cleanup,
430 if seed is not None: