def test_run_fuzzer_fail(self): """Test run_fuzzer (failure).""" self.mock.run.side_effect = builtin.BuiltinFuzzerException() self.assertTrue(setup.update_fuzzer_and_data_bundles('libFuzzer')) with self.assertRaises(builtin.BuiltinFuzzerException): fuzz_task.run_fuzzer(self.fuzzer, self.fuzzer_directory, '/output', '/input', 4)
def test_generate_blackbox_fuzzers_fail(self): """Test generate_blackbox_fuzzers (failure).""" self.mock.run.side_effect = builtin.BuiltinFuzzerException() self.assertTrue(setup.update_fuzzer_and_data_bundles('libFuzzer')) session = fuzz_task.FuzzingSession('libFuzzer', 'job', 1) session.testcase_directory = '/output' session.data_directory = '/input' with self.assertRaises(builtin.BuiltinFuzzerException): session.generate_blackbox_testcases(self.fuzzer, self.fuzzer_directory, 4)