mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
tests: clean out unused/single-use/useless commands from the list
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:
@@ -8,9 +8,7 @@
|
||||
# Please keep the contents of each variable sorted for ease of reading
|
||||
# and maintenance.
|
||||
#
|
||||
export SYSTEM_FILES_COMMON='arp
|
||||
awk
|
||||
base64
|
||||
export SYSTEM_FILES_COMMON='awk
|
||||
basename
|
||||
bc
|
||||
bunzip2
|
||||
@@ -52,10 +50,10 @@ export SYSTEM_FILES_COMMON='arp
|
||||
ksh
|
||||
ldd
|
||||
ln
|
||||
logname
|
||||
ls
|
||||
mkdir
|
||||
mknod
|
||||
mkfifo
|
||||
mktemp
|
||||
mount
|
||||
mv
|
||||
@@ -67,12 +65,9 @@ export SYSTEM_FILES_COMMON='arp
|
||||
pgrep
|
||||
ping
|
||||
pkill
|
||||
printenv
|
||||
printf
|
||||
ps
|
||||
pwd
|
||||
python3
|
||||
quotaon
|
||||
readlink
|
||||
rm
|
||||
rmdir
|
||||
@@ -88,32 +83,26 @@ export SYSTEM_FILES_COMMON='arp
|
||||
ssh
|
||||
stat
|
||||
strings
|
||||
su
|
||||
sudo
|
||||
swapoff
|
||||
swapon
|
||||
sync
|
||||
tail
|
||||
tar
|
||||
tee
|
||||
timeout
|
||||
touch
|
||||
tr
|
||||
true
|
||||
truncate
|
||||
umask
|
||||
umount
|
||||
uname
|
||||
uniq
|
||||
uuidgen
|
||||
vmstat
|
||||
wait
|
||||
wc'
|
||||
|
||||
export SYSTEM_FILES_FREEBSD='chflags
|
||||
compress
|
||||
diskinfo
|
||||
dumpon
|
||||
fsck
|
||||
getextattr
|
||||
gpart
|
||||
@@ -123,7 +112,6 @@ export SYSTEM_FILES_FREEBSD='chflags
|
||||
lsextattr
|
||||
md5
|
||||
mdconfig
|
||||
mkfifo
|
||||
newfs
|
||||
pw
|
||||
rmextattr
|
||||
@@ -135,14 +123,11 @@ export SYSTEM_FILES_FREEBSD='chflags
|
||||
uncompress'
|
||||
|
||||
export SYSTEM_FILES_LINUX='attr
|
||||
bash
|
||||
blkid
|
||||
blockdev
|
||||
chattr
|
||||
dmidecode
|
||||
exportfs
|
||||
fallocate
|
||||
fdisk
|
||||
free
|
||||
getfattr
|
||||
groupadd
|
||||
@@ -159,16 +144,17 @@ export SYSTEM_FILES_LINUX='attr
|
||||
mkswap
|
||||
modprobe
|
||||
mpstat
|
||||
nproc
|
||||
parted
|
||||
perf
|
||||
setenforce
|
||||
setfattr
|
||||
sha256sum
|
||||
udevadm
|
||||
useradd
|
||||
userdel
|
||||
usermod'
|
||||
usermod
|
||||
|
||||
flock
|
||||
logger'
|
||||
|
||||
export ZFS_FILES='zdb
|
||||
zfs
|
||||
|
||||
@@ -2970,59 +2970,6 @@ function get_device_state #pool disk field("", "spares","logs")
|
||||
($1==field || $1 ~ "^spares$" || $1 ~ "^logs$") {startfield=0}'
|
||||
}
|
||||
|
||||
#
|
||||
# Given a disk, label it to VTOC regardless what label was on the disk
|
||||
# $1 disk
|
||||
#
|
||||
function labelvtoc
|
||||
{
|
||||
typeset disk=$1
|
||||
if [[ -z $disk ]]; then
|
||||
log_fail "The disk name is unspecified."
|
||||
fi
|
||||
typeset label_file=/var/tmp/labelvtoc.$$
|
||||
typeset arch=$(uname -p)
|
||||
|
||||
if is_linux || is_freebsd; then
|
||||
log_note "Currently unsupported by the test framework"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ $arch == "i386" ]]; then
|
||||
echo "label" > $label_file
|
||||
echo "0" >> $label_file
|
||||
echo "" >> $label_file
|
||||
echo "q" >> $label_file
|
||||
echo "q" >> $label_file
|
||||
|
||||
fdisk -B $disk >/dev/null 2>&1
|
||||
# wait a while for fdisk finishes
|
||||
sleep 60
|
||||
elif [[ $arch == "sparc" ]]; then
|
||||
echo "label" > $label_file
|
||||
echo "0" >> $label_file
|
||||
echo "" >> $label_file
|
||||
echo "" >> $label_file
|
||||
echo "" >> $label_file
|
||||
echo "q" >> $label_file
|
||||
else
|
||||
log_fail "unknown arch type"
|
||||
fi
|
||||
|
||||
format -e -s -d $disk -f $label_file
|
||||
typeset -i ret_val=$?
|
||||
rm -f $label_file
|
||||
#
|
||||
# wait the format to finish
|
||||
#
|
||||
sleep 60
|
||||
if ((ret_val != 0)); then
|
||||
log_fail "unable to label $disk as VTOC."
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
#
|
||||
# get the root filesystem name if it's zfsroot system.
|
||||
#
|
||||
@@ -3077,22 +3024,19 @@ function verify_disk_count
|
||||
function ds_is_volume
|
||||
{
|
||||
typeset type=$(get_prop type $1)
|
||||
[[ $type = "volume" ]] && return 0
|
||||
return 1
|
||||
[ $type = "volume" ]
|
||||
}
|
||||
|
||||
function ds_is_filesystem
|
||||
{
|
||||
typeset type=$(get_prop type $1)
|
||||
[[ $type = "filesystem" ]] && return 0
|
||||
return 1
|
||||
[ $type = "filesystem" ]
|
||||
}
|
||||
|
||||
function ds_is_snapshot
|
||||
{
|
||||
typeset type=$(get_prop type $1)
|
||||
[[ $type = "snapshot" ]] && return 0
|
||||
return 1
|
||||
[ $type = "snapshot" ]
|
||||
}
|
||||
|
||||
#
|
||||
@@ -3108,7 +3052,7 @@ function is_mp
|
||||
{
|
||||
case $(uname) in
|
||||
Linux)
|
||||
(($(nproc) > 1))
|
||||
(($(grep -c '^processor' /proc/cpuinfo) > 1))
|
||||
;;
|
||||
FreeBSD)
|
||||
sysctl -n kern.smp.cpus
|
||||
|
||||
Reference in New Issue
Block a user