All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.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 15:59:20 -0300	[thread overview]
Message-ID: <20210115185920.GD457607@kernel.org> (raw)
In-Reply-To: <20210114180250.3853825-1-irogers@google.com>

Em Thu, Jan 14, 2021 at 10:02:49AM -0800, Ian Rogers escreveu:
> If a test fails return -1 rather than 0. This is consistent with the
> return value in test-cpumap.c

Thanks, applied both patches.

- Arnaldo

 
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  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
> 

-- 

- Arnaldo

      parent reply	other threads:[~2021-01-15 18: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 ` [PATCH 1/2] libperf tests: If a test fails return non-zero Jiri Olsa
2021-01-15 18:59 ` Arnaldo Carvalho de Melo [this message]

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=20210115185920.GD457607@kernel.org \
    --to=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.