[next,2/3] perf tests make: Remove the last egrep call, use 'grep -E' instead

Message ID ZUEdtblE8qDAQkBK@kernel.org
State New
Headers
Series None |

Commit Message

Arnaldo Carvalho de Melo Oct. 31, 2023, 3:31 p.m. UTC
  One last case, caught while testing with amazonlinux:2, centos:stream,
etc:

   4     7.28 amazonlinux:2                 : FAIL egrep: warning: egrep is obsolescent; using grep -E
   8    13.87 centos:stream                 : FAIL egrep: warning: egrep is obsolescent; using grep -E

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Guilherme Amadio <amadio@gentoo.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Guilherme Amadio Nov. 1, 2023, 3:35 p.m. UTC | #1
Hi Arnaldo,

On Tue, Oct 31, 2023 at 12:31:01PM -0300, Arnaldo Carvalho de Melo wrote:
> One last case, caught while testing with amazonlinux:2, centos:stream,
> etc:
> 
>    4     7.28 amazonlinux:2                 : FAIL egrep: warning: egrep is obsolescent; using grep -E
>    8    13.87 centos:stream                 : FAIL egrep: warning: egrep is obsolescent; using grep -E
> 
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Guilherme Amadio <amadio@gentoo.org>

Looks good.

Reviewed-by: Guilherme Amadio <amadio@gentoo.org>

Cheers,
-Guilherme

> Cc: Ian Rogers <irogers@google.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/perf/tests/make | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/tests/make b/tools/perf/tests/make
> index d9945ed25bc5ae96..8a4da7eb637a8abd 100644
> --- a/tools/perf/tests/make
> +++ b/tools/perf/tests/make
> @@ -183,7 +183,7 @@ run += make_install_prefix_slash
>  # run += make_install_pdf
>  run += make_minimal
>  
> -old_libbpf := $(shell echo '\#include <bpf/libbpf.h>' | $(CC) -E -dM -x c -| egrep -q "define[[:space:]]+LIBBPF_MAJOR_VERSION[[:space:]]+0{1}")
> +old_libbpf := $(shell echo '\#include <bpf/libbpf.h>' | $(CC) -E -dM -x c -| grep -q -E "define[[:space:]]+LIBBPF_MAJOR_VERSION[[:space:]]+0{1}")
>  
>  ifneq ($(old_libbpf),)
>  run += make_libbpf_dynamic
> -- 
> 2.41.0
>
  

Patch

diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index d9945ed25bc5ae96..8a4da7eb637a8abd 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -183,7 +183,7 @@  run += make_install_prefix_slash
 # run += make_install_pdf
 run += make_minimal
 
-old_libbpf := $(shell echo '\#include <bpf/libbpf.h>' | $(CC) -E -dM -x c -| egrep -q "define[[:space:]]+LIBBPF_MAJOR_VERSION[[:space:]]+0{1}")
+old_libbpf := $(shell echo '\#include <bpf/libbpf.h>' | $(CC) -E -dM -x c -| grep -q -E "define[[:space:]]+LIBBPF_MAJOR_VERSION[[:space:]]+0{1}")
 
 ifneq ($(old_libbpf),)
 run += make_libbpf_dynamic