Note : Тесты можно запустить при помощи тестового скрипта. Его можно создать либо в текстовом редакторе, либо при помощи команды: ztest@zone:~# cat > z.sh <<EOT
#!/bin/bash
LOG="/var/tmp/zfstest.\$(date +%F-%T).txt"
sudo /sbin/zpool destroy testpool
sudo -E /usr/sbin/svcadm disable -s svc:/system/fmd:default
sudo -E find /var/fm/fmd -type f -exec rm {} \\;
sudo -E /usr/sbin/svcadm enable svc:/system/fmd:default
# we need 3 x 8G drives with 512b sector size
export DISKS="\$1 \$2 \$3"
export KEEP="rpool data"
export ZFS_USE_ONLY_DISKS=yes
#remove partition on disks
for D in \$DISKS
do
sudo -E /usr/bin/dd if=/dev/null of=/dev/dsk/\${D}p0 bs=512 count=512K
done
# cleanup drives before tests:
sudo -E /sbin/zpool create -f test123321 \$DISKS
sudo -E /sbin/zpool destroy test123321
sudo -E rm -rf /tmp/mnt* /tmp/ufs.* /tmp/log.* /tmp/tmp.* /tmp/rst* /tmp/tmpfs*
test -d /var/tmp/test_results && sudo rm -rf /var/tmp/test_results
sudo -E /usr/sbin/devfsadm -C
uname -a > z.tmp\${LOG}
echo "" >> \${LOG}
echo "Disk IDs : \$DISKS" 2>&1 | /usr/bin/tee -a z.tmp\${LOG}
# run tests START_TIME=\$(date +%s)
/bin/ksh /opt/zfs-tests/bin/zfstest \$* 2>&1 | /usr/bin/tee -a \${LOG}
END_TIME=\$(date +%s)
delta=\$((\$END_TIME - \$START_TIME))
sec=\$((\$delta % 60))
let "amin = \$delta / 60"
let "hour = \$amin / 60"
min=\$((\$amin%60))
printf "Running Time: %02d:%02d:%02d\n" \$hour \$min \$sec 2>&1 | /usr/bin/tee -a \${LOG}
sed -n '/Results Summary/,/Log directory:/p' /var/tmp/z.tmp
echo "Results Summary" >> ${LOG}
echo "" >> \${LOG} >> z.tmp
skip=\$(sed -n '/^SKIP[ \\t]*/p' /var/tmp/z.tmp | sed 's/^SKIP[ \\t]*//; s/[*\\t]*\$//')
fail=\$(sed -n '/^FAIL[ \\t]*/p' /var/tmp/z.tmp | sed 's/^FAIL[ \\t]*//; s/[*\\t]*\$//')
pass=\$(sed -n '/^PASS[ \\t]*/p' /var/tmp/z.tmp | sed 's/^PASS[ \\t]*//; s/[*\\t]*\$//')
total=\$((\$skip + \$fail + \$pass))
echo "TOTAL TESTS \$total" >> z.tmp
echo "---------------------------------------------------------" >> z.tmp
echo "" >> z.tmp
cat \${LOG}
sed '1,/Results Summary/d' /var/tmp/z.tmp >> \${LOG} >> z.tmp mv
sudo rm -f /var/tmp/z.tmp \${LOG}
EOT
ztest@zone:~# sed -i '/./!d' z.sh && chmod 777 z.sh
Тогда после запуска этого скрипта в файле /var/tmp/zfstest.<ISO TIME>.txt Вы найдёте лог в формате, в котором он публикуется в Test Results. |