mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
tests: remove unused functions
As found by git -C tests/ grep ^function | grep -vFe '.lua:' -e '.zcp:' | while IFS=":$IFS" read -r _ _ fn _; do [ $(git -C tests/ grep -wF $fn | head -2 | wc -l) -eq 1 ] && echo $fn; done after all rounds this comes out to, sorted: check_slog_state chgusr_exec cksum_files cleanup_pools compare_modes count_ACE dataset_set_defaultproperties ds_is_snapshot get_ACE get_group get_min get_mode get_owner get_rand_checksum get_rand_checksum_any get_rand_large_recsize get_rand_recsize get_user_group getitem indirect_vdev_mapping_size is_dilos log_noresult log_notinuse log_other log_timed_out log_uninitiated log_warning num_jobs_by_cpu plus_sign_check_l plus_sign_check_v record_cksum rwx_node seconds_mmp_waits_for_activity set_cur_usr setup_mirrors setup_raidzs showshares_smb zfs_zones_setup This, of course, doesn't catch recursive ones, or ones that log with their own function name as a prefix, but Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13259
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/test-runner/include
|
||||
|
||||
dist_pkgdata_DATA = \
|
||||
logapi.shlib \
|
||||
stf.shlib
|
||||
logapi.shlib
|
||||
|
||||
@@ -26,7 +26,11 @@
|
||||
# Copyright (c) 2012, 2020 by Delphix. All rights reserved.
|
||||
#
|
||||
|
||||
. ${STF_TOOLS}/include/stf.shlib
|
||||
STF_PASS=0
|
||||
STF_FAIL=1
|
||||
STF_UNRESOLVED=2
|
||||
STF_UNSUPPORTED=4
|
||||
STF_UNTESTED=5
|
||||
|
||||
# Output an assertion
|
||||
#
|
||||
@@ -372,15 +376,6 @@ function log_unresolved
|
||||
_endlog $STF_UNRESOLVED "$@"
|
||||
}
|
||||
|
||||
# Perform cleanup and exit $STF_NOTINUSE
|
||||
#
|
||||
# $@ - message text
|
||||
|
||||
function log_notinuse
|
||||
{
|
||||
_endlog $STF_NOTINUSE "$@"
|
||||
}
|
||||
|
||||
# Perform cleanup and exit $STF_UNSUPPORTED
|
||||
#
|
||||
# $@ - message text
|
||||
@@ -399,51 +394,6 @@ function log_untested
|
||||
_endlog $STF_UNTESTED "$@"
|
||||
}
|
||||
|
||||
# Perform cleanup and exit $STF_UNINITIATED
|
||||
#
|
||||
# $@ - message text
|
||||
|
||||
function log_uninitiated
|
||||
{
|
||||
_endlog $STF_UNINITIATED "$@"
|
||||
}
|
||||
|
||||
# Perform cleanup and exit $STF_NORESULT
|
||||
#
|
||||
# $@ - message text
|
||||
|
||||
function log_noresult
|
||||
{
|
||||
_endlog $STF_NORESULT "$@"
|
||||
}
|
||||
|
||||
# Perform cleanup and exit $STF_WARNING
|
||||
#
|
||||
# $@ - message text
|
||||
|
||||
function log_warning
|
||||
{
|
||||
_endlog $STF_WARNING "$@"
|
||||
}
|
||||
|
||||
# Perform cleanup and exit $STF_TIMED_OUT
|
||||
#
|
||||
# $@ - message text
|
||||
|
||||
function log_timed_out
|
||||
{
|
||||
_endlog $STF_TIMED_OUT "$@"
|
||||
}
|
||||
|
||||
# Perform cleanup and exit $STF_OTHER
|
||||
#
|
||||
# $@ - message text
|
||||
|
||||
function log_other
|
||||
{
|
||||
_endlog $STF_OTHER "$@"
|
||||
}
|
||||
|
||||
function set_main_pid
|
||||
{
|
||||
_MAINPID=$1
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Copyright (c) 2012 by Delphix. All rights reserved.
|
||||
#
|
||||
|
||||
|
||||
STF_PASS=0
|
||||
STF_FAIL=1
|
||||
STF_UNRESOLVED=2
|
||||
STF_NOTINUSE=3
|
||||
STF_UNSUPPORTED=4
|
||||
STF_UNTESTED=5
|
||||
STF_UNINITIATED=6
|
||||
STF_NORESULT=7
|
||||
STF_WARNING=8
|
||||
STF_TIMED_OUT=9
|
||||
STF_OTHER=10
|
||||
|
||||
# do this to use the names: eval echo \$STF_RESULT_NAME_${result}
|
||||
STF_RESULT_NAME_0="PASS"
|
||||
STF_RESULT_NAME_1="FAIL"
|
||||
STF_RESULT_NAME_2="UNRESOLVED"
|
||||
STF_RESULT_NAME_3="NOTINUSE"
|
||||
STF_RESULT_NAME_4="UNSUPPORTED"
|
||||
STF_RESULT_NAME_5="UNTESTED"
|
||||
STF_RESULT_NAME_6="UNINITIATED"
|
||||
STF_RESULT_NAME_7="NORESULT"
|
||||
STF_RESULT_NAME_8="WARNING"
|
||||
STF_RESULT_NAME_9="TIMED_OUT"
|
||||
STF_RESULT_NAME_10="OTHER"
|
||||
|
||||
# do this to use the array: ${STF_RESULT_NAMES[$result]}
|
||||
STF_RESULT_NAMES=( "PASS" "FAIL" "UNRESOLVED" "NOTINUSE" "UNSUPPORTED" \
|
||||
"UNTESTED" "UNINITIATED" "NORESULT" "WARNING" "TIMED_OUT" "OTHER" )
|
||||
Reference in New Issue
Block a user