svn commit: r315695 - in stable/11: etc/mtree lib/libcam lib/libcam/tests
Ngie Cooper
ngie at FreeBSD.org
Wed Mar 22 01:04:22 UTC 2017
Author: ngie
Date: Wed Mar 22 01:04:20 2017
New Revision: 315695
URL: https://svnweb.freebsd.org/changeset/base/315695
Log:
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.
Added:
stable/11/lib/libcam/tests/
- copied from r315320, head/lib/libcam/tests/
Modified:
stable/11/etc/mtree/BSD.tests.dist
stable/11/lib/libcam/Makefile
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/etc/mtree/BSD.tests.dist
==============================================================================
--- stable/11/etc/mtree/BSD.tests.dist Wed Mar 22 00:50:36 2017 (r315694)
+++ stable/11/etc/mtree/BSD.tests.dist Wed Mar 22 01:04:20 2017 (r315695)
@@ -308,6 +308,8 @@
ttyio
..
..
+ libcam
+ ..
libcrypt
..
libdevdctl
Modified: stable/11/lib/libcam/Makefile
==============================================================================
--- stable/11/lib/libcam/Makefile Wed Mar 22 00:50:36 2017 (r315694)
+++ stable/11/lib/libcam/Makefile Wed Mar 22 01:04:20 2017 (r315695)
@@ -43,4 +43,10 @@ CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys
SHLIB_MAJOR= 7
+.include <src.opts.mk>
+
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.lib.mk>
More information about the svn-src-stable-11
mailing list