Commit da414d76 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

test/iscsi_tgt/fio: pass pid to running_config



We already know the PID of the iscsi_tgt process since we launched it
ourselves; drop the use of the pidfile.

Change-Id: Ib1569c5b507ac85f26020937a007f5d7df090d99
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 6ef4af24
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ source $rootdir/scripts/autotest_common.sh
function running_config() {
	# generate a config file from the running iscsi_tgt
	#  running_config.sh will leave the file at /tmp/iscsi.conf
	$testdir/running_config.sh
	$testdir/running_config.sh $pid
	sleep 1

	# now start iscsi_tgt again using the generated config file
+5 −8
Original line number Diff line number Diff line
@@ -2,23 +2,20 @@

set -xe

if [ $EUID -ne 0 ]; then
	echo "$0 must be run as root"
	exit 1
fi
pid="$1"

if [ ! -f /var/run/iscsi.pid.0 ]; then
	echo "ids is not running"
if [[ -z "$pid" ]]; then
	echo "usage: $0 pid"
	exit 1
fi

# delete any existing temporary iscsi.conf files
rm -f /tmp/iscsi.conf.*

kill -USR1 `cat /var/run/iscsi.pid.0`
kill -USR1 "$pid"

if [ ! -f `ls /tmp/iscsi.conf.*` ]; then
	echo "ids did not generate config file"
	echo "iscsi_tgt did not generate config file"
	exit 1
fi