]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r315320:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 22 Mar 2017 01:11:13 +0000 (01:11 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 22 Mar 2017 01:11:13 +0000 (01:11 +0000)
commit69bd77a020aa957e18da56d99061090746e0b25b
tree728c126dfa12a6a2403530b3389866d4ccc60d26
parenta0bae5772f918f9317be284925c876d2282769b1
MFC r315320:

Start adding basic tests for cam(3)

This change contains several negative and positive tests for:
- cam_open_device
- cam_close_device
- cam_getccb
- cam_freeccb

This also contains a test for the failure case noted in bug 217649,
i.e., O_RDWR must be specified because pass(4) requires it.

This test unfortunately cannot assume that cam-capable devices are
present, so the user must explicitly provide a device via
`test_suites.FreeBSD.cam_test_device`. In the future, a test kernel
module might be shipped, or ctl(4) might be used, as a test device
when testing out libcam, which will allow the tests to do away with
having to specify an explicit test device.

git-svn-id: svn://svn.freebsd.org/base/stable/10@315696 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
etc/mtree/BSD.tests.dist
lib/libcam/Makefile
lib/libcam/tests/Makefile [new file with mode: 0644]
lib/libcam/tests/libcam_test.c [new file with mode: 0644]