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:
parent
6ef4af240d
commit
da414d766f
@ -7,7 +7,7 @@ source $rootdir/scripts/autotest_common.sh
|
|||||||
function running_config() {
|
function running_config() {
|
||||||
# generate a config file from the running iscsi_tgt
|
# generate a config file from the running iscsi_tgt
|
||||||
# running_config.sh will leave the file at /tmp/iscsi.conf
|
# running_config.sh will leave the file at /tmp/iscsi.conf
|
||||||
$testdir/running_config.sh
|
$testdir/running_config.sh $pid
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# now start iscsi_tgt again using the generated config file
|
# now start iscsi_tgt again using the generated config file
|
||||||
|
@ -2,23 +2,20 @@
|
|||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
if [ $EUID -ne 0 ]; then
|
pid="$1"
|
||||||
echo "$0 must be run as root"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f /var/run/iscsi.pid.0 ]; then
|
if [[ -z "$pid" ]]; then
|
||||||
echo "ids is not running"
|
echo "usage: $0 pid"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# delete any existing temporary iscsi.conf files
|
# delete any existing temporary iscsi.conf files
|
||||||
rm -f /tmp/iscsi.conf.*
|
rm -f /tmp/iscsi.conf.*
|
||||||
|
|
||||||
kill -USR1 `cat /var/run/iscsi.pid.0`
|
kill -USR1 "$pid"
|
||||||
|
|
||||||
if [ ! -f `ls /tmp/iscsi.conf.*` ]; then
|
if [ ! -f `ls /tmp/iscsi.conf.*` ]; then
|
||||||
echo "ids did not generate config file"
|
echo "iscsi_tgt did not generate config file"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user