Browse Source

Refine testsuite patch to access the crypsetup program

Christoph Biedl 2 days ago
parent
commit
4c829aa895

+ 3 - 3
debian/patches/local.dont-fail-tests-for-disabled-module-load.patch

@@ -11,7 +11,7 @@ Forwarded: not-needed
 
     Reproducer using command line (run as non-root):
     $ fallocate --length 8m test.img
-    $ echo foo | /sbin/cryptsetup luksFormat test.img -
+    $ echo foo | /usr/sbin/cryptsetup luksFormat test.img -
 
     The actual reason is DSA disabled automatic module loading by
     setting /proc/sys/kernel/modules_disabled to 1, for obvious reaons.
@@ -38,9 +38,9 @@ Forwarded: not-needed
  trap 'onexit' EXIT
  
  truncate -s 4M $tmp
--echo -n foo | /sbin/cryptsetup luksFormat --type luks1 $tmp -
+-echo -n foo | /usr/sbin/cryptsetup luksFormat --type luks1 $tmp -
 +PRE="$(md5sum $tmp)"
-+echo -n foo | /sbin/cryptsetup luksFormat --type luks1 $tmp - || true
++echo -n foo | /usr/sbin/cryptsetup luksFormat --type luks1 $tmp - || true
 +PST="$(md5sum $tmp)"
 +if [ "$PRE" = "$PST" ] ; then
 +    echo 'cryptsetup failed, assuming AF_ALG,SOCK_SEQPACKET failure'

+ 5 - 2
debian/patches/local.test-luksmeta.patch

@@ -1,8 +1,11 @@
-Description: As cryptsetup is not in non-root's path, qualify it
+Description: Qualify cryptsetup in the test suite
 Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
 Date: 2017-08-31
 Forwarded: not-needed
 
+    As cryptsetup is not available in PATH for non-root, qualify the
+    invocation accordingly.
+
 --- a/test-luksmeta
 +++ b/test-luksmeta
 @@ -14,7 +14,7 @@
@@ -10,7 +13,7 @@ Forwarded: not-needed
  
  truncate -s 4M $tmp
 -echo -n foo | cryptsetup luksFormat --type luks1 $tmp -
-+echo -n foo | /sbin/cryptsetup luksFormat --type luks1 $tmp -
++echo -n foo | /usr/sbin/cryptsetup luksFormat --type luks1 $tmp -
  
  ! ./luksmeta test -d $tmp