diff options
author | Andi Kleen <ak@linux.intel.com> | 2010-05-20 10:52:25 +0200 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2010-05-20 10:52:25 +0200 |
commit | bc405c55d328a170f068b50fc52930d4795923a4 (patch) | |
tree | 32a40d62858df0c688168fb08fe1362eb8b70ee0 | |
parent | 019904b37bad2af70b188cb2813cd8f10f3ecf12 (diff) | |
download | mce-test-bc405c55d328a170f068b50fc52930d4795923a4.tar.gz |
random_offline: fix endless run without -t argument
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rwxr-xr-x | tsrc/random_offline | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tsrc/random_offline b/tsrc/random_offline index adb68f7..27eef6b 100755 --- a/tsrc/random_offline +++ b/tsrc/random_offline @@ -133,10 +133,12 @@ while true ; do rm offlined fi - ((DIFF = $(date +%s) - $start)) - if [ ! -z "$RUNTIME" -a $DIFF -gt "$RUNTIME" ] ; then - echo time over - break + if [ ! -z "$RUNTIME" ] ; then + ((DIFF = $(date +%s) - $start)) + if [ $DIFF -gt "$RUNTIME" ] ; then + echo time over + break + fi fi done |