summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/intel_pstate
diff options
context:
space:
mode:
authorJeffrin Jose T <ahiliation@gmail.com>2018-05-29 22:54:36 +0530
committerShuah Khan (Samsung OSG) <shuah@kernel.org>2018-05-30 15:29:07 -0600
commitd0103c5cb635f7ea3bf148d37bcf392fd228f0a5 (patch)
tree53acb8847525d8b80845e30fc1728e39fb01a711 /tools/testing/selftests/intel_pstate
parentadb31be4424cc22f328e6664280f5c4e4902aaf3 (diff)
selftest: intel_pstate: debug support message from aperf.c and return value
Additional message along with an error message which is more verbose for debug support from aperf.c and updated with the new return value "KSFT_SKIP". Signed-off-by: Jeffrin Jose T [Rajagiri SET] <ahiliation@gmail.com> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Diffstat (limited to 'tools/testing/selftests/intel_pstate')
-rw-r--r--tools/testing/selftests/intel_pstate/aperf.c6
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 @@
#include <sys/timeb.h>
#include <sched.h>
#include <errno.h>
+#include <string.h>
+#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);