set the default gov not the desired gov in tests

This commit is contained in:
Marc Di Luzio 2019-03-08 11:55:41 +00:00
parent b6da948ca2
commit 0efd65fc78

View File

@ -319,12 +319,11 @@ static int run_cpu_governor_tests(struct GameModeConfig *config)
strcpy(desiredgov, "performance"); strcpy(desiredgov, "performance");
char defaultgov[CONFIG_VALUE_MAX] = { 0 }; char defaultgov[CONFIG_VALUE_MAX] = { 0 };
config_get_default_governor(config, defaultgov);
if (desiredgov[0] == '\0') { if (defaultgov[0] == '\0') {
const char *currentgov = get_gov_state(); const char *currentgov = get_gov_state();
if (currentgov) { if (currentgov) {
strncpy(desiredgov, currentgov, CONFIG_VALUE_MAX); strncpy(defaultgov, currentgov, CONFIG_VALUE_MAX);
} else { } else {
LOG_ERROR( LOG_ERROR(
"Could not get current CPU governor state, this indicates an error! See rest " "Could not get current CPU governor state, this indicates an error! See rest "