Skip to content

Commit cf5d451

Browse files
committed
test: Add cache specific test
1 parent 071306e commit cf5d451

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/zfs-with-vdevs.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ diskoLib.testLib.makeDiskoTest {
1616
out == expected_value
1717
), f"Expected {property}={expected_value} on {ds}, got: {out}"
1818
19+
# These fields are 0 if l2arc is disabled
20+
assert (
21+
machine.succeed(
22+
"cat /proc/spl/kstat/zfs/arcstats"
23+
" | grep '^l2_' | tr -s ' '"
24+
" | cut -s -d ' ' -f3 | uniq"
25+
).strip() != "0"
26+
), "Excepted cache to be utilized."
27+
1928
assert_property("zroot", "compression", "zstd")
2029
assert_property("zroot/zfs_fs", "com.sun:auto-snapshot", "true")
2130
assert_property("zroot/zfs_fs", "compression", "zstd")

0 commit comments

Comments
 (0)