lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87627kay0u.fsf@sejong.aot.lge.com>
Date:	Wed, 12 Sep 2012 09:24:33 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...radead.org>
Cc:	Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	David Ahern <dsahern@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>, Mike Galbraith <efault@....de>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 01/18] perf test: Remove die() calls

Hi, Arnaldo

On Tue, 11 Sep 2012 20:52:53 -0300, Arnaldo Carvalho de Melo wrote:
> From: Arnaldo Carvalho de Melo <acme@...hat.com>
>
> Just use pr_err() + return -1 and let the other tests run as well and
> then the perf's main() exit doing whatever it needs.
[snip]
> diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c
> index cf33e50..6ae102e 100644
> --- a/tools/perf/builtin-test.c
> +++ b/tools/perf/builtin-test.c
> @@ -1023,14 +1023,16 @@ static int __test__rdpmc(void)
>  
>  	fd = sys_perf_event_open(&attr, 0, -1, -1, 0);
>  	if (fd < 0) {
> -		die("Error: sys_perf_event_open() syscall returned "
> -		    "with %d (%s)\n", fd, strerror(errno));
> +		pr_debug("Error: sys_perf_event_open() syscall returned "
> +			 "with %d (%s)\n", fd, strerror(errno));

s/pr_debug/pr_err/ ?

Otherwise the message will not be shown unless -v option is given
- and it's not sync with the changelog ;-)


> +		return -1;
>  	}
>  
>  	addr = mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, 0);
>  	if (addr == (void *)(-1)) {
> -		die("Error: mmap() syscall returned "
> -		    "with (%s)\n", strerror(errno));
> +		pr_debug("Error: mmap() syscall returned with (%s)\n",
> +			 strerror(errno));

Ditto.

Thanks,
Namhyung


> +		goto out_close;
>  	}
>  
>  	for (n = 0; n < 6; n++) {
> @@ -1051,9 +1053,9 @@ static int __test__rdpmc(void)
>  	}
>  
>  	munmap(addr, page_size);
> -	close(fd);
> -
>  	pr_debug("   ");
> +out_close:
> +	close(fd);
>  
>  	if (!delta_sum)
>  		return -1;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ