I run a Gentoo system with kernel 4.4.8, glibc-2.22, dash-0.5.8.2 and bash-4.3_p42
I have a test failure if /bin/sh is symlinked to /bin/dash:
Hash algorithm MD5 is not installed (not an error)
mds.test: :2: :3: :11: :8: :9: :10: failed for a..z
FAIL: mds.test
[...]
1 of 34 tests failed
Please report to http://bugs.gnupg.org
cat mds.test.log
Test: mds.test
GNUPGHOME=/var/tmp/portage/app-crypt/gnupg-2.1.11-r1/work/gnupg-2.1.11/tests/openpgp
mds.test: :2: :3: :11: :8: :9: :10: failed for a..z
Using /bin/bash as /bin/sh all tests succeed.
I've dug around the issue a bit and, IMHO, the culprit is the echo_n function in
tests/openpgp/defs.inc.
In dash, the echo builtin does not support any argument or backslash sequence, thus the function
defines echo_n_n as the empty string and echo_n_c as '
' (which I don't really undestand...).
Then in mds.test is used in line 66 to do:
echo_n "abcdefghijklmnopqrstuvwxyz" | $GPG --with-colons --print-mds >y
which is supposed to get the checksums of the raw "abc....xyz" strings without newlines or anything
else, but this fails with dash because the strings becomes "abc...xyz
" and the checksums are all wrong.
Substituting "echo_n" with "printf" in mds.test fixes this test but I don't know if it may yield other
problems.