Skip to content

Commit c0672f6

Browse files
committed
Linux: Sockstat - adds pytest
This adds a pytest for the `linux.sockstat.Sockstat` plugin.
1 parent 5d2a5f9 commit c0672f6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/test_volatility.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,17 @@ def test_linux_tty_check(image, volatility, python):
341341
assert out.count(b"\n") >= 5
342342
assert rc == 0
343343

344+
def test_linux_sockstat(image, volatility, python):
345+
rc, out, err = runvol_plugin("linux.sockstat.Sockstat", image, volatility, python)
346+
347+
assert out.count(b"AF_UNIX") >= 354
348+
assert out.count(b"AF_BLUETOOTH") >= 5
349+
assert out.count(b"AF_INET") >= 32
350+
assert out.count(b"AF_INET6") >= 20
351+
assert out.count(b"AF_PACKET") >= 1
352+
assert out.count(b"AF_NETLINK") >= 43
353+
assert rc == 0
354+
344355

345356
def test_linux_library_list(image, volatility, python):
346357
rc, out, err = runvol_plugin(

0 commit comments

Comments
 (0)