freebsd-dev/lib/libkvm/Makefile
Enji Cooper 10f81a9b3b lib/libkvm: start adding basic tests for kvm(3)
- kvm_close: add a testcase to verify support for errno = EINVAL / -1
  (see D10065) when kd == NULL is provided to the libcall.
- kvm_geterr:
-- Add a negative testcase for kd == NULL returning "" (see D10022).
-- Add two positive testcases:
--- test the error case using kvm_write on a O_RDONLY descriptor.
--- test the "no error" case using kvm_read(3) and kvm_nlist(3) as
    helper routines and by injecting a bogus error message via
    _kvm_err (an internal API) _kvm_err was used as there isn't a
    formalized way to clear the error output, and because
    kvm_nlist always returns ENOENT with the NULL terminator today.
- kvm_open, kvm_open2:
-- Add some basic negative tests for kvm_open(3) and kvm_open2(3).
   Testing positive cases with a specific
   `corefile`/`execfile`/`resolver` requires more work and would require
   user intervention today in order to reliably test this out.

Reviewed by:	markj
MFC after:	2 months
Sponsored by:	Dell EMC Isilon
Differential Revision:	D10024
2017-03-28 17:37:49 +00:00

44 lines
1.1 KiB
Makefile

# @(#)Makefile 8.1 (Berkeley) 6/4/93
# $FreeBSD$
PACKAGE=lib${LIB}
LIB= kvm
SHLIBDIR?= /lib
SHLIB_MAJOR= 7
CFLAGS+=-DLIBC_SCCS -I${.CURDIR}
WARNS?= 6
SRCS= kvm.c kvm_cptime.c kvm_getloadavg.c \
kvm_getswapinfo.c kvm_pcpu.c kvm_private.c kvm_proc.c kvm_vnet.c \
kvm_minidump_aarch64.c \
kvm_amd64.c kvm_minidump_amd64.c \
kvm_arm.c kvm_minidump_arm.c \
kvm_i386.c kvm_minidump_i386.c \
kvm_minidump_mips.c \
kvm_powerpc.c kvm_powerpc64.c \
kvm_sparc64.c
INCS= kvm.h
LIBADD= elf
MAN= kvm.3 kvm_getcptime.3 kvm_geterr.3 kvm_getloadavg.3 \
kvm_getpcpu.3 kvm_getprocs.3 kvm_getswapinfo.3 kvm_native.3 \
kvm_nlist.3 kvm_open.3 kvm_read.3
MLINKS+=kvm_getpcpu.3 kvm_getmaxcpu.3 \
kvm_getpcpu.3 kvm_dpcpu_setcpu.3 \
kvm_getpcpu.3 kvm_read_zpcpu.3 \
kvm_getpcpu.3 kvm_counter_u64_fetch.3
MLINKS+=kvm_getprocs.3 kvm_getargv.3 kvm_getprocs.3 kvm_getenvv.3
MLINKS+=kvm_nlist.3 kvm_nlist2.3
MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_open2.3 kvm_open.3 kvm_openfiles.3
MLINKS+=kvm_read.3 kvm_read2.3 kvm_read.3 kvm_write.3
.include <src.opts.mk>
SUBDIR.${MK_TESTS}= tests
.include <bsd.lib.mk>