test/common: Log all system uevents during autotest
This may be useful in debugging and pinpointing devices which may take longer time to initialize during the tests. Signed-off-by: Michal Berger <michalx.berger@intel.com> Change-Id: I5abad17e1a2690a063b6152462dcf49d22c70d0f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3656 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
d1fc288376
commit
23040b8b0c
@ -36,6 +36,11 @@ if [ $(uname -s) = Linux ]; then
|
||||
# make sure nbd (network block device) driver is loaded if it is available
|
||||
# this ensures that when tests need to use nbd, it will be fully initialized
|
||||
modprobe nbd || true
|
||||
|
||||
if udevadm=$(type -P udevadm); then
|
||||
"$udevadm" monitor --property &> "$output_dir/udev.log" &
|
||||
udevadm_pid=$!
|
||||
fi
|
||||
fi
|
||||
|
||||
trap "process_core; autotest_cleanup; exit 1" SIGINT SIGTERM EXIT
|
||||
|
@ -1186,6 +1186,9 @@ function autotest_cleanup() {
|
||||
if [[ -n $old_core_pattern ]]; then
|
||||
echo "$old_core_pattern" > /proc/sys/kernel/core_pattern
|
||||
fi
|
||||
if [[ -e /proc/$udevadm_pid/status ]]; then
|
||||
kill "$udevadm_pid" || :
|
||||
fi
|
||||
}
|
||||
|
||||
function freebsd_update_contigmem_mod() {
|
||||
|
Loading…
Reference in New Issue
Block a user