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:
наб
2022-03-24 13:15:00 +01:00
committed by Brian Behlendorf
parent 5c9f744b1a
commit fbe811b054
10 changed files with 6 additions and 809 deletions
-14
View File
@@ -524,20 +524,6 @@ function get_system_config
echo "}" >>$config
}
function num_jobs_by_cpu
{
if is_linux; then
typeset ncpu=$($NPROC --all)
else
typeset ncpu=$(psrinfo | $WC -l)
fi
typeset num_jobs=$ncpu
[[ $ncpu -gt 8 ]] && num_jobs=$(echo "$ncpu * 3 / 4" | bc)
echo $num_jobs
}
#
# On illumos this looks like: ":sd3:sd4:sd1:sd2:"
#