From b5d067738f0fed213aba3072f69c2560f77cbdbc Mon Sep 17 00:00:00 2001 From: Athmane Madjoudj Date: Nov 22 2011 06:12:23 +0000 Subject: Add more delay in sysstat tests --- diff --git a/tests/p_sysstat/10-iostat-disk-basic.sh b/tests/p_sysstat/10-iostat-disk-basic.sh index b5903fd..343e1d8 100755 --- a/tests/p_sysstat/10-iostat-disk-basic.sh +++ b/tests/p_sysstat/10-iostat-disk-basic.sh @@ -26,13 +26,13 @@ DRIVE=$(fdisk -l|grep -Po -m1 '^/dev/[\D]+') /usr/bin/iostat -dkx 1 5 $DRIVE >$TMP & # Let the dust settle -sleep 1 +sleep 4 # Generate some read traffic /bin/dd if=$DRIVE of=/dev/null bs=$BS count=$COUNT &>/dev/null # Give iostat a chance to log our traffic -sleep 3 +sleep 6 # Confirm our read bytes are >0, excluding the first # line since that's the average since boot. diff --git a/tests/p_sysstat/15-mpstat-basic.sh b/tests/p_sysstat/15-mpstat-basic.sh index d7f5a56..bbdda9f 100755 --- a/tests/p_sysstat/15-mpstat-basic.sh +++ b/tests/p_sysstat/15-mpstat-basic.sh @@ -15,13 +15,13 @@ trap "[ -e $TMP ] && { /bin/rm -f $TMP; }" EXIT /usr/bin/mpstat -P 0 1 5 >$TMP & # Let the dust settle -sleep 1 +sleep 4 # Give the CPU something to chew on /bin/dd if=/dev/urandom bs=1k count=10000 2>/dev/null|sha1sum -b - &>/dev/null # Give mpstat a chance to log our task -sleep 3 +sleep 6 # Confirm our read bytes are >0, excluding the first # line since that's the average since boot. diff --git a/tests/p_sysstat/5-iostat-cpu-basic.sh b/tests/p_sysstat/5-iostat-cpu-basic.sh index 997fc8f..11ef7fb 100755 --- a/tests/p_sysstat/5-iostat-cpu-basic.sh +++ b/tests/p_sysstat/5-iostat-cpu-basic.sh @@ -21,13 +21,13 @@ DRIVE=$(fdisk -l|grep -Po -m1 '^/dev/[\D]+') /usr/bin/iostat -c 1 5 >$TMP & # Let the dust settle -sleep 1 +sleep 4 # Give the CPU something to chew on /bin/dd if=$DRIVE bs=4k count=25000 2>/dev/null|sha1sum -b - &>/dev/null # Give iostat a chance to log our task -sleep 3 +sleep 6 # Extract the CPU utilisation (user field, percentage) CPU_USER_PCENT=$(awk '$1 ~ /[0-9]/ {$1>a ? a=$1 : $1} END {print int(a)}' $TMP)