[UTC/ITC][Non-ACR] Update test-case for resource_monitor_get_value_int 26/297626/2
authorDongwoo Lee <dwoo08.lee@samsung.com>
Tue, 22 Aug 2023 04:50:37 +0000 (13:50 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Wed, 23 Aug 2023 05:43:30 +0000 (14:43 +0900)
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 <dwoo08.lee@samsung.com>
src/itc/resource-monitor/ITs-resource-monitor.c
src/utc/resource-monitor/utc-resource-monitor.c

index 34830751418175555c98effa9c97183f3448442e..421c7ae558fdd4c14888ba2d58f1dc854f7082d6 100755 (executable)
@@ -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));
 
index 7a690aa11aa21ae03cf9a3fc310254f322726bc6..032bf31d49853e8567e0ff891054f851d2af601d 100644 (file)
@@ -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);