From b79ccba00ace3e843109aad2133e35c187827795 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Tue, 12 May 2020 23:27:51 -0700 Subject: [PATCH 192/201] perf expr: Test parsing of floating point numbers mainline inclusion from mainline-v5.8-rc1 commit 63f11355a6ee7febc7b3fdad8a7009c0e16748df category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8C0CX Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=63f11355a6ee7febc7b3fdad8a7009c0e16748df ---------------------------------------------------------------------- Add test for fix in: commit 5741da3dee4c ("perf expr: Parse numbers as doubles") Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200513062752.3681-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: hongrongxuan --- tools/perf/tests/expr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c index 992b7546b9da..9f7d8ee21d89 100644 --- a/tools/perf/tests/expr.c +++ b/tools/perf/tests/expr.c @@ -36,6 +36,7 @@ int test__expr(struct test *t __maybe_unused, int subtest __maybe_unused) ret |= test(&ctx, "min(1,2) + 1", 2); ret |= test(&ctx, "max(1,2) + 1", 3); ret |= test(&ctx, "1+1 if 3*4 else 0", 2); + ret |= test(&ctx, "1.1 + 2.1", 3.2); if (ret) return ret; -- 2.27.0