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] [day] [month] [year] [list]
Message-ID: <tip-8daef508b0a144970e5cbc587525c351663fec63@git.kernel.org>
Date:	Wed, 27 Apr 2016 08:32:50 -0700
From:	tip-bot for Colin Ian King <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	alexander.shishkin@...ux.intel.com, mingo@...nel.org,
	hpa@...or.com, tglx@...utronix.de, linux-kernel@...r.kernel.org,
	jolsa@...nel.org, peterz@...radead.org, colin.king@...onical.com,
	acme@...hat.com, mhiramat@...nel.org
Subject: [tip:perf/core] perf tests: Replace assignment with comparison on
 assert check

Commit-ID:  8daef508b0a144970e5cbc587525c351663fec63
Gitweb:     http://git.kernel.org/tip/8daef508b0a144970e5cbc587525c351663fec63
Author:     Colin Ian King <colin.king@...onical.com>
AuthorDate: Sat, 23 Apr 2016 14:45:54 +0100
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 25 Apr 2016 20:24:26 -0300

perf tests: Replace assignment with comparison on assert check

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

Signed-off-by: Colin Ian King <colin.king@...onical.com>
Reviewed-by: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/1461419154-16918-1-git-send-email-colin.king@canonical.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.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;
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ