@@ -57,6 +57,19 @@ static void test_odp_cpu_model_str(void)
CU_ASSERT(strlen(model) < 127);
}
+static void test_odp_cpu_id_model_str(void)
+{
+ char model[128];
+ int i, cpus;
+
+ cpus = odp_cpu_count();
+ for (i = 0; i < cpus; i++) {
+ snprintf(model, 128, "%s", odp_cpu_id_model_str(i));
+ CU_ASSERT(strlen(model) > 0);
+ CU_ASSERT(strlen(model) < 127);
+ }
+}
+
static void test_odp_sys_page_size(void)
{
uint64_t page;
@@ -82,11 +95,47 @@ static void test_odp_cpu_hz_max(void)
CU_ASSERT(0 < hz);
}
+static void test_odp_cpu_id_hz_max(void)
+{
+ uint64_t hz;
+ int i, cpus;
+
+ cpus = odp_cpu_count();
+ for (i = 0; i < cpus; i++) {
+ hz = odp_cpu_id_hz_max(0);
+ CU_ASSERT(0 < hz);
+ }
+}
+
+static void test_odp_cpu_hz(void)
+{
+ uint64_t hz;
+
+ hz = odp_cpu_hz();
+ CU_ASSERT(0 < hz);
+}
+
+static void test_odp_cpu_id_hz(void)
+{
+ uint64_t hz;
+ int i, cpus;
+
+ cpus = odp_cpu_count();
+ for (i = 0; i < cpus; i++) {
+ hz = odp_cpu_id_hz(i);
+ CU_ASSERT(0 < hz);
+ }
+}
+
CU_TestInfo test_odp_system[] = {
{"odp version", test_odp_version_numbers},
{"odp_cpu_count", test_odp_cpu_count},
{"odp_cpu_hz_max", test_odp_cpu_hz_max},
+ {"odp_cpu_id_hz_max", test_odp_cpu_id_hz_max},
+ {"odp_cpu_hz", test_odp_cpu_hz},
+ {"odp_cpu_id_hz", test_odp_cpu_id_hz},
{"odp_cpu_model_str", test_odp_cpu_model_str},
+ {"odp_cpu_id_model_str", test_odp_cpu_id_model_str},
{"odp_sys_cache_line_size", test_odp_sys_cache_line_size},
{"odp_sys_page_size", test_odp_sys_page_size},
{"odp_sys_huge_page_size", test_odp_sys_huge_page_size},