History log of /freebsd-current/lib/libnv/tests/nv_tests.cc
Revision Date Author Comments
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 6399b5e0 29-May-2017 Enji Cooper <ngie@FreeBSD.org>

:nvlist_unpack__duplicate_key : check the result of nvlist_pack(3)

This fixes a potential NULL pointer dereference.

MFC after: 3 days
Reported by: Coverity
CID: 1362051
Sponsored by: Dell EMC Isilon


# c36e54bb 02-Jul-2015 Mariusz Zaborski <oshogbo@FreeBSD.org>

Let the nv.h and dnv.h includes be only in sys directory.

Change consumers to include those files from sys.
Add duplicated files to ObsoleteFiles.

Approved by: pjd (mentor)


# 00173c09 02-May-2015 Mariusz Zaborski <oshogbo@FreeBSD.org>

Add test case for unpack with diffrent flags.

Approved by: pjd (mentor)


# bd1da0a0 02-May-2015 Mariusz Zaborski <oshogbo@FreeBSD.org>

Approved, oprócz użycie RESTORE_ERRNO() do ustawiania errno.

Change the nvlist_recv() function to take additional argument that
specifies flags expected on the received nvlist. Receiving a nvlist with
different set of flags than the ones we expect might lead to undefined
behaviour, which might be potentially dangerous.

Update consumers of this and related functions and update the tests.

Approved by: pjd (mentor)

Update man page for nvlist_unpack, nvlist_recv, nvlist_xfer, cap_recv_nvlist
and cap_xfer_nvlist.

Reviewed by: AllanJude
Approved by: pjd (mentor)


# 37c6848c 29-Apr-2015 Mariusz Zaborski <oshogbo@FreeBSD.org>

Remove the use of nvlist_.*[fv] functions from tests.

Approved by: pjd (mentor)


# bf5d6cf0 07-Mar-2015 Dimitry Andric <dim@FreeBSD.org>

Fix lib/libnv tests compilation with -std=c++11, by adding appropriate
casts for NULL to invocations of the ATF_REQUIER_EQ() macro.

Reviewed by: rstone, jmmv
Differential Revision: https://reviews.freebsd.org/D2027


# 081abde4 28-Feb-2015 Ryan Stone <rstone@FreeBSD.org>

Fix build of nv_tests.cc

nv_tests.cc managed to get two copies of several functions due to me
applying a patch in an unclean working tree. My kingdom for an
"svn clean" command.

MFC after: 1 month
X-MFC-With: r279424


# 19a4afb3 28-Feb-2015 Ryan Stone <rstone@FreeBSD.org>

Prevent creation of an invalid nvlist

If an nvlist is set as a child of another nvlist with
nvlist_move_nvlist then fail the operation and set the parent
nvlist to the error state.

Differential Revision: https://reviews.freebsd.org/D1880
Reviewers: jfv
MFC after: 1 month
Sponsored by: Sandvine Inc


# a87e5162 28-Feb-2015 Ryan Stone <rstone@FreeBSD.org>

Add function to force an nvlist into the error state

Add an nvlist_set_error() function that can be used to force an
nvlist into the error state. This is useful both for writing
tests and for writing APIs that use nvlists internally.

Differential Revision: https://reviews.freebsd.org/D1878
Reviewed by: pjd, jfv
MFC After: 1 month
Sponsored by: Sandvine Inc.


# 339bcfc7 28-Feb-2015 Ryan Stone <rstone@FreeBSD.org>

Add tests for nvlist_free* functions

Differential Revision: https://reviews.freebsd.org/D1874
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.


# fad0a264 28-Feb-2015 Ryan Stone <rstone@FreeBSD.org>

Add tests for nvlist_take_*

Differential Revision: https://reviews.freebsd.org/D1873
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.


# 71637d76 28-Feb-2015 Ryan Stone <rstone@FreeBSD.org>

Add test cases for nvlist_move_*

Differential Revision: https://reviews.freebsd.org/D1872
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.


# 6c721f82 28-Feb-2015 Ryan Stone <rstone@FreeBSD.org>

Add tests for nvlist_pack/unpack

Differential Revision: https://reviews.freebsd.org/D1871
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.


# 6e623ffd 28-Feb-2015 Ryan Stone <rstone@FreeBSD.org>

Add tests for nvlist_clone

Differential Revision: https://reviews.freebsd.org/D1870
Reviewed by: pjd, jfv
MFC after: 1 month
Sponsored by: Sandvine Inc


# 3075c896 28-Feb-2015 Ryan Stone <rstone@FreeBSD.org>

Tests of basic nvlist add functions

Differential Revision: https://reviews.freebsd.org/D1869
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.