1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
13 #include <rte_power.h>
19 enum power_management_env env;
21 /* Test setting an invalid environment */
22 ret = rte_power_set_env(PM_ENV_NOT_SET);
24 printf("Unexpectedly succeeded on setting an invalid environment\n");
28 /* Test that the environment has not been set */
29 env = rte_power_get_env();
30 if (env != PM_ENV_NOT_SET) {
31 printf("Unexpectedly got a valid environment configuration\n");
35 /* verify that function pointers are NULL */
36 if (rte_power_freqs != NULL) {
37 printf("rte_power_freqs should be NULL, environment has not been "
41 if (rte_power_get_freq != NULL) {
42 printf("rte_power_get_freq should be NULL, environment has not been "
46 if (rte_power_set_freq != NULL) {
47 printf("rte_power_set_freq should be NULL, environment has not been "
51 if (rte_power_freq_up != NULL) {
52 printf("rte_power_freq_up should be NULL, environment has not been "
56 if (rte_power_freq_down != NULL) {
57 printf("rte_power_freq_down should be NULL, environment has not been "
61 if (rte_power_freq_max != NULL) {
62 printf("rte_power_freq_max should be NULL, environment has not been "
66 if (rte_power_freq_min != NULL) {
67 printf("rte_power_freq_min should be NULL, environment has not been "
71 rte_power_unset_env();
74 rte_power_unset_env();
78 REGISTER_TEST_COMMAND(power_autotest, test_power);