diff options
author | наб <[email protected]> | 2022-03-24 13:15:00 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-04-01 18:03:05 -0700 |
commit | fbe811b054fecd2ac9f7c3659616ffa1802aadf0 (patch) | |
tree | d46772728d2b554ef7c879c7ea419b11178b3526 /tests/test-runner | |
parent | 5c9f744b1a4ea8ab3e0a93442ea30ab62b88b504 (diff) |
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 <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #13259
Diffstat (limited to 'tests/test-runner')
-rw-r--r-- | tests/test-runner/include/Makefile.am | 3 | ||||
-rw-r--r-- | tests/test-runner/include/logapi.shlib | 60 | ||||
-rw-r--r-- | tests/test-runner/include/stf.shlib | 57 |
3 files changed, 6 insertions, 114 deletions
diff --git a/tests/test-runner/include/Makefile.am b/tests/test-runner/include/Makefile.am index d3eeb32de..62817ded8 100644 --- a/tests/test-runner/include/Makefile.am +++ b/tests/test-runner/include/Makefile.am @@ -1,5 +1,4 @@ pkgdatadir = $(datadir)/@PACKAGE@/test-runner/include dist_pkgdata_DATA = \ - logapi.shlib \ - stf.shlib + logapi.shlib diff --git a/tests/test-runner/include/logapi.shlib b/tests/test-runner/include/logapi.shlib index 765194cb9..094e8cb21 100644 --- a/tests/test-runner/include/logapi.shlib +++ b/tests/test-runner/include/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 diff --git a/tests/test-runner/include/stf.shlib b/tests/test-runner/include/stf.shlib deleted file mode 100644 index ea879a84c..000000000 --- a/tests/test-runner/include/stf.shlib +++ /dev/null @@ -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" ) |