Page MenuHomeFreeBSD

Polish netmap(4) testcases a bit
ClosedPublic

Authored by ngie on Apr 9 2019, 4:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 31, 5:23 PM
Unknown Object (File)
Tue, Dec 31, 4:27 PM
Unknown Object (File)
Sun, Dec 29, 8:10 PM
Unknown Object (File)
Wed, Dec 25, 7:22 PM
Unknown Object (File)
Nov 21 2024, 8:38 AM
Unknown Object (File)
Nov 20 2024, 10:51 PM
Unknown Object (File)
Sep 24 2024, 8:52 AM
Unknown Object (File)
Sep 23 2024, 2:46 PM
Subscribers

Details

Summary
  1. Not all kernels have netmap(4) support. Check for it before continuing.
  2. Libraries shouldn't be added to LDFLAGS; they should be added to LIBADD instead.
  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
MFC after: 1 week

Test Plan

Ran the tests on a kernel with netmap(4) support:

$ sudo kldload if_tap
$ sudo kyua debug -k /usr/tests/sys/netmap/Kyuafile ctrl-api-test:main
...
==> Test #41 [legacy_regif_extra_bufs_pipe_vale] successful
Executing command: ifconfig tap3858 destroy
Test passed!
ioctl(/dev/netmap, NIOCCTRL, POOLS_INFO_GET): Device not configured
ioctl(/dev/netmap, NIOCCTRL, REGISTER): Invalid argument
ioctl(/dev/netmap, NIOCCTRL, VALE_POLLING_ENABLE): Operation not supported
ioctl(/dev/netmap, NIOCCTRL, REGISTER): Operation not supported
ioctl(/dev/netmap, NIOCCTRL, REGISTER): Message too long
ioctl(/dev/netmap, NIOCCTRL, REGISTER): Invalid argument
ioctl(/dev/netmap, NIOCCTRL, SYNC_KLOOP_START): Invalid argument
ioctl(/dev/netmap, NIOCCTRL, SYNC_KLOOP_START): Device busy
ioctl(/dev/netmap, NIOCCTRL, SYNC_KLOOP_START): Invalid argument
ctrl-api-test:main  ->  passed

Ran the tests on a kernel without netmap(4) support:

$ kldstat -m netmap
kldstat: can't find module netmap: No such file or directory
$ sudo kyua test -k /usr/tests/sys/netmap/Kyuafile 
ctrl-api-test:main  ->  passed  [0.005s]

Results file id is usr_tests_sys_netmap.20190409-173029-976117
Results saved to /root/.kyua/store/results.usr_tests_sys_netmap.20190409-173029-976117.db

1/1 passed (0 failed)
$ sudo /usr/tests/sys/netmap/ctrl-api-test 
module netmap could not be resolved: No such file or directory

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ngie added a reviewer: asomers.
This revision is now accepted and ready to land.Apr 9 2019, 5:33 PM
This revision was automatically updated to reflect the committed changes.