summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-04-28 20:24:54 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-04-28 20:24:54 +0000
commitcc2192755ebf1e8f410677967868a67fb6d8c2b1 (patch)
tree02955b06ddc151440fd545e6809d96644dd4f6a9
parent01d05a0787fb76548f8f727a06fbc980d2321ebc (diff)
parent3845288c52bf080b0c5a01005de15e11a0033254 (diff)
downloadfuzz-android12-mainline-tzdata-release.tar.gz
Change-Id: I41d9fccf98fc0a8f300ef6e984fe1151ae70f46a
-rw-r--r--iface_fuzzer/Android.bp3
-rw-r--r--iface_fuzzer/OWNERS5
-rw-r--r--iface_fuzzer/ProtoFuzzerRunner.cpp23
3 files changed, 17 insertions, 14 deletions
diff --git a/iface_fuzzer/Android.bp b/iface_fuzzer/Android.bp
index 69f7672..b611bac 100644
--- a/iface_fuzzer/Android.bp
+++ b/iface_fuzzer/Android.bp
@@ -41,7 +41,7 @@ cc_library {
],
}
-cc_fuzz {
+cc_binary {
name: "vts_proto_fuzzer",
srcs: [
"ProtoFuzzerMain.cpp",
@@ -59,6 +59,7 @@ cc_fuzz {
"libvts_proto_fuzzer_proto",
],
static_libs: [
+ "libFuzzer",
"libvts_proto_fuzzer",
],
cflags: [
diff --git a/iface_fuzzer/OWNERS b/iface_fuzzer/OWNERS
index e06b66c..507c77b 100644
--- a/iface_fuzzer/OWNERS
+++ b/iface_fuzzer/OWNERS
@@ -1,3 +1,2 @@
-smoreland@google.com
-trong@google.com
-zhaomingyin@google.com
+jiwonshin@google.com
+yim@google.com
diff --git a/iface_fuzzer/ProtoFuzzerRunner.cpp b/iface_fuzzer/ProtoFuzzerRunner.cpp
index fbb166c..0088c14 100644
--- a/iface_fuzzer/ProtoFuzzerRunner.cpp
+++ b/iface_fuzzer/ProtoFuzzerRunner.cpp
@@ -38,24 +38,27 @@ namespace vts {
namespace fuzzer {
static string GetDriverName(const CompSpec &comp_spec) {
- stringstream version_major, version_minor;
- version_major << comp_spec.component_type_version_major();
- version_minor << comp_spec.component_type_version_minor();
- string driver_name = comp_spec.package() + "@" + version_major.str() + "." +
- version_minor.str() + "-vts.driver.so";
+ stringstream version;
+ version.precision(1);
+ version << fixed << comp_spec.component_type_version();
+ string driver_name =
+ comp_spec.package() + "@" + version.str() + "-vts.driver.so";
return driver_name;
}
static string GetServiceName(const CompSpec &comp_spec) {
string hal_name = comp_spec.package();
+ string hal_version = GetVersionString(comp_spec.component_type_version());
string iface_name = comp_spec.component_name();
+ size_t major_version =
+ std::stoul(hal_version.substr(0, hal_version.find(".")));
+ size_t minor_version =
+ std::stoul(hal_version.substr(hal_version.find(".") + 1));
+
auto instance_names =
- ::android::vintf::VintfObject::GetDeviceHalManifest()->getHidlInstances(
- hal_name,
- Version(comp_spec.component_type_version_major(),
- comp_spec.component_type_version_minor()),
- iface_name);
+ ::android::vintf::VintfObject::GetDeviceHalManifest()->getInstances(
+ hal_name, Version(major_version, minor_version), iface_name);
if (instance_names.empty()) {
cerr << "HAL service name not available in VINTF." << endl;
std::abort();