/system/extras/simpleperf/ |
D | cmd_report_sample_test.cpp | 61 std::string data; in TEST() local 62 GetProtobufReport(PERF_DATA_WITH_SYMBOLS, &data); in TEST() 63 ASSERT_NE(data.find("magic: SIMPLEPERF"), std::string::npos); in TEST() 64 ASSERT_NE(data.find("version: 1"), std::string::npos); in TEST() 65 ASSERT_NE(data.find("file:"), std::string::npos); in TEST() 69 std::string data; in TEST() local 70 GetProtobufReport(PERF_DATA_WITH_WRONG_IP_IN_CALLCHAIN, &data); in TEST() 72 ASSERT_EQ(data.find("unknown"), std::string::npos); in TEST() 76 std::string data; in TEST() local 77 GetProtobufReport(PERF_DATA_WITH_SYMBOLS, &data); in TEST() [all …]
|
D | cmd_inject_test.cpp | 48 static void CheckMatchingExpectedData(std::string& data) { in CheckMatchingExpectedData() argument 52 data.erase(std::remove(data.begin(), data.end(), '\r'), data.end()); in CheckMatchingExpectedData() 53 ASSERT_EQ(data, expected_data); in CheckMatchingExpectedData() 57 std::string data; in TEST() local 58 ASSERT_TRUE(RunInjectCmd({}, &data)); in TEST() 60 ASSERT_NE(data.find("etm_test_loop"), std::string::npos); in TEST() 61 CheckMatchingExpectedData(data); in TEST() 66 std::string data; in TEST() local 67 ASSERT_TRUE(RunInjectCmd({"--binary", "etm_test_loop"}, &data)); in TEST() 68 ASSERT_NE(data.find("etm_test_loop"), std::string::npos); in TEST() [all …]
|
/system/bt/gd/common/ |
D | blocking_queue_unittest.cc | 45 int data = 1; in TEST_F() local 46 queue_.push(data); in TEST_F() 48 EXPECT_EQ(queue_.take(), data); in TEST_F() 53 for (int data = 0; data < 10; data++) { in TEST_F() local 54 queue_.push(data); in TEST_F() 56 EXPECT_EQ(queue_.take(), data); in TEST_F() 62 for (int data = 0; data < 10; data++) { in TEST_F() local 63 queue_.push(data); in TEST_F() 66 for (int data = 0; data < 10; data++) { in TEST_F() local 67 EXPECT_EQ(queue_.take(), data); in TEST_F() [all …]
|
/system/vold/ |
D | EncryptInplace.cpp | 77 static void update_progress(struct encryptGroupsData* data, int is_used) { in update_progress() argument 78 data->blocks_already_done++; in update_progress() 81 data->used_blocks_already_done++; in update_progress() 83 if (data->tot_used_blocks) { in update_progress() 84 data->new_pct = data->used_blocks_already_done / data->one_pct; in update_progress() 86 data->new_pct = data->blocks_already_done / data->one_pct; in update_progress() 89 if (!data->set_progress_properties) return; in update_progress() 91 if (data->new_pct > data->cur_pct) { in update_progress() 93 data->cur_pct = data->new_pct; in update_progress() 94 snprintf(buf, sizeof(buf), "%" PRId64, data->cur_pct); in update_progress() [all …]
|
/system/core/deprecated-adf/libadf/ |
D | adf.cpp | 103 int adf_get_device_data(struct adf_device *dev, struct adf_device_data *data) in adf_get_device_data() argument 108 memset(data, 0, sizeof(*data)); in adf_get_device_data() 110 err = ioctl(dev->fd, ADF_GET_DEVICE_DATA, data); in adf_get_device_data() 114 if (data->n_attachments) in adf_get_device_data() 115 data->attachments = new adf_attachment_config[data->n_attachments]; in adf_get_device_data() 117 if (data->n_allowed_attachments) in adf_get_device_data() 118 data->allowed_attachments = in adf_get_device_data() 119 new adf_attachment_config[data->n_allowed_attachments]; in adf_get_device_data() 121 if (data->custom_data_size) in adf_get_device_data() 122 data->custom_data = new char[data->custom_data_size]; in adf_get_device_data() [all …]
|
/system/core/libcutils/ |
D | config_utils.cpp | 115 char *data; member 125 char *data; in _lex() local 127 data = cs->data; in _lex() 137 c = *data++; in _lex() 148 switch(*data) { in _lex() 150 cs->data = data; in _lex() 153 cs->data = data + 1; in _lex() 156 data++; in _lex() 162 cs->data = data; in _lex() 166 cs->data = data; in _lex() [all …]
|
D | load_file.cpp | 26 char *data; in load_file() local 30 data = 0; in load_file() 39 data = (char*) malloc(sz + 1); in load_file() 40 if(data == 0) goto oops; in load_file() 42 if(read(fd, data, sz) != sz) goto oops; in load_file() 44 data[sz] = 0; in load_file() 47 return data; in load_file() 51 if(data != 0) free(data); in load_file()
|
/system/bt/tools/scripts/ |
D | dump_hearingaid_audio.py | 84 def parse_acl_ha_debug_buffer(data, result): argument 86 if len(data) < 5: 89 version, data = unpack_data(data, 1) 94 byte_data, data = unpack_data(data, 1) 100 if len(data) < 7: 106 byte_data, data = unpack_data(data, 1) 119 def parse_acl_ha_audio_data(data, result): argument 121 if len(data) < 2: 124 audio_data_b = data[1:] 128 def parse_acl_ha_audio_type(data, result): argument [all …]
|
/system/core/adb/pairing_auth/tests/ |
D | pairing_auth_test.cpp | 40 return PairingAuthUniquePtr(pairing_auth_client_new(pswd.data(), pswd.size()), in makeClient() 45 return PairingAuthUniquePtr(pairing_auth_server_new(pswd.data(), pswd.size()), in makeServer() 87 pairing_auth_get_spake2_msg(client.get(), buf.data()); in TEST_F() 93 pairing_auth_get_spake2_msg(server.get(), buf.data()); in TEST_F() 102 std::vector<uint8_t> data{0x01, 0x02, 0x03}; in TEST_F() local 116 pairing_auth_encrypt(server.get(), data.data(), data.size(), outbuf, &outsize); in TEST_F() 122 pairing_auth_decrypt(server.get(), data.data(), data.size(), outbuf, &outsize); in TEST_F() 128 pairing_auth_safe_decrypted_size(server.get(), data.data(), data.size()); in TEST_F() 134 pairing_auth_safe_encrypted_size(server.get(), data.size()); in TEST_F() 146 pairing_auth_get_spake2_msg(client.get(), client_msg.data()); in TEST_F() [all …]
|
/system/extras/verity/ |
D | build_verity_tree_test.cpp | 52 void GenerateHashTree(const std::vector<unsigned char>& data, in GenerateHashTree() argument 54 ASSERT_TRUE(builder->Initialize(data.size(), salt)); in GenerateHashTree() 55 ASSERT_TRUE(builder->Update(data.data(), data.size())); in GenerateHashTree() 85 std::vector<unsigned char> data(4096, 1); in TEST_F() local 87 GenerateHashTree(data, salt_hex); in TEST_F() 95 std::vector<unsigned char> data(128 * 4096, 0); in TEST_F() local 97 GenerateHashTree(data, salt_hex); in TEST_F() 105 std::vector<unsigned char> data(129 * 4096, 0xff); in TEST_F() local 107 GenerateHashTree(data, salt_hex); in TEST_F() 116 std::vector<unsigned char> data(256 * 4096); in TEST_F() local [all …]
|
/system/libziparchive/ |
D | zip_writer_test.cc | 64 ZipEntry data; in TEST_F() local 65 ASSERT_EQ(0, FindEntry(handle, "file.txt", &data)); in TEST_F() 66 EXPECT_EQ(kCompressStored, data.method); in TEST_F() 67 EXPECT_EQ(0u, data.has_data_descriptor); in TEST_F() 68 EXPECT_EQ(strlen(expected), data.compressed_length); in TEST_F() 69 ASSERT_EQ(strlen(expected), data.uncompressed_length); in TEST_F() 70 ASSERT_TRUE(AssertFileEntryContentsEq(expected, handle, &data)); in TEST_F() 96 ZipEntry data; in TEST_F() local 98 ASSERT_EQ(0, FindEntry(handle, "file.txt", &data)); in TEST_F() 99 EXPECT_EQ(kCompressStored, data.method); in TEST_F() [all …]
|
/system/core/libutils/ |
D | SharedBuffer.h | 54 inline const void* data() const; 57 inline void* data(); 63 static inline SharedBuffer* bufferFromData(void* data); 66 static inline const SharedBuffer* bufferFromData(const void* data); 69 static inline size_t sizeFromData(const void* data); 119 const void* SharedBuffer::data() const { in data() function 123 void* SharedBuffer::data() { in data() function 131 SharedBuffer* SharedBuffer::bufferFromData(void* data) { in bufferFromData() argument 132 return data ? static_cast<SharedBuffer *>(data)-1 : nullptr; in bufferFromData() 135 const SharedBuffer* SharedBuffer::bufferFromData(const void* data) { in bufferFromData() argument [all …]
|
/system/connectivity/wifilogd/tests/ |
D | byte_buffer_unittest.cpp | 44 buffer_.AppendOrDie(kSmallestMessage.data(), kSmallestMessage.size()); in TEST_F() 48 buffer_.AppendOrDie(kLargestMessage.data(), kLargestMessage.size()); in TEST_F() 54 buffer_.AppendOrDie(message1.data(), message1.size()); in TEST_F() 55 buffer_.AppendOrDie(message2.data(), message2.size()); in TEST_F() 58 EXPECT_EQ(0, std::memcmp(buffer_.data(), expected.data(), expected.size())); in TEST_F() 63 buffer_.AppendOrDie(message1.data(), message1.size()); in TEST_F() 70 EXPECT_EQ(0, std::memcmp(copy.data(), buffer_.data(), buffer_.size())); in TEST_F() 76 buffer_.AppendOrDie(message1.data(), message1.size()) in TEST_F() 77 .AppendOrDie(message2.data(), message2.size()); in TEST_F() 80 EXPECT_EQ(0, std::memcmp(buffer_.data(), expected.data(), expected.size())); in TEST_F() [all …]
|
/system/incremental_delivery/incfs/tests/ |
D | MountRegistry_test.cpp | 45 ASSERT_STREQ("/root", r().rootFor("/root").data()); in TEST_F() 46 ASSERT_STREQ("/root", r().rootFor("/root/1").data()); in TEST_F() 47 ASSERT_STREQ("/root", r().rootFor("/root/1/2").data()); in TEST_F() 48 ASSERT_STREQ(nullptr, r().rootFor("/root1/1/2").data()); in TEST_F() 49 ASSERT_STREQ(nullptr, r().rootFor("/1/root").data()); in TEST_F() 50 ASSERT_STREQ(nullptr, r().rootFor("root").data()); in TEST_F() 56 ASSERT_STREQ("/root", r().rootFor("/root").data()); in TEST_F() 57 ASSERT_STREQ("/root", r().rootFor("/bind").data()); in TEST_F() 58 ASSERT_STREQ("/root", r().rootFor("/bind/1").data()); in TEST_F() 59 ASSERT_STREQ("/root", r().rootFor("/root/1").data()); in TEST_F() [all …]
|
/system/core/libunwindstack/tests/ |
D | MemoryOfflineBufferTest.cpp | 30 memory_.reset(new MemoryOfflineBuffer(buffer_.data(), kStart, kEnd)); in SetUp() 58 ASSERT_FALSE(memory_->ReadFully(0, buffer.data(), 1)); in TEST_F() 59 ASSERT_FALSE(memory_->ReadFully(0xfff, buffer.data(), 1)); in TEST_F() 60 ASSERT_FALSE(memory_->ReadFully(0xfff, buffer.data(), 2)); in TEST_F() 61 ASSERT_FALSE(memory_->ReadFully(0x3000, buffer.data(), 1)); in TEST_F() 62 ASSERT_FALSE(memory_->ReadFully(0x3001, buffer.data(), 1)); in TEST_F() 67 ASSERT_TRUE(memory_->ReadFully(kStart, buffer.data(), 10)); in TEST_F() 68 ASSERT_NO_FATAL_FAILURE(VerifyBuffer(buffer.data(), 0, 10)); in TEST_F() 70 ASSERT_TRUE(memory_->ReadFully(kStart + 555, buffer.data(), 40)); in TEST_F() 71 ASSERT_NO_FATAL_FAILURE(VerifyBuffer(buffer.data(), 555, 40)); in TEST_F() [all …]
|
D | MemoryOfflineTest.cpp | 31 data.push_back(i & 0xff); in SetUp() 35 ASSERT_TRUE(android::base::WriteFully(temp_file.fd, data.data(), data.size())); in SetUp() 45 std::vector<char> data; member in unwindstack::MemoryOfflineTest 52 ASSERT_EQ(0U, memory->Read(offset + data.size(), &buf, 1)); in TEST_F() 54 ASSERT_EQ(buf, data.front()); in TEST_F() 55 ASSERT_EQ(1U, memory->Read(offset + data.size() - 1, &buf, 1)); in TEST_F() 56 ASSERT_EQ(buf, data.back()); in TEST_F() 61 buf.resize(2 * data.size()); in TEST_F() 62 ASSERT_EQ(data.size(), memory->Read(offset, buf.data(), buf.size())); in TEST_F() 63 buf.resize(data.size()); in TEST_F() [all …]
|
D | MemoryFileTest.cpp | 52 ASSERT_TRUE(memory_.ReadFully(0, buffer.data(), 10)); in TEST_F() 54 ASSERT_STREQ("0123456789", buffer.data()); in TEST_F() 62 ASSERT_TRUE(memory_.ReadFully(0, buffer.data(), 10)); in TEST_F() 64 ASSERT_STREQ("abcdefghij", buffer.data()); in TEST_F() 78 ASSERT_TRUE(memory_.ReadFully(0, buffer.data(), 8)); in TEST_F() 80 ASSERT_STREQ("abcdefgh", buffer.data()); in TEST_F() 85 std::string data; in TEST_F() local 87 data += static_cast<char>((i / pagesize) + '0'); in TEST_F() 88 data += static_cast<char>((i % 10) + '0'); in TEST_F() 90 ASSERT_TRUE(android::base::WriteStringToFd(data, tf_->fd)); in TEST_F() [all …]
|
/system/libfmq/tests/ |
D | fmq_unit_tests.cpp | 128 inline void initData(uint8_t* data, size_t count) { in initData() argument 130 data[i] = i & 0xFF; in initData() 144 uint8_t data[dataLen]; in ReaderThreadBlocking() local 160 if ((efState & kFmqNotEmpty) && fmq->read(data, dataLen)) { in ReaderThreadBlocking() 179 uint8_t data[dataLen]; in ReaderThreadBlocking2() local 184 bool ret = fmq->readBlocking(data, in ReaderThreadBlocking2() 214 uint8_t data[dataLen] = {0}; in TEST_F() local 233 ASSERT_TRUE(mQueue->write(data, dataLen)); in TEST_F() 250 uint8_t data[dataLen] = {0}; in TEST_F() local 263 bool ret = mQueue->writeBlocking(data, in TEST_F() [all …]
|
/system/chre/platform/slpi/see/ |
D | see_helper.cc | 120 SeeDataArg *data; member 147 auto *data = static_cast<const SeeBufArg *>(*arg); in copyPayload() local 151 stream, static_cast<const pb_byte_t *>(data->buf), data->bufLen)) { in copyPayload() 214 SeeBufArg data = { in encodeSnsSuidReq() local 220 .data_type.arg = &data, in encodeSnsSuidReq() 363 UniquePtr<sns_client_request_msg> *msg, SeeBufArg *data) { in prepSnsClientReq() argument 366 CHRE_ASSERT(data); in prepSnsClientReq() 376 data->buf = payload, in prepSnsClientReq() 377 data->bufLen = payloadLen, in prepSnsClientReq() 389 req->request.payload.arg = data; in prepSnsClientReq() [all …]
|
/system/core/fastboot/device/ |
D | flashing.cpp | 77 int FlashRawDataChunk(int fd, const char* data, size_t len) { in FlashRawDataChunk() argument 81 int this_ret = write(fd, data, this_len); in FlashRawDataChunk() 86 data += this_ret; in FlashRawDataChunk() 93 int ret = FlashRawDataChunk(fd, downloaded_data.data(), downloaded_data.size()); in FlashRawData() 100 int WriteCallback(void* priv, const void* data, size_t len) { in WriteCallback() argument 102 if (!data) { in WriteCallback() 105 return FlashRawDataChunk(fd, reinterpret_cast<const char*>(data), len); in WriteCallback() 109 struct sparse_file* file = sparse_file_import_buf(downloaded_data.data(), true, false); in FlashSparseData() 119 *reinterpret_cast<uint32_t*>(downloaded_data.data()) == SPARSE_HEADER_MAGIC) { in FlashBlockDevice() 126 static void CopyAVBFooter(std::vector<char>* data, const uint64_t block_device_size) { in CopyAVBFooter() argument [all …]
|
/system/media/audio_utils/tests/ |
D | channels_tests.cpp | 51 EXPECT_EQ(0, memcmp(c1.data(), c2.data(), sizeof(c1[0]) * std::min(c1.size(), c2.size()))); in expectEq() 67 u16ref.data() /*in_buff*/, in TEST() 69 u16expand.data() /*out_buff*/, in TEST() 75 checkUnsignedMonotoneOrZero(u16expand.data(), u16expand.size()); in TEST() 79 u16expand.data() /*in_buff*/, in TEST() 81 u16ary.data() /*out_buff*/, in TEST() 103 u16ref.data() /*in_buff*/, in TEST() 105 u16contract.data() /*out_buff*/, in TEST() 111 checkMonotone(u16contract.data(), u16contract.size()); in TEST() 121 u16contract.data() /*in_buff*/, in TEST() [all …]
|
/system/core/adb/ |
D | shell_service_protocol_test.cpp | 72 read_protocol_->buffer_end_ = read_protocol_->data() + size; in SetReadDataCapacity() 91 const void* data, size_t data_length) { in PacketEquals() argument 95 !memcmp(data, protocol->data(), data_length)); in PacketEquals() 103 char data[] = "abc 123 \0\r\n"; in TEST_F() local 105 memcpy(write_protocol_->data(), data, sizeof(data)); in TEST_F() 106 ASSERT_TRUE(write_protocol_->Write(id, sizeof(data))); in TEST_F() 109 ASSERT_TRUE(PacketEquals(read_protocol_, id, data, sizeof(data))); in TEST_F() 116 memcpy(write_protocol_->data(), "1234567890", 10); in TEST_F() 140 write_protocol_->data()[0] = 20; in TEST_F() 145 ASSERT_EQ(20, read_protocol_->data()[0]); in TEST_F() [all …]
|
/system/core/adb/pairing_connection/tests/ |
D | pairing_connection_test.cpp | 185 cert.assign(reinterpret_cast<const uint8_t*>(kTestRsa2048ClientCert.data()), in CreateClient() 186 reinterpret_cast<const uint8_t*>(kTestRsa2048ClientCert.data()) + in CreateClient() 188 key.assign(reinterpret_cast<const uint8_t*>(kTestRsa2048ClientPrivKey.data()), in CreateClient() 189 reinterpret_cast<const uint8_t*>(kTestRsa2048ClientPrivKey.data()) + in CreateClient() 198 pswd.data(), pswd.size(), peer_info, reinterpret_cast<const uint8_t*>(cert.data()), in CreateServer() 199 cert.size(), reinterpret_cast<const uint8_t*>(priv_key.data()), priv_key.size(), in CreateServer() 206 .data = "my_server_info", 211 .data = "my_client_info", 256 reinterpret_cast<const uint8_t*>(kTestRsa2048ClientCert.data()), in TEST_F() 258 reinterpret_cast<const uint8_t*>(kTestRsa2048ClientPrivKey.data()), in TEST_F() [all …]
|
/system/core/bootstat/ |
D | bootstat.rc | 9 on post-fs-data 10 mkdir /data/misc/bootstat 0700 system log 13 chown system log /data/misc/bootstat/absolute_boot_time 14 chown system log /data/misc/bootstat/boot_complete 15 chown system log /data/misc/bootstat/boot_complete_no_encryption 16 chown system log /data/misc/bootstat/boot_reason 17 chown system log /data/misc/bootstat/boottime.bootloader.1BLE 18 chown system log /data/misc/bootstat/boottime.bootloader.1BLL 19 chown system log /data/misc/bootstat/boottime.bootloader.2BLE 20 chown system log /data/misc/bootstat/boottime.bootloader.2BLL [all …]
|
/system/bt/bta/ag/ |
D | bta_ag_int.h | 135 tBTA_AG_RES_DATA data; member 312 const tBTA_AG_DATA& data); 314 const tBTA_AG_DATA& data); 323 extern void bta_ag_create_records(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data); 327 extern void bta_ag_free_db(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data); 335 extern void bta_ag_rfc_do_close(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data); 336 extern void bta_ag_rfc_do_open(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data); 343 tBTM_ESCO_CONN_REQ_EVT_DATA* data); 358 extern void bta_ag_register(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data); 359 extern void bta_ag_deregister(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data); [all …]
|