diff mbox

[v3,5/9] lib/report: don't print 0 failed tests

Message ID 1460753571-20732-6-git-send-email-rkrcmar@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Radim Krčmář April 15, 2016, 8:52 p.m. UTC
Signed-off-by: Radim Kr?má? <rkrcmar@redhat.com>
---
 lib/report.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Andrew Jones April 19, 2016, 6:45 a.m. UTC | #1
On Fri, Apr 15, 2016 at 10:52:47PM +0200, Radim Kr?má? wrote:
> Signed-off-by: Radim Kr?má? <rkrcmar@redhat.com>
> ---
>  lib/report.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/report.c b/lib/report.c
> index 430b2aeaecbd..4cd75534f978 100644
> --- a/lib/report.c
> +++ b/lib/report.c
> @@ -95,7 +95,9 @@ int report_summary(void)
>  {
>  	spin_lock(&lock);
>  
> -	printf("\nSUMMARY: %d tests, %d unexpected failures", tests, failures);
> +	printf("\nSUMMARY: %d tests", tests);
> +	if (failures)
> +		printf(", %d unexpected failures", failures);
>  	if (xfailures)
>  		printf(", %d expected failures", xfailures);
>  	if (skipped)
> -- 
> 2.8.1
>

Reviewed-by: Andrew Jones <drjones@redhat.com> 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/lib/report.c b/lib/report.c
index 430b2aeaecbd..4cd75534f978 100644
--- a/lib/report.c
+++ b/lib/report.c
@@ -95,7 +95,9 @@  int report_summary(void)
 {
 	spin_lock(&lock);
 
-	printf("\nSUMMARY: %d tests, %d unexpected failures", tests, failures);
+	printf("\nSUMMARY: %d tests", tests);
+	if (failures)
+		printf(", %d unexpected failures", failures);
 	if (xfailures)
 		printf(", %d expected failures", xfailures);
 	if (skipped)