md5: Improve compatibility.

* Overhaul the GNU compatibility mode to more closely emulate what the GNU tools do.

* Add a Perl compatibility mode which emulates the shasum tool that ships with Perl.  This is currently not installed.

* Overhaul the tests.

Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D39446
This commit is contained in:
Dag-Erling Smørgrav
2023-05-08 06:56:09 +00:00
parent f710a4de92
commit 4849767cb1
76 changed files with 1139 additions and 752 deletions
+73
View File
@@ -52,6 +52,79 @@
# xargs -n1 | sort | uniq -d;
# done
# 20230505: md5 tests are now self-contained
OLD_FILES+=usr/tests/sbin/md5/1.inp
OLD_FILES+=usr/tests/sbin/md5/1.sha512-p.chk
OLD_FILES+=usr/tests/sbin/md5/1.sha512sum-p.chk
OLD_FILES+=usr/tests/sbin/md5/2.inp
OLD_FILES+=usr/tests/sbin/md5/2.sha512-p.chk
OLD_FILES+=usr/tests/sbin/md5/2.sha512sum-p.chk
OLD_FILES+=usr/tests/sbin/md5/3.inp
OLD_FILES+=usr/tests/sbin/md5/3.sha512-p.chk
OLD_FILES+=usr/tests/sbin/md5/3.sha512sum-p.chk
OLD_FILES+=usr/tests/sbin/md5/4.inp
OLD_FILES+=usr/tests/sbin/md5/4.sha512-p.chk
OLD_FILES+=usr/tests/sbin/md5/4.sha512sum-p.chk
OLD_FILES+=usr/tests/sbin/md5/5.inp
OLD_FILES+=usr/tests/sbin/md5/5.sha512-p.chk
OLD_FILES+=usr/tests/sbin/md5/5.sha512sum-p.chk
OLD_FILES+=usr/tests/sbin/md5/6.inp
OLD_FILES+=usr/tests/sbin/md5/6.sha512-p.chk
OLD_FILES+=usr/tests/sbin/md5/6.sha512sum-p.chk
OLD_FILES+=usr/tests/sbin/md5/7.inp
OLD_FILES+=usr/tests/sbin/md5/7.sha512-p.chk
OLD_FILES+=usr/tests/sbin/md5/7.sha512sum-p.chk
OLD_FILES+=usr/tests/sbin/md5/8.inp
OLD_FILES+=usr/tests/sbin/md5/8.sha512-p.chk
OLD_FILES+=usr/tests/sbin/md5/8.sha512sum-p.chk
OLD_FILES+=usr/tests/sbin/md5/algorithms.txt
OLD_FILES+=usr/tests/sbin/md5/bsd-c-test
OLD_FILES+=usr/tests/sbin/md5/bsd-p-test
OLD_FILES+=usr/tests/sbin/md5/bsd-s-test
OLD_FILES+=usr/tests/sbin/md5/coreutils-c-test
OLD_FILES+=usr/tests/sbin/md5/md5.digest
OLD_FILES+=usr/tests/sbin/md5/md5sum.digest
OLD_FILES+=usr/tests/sbin/md5/rmd160.digest
OLD_FILES+=usr/tests/sbin/md5/rmd160sum.digest
OLD_FILES+=usr/tests/sbin/md5/self-test
OLD_FILES+=usr/tests/sbin/md5/self-test.md5.chk
OLD_FILES+=usr/tests/sbin/md5/self-test.rmd160.chk
OLD_FILES+=usr/tests/sbin/md5/self-test.sh_inp
OLD_FILES+=usr/tests/sbin/md5/self-test.sha1.chk
OLD_FILES+=usr/tests/sbin/md5/self-test.sha224.chk
OLD_FILES+=usr/tests/sbin/md5/self-test.sha256.chk
OLD_FILES+=usr/tests/sbin/md5/self-test.sha384.chk
OLD_FILES+=usr/tests/sbin/md5/self-test.sha512.chk
OLD_FILES+=usr/tests/sbin/md5/self-test.sha512t224.chk
OLD_FILES+=usr/tests/sbin/md5/self-test.sha512t256.chk
OLD_FILES+=usr/tests/sbin/md5/self-test.skein1024.chk
OLD_FILES+=usr/tests/sbin/md5/self-test.skein256.chk
OLD_FILES+=usr/tests/sbin/md5/self-test.skein512.chk
OLD_FILES+=usr/tests/sbin/md5/sha1.digest
OLD_FILES+=usr/tests/sbin/md5/sha1sum.digest
OLD_FILES+=usr/tests/sbin/md5/sha224.digest
OLD_FILES+=usr/tests/sbin/md5/sha224sum.digest
OLD_FILES+=usr/tests/sbin/md5/sha256.digest
OLD_FILES+=usr/tests/sbin/md5/sha256sum.digest
OLD_FILES+=usr/tests/sbin/md5/sha384.digest
OLD_FILES+=usr/tests/sbin/md5/sha384sum.digest
OLD_FILES+=usr/tests/sbin/md5/sha512.digest
OLD_FILES+=usr/tests/sbin/md5/sha512sum.digest
OLD_FILES+=usr/tests/sbin/md5/sha512t224.digest
OLD_FILES+=usr/tests/sbin/md5/sha512t224sum.digest
OLD_FILES+=usr/tests/sbin/md5/sha512t256.digest
OLD_FILES+=usr/tests/sbin/md5/sha512t256sum.digest
OLD_FILES+=usr/tests/sbin/md5/skein1024.digest
OLD_FILES+=usr/tests/sbin/md5/skein1024sum.digest
OLD_FILES+=usr/tests/sbin/md5/skein256.digest
OLD_FILES+=usr/tests/sbin/md5/skein256sum.digest
OLD_FILES+=usr/tests/sbin/md5/skein512.digest
OLD_FILES+=usr/tests/sbin/md5/skein512sum.digest
OLD_FILES+=usr/tests/sbin/md5/sum_a.in
OLD_FILES+=usr/tests/sbin/md5/sum_b.in
OLD_FILES+=usr/tests/sbin/md5/sum_c.in
OLD_FILES+=usr/tests/sbin/md5/sum_sums.digest
# 20230420: portsnap.8 removed
OLD_FILES+=etc/portsnap.conf
OLD_FILES+=usr/libexec/make_index