mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Move some tests to cli_user/zpool_status
The tests in tests/functional/cli_root/zpool_status should all require root. However, linux.run has "user =" specified for those tests, which means they run as a normal user. When I removed that line to run them as root, the following tests did not pass: zpool_status_003_pos zpool_status_-c_disable zpool_status_-c_homedir zpool_status_-c_searchpath These tests need to be run as a normal user. To fix this, move these tests to a new tests/functional/cli_user/zpool_status directory. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Giuseppe Di Natale <guss80@gmail.com> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #9057
This commit is contained in:
parent
1c4b0fc745
commit
be068aeea8
@ -272,6 +272,7 @@ AC_CONFIG_FILES([
|
||||
tests/zfs-tests/tests/functional/cli_user/zfs_list/Makefile
|
||||
tests/zfs-tests/tests/functional/cli_user/zpool_iostat/Makefile
|
||||
tests/zfs-tests/tests/functional/cli_user/zpool_list/Makefile
|
||||
tests/zfs-tests/tests/functional/cli_user/zpool_status/Makefile
|
||||
tests/zfs-tests/tests/functional/compression/Makefile
|
||||
tests/zfs-tests/tests/functional/cp_files/Makefile
|
||||
tests/zfs-tests/tests/functional/ctime/Makefile
|
||||
|
@ -462,10 +462,7 @@ tests = ['zpool_split_cliargs', 'zpool_split_devices',
|
||||
tags = ['functional', 'cli_root', 'zpool_split']
|
||||
|
||||
[tests/functional/cli_root/zpool_status]
|
||||
tests = ['zpool_status_001_pos', 'zpool_status_002_pos','zpool_status_003_pos',
|
||||
'zpool_status_-c_disable', 'zpool_status_-c_homedir',
|
||||
'zpool_status_-c_searchpath']
|
||||
user =
|
||||
tests = ['zpool_status_001_pos', 'zpool_status_002_pos']
|
||||
tags = ['functional', 'cli_root', 'zpool_status']
|
||||
|
||||
[tests/functional/cli_root/zpool_sync]
|
||||
@ -529,6 +526,12 @@ tests = ['zpool_list_001_pos', 'zpool_list_002_neg']
|
||||
user =
|
||||
tags = ['functional', 'cli_user', 'zpool_list']
|
||||
|
||||
[tests/functional/cli_user/zpool_status]
|
||||
tests = ['zpool_status_003_pos', 'zpool_status_-c_disable',
|
||||
'zpool_status_-c_homedir', 'zpool_status_-c_searchpath']
|
||||
user =
|
||||
tags = ['functional', 'cli_user', 'zpool_status']
|
||||
|
||||
[tests/functional/compression]
|
||||
tests = ['compress_001_pos', 'compress_002_pos', 'compress_003_pos',
|
||||
'compress_004_pos']
|
||||
|
@ -3,8 +3,4 @@ dist_pkgdata_SCRIPTS = \
|
||||
setup.ksh \
|
||||
cleanup.ksh \
|
||||
zpool_status_001_pos.ksh \
|
||||
zpool_status_002_pos.ksh \
|
||||
zpool_status_003_pos.ksh \
|
||||
zpool_status_-c_disable.ksh \
|
||||
zpool_status_-c_homedir.ksh \
|
||||
zpool_status_-c_searchpath.ksh
|
||||
zpool_status_002_pos.ksh
|
||||
|
@ -2,4 +2,5 @@ SUBDIRS = \
|
||||
misc \
|
||||
zfs_list \
|
||||
zpool_iostat \
|
||||
zpool_list
|
||||
zpool_list \
|
||||
zpool_status
|
||||
|
@ -0,0 +1,8 @@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/cli_user/zpool_status
|
||||
dist_pkgdata_SCRIPTS = \
|
||||
setup.ksh \
|
||||
cleanup.ksh \
|
||||
zpool_status_003_pos.ksh \
|
||||
zpool_status_-c_disable.ksh \
|
||||
zpool_status_-c_homedir.ksh \
|
||||
zpool_status_-c_searchpath.ksh
|
30
tests/zfs-tests/tests/functional/cli_user/zpool_status/cleanup.ksh
Executable file
30
tests/zfs-tests/tests/functional/cli_user/zpool_status/cleanup.ksh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/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 http://www.opensolaris.org/os/licensing.
|
||||
# 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 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
|
||||
. $STF_SUITE/include/libtest.shlib
|
||||
|
||||
default_cleanup
|
32
tests/zfs-tests/tests/functional/cli_user/zpool_status/setup.ksh
Executable file
32
tests/zfs-tests/tests/functional/cli_user/zpool_status/setup.ksh
Executable file
@ -0,0 +1,32 @@
|
||||
#!/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 http://www.opensolaris.org/os/licensing.
|
||||
# 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 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
|
||||
. $STF_SUITE/include/libtest.shlib
|
||||
|
||||
DISK=${DISKS%% *}
|
||||
|
||||
default_setup $DISK
|
Loading…
Reference in New Issue
Block a user