aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/test/ProfilingTests.cpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-09-24 11:38:32 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-09-24 12:31:05 +0100
commitf74ff2ff7f67ff0141c058a242758de97e10dd99 (patch)
tree7d722ebea00b4298879671056e9bd70c21cfbcdf /src/profiling/test/ProfilingTests.cpp
parent3fb7e105ae62cbfb3ebf1edebb90e2b6672b22aa (diff)
downloadarmnn-f74ff2ff7f67ff0141c058a242758de97e10dd99.tar.gz
IVGCVSW-3691 Fix the Counter Directory Packet data length
* The data_length field in the header represents only the size of the data included in the packet after the header, so the header size is not included * Removed a number of conversion macros in SendCounterPacket by using numeric casts where possible * Updated the unit tests accordingly Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Ifb23c341c442ff3d33b234d4213b739a77ceb658
Diffstat (limited to 'src/profiling/test/ProfilingTests.cpp')
-rw-r--r--src/profiling/test/ProfilingTests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp
index 2a20aac8a4..32a41f37c2 100644
--- a/src/profiling/test/ProfilingTests.cpp
+++ b/src/profiling/test/ProfilingTests.cpp
@@ -2022,7 +2022,7 @@ BOOST_AUTO_TEST_CASE(RequestCounterDirectoryCommandHandlerTest0)
BOOST_TEST(((headerWord0 >> 26) & 0x3F) == 0); // packet family
BOOST_TEST(((headerWord0 >> 16) & 0x3FF) == 2); // packet id
- BOOST_TEST(headerWord1 == 32); // data lenght;
+ BOOST_TEST(headerWord1 == 24); // data length
uint32_t bodyHeaderWord0 = ReadUint32(readBuffer, 8);
uint16_t deviceRecordCount = numeric_cast<uint16_t>(bodyHeaderWord0 >> 16);
@@ -2061,7 +2061,7 @@ BOOST_AUTO_TEST_CASE(RequestCounterDirectoryCommandHandlerTest1)
BOOST_TEST(((headerWord0 >> 26) & 0x3F) == 0); // packet family
BOOST_TEST(((headerWord0 >> 16) & 0x3FF) == 2); // packet id
- BOOST_TEST(headerWord1 == 248); // data lenght;
+ BOOST_TEST(headerWord1 == 240); // data length
uint32_t bodyHeaderWord0 = ReadUint32(readBuffer, 8);
uint32_t bodyHeaderWord1 = ReadUint32(readBuffer, 12);