summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2008-08-21 13:27:22 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2008-08-21 13:27:22 -0300
commitf1c92c8cad34b0e04031b3dcc1412c215f9c47b8 (patch)
treebdee1089c600536836f776c175c6056dc3b44f8f
parentacb1b3a9c3f09a4c816276d24238119bbdd45a7b (diff)
downloadtuna-f1c92c8cad34b0e04031b3dcc1412c215f9c47b8.tar.gz
testuna: Don't try to isolate all the processors
On a two way system trying to isolate the first and last core doesn't make sense... Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-xtestuna16
1 files changed, 9 insertions, 7 deletions
diff --git a/testuna b/testuna
index 96b4b1c..774911c 100755
--- a/testuna
+++ b/testuna
@@ -146,15 +146,17 @@ done
NEW_AFFINITY=$((1 << NR_PROCESSORS | 1))
-tuna --cpu=0,$NR_PROCESSORS --isolate
+if [ $NR_PROCESSORS -gt 2 ]; then
+ tuna --cpu=0,$NR_PROCESSORS --isolate
-for PID in $(cd /proc; ls -d [0-9]*) ; do
- [ -n "$(cat /proc/$PID/cmdline 2> /dev/null)" ] || continue
- AFFINITY=0x$(get_affinity $PID) || continue
+ for PID in $(cd /proc; ls -d [0-9]*) ; do
+ [ -n "$(cat /proc/$PID/cmdline 2> /dev/null)" ] || continue
+ AFFINITY=0x$(get_affinity $PID) || continue
- die_if_not_zero $((AFFINITY & NEW_AFFINITY)) \
- "Verifying isolation of first and last processor for PID $PID"
-done
+ die_if_not_zero $((AFFINITY & NEW_AFFINITY)) \
+ "Verifying isolation of first and last processor for PID $PID"
+ done
+fi
tuna --cpu=0,$NR_PROCESSORS --include