Bug 237129 - sys.netmap.ctrl-api-test.main fails on ^/stable/11 and ^/stable/12 i386 because the kernel lacks netmap support
Summary: sys.netmap.ctrl-api-test.main fails on ^/stable/11 and ^/stable/12 i386 becau...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Enji Cooper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-09 01:04 UTC by Enji Cooper
Modified: 2019-04-16 02:29 UTC (History)
4 users (show)

See Also:
ngie: mfc-stable10-
ngie: mfc-stable11?
ngie: mfc-stable12?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer 2019-04-09 01:04:27 UTC
From https://ci.freebsd.org/job/FreeBSD-stable-12-i386-test/754/testReport/junit/sys.netmap/ctrl-api-test/main/ :

open(/dev/netmap): No such file or directory

It looks like the ^/stable/12 i386 kernel doesn't have netmap support in it, which triggers the error noted above.
Comment 1 Enji Cooper freebsd_committer 2019-04-09 01:16:38 UTC
I see the same issue with ^/stable/11.
Comment 2 Olivier Cochard freebsd_committer 2019-04-09 14:13:32 UTC
What is the best way to solve it ?
1. Adding a kernel FEATURE(netmap,"...") declaration and check for this in the test?
2. Checking for /dev/netmap in the test script ?
Comment 3 Enji Cooper freebsd_committer 2019-04-09 16:28:05 UTC
(In reply to Olivier Cochard from comment #2)

The best way to solve this is to check for the kernel module. netmap(4) doesn't have any kernel features associated with it, so adding a check wouldn't do much good.

I'll have a patch out soon for this.
Comment 4 commit-hook freebsd_committer 2019-04-09 17:52:28 UTC
A commit references this bug:

Author: ngie
Date: Tue Apr  9 17:52:12 UTC 2019
New revision: 346061
URL: https://svnweb.freebsd.org/changeset/base/346061

Log:
  Polish netmap(4) testcases a bit

  1. Not all kernels have netmap(4) support. Check for netmap(4) support before
     attempting to run the tests via the `PLAIN_REQUIRE_KERNEL_MODULE(..)` macro.
  2. Libraries shouldn't be added to LDFLAGS; they should be added to LIBADD
     instead. This allows the build system to evaluate dependencies for sanity.
  3. Sort some of the Makefile variables per bsd.README.

  1., in particular, will resolve failures when running this testcase on kernels
  lacking netmap(4) support, e.g., the i386 GENERIC kernels on ^/stable/11 and
  ^/stable/12.

  PR:		237129
  Reviewed by:	vmaffione
  Approved by:	emaste (mentor)
  MFC after:	1 week
  Differential Revision:	https://reviews.freebsd.org/D19864

Changes:
  head/tests/sys/netmap/Makefile
  head/tests/sys/netmap/ctrl-api-test.c
Comment 5 commit-hook freebsd_committer 2019-04-16 01:04:30 UTC
A commit references this bug:

Author: ngie
Date: Tue Apr 16 01:03:33 UTC 2019
New revision: 346256
URL: https://svnweb.freebsd.org/changeset/base/346256

Log:
  MFC r345644,r346061:

  r345644 (by olivier):

  Skip this test if if_tap module is not available

  PR:		236842

  r346061:

  Polish netmap(4) testcases a bit

  1. Not all kernels have netmap(4) support. Check for netmap(4) support before
     attempting to run the tests via the `PLAIN_REQUIRE_KERNEL_MODULE(..)` macro.
  2. Libraries shouldn't be added to LDFLAGS; they should be added to LIBADD
     instead. This allows the build system to evaluate dependencies for sanity.
  3. Sort some of the Makefile variables per bsd.README.

  1., in particular, will resolve failures when running this testcase on kernels
  lacking netmap(4) support, e.g., the i386 GENERIC kernels on ^/stable/11 and
  ^/stable/12.

  PR:		237129

Changes:
_U  stable/11/
  stable/11/tests/sys/netmap/Makefile
  stable/11/tests/sys/netmap/ctrl-api-test.c
Comment 6 commit-hook freebsd_committer 2019-04-16 01:04:35 UTC
A commit references this bug:

Author: ngie
Date: Tue Apr 16 01:03:38 UTC 2019
New revision: 346257
URL: https://svnweb.freebsd.org/changeset/base/346257

Log:
  MFC r345644,r346061:

  r345644 (by olivier):

  Skip this test if if_tap module is not available

  PR:		236842

  r346061:

  Polish netmap(4) testcases a bit

  1. Not all kernels have netmap(4) support. Check for netmap(4) support before
     attempting to run the tests via the `PLAIN_REQUIRE_KERNEL_MODULE(..)` macro.
  2. Libraries shouldn't be added to LDFLAGS; they should be added to LIBADD
     instead. This allows the build system to evaluate dependencies for sanity.
  3. Sort some of the Makefile variables per bsd.README.

  1., in particular, will resolve failures when running this testcase on kernels
  lacking netmap(4) support, e.g., the i386 GENERIC kernels on ^/stable/11 and
  ^/stable/12.

  PR:		237129

Changes:
_U  stable/12/
  stable/12/tests/sys/netmap/Makefile
  stable/12/tests/sys/netmap/ctrl-api-test.c