From: Lennart Poettering Date: Wed, 5 Aug 2020 16:52:12 +0000 (+0200) Subject: test: add test for new repart features X-Git-Tag: v247-rc1~369^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f7011e17f1a86b4c355d644f379c668685b5e4e9;p=thirdparty%2Fsystemd.git test: add test for new repart features --- diff --git a/src/partition/test-repart.sh b/src/partition/test-repart.sh index 730f9cc9c3f..8b1ec6c4c1e 100755 --- a/src/partition/test-repart.sh +++ b/src/partition/test-repart.sh @@ -154,6 +154,57 @@ EOF cmp --bytes=41943040 --ignore-initial=0:$((512*4194264)) $D/block-copy $D/zzz +if [ `id -u` == 0 ] && type -P cryptsetup diff losetup > /dev/null ; then + echo "### Testing Format=/Encrypt=/CopyFiles=" + + # These tests require privileges unfortunately + + cat >$D/definitions/extra3.conf <$D/populated5 + + cmp $D/populated5 - < /dev/null + umount $D/mount + cryptsetup close $VOLUME + losetup -d $LOOP +else + echo "### Skipping Format=/Encrypt=/CopyFiles= test, lacking privileges or missing cryptsetup/diff/losetup" +fi + echo "### Testing json output ###" $repart $D/zzz --size=3G --dry-run=no --seed=$SEED --definitions=$D/definitions --json=help $repart $D/zzz --size=3G --dry-run=no --seed=$SEED --definitions=$D/definitions --json=pretty