diff --git a/tools/testing/selftests/intel_pstate/aperf.c b/tools/testing/selftests/intel_pstate/aperf.c index d21edea9c5601f98ba32325294ed813c597d8545..f6cd03a87493c584fea5bc9cb1b3283d257061c8 100644 --- a/tools/testing/selftests/intel_pstate/aperf.c +++ b/tools/testing/selftests/intel_pstate/aperf.c @@ -9,6 +9,8 @@ #include #include #include +#include +#include "../kselftest.h" void usage(char *name) { printf ("Usage: %s cpunum\n", name); @@ -41,8 +43,8 @@ int main(int argc, char **argv) { fd = open(msr_file_name, O_RDONLY); if (fd == -1) { - perror("Failed to open"); - return 1; + printf("/dev/cpu/%d/msr: %s\n", cpu, strerror(errno)); + return KSFT_SKIP; } CPU_ZERO(&cpuset);