On Fri, Nov 06, 2020 at 09:44:07AM +0800, Lin Jiaxin wrote:
On Thu, Nov 05, 2020 at 05:28:43PM +0800, Zhang Yale wrote:
On Thu, Nov 05, 2020 at 05:11:57PM +0800, Lin Jiaxin wrote:
+run_hackbench() +{
- # args: groups number, mode [process/thread], times
- local hackbench_path
- if [ -x /lkp/benchmarks/hackbench-git/hackbench/hackbench ]; then
hackbench_path=/lkp/benchmarks/hackbench-git/hackbench/hackbench
- else
echo "The hackbench executable file cannot be found." && exit 1
- fi
hackbench_path=/lkp/benchmarks/hackbench-git/hackbench/hackbench if ! [[ -x "$hackbench_path" ]]; then echo "The hackbench executable file cannot be found." && exit 1 fi
Thanks, Jiaxin
Good! But 'bin/sh' cannot use '[[ ]]', the way I use can also.
Thanks, Yale
sh should be if [ ! -x "$hackbench_path" ] you can try it
Thanks, Jiaxin
Good!
Thanks, Yale