Date: Wed, 22 Mar 2017 01:11:13 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r315696 - in stable/10: etc/mtree lib/libcam lib/libcam/tests Message-ID: <201703220111.v2M1BEsj020908@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Wed Mar 22 01:11:13 2017 New Revision: 315696 URL: https://svnweb.freebsd.org/changeset/base/315696 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/10/lib/libcam/tests/ - copied from r315320, head/lib/libcam/tests/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/lib/libcam/Makefile stable/10/lib/libcam/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Wed Mar 22 01:04:20 2017 (r315695) +++ stable/10/etc/mtree/BSD.tests.dist Wed Mar 22 01:11:13 2017 (r315696) @@ -306,6 +306,8 @@ ttyio .. .. + libcam + .. libcrypt .. libmp Modified: stable/10/lib/libcam/Makefile ============================================================================== --- stable/10/lib/libcam/Makefile Wed Mar 22 01:04:20 2017 (r315695) +++ stable/10/lib/libcam/Makefile Wed Mar 22 01:11:13 2017 (r315696) @@ -43,4 +43,10 @@ CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys SHLIB_MAJOR= 6 +.include <bsd.own.mk> + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include <bsd.lib.mk> Modified: stable/10/lib/libcam/tests/Makefile ============================================================================== --- head/lib/libcam/tests/Makefile Wed Mar 15 18:00:54 2017 (r315320) +++ stable/10/lib/libcam/tests/Makefile Wed Mar 22 01:11:13 2017 (r315696) @@ -2,7 +2,9 @@ ATF_TESTS_C+= libcam_test -LIBADD+= cam +LDADD+= -lcam + +DPADD+= ${LIBCAM} WARNS?= 6
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703220111.v2M1BEsj020908>