mirror of
https://github.com/vishvananda/netlink.git
synced 2025-11-03 01:53:26 +08:00
Add RouteListFilteredIter API.
Allows for listing large numbers of routes without buffering the whole list in memory at once. Add benchmarks for RouteListFiltered variants.
This commit is contained in:
committed by
Alessandro Boch
parent
b7b7ca8632
commit
b54f85093f
@@ -23,7 +23,7 @@ import (
|
||||
|
||||
type tearDownNetlinkTest func()
|
||||
|
||||
func skipUnlessRoot(t *testing.T) {
|
||||
func skipUnlessRoot(t testing.TB) {
|
||||
t.Helper()
|
||||
|
||||
if os.Getuid() != 0 {
|
||||
@@ -53,7 +53,7 @@ func skipUnlessKModuleLoaded(t *testing.T, module ...string) {
|
||||
}
|
||||
}
|
||||
|
||||
func setUpNetlinkTest(t *testing.T) tearDownNetlinkTest {
|
||||
func setUpNetlinkTest(t testing.TB) tearDownNetlinkTest {
|
||||
skipUnlessRoot(t)
|
||||
|
||||
// new temporary namespace so we don't pollute the host
|
||||
|
||||
Reference in New Issue
Block a user