From 378fc7787c5117201038670fb654cbfdaca34fba Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Fri, 27 Jan 2017 15:10:58 -0700 Subject: [PATCH] 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: Daniel Verkamp --- test/iscsi_tgt/calsoft/calsoft.sh | 2 +- test/iscsi_tgt/filesystem/filesystem.sh | 4 ++-- test/iscsi_tgt/fio/fio.sh | 6 +++--- test/iscsi_tgt/idle_migration/idle_migration.sh | 4 ++-- test/iscsi_tgt/reset/reset.sh | 4 ++-- test/iscsi_tgt/rpc_config/rpc_config.sh | 2 +- test/lib/bdev/blockdev.sh | 5 ----- 7 files changed, 11 insertions(+), 16 deletions(-) diff --git a/test/iscsi_tgt/calsoft/calsoft.sh b/test/iscsi_tgt/calsoft/calsoft.sh index 13c2b2615..a36122340 100755 --- a/test/iscsi_tgt/calsoft/calsoft.sh +++ b/test/iscsi_tgt/calsoft/calsoft.sh @@ -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..." diff --git a/test/iscsi_tgt/filesystem/filesystem.sh b/test/iscsi_tgt/filesystem/filesystem.sh index 185eb34ac..df4baa030 100755 --- a/test/iscsi_tgt/filesystem/filesystem.sh +++ b/test/iscsi_tgt/filesystem/filesystem.sh @@ -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 diff --git a/test/iscsi_tgt/fio/fio.sh b/test/iscsi_tgt/fio/fio.sh index dfa0f6c2f..7936e4611 100755 --- a/test/iscsi_tgt/fio/fio.sh +++ b/test/iscsi_tgt/fio/fio.sh @@ -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 diff --git a/test/iscsi_tgt/idle_migration/idle_migration.sh b/test/iscsi_tgt/idle_migration/idle_migration.sh index 71ce05230..e6d7fe0f1 100755 --- a/test/iscsi_tgt/idle_migration/idle_migration.sh +++ b/test/iscsi_tgt/idle_migration/idle_migration.sh @@ -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 diff --git a/test/iscsi_tgt/reset/reset.sh b/test/iscsi_tgt/reset/reset.sh index 428de3dd0..4b08c1dae 100755 --- a/test/iscsi_tgt/reset/reset.sh +++ b/test/iscsi_tgt/reset/reset.sh @@ -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 diff --git a/test/iscsi_tgt/rpc_config/rpc_config.sh b/test/iscsi_tgt/rpc_config/rpc_config.sh index 8d21bb056..f06f10c60 100755 --- a/test/iscsi_tgt/rpc_config/rpc_config.sh +++ b/test/iscsi_tgt/rpc_config/rpc_config.sh @@ -33,7 +33,7 @@ rpc_config_py="python $testdir/rpc_config.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..." diff --git a/test/lib/bdev/blockdev.sh b/test/lib/bdev/blockdev.sh index 167b591f7..de930d302 100755 --- a/test/lib/bdev/blockdev.sh +++ b/test/lib/bdev/blockdev.sh @@ -12,12 +12,10 @@ timing_enter blockdev timing_enter bounds $testdir/bdevio/bdevio $testdir/bdev.conf -process_core timing_exit bounds timing_enter verify $testdir/bdevperf/bdevperf -c $testdir/bdev.conf -q 32 -s 4096 -w verify -t 5 -process_core timing_exit verify if [ $RUN_NIGHTLY -eq 1 ]; then @@ -25,17 +23,14 @@ if [ $RUN_NIGHTLY -eq 1 ]; then # size and will cross 128KB Intel DC P3700 stripe boundaries. timing_enter perf $testdir/bdevperf/bdevperf -c $testdir/bdev.conf -q 128 -w read -s 196608 -t 5 - process_core timing_exit perf timing_enter reset $testdir/bdevperf/bdevperf -c $testdir/bdev.conf -q 16 -w reset -s 4096 -t 60 - process_core timing_exit reset timing_enter unmap $testdir/bdevperf/bdevperf -c $testdir/bdev.conf -q 1 -w unmap -s 4096 -t 60 - process_core timing_exit unmap fi