]> granicus.if.org Git - zfs/commitdiff
ZTS: Use decimal values when setting tunables
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 22 Aug 2019 17:36:57 +0000 (10:36 -0700)
committerGitHub <noreply@github.com>
Thu, 22 Aug 2019 17:36:57 +0000 (10:36 -0700)
The mdb_set_uint32 function requires that the values passed in be
decimal.  This was overlooked initially because the matching Linux
function accepts both decimal and hexadecimal values.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Sara Hartse <sara.hartse@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Igor Kozhukhov <igor@dilos.org>
Closes #9125
Closes #9195

tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_clone_livelist_condense_and_disable.ksh
tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_clone_livelist_condense_races.ksh
tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_clone_livelist.ksh
tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_dev_removal_condense.ksh

index b9ac872388943ceb530bbccbc1e3e6017f1ea355..7faf304db1d587c8309f950a8edbac696ff5142f 100755 (executable)
@@ -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 0x14
+       set_tunable64 zfs_livelist_max_entries 20
        # set a small percent shared threshold so the livelist is not disabled
-       set_tunable32 zfs_livelist_min_percent_shared 0xa
+       set_tunable32 zfs_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 0x32
+       set_tunable32 zfs_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 0x14
+       set_tunable32 zfs_livelist_min_percent_shared 20
        clone_dataset $TESTFS1 snap $TESTCLONE
 
        log_must mkfile 5m /$TESTPOOL/$TESTCLONE/$TESTFILE0
index 037983ba7736f7cea4390dd62eee34e187a6e446..85692f8895680c8b9b45f971a6b4bb84c16e5066 100755 (executable)
@@ -98,7 +98,7 @@ log_must zpool sync $TESTPOOL
 log_must zfs snapshot $TESTPOOL/$TESTFS1@snap
 
 # Reduce livelist size to trigger condense more easily
-set_tunable64 zfs_livelist_max_entries 0x14
+set_tunable64 zfs_livelist_max_entries 20
 
 # Test cancellation path in the zthr
 set_tunable32 zfs_livelist_condense_zthr_pause 1
index 1dd01151969c54c38fe131c531b0812da00f2cd0..6669426b0c7b2102b0acaf9f79c1aa3dd2ecba1b 100755 (executable)
@@ -128,7 +128,7 @@ log_must mkfile 20m /$TESTPOOL/$TESTFS1/atestfile
 log_must zfs snapshot $TESTPOOL/$TESTFS1@snap
 
 # set a small livelist entry size to more easily test multiple entry livelists
-set_tunable64 zfs_livelist_max_entries 0x14
+set_tunable64 zfs_livelist_max_entries 20
 
 test_one_empty
 test_one
index da5f314ef151a0e088e20b58586b64d3b7fd9b16..30c4b2ddac0d2774a9f6699dd31db86a7d47d4cd 100755 (executable)
@@ -45,7 +45,7 @@ function cleanup
 log_onexit cleanup
 
 ORIGINAL_MAX=$(get_tunable zfs_livelist_max_entries)
-set_tunable64 zfs_livelist_max_entries 0x14
+set_tunable64 zfs_livelist_max_entries 20
 
 VIRTUAL_DISK1=/var/tmp/disk1
 VIRTUAL_DISK2=/var/tmp/disk2