hw_hotplug: remove log.txt before exiting script
hw_hotplug job would most of the time throw errors on one of device removals, while running with vfio-pci driver. This issue was not present for uio_pci_generic driver. The hw_hotplug.sh script would detect "Starting I/O..." log, before "Initializing NVMe Controllers" in function register_controllers() was printed. This indicates that the log.txt contained logs from previous hw_hotplug test. Change-Id: Iad56511ba689cd6b2a794aee6b952c7bba0fe8ef Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12677 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
38012f56d4
commit
13b6c53dcf
@ -67,7 +67,7 @@ exec >&$log 2>&1
|
||||
$SPDK_EXAMPLE_DIR/hotplug -i 0 -t 100 -n 2 -r 2 $mode &
|
||||
hotplug_pid=$!
|
||||
|
||||
trap 'killprocess $hotplug_pid; restore_device; exit 1' SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $hotplug_pid; restore_device; rm $testdir/log.txt; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
i=0
|
||||
while ! grep "Starting I/O" $testdir/log.txt; do
|
||||
@ -77,6 +77,7 @@ while ! grep "Starting I/O" $testdir/log.txt; do
|
||||
done
|
||||
|
||||
if ! grep "Starting I/O" $testdir/log.txt; then
|
||||
rm $testdir/log.txt
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -94,11 +95,14 @@ timing_enter wait_for_example
|
||||
|
||||
if ! wait $hotplug_pid; then
|
||||
echo "Hotplug example returned error!"
|
||||
rm $testdir/log.txt
|
||||
exit 1
|
||||
fi
|
||||
|
||||
timing_exit wait_for_example
|
||||
|
||||
rm $testdir/log.txt
|
||||
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
|
||||
timing_exit hotplug_hw_test
|
||||
|
Loading…
Reference in New Issue
Block a user