mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-30 05:02:54 +08:00
fix for standalone run, comments
This commit is contained in:
parent
629d2dbe1c
commit
f0787f100e
@ -1,7 +1,7 @@
|
||||
#!/bin/bash5
|
||||
#!/bin/bash
|
||||
|
||||
# osx
|
||||
# basic copy test after running zfs-test-encryption-speeds--osx
|
||||
# basic copy ISO to test each ZFS cipher's encryption speed after running zfs-test-encryption-speeds--osx (which creates the datasets)
|
||||
|
||||
stime=$(date)
|
||||
|
||||
@ -11,11 +11,16 @@ zp=zint500 # This is where the Test-aes* datasets live
|
||||
tmpfile=$HOME/zfstestencrspeeds.txt
|
||||
outfile=$HOME/zfs-test-encryption-speeds-results.log
|
||||
|
||||
source ~/bin/failexit.mrg
|
||||
#source ~/bin/failexit.mrg
|
||||
# failexit.mrg
|
||||
function failexit () {
|
||||
echo '! Something failed! Code: '"$1 $2" # code # (and optional description)
|
||||
exit $1
|
||||
}
|
||||
|
||||
useramdisk=1
|
||||
[ $useramdisk -eq 0 ] && isopath=/Volumes/zsgtera4/shrcompr-zsgt2B/ISO # use if < 6GB RAM installed
|
||||
# TODO EDITME ^^
|
||||
# xxx TODO EDITME ^^
|
||||
[ "$isopath" = "" ] && isopath=/Volumes/ramdisk
|
||||
|
||||
[ -e "$isopath" ] || failexit 101 "! Ramdisk or ISO source not detected - run zfs-test-encryption-speeds--osx to create it"
|
||||
@ -23,12 +28,13 @@ useramdisk=1
|
||||
cd "$isopath" && pwd
|
||||
|
||||
function ttime () {
|
||||
result=$(date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s")
|
||||
result=$(date -j -f "%a %b %d %T %Z %Y" "$(date)" "+%s")
|
||||
# see ' man date ' -- seconds
|
||||
}
|
||||
|
||||
# blankit
|
||||
> $tmpfile
|
||||
echo "Copying ISO file to each encrypted dataset"
|
||||
echo "$(date) - Copying ISO file to each encrypted dataset"
|
||||
for d in /Volumes/$zp/Test-aes*; do
|
||||
date; ttime; tstart=$result
|
||||
time cp -vf *.iso $d
|
||||
@ -37,8 +43,8 @@ for d in /Volumes/$zp/Test-aes*; do
|
||||
|
||||
let csecs=$tend-$tstart
|
||||
echo "$csecs Seconds to Copy ISO to $d" |tee -a $tmpfile
|
||||
countdown 10 # sleep 10
|
||||
purge
|
||||
sleep 10
|
||||
purge # OSX doesnt really have a sync, this is close
|
||||
done
|
||||
|
||||
echo "o Start time: $stime -- End time: $ntime"
|
||||
|
Loading…
x
Reference in New Issue
Block a user