Whamcloud - gitweb
LU-5473 tests: sanity/51b Account for ZFS inode size
[fs/lustre-release.git] / lustre / tests / racer / file_rm.sh
index 41d3d62..dd10cc9 100755 (executable)
@@ -1,10 +1,11 @@
 #!/bin/bash
+trap 'kill $(jobs -p)' EXIT
 
 DIR=$1
 MAX=$2
 
-while /bin/true ; do 
-    file=$(($RANDOM%$MAX))
+while /bin/true ; do
+    file=$((RANDOM % MAX))
     rm -rf $DIR/$file 2> /dev/null
     sleep 1
 done