diff options
-rw-r--r-- | tools/testing/selftests/intel_pstate/aperf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/testing/selftests/intel_pstate/aperf.c b/tools/testing/selftests/intel_pstate/aperf.c index d21edea9c560..f6cd03a87493 100644 --- a/tools/testing/selftests/intel_pstate/aperf.c +++ b/tools/testing/selftests/intel_pstate/aperf.c | |||
@@ -9,6 +9,8 @@ | |||
9 | #include <sys/timeb.h> | 9 | #include <sys/timeb.h> |
10 | #include <sched.h> | 10 | #include <sched.h> |
11 | #include <errno.h> | 11 | #include <errno.h> |
12 | #include <string.h> | ||
13 | #include "../kselftest.h" | ||
12 | 14 | ||
13 | void usage(char *name) { | 15 | void usage(char *name) { |
14 | printf ("Usage: %s cpunum\n", name); | 16 | printf ("Usage: %s cpunum\n", name); |
@@ -41,8 +43,8 @@ int main(int argc, char **argv) { | |||
41 | fd = open(msr_file_name, O_RDONLY); | 43 | fd = open(msr_file_name, O_RDONLY); |
42 | 44 | ||
43 | if (fd == -1) { | 45 | if (fd == -1) { |
44 | perror("Failed to open"); | 46 | printf("/dev/cpu/%d/msr: %s\n", cpu, strerror(errno)); |
45 | return 1; | 47 | return KSFT_SKIP; |
46 | } | 48 | } |
47 | 49 | ||
48 | CPU_ZERO(&cpuset); | 50 | CPU_ZERO(&cpuset); |