]> granicus.if.org Git - zfs/commit
Fix dbufstats_001_pos
authorGiuseppe Di Natale <dinatale2@users.noreply.github.com>
Wed, 7 Mar 2018 17:53:04 +0000 (09:53 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 7 Mar 2018 17:53:04 +0000 (09:53 -0800)
commita07ad58847158fcd90a2a98f1476a81bfcd3c3ac
treeb8597fd267bac6841d6370d527441918ee6b2e35
parent639b18944a6a3483c02039621c02dac08a954a90
Fix dbufstats_001_pos

Implement a new helper within_tolerance to test if a value
is within range of a target.

Because the dbufstats and dbufs kstat file are being read
at slightly different times, it is possible for stats to be
slightly off. Use within_tolerance to determine if the value
is "close enough" to the target.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes #7239
Closes #7266
tests/zfs-tests/include/math.shlib
tests/zfs-tests/tests/functional/arc/dbufstats_001_pos.ksh