清理codex告警

Signed-off-by: zhangcui <zhangcui11@huawei.com>
This commit is contained in:
zhangcui 2022-09-21 10:13:38 +00:00 committed by Gitee
parent 75967204d3
commit 6e0a01e2da
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 5 additions and 7 deletions

View File

@ -346,6 +346,7 @@ class LocalLibDownload:
else:
elf_struct.path = path
@classmethod
def __get_need_architectures(self, device_arch):
if device_arch == 'x86_64':
return ['x86', 'x86_64']

View File

@ -169,10 +169,10 @@ class GetLibFiles(object):
if (self.hdc.run_hdc_cmd(['shell', 'cp', device_path,
'/data/local/tmp']) and
self.hdc.run_hdc_cmd(['file recv',
'/data/local/tmp/' + filename,
os.path.join('/data/local/tmp/', filename),
host_path])):
self.hdc.run_hdc_cmd(['shell', 'rm',
'/data/local/tmp/' + filename])
os.path.join('/data/local/tmp/', filename)])
return True
print('failed to pull %s from device' % device_path)
return False

View File

@ -25,9 +25,6 @@ from hiperf_utils import executable_file_available
from hiperf_utils import find_tool_path
SO = 'libhiperf_report.z.so'
class TestUtils(unittest.TestCase):
def setUp(self):
@ -42,7 +39,7 @@ class TestUtils(unittest.TestCase):
self.assertEqual(result, True)
def test_is_elf_file(self):
result = is_elf_file(SO)
result = is_elf_file('libhiperf_report.z.so')
self.assertEqual(result, True)
def test_remove(self):

View File

@ -60,7 +60,7 @@ void RingBufferTest::ReadBufferAndCheck(RingBuffer &buf)
uint8_t *p = nullptr;
while ((p = buf.GetReadData()) != nullptr) {
ASSERT_EQ(memcpy_s(&readData, sizeof(perf_event_header), p, sizeof(perf_event_header)), 0);
ASSERT_EQ(checkSize, readData.size)
ASSERT_EQ(checkSize, readData.size) \
<< " read data size " << readData.size << " expect data size " << checkSize;
p += sizeof(perf_event_header);
uint8_t data = static_cast<uint8_t>(checkSize & U8MASK);