git: 8845df6a4caa - stable/14 - atf_python: Run vnet handlers in $HOME
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 16 Feb 2026 19:47:30 UTC
The branch stable/14 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=8845df6a4caa08a0ae52eedfcf177b1b53a1057a
commit 8845df6a4caa08a0ae52eedfcf177b1b53a1057a
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-02-02 14:52:43 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-02-16 16:09:28 +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
(cherry picked from commit 07940d1d85eb338853fcba0697c6b9a96412a7f2)
---
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 41d612fc7c7f..d76933cb69a2 100644
--- a/tests/atf_python/sys/net/vnet.py
+++ b/tests/atf_python/sys/net/vnet.py
@@ -350,6 +350,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)