freebsd-dev/lib/libcam/Makefile
Enji Cooper b0b1dbdd49 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.

Reviewed by:	asomers, ken (earlier diff)
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision: D9928
2017-03-15 18:00:54 +00:00

51 lines
1.1 KiB
Makefile

# $FreeBSD$
PACKAGE= lib${LIB}
LIB= cam
SHLIBDIR?= /lib
SRCS= camlib.c scsi_cmdparse.c scsi_all.c scsi_da.c scsi_sa.c cam.c \
ata_all.c smp_all.c
INCS= camlib.h
LIBADD= sbuf
MAN= cam.3 cam_cdbparse.3
WARNS?= 2
MLINKS+= cam.3 cam_open_device.3 \
cam.3 cam_open_spec_device.3 \
cam.3 cam_open_btl.3 \
cam.3 cam_open_pass.3 \
cam.3 cam_close_device.3 \
cam.3 cam_close_spec_device.3 \
cam.3 cam_getccb.3 \
cam.3 cam_send_ccb.3 \
cam.3 cam_freeccb.3 \
cam.3 cam_path_string.3 \
cam.3 cam_device_dup.3 \
cam.3 cam_device_copy.3 \
cam.3 cam_get_device.3 \
cam_cdbparse.3 csio_build.3 \
cam_cdbparse.3 csio_build_visit.3 \
cam_cdbparse.3 csio_decode.3 \
cam_cdbparse.3 csio_decode_visit.3 \
cam_cdbparse.3 buff_decode.3 \
cam_cdbparse.3 buff_decode_visit.3 \
cam_cdbparse.3 csio_encode.3 \
cam_cdbparse.3 csio_encode_visit.3 \
cam_cdbparse.3 buff_encode_visit.3
.PATH: ${SRCTOP}/sys/cam/scsi ${SRCTOP}/sys/cam/ata \
${SRCTOP}/sys/cam
CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys
SHLIB_MAJOR= 7
.include <src.opts.mk>
SUBDIR.${MK_TESTS}+= tests
.include <bsd.lib.mk>