Skip to content

Commit

Permalink
genetlink: skip integration test if family missing
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Layher <mdlayher@gmail.com>
  • Loading branch information
mdlayher committed Nov 12, 2022
1 parent 9300a1f commit 30b6af3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion conn_linux_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//go:build linux
// +build linux

package genetlink_test

Expand Down Expand Up @@ -158,12 +159,20 @@ func TestIntegrationConnConcurrentSerializeExecute(t *testing.T) {

const iterations = 2000

// Pick families that are likely to exist on any given system.
// Pick families that are likely to exist on any given system. If they
// don't, just skip the test. See:
// https://github.com/mdlayher/genetlink/issues/7.
families := []string{
"nlctrl",
"acpi_event",
}

for _, f := range families {
if _, err := c.GetFamily(f); err != nil {
t.Skipf("skipping, could not get family %q: %v", f, err)
}
}

var wg sync.WaitGroup
wg.Add(len(families))
defer wg.Wait()
Expand Down

0 comments on commit 30b6af3

Please # to comment.