mirror of
https://github.com/kneutron/ansitest.git
synced 2025-02-06 05:08:25 +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
|
# 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)
|
stime=$(date)
|
||||||
|
|
||||||
@ -11,11 +11,16 @@ zp=zint500 # This is where the Test-aes* datasets live
|
|||||||
tmpfile=$HOME/zfstestencrspeeds.txt
|
tmpfile=$HOME/zfstestencrspeeds.txt
|
||||||
outfile=$HOME/zfs-test-encryption-speeds-results.log
|
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=1
|
||||||
[ $useramdisk -eq 0 ] && isopath=/Volumes/zsgtera4/shrcompr-zsgt2B/ISO # use if < 6GB RAM installed
|
[ $useramdisk -eq 0 ] && isopath=/Volumes/zsgtera4/shrcompr-zsgt2B/ISO # use if < 6GB RAM installed
|
||||||
# TODO EDITME ^^
|
# xxx TODO EDITME ^^
|
||||||
[ "$isopath" = "" ] && isopath=/Volumes/ramdisk
|
[ "$isopath" = "" ] && isopath=/Volumes/ramdisk
|
||||||
|
|
||||||
[ -e "$isopath" ] || failexit 101 "! Ramdisk or ISO source not detected - run zfs-test-encryption-speeds--osx to create it"
|
[ -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
|
cd "$isopath" && pwd
|
||||||
|
|
||||||
function ttime () {
|
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
|
# see ' man date ' -- seconds
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# blankit
|
||||||
> $tmpfile
|
> $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
|
for d in /Volumes/$zp/Test-aes*; do
|
||||||
date; ttime; tstart=$result
|
date; ttime; tstart=$result
|
||||||
time cp -vf *.iso $d
|
time cp -vf *.iso $d
|
||||||
@ -37,8 +43,8 @@ for d in /Volumes/$zp/Test-aes*; do
|
|||||||
|
|
||||||
let csecs=$tend-$tstart
|
let csecs=$tend-$tstart
|
||||||
echo "$csecs Seconds to Copy ISO to $d" |tee -a $tmpfile
|
echo "$csecs Seconds to Copy ISO to $d" |tee -a $tmpfile
|
||||||
countdown 10 # sleep 10
|
sleep 10
|
||||||
purge
|
purge # OSX doesnt really have a sync, this is close
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "o Start time: $stime -- End time: $ntime"
|
echo "o Start time: $stime -- End time: $ntime"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user