mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-25 14:17:41 +00:00
image and dummy pass selection in test suite
This commit is contained in:
parent
8d0c8e51e8
commit
f1318eb130
BIN
extras/test/arditi.jpg
Normal file
BIN
extras/test/arditi.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
T="../../tomb"
|
T="../../tomb"
|
||||||
source ${T} source
|
source ${T} source
|
||||||
|
dummypass=test
|
||||||
|
|
||||||
notice() { print; yes "${@}"; print; }
|
notice() { print; yes "${@}"; print; }
|
||||||
error() { _warning " ${@}"; }
|
error() { _warning " ${@}"; }
|
||||||
@ -52,11 +53,11 @@ tt dig -s 20 /tmp/test.tomb
|
|||||||
|
|
||||||
{ test $? = 0 } && { results+=(dig SUCCESS) }
|
{ test $? = 0 } && { results+=(dig SUCCESS) }
|
||||||
|
|
||||||
tt --ignore-swap --unsecure-dev-mode --tomb-pwd f00za --use-urandom forge /tmp/test.tomb.key
|
tt --ignore-swap --unsecure-dev-mode --tomb-pwd ${dummypass} --use-urandom forge /tmp/test.tomb.key
|
||||||
|
|
||||||
{ test $? = 0 } && { results+=(forge SUCCESS) }
|
{ test $? = 0 } && { results+=(forge SUCCESS) }
|
||||||
|
|
||||||
tt --ignore-swap --unsecure-dev-mode --tomb-pwd f00za lock /tmp/test.tomb -k /tmp/test.tomb.key
|
tt --ignore-swap --unsecure-dev-mode --tomb-pwd ${dummypass} lock /tmp/test.tomb -k /tmp/test.tomb.key
|
||||||
|
|
||||||
{ test $? = 0 } && { results+=(lock SUCCESS) }
|
{ test $? = 0 } && { results+=(lock SUCCESS) }
|
||||||
|
|
||||||
@ -72,7 +73,7 @@ tt --unsecure-dev-mode --tomb-pwd wrongpassword open /tmp/test.tomb
|
|||||||
|
|
||||||
notice "Testing open with good password"
|
notice "Testing open with good password"
|
||||||
|
|
||||||
tt --unsecure-dev-mode --tomb-pwd f00za open /tmp/test.tomb
|
tt --unsecure-dev-mode --tomb-pwd ${dummypass} open /tmp/test.tomb
|
||||||
|
|
||||||
{ test $? = 0 } && { results+=(open SUCCESS) }
|
{ test $? = 0 } && { results+=(open SUCCESS) }
|
||||||
|
|
||||||
@ -93,7 +94,7 @@ tt --unsecure-dev-mode close test
|
|||||||
{ test $RESIZER = 1 } && {
|
{ test $RESIZER = 1 } && {
|
||||||
notice "Testing resize to 30 MiB"
|
notice "Testing resize to 30 MiB"
|
||||||
|
|
||||||
tt --unsecure-dev-mode --tomb-pwd f00za -k /tmp/test.tomb.key resize /tmp/test.tomb -s 30
|
tt --unsecure-dev-mode --tomb-pwd ${dummypass} -k /tmp/test.tomb.key resize /tmp/test.tomb -s 30
|
||||||
|
|
||||||
{ test $? = 0 } && { results+=(resize SUCCESS) }
|
{ test $? = 0 } && { results+=(resize SUCCESS) }
|
||||||
|
|
||||||
@ -101,7 +102,7 @@ tt --unsecure-dev-mode close test
|
|||||||
|
|
||||||
notice "Testing contents integrity"
|
notice "Testing contents integrity"
|
||||||
|
|
||||||
${T} --unsecure-dev-mode --tomb-pwd f00za open /tmp/test.tomb
|
${T} --unsecure-dev-mode --tomb-pwd ${dummypass} open /tmp/test.tomb
|
||||||
|
|
||||||
crc2="sha256 /media/test.tomb/datacheck.raw"
|
crc2="sha256 /media/test.tomb/datacheck.raw"
|
||||||
|
|
||||||
@ -116,7 +117,7 @@ echo $rnd > /media/test.tomb/test-$rnd
|
|||||||
echo "test-$rnd test-$rnd" > /media/test.tomb/bind-hooks
|
echo "test-$rnd test-$rnd" > /media/test.tomb/bind-hooks
|
||||||
touch $HOME/test-$rnd
|
touch $HOME/test-$rnd
|
||||||
tt close test
|
tt close test
|
||||||
tt --unsecure-dev-mode --tomb-pwd f00za open /tmp/test.tomb
|
tt --unsecure-dev-mode --tomb-pwd ${dummypass} open /tmp/test.tomb
|
||||||
rnd2=`cat $HOME/test-$rnd`
|
rnd2=`cat $HOME/test-$rnd`
|
||||||
if [ "$rnd" = "$rnd2" ]; then
|
if [ "$rnd" = "$rnd2" ]; then
|
||||||
notice "Bind hook on file matches"
|
notice "Bind hook on file matches"
|
||||||
@ -136,21 +137,21 @@ tt close test
|
|||||||
notice "Testing KDF key"
|
notice "Testing KDF key"
|
||||||
sudo rm -f /tmp/test.tomb.kdf /tmp/kdf.tomb
|
sudo rm -f /tmp/test.tomb.kdf /tmp/kdf.tomb
|
||||||
|
|
||||||
tt --unsecure-dev-mode --tomb-pwd f00za --use-urandom --kdf 1 forge /tmp/test.tomb.kdf
|
tt --unsecure-dev-mode --tomb-pwd ${dummypass} --use-urandom --kdf 1 forge /tmp/test.tomb.kdf
|
||||||
|
|
||||||
{ test $? = 0 } && { results+=(kdforge SUCCESS) }
|
{ test $? = 0 } && { results+=(kdforge SUCCESS) }
|
||||||
|
|
||||||
tt --unsecure-dev-mode --tomb-pwd f00za --kdf 1 passwd /tmp/test.tomb.kdf
|
tt --unsecure-dev-mode --tomb-pwd ${dummypass} --kdf 1 passwd /tmp/test.tomb.kdf
|
||||||
|
|
||||||
{ test $? = 0 } && { results+=(kdfpass SUCCESS) }
|
{ test $? = 0 } && { results+=(kdfpass SUCCESS) }
|
||||||
|
|
||||||
${T} dig -s 10 /tmp/kdf.tomb
|
${T} dig -s 10 /tmp/kdf.tomb
|
||||||
|
|
||||||
tt --ignore-swap --unsecure-dev-mode --tomb-pwd f00za lock /tmp/kdf.tomb -k /tmp/test.tomb.kdf
|
tt --ignore-swap --unsecure-dev-mode --tomb-pwd ${dummypass} lock /tmp/kdf.tomb -k /tmp/test.tomb.kdf
|
||||||
|
|
||||||
{ test $? = 0 } && { results+=(kdflock SUCCESS) }
|
{ test $? = 0 } && { results+=(kdflock SUCCESS) }
|
||||||
|
|
||||||
tt --ignore-swap --unsecure-dev-mode --tomb-pwd f00za open /tmp/kdf.tomb -k /tmp/test.tomb.kdf
|
tt --ignore-swap --unsecure-dev-mode --tomb-pwd ${dummypass} open /tmp/kdf.tomb -k /tmp/test.tomb.kdf
|
||||||
|
|
||||||
{ test $? = 0 } && { results+=(kdfopen SUCCESS) }
|
{ test $? = 0 } && { results+=(kdfopen SUCCESS) }
|
||||||
|
|
||||||
@ -165,15 +166,15 @@ tt close test
|
|||||||
cp -f arditi.jpg /tmp/tomb.jpg
|
cp -f arditi.jpg /tmp/tomb.jpg
|
||||||
sudo rm -f /tmp/test.steg.key
|
sudo rm -f /tmp/test.steg.key
|
||||||
|
|
||||||
tt --unsecure-dev-mode --tomb-pwd f00za bury -k /tmp/test.tomb.key /tmp/tomb.jpg
|
tt --unsecure-dev-mode --tomb-pwd ${dummypass} bury -k /tmp/test.tomb.key /tmp/tomb.jpg
|
||||||
|
|
||||||
{ test $? = 0 } && { results+=(stgin SUCCESS) }
|
{ test $? = 0 } && { results+=(stgin SUCCESS) }
|
||||||
|
|
||||||
tt --unsecure-dev-mode --tomb-pwd f00za exhume -k /tmp/test.steg.key /tmp/tomb.jpg
|
tt --unsecure-dev-mode --tomb-pwd ${dummypass} exhume -k /tmp/test.steg.key /tmp/tomb.jpg
|
||||||
|
|
||||||
{ test $? = 0 } && { results+=(stgout SUCCESS) }
|
{ test $? = 0 } && { results+=(stgout SUCCESS) }
|
||||||
|
|
||||||
tt --unsecure-dev-mode --tomb-pwd f00za open -k /tmp/test.steg.key /tmp/test.tomb
|
tt --unsecure-dev-mode --tomb-pwd ${dummypass} open -k /tmp/test.steg.key /tmp/test.tomb
|
||||||
|
|
||||||
{ test $? = 0 } && { results+=(stgopen SUCCESS) }
|
{ test $? = 0 } && { results+=(stgopen SUCCESS) }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user