aboutsummaryrefslogtreecommitdiffstats
path: root/test/test/test_power_kvm_vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test/test_power_kvm_vm.c')
-rw-r--r--test/test/test_power_kvm_vm.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/test/test_power_kvm_vm.c b/test/test/test_power_kvm_vm.c
index 91b31c44..bce706de 100644
--- a/test/test/test_power_kvm_vm.c
+++ b/test/test/test_power_kvm_vm.c
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2010-2014 Intel Corporation
+ * Copyright(c) 2010-2018 Intel Corporation
*/
#include <stdio.h>
@@ -98,7 +98,8 @@ test_power_kvm_vm(void)
printf("Cannot initialise power management for lcore %u, this "
"may occur if environment is not configured "
"correctly(KVM VM) or operating in another valid "
- "Power management environment\n", TEST_POWER_VM_LCORE_ID);
+ "Power management environment\n",
+ TEST_POWER_VM_LCORE_ID);
rte_power_unset_env();
return -1;
}
@@ -175,6 +176,22 @@ test_power_kvm_vm(void)
goto fail_all;
}
+ /* Test KVM_VM Enable Turbo of valid core */
+ ret = rte_power_freq_enable_turbo(TEST_POWER_VM_LCORE_ID);
+ if (ret == -1) {
+ printf("rte_power_freq_enable_turbo failed on valid lcore"
+ "%u\n", TEST_POWER_VM_LCORE_ID);
+ goto fail_all;
+ }
+
+ /* Test KVM_VM Disable Turbo of valid core */
+ ret = rte_power_freq_disable_turbo(TEST_POWER_VM_LCORE_ID);
+ if (ret == -1) {
+ printf("rte_power_freq_disable_turbo failed on valid lcore"
+ "%u\n", TEST_POWER_VM_LCORE_ID);
+ goto fail_all;
+ }
+
/* Test frequency up of valid lcore */
ret = rte_power_freq_up(TEST_POWER_VM_LCORE_ID);
if (ret != 1) {