From 8b6bd0f74ea65e4a1394b971c7aaf521dff36d14 Mon Sep 17 00:00:00 2001 From: Gustavo Moreira Date: Fri, 2 Feb 2024 21:02:05 +1100 Subject: [PATCH] Add linux.ip.Link test using linux-sample-1.bin image --- test/test_volatility.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/test_volatility.py b/test/test_volatility.py index 61e6fe029..3185b7d58 100644 --- a/test/test_volatility.py +++ b/test/test_volatility.py @@ -343,6 +343,21 @@ def test_linux_ip_addr(image, volatility, python): assert rc == 0 +def test_linux_ip_link(image, volatility, python): + rc, out, err = runvol_plugin("linux.ip.Link", image, volatility, python) + + assert re.search( + rb"-\s+lo\s+00:00:00:00:00:00\s+UNKNOWN\s+16436\s+noqueue\s+0\s+LOOPBACK,LOWER_UP,UP", + out, + ) + assert re.search( + rb"-\s+eth0\s+00:0c:29:8f:ed:ca\s+UP\s+1500\s+pfifo_fast\s+1000\s+BROADCAST,LOWER_UP,MULTICAST,UP", + out, + ) + assert out.count(b"\n") >= 6 + assert rc == 0 + + # MAC