Skip to content

Use GotaTun in test manager#9892

Open
hulthe wants to merge 7 commits intomainfrom
test-manager-gotatun
Open

Use GotaTun in test manager#9892
hulthe wants to merge 7 commits intomainfrom
test-manager-gotatun

Conversation

@hulthe
Copy link
Contributor

@hulthe hulthe commented Feb 24, 2026


This change is Reviewable

@hulthe hulthe force-pushed the test-manager-gotatun branch from e08eb07 to 249a571 Compare February 24, 2026 15:50
Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarkusPettersson98 reviewed 6 files and all commit messages, and made 5 comments.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on hulthe).


test/test-manager/src/vm/network/macos.rs line 9 at r1 (raw file):

    },
    unistd::Pid,
};

👋

Code quote:

use nix::{
    sys::{
        signal::{Signal, kill},
        socket::SockaddrStorage,
    },
    unistd::Pid,
};

test/test-manager/Cargo.toml line 11 at r1 (raw file):

[dependencies]
anyhow = { version = "1", features = ["backtrace"] }
async-tempfile = "0.2"

This is unused on macOS now, right?

Code quote:

async-tempfile = "0.2"

test/test-manager/src/vm/network/macos.rs line 87 at r1 (raw file):

}

async fn create_wireguard_interface() -> Result<Device<DefaultDeviceTransports>> {

hell yeah

Code quote:

async fn create_wireguard_interface() -> Result<Device<DefaultDeviceTransports>>

test/test-manager/src/vm/network/macos.rs line 110 at r1 (raw file):

}

pub async fn configure_tunnel() -> Result<()> {

hell. yeah.

Code quote:

pub async fn configure_tunnel() -> Result<()>

test/test-manager/src/main.rs line 455 at r1 (raw file):

    log::info!("Root privileges required. Re-launching with sudo.");
    eprintln!("{cmd:?}");

Seems like a leftover from development? Remove before merge

Code quote:

eprintln!("{cmd:?}");

@hulthe hulthe force-pushed the test-manager-gotatun branch 2 times, most recently from d08384e to ab148a0 Compare February 25, 2026 17:06
@hulthe hulthe force-pushed the test-manager-gotatun branch from ab148a0 to bd49631 Compare March 6, 2026 09:18
@hulthe
Copy link
Contributor Author

hulthe commented Mar 6, 2026

Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
:lgtm:

@MarkusPettersson98 reviewed 5 files and all commit messages, made 1 comment, and resolved 5 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved.

@hulthe hulthe force-pushed the test-manager-gotatun branch from 0d0f99c to ea13202 Compare March 6, 2026 13:52
@hulthe hulthe force-pushed the test-manager-gotatun branch 4 times, most recently from 49df6b1 to 47c5a5a Compare March 6, 2026 14:02
@hulthe hulthe marked this pull request as ready for review March 6, 2026 14:04
@hulthe hulthe force-pushed the test-manager-gotatun branch from e01b017 to d0ecfcc Compare March 6, 2026 14:13
@hulthe hulthe force-pushed the test-manager-gotatun branch from d0ecfcc to 2adbe66 Compare March 6, 2026 14:15
Copy link
Contributor

@tobias-jarvelov tobias-jarvelov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@tobias-jarvelov reviewed 2 files and made 1 comment.
Reviewable status: 5 of 9 files reviewed, all discussions resolved (waiting on MarkusPettersson98).

Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@MarkusPettersson98 reviewed 6 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved.

hulthe and others added 6 commits March 9, 2026 16:24
Unfortunately, creating a TUN device requires the test-manager to run as
root, since macOS has nothing like setcap in Linux. I implemented this
by the `test-manager` sudoing itself if it's not invoked as root. We did
already require passwordless sudo on the test server for the same reason
(creating the tun device using wireguard-go), so this is fine.
@hulthe hulthe force-pushed the test-manager-gotatun branch from 2adbe66 to 892cb68 Compare March 9, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants