mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
OpenZFS 7503 - zfs-test should tail ::zfs_dbgmsg on test failure
Authored by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed by: John Kennedy <john.kennedy@delphix.com> Reviewed by: Matt Ahrens <mahrens@delphix.com> Approved by: Gordon Ross <gordon.w.ross@gmail.com> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Ported-by: Brian Behlendorf <behlendorf1@llnl.gov> Porting Notes: - Enable internal log for DEBUG builds and in zfs-tests.sh. - callbacks/zfs_dbgmsg.ksh - Dump interal log via kstat. - callbacks/zfs_dmesg.ksh - Dump dmesg log. - default.cfg - 'Test Suite Specific Commands' dropped. OpenZFS-issue: https://www.illumos.org/issues/7503 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/55a1300 Closes #6002
This commit is contained in:
@@ -41,6 +41,9 @@ FILEDIR=${FILEDIR:-/var/tmp}
|
||||
DISKS=${DISKS:-""}
|
||||
SINGLETEST=()
|
||||
SINGLETESTUSER="root"
|
||||
ZFS_DBGMSG="$STF_SUITE/callbacks/zfs_dbgmsg.ksh"
|
||||
ZFS_DMESG="$STF_SUITE/callbacks/zfs_dmesg.ksh"
|
||||
TESTFAIL_CALLBACKS=${TESTFAIL_CALLBACKS:-"$ZFS_DBGMSG:$ZFS_DMESG"}
|
||||
|
||||
#
|
||||
# Attempt to remove loopback devices and files which where created earlier
|
||||
@@ -475,6 +478,14 @@ if [ -x "$STF_PATH/setenforce" ]; then
|
||||
sudo setenforce permissive &>/dev/null
|
||||
fi
|
||||
|
||||
#
|
||||
# Enable interal ZFS debug log and clear it.
|
||||
#
|
||||
if [ -e /sys/module/zfs/parameters/zfs_dbgmsg_enable ]; then
|
||||
sudo /bin/sh -c "echo 1 >/sys/module/zfs/parameters/zfs_dbgmsg_enable"
|
||||
sudo /bin/sh -c "echo 0 >/proc/spl/kstat/zfs/dbgmsg"
|
||||
fi
|
||||
|
||||
msg "FILEDIR: $FILEDIR"
|
||||
msg "FILES: $FILES"
|
||||
msg "LOOPBACKS: $LOOPBACKS"
|
||||
@@ -491,6 +502,7 @@ export STF_PATH
|
||||
export DISKS
|
||||
export KEEP
|
||||
export __ZFS_POOL_EXCLUDE
|
||||
export TESTFAIL_CALLBACKS
|
||||
export PATH=$STF_PATH
|
||||
|
||||
msg "${TEST_RUNNER} ${QUIET} -c ${RUNFILE} -i ${STF_SUITE}"
|
||||
|
||||
Reference in New Issue
Block a user