]>
git.proxmox.com Git - mirror_zfs.git/blob - tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/zfs_sysfs_live.ksh
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
24 # Copyright (c) 2018, 2019 by Delphix. All rights reserved.
27 .
$STF_SUITE/include
/libtest.shlib
31 # Test if the expected '/sys/module/zfs/<dir>/<attr>' are present
34 verify_runnable
"global"
37 log_unsupported
"sysfs is linux-only"
40 claim
="Expected '/sys/module/zfs/<dir>/<attr>' attributes are present"
42 kernel_feature_attr
="/sys/module/zfs/features.kernel/org.zfsonlinux:vdev_trim/supported"
43 pool_feature_attr
="/sys/module/zfs/features.pool/org.open-zfs:large_blocks/guid"
44 pool_prop__attr
="/sys/module/zfs/properties.pool/comment/values"
45 ds_prop__attr
="/sys/module/zfs/properties.dataset/recordsize/values"
49 log_must
cat $kernel_feature_attr
50 log_must
cat $pool_feature_attr
51 log_must
cat $pool_prop__attr
52 log_must
cat $ds_prop__attr
54 # force a read of all the attributes for show func code coverage
55 log_must
grep -R "[a-z]" /sys
/module
/zfs
/features.
*
56 log_must
grep -R "[a-z]" /sys
/module
/zfs
/properties.
*
57 log_mustnot
grep -RE "[^[:print:]]" /sys
/module
/zfs
/properties.
*