From: Masami Hiramatsu <mhiramat@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf tools: replace assignment with comparison on assert check
Date: Tue, 26 Apr 2016 06:33:17 +0900 [thread overview]
Message-ID: <20160426063317.6b2f604d93c6f3d1462dacdf@kernel.org> (raw)
In-Reply-To: <1461419154-16918-1-git-send-email-colin.king@canonical.com>
On Sat, 23 Apr 2016 14:45:54 +0100
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The current assert check is checking an assignment, which will always
> be true. Instead, the assert should be checking if scale is equal
> to 0.122
>
Looks good to me.
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> tools/perf/tests/event_update.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/tests/event_update.c b/tools/perf/tests/event_update.c
> index 012eab5..63ecf21 100644
> --- a/tools/perf/tests/event_update.c
> +++ b/tools/perf/tests/event_update.c
> @@ -30,7 +30,7 @@ static int process_event_scale(struct perf_tool *tool __maybe_unused,
>
> TEST_ASSERT_VAL("wrong id", ev->id == 123);
> TEST_ASSERT_VAL("wrong id", ev->type == PERF_EVENT_UPDATE__SCALE);
> - TEST_ASSERT_VAL("wrong scale", ev_data->scale = 0.123);
> + TEST_ASSERT_VAL("wrong scale", ev_data->scale == 0.123);
> return 0;
> }
>
> --
> 2.7.4
>
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2016-04-25 21:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-23 13:45 Colin King
2016-04-25 21:33 ` Masami Hiramatsu [this message]
2016-04-27 15:32 ` [tip:perf/core] perf tests: Replace " tip-bot for Colin Ian King
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=20160426063317.6b2f604d93c6f3d1462dacdf@kernel.org \
--to=mhiramat@kernel.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=colin.king@canonical.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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
Powered by JetHome