diff --git a/tests/runfiles/common.run b/tests/runfiles/common.run index 73ca699931..fe1d1213f4 100644 --- a/tests/runfiles/common.run +++ b/tests/runfiles/common.run @@ -713,6 +713,10 @@ tests = ['nopwrite_copies', 'nopwrite_mtime', 'nopwrite_negative', 'nopwrite_varying_compression', 'nopwrite_volume'] tags = ['functional', 'nopwrite'] +[tests/functional/libnvpair] +tests = ['packed'] +tags = ['functional', 'libnvpair'] + [tests/functional/online_offline] tests = ['online_offline_001_pos', 'online_offline_002_neg', 'online_offline_003_neg'] diff --git a/tests/runfiles/sanity.run b/tests/runfiles/sanity.run index f115f0b578..242e239e2f 100644 --- a/tests/runfiles/sanity.run +++ b/tests/runfiles/sanity.run @@ -490,6 +490,10 @@ tags = ['functional', 'nestedfs'] tests = ['nopwrite_sync', 'nopwrite_volume'] tags = ['functional', 'nopwrite'] +[tests/functional/libnvpair] +tests = ['packed'] +tags = ['functional', 'libnvpair'] + [tests/functional/pool_checkpoint] tests = ['checkpoint_conf_change', 'checkpoint_discard_many', 'checkpoint_removal', 'checkpoint_sm_scale', 'checkpoint_twice'] diff --git a/tests/zfs-tests/include/commands.cfg b/tests/zfs-tests/include/commands.cfg index b3cfe149ff..c4f32a91e7 100644 --- a/tests/zfs-tests/include/commands.cfg +++ b/tests/zfs-tests/include/commands.cfg @@ -203,6 +203,7 @@ export ZFSTEST_FILES='badsend mmap_seek mmap_sync mmapwrite + nvlist_packed nvlist_to_lua randfree_file randwritecomp diff --git a/tests/zfs-tests/tests/Makefile.am b/tests/zfs-tests/tests/Makefile.am index 39eb44f731..12ec842844 100644 --- a/tests/zfs-tests/tests/Makefile.am +++ b/tests/zfs-tests/tests/Makefile.am @@ -334,6 +334,78 @@ nobase_dist_datadir_zfs_tests_tests_DATA += \ functional/mv_files/mv_files_common.kshlib \ functional/nopwrite/nopwrite.shlib \ functional/no_space/enospc.cfg \ + functional/libnvpair/refs/boolean_flag.ref \ + functional/libnvpair/refs/byte.ref \ + functional/libnvpair/refs/int16.ref \ + functional/libnvpair/refs/uint16.ref \ + functional/libnvpair/refs/int32.ref \ + functional/libnvpair/refs/uint32.ref \ + functional/libnvpair/refs/int64.ref \ + functional/libnvpair/refs/uint64.ref \ + functional/libnvpair/refs/string_.ref \ + functional/libnvpair/refs/string_0.ref \ + functional/libnvpair/refs/string_01.ref \ + functional/libnvpair/refs/string_012.ref \ + functional/libnvpair/refs/string_0123.ref \ + functional/libnvpair/refs/string_01234.ref \ + functional/libnvpair/refs/string_012345.ref \ + functional/libnvpair/refs/string_0123456.ref \ + functional/libnvpair/refs/string_01234567.ref \ + functional/libnvpair/refs/string_012345678.ref \ + functional/libnvpair/refs/string_0123456789.ref \ + functional/libnvpair/refs/byte_array.ref \ + functional/libnvpair/refs/string_0123456789a.ref \ + functional/libnvpair/refs/string_0123456789ab.ref \ + functional/libnvpair/refs/string_0123456789abc.ref \ + functional/libnvpair/refs/string_0123456789abcd.ref \ + functional/libnvpair/refs/string_0123456789abcde.ref \ + functional/libnvpair/refs/string_0123456789abcdef.ref \ + functional/libnvpair/refs/string_0123456789abcdefg.ref \ + functional/libnvpair/refs/byte_array_empty.ref \ + functional/libnvpair/refs/byte_array_single.ref \ + functional/libnvpair/refs/int16_array.ref \ + functional/libnvpair/refs/int16_array_empty.ref \ + functional/libnvpair/refs/int16_array_single.ref \ + functional/libnvpair/refs/uint16_array.ref \ + functional/libnvpair/refs/uint16_array_empty.ref \ + functional/libnvpair/refs/uint16_array_single.ref \ + functional/libnvpair/refs/hrtime.ref \ + functional/libnvpair/refs/int32_array.ref \ + functional/libnvpair/refs/int32_array_empty.ref \ + functional/libnvpair/refs/int32_array_single.ref \ + functional/libnvpair/refs/uint32_array.ref \ + functional/libnvpair/refs/uint32_array_empty.ref \ + functional/libnvpair/refs/uint32_array_single.ref \ + functional/libnvpair/refs/int64_array.ref \ + functional/libnvpair/refs/int64_array_empty.ref \ + functional/libnvpair/refs/int64_array_single.ref \ + functional/libnvpair/refs/uint64_array.ref \ + functional/libnvpair/refs/uint64_array_empty.ref \ + functional/libnvpair/refs/uint64_array_single.ref \ + functional/libnvpair/refs/string_array.ref \ + functional/libnvpair/refs/string_array_empty.ref \ + functional/libnvpair/refs/string_array_single.ref \ + functional/libnvpair/refs/nvlist0.ref \ + functional/libnvpair/refs/nvlist1.ref \ + functional/libnvpair/refs/nvlist2.ref \ + functional/libnvpair/refs/nvlist3.ref \ + functional/libnvpair/refs/nvlist_array.ref \ + functional/libnvpair/refs/nvlist_array_empty.ref \ + functional/libnvpair/refs/nvlist_array_single.ref \ + functional/libnvpair/refs/boolean.ref \ + functional/libnvpair/refs/int8.ref \ + functional/libnvpair/refs/uint8.ref \ + functional/libnvpair/refs/boolean_array.ref \ + functional/libnvpair/refs/boolean_array_empty.ref \ + functional/libnvpair/refs/boolean_array_single.ref \ + functional/libnvpair/refs/int8_array.ref \ + functional/libnvpair/refs/int8_array_empty.ref \ + functional/libnvpair/refs/int8_array_single.ref \ + functional/libnvpair/refs/uint8_array.ref \ + functional/libnvpair/refs/uint8_array_empty.ref \ + functional/libnvpair/refs/uint8_array_single.ref \ + functional/libnvpair/refs/double.ref \ + functional/libnvpair/refs/empty_name.ref \ functional/online_offline/online_offline.cfg \ functional/pool_checkpoint/pool_checkpoint.kshlib \ functional/projectquota/projectquota.cfg \ @@ -1538,6 +1610,9 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \ functional/no_space/enospc_df.ksh \ functional/no_space/enospc_rm.ksh \ functional/no_space/setup.ksh \ + functional/libnvpair/cleanup.ksh \ + functional/libnvpair/packed.ksh \ + functional/libnvpair/setup.ksh \ functional/online_offline/cleanup.ksh \ functional/online_offline/online_offline_001_pos.ksh \ functional/online_offline/online_offline_002_neg.ksh \ diff --git a/tests/zfs-tests/tests/functional/libnvpair/cleanup.ksh b/tests/zfs-tests/tests/functional/libnvpair/cleanup.ksh new file mode 100644 index 0000000000..dc49790c99 --- /dev/null +++ b/tests/zfs-tests/tests/functional/libnvpair/cleanup.ksh @@ -0,0 +1,34 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2022 SRI International +# +# This software was developed by SRI International, the University of +# Cambridge Computer Laboratory (Department of Computer Science and +# Technology), and Capabilities Limited under Defense Advanced Research +# Projects Agency (DARPA) Contract No. HR001122C0110 ("ETC"). +# + +. $STF_SUITE/include/libtest.shlib + +log_pass diff --git a/tests/zfs-tests/tests/functional/libnvpair/packed.ksh b/tests/zfs-tests/tests/functional/libnvpair/packed.ksh new file mode 100644 index 0000000000..ef50e9a194 --- /dev/null +++ b/tests/zfs-tests/tests/functional/libnvpair/packed.ksh @@ -0,0 +1,48 @@ +#! /bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2022 SRI International +# +# This software was developed by SRI International, the University of +# Cambridge Computer Laboratory (Department of Computer Science and +# Technology), and Capabilities Limited under Defense Advanced Research +# Projects Agency (DARPA) Contract No. HR001122C0110 ("ETC"). +# + +. $STF_SUITE/include/libtest.shlib + +# +# DESCRIPTION: +# Ensure that nvlists can be packed and unpacked correctly. +# +# STRATEGY: +# Run all test cases and check against reference outputs +# + +verify_runnable "both" + +log_assert "Ensure nvlist pack/unpack work" + +log_must nvlist_packed -a -r ${STF_SUITE}/tests/functional/libnvpair/refs + +log_pass "Packed nvlists round trip and compare to references" diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/boolean.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/boolean.ref new file mode 100644 index 0000000000..e169cf5ffa Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/boolean.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/boolean_array.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/boolean_array.ref new file mode 100644 index 0000000000..a66f023f28 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/boolean_array.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/boolean_array_empty.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/boolean_array_empty.ref new file mode 100644 index 0000000000..cbeaa3d8cf Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/boolean_array_empty.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/boolean_array_single.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/boolean_array_single.ref new file mode 100644 index 0000000000..90b966b4e3 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/boolean_array_single.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/boolean_flag.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/boolean_flag.ref new file mode 100644 index 0000000000..019f6b4e85 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/boolean_flag.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/byte.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/byte.ref new file mode 100644 index 0000000000..8f021bb1fd Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/byte.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/byte_array.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/byte_array.ref new file mode 100644 index 0000000000..20191e4259 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/byte_array.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/byte_array_empty.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/byte_array_empty.ref new file mode 100644 index 0000000000..d1eed75650 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/byte_array_empty.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/byte_array_single.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/byte_array_single.ref new file mode 100644 index 0000000000..d94b768314 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/byte_array_single.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/double.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/double.ref new file mode 100644 index 0000000000..c789a04927 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/double.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/empty_name.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/empty_name.ref new file mode 100644 index 0000000000..e4afe72b9f Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/empty_name.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/hrtime.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/hrtime.ref new file mode 100644 index 0000000000..ee20de2866 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/hrtime.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int16.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int16.ref new file mode 100644 index 0000000000..411a9f2ad9 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int16.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int16_array.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int16_array.ref new file mode 100644 index 0000000000..0ae965558d Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int16_array.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int16_array_empty.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int16_array_empty.ref new file mode 100644 index 0000000000..90b79e3352 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int16_array_empty.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int16_array_single.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int16_array_single.ref new file mode 100644 index 0000000000..61389231b5 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int16_array_single.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int32.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int32.ref new file mode 100644 index 0000000000..254e0bc384 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int32.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int32_array.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int32_array.ref new file mode 100644 index 0000000000..e908ca2743 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int32_array.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int32_array_empty.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int32_array_empty.ref new file mode 100644 index 0000000000..79fbb2aa19 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int32_array_empty.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int32_array_single.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int32_array_single.ref new file mode 100644 index 0000000000..6f82c2108e Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int32_array_single.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int64.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int64.ref new file mode 100644 index 0000000000..503a97b2fa Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int64.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int64_array.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int64_array.ref new file mode 100644 index 0000000000..68d1b43a83 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int64_array.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int64_array_empty.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int64_array_empty.ref new file mode 100644 index 0000000000..31d50ff1bc Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int64_array_empty.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int64_array_single.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int64_array_single.ref new file mode 100644 index 0000000000..eaeb0de9f9 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int64_array_single.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int8.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int8.ref new file mode 100644 index 0000000000..4d104062fe Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int8.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int8_array.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int8_array.ref new file mode 100644 index 0000000000..bd380dff9d Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int8_array.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int8_array_empty.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int8_array_empty.ref new file mode 100644 index 0000000000..54546eae2c Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int8_array_empty.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/int8_array_single.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/int8_array_single.ref new file mode 100644 index 0000000000..40d4a6d24b Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/int8_array_single.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist0.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist0.ref new file mode 100644 index 0000000000..8a29be6701 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist0.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist1.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist1.ref new file mode 100644 index 0000000000..dc355f8a50 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist1.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist2.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist2.ref new file mode 100644 index 0000000000..e9871d83ed Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist2.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist3.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist3.ref new file mode 100644 index 0000000000..365655962f Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist3.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist_array.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist_array.ref new file mode 100644 index 0000000000..93561ac89f Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist_array.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist_array_empty.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist_array_empty.ref new file mode 100644 index 0000000000..e27fbf98ac Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist_array_empty.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist_array_single.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist_array_single.ref new file mode 100644 index 0000000000..b20a194365 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/nvlist_array_single.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_.ref new file mode 100644 index 0000000000..325938256e Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_0.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0.ref new file mode 100644 index 0000000000..860cf3d071 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_01.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_01.ref new file mode 100644 index 0000000000..5c6724102c Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_01.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_012.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_012.ref new file mode 100644 index 0000000000..5b11119afa Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_012.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123.ref new file mode 100644 index 0000000000..74498975c4 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_01234.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_01234.ref new file mode 100644 index 0000000000..70d1748939 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_01234.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_012345.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_012345.ref new file mode 100644 index 0000000000..800d18e723 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_012345.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456.ref new file mode 100644 index 0000000000..d80bae7103 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_01234567.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_01234567.ref new file mode 100644 index 0000000000..ff971aef05 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_01234567.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_012345678.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_012345678.ref new file mode 100644 index 0000000000..d6344c1194 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_012345678.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789.ref new file mode 100644 index 0000000000..6488575d83 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789a.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789a.ref new file mode 100644 index 0000000000..c693671ed5 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789a.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789ab.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789ab.ref new file mode 100644 index 0000000000..2eaade3c16 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789ab.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abc.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abc.ref new file mode 100644 index 0000000000..8db35412b9 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abc.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abcd.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abcd.ref new file mode 100644 index 0000000000..2bba00dc31 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abcd.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abcde.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abcde.ref new file mode 100644 index 0000000000..947a866223 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abcde.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abcdef.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abcdef.ref new file mode 100644 index 0000000000..b8dbb54734 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abcdef.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abcdefg.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abcdefg.ref new file mode 100644 index 0000000000..67b794d908 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_0123456789abcdefg.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_array.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_array.ref new file mode 100644 index 0000000000..d2d42086ab Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_array.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_array_empty.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_array_empty.ref new file mode 100644 index 0000000000..a47a74f130 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_array_empty.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/string_array_single.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/string_array_single.ref new file mode 100644 index 0000000000..86eddce6f0 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/string_array_single.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint16.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint16.ref new file mode 100644 index 0000000000..0ac7b54bbb Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint16.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint16_array.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint16_array.ref new file mode 100644 index 0000000000..37168018d9 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint16_array.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint16_array_empty.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint16_array_empty.ref new file mode 100644 index 0000000000..e31d698e26 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint16_array_empty.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint16_array_single.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint16_array_single.ref new file mode 100644 index 0000000000..3722cc1142 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint16_array_single.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint32.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint32.ref new file mode 100644 index 0000000000..2773cc71eb Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint32.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint32_array.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint32_array.ref new file mode 100644 index 0000000000..257accf94f Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint32_array.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint32_array_empty.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint32_array_empty.ref new file mode 100644 index 0000000000..8dad832d29 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint32_array_empty.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint32_array_single.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint32_array_single.ref new file mode 100644 index 0000000000..48e74f046b Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint32_array_single.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint64.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint64.ref new file mode 100644 index 0000000000..5cf66821f9 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint64.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint64_array.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint64_array.ref new file mode 100644 index 0000000000..dfceee2f15 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint64_array.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint64_array_empty.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint64_array_empty.ref new file mode 100644 index 0000000000..f2632fbe0d Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint64_array_empty.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint64_array_single.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint64_array_single.ref new file mode 100644 index 0000000000..a739e51bd7 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint64_array_single.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint8.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint8.ref new file mode 100644 index 0000000000..d051cccfe9 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint8.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint8_array.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint8_array.ref new file mode 100644 index 0000000000..23418e847d Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint8_array.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint8_array_empty.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint8_array_empty.ref new file mode 100644 index 0000000000..a69446d734 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint8_array_empty.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/refs/uint8_array_single.ref b/tests/zfs-tests/tests/functional/libnvpair/refs/uint8_array_single.ref new file mode 100644 index 0000000000..cf69f38a69 Binary files /dev/null and b/tests/zfs-tests/tests/functional/libnvpair/refs/uint8_array_single.ref differ diff --git a/tests/zfs-tests/tests/functional/libnvpair/setup.ksh b/tests/zfs-tests/tests/functional/libnvpair/setup.ksh new file mode 100644 index 0000000000..c8a0bcd27b --- /dev/null +++ b/tests/zfs-tests/tests/functional/libnvpair/setup.ksh @@ -0,0 +1,37 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2022 SRI International +# +# This software was developed by SRI International, the University of +# Cambridge Computer Laboratory (Department of Computer Science and +# Technology), and Capabilities Limited under Defense Advanced Research +# Projects Agency (DARPA) Contract No. HR001122C0110 ("ETC"). +# + +. $STF_SUITE/include/libtest.shlib + +# No setup required, test is self contained other than committed reference +# files. +log_pass +