aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/test/SendCounterPacketTests.cpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-10-15 09:35:29 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-10-15 15:20:31 +0000
commit8d9590e5510b8ebdc4e0b2b31ce4b653b46fc02a (patch)
tree0521297dae9ebbf4b012df52313abe44d66d4c42 /src/profiling/test/SendCounterPacketTests.cpp
parent672d06eac5b0842c22f9f219e9b65efcd5883d33 (diff)
downloadarmnn-8d9590e5510b8ebdc4e0b2b31ce4b653b46fc02a.tar.gz
IVGCVSW-3939 Code refactoring and minor fixes
* Fixed value masking in SendPeriodicCounterCapturePacket and updated the pertinent unit tests * Code refactoring and cleanup * Added extra comments to the ProfilingService stop/reset procedure Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Ibaf2fede76e06d5b8ce7258a4820a60e5993559f
Diffstat (limited to 'src/profiling/test/SendCounterPacketTests.cpp')
-rw-r--r--src/profiling/test/SendCounterPacketTests.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/profiling/test/SendCounterPacketTests.cpp b/src/profiling/test/SendCounterPacketTests.cpp
index 00dad38078..f0ba34778c 100644
--- a/src/profiling/test/SendCounterPacketTests.cpp
+++ b/src/profiling/test/SendCounterPacketTests.cpp
@@ -217,11 +217,11 @@ BOOST_AUTO_TEST_CASE(SendPeriodicCounterCapturePacketTest)
uint32_t headerWord1 = ReadUint32(readBuffer2, 4);
uint64_t readTimestamp = ReadUint64(readBuffer2, 8);
- BOOST_TEST(((headerWord0 >> 26) & 0x3F) == 1); // packet family
- BOOST_TEST(((headerWord0 >> 19) & 0x3F) == 0); // packet class
- BOOST_TEST(((headerWord0 >> 16) & 0x3) == 0); // packet type
- BOOST_TEST(headerWord1 == 8); // data length
- BOOST_TEST(time == readTimestamp); // capture period
+ BOOST_TEST(((headerWord0 >> 26) & 0x0000003F) == 1); // packet family
+ BOOST_TEST(((headerWord0 >> 19) & 0x0000007F) == 0); // packet class
+ BOOST_TEST(((headerWord0 >> 16) & 0x00000007) == 0); // packet type
+ BOOST_TEST(headerWord1 == 8); // data length
+ BOOST_TEST(time == readTimestamp); // capture period
// Full packet message
MockBufferManager mockBuffer3(512);
@@ -240,11 +240,11 @@ BOOST_AUTO_TEST_CASE(SendPeriodicCounterCapturePacketTest)
headerWord1 = ReadUint32(readBuffer3, 4);
uint64_t readTimestamp2 = ReadUint64(readBuffer3, 8);
- BOOST_TEST(((headerWord0 >> 26) & 0x3F) == 1); // packet family
- BOOST_TEST(((headerWord0 >> 19) & 0x3F) == 0); // packet class
- BOOST_TEST(((headerWord0 >> 16) & 0x3) == 0); // packet type
- BOOST_TEST(headerWord1 == 38); // data length
- BOOST_TEST(time == readTimestamp2); // capture period
+ BOOST_TEST(((headerWord0 >> 26) & 0x0000003F) == 1); // packet family
+ BOOST_TEST(((headerWord0 >> 19) & 0x0000007F) == 0); // packet class
+ BOOST_TEST(((headerWord0 >> 16) & 0x00000007) == 0); // packet type
+ BOOST_TEST(headerWord1 == 38); // data length
+ BOOST_TEST(time == readTimestamp2); // capture period
uint16_t counterIndex = 0;
uint32_t counterValue = 100;