Hook up nvlist XDR packing test
Add a new functional test that runs nvlist_packed for all flags and verifies packed verions against committed XDR streams generated on FreeBSD amd64. Streams should be stable on all platforms supported today. Signed-off-by: Brooks Davis <brooks.davis@sri.com>
This commit is contained in:
parent
5204d1027a
commit
e84894d2db
|
@ -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']
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -203,6 +203,7 @@ export ZFSTEST_FILES='badsend
|
|||
mmap_seek
|
||||
mmap_sync
|
||||
mmapwrite
|
||||
nvlist_packed
|
||||
nvlist_to_lua
|
||||
randfree_file
|
||||
randwritecomp
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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
|
|
@ -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"
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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
|
||||
|
Loading…
Reference in New Issue