Lines Matching full:response

93     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());  in TEST()  local
97 PLDM_SUCCESS, length, response); in TEST()
100 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
101 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
102 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
103 ASSERT_EQ(response->hdr.command, PLDM_READ_FILE_INTO_MEMORY); in TEST()
104 ASSERT_EQ(response->payload[0], PLDM_SUCCESS); in TEST()
105 ASSERT_EQ(0, memcmp(response->payload + sizeof(response->payload[0]), in TEST()
110 PLDM_SUCCESS, length, response); in TEST()
113 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
114 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
115 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
116 ASSERT_EQ(response->hdr.command, PLDM_WRITE_FILE_FROM_MEMORY); in TEST()
117 ASSERT_EQ(response->payload[0], PLDM_SUCCESS); in TEST()
118 ASSERT_EQ(0, memcmp(response->payload + sizeof(response->payload[0]), in TEST()
128 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
132 PLDM_ERROR, length, response); in TEST()
135 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
136 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
137 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
138 ASSERT_EQ(response->hdr.command, PLDM_READ_FILE_INTO_MEMORY); in TEST()
139 ASSERT_EQ(response->payload[0], PLDM_ERROR); in TEST()
143 length, response); in TEST()
146 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
147 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
148 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
149 ASSERT_EQ(response->hdr.command, PLDM_WRITE_FILE_FROM_MEMORY); in TEST()
150 ASSERT_EQ(response->payload[0], PLDM_ERROR); in TEST()
170 auto response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
172 // Invoke decode the read file memory response in TEST()
173 auto rc = decode_rw_file_memory_resp(response, responseMsg.size() - hdrSize, in TEST()
192 auto response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
195 rc = decode_rw_file_memory_resp(response, 0, &completionCode, &length); in TEST()
330 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
335 fileTable.size(), response); in TEST()
338 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
339 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
340 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
341 ASSERT_EQ(response->hdr.command, PLDM_GET_FILE_TABLE); in TEST()
342 ASSERT_EQ(response->payload[0], PLDM_SUCCESS); in TEST()
343 ASSERT_EQ(0, memcmp(response->payload + sizeof(response->payload[0]), in TEST()
345 ASSERT_EQ(0, memcmp(response->payload + sizeof(response->payload[0]) + in TEST()
348 ASSERT_EQ(0, memcmp(response->payload + sizeof(response->payload[0]) + in TEST()
351 ASSERT_EQ(0, memcmp(response->payload + sizeof(response->payload[0]) + in TEST()
367 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
371 transferFlag, nullptr, 0, response); in TEST()
374 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
375 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
376 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
377 ASSERT_EQ(response->hdr.command, PLDM_GET_FILE_TABLE); in TEST()
378 ASSERT_EQ(response->payload[0], PLDM_ERROR); in TEST()
567 auto response = in TEST() local
571 response->completion_code = completionCode; in TEST()
572 response->length = htole32(length); in TEST()
580 // Invoke decode the read file response in TEST()
598 auto response = in TEST() local
605 response->completion_code = completionCode; in TEST()
606 response->length = htole32(length); in TEST()
611 // Invoke decode the write file response in TEST()
626 // Bad decode response for read file in TEST()
642 // Bad decode response for write file in TEST()
696 // Good encode response for read file in TEST()
703 auto response = in TEST() local
715 ASSERT_EQ(response->completion_code, PLDM_SUCCESS); in TEST()
716 ASSERT_EQ(le32toh(response->length), length); in TEST()
728 auto response = in TEST() local
739 ASSERT_EQ(response->completion_code, PLDM_SUCCESS); in TEST()
740 ASSERT_EQ(le32toh(response->length), length); in TEST()
826 // Bad encode response for read file in TEST()
844 // Bad encode response for write file in TEST()
916 auto response = reinterpret_cast<pldm_read_write_file_by_type_memory_resp*>( in TEST() local
923 response->completion_code = completionCode; in TEST()
924 response->length = htole32(length); in TEST()
929 // Invoke decode the read/write file response in TEST()
1055 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
1059 response); in TEST()
1062 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
1063 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
1064 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
1065 ASSERT_EQ(response->hdr.command, PLDM_READ_FILE_BY_TYPE_INTO_MEMORY); in TEST()
1068 0, memcmp(response->payload, &completionCode, sizeof(completionCode))); in TEST()
1069 ASSERT_EQ(0, memcmp(response->payload + sizeof(completionCode), &lengthLe, in TEST()
1080 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
1084 0, PLDM_READ_FILE_BY_TYPE_INTO_MEMORY, PLDM_ERROR, length, response); in TEST()
1087 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
1088 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
1089 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
1090 ASSERT_EQ(response->hdr.command, PLDM_READ_FILE_BY_TYPE_INTO_MEMORY); in TEST()
1091 ASSERT_EQ(response->payload[0], PLDM_ERROR); in TEST()
1093 // response is NULL pointer in TEST()
1159 auto response = reinterpret_cast<pldm_new_file_resp*>(responsePtr->payload); in TEST() local
1164 response->completion_code = completionCode; in TEST()
1168 // Invoke decode the read/write file response in TEST()
1255 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
1257 auto rc = encode_new_file_resp(0, completionCode, response); in TEST()
1260 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
1261 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
1262 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
1263 ASSERT_EQ(response->hdr.command, PLDM_NEW_FILE_AVAILABLE); in TEST()
1265 0, memcmp(response->payload, &completionCode, sizeof(completionCode))); in TEST()
1273 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
1276 auto rc = encode_new_file_resp(0, PLDM_ERROR, response); in TEST()
1279 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
1280 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
1281 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
1282 ASSERT_EQ(response->hdr.command, PLDM_NEW_FILE_AVAILABLE); in TEST()
1283 ASSERT_EQ(response->payload[0], PLDM_ERROR); in TEST()
1285 // response is NULL pointer in TEST()
1351 auto response = reinterpret_cast<pldm_read_write_file_by_type_resp*>( in TEST() local
1358 response->completion_code = completionCode; in TEST()
1359 response->length = htole32(length); in TEST()
1364 // Invoke decode the read/write file response in TEST()
1469 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
1472 completionCode, length, response); in TEST()
1475 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
1476 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
1477 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
1478 ASSERT_EQ(response->hdr.command, PLDM_READ_FILE_BY_TYPE); in TEST()
1481 0, memcmp(response->payload, &completionCode, sizeof(completionCode))); in TEST()
1482 ASSERT_EQ(0, memcmp(response->payload + sizeof(completionCode), &lengthLe, in TEST()
1492 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
1496 length, response); in TEST()
1499 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
1500 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
1501 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
1502 ASSERT_EQ(response->hdr.command, PLDM_READ_FILE_BY_TYPE); in TEST()
1503 ASSERT_EQ(response->payload[0], PLDM_ERROR); in TEST()
1505 // response is NULL pointer in TEST()
1569 auto response = reinterpret_cast<pldm_file_ack_resp*>(responsePtr->payload); in TEST() local
1574 response->completion_code = completionCode; in TEST()
1578 // Invoke decode the read/write file response in TEST()
1662 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
1664 auto rc = encode_file_ack_resp(0, completionCode, response); in TEST()
1667 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
1668 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
1669 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
1670 ASSERT_EQ(response->hdr.command, PLDM_FILE_ACK); in TEST()
1672 0, memcmp(response->payload, &completionCode, sizeof(completionCode))); in TEST()
1680 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
1683 auto rc = encode_file_ack_resp(0, PLDM_ERROR, response); in TEST()
1686 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
1687 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
1688 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
1689 ASSERT_EQ(response->hdr.command, PLDM_FILE_ACK); in TEST()
1690 ASSERT_EQ(response->payload[0], PLDM_ERROR); in TEST()
1692 // response is NULL pointer in TEST()
1719 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
1721 auto rc = encode_file_ack_with_meta_data_resp(0, completionCode, response); in TEST()
1724 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
1725 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
1726 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
1727 ASSERT_EQ(response->hdr.command, PLDM_FILE_ACK_WITH_META_DATA); in TEST()
1729 0, memcmp(response->payload, &completionCode, sizeof(completionCode))); in TEST()
1738 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
1741 auto rc = encode_file_ack_with_meta_data_resp(0, PLDM_ERROR, response); in TEST()
1744 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
1745 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
1746 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
1747 ASSERT_EQ(response->hdr.command, PLDM_FILE_ACK_WITH_META_DATA); in TEST()
1748 ASSERT_EQ(response->payload[0], PLDM_ERROR); in TEST()
1750 // response is NULL pointer in TEST()
1766 auto response = reinterpret_cast<pldm_file_ack_with_meta_data_resp*>( in TEST() local
1772 response->completion_code = completionCode; in TEST()
1776 // Invoke decode the read/write file response in TEST()
1972 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
1974 auto rc = encode_new_file_with_metadata_resp(0, completionCode, response); in TEST()
1977 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
1978 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
1979 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
1980 ASSERT_EQ(response->hdr.command, PLDM_NEW_FILE_AVAILABLE_WITH_META_DATA); in TEST()
1982 0, memcmp(response->payload, &completionCode, sizeof(completionCode))); in TEST()
1991 pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data()); in TEST() local
1994 auto rc = encode_new_file_with_metadata_resp(0, PLDM_ERROR, response); in TEST()
1997 ASSERT_EQ(response->hdr.request, PLDM_RESPONSE); in TEST()
1998 ASSERT_EQ(response->hdr.instance_id, 0); in TEST()
1999 ASSERT_EQ(response->hdr.type, PLDM_OEM); in TEST()
2000 ASSERT_EQ(response->hdr.command, PLDM_NEW_FILE_AVAILABLE_WITH_META_DATA); in TEST()
2001 ASSERT_EQ(response->payload[0], PLDM_ERROR); in TEST()
2003 // response is NULL pointer in TEST()
2019 auto response = reinterpret_cast<pldm_file_ack_with_meta_data_resp*>( in TEST() local
2025 response->completion_code = completionCode; in TEST()
2029 // Invoke decode the read/write file response in TEST()