History log of /freebsd-11-stable/lib/libnv/tests/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
336346 16-Jul-2018 kevans

MFC r304910, r304912, r304915, r304952, r325019, r328164, r331094, r332664,
r335341-r335345, r335347, r335379-r335380, r335382

r304910:
Introduce cnv man page.

r304912:
Add missed header file for cnv.h .

r304915:
Bump date in the man page.

r304952:
Remove duplicated declaration.

r325019:
Introduce cnvlist_name() and cnvlist_type() functions.

Those function can be used when we are iterating over nvlist to reduce
amount of extra variables we need to declare.

r328164:
libnv: Use mallocarray(9) for the nv_calloc.

r331094:
Fix formatting errors that resulted in apropos(1) output looking weird.

r332664:
Add missing argument in the cnv man page.

r335341:
libnv: change name of cookie from cookiep to cookie.

The name was inconsistent with rest of the library.
No functional change intended.

r335342:
libnv: add const to cookies arguments

r335343:
libnv: Remove nvlist argument from cnvlist_{take,free}_* functions.

All information which are need for those operations is already stored in
the cookie.

We decided not to bump libnv version because this API is not used yet in the
base system.

r335344:
libnv: clean parent in nvlist_array when removing it.

When we are removing element form the nvlist we should also clean parent,
because the array is not a part of the nvlist anymore.

r335345:
libnv: add regression test for r335344.

r335347:
libnv: Add nvlist_append_*_array() family of functions.

The nvlist_append_{bool,number,string,nvlist,descriptor}_array() functions
allows to dynamically extend array stored in the nvlist.

r335379:
Set prev to NULL so its garaunteed to have a value of some kind and
gcc doesn't explode. Feel free to fix this correctly or whatever for
gcc builds.

This *should* quiesce tinderbox after r335347 for the gcc builds.

r335380:
style(9) fix, I was also going to silence gcc.

r335382:
Really fix the style.

336345 16-Jul-2018 kevans

MFC r304908-r304909

r304908:
Add cnv API.

cnv API is a set of functions for managing name/value pairs by cookie.
The cookie can be obtained by nvlist_next(), nvlist_get_parent() or
nvlist_get_pararr() function. This patch also includes unit tests.

Submitted by: Adam Starak <starak.adam@gmail.com>

r304909:
Fix style issue in the cnv API.
Remove unused arguments in a macro.
Remove unused typedef.

319371 01-Jun-2017 ngie

MFC r319156,r319159:

r319156:

:nvlist_unpack__duplicate_key : check the result of nvlist_pack(3)

This fixes a potential NULL pointer dereference.

CID: 1362051

r319159:

:dnvlist_get_string__default_value: fix a bogus string comparison test

Check actual_value vs "5", not "5" vs itself.

CID: 1362021

302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
299094 04-May-2016 ngie

Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed
after r298107

Summary of changes:

- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that
namespacing is kept with FILES appropriately, and that this shouldn't need
to be repeated if the namespace changes -- only the definition of PACKAGE
needs to be changed
- Allow PACKAGE to be overridden by callers instead of forcing it to always be
`tests`. In the event we get to the point where things can be split up
enough in the base system, it would make more sense to group the tests
with the blocks they're a part of, e.g. byacc with byacc-tests, etc
- Remove PACKAGE definitions where possible, i.e. where FILES wasn't used
previously.
- Remove unnecessary TESTSPACKAGE definitions; this has been elided into
bsd.tests.mk
- Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES;
${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.
- Fix installation of files under data/ subdirectories in lib/libc/tests/hash
and lib/libc/tests/net/getaddrinfo
- Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)

Document the proposed changes in share/examples/tests/tests/... via examples
so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of
replacing FILES. share/mk/bsd.README didn't seem like the appropriate method
of communicating that info.

MFC after: never probably
X-MFC with: r298107
PR: 209114
Relnotes: yes
Tested with: buildworld, installworld, checkworld; buildworld, packageworld
Sponsored by: EMC / Isilon Storage Division


298107 16-Apr-2016 gjb

Merge the projects/release-pkg branch to head.

This allows packaging the base system with pkg(8), including
but not limited to providing the ability to provide upstream
binary update possibilities for non-tier-1 architectures.

This merge is a requirement of the 11.0-RELEASE, and as such,
thank you to everyone that has tested the project branch.

Documentation in build(7) etc. is still somewhat sparse, but
updates to those parts will follow.

Sponsored by: The FreeBSD Foundation


296587 09-Mar-2016 bdrewery

DIRDEPS_BUILD: Connect MK_TESTS.

Sponsored by: EMC / Isilon Storage Division


293135 04-Jan-2016 ngie

Remove free'ing of an uninitialized variable

Just remove it completely from the test as it's initialized but unused apart
from the free(3) call

Differential Revision: https://reviews.freebsd.org/D4769 (part of larger diff)
MFC after: 5 days
Reported by: cppcheck
Reviewed by: oshogbo
Sponsored by: EMC / Isilon Storage Division


293134 04-Jan-2016 ngie

Use `nitems(x)` macro instead of using hardcoded numbers for indices into
the nvlists

Convert some of the variables from int to unsigned int to squelch -Wsign-compare
warnings when converting hardcoded values to nitems(..)

Differential Revision: https://reviews.freebsd.org/D4769 (part of larger diff)
MFC after: 5 days
Reviewed by: oshogbo
Sponsored by: EMC / Isilon Storage Division


293131 04-Jan-2016 ngie

Convert another `string` variable to `string_arr` missed in r293130

Differential Revision: https://reviews.freebsd.org/D4769 (part of larger diff)
MFC after: 5 days
Reviewed by: oshogbo
Sponsored by: EMC / Isilon Storage Division


293130 04-Jan-2016 ngie

Rename nitems and string variables to avoid collisions

Rename the `nitems` variable to `num_items` to avoid collisions with the
macro in sys/param.h for counting elements in an array

Similarly, rename `string` to `string_arr` to avoid future collisions with
potential keywords, as well as make it clear that `string_arr` isn't a char*
value, but instead a char** value.

Differential Revision: https://reviews.freebsd.org/D4769 (part of larger diff)
MFC after: 5 days
Reviewed by: oshogbo
Sponsored by: EMC / Isilon Storage Division


293102 03-Jan-2016 ngie

Add sys/types.h for for size_t, etc

stable/10 requires it due to header pollution

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division


289172 12-Oct-2015 ngie

Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
netbsd-tests.test.mk (r289151)

- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Divison


286796 15-Aug-2015 oshogbo

Add support for the arrays in nvlist library.

- Add
nvlist_{add,get,take,move,exists,free}_{number,bool,string,nvlist,
descriptor} functions.
- Add support for (un)packing arrays.
- Add the nvl_array_next field to the nvlist structure.
If an array is added by the nvlist_{move,add}_nvlist_array function
this field will contains next element in the array.
- Add the nitems field to the nvpair and nvpair_header structure.
This field contains number of elements in the array.
- Add special flag (NV_FLAG_IN_ARRAY) which is set if nvlist is a part of
an array.
- Add special type (NV_TYPE_NVLIST_ARRAY_NEXT).This type is used only
on packing/unpacking.
- Add new API for traversing arrays (nvlist_get_array_next).
- Add the nvlist_get_pararr function which combines the
nvlist_get_array_next and nvlist_get_parent functions. If nvlist is in
the array it will return next element from array. If nvlist is last
element in array or it isn't in array it will return his
container (parent). This function should simplify traveling over nvlist.
- Add tests for new features.
- Add documentation for new functions.
- Add my copyright.
- Regenerate the sys/cddl/compat/opensolaris/sys/nvpair.h file.

PR: 191083
Reviewed by: allanjude (doc)
Approved by: pjd (mentor)


285063 02-Jul-2015 oshogbo

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)


282348 02-May-2015 oshogbo

Add test case for unpack with diffrent flags.

Approved by: pjd (mentor)


282346 02-May-2015 oshogbo

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)


282254 29-Apr-2015 oshogbo

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

Approved by: pjd (mentor)


279760 08-Mar-2015 dim

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


279440 01-Mar-2015 rstone

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


279436 01-Mar-2015 rstone

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


279434 01-Mar-2015 rstone

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.


279432 01-Mar-2015 rstone

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.


279431 01-Mar-2015 rstone

Add tests for dnvlist_take_*

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


279430 01-Mar-2015 rstone

Add tests for dnv_get_*

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


279429 01-Mar-2015 rstone

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.


279428 01-Mar-2015 rstone

Add tests for nvlist_take_*

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


279427 01-Mar-2015 rstone

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.


279426 01-Mar-2015 rstone

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.


279425 01-Mar-2015 rstone

Add tests for nvlist_clone

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


279424 01-Mar-2015 rstone

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.


279423 01-Mar-2015 rstone

Revert r279422. My "apply patch and commit" script wasn't adding
new files properly.

Pointy hat to: rstone


279422 01-Mar-2015 rstone

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.


275024 25-Nov-2014 bapt

Convert libraries to use LIBADD
While here reduce a bit overlinking


269603 05-Aug-2014 ngie

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