int attr_type;
};
-class ResourceInfo {
+class PhysicalResourceInfo {
public:
const int type;
const char *name;
const int num_attrs;
vector<struct resource_attr_info> attrs;
- ResourceInfo(
+ PhysicalResourceInfo(
const int type_,
const char *name_,
int mon_id_,
attrs(attrs_) {}
};
-class EachResourceMonitorTest : public ::testing::TestWithParam<ResourceInfo> {};
+class PhysicalResourceMonitorTest : public ::testing::TestWithParam<PhysicalResourceInfo> {};
-INSTANTIATE_TEST_CASE_P (ResourceMonitorTest, EachResourceMonitorTest,
+INSTANTIATE_TEST_CASE_P (ResourceMonitorTest, PhysicalResourceMonitorTest,
::testing::Values (
- ResourceInfo (
+ PhysicalResourceInfo (
RESOURCE_TYPE_CPU,
"RESOURCE_TYPE_CPU",
-1,
}
),
- ResourceInfo (
+ PhysicalResourceInfo (
RESOURCE_TYPE_BUS,
"RESOURCE_TYPE_BUS",
-1,
}
),
- ResourceInfo (
+ PhysicalResourceInfo (
RESOURCE_TYPE_GPU,
"RESOURCE_TYPE_GPU",
-1,
)
));
-TEST_P(EachResourceMonitorTest, pass_resource_monitor_create_resource_and_delete)
+TEST_P(PhysicalResourceMonitorTest, pass_resource_monitor_create_resource_and_delete)
{
auto res = GetParam();
int i;
pass_resource_monitor_exit(res.mon_id);
}
-TEST_P(EachResourceMonitorTest, pass_resource_monitor_set_resource_ctrl)
+TEST_P(PhysicalResourceMonitorTest, pass_resource_monitor_set_resource_ctrl)
{
auto res = GetParam();
int i;
return ret;
}
-TEST_P(EachResourceMonitorTest, pass_resource_monitor_set_resource_attr)
+TEST_P(PhysicalResourceMonitorTest, pass_resource_monitor_set_resource_attr)
{
auto res = GetParam();
int i;
return err_count ? -EINVAL : 0;
}
-TEST_P(EachResourceMonitorTest, pass_resource_monitor_get_value)
+TEST_P(PhysicalResourceMonitorTest, pass_resource_monitor_get_value)
{
auto res = GetParam();
int i;