From cc26b4468889a6be9d792f837292e78d4e9442d0 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com> Date: Wed, 20 Dec 2023 17:16:33 +0200 Subject: [PATCH] pty --- .../dom0-template/etc/xensource/bugtool/mock/stuff.xml | 2 +- tests/unit/test_load_plugins.py | 4 ++-- tests/unit/test_output.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration/dom0-template/etc/xensource/bugtool/mock/stuff.xml b/tests/integration/dom0-template/etc/xensource/bugtool/mock/stuff.xml index 0b2fa71b..ec1869fb 100644 --- a/tests/integration/dom0-template/etc/xensource/bugtool/mock/stuff.xml +++ b/tests/integration/dom0-template/etc/xensource/bugtool/mock/stuff.xml @@ -1,5 +1,5 @@ -/proc/self/fd +/proc/sys/kernel/pty /proc/self/status /proc/sys/fs/epoll cat /proc/version diff --git a/tests/unit/test_load_plugins.py b/tests/unit/test_load_plugins.py index f6964efe..d2a65fab 100644 --- a/tests/unit/test_load_plugins.py +++ b/tests/unit/test_load_plugins.py @@ -27,9 +27,9 @@ def test_load_plugins(bugtool, dom0_template): assert bugtool.cap_sizes["mock"] == 0 # Assert the entries added to the bugtool.data dict: assert bugtool.data == { - "ls -l /proc/self/fd": { + "ls -l /proc/sys/kernel/pty": { "cap": "mock", - "cmd_args": ["ls", "-l", "/proc/self/fd"], + "cmd_args": ["ls", "-l", "/proc/sys/kernel/pty"], "filter": None, }, "/proc/self/status": { diff --git a/tests/unit/test_output.py b/tests/unit/test_output.py index ceff70e1..2590ed6d 100644 --- a/tests/unit/test_output.py +++ b/tests/unit/test_output.py @@ -22,7 +22,7 @@ def assert_mock_bugtool_plugin_output(extracted): return # FIXME: Fix collect_data() for Python3 with open(extracted + "proc_version.out") as proc_version: # type: ignore[unreachable] assert proc_version.read()[:14] == "Linux version " - with open(extracted + "ls-l-%proc%self%fd.out") as reboot: + with open(extracted + "ls-l-%proc%sys%kernel%pty.out") as reboot: assert reboot.read()[:6] == "total " with open(extracted + "proc/self/status") as status: assert status.read()[:5] == "Name:"