From: Cupertino Miranda Date: Fri, 25 Apr 2025 14:38:25 +0000 (+0200) Subject: benchtest: Correct shell script related to bench-malloc-thread X-Git-Tag: glibc-2.42~285 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77930e0447e0b37a129db0e13c6c6f5e60a3019e;p=thirdparty%2Fglibc.git benchtest: Correct shell script related to bench-malloc-thread This patch changes the shell script that selects which arguments are used for the execution of bench-malloc-thread. The problem seems to have been introduced in commit: commit 2d6427a63cad8056ba6bcaaaa8df21977c8dde3d Author: Wangyang Guo Date: Fri Nov 29 16:05:35 2024 +0800 benchtests: Add calloc test With current condition, the following error "/bin/sh: 3: [[: not found" occurs when executing `make bench BENCHSET="malloc-thread"` and the else path is taken, using incorrect arguments for bench test execution. Error is reproducible in Debian based distros. Reviewed-by: Florian Weimer --- diff --git a/benchtests/Makefile b/benchtests/Makefile index cccee62eb0..74142da326 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -493,7 +493,7 @@ bench-set: $(binaries-benchset) bench-malloc: $(binaries-bench-malloc) for run in $^; do \ echo "$${run}"; \ - if [[ `basename $${run}` =~ bench-[cm]alloc-thread ]]; then \ + if basename $${run} | grep -q "bench-[cm]alloc-thread"; then \ for thr in 1 8 16 32; do \ echo "Running $${run} $${thr}"; \ $(run-bench) $${thr} > $${run}-$${thr}.out; \