Whamcloud - gitweb
LU-7323 test: Unknown symbol mb_cache_create (err 0)" on RHEL7
[fs/lustre-release.git] / lustre / tests / racer / file_exec.sh
1 #!/bin/bash
2 trap 'kill $(jobs -p)' EXIT
3
4 DIR=$1
5 MAX=$2
6 PROG=/bin/sleep
7
8 while /bin/true ; do
9     file=$((RANDOM % MAX))
10     cp $PROG $DIR/$file > /dev/null 2>&1
11     $DIR/$file 0.$((RANDOM % 5 + 1)) 2> /dev/null
12     sleep $((RANDOM % 3))
13 done
14