Index: qa/312 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ qa/312 2007-03-07 10:07:42.448443000 +1100 @@ -0,0 +1,42 @@ +#! /bin/sh +# PCP QA Test No. 312 +# sginap use in pmie with large deltas on 32 bit platforms can +# wrap and cause a sleep with negative size which, funnily enough, +# also causes multiple immediate rule evaluations (which we can +# now test for, to detect pmie brokenness). +# +# Copyright (c) 2007 Nathan Scott. +# +# creator +owner=nathans + +seq=`basename $0` +echo "QA output created by $seq" + +# get standard environment, filters and checks +. ./common.product +. ./common.filter +. ./common.check + +tmp=/tmp/$$ +here=`pwd` +sudo=$here/sudo +status=1 # failure is the default! +$sudo rm -rf $tmp.* +trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 + +# real QA test starts here +echo 'load = sample.load;' | pmie -v -t 1hour >$tmp.out 2>$tmp.err & +pmie_pid=$! + +sleep 2 +kill -INT $pmie_pid +wait + +echo "pmie output ..." +cat $tmp.out +echo "pmie stderr ..." +cat $tmp.err + +# success, all done +exit Index: qa/312.out =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ qa/312.out 2007-03-07 10:08:13.026354000 +1100 @@ -0,0 +1,5 @@ +QA output created by 312 +pmie output ... +load: 42 + +pmie stderr ...