build a basic data flow path to return the return value of a called function to the
funzzing framework
Change-Id: Ibf800c782a073fbb051361ecc4939511ce79cafe
diff --git a/sysfuzzer/common/fuzz_tester/FuzzerBase.cpp b/sysfuzzer/common/fuzz_tester/FuzzerBase.cpp
index 48eb715..281f924 100644
--- a/sysfuzzer/common/fuzz_tester/FuzzerBase.cpp
+++ b/sysfuzzer/common/fuzz_tester/FuzzerBase.cpp
@@ -43,7 +43,8 @@
}
-bool FuzzerBase::Fuzz(const vts::InterfaceSpecificationMessage& message) {
+bool FuzzerBase::Fuzz(const vts::InterfaceSpecificationMessage& message,
+ void* result) {
cout << "Fuzzing target component: "
<< "class " << message.component_class()
<< " type " << message.component_type()
@@ -52,7 +53,7 @@
string function_name_prefix = GetFunctionNamePrefix(message);
function_name_prefix_ = function_name_prefix.c_str();
for (const vts::FunctionSpecificationMessage& func_msg : message.api()) {
- Fuzz(func_msg);
+ Fuzz(func_msg, result);
}
return true;
}
diff --git a/sysfuzzer/common/fuzz_tester/FuzzerBase.h b/sysfuzzer/common/fuzz_tester/FuzzerBase.h
index 0e2bd38..8687057 100644
--- a/sysfuzzer/common/fuzz_tester/FuzzerBase.h
+++ b/sysfuzzer/common/fuzz_tester/FuzzerBase.h
@@ -38,13 +38,14 @@
// Fuzz tests the loaded component using the provided interface specification.
// Returns true iff the testing is conducted completely.
- bool Fuzz(const vts::InterfaceSpecificationMessage& message);
+ bool Fuzz(const vts::InterfaceSpecificationMessage& message, void* result);
protected:
// Actual implementation of routines to test a specific function using the
// provided function interface specification message.
// Returns true iff the testing is conducted completely.
- virtual bool Fuzz(const vts::FunctionSpecificationMessage& func_msg) {
+ virtual bool Fuzz(const vts::FunctionSpecificationMessage& func_msg,
+ void* result) {
return false;
};