From aaeec80fdf4650be6a9b1f6c25ef5ba4aea03e29 Mon Sep 17 00:00:00 2001 From: Gustavo Moreira Date: Thu, 28 Nov 2024 13:53:11 +1100 Subject: [PATCH] linux: library_list testcase: Optimize testing performance by limiting the number of processes to just one. This change will reduce execution time and speed up the test --- test/test_volatility.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/test/test_volatility.py b/test/test_volatility.py index c0cc11cd3..eb365ccf3 100644 --- a/test/test_volatility.py +++ b/test/test_volatility.py @@ -362,27 +362,19 @@ def test_linux_sockstat(image, volatility, python): def test_linux_library_list(image, volatility, python): rc, out, _err = runvol_plugin( - "linux.library_list.LibraryList", image, volatility, python + "linux.library_list.LibraryList", + image, + volatility, + python, + pluginargs=["--pids", "2363"], ) assert re.search( rb"NetworkManager\s2363\s0x7f52cdda0000\s/lib/x86_64-linux-gnu/libnss_files.so.2", out, ) - assert re.search( - rb"gnome-settings-\s3807\s0x7f7e660b5000\s/lib/x86_64-linux-gnu/libbz2.so.1.0", - out, - ) - assert re.search( - rb"gdu-notificatio\s3878\s0x7f25ce33e000\s/usr/lib/x86_64-linux-gnu/libXau.so.6", - out, - ) - assert re.search( - rb"bash\s8600\s0x7fe78a85f000\s/lib/x86_64-linux-gnu/libnss_files.so.2", - out, - ) - assert out.count(b"\n") >= 2677 + assert out.count(b"\n") > 10 assert rc == 0