From d0ddfadfb27def2861f35b1a45190a4c1780b257 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Wed, 26 Oct 2016 15:45:01 +0100 Subject: md5sum,sha*sum: fix --ignore-missing with checksums starting with 00 * NEWS: Mention the fix. * src/md5sum.c (digest_file): Add a new MISSING parameter to return whether the file was missing, separately from the digest. * tests/misc/md5sum.pl: Add a test case. Fixes http://bugs.gnu.org/24795 --- tests/misc/md5sum.pl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/misc/md5sum.pl b/tests/misc/md5sum.pl index 2eb636937..6ea745721 100755 --- a/tests/misc/md5sum.pl +++ b/tests/misc/md5sum.pl @@ -149,6 +149,13 @@ my @Tests = {ERR=> "md5sum: f.md5: no file was verified\n"}, {EXIT=> 1}], + # coreutils-8.25 with --ignore-missing treated checksums starting with 00 + # as if the file was not present + ['check-ignore-missing-6', '--check', '--ignore-missing', + {AUX=> {f=> '9t'}}, + {IN=> {'f.md5' => + "006999e6df389641adf1fa3a74801d9d f\n"}}, + {OUT=>"f: OK\n"}], ['bsd-segv', '--check', {IN=> {'z' => "MD5 ("}}, {EXIT=> 1}, {ERR=> "$prog: z: no properly formatted MD5 checksum lines found\n"}], -- cgit v1.2.3-70-g09d2