Date: Thu, 8 Feb 2018 21:06:30 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r329032 - in projects/zfsd/head/tests/sys/cddl/zfs: include tests/zfsd Message-ID: <201802082106.w18L6UG8057968@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Thu Feb 8 21:06:30 2018 New Revision: 329032 URL: https://svnweb.freebsd.org/changeset/base/329032 Log: Finish removing SAS phy control from the ZFS test suite SAS phy control is only available on systems with SAS expanders, never available in a VM, and less reliable than simulating disk removal with gnop tests/sys/cddl/zfs/include/Makefile tests/sys/cddl/zfs/include/libsas.kshlib Delete libsas.kshlib tests/sys/cddl/zfs/tests/zfsd/zfsd.kshlib Delete some sas-related library functions Sponsored by: Spectra Logic Corp Deleted: projects/zfsd/head/tests/sys/cddl/zfs/include/libsas.kshlib Modified: projects/zfsd/head/tests/sys/cddl/zfs/include/Makefile projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd.kshlib Modified: projects/zfsd/head/tests/sys/cddl/zfs/include/Makefile ============================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/include/Makefile Thu Feb 8 21:03:46 2018 (r329031) +++ projects/zfsd/head/tests/sys/cddl/zfs/include/Makefile Thu Feb 8 21:06:30 2018 (r329032) @@ -12,7 +12,6 @@ MAN= FILESDIR= ${TESTSBASE}/sys/cddl/zfs/include ${PACKAGE}FILES+= constants.cfg ${PACKAGE}FILES+= libremote.kshlib -${PACKAGE}FILES+= libsas.kshlib ${PACKAGE}FILES+= libgnop.kshlib ${PACKAGE}FILES+= logapi.kshlib ${PACKAGE}FILES+= libtest.kshlib Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd.kshlib ============================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd.kshlib Thu Feb 8 21:03:46 2018 (r329031) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd.kshlib Thu Feb 8 21:06:30 2018 (r329032) @@ -80,83 +80,3 @@ function corrupt_pool_vdev # errors (though it's usually faster). wait_for_pool_dev_state_change 60 $vdev DEGRADED } - -# -# do_autoreplace -# Common code that walks through an autoreplace scenario -# Does not verify the final behavior -# -# $1 spare disk name. Empty if no spare -# -function do_autoreplace -{ - typeset SPARE_DISK=$1 - - # Remove a vdev by disabling its SAS phy - find_verify_sas_disk $REMOVAL_DISK - log_note "Disabling \"$REMOVAL_DISK\" on expander $EXPANDER phy $PHY" - disable_sas_disk $EXPANDER $PHY $REMOVAL_DISK - - # Check to make sure ZFS sees the disk as removed - wait_for_pool_removal 30 - - if [ -n "$SPARE_DISK" ]; then - # Verify that the spare activates - for ((timeout=0; $timeout<10; timeout=$timeout+1)); do - check_state $TESTPOOL $SPARE_DISK "ONLINE" && break - $SLEEP 6 - done - zpool status $TESTPOOL - log_must check_state $TESTPOOL "$SPARE_DISK" "ONLINE" - - wait_until_resilvered - fi - - # Export the pool - # This is to prevent REMOVAL_DISK from being added to the pool when - # we reenable its phy - log_must $ZPOOL export $TESTPOOL - - # Reenable the missing dev's SAS phy - log_note "Reenabling phy on expander $EXPANDER phy $PHY" - enable_sas_disk $EXPANDER $PHY - - # Erase the missing dev's ZFS label - log_must $ZPOOL labelclear -f $( find_disks $FOUNDDISK ) - - # Disable the missing dev's SAS phy again - find_verify_sas_disk $FOUNDDISK - log_note "Disabling \"$FOUNDDISK\" on expander $EXPANDER phy $PHY" - disable_sas_disk $EXPANDER $PHY $FOUNDDISK - - # Import the pool - log_must $ZPOOL import $TESTPOOL - # Wait 5 seconds before enabling the phy so zfsd.log will be easier - # to interpret - $SLEEP 5 - - # Reenable the missing dev's SAS phy - log_note "Reenabling phy on expander $EXPANDER phy $PHY" - enable_sas_disk $EXPANDER $PHY -} - -function autoreplace_cleanup -{ - destroy_pool $TESTPOOL - - # See if the phy has been disabled, and try to re-enable it if possible. - if [ -n "$REMOVAL_DISK" -a -n "$EXPANDER" -a -n "$PHY" ]; then - log_note "Renabling ${EXPANDER}:${PHY} for disk ${REMOVAL_DISK}" - enable_sas_disk $EXPANDER $PHY - - # For debugging purposes, log the partial output of - # camcontrol to see if the disk actually came back. - out=$(camcontrol smpphylist ${EXPANDER} | ${GREP} "^ *${PHY}") - log_note "Expander has: ${out}" - fi - - [[ -e $TESTDIR ]] && log_must $RM -rf $TESTDIR/* - - partition_cleanup - restart_zfsd -}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802082106.w18L6UG8057968>