Fix iface_fuzzer.
Test: rm -rf out/host/linux-x86/vts && SANITIZE_TARGET="address
coverage" make vts -j64 && vts-tradefed run commandAndExit vts
--skip-all-system-status-check --primary-abi-only --skip-preconditions
-l VERBOSE --module VtsHalBluetoothV1_0IfaceFuzzer
Change-Id: Ibecab8a847a31a761b4ac5bc050774078e667612
diff --git a/iface_fuzzer/ProtoFuzzerUtils.cpp b/iface_fuzzer/ProtoFuzzerUtils.cpp
index b89328f..8d42b4d 100644
--- a/iface_fuzzer/ProtoFuzzerUtils.cpp
+++ b/iface_fuzzer/ProtoFuzzerUtils.cpp
@@ -100,6 +100,7 @@
while ((ent = readdir(dir))) {
string vts_spec_name{ent->d_name};
if (vts_spec_name.find(".vts") != string::npos) {
+ cout << "Loading: " << vts_spec_name << endl;
string vts_spec_path = dir_path + "/" + vts_spec_name;
CompSpec comp_spec{};
InterfaceSpecificationParser::parse(vts_spec_path.c_str(), &comp_spec);
diff --git a/template/iface_fuzzer_test/iface_fuzzer_test.py b/template/iface_fuzzer_test/iface_fuzzer_test.py
index 9082e60..7733a8d 100644
--- a/template/iface_fuzzer_test/iface_fuzzer_test.py
+++ b/template/iface_fuzzer_test/iface_fuzzer_test.py
@@ -52,9 +52,9 @@
# Push corresponding VTS drivers.
driver_name = 'android.hardware.%s@%s-vts.driver.so' % (hal_name,
hal_version)
- driver32 = os.path.join(self.data_file_path, 'DATA', 'lib', driver_name)
- driver64 = os.path.join(self.data_file_path, 'DATA', 'lib64',
- driver_name)
+ asan_path = os.path.join(self.data_file_path, 'DATA', 'asan', 'system')
+ driver32 = os.path.join(asan_path, 'lib', driver_name)
+ driver64 = os.path.join(asan_path, 'lib64', driver_name)
try:
self._dut.adb.push(src_dir, self._VTS_SPEC_DIR_TARGET)
self._dut.adb.push(driver32, 'data/local/tmp/32')
diff --git a/template/libfuzzer_test/libfuzzer_test.py b/template/libfuzzer_test/libfuzzer_test.py
index 9689a27..69cc370 100644
--- a/template/libfuzzer_test/libfuzzer_test.py
+++ b/template/libfuzzer_test/libfuzzer_test.py
@@ -55,9 +55,9 @@
self._dut.stop()
self._dut.adb.shell('mkdir %s -p' % config.FUZZER_TEST_DIR)
- def tearDownClass(self):
+ def tearDown(self):
"""Deletes all copied data."""
- self._dut.adb.shell('rm -rf %s' % self.data_file_path)
+ self._dut.adb.shell('rm -rf %s' % config.FUZZER_TEST_DIR)
self._dut.start()
def PushFiles(self, src):