public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Namhyung Kim <namhyung@kernel.org>,
	linux-kernel@vger.kernel.org,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 1/2] libperf tests: If a test fails return non-zero
Date: Fri, 15 Jan 2021 09:57:52 +0100	[thread overview]
Message-ID: <20210115085752.GA1476178@krava> (raw)
In-Reply-To: <20210114180250.3853825-1-irogers@google.com>

On Thu, Jan 14, 2021 at 10:02:49AM -0800, Ian Rogers wrote:
> If a test fails return -1 rather than 0. This is consistent with the
> return value in test-cpumap.c
> 
> Signed-off-by: Ian Rogers <irogers@google.com>

for the patchset 

Acked-by: Jiri Olsa <jolsa@redhat.com>

thanks,
jirka

> ---
>  tools/lib/perf/tests/test-cpumap.c    | 2 +-
>  tools/lib/perf/tests/test-evlist.c    | 2 +-
>  tools/lib/perf/tests/test-evsel.c     | 2 +-
>  tools/lib/perf/tests/test-threadmap.c | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/lib/perf/tests/test-cpumap.c b/tools/lib/perf/tests/test-cpumap.c
> index c8d45091e7c2..c70e9e03af3e 100644
> --- a/tools/lib/perf/tests/test-cpumap.c
> +++ b/tools/lib/perf/tests/test-cpumap.c
> @@ -27,5 +27,5 @@ int main(int argc, char **argv)
>  	perf_cpu_map__put(cpus);
>  
>  	__T_END;
> -	return 0;
> +	return tests_failed == 0 ? 0 : -1;
>  }
> diff --git a/tools/lib/perf/tests/test-evlist.c b/tools/lib/perf/tests/test-evlist.c
> index 6d8ebe0c2504..d913241d4135 100644
> --- a/tools/lib/perf/tests/test-evlist.c
> +++ b/tools/lib/perf/tests/test-evlist.c
> @@ -409,5 +409,5 @@ int main(int argc, char **argv)
>  	test_mmap_cpus();
>  
>  	__T_END;
> -	return 0;
> +	return tests_failed == 0 ? 0 : -1;
>  }
> diff --git a/tools/lib/perf/tests/test-evsel.c b/tools/lib/perf/tests/test-evsel.c
> index 135722ac965b..0ad82d7a2a51 100644
> --- a/tools/lib/perf/tests/test-evsel.c
> +++ b/tools/lib/perf/tests/test-evsel.c
> @@ -131,5 +131,5 @@ int main(int argc, char **argv)
>  	test_stat_thread_enable();
>  
>  	__T_END;
> -	return 0;
> +	return tests_failed == 0 ? 0 : -1;
>  }
> diff --git a/tools/lib/perf/tests/test-threadmap.c b/tools/lib/perf/tests/test-threadmap.c
> index 7dc4d6fbedde..384471441b48 100644
> --- a/tools/lib/perf/tests/test-threadmap.c
> +++ b/tools/lib/perf/tests/test-threadmap.c
> @@ -27,5 +27,5 @@ int main(int argc, char **argv)
>  	perf_thread_map__put(threads);
>  
>  	__T_END;
> -	return 0;
> +	return tests_failed == 0 ? 0 : -1;
>  }
> -- 
> 2.30.0.284.gd98b1dd5eaa7-goog
> 


  parent reply	other threads:[~2021-01-15  8:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 18:02 [PATCH 1/2] libperf tests: If a test fails return non-zero Ian Rogers
2021-01-14 18:02 ` [PATCH 2/2] libperf tests: Fail when failing to get a tracepoint id Ian Rogers
2021-01-15  8:57 ` Jiri Olsa [this message]
2021-01-15 18:59 ` [PATCH 1/2] libperf tests: If a test fails return non-zero Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210115085752.GA1476178@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox