Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@canonical.com>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.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@redhat.com>

authored by

Colin Ian King and committed by
Arnaldo Carvalho de Melo
8daef508 3b556bce

+1 -1
+1 -1
tools/perf/tests/event_update.c
··· 30 30 31 31 TEST_ASSERT_VAL("wrong id", ev->id == 123); 32 32 TEST_ASSERT_VAL("wrong id", ev->type == PERF_EVENT_UPDATE__SCALE); 33 - TEST_ASSERT_VAL("wrong scale", ev_data->scale = 0.123); 33 + TEST_ASSERT_VAL("wrong scale", ev_data->scale == 0.123); 34 34 return 0; 35 35 } 36 36