Whamcloud - gitweb
b=14512
[fs/lustre-release.git] / lustre / tests / runtests
index 42bc087..31571f3 100755 (executable)
@@ -24,14 +24,8 @@ fail() {
        exit $RC
 }
 
-log() {
-       echo "$*"
-       lctl mark "$*"
-}
-
-
 ERROR=
-SRC=/etc
+SRC="/etc /bin"
 [ "$COUNT" ] || COUNT=1000
 
 [ "$MCREATE" ] || MCREATE=mcreate
@@ -46,11 +40,7 @@ while [ "$1" ]; do
        shift
 done
 
-mounted_lustre_filesystems() {
-       awk '($3 ~ "lustre" && $1 ~ ":") { print $2 }' /proc/mounts
-}
-
-MOUNTED="`mounted_lustre_filesystems`"
+MOUNTED=$(mounted_lustre_filesystems | head -1)
 if [ -z "$MOUNTED" ]; then
        formatall
        setupall
@@ -100,7 +90,9 @@ mkdir $DST || fail "can't mkdir $DST" 10
 
 # ok, that hopefully worked, so let's do a little more, with files that
 # haven't changed in the last day (hopefully they don't change during test)
-FILES=`find $SRC -type f -mtime +1 -ctime +1 | head -n $COUNT`
+FILES=`find $SRC -type f -mtime +1 | head -n $COUNT`
+[ -z "$FILES" ] && fail "No unchanged files - is $SRC a new dir?"
+
 log "copying files from $SRC to $DST$SRC at `date`"
 tar cf - $FILES | tar xvf - -C $DST > /dev/null || fail "copying $SRC" 11