]> git.proxmox.com Git - mirror_zfs.git/blobdiff - tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_clone_livelist_condense_and_disable.ksh
Update ZTS to work on FreeBSD
[mirror_zfs.git] / tests / zfs-tests / tests / functional / cli_root / zfs_destroy / zfs_clone_livelist_condense_and_disable.ksh
index 7faf304db1d587c8309f950a8edbac696ff5142f..13976e7c44fef2745e7f2a9f18dd39fd72daceea 100755 (executable)
@@ -36,9 +36,9 @@ function cleanup
 {
        log_must zfs destroy -Rf $TESTPOOL/$TESTFS1
        # reset the livelist sublist size to the original value
-       set_tunable64 zfs_livelist_max_entries $ORIGINAL_MAX
+       set_tunable64 $LIVELIST_MAX_ENTRIES $ORIGINAL_MAX
        # reset the minimum percent shared to 75
-       set_tunable32 zfs_livelist_min_percent_shared $ORIGINAL_MIN
+       set_tunable32 $LIVELIST_MIN_PERCENT_SHARED $ORIGINAL_MIN
 }
 
 function check_ll_len
@@ -58,9 +58,9 @@ function test_condense
 {
        # set the max livelist entries to a small value to more easily
        # trigger a condense
-       set_tunable64 zfs_livelist_max_entries 20
+       set_tunable64 $LIVELIST_MAX_ENTRIES 20
        # set a small percent shared threshold so the livelist is not disabled
-       set_tunable32 zfs_livelist_min_percent_shared 10
+       set_tunable32 $LIVELIST_MIN_PERCENT_SHARED 10
        clone_dataset $TESTFS1 snap $TESTCLONE
 
        # sync between each write to make sure a new entry is created
@@ -86,7 +86,7 @@ function test_condense
 function test_deactivated
 {
        # Threshold set to 50 percent
-       set_tunable32 zfs_livelist_min_percent_shared 50
+       set_tunable32 $LIVELIST_MIN_PERCENT_SHARED 50
        clone_dataset $TESTFS1 snap $TESTCLONE
 
        log_must mkfile 5m /$TESTPOOL/$TESTCLONE/$TESTFILE0
@@ -97,7 +97,7 @@ function test_deactivated
        log_must zfs destroy -R $TESTPOOL/$TESTCLONE
 
        # Threshold set to 20 percent
-       set_tunable32 zfs_livelist_min_percent_shared 20
+       set_tunable32 $LIVELIST_MIN_PERCENT_SHARED 20
        clone_dataset $TESTFS1 snap $TESTCLONE
 
        log_must mkfile 5m /$TESTPOOL/$TESTCLONE/$TESTFILE0
@@ -112,8 +112,8 @@ function test_deactivated
        log_must zfs destroy -R $TESTPOOL/$TESTCLONE
 }
 
-ORIGINAL_MAX=$(get_tunable zfs_livelist_max_entries)
-ORIGINAL_MIN=$(get_tunable zfs_livelist_min_percent_shared)
+ORIGINAL_MAX=$(get_tunable $LIVELIST_MAX_ENTRIES)
+ORIGINAL_MIN=$(get_tunable $LIVELIST_MIN_PERCENT_SHARED)
 
 log_onexit cleanup
 log_must zfs create $TESTPOOL/$TESTFS1