git: 07940d1d85eb - main - atf_python: Run vnet handlers in $HOME
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 02 Feb 2026 16:55:15 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=07940d1d85eb338853fcba0697c6b9a96412a7f2
commit 07940d1d85eb338853fcba0697c6b9a96412a7f2
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-02-02 14:52:43 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-02-02 16:54:54 +0000
atf_python: Run vnet handlers in $HOME
When kyua runs a test, it creates a temp directory and sets $HOME to
point to it. Tests are run with the cwd set to that temp directory.
When a process attaches to a jail, its cwd is set to the root of the
jail. Modify atf_python to cd to $HOME instead, so that it's easier for
tests to share files.
Reviewed by: zlei, ngie
MFC after: 2 weeks
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D54971
---
tests/atf_python/sys/net/vnet.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py
index 93bfa4437940..a6e620b49d59 100644
--- a/tests/atf_python/sys/net/vnet.py
+++ b/tests/atf_python/sys/net/vnet.py
@@ -357,6 +357,7 @@ class VnetTestTemplate(BaseTest):
vnetX_handler() after setting up interface addresses
"""
vnet.attach()
+ os.chdir(os.getenv("HOME"))
print("# setup_vnet({})".format(vnet.name))
if pipe is not None:
vnet.set_pipe(pipe)