2017-05-01 21:11:28 +01:00
|
|
|
#!/usr/bin/env zsh
|
|
|
|
|
|
|
|
export test_description="Testing tomb creation"
|
|
|
|
|
|
|
|
source ./setup
|
|
|
|
test_cleanup
|
|
|
|
|
|
|
|
test_export "test"
|
|
|
|
test_expect_success 'Testing tomb creation: dig, forge and lock' '
|
|
|
|
tt_dig -s 20 &&
|
|
|
|
tt_forge --tomb-pwd $DUMMYPASS &&
|
|
|
|
print $DUMMYPASS \
|
|
|
|
| gpg --batch --passphrase-fd 0 --no-tty --no-options -d $tomb_key \
|
2022-04-13 15:21:46 +02:00
|
|
|
| xxd &&
|
2017-05-01 21:11:28 +01:00
|
|
|
tt_lock --tomb-pwd $DUMMYPASS
|
|
|
|
'
|
|
|
|
|
2021-04-07 18:20:12 +01:00
|
|
|
if test_have_prereq DOAS; then
|
|
|
|
test_export "doas_test"
|
|
|
|
test_expect_success 'Testing tomb creation: dig, forge and lock (using doas instead of sudo)' '
|
|
|
|
tt_dig --sudo doas -s 20 &&
|
|
|
|
tt_forge --sudo doas --tomb-pwd $DUMMYPASS &&
|
|
|
|
print $DUMMYPASS \
|
|
|
|
| gpg --batch --passphrase-fd 0 --no-tty --no-options -d $tomb_key \
|
2022-04-13 15:21:46 +02:00
|
|
|
| xxd &&
|
2021-04-07 18:20:12 +01:00
|
|
|
tt_lock --sudo doas --tomb-pwd $DUMMYPASS
|
|
|
|
'
|
2019-03-03 16:56:26 +00:00
|
|
|
fi
|
|
|
|
|
2024-08-31 05:47:30 +02:00
|
|
|
if test_have_prereq BTRFS; then
|
2024-08-31 05:59:48 +02:00
|
|
|
test_export "btrfs"
|
2024-08-31 05:47:30 +02:00
|
|
|
test_expect_success 'Testing tomb creation using BTRFS filesystem' '
|
2024-08-31 05:53:47 +02:00
|
|
|
tt_dig -s 120 &&
|
2024-08-31 05:47:30 +02:00
|
|
|
tt_forge --tomb-pwd $DUMMYPASS &&
|
|
|
|
print $DUMMYPASS \
|
|
|
|
| gpg --batch --passphrase-fd 0 --no-tty --no-options -d $tomb_key \
|
|
|
|
| xxd &&
|
|
|
|
tt_lock --tomb-pwd $DUMMYPASS --filesystem btrfs
|
|
|
|
'
|
|
|
|
|
2024-08-31 05:59:48 +02:00
|
|
|
test_export "btrfsmixed"
|
2024-08-31 05:47:30 +02:00
|
|
|
test_expect_success 'Testing tomb creation using BTRFS mixedmode filesystem' '
|
|
|
|
tt_dig -s 20 &&
|
|
|
|
tt_forge --tomb-pwd $DUMMYPASS &&
|
|
|
|
print $DUMMYPASS \
|
|
|
|
| gpg --batch --passphrase-fd 0 --no-tty --no-options -d $tomb_key \
|
|
|
|
| xxd &&
|
|
|
|
tt_lock --tomb-pwd $DUMMYPASS --filesystem btrfsmixedmode
|
|
|
|
'
|
|
|
|
fi
|
|
|
|
|
2017-05-01 21:11:28 +01:00
|
|
|
test_done
|