5 # This file and its contents are supplied under the terms of the
6 # Common Development and Distribution License ("CDDL"), version 1.0.
7 # You may only use this file in accordance with the terms of version
10 # A full copy of the text of the CDDL should have accompanied this
11 # source. A copy of the CDDL is also available via the Internet at
12 # http://www.illumos.org/license/CDDL.
18 # Copyright (c) 2017 by Lawrence Livermore National Security, LLC.
22 # Ensure that the MMP thread is notified when zfs_multihost_interval is
26 # 1. Set zfs_multihost_interval to much longer than the test duration
27 # 2. Create a zpool and enable multihost
28 # 3. Verify no MMP writes occurred
29 # 4. Set zfs_multihost_interval to 1 second
31 # 6. Verify MMP writes began
34 .
$STF_SUITE/include
/libtest.shlib
35 .
$STF_SUITE/tests
/functional
/mmp
/mmp.cfg
36 .
$STF_SUITE/tests
/functional
/mmp
/mmp.kshlib
38 verify_runnable
"both"
42 default_cleanup_noexit
43 log_must set_tunable64 zfs_multihost_interval
$MMP_INTERVAL_DEFAULT
44 log_must mmp_clear_hostid
47 log_assert
"mmp threads notified when zfs_multihost_interval reduced"
50 log_must set_tunable64 zfs_multihost_interval
$MMP_INTERVAL_HOUR
51 log_must mmp_set_hostid
$HOSTID1
53 default_setup_noexit
$DISK
54 log_must zpool
set multihost
=on
$TESTPOOL
57 log_must set_tunable64 zfs_multihost_interval
$MMP_INTERVAL_DEFAULT
58 uber_count
=$
(count_mmp_writes
$TESTPOOL 1)
60 if [ $uber_count -eq 0 ]; then
61 log_fail
"mmp writes did not start when zfs_multihost_interval reduced"
64 log_pass
"mmp threads notified when zfs_multihost_interval reduced"