diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-28 20:24:54 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-28 20:24:54 +0000 |
commit | cc2192755ebf1e8f410677967868a67fb6d8c2b1 (patch) | |
tree | 02955b06ddc151440fd545e6809d96644dd4f6a9 | |
parent | 01d05a0787fb76548f8f727a06fbc980d2321ebc (diff) | |
parent | 3845288c52bf080b0c5a01005de15e11a0033254 (diff) | |
download | fuzz-android12-mainline-tzdata-release.tar.gz |
Snap for 6439596 from 3845288c52bf080b0c5a01005de15e11a0033254 to qt-aml-tzdata-releaseq_tzdata_aml_297100400q_tzdata_aml_297100300q_tzdata_aml_297100000q_tzdata_aml_296200000q_tzdata_aml_295600118q_tzdata_aml_295600110q_tzdata_aml_295500002q_tzdata_aml_295500001q_tzdata_aml_294400310android-mainline-12.0.0_r54android-mainline-12.0.0_r111android-mainline-10.0.0_r13android-mainline-10.0.0_r12android-mainline-10.0.0_r11q_tzdata_aml_297100000android12-mainline-tzdata-releaseandroid10-mainline-tzdata-releaseandroid10-android13-mainline-tzdata-release
Change-Id: I41d9fccf98fc0a8f300ef6e984fe1151ae70f46a
-rw-r--r-- | iface_fuzzer/Android.bp | 3 | ||||
-rw-r--r-- | iface_fuzzer/OWNERS | 5 | ||||
-rw-r--r-- | iface_fuzzer/ProtoFuzzerRunner.cpp | 23 |
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(); |