NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/51823: [PATCH] add output diagnostic if memcmp of the md5 string fails



The following reply was made to PR bin/51823; it has been noted by GNATS.

From: "Ngie Cooper (yaneurabeya)" <yaneurabeya%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/51823: [PATCH] add output diagnostic if memcmp of the md5
 string fails
Date: Tue, 10 Jan 2017 23:56:35 -0800

 --Apple-Mail=_8AD8B933-FD5A-49B1-B13F-163DB5FB29D3
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii
 
 Patch attached.
 
 --Apple-Mail=_8AD8B933-FD5A-49B1-B13F-163DB5FB29D3
 Content-Disposition: attachment;
 	filename*0=t_memcpy-output-result-of-md5-comparison-for-diagnosis-purposes.;
 	filename*1=patch
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="t_memcpy-output-result-of-md5-comparison-for-diagnosis-purposes.patch"
 Content-Transfer-Encoding: 7bit
 
 Index: t_memcpy.c
 ===================================================================
 RCS file: /cvsroot/src/tests/lib/libc/string/t_memcpy.c,v
 retrieving revision 1.5
 diff -u -r1.5 t_memcpy.c
 --- t_memcpy.c	17 Mar 2013 02:23:31 -0000	1.5
 +++ t_memcpy.c	11 Jan 2017 07:37:10 -0000
 @@ -96,7 +96,8 @@
  			if (i != j)
  				runTest(start[i], start[j]);
  	MD5End(mc, result);
 -	ATF_REQUIRE_EQ(strcmp(result, goodResult), 0);
 +	ATF_REQUIRE_EQ_MSG(strcmp(result, goodResult), 0, "%s != %s",
 +	    result, goodResult);
  }
  
  ATF_TC(memccpy_simple);
 
 --Apple-Mail=_8AD8B933-FD5A-49B1-B13F-163DB5FB29D3--
 


Home | Main Index | Thread Index | Old Index