From: <ale...@or...> - 2013-12-13 09:58:52
|
Hi! On 12/12/2013 09:38 PM, ch...@su... wrote: > Hi! > Whole patchset pushed, thanks. > Thank you! There's one more patch left: acpi-cpufreq test. > Hi! >> +static void setup(void) >> +{ >> + tst_require_root(NULL); >> + >> + if (tst_kvercmp(3, 7, 0) < 0) { >> + tst_brkm(TCONF, NULL, >> + "disable overclocking required Linux 3.7+"); >> + } > I wonder if we need to compare kernel version, becasuse we disable the > test if the boost sysfs file is missing anyway... > > If you agree to remove it I will do that while applying the patch, no > need to send a new version. > >> + if (access(boost, R_OK | W_OK)) { >> + tst_brkm(TCONF, NULL, >> + "acpi-cpufreq not loaded or overclock not supported"); >> + } >> + >> + tst_sig(FORK, DEF_HANDLER, cleanup); >> + >> + SAFE_FILE_SCANF(NULL, boost, "%d", &boost_value); >> + >> + SAFE_FILE_SCANF(NULL, up_limit, "%d", &threshold); >> + >> + /* change cpu0 scaling governor */ >> + SAFE_FILE_SCANF(NULL, governor, "%s", governor_name); >> + SAFE_FILE_PRINTF(cleanup, governor, "%s", "userspace"); >> + >> + /* use only cpu0 */ >> + cpu_set_t set; >> + CPU_ZERO(&set); >> + CPU_SET(0, &set); >> + if (sched_setaffinity(0, sizeof(cpu_set_t), &set) < 0) >> + tst_brkm(TBROK | TERRNO, cleanup, "failed to set CPU0"); >> + >> + SAFE_FILE_PRINTF(cleanup, up_limit, "11"); >> +} > Otherwise it looks good but has to wait for the first ACPI patch. > > -- Cyril Hrubis ch...@su... |