Skip to content

Commit

Permalink
test: Add cache specific test
Browse files Browse the repository at this point in the history
  • Loading branch information
dmadisetti committed Aug 27, 2024
1 parent 071306e commit cf5d451
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/zfs-with-vdevs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ diskoLib.testLib.makeDiskoTest {
out == expected_value
), f"Expected {property}={expected_value} on {ds}, got: {out}"
# These fields are 0 if l2arc is disabled
assert (
machine.succeed(
"cat /proc/spl/kstat/zfs/arcstats"
" | grep '^l2_' | tr -s ' '"
" | cut -s -d ' ' -f3 | uniq"
).strip() != "0"
), "Excepted cache to be utilized."
assert_property("zroot", "compression", "zstd")
assert_property("zroot/zfs_fs", "com.sun:auto-snapshot", "true")
assert_property("zroot/zfs_fs", "compression", "zstd")
Expand Down

0 comments on commit cf5d451

Please sign in to comment.