kernel/patches/0309-perf-expr-Test-parsing-of-floating-point-numbers.patch
2023-11-10 14:47:39 +08:00

56 lines
1.9 KiB
Diff

From b79ccba00ace3e843109aad2133e35c187827795 Mon Sep 17 00:00:00 2001
From: Ian Rogers <irogers@google.com>
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 <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Clarke <pc@us.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200513062752.3681-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: hongrongxuan <hongrongxuan@huawei.com>
---
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