Commit Graph

21 Commits

Author SHA1 Message Date
Mariusz Zaborski
c36e54bb32 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)
2015-07-02 21:58:10 +00:00
Mariusz Zaborski
00173c094e Add test case for unpack with diffrent flags.
Approved by:	pjd (mentor)
2015-05-02 18:07:47 +00:00
Mariusz Zaborski
bd1da0a002 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)
2015-05-02 17:45:52 +00:00
Mariusz Zaborski
37c6848ce6 Remove the use of nvlist_.*[fv] functions from tests.
Approved by:	pjd (mentor)
2015-04-29 22:46:18 +00:00
Dimitry Andric
bf5d6cf0a9 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
2015-03-08 00:30:52 +00:00
Ryan Stone
081abde45c 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
2015-03-01 00:37:23 +00:00
Ryan Stone
19a4afb3e6 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
2015-03-01 00:22:38 +00:00
Ryan Stone
a87e516267 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.
2015-03-01 00:22:23 +00:00
Ryan Stone
2dfd9979d8 Extend the unit test to fix the bug caught in r277925
Differential Revision:		https://reviews.freebsd.org/D1888
MFC After:			1 month
Sponsored by:			Sandvine Inc.
2015-03-01 00:22:09 +00:00
Ryan Stone
7e15db629c Add tests for dnvlist_take_*
Differential Revision:		https://reviews.freebsd.org/D1876
Reviewed by:			jfv, pjd
MFC after:			1 month
Sponsored by:			Sandvine Inc.
2015-03-01 00:22:03 +00:00
Ryan Stone
3d1b7ccbd3 Add tests for dnv_get_*
Differential Revision:		https://reviews.freebsd.org/D1875
Reviewed by:			jfv, pjd
MFC after:			1 month
Sponsored by:			Sandvine Inc.
2015-03-01 00:21:56 +00:00
Ryan Stone
339bcfc7f8 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.
2015-03-01 00:21:50 +00:00
Ryan Stone
fad0a26408 Add tests for nvlist_take_*
Differential Revision:		https://reviews.freebsd.org/D1873
Reviewed by:			jfv, pjd
MFC after:			1 month
Sponsored by:			Sandvine Inc.
2015-03-01 00:21:43 +00:00
Ryan Stone
71637d76b1 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.
2015-03-01 00:21:37 +00:00
Ryan Stone
6c721f8217 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.
2015-03-01 00:21:30 +00:00
Ryan Stone
6e623ffd77 Add tests for nvlist_clone
Differential Revision:		https://reviews.freebsd.org/D1870
Reviewed by:			pjd, jfv
MFC after:			1 month
Sponsored by:			Sandvine Inc
2015-03-01 00:21:24 +00:00
Ryan Stone
3075c896f0 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.
2015-03-01 00:20:57 +00:00
Ryan Stone
c58da4beb1 Revert r279422. My "apply patch and commit" script wasn't adding
new files properly.

Pointy hat to: rstone
2015-03-01 00:05:45 +00:00
Ryan Stone
65d1148aa6 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.
2015-03-01 00:01:44 +00:00
Baptiste Daroussin
6b129086dc Convert libraries to use LIBADD
While here reduce a bit overlinking
2014-11-25 11:07:26 +00:00
Enji Cooper
b236bcf168 Integrate lib/libnv into the build/kyua
Rename all of the TAP test applications from <test> to <test>_test
to match the convention described in the TestSuite wiki page

Phabric: D538
Approved by: jmmv (mentor)
Sponsored by: EMC / Isilon Storage Division
2014-08-05 18:41:27 +00:00