qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Harper <ryanh@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: Ryan Harper <ryanh@us.ibm.com>
Subject: [Qemu-devel] [PATCH 3/4] Remove tabs and replace with four spaces.
Date: Fri, 13 Jan 2012 16:05:20 -0600	[thread overview]
Message-ID: <1326492321-13540-4-git-send-email-ryanh@us.ibm.com> (raw)
In-Reply-To: <1326492321-13540-1-git-send-email-ryanh@us.ibm.com>

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
---
 qemu-test |   62 ++++++++++++++++++++++++++++++------------------------------
 1 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/qemu-test b/qemu-test
index 71c1ba1..445ca6d 100755
--- a/qemu-test
+++ b/qemu-test
@@ -29,9 +29,9 @@ if ! which qmp >/dev/null 2>/dev/null; then
     qmp="${QEMU_SRC}/QMP/qmp"
 
     if ! test -x "${qmp}"; then
-	echo "Please set QEMU_SRC to set to a recent qemu.git tree"
+    echo "Please set QEMU_SRC to set to a recent qemu.git tree"
     cleanup
-	exit 1
+    exit 1
     fi
 else
     qmp=`which qmp | head -1`
@@ -74,13 +74,13 @@ qmp() {
     qmp_pid=$!
     count=0
     while checkpid $qmp_pid; do
-	sleep 1
-	count=$(($count + 1))
-	if test $count -gt $QMP_TIMEOUT; then
-	    echo $count, $QMP_TIMEOUT
-	    kill -9 $qmp_pid
-	    return 1
-	fi
+    sleep 1
+    count=$(($count + 1))
+    if test $count -gt $QMP_TIMEOUT; then
+        echo $count, $QMP_TIMEOUT
+        kill -9 $qmp_pid
+        return 1
+    fi
     done
     return 0
 }
@@ -104,11 +104,11 @@ choose() {
     target=$(($RANDOM % $#))
     count=0
     for i in "$@"; do
-	if test $count = $target; then
-	    echo $i
-	    return 0
-	fi
-	count=$(($count + 1))
+    if test $count = $target; then
+        echo $i
+        return 0
+    fi
+    count=$(($count + 1))
     done
 
     # not supposed to happen...
@@ -117,7 +117,7 @@ choose() {
 
 choose_bool() {
     if test `choose yes no` = "yes"; then
-	return 0
+    return 0
     fi
     return 1
 }
@@ -135,34 +135,34 @@ start_qemu() {
 qemu_is_okay() {
     # it's stopped, that's not necessarly bad
     if ! checkpid $pid; then
-	return 1
+    return 1
     fi
  
     log_size=`get_file_size $tmplog`
     if test $last_log_size = $log_size; then
-	freeze_count=$(($freeze_count + 1))
+    freeze_count=$(($freeze_count + 1))
     else
-	freeze_count=0
-	last_log_size=$log_size
+    freeze_count=0
+    last_log_size=$log_size
     fi
     if test $freeze_count -gt $FREEZE_THRESHOLD && checkpid $pid; then
-	qemu_pid=`cat $tmppid`
-	kill -9 $qemu_pid
-	echo "Guest ($qemu_pid) has not had output in $FREEZE_THRESHOLD seconds!"
-	return 2
+    qemu_pid=`cat $tmppid`
+    kill -9 $qemu_pid
+    echo "Guest ($qemu_pid) has not had output in $FREEZE_THRESHOLD seconds!"
+    return 2
     fi
 
     if ! qmp query-status >/dev/null 2>/dev/null && checkpid $pid; then
-	qemu_pid=`cat $tmppid`
-	
-	kill -9 $qemu_pid
-	echo "QEMU is hung!"
-	return 3
+    qemu_pid=`cat $tmppid`
+    
+    kill -9 $qemu_pid
+    echo "QEMU is hung!"
+    return 3
     fi
 
     # it's stopped, that's not necessarly bad
     if ! checkpid $pid; then
-	return 1
+    return 1
     fi
 }
 
@@ -170,7 +170,7 @@ get_qemu_status() {
     wait $pid
     rc=`cat $tmprc`
     if test $(($rc & 1)) = 1; then
-	rc=$(($rc / 2))
+    rc=$(($rc / 2))
     fi
     return $rc
 }
@@ -179,7 +179,7 @@ qemu() {
     start_qemu "$@"
 
     while qemu_is_okay; do
-	sleep 1
+    sleep 1
     done
 
     get_qemu_status
-- 
1.7.6

  parent reply	other threads:[~2012-01-13 22:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13 22:05 [Qemu-devel] [PATCH] qemu-test: qemu-test script cleanups Ryan Harper
2012-01-13 22:05 ` [Qemu-devel] [PATCH 1/4] update get_file_size to not throw error on non-existant files Ryan Harper
2012-01-13 22:05 ` [Qemu-devel] [PATCH 2/4] Add cleanup function Ryan Harper
2012-01-13 23:17   ` Eric Blake
2012-01-16 17:16     ` Ryan Harper
2012-01-17 22:03       ` Eric Blake
2012-01-20 15:33         ` Ryan Harper
2012-01-13 22:05 ` Ryan Harper [this message]
2012-01-13 23:10   ` [Qemu-devel] [PATCH 3/4] Remove tabs and replace with four spaces Anthony Liguori
2012-01-13 22:05 ` [Qemu-devel] [PATCH 4/4] Apply consistent indentation Ryan Harper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1326492321-13540-4-git-send-email-ryanh@us.ibm.com \
    --to=ryanh@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).