From: Dongwoo Lee Date: Tue, 22 Aug 2023 04:50:37 +0000 (+0900) Subject: [UTC/ITC][Non-ACR] Update test-case for resource_monitor_get_value_int X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F26%2F297626%2F2;p=test%2Ftct%2Fnative%2Fapi.git [UTC/ITC][Non-ACR] Update test-case for resource_monitor_get_value_int To break dependency on daemon HAL or kernel attribute node, the test-case is modified to use the standard attribute of the default resource. Change-Id: I1d4a824bfef8f00ca439881948d14f7b1e1eca4a Signed-off-by: Dongwoo Lee --- diff --git a/src/itc/resource-monitor/ITs-resource-monitor.c b/src/itc/resource-monitor/ITs-resource-monitor.c index 348307514..421c7ae55 100755 --- a/src/itc/resource-monitor/ITs-resource-monitor.c +++ b/src/itc/resource-monitor/ITs-resource-monitor.c @@ -600,10 +600,10 @@ int ITc_resource_monitor_get_value_int_p(void) int nRet = 0; int resource_id, count; int32_t value; - int resource_type = RESOURCE_MONITOR_TYPE_CPU; + int resource_type = RESOURCE_MONITOR_TYPE_SYSTEM; struct resource_attr_info attrs[] = { { - .attr_id = RESOURCE_MONITOR_CPU_ATTR_CUR_FREQ, + .attr_id = RESOURCE_MONITOR_SYSTEM_ATTR_ONLINE_CPU, .attr_type = DATA_TYPE_INT, }, }; @@ -620,10 +620,6 @@ int ITc_resource_monitor_get_value_int_p(void) FPRINTF("[Line : %d][%s] resource_monitor_create_resource api failed.\\n", __LINE__, API_NAMESPACE); return 1; } - - nRet = resource_monitor_set_resource_ctrl(g_nMonitorId, resource_id, RESOURCE_MONITOR_CPU_CTRL_CLUSTER_ID, i); - PRINT_RESULT_CLEANUP(RESOURCE_MONITOR_ERROR_NONE, nRet, "resource_monitor_set_resource_ctrl", ResourceMonitorGetError(nRet), resource_monitor_delete_resource(g_nMonitorId, resources[i].resource_id)); - nRet = Resource_monitor_set_resource_attr(resource_id, 1, attrs); PRINT_RESULT_CLEANUP(RESOURCE_MONITOR_ERROR_NONE, nRet, "Resource_monitor_set_resource_attr", ResourceMonitorGetError(nRet), resource_monitor_delete_resource(g_nMonitorId, resources[i].resource_id)); diff --git a/src/utc/resource-monitor/utc-resource-monitor.c b/src/utc/resource-monitor/utc-resource-monitor.c index 7a690aa11..032bf31d4 100644 --- a/src/utc/resource-monitor/utc-resource-monitor.c +++ b/src/utc/resource-monitor/utc-resource-monitor.c @@ -633,10 +633,10 @@ int utc_resource_monitor_get_value_int_p(void) { int monitor_id, resource_id, ret, count; int32_t value; - int resource_type = RESOURCE_MONITOR_TYPE_CPU; + int resource_type = RESOURCE_MONITOR_TYPE_SYSTEM; struct resource_attr_info attrs[] = { { - .attr_id = RESOURCE_MONITOR_CPU_ATTR_CUR_FREQ, + .attr_id = RESOURCE_MONITOR_SYSTEM_ATTR_ONLINE_CPU, .attr_type = DATA_TYPE_INT, }, }; @@ -651,11 +651,7 @@ int utc_resource_monitor_get_value_int_p(void) resource_id = resource_monitor_create_resource(monitor_id, resource_type); assert_geq(resource_id, 0); - ret = resource_monitor_set_resource_ctrl(monitor_id, resource_id, - RESOURCE_MONITOR_CPU_CTRL_CLUSTER_ID, i); - assert_eq(ret, 0); - - ret = __resource_monitor_set_resource_attr(monitor_id, resource_id, 1, attrs); + __resource_monitor_set_resource_attr(monitor_id, resource_id, 1, attrs); ret = resource_monitor_update(monitor_id); assert_eq(ret, 0);