mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
tests/qtest/ufs-test: Add test code for the temperature feature
This commit adds tests to verify the correctness of query attribute results related to the temperature feature. It ensures that querying temperature attributes returns expected values. Signed-off-by: Keoseong Park <keosung.park@samsung.com> Acked-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com> Message-ID: <20250225064243epcms2p8b7b59e7bf381bd68d30a6f59b40dea9f@epcms2p8> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
07b12aae50
commit
5f6cb3ca97
1 changed files with 24 additions and 0 deletions
|
@ -784,6 +784,30 @@ static void ufstest_query_attr_request(void *obj, void *data,
|
|||
g_assert_cmpuint(rsp_upiu.header.response, ==, UFS_COMMAND_RESULT_SUCCESS);
|
||||
g_assert_cmpuint(rsp_upiu.qr.value, ==, cpu_to_be32(0x00));
|
||||
|
||||
ocs = ufs_send_query(ufs, UFS_UPIU_QUERY_FUNC_STANDARD_READ_REQUEST,
|
||||
UFS_UPIU_QUERY_OPCODE_READ_ATTR,
|
||||
UFS_QUERY_ATTR_IDN_CASE_ROUGH_TEMP, 0, 0, 0,
|
||||
&rsp_upiu);
|
||||
g_assert_cmpuint(ocs, ==, UFS_OCS_SUCCESS);
|
||||
g_assert_cmpuint(rsp_upiu.header.response, ==, UFS_COMMAND_RESULT_SUCCESS);
|
||||
g_assert_cmpuint(rsp_upiu.qr.value, ==, cpu_to_be32(0x00));
|
||||
|
||||
ocs = ufs_send_query(ufs, UFS_UPIU_QUERY_FUNC_STANDARD_READ_REQUEST,
|
||||
UFS_UPIU_QUERY_OPCODE_READ_ATTR,
|
||||
UFS_QUERY_ATTR_IDN_HIGH_TEMP_BOUND, 0, 0, 0,
|
||||
&rsp_upiu);
|
||||
g_assert_cmpuint(ocs, ==, UFS_OCS_SUCCESS);
|
||||
g_assert_cmpuint(rsp_upiu.header.response, ==, UFS_COMMAND_RESULT_SUCCESS);
|
||||
g_assert_cmpuint(rsp_upiu.qr.value, ==, cpu_to_be32(160));
|
||||
|
||||
ocs = ufs_send_query(ufs, UFS_UPIU_QUERY_FUNC_STANDARD_READ_REQUEST,
|
||||
UFS_UPIU_QUERY_OPCODE_READ_ATTR,
|
||||
UFS_QUERY_ATTR_IDN_LOW_TEMP_BOUND, 0, 0, 0,
|
||||
&rsp_upiu);
|
||||
g_assert_cmpuint(ocs, ==, UFS_OCS_SUCCESS);
|
||||
g_assert_cmpuint(rsp_upiu.header.response, ==, UFS_COMMAND_RESULT_SUCCESS);
|
||||
g_assert_cmpuint(rsp_upiu.qr.value, ==, cpu_to_be32(60));
|
||||
|
||||
/* Write Writable Attributes & Read Again */
|
||||
ocs = ufs_send_query(ufs, UFS_UPIU_QUERY_FUNC_STANDARD_WRITE_REQUEST,
|
||||
UFS_UPIU_QUERY_OPCODE_WRITE_ATTR,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue