Page MenuHomeFreeBSD

Add a basic smoke test for if_wg
ClosedPublic

Authored by markj on Mar 11 2021, 4:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 18 2024, 5:10 PM
Unknown Object (File)
Feb 9 2024, 2:26 AM
Unknown Object (File)
Jan 10 2024, 1:39 AM
Unknown Object (File)
Jan 3 2024, 12:13 AM
Unknown Object (File)
Dec 22 2023, 4:16 AM
Unknown Object (File)
Dec 20 2023, 5:29 AM
Unknown Object (File)
Sep 7 2023, 2:44 AM
Unknown Object (File)
Jan 1 2023, 12:25 PM

Details

Reviewers
kevans

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37773
Build 34662: arc lint + arc unit

Event Timeline

markj requested review of this revision.Mar 11 2021, 4:38 PM
This revision is now accepted and ready to land.Mar 12 2021, 5:42 AM

I saw the upstream commit to use the ifnet creator's creds for the socket, so one can keep the wg socket in the host after moving the interface into a child vnet. Working on a test for that too.

I saw the upstream commit to use the ifnet creator's creds for the socket, so one can keep the wg socket in the host after moving the interface into a child vnet. Working on a test for that too.

Excellent, thanks! It's currently a little broken trying to connect to external hosts, but it smells like a timer problem. tcpdump shows packets going out and packets coming back in at a rapid rate and you can observe debug messages to the console even about handshake and keepalive packets flowing.

tests/sys/netinet/if_wg_test.sh
88

After playing around with it a little bit, I'd actually recommend -o instead of -c 3 and also -i 0.25 if we can do that reliably.

tests/sys/netinet/if_wg_test.sh
88

Actually, we can probably drop the timeout entirely and just use -o. See the commit upstream about adding a stage queue -- we were consistently dropping the first icmp packet, but we shouldn't have been; that likely applies here, too.

Just a small nitpicking: do we really need _test suffix?

Just a small nitpicking: do we really need _test suffix?

No, I was following the example of other cloned interface tests (see tests/sys/net) and tried to be consistent with the majority. I will change it.

No, I was following the example of other cloned interface tests (see tests/sys/net) and tried to be consistent with the majority. I will change it.

Got it. I don't have a strong opinion. It's more curious. There are two conventions of naming in tests/sys/net so I think both of them are fine. Eventually, we should unify the naming, but that can wait after our tests get more mature.

Crap, sorry, I forgot to remove this before I merged our branch over. =(

Crap, sorry, I forgot to remove this before I merged our branch over. =(

Oh no problem. Was it worth committing at all in light of the port of netns.sh? I didn't spend much more time on this once I saw you were working on that.

Crap, sorry, I forgot to remove this before I merged our branch over. =(

Oh no problem. Was it worth committing at all in light of the port of netns.sh? I didn't spend much more time on this once I saw you were working on that.

I think it's useful to have some basic functional tests hooked up for Jenkins to bristle at -- netns.sh covers all of this, but it's a lot more like stress2 in nature

Crap, sorry, I forgot to remove this before I merged our branch over. =(

Oh no problem. Was it worth committing at all in light of the port of netns.sh? I didn't spend much more time on this once I saw you were working on that.

I think it's useful to have some basic functional tests hooked up for Jenkins to bristle at -- netns.sh covers all of this, but it's a lot more like stress2 in nature

Fair enough.