nvme.sh: add delay after app startup when they are primary
A short delay is required between starting up a primary and secondary process with DPDK depending on what the secondary depends on wrt the primary. As the SPDK sample apps are not designed to be dependent on each other, when we use them as primary/secondary in test scripts with no deterministic synchronization, it is possible for one ore more to hang resulting in DPDK fatal init failures. Often times this would show up as a failure to get hugepages in vtophys A related fix, same failing signature in the same test script, is also included here where the stub app, which is designed to act as primary in certain sections of the test script, was being killed by the test script but the next primary app was coming up before the process was dead and coming up as a secondary. A wait was added to assure that the stub process is gone before the next app tries to start. Change-Id: If2f6fc25e76b769ad8edafa8e965be246e98dab9 Signed-off-by: Paul Luse <paul.e.luse@intel.com> Reviewed-on: https://review.gerrithub.io/367725 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
c35586fe6c
commit
6052d9a432
@ -256,6 +256,7 @@ function start_stub() {
|
||||
|
||||
function kill_stub() {
|
||||
kill $stubpid
|
||||
wait $stubpid
|
||||
rm -f /var/run/spdk_stub0
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,9 @@ testdir=$(readlink -f $(dirname $0))
|
||||
rootdir=$(readlink -f $testdir/../../..)
|
||||
source $rootdir/scripts/autotest_common.sh
|
||||
|
||||
# delay time for apps to start up as primary
|
||||
app_start=5
|
||||
|
||||
function linux_iter_pci {
|
||||
lspci -mm -n -D | grep $1 | tr -d '"' | awk -F " " '{print $1}'
|
||||
}
|
||||
@ -14,6 +17,7 @@ timing_enter nvme
|
||||
|
||||
if [ `uname` = Linux ]; then
|
||||
start_stub "-s 2048 -i 0 -m 0xF"
|
||||
sleep $app_start
|
||||
trap "kill_stub; exit 1" SIGINT SIGTERM ExIT
|
||||
fi
|
||||
|
||||
@ -85,7 +89,7 @@ if [ $(uname -s) = Linux ] && [ $SPDK_TEST_NVME_MULTIPROCESS -eq 1 ]; then
|
||||
timing_enter multi_process
|
||||
$rootdir/examples/nvme/arbitration/arbitration -i 0 -s 4096 -t 10 -c 0xf &
|
||||
pid=$!
|
||||
sleep 3
|
||||
sleep $app_start
|
||||
$rootdir/examples/nvme/perf/perf -i 0 -q 1 -w randread -s 4096 -t 10 -c 0x10 &
|
||||
sleep 1
|
||||
kill -9 $!
|
||||
@ -99,7 +103,9 @@ if [ $(uname -s) = Linux ] && [ $SPDK_TEST_NVME_MULTIPROCESS -eq 1 ]; then
|
||||
core=$((1 << (($count + 4))))
|
||||
printf -v hexcore "0x%x" "$core"
|
||||
$rootdir/examples/nvme/perf/perf -i 0 -q 128 -w read -s 4096 -t 1 -c $hexcore &
|
||||
sleep $app_start
|
||||
$rootdir/examples/nvme/identify/identify -i 0 &
|
||||
sleep $app_start
|
||||
count=$(($count + 1))
|
||||
done
|
||||
wait $pid
|
||||
|
Loading…
Reference in New Issue
Block a user