security/nss/tests/core_watch

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rwxr-xr-x

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 #############################################################
     2 # script to watch for cores during QA runs, so they won't overwrite one
     3 # another
     4 # Not activated for efficiency reasons, and problems on MKS, us
     5 # only when needed and remember to remove afterwards
     6 #############################################################
     8 #############################################################
     9 # to activate put the following into all.sh (after the HOSTDIR 
    10 # has been exported
    11 #############################################################
    12 # sh `dirname $0`/core_watch $HOSTDIR ${HOSTDIR} &    
    13 # CORE_WATCH_PID=$!
    14 # if [ -n "${KILLPIDS}" ]
    15 # then
    16 #     echo $CORE_WATCH_PID >>"${KILLPIDS}"            
    17 # fi
    18 #############################################################
    20 #############################################################
    21 # or put the following into nssqa to watch the whole RESULTDIR
    22 # start it shortly before run_all
    23 #
    24 # NOTE: the more efficient way is above, this is potentially going
    25 # thru 1000ds of files every 30 seconds
    26 #############################################################
    27 # sh `dirname $0`/core_watch $RESULTDIR &    
    28 # echo $! >>"${KILLPIDS}"        #so Exit() can hopefully kill the core_watch
    29 #############################################################
    31 # in both cases remember to kill the process when done, since 
    32 # the PIDs that end up in ${KILLPIDS} might not work for all OS
    33 # something like "kill_by_name core_watch
    35 echo $$ >>"${KILLPIDS}"     #so Exit() can hopefully kill this shell
    36 while [ 1 ]
    37 do
    38     for w in `find $1 -name "core" -print`
    39     do
    40         echo "Found core $w"
    41         mv $w $w.`date +%H%M%S`
    42     done
    43     sleep 30
    44 done

mercurial