Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Mar 2015 14:01:35 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r279809 - user/pho/stress2
Message-ID:  <201503091401.t29E1Zhm032453@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Mon Mar  9 14:01:35 2015
New Revision: 279809
URL: https://svnweb.freebsd.org/changeset/base/279809

Log:
  Do not assume we have /dev/tty, check for console write access.
  
  Sponsored by:	 EMC / Isilon storage division

Modified:
  user/pho/stress2/run.sh

Modified: user/pho/stress2/run.sh
==============================================================================
--- user/pho/stress2/run.sh	Mon Mar  9 13:21:00 2015	(r279808)
+++ user/pho/stress2/run.sh	Mon Mar  9 14:01:35 2015	(r279809)
@@ -41,16 +41,19 @@ while getopts a name; do
 done
 shift $(($OPTIND - 1))
 
-. ./default.cfg
 if [ ! -z "$aflag" ]; then
+   . ./default.cfg
    export runRUNTIME=5m
    t1=`date '+%s'`
    while true;do
       for i in `ls *.cfg | grep -v default`; do
          t2=`date '+%s'`
          e=` date -u -j -f '%s' '+%T' $((t2 - t1))`
-         echo "`date '+%Y%m%d %T'` $i, elapsed $e" | tee /dev/tty >> /tmp/all.log
+         echo "`date '+%Y%m%d %T'` $i, elapsed $e"
+         echo "`date '+%Y%m%d %T'` $i, elapsed $e" >> /tmp/all.log
          logger "Starting test $i"
+         [ -w /dev/console ] &&
+            printf "`date '+%Y%m%d %T'` run $i\r\n" > /dev/console
          $0 $i
       done
       [ "`id -un`" = pho ] && ipcs | \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503091401.t29E1Zhm032453>