Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 150) sorted by relevance

123456

/test/xts/acts/distributed_schedule_lite/distributed_schedule_posix/src/
DMsgParserFuncTest.cpp26 static int8_t RunTest(const uint8_t *buffer, uint16_t bufferLen, const TlvParseCallback onTlvParseD… in RunTest() argument
36 interInfo.payload = buffer; in RunTest()
69 uint8_t buffer[] = { variable
88 RunTest(buffer, sizeof(buffer), onTlvParseDone, nullptr);
98 uint8_t buffer[] = { variable
111 int8_t resultCode = RunTest(nullptr, sizeof(buffer), onTlvParseDone, nullptr);
121 uint8_t buffer[] = { variable
129 int8_t resultCode = RunTest(buffer, sizeof(buffer), onTlvParseDone, nullptr);
139 uint8_t buffer[] = { variable
152 int8_t resultCode = RunTest(buffer, MAX_LENGTH + 1, onTlvParseDone, nullptr);
[all …]
DMsgParserLenFuncTest.cpp26 static int8_t RunTest(const uint8_t *buffer, uint16_t bufferLen, const TlvParseCallback onTlvParseD… in RunTest() argument
36 interInfo.payload = buffer; in RunTest()
73 char buffer[PACKET_DATA_SIZE] = {0}; variable
75 DmsPacket dmsPacket {buffer, PACKET_DATA_SIZE};
92 RunTest((uint8_t *)buffer, dataSize, onTlvParseDone, nullptr);
107 char buffer[PACKET_DATA_SIZE] = {0}; variable
109 DmsPacket dmsPacket {buffer, PACKET_DATA_SIZE};
126 RunTest((uint8_t *)buffer, dataSize, onTlvParseDone, nullptr);
139 char buffer[PACKET_DATA_SIZE] = {0}; variable
141 DmsPacket dmsPacket {buffer, PACKET_DATA_SIZE};
[all …]
/test/xts/acts/commonlibrary/ets_utils/buffer_lib_standard/src/main/js/test/
DBuffer.test.js16 import buffer from "@ohos.buffer";
26 let buf = buffer.alloc(10);
39 let buf = buffer.alloc(10).fill("ab$#", encode);
50 let buf1 = buffer.alloc(10);
51 let buf = buffer.alloc(10).fill(buf1);
61 let buf = buffer.alloc(0);
74 let buf = buffer.alloc(0).fill("ab$#", encode);
85 let buf1 = buffer.alloc(10);
86 let buf = buffer.alloc(0).fill(buf1);
97 let buf = buffer.alloc(-5);
[all …]
/test/xts/acts/communication/bluetooth_ble/src/main/js/test/
DBleAdvertiser.test.js99 manufactureValue:manufactureValueBuffer.buffer
103 serviceValue:serviceValueBuffer.buffer
110 manufactureValue:manufactureValueBuffer.buffer
114 serviceValue:serviceValueBuffer.buffer
155 manufactureValue:manufactureValueBuffer.buffer
159 serviceValue:serviceValueBuffer.buffer
166 manufactureValue:manufactureValueBuffer.buffer
170 serviceValue:serviceValueBuffer.buffer
211 manufactureValue:manufactureValueBuffer.buffer
215 serviceValue:serviceValueBuffer.buffer
[all …]
/test/xts/acts/multimedia_lite/media_lite_posix/audio_native/src/
DActsMediaAudioTest.cpp66 uint8_t *buffer; variable
68 audioCapturer->Read(buffer, framesize, false);
69 EXPECT_TRUE(sizeof(buffer) > 0);
92 uint8_t *buffer; variable
95 audioCapturer->Read(buffer, framesize, false);
96 EXPECT_TRUE(sizeof(buffer) > 0);
119 uint8_t *buffer; variable
122 audioCapturer->Read(buffer, framesize, false);
123 EXPECT_TRUE(sizeof(buffer) > 0);
146 uint8_t *buffer; variable
[all …]
/test/testfwk/developer_test/aw/cxx/hwext/
Dperf.cpp310 char buffer[ID_PROPERTY_LENGTH] = {0}; in SaveResult() local
319 (void)memset_s(buffer, sizeof(buffer), 0, sizeof(buffer)); in SaveResult()
320 if (snprintf_s(buffer, sizeof(buffer), sizeof(buffer) - 1, "%g", m_dbBaseLine) > 0) { in SaveResult()
321 m_pTester->RecordProperty("baseline", buffer); in SaveResult()
324 (void)memset_s(buffer, sizeof(buffer), 0, sizeof(buffer)); in SaveResult()
325 if (snprintf_s(buffer, sizeof(buffer), sizeof(buffer) - 1, "%d", m_dCaseVersion) > 0) { in SaveResult()
326 m_pTester->RecordProperty("tc_version", buffer); in SaveResult()
329 (void)memset_s(buffer, sizeof(buffer), 0, sizeof(buffer)); in SaveResult()
330 if (snprintf_s(buffer, sizeof(buffer), sizeof(buffer) - 1, "%g", m_dbLastValue) > 0) { in SaveResult()
331 m_pTester->RecordProperty("lastvalue", m_bHasLastValue ? buffer : ""); in SaveResult()
[all …]
/test/xts/acts/communication/bluetooth_manager/src/main/js/test/
DBleAdvertiser.test.js101 manufactureValue:manufactureValueBuffer.buffer
105 serviceValue:serviceValueBuffer.buffer
112 manufactureValue:manufactureValueBuffer.buffer
116 serviceValue:serviceValueBuffer.buffer
159 manufactureValue:manufactureValueBuffer.buffer
163 serviceValue:serviceValueBuffer.buffer
170 manufactureValue:manufactureValueBuffer.buffer
174 serviceValue:serviceValueBuffer.buffer
217 manufactureValue:manufactureValueBuffer.buffer
221 serviceValue:serviceValueBuffer.buffer
[all …]
DBleAdvertiser401.test.js96 manufactureValue:manufactureValueBuffer.buffer
100 serviceValue:serviceValueBuffer.buffer
107 manufactureValue:manufactureValueBuffer.buffer
111 serviceValue:serviceValueBuffer.buffer
150 manufactureValue:manufactureValueBuffer.buffer
154 serviceValue:serviceValueBuffer.buffer
161 manufactureValue:manufactureValueBuffer.buffer
165 serviceValue:serviceValueBuffer.buffer
209 manufactureValue:manufactureValueBuffer.buffer
213 serviceValue:serviceValueBuffer.buffer
[all …]
/test/xts/acts/graphic/graphicnapitest/
DNativeBufferTest.cpp37 static inline OH_NativeBuffer* buffer = nullptr; member in OHOS::Rosen::NativeBufferTest
42 buffer = nullptr; in SetUpTestCase()
47 buffer = nullptr; in TearDownTestCase()
57 buffer = OH_NativeBuffer_Alloc(nullptr);
58 ASSERT_EQ(buffer, nullptr);
68 buffer = OH_NativeBuffer_Alloc(&config);
69 ASSERT_NE(buffer, nullptr);
90 uint32_t id = OH_NativeBuffer_GetSeqNum(buffer);
101 OH_NativeBuffer_GetConfig(buffer, &checkConfig);
142 int32_t ret = OH_NativeBuffer_Reference(buffer);
[all …]
/test/ostest/wukong/common/include/
Dspecial_test_object.h55 char buffer[50]; in toString() local
58 …result = sprintf_s(buffer, sizeof(buffer), "Swap: (%d, %d) -> (%d, %d)", endX_, endY_, startX_, st… in toString()
60 …result = sprintf_s(buffer, sizeof(buffer), "Swap: (%d, %d) -> (%d, %d)", startX_, startY_, endX_, … in toString()
65 return std::string(buffer); in toString()
84 char buffer[50]; in toString() local
85 int result = sprintf_s(buffer, sizeof(buffer), "Point: (%d, %d)", x_, y_); in toString()
89 return std::string(buffer); in toString()
104 char buffer[50]; in toString() local
105 int result = sprintf_s(buffer, sizeof(buffer), "Bundlename: (%s)", bundlename_.c_str()); in toString()
109 return std::string(buffer); in toString()
/test/xts/hats/ai/nnrt/hdi/common/
Dhdi_nnrt_test_utils.cpp143 V1_0::SharedBuffer buffer{NNRT_INVALID_FD, 0, 0, 0}; in CreateIOTensor() local
144 int ret = device->AllocateBuffer(ADDEND_BUFFER_LENGTH, buffer); in CreateIOTensor()
145 if (ret != HDF_SUCCESS || buffer.fd == NNRT_INVALID_FD) { in CreateIOTensor()
146 … printf("[NNRtTest] [CreateIOTensor] allocate buffer error. ret: %d, fd: %d\n", ret, buffer.fd); in CreateIOTensor()
152 .data = buffer}; in CreateIOTensor()
162 V1_0::SharedBuffer buffer{NNRT_INVALID_FD, 0, 0, 0}; in CreateInputIOTensor() local
163 auto ret = device->AllocateBuffer(length, buffer); in CreateInputIOTensor()
165 if (ret != HDF_SUCCESS || buffer.fd == NNRT_INVALID_FD) { in CreateInputIOTensor()
166 …rintf("[NNRtTest] [CreateInputIOTensor] allocate buffer error. ret: %d, fd: %d\n", ret, buffer.fd); in CreateInputIOTensor()
170 auto memAddress = memManager->MapMemory(buffer.fd, length); in CreateInputIOTensor()
[all …]
/test/xts/hats/hdf/display/gralloc/adaptation/
DGrallocAdaptation.cpp143 static bool CheckBufferHandle(AllocTestPrms &info, BufferHandle &buffer) in CheckBufferHandle() argument
145 if (buffer.stride != (ALIGN_UP(info.expectStride, WIDTH_ALIGN))) { in CheckBufferHandle()
146 …DISPLAY_TEST_LOGE("stride check failed stride %d, expect stride %d ", buffer.stride, info.expectSt… in CheckBufferHandle()
152 if (buffer.size != info.expectSize) { in CheckBufferHandle()
153 … DISPLAY_TEST_LOGE("size check failed size %d, expect size %d ", buffer.size, info.expectSize); in CheckBufferHandle()
180 BufferHandle *buffer = nullptr; in AllocMemTest() local
183 ret = mGrallocFuncs->AllocMem(&info.allocInfo, &buffer); in AllocMemTest()
187 void *vAddr = mGrallocFuncs->Mmap(buffer); in AllocMemTest()
193 ret = mGrallocFuncs->InvalidateCache(buffer); in AllocMemTest()
198 if (memset_s(vAddr, buffer->size, 0, buffer->size) != EOK) { in AllocMemTest()
[all …]
/test/xts/hats/hdf/camera/buffer_manager/
Dbuffer_manager_utest.cpp65 OHOS::SurfaceBuffer* buffer = consumer->AcquireBuffer(); in __anon55289f3b0202() local
66 if (buffer != nullptr) { in __anon55289f3b0202()
67 consumer->ReleaseBuffer(buffer); in __anon55289f3b0202()
85 sptr<SurfaceBuffer> buffer = nullptr; in __anon55289f3b0302() local
86 consumer->AcquireBuffer(buffer, flushFence, timestamp, damage); in __anon55289f3b0302()
87 if (buffer != nullptr) { in __anon55289f3b0302()
88 SurfaceError ret = consumer->ReleaseBuffer(buffer, -1); in __anon55289f3b0302()
159 std::shared_ptr<IBuffer> buffer; variable
168 buffer = bufferPool->AcquireBuffer();
169 EXPECT_EQ(true, buffer != nullptr);
[all …]
/test/xts/hats/hdf/usb/transferTest/common/
Dusbd_transfer_test.cpp157 uint8_t buffer[LENGTH_NUM_255] = { 0 }; variable
159 std::vector<uint8_t> bufferdata = { buffer, buffer + length };
176 uint8_t buffer[LENGTH_NUM_255] = { 0 }; variable
178 std::vector<uint8_t> bufferdata = { buffer, buffer + length };
195 uint8_t buffer[LENGTH_NUM_255] = { 0 }; variable
197 std::vector<uint8_t> bufferdata = { buffer, buffer + length };
215 uint8_t buffer[LENGTH_NUM_255] = { 0 }; variable
216 std::vector<uint8_t> bufferdata = { buffer, buffer + length };
234 uint8_t buffer[LENGTH_NUM_255] = { 0 }; variable
235 std::vector<uint8_t> bufferdata = { buffer, buffer + length };
[all …]
/test/xts/acts/kernel_lite/time_posix/src/
DTimeUtilsTest.cpp253 char buffer[80] = {0}; variable
260 size_t ftime = strftime(buffer, sizeof(buffer) - 1, "%Ex %EX %A", localTime);
262 EXPECT_STREQ(buffer, "01/01/70 05:14:40 Thursday") << "buffer return error!";
267 ftime = strftime(buffer, sizeof(buffer) - 1, "%y-%m-%d %H:%M:%S", localTime);
268 EXPECT_STREQ(buffer, "38-01-19 03:14:07") << "buffer return error!";
273 ftime = strftime(buffer, sizeof(buffer) - 1, "%Y-%m-%d %H:%M:%S", localTime);
274 EXPECT_STREQ(buffer, "9999-12-31 23:59:59") << "buffer return error!";
279 ftime = strftime(buffer, sizeof(buffer) - 1, "%x %X", localTime);
280 EXPECT_STREQ(buffer, "12/13/01 20:45:52") << "buffer return error!";
282 ftime = strftime(buffer, sizeof(buffer) - 1, "%Y-%m-%d %H:%M:%S", localTime);
[all …]
/test/xts/hats/hdf/usb/requestTest/common/
Dusbd_request_test.cpp622 uint8_t buffer[LENGTH_NUM_255] = { 0 }; variable
624 std::vector<uint8_t> devdata(buffer, buffer + length);
640 uint8_t buffer[LENGTH_NUM_255] = { 0 }; variable
643 std::vector<uint8_t> devdata(buffer, buffer + length);
660 uint8_t buffer[LENGTH_NUM_255] = { 0 }; variable
663 std::vector<uint8_t> devdata(buffer, buffer + length);
679 uint8_t buffer[LENGTH_NUM_255] = {}; variable
682 std::vector<uint8_t> devdata(buffer, buffer + length);
700 uint8_t buffer[LENGTH_NUM_255] = {}; variable
703 std::vector<uint8_t> devdata(buffer, buffer + length);
[all …]
/test/xts/device_attest_lite/services/core/adapter/
Dattest_adapter_oem.c42 int32_t OEMReadAuthStatus(char* buffer, uint32_t bufferLen) in OEMReadAuthStatus() argument
44 return ReadFile(AUTH_RESULT_PATH, AUTH_STATUS_FILE_NAME, buffer, bufferLen); in OEMReadAuthStatus()
83 int32_t OEMReadNetworkConfig(char* buffer, uint32_t bufferLen) in OEMReadNetworkConfig() argument
85 return ReadFile(AUTH_RESULT_PATH, NETWORK_CONFIG_FILE_NAME, buffer, bufferLen); in OEMReadNetworkConfig()
98 int32_t OEMReadAuthResultCode(char* buffer, uint32_t bufferLen) in OEMReadAuthResultCode() argument
100 return ReadFile(AUTH_RESULT_PATH, AUTH_RESULT_CODE_FILE_NAME, buffer, bufferLen); in OEMReadAuthResultCode()
/test/xts/device_attest/services/core/adapter/
Dattest_adapter_oem.c42 int32_t OEMReadAuthStatus(char* buffer, uint32_t bufferLen) in OEMReadAuthStatus() argument
44 return ReadFile(AUTH_RESULT_PATH, AUTH_STATUS_FILE_NAME, buffer, bufferLen); in OEMReadAuthStatus()
83 int32_t OEMReadNetworkConfig(char* buffer, uint32_t bufferLen) in OEMReadNetworkConfig() argument
85 return ReadFile(AUTH_RESULT_PATH, NETWORK_CONFIG_FILE_NAME, buffer, bufferLen); in OEMReadNetworkConfig()
98 int32_t OEMReadAuthResultCode(char* buffer, uint32_t bufferLen) in OEMReadAuthResultCode() argument
100 return ReadFile(AUTH_RESULT_PATH, AUTH_RESULT_CODE_FILE_NAME, buffer, bufferLen); in OEMReadAuthResultCode()
/test/xts/device_attest_lite/services/core/utils/
Dattest_utils_json.c60 char* buffer = (char *)ATTEST_MEM_MALLOC(len + 1); in GetObjectItemValueStr() local
61 if (buffer == NULL) { in GetObjectItemValueStr()
65 ret = strncpy_s(buffer, len + 1, valueString, len); in GetObjectItemValueStr()
67 ATTEST_MEM_FREE(buffer); in GetObjectItemValueStr()
70 *dest = buffer; in GetObjectItemValueStr()
/test/xts/device_attest/services/core/utils/
Dattest_utils_json.c60 char* buffer = (char *)ATTEST_MEM_MALLOC(len + 1); in GetObjectItemValueStr() local
61 if (buffer == NULL) { in GetObjectItemValueStr()
65 ret = strncpy_s(buffer, len + 1, valueString, len); in GetObjectItemValueStr()
67 ATTEST_MEM_FREE(buffer); in GetObjectItemValueStr()
70 *dest = buffer; in GetObjectItemValueStr()
/test/xts/acts/ai/neural_network_runtime/common/
Dmock_idevice.cpp148 int32_t MockIDevice::AllocateBuffer(uint32_t length, SharedBuffer &buffer) in AllocateBuffer() argument
162 buffer.fd = ashptr->GetAshmemFd(); in AllocateBuffer()
163 buffer.bufferSize = ashptr->GetAshmemSize(); in AllocateBuffer()
164 buffer.offset = 0; in AllocateBuffer()
165 buffer.dataSize = length; in AllocateBuffer()
167 m_ashmems[buffer.fd] = ashptr; in AllocateBuffer()
168 m_bufferFd = buffer.fd; in AllocateBuffer()
172 int32_t MockIDevice::ReleaseBuffer(const SharedBuffer &buffer) in ReleaseBuffer() argument
175 auto ash = m_ashmems[buffer.fd]; in ReleaseBuffer()
216 uint8_t buffer[4] = {0, 1, 2, 3}; in ExportModelCache() local
[all …]
/test/xts/hats/hdf/codec/hdi_v1.0/
Dcodec_proxy_test.cpp261 g_inputInfoData->buffer[0].type = BUFFER_TYPE_FD;
262 g_inputInfoData->buffer[0].offset = 1;
263 g_inputInfoData->buffer[0].length = 1;
264 g_inputInfoData->buffer[0].capacity = TEST_PACKET_BUFFER_SIZE;
265 g_inputInfoData->buffer[0].buf = (intptr_t)g_inputBuffer.fd;
282 ASSERT_EQ(inputInfo->buffer[0].type, g_inputInfoData->buffer[0].type);
283 ASSERT_EQ(inputInfo->buffer[0].offset, g_inputInfoData->buffer[0].offset);
284 ASSERT_EQ(inputInfo->buffer[0].length, g_inputInfoData->buffer[0].length);
285 ASSERT_EQ(inputInfo->buffer[0].capacity, g_inputInfoData->buffer[0].capacity);
320 g_outputInfoData->buffer[0].type = BUFFER_TYPE_FD;
[all …]
/test/xts/hats/hdf/display/device/
Dhdi_test_layer.cpp89 HdiGrallocBuffer *buffer = nullptr; in GetFrontBuffer() local
91 buffer = mFrontBuffers.front().get(); in GetFrontBuffer()
93 return buffer; in GetFrontBuffer()
98 HdiGrallocBuffer *buffer = nullptr; in GetBackBuffer() local
100 buffer = mBackBuffers.front().get(); in GetBackBuffer()
102 return buffer; in GetBackBuffer()
115 std::unique_ptr<HdiGrallocBuffer> buffer = in Init() local
117 DISPLAY_TEST_CHK_RETURN((buffer->Get() == nullptr), DISPLAY_FAILURE, in Init()
119 mFrontBuffers.emplace(std::move(buffer)); in Init()
176 HdiGrallocBuffer *buffer = AcquireBackBuffer(); in PreparePresent() local
[all …]
/test/xts/hats/hdf/usb/usbdBenchmarkTest/common/
DHdfUsbdBenchmarkRequestTest.cpp190 uint8_t buffer[LENGTH_NUM_255] = { 0 }; in BENCHMARK_F() local
192 std::vector<uint8_t> devdata(buffer, buffer + length); in BENCHMARK_F()
216 uint8_t buffer[LENGTH_NUM_255] = { 0 }; in BENCHMARK_F() local
219 std::vector<uint8_t> devdata(buffer, buffer + length); in BENCHMARK_F()
243 uint8_t buffer[LENGTH_NUM_255] = {}; in BENCHMARK_F() local
246 std::vector<uint8_t> devdata(buffer, buffer + length); in BENCHMARK_F()
324 uint8_t buffer[LENGTH_NUM_255] = { 0 }; in BENCHMARK_F() local
328 std::vector<uint8_t> bufferdata = { buffer, buffer + length }; in BENCHMARK_F()
356 uint8_t buffer[LENGTH_NUM_255] = {}; in BENCHMARK_F() local
361 std::vector<uint8_t> bufferdata = { buffer, buffer + length }; in BENCHMARK_F()
[all …]
DHdfUsbdBenchmarkTransferTest.cpp130 uint8_t buffer[LENGTH_NUM_255] = { 0 }; in BENCHMARK_F() local
132 std::vector<uint8_t> bufferdata = { buffer, buffer + length }; in BENCHMARK_F()
191 uint8_t buffer[LENGTH_NUM_255] = { 0 }; in BENCHMARK_F() local
194 std::vector<uint8_t> bufferdata = { buffer, buffer + length }; in BENCHMARK_F()
223 uint8_t buffer[100] = "hello world bulk writ01"; in BENCHMARK_F() local
225 std::vector<uint8_t> bufferdata = { buffer, buffer + length }; in BENCHMARK_F()
253 uint8_t buffer[LENGTH_NUM_255] = { 0 }; in BENCHMARK_F() local
256 std::vector<uint8_t> bufferdata = { buffer, buffer + length }; in BENCHMARK_F()
285 uint8_t buffer[100] = "hello world Interrupt writ01"; in BENCHMARK_F() local
287 std::vector<uint8_t> bufferdata = { buffer, buffer + length }; in BENCHMARK_F()
[all …]

123456