linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [RESEND] selftest: intel_pstate: debug support message from aperf.c and return value fix.
@ 2018-05-29 17:24 Jeffrin Jose T
  2018-05-29 17:54 ` Shuah Khan
  0 siblings, 1 reply; 2+ messages in thread
From: Jeffrin Jose T @ 2018-05-29 17:24 UTC (permalink / raw)
  To: shuah, kstewart, tglx, pombredanne, gregkh
  Cc: linux-kselftest, linux-kernel, Jeffrin Jose T

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>
---
 tools/testing/selftests/intel_pstate/aperf.c | 6 ++++--
 1 file 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);
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [RESEND] selftest: intel_pstate: debug support message from aperf.c and return value fix.
  2018-05-29 17:24 [PATCH] [RESEND] selftest: intel_pstate: debug support message from aperf.c and return value fix Jeffrin Jose T
@ 2018-05-29 17:54 ` Shuah Khan
  0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2018-05-29 17:54 UTC (permalink / raw)
  To: Jeffrin Jose T, kstewart, tglx, pombredanne, gregkh
  Cc: linux-kselftest, linux-kernel, Shuah Khan

On 05/29/2018 11:24 AM, Jeffrin Jose T wrote:
> 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>
> ---
>  tools/testing/selftests/intel_pstate/aperf.c | 6 ++++--
>  1 file 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);
> 

Thanks, Applied to linux-kselftest next for 4.18-rc1

-- Shuah

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-29 17:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-29 17:24 [PATCH] [RESEND] selftest: intel_pstate: debug support message from aperf.c and return value fix Jeffrin Jose T
2018-05-29 17:54 ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).