Commit 378fc778 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

test: clean up redundant process_core invocations



The main autotest.sh script automatically runs process_core as needed.
Individual test scripts should not be calling it.

Change-Id: I19d8799cd39f37f4768d8d89d3ece6aa993a6c95
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent b33a298d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ cp $testdir/auth.conf /usr/local/etc/
pid=$!
echo "Process pid: $pid"

trap "process_core; killprocess $pid; exit 1 " SIGINT SIGTERM EXIT
trap "killprocess $pid; exit 1 " SIGINT SIGTERM EXIT

waitforlisten $pid ${RPC_PORT}
echo "iscsi_tgt is listening. Running tests..."
+2 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ rpc_py="python $rootdir/scripts/rpc.py"
pid=$!
echo "Process pid: $pid"

trap "process_core; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT

waitforlisten $pid ${RPC_PORT}
echo "iscsi_tgt is listening. Running tests..."
@@ -49,7 +49,7 @@ sleep 1
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT
iscsiadm -m node --login -p $TARGET_IP:$PORT

trap "umount /mnt/device; rm -rf /mnt/device; iscsicleanup; process_core; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
trap "umount /mnt/device; rm -rf /mnt/device; iscsicleanup; killprocess $pid; exit 1" SIGINT SIGTERM EXIT

sleep 1

+3 −3
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ function running_config() {
	./app/iscsi_tgt/iscsi_tgt -c /tmp/iscsi.conf &
	pid=$!
	echo "Process pid: $pid"
	trap "iscsicleanup; process_core; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
	trap "iscsicleanup; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
	waitforlisten $pid ${RPC_PORT}
	echo "iscsi_tgt is listening. Running tests..."

@@ -54,7 +54,7 @@ fio_py="python $rootdir/scripts/fio.py"
pid=$!
echo "Process pid: $pid"

trap "process_core; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT

waitforlisten $pid ${RPC_PORT}
echo "iscsi_tgt is listening. Running tests..."
@@ -72,7 +72,7 @@ sleep 1
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT
iscsiadm -m node --login -p $TARGET_IP:$PORT

trap "iscsicleanup; process_core; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
trap "iscsicleanup; killprocess $pid; exit 1" SIGINT SIGTERM EXIT

sleep 1
$fio_py 4096 1 randrw 1 verify
+2 −2
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ fio_py="python $rootdir/scripts/fio.py"
pid=$!
echo "Process pid: $pid"

trap "process_core; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT

waitforlisten $pid ${RPC_PORT}
echo "iscsi_tgt is listening. Running tests..."
@@ -38,7 +38,7 @@ sleep 1
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT
iscsiadm -m node --login -p $TARGET_IP:$PORT

trap "iscsicleanup; process_core; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
trap "iscsicleanup; killprocess $pid; exit 1" SIGINT SIGTERM EXIT

sleep 5

+2 −2
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ fi
pid=$!
echo "Process pid: $pid"

trap "process_core; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT

waitforlisten $pid ${RPC_PORT}
echo "iscsi_tgt is listening. Running tests..."
@@ -63,7 +63,7 @@ $fio_py 512 1 read 60 &
fiopid=$!
echo "FIO pid: $fiopid"

trap "iscsicleanup; process_core; killprocess $pid; killprocess $fiopid; exit 1" SIGINT SIGTERM EXIT
trap "iscsicleanup; killprocess $pid; killprocess $fiopid; exit 1" SIGINT SIGTERM EXIT

# Do 3 resets while making sure iscsi_tgt and fio are still running
for i in 1 2 3; do
Loading