Date: Thu, 23 Jul 2020 20:06:24 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363457 - head/sbin/md5 Message-ID: <202007232006.06NK6Om6027418@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Thu Jul 23 20:06:24 2020 New Revision: 363457 URL: https://svnweb.freebsd.org/changeset/base/363457 Log: md5: return non-zero if built-in tests (-x) fail MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sbin/md5/md5.c Modified: head/sbin/md5/md5.c ============================================================================== --- head/sbin/md5/md5.c Thu Jul 23 19:43:49 2020 (r363456) +++ head/sbin/md5/md5.c Thu Jul 23 20:06:24 2020 (r363457) @@ -498,10 +498,12 @@ MDTestSuite(const Algorithm_t *alg) for (i = 0; i < MDTESTCOUNT; i++) { (*alg->Data)(MDTestInput[i], strlen(MDTestInput[i]), buffer); printf("%s (\"%s\") = %s", alg->name, MDTestInput[i], buffer); - if (strcmp(buffer, (*alg->TestOutput)[i]) == 0) + if (strcmp(buffer, (*alg->TestOutput)[i]) == 0) { printf(" - verified correct\n"); - else + } else { printf(" - INCORRECT RESULT!\n"); + failed++; + } } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007232006.06NK6Om6027418>