diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2026-02-02 14:52:43 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2026-02-02 16:54:54 +0000 |
| commit | 07940d1d85eb338853fcba0697c6b9a96412a7f2 (patch) | |
| tree | 63d61c368c5f820611206ec3fc45e7caf7d6f082 | |
| parent | d0309745e621dd0554f271f4b7e2bc5e8ff597e4 (diff) | |
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
| -rw-r--r-- | tests/atf_python/sys/net/vnet.py | 1 |
1 files changed, 1 insertions, 0 deletions
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) |
