Commit Graph

5 Commits

Author SHA1 Message Date
Vishvananda Abrams
1e35ba25dc test: Improve test reliability with proper cleanup and isolation
Refactors test setup and teardown logic to use `t.Cleanup` instead
of `defer`. This ensures that cleanup functions are correctly scoped
to each subtest's lifecycle, improving test isolation and reliability.

The `setUpNetlinkTest` helper function is also improved to correctly
save and restore the original network namespace, ensuring that tests
do not leak state.

To support this, a `Close()` method that returns an error is added to
the `Handle` struct, allowing for proper cleanup of underlying netlink
sockets. The test helpers are updated to use this new method,
preventing resource leaks between tests.

Additionally, a bug in the `netns` tests is fixed where a large
namespace ID could overflow a 32-bit integer, causing spurious
failures on some systems.
2025-08-27 09:24:17 -07:00
Tobias Klauser
3d9b64dc8d Remove always-nil deserializeFouMsg error return value
The error is always nil. Remove it to simplify the callers.
2025-07-22 09:50:59 -07:00
feng
a01829657b Fix FouList attribute body truncated error with kernel 5.2+
fou module added a bunch of new attributes in commit
1713cb37bf

which caused the old parsing logic failed, fix and add support for these attrributes.
2024-09-09 10:36:41 -07:00
Alessandro Boch
fad79cbcae Fix go build issue for fou code
Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
2017-11-27 11:05:30 -08:00
Reinier Schoof
bdf753e87c added support for Foo-over-UDP netlink calls
Signed-off-by: Reinier Schoof <reinier@skoef.nl>
2017-11-13 12:13:59 -08:00