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 <wangyang.guo@intel.com>
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 <fweimer@redhat.com>
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; \