Whamcloud - gitweb
LU-3665 tests: Cleanup echo client after obdfilter-survey
[fs/lustre-release.git] / lustre / tests / racer / file_rename.sh
index a4ef5b8..b5ea2d1 100755 (executable)
@@ -1,9 +1,10 @@
 #!/bin/bash
+trap 'kill $(jobs -p)' EXIT
 
 DIR=$1
 MAX=$2
 
-while /bin/true ; do 
+while /bin/true ; do
     file=$((RANDOM % MAX))
     new_file=$((RANDOM % MAX))
     mv $DIR/$file $DIR/$new_file 2> /dev/null