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 > \${LOG}
echo "" >> \${LOG}
echo "Disk IDs : \$DISKS" 2>&1 | /usr/bin/tee -a \${LOG}
# run tests
/bin/ksh /opt/zfs-tests/bin/zfstest \$* 2>&1 | /usr/bin/tee -a /var/tmp/z.tmp
echo "Results Summary" >> \${LOG}
echo "" >> \${LOG}
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=0
if [ "\${pass}" != "" ]; then
total=\$((\${total} + \${pass}))
fi
if [ "\${fail}" != "" ]; then
total=\$((\$skip + \$fail + \$pass))${total} + \${fail}))
fi
if [ "\${skip}" != "" ]; then
total=\$((\${total} + \${skip}))
fi
echo "TOTAL TESTS: \$total" >> \${LOG}
sed '1,/Results Summary/d' /var/tmp/z.tmp >> \${LOG}
sudo rm -f /var/tmp/z.tmp
EOT
ztest@zone:~# sed -i '/./!d' z.sh && chmod 777 z.sh
Тогда после запуска этого скрипта в файле /var/tmp/zfstest.<ISO TIME>.txt Вы найдёте лог в формате, в котором он публикуется в Test Results. |