mirror of
https://github.com/vishvananda/netlink.git
synced 2025-09-27 04:05:59 +08:00

Add a command to get information about a specific devlink device referenced by device name (bus, device). Remove unused setupDevlinkKModule(). Signed-off-by: Parav Pandit <parav@mellanox.com>
26 lines
452 B
Go
26 lines
452 B
Go
// +build linux
|
|
|
|
package netlink
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestDevLinkGetDeviceList(t *testing.T) {
|
|
minKernelRequired(t, 4, 12)
|
|
setUpNetlinkTestWithKModule(t, "devlink")
|
|
_, err := DevLinkGetDeviceList()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|
|
|
|
func TestDevLinkGetDeviceByName(t *testing.T) {
|
|
minKernelRequired(t, 4, 12)
|
|
setUpNetlinkTestWithKModule(t, "devlink")
|
|
_, err := DevLinkGetDeviceByName("foo", "bar")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|