Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jeffrin Jose T and committed by
Shuah Khan (Samsung OSG)
d0103c5c adb31be4

+4 -2
+4 -2
tools/testing/selftests/intel_pstate/aperf.c
··· 9 9 #include <sys/timeb.h> 10 10 #include <sched.h> 11 11 #include <errno.h> 12 + #include <string.h> 13 + #include "../kselftest.h" 12 14 13 15 void usage(char *name) { 14 16 printf ("Usage: %s cpunum\n", name); ··· 43 41 fd = open(msr_file_name, O_RDONLY); 44 42 45 43 if (fd == -1) { 46 - perror("Failed to open"); 47 - return 1; 44 + printf("/dev/cpu/%d/msr: %s\n", cpu, strerror(errno)); 45 + return KSFT_SKIP; 48 46 } 49 47 50 48 CPU_ZERO(&cpuset);