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: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2017-02-16 10:01:50 -07:00
parent 6ef4af240d
commit da414d766f
2 changed files with 6 additions and 9 deletions

View File

@ -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

View File

@ -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